@4399ywkf/editor 0.14.2 → 0.16.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/dist/{DocView-VTKFMW46.js → DocView-7QBKHBU4.js} +4 -3
- package/dist/DocView-7QBKHBU4.js.map +1 -0
- package/dist/SheetView-WP4DKSDS.js +3 -0
- package/dist/{SheetView-6Z5EPBN4.js.map → SheetView-WP4DKSDS.js.map} +1 -1
- package/dist/base-model.d.ts +131 -0
- package/dist/base-model.js +3 -0
- package/dist/base-model.js.map +1 -0
- package/dist/base.d.ts +978 -0
- package/dist/base.js +14180 -0
- package/dist/base.js.map +1 -0
- package/dist/{chunk-FMTC3EDQ.js → chunk-4SIP4BYI.js} +3 -3
- package/dist/{chunk-FMTC3EDQ.js.map → chunk-4SIP4BYI.js.map} +1 -1
- package/dist/chunk-F4LWFKIA.js +2931 -0
- package/dist/chunk-F4LWFKIA.js.map +1 -0
- package/dist/chunk-S57WFYWY.js +2014 -0
- package/dist/chunk-S57WFYWY.js.map +1 -0
- package/dist/{chunk-ZLEGKX2U.js → chunk-X2JCKZP2.js} +9385 -9998
- package/dist/chunk-X2JCKZP2.js.map +1 -0
- package/dist/{chunk-OBKIMG6G.js → chunk-X4BUO2RH.js} +4 -4
- package/dist/{chunk-OBKIMG6G.js.map → chunk-X4BUO2RH.js.map} +1 -1
- package/dist/csv.js +1 -1
- package/dist/doc-standalone.js +11425 -9116
- package/dist/doc-standalone.js.map +1 -1
- package/dist/doc.d.ts +4 -379
- package/dist/doc.js +3 -2
- package/dist/doc.js.map +1 -1
- package/dist/editor-config-context-DvLRd7Gx.d.ts +382 -0
- package/dist/form-DqUOPVKI.d.ts +475 -0
- package/dist/{import-XL3AH3QH.js → import-TEZ37G5R.js} +5 -5
- package/dist/{import-XL3AH3QH.js.map → import-TEZ37G5R.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/sheet.js +1 -1
- package/dist/style.css +2 -2
- package/dist/xlsx.js +4 -4
- package/package.json +10 -2
- package/dist/DocView-VTKFMW46.js.map +0 -1
- package/dist/SheetView-6Z5EPBN4.js +0 -3
- package/dist/chunk-ZLEGKX2U.js.map +0 -1
|
@@ -0,0 +1,2931 @@
|
|
|
1
|
+
import { createContext, useMemo, useContext } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { serialize, compile, stringify } from 'stylis';
|
|
4
|
+
|
|
5
|
+
// src/contexts/editor-config-context.tsx
|
|
6
|
+
var DEFAULT_MAX_FILE_SIZES = {
|
|
7
|
+
// 飞书图片上限 20MB(IM 318644:`limitSize || 20971520`)
|
|
8
|
+
image: 20 * 1024 * 1024,
|
|
9
|
+
video: 100 * 1024 * 1024,
|
|
10
|
+
audio: 20 * 1024 * 1024,
|
|
11
|
+
file: 20 * 1024 * 1024
|
|
12
|
+
};
|
|
13
|
+
var detectMediaKind = (file) => {
|
|
14
|
+
if (file.type.startsWith("image/")) return "image";
|
|
15
|
+
if (file.type.startsWith("video/")) return "video";
|
|
16
|
+
if (file.type.startsWith("audio/")) return "audio";
|
|
17
|
+
return "file";
|
|
18
|
+
};
|
|
19
|
+
var resolveMaxSize = (kind, config) => {
|
|
20
|
+
const fromTypes = config?.maxFileSizes?.[kind];
|
|
21
|
+
if (typeof fromTypes === "number") return fromTypes;
|
|
22
|
+
if (kind === "image" && typeof config?.maxFileSize === "number") {
|
|
23
|
+
return config.maxFileSize;
|
|
24
|
+
}
|
|
25
|
+
return DEFAULT_MAX_FILE_SIZES[kind];
|
|
26
|
+
};
|
|
27
|
+
var EditorConfigContext = createContext(null);
|
|
28
|
+
function EditorConfigProvider({
|
|
29
|
+
config,
|
|
30
|
+
children
|
|
31
|
+
}) {
|
|
32
|
+
const value = useMemo(() => config, [config]);
|
|
33
|
+
return /* @__PURE__ */ jsx(EditorConfigContext.Provider, { value, children });
|
|
34
|
+
}
|
|
35
|
+
var useEditorConfig = () => useContext(EditorConfigContext);
|
|
36
|
+
|
|
37
|
+
// src/theme/base-vars.ts
|
|
38
|
+
var BASE_LIGHT_VARS = {
|
|
39
|
+
"--tt-gray-light-a-50": "rgba(56, 56, 56, 0.04)",
|
|
40
|
+
"--tt-gray-light-a-100": "rgba(15, 22, 36, 0.05)",
|
|
41
|
+
"--tt-gray-light-a-200": "rgba(37, 39, 45, 0.1)",
|
|
42
|
+
"--tt-gray-light-a-300": "rgba(47, 50, 55, 0.2)",
|
|
43
|
+
"--tt-gray-light-a-400": "rgba(40, 44, 51, 0.42)",
|
|
44
|
+
"--tt-gray-light-a-500": "rgba(52, 55, 60, 0.64)",
|
|
45
|
+
"--tt-gray-light-a-600": "rgba(36, 39, 46, 0.78)",
|
|
46
|
+
"--tt-gray-light-a-700": "rgba(35, 37, 42, 0.87)",
|
|
47
|
+
"--tt-gray-light-a-800": "rgba(30, 32, 36, 0.95)",
|
|
48
|
+
"--tt-gray-light-a-900": "rgba(29, 30, 32, 0.98)",
|
|
49
|
+
"--tt-gray-light-50": "rgba(250, 250, 250, 1)",
|
|
50
|
+
"--tt-gray-light-100": "rgba(244, 244, 245, 1)",
|
|
51
|
+
"--tt-gray-light-200": "rgba(234, 234, 235, 1)",
|
|
52
|
+
"--tt-gray-light-300": "rgba(213, 214, 215, 1)",
|
|
53
|
+
"--tt-gray-light-400": "rgba(166, 167, 171, 1)",
|
|
54
|
+
"--tt-gray-light-500": "rgba(125, 127, 130, 1)",
|
|
55
|
+
"--tt-gray-light-600": "rgba(83, 86, 90, 1)",
|
|
56
|
+
"--tt-gray-light-700": "rgba(64, 65, 69, 1)",
|
|
57
|
+
"--tt-gray-light-800": "rgba(44, 45, 48, 1)",
|
|
58
|
+
"--tt-gray-light-900": "rgba(34, 35, 37, 1)",
|
|
59
|
+
"--tt-gray-dark-a-50": "rgba(232, 232, 253, 0.05)",
|
|
60
|
+
"--tt-gray-dark-a-100": "rgba(231, 231, 243, 0.07)",
|
|
61
|
+
"--tt-gray-dark-a-200": "rgba(238, 238, 246, 0.11)",
|
|
62
|
+
"--tt-gray-dark-a-300": "rgba(239, 239, 245, 0.22)",
|
|
63
|
+
"--tt-gray-dark-a-400": "rgba(244, 244, 255, 0.37)",
|
|
64
|
+
"--tt-gray-dark-a-500": "rgba(236, 238, 253, 0.5)",
|
|
65
|
+
"--tt-gray-dark-a-600": "rgba(247, 247, 253, 0.64)",
|
|
66
|
+
"--tt-gray-dark-a-700": "rgba(251, 251, 254, 0.75)",
|
|
67
|
+
"--tt-gray-dark-a-800": "rgba(253, 253, 253, 0.88)",
|
|
68
|
+
"--tt-gray-dark-a-900": "rgba(255, 255, 255, 0.96)",
|
|
69
|
+
"--tt-gray-dark-50": "rgba(25, 25, 26, 1)",
|
|
70
|
+
"--tt-gray-dark-100": "rgba(32, 32, 34, 1)",
|
|
71
|
+
"--tt-gray-dark-200": "rgba(45, 45, 47, 1)",
|
|
72
|
+
"--tt-gray-dark-300": "rgba(70, 70, 73, 1)",
|
|
73
|
+
"--tt-gray-dark-400": "rgba(99, 99, 105, 1)",
|
|
74
|
+
"--tt-gray-dark-500": "rgba(124, 124, 131, 1)",
|
|
75
|
+
"--tt-gray-dark-600": "rgba(163, 163, 168, 1)",
|
|
76
|
+
"--tt-gray-dark-700": "rgba(192, 192, 195, 1)",
|
|
77
|
+
"--tt-gray-dark-800": "rgba(224, 224, 225, 1)",
|
|
78
|
+
"--tt-gray-dark-900": "rgba(245, 245, 245, 1)",
|
|
79
|
+
"--tt-brand-color-50": "rgba(239, 238, 255, 1)",
|
|
80
|
+
"--tt-brand-color-100": "rgba(222, 219, 255, 1)",
|
|
81
|
+
"--tt-brand-color-200": "rgba(195, 189, 255, 1)",
|
|
82
|
+
"--tt-brand-color-300": "rgba(157, 138, 255, 1)",
|
|
83
|
+
"--tt-brand-color-400": "rgba(122, 82, 255, 1)",
|
|
84
|
+
"--tt-brand-color-500": "rgba(98, 41, 255, 1)",
|
|
85
|
+
"--tt-brand-color-600": "rgba(84, 0, 229, 1)",
|
|
86
|
+
"--tt-brand-color-700": "rgba(75, 0, 204, 1)",
|
|
87
|
+
"--tt-brand-color-800": "rgba(56, 0, 153, 1)",
|
|
88
|
+
"--tt-brand-color-900": "rgba(43, 25, 102, 1)",
|
|
89
|
+
"--tt-brand-color-950": "hsla(257, 100%, 9%, 1)",
|
|
90
|
+
"--tt-color-green-inc-5": "hsla(129, 100%, 97%, 1)",
|
|
91
|
+
"--tt-color-green-inc-4": "hsla(129, 100%, 92%, 1)",
|
|
92
|
+
"--tt-color-green-inc-3": "hsla(131, 100%, 86%, 1)",
|
|
93
|
+
"--tt-color-green-inc-2": "hsla(133, 98%, 78%, 1)",
|
|
94
|
+
"--tt-color-green-inc-1": "hsla(137, 99%, 70%, 1)",
|
|
95
|
+
"--tt-color-green-base": "hsla(147, 99%, 50%, 1)",
|
|
96
|
+
"--tt-color-green-dec-1": "hsla(147, 97%, 41%, 1)",
|
|
97
|
+
"--tt-color-green-dec-2": "hsla(146, 98%, 32%, 1)",
|
|
98
|
+
"--tt-color-green-dec-3": "hsla(146, 100%, 24%, 1)",
|
|
99
|
+
"--tt-color-green-dec-4": "hsla(144, 100%, 16%, 1)",
|
|
100
|
+
"--tt-color-green-dec-5": "hsla(140, 100%, 9%, 1)",
|
|
101
|
+
"--tt-color-yellow-inc-5": "hsla(50, 100%, 97%, 1)",
|
|
102
|
+
"--tt-color-yellow-inc-4": "hsla(50, 100%, 91%, 1)",
|
|
103
|
+
"--tt-color-yellow-inc-3": "hsla(50, 100%, 84%, 1)",
|
|
104
|
+
"--tt-color-yellow-inc-2": "hsla(50, 100%, 77%, 1)",
|
|
105
|
+
"--tt-color-yellow-inc-1": "hsla(50, 100%, 68%, 1)",
|
|
106
|
+
"--tt-color-yellow-base": "hsla(52, 100%, 50%, 1)",
|
|
107
|
+
"--tt-color-yellow-dec-1": "hsla(52, 100%, 41%, 1)",
|
|
108
|
+
"--tt-color-yellow-dec-2": "hsla(52, 100%, 32%, 1)",
|
|
109
|
+
"--tt-color-yellow-dec-3": "hsla(52, 100%, 24%, 1)",
|
|
110
|
+
"--tt-color-yellow-dec-4": "hsla(51, 100%, 16%, 1)",
|
|
111
|
+
"--tt-color-yellow-dec-5": "hsla(50, 100%, 9%, 1)",
|
|
112
|
+
"--tt-color-red-inc-5": "hsla(11, 100%, 96%, 1)",
|
|
113
|
+
"--tt-color-red-inc-4": "hsla(11, 100%, 88%, 1)",
|
|
114
|
+
"--tt-color-red-inc-3": "hsla(10, 100%, 80%, 1)",
|
|
115
|
+
"--tt-color-red-inc-2": "hsla(9, 100%, 73%, 1)",
|
|
116
|
+
"--tt-color-red-inc-1": "hsla(7, 100%, 64%, 1)",
|
|
117
|
+
"--tt-color-red-base": "hsla(7, 100%, 54%, 1)",
|
|
118
|
+
"--tt-color-red-dec-1": "hsla(7, 100%, 41%, 1)",
|
|
119
|
+
"--tt-color-red-dec-2": "hsla(5, 100%, 32%, 1)",
|
|
120
|
+
"--tt-color-red-dec-3": "hsla(4, 100%, 24%, 1)",
|
|
121
|
+
"--tt-color-red-dec-4": "hsla(3, 100%, 16%, 1)",
|
|
122
|
+
"--tt-color-red-dec-5": "hsla(1, 100%, 9%, 1)",
|
|
123
|
+
"--white": "rgba(255, 255, 255, 1)",
|
|
124
|
+
"--black": "rgba(14, 14, 17, 1)",
|
|
125
|
+
"--transparent": "rgba(255, 255, 255, 0)",
|
|
126
|
+
"--tt-shadow-elevated-md": "0px 16px 48px 0px rgba(17, 24, 39, 0.04), 0px 12px 24px 0px rgba(17, 24, 39, 0.04), 0px 6px 8px 0px rgba(17, 24, 39, 0.02), 0px 2px 3px 0px rgba(17, 24, 39, 0.02)",
|
|
127
|
+
"--tt-radius-xxs": "0.125rem",
|
|
128
|
+
"--tt-radius-xs": "0.25rem",
|
|
129
|
+
"--tt-radius-sm": "0.375rem",
|
|
130
|
+
"--tt-radius-md": "0.5rem",
|
|
131
|
+
"--tt-radius-lg": "0.75rem",
|
|
132
|
+
"--tt-radius-xl": "1rem",
|
|
133
|
+
"--tt-transition-duration-short": "0.1s",
|
|
134
|
+
"--tt-transition-duration-default": "0.2s",
|
|
135
|
+
"--tt-transition-duration-long": "0.64s",
|
|
136
|
+
"--tt-transition-easing-default": "cubic-bezier(0.46, 0.03, 0.52, 0.96)",
|
|
137
|
+
"--tt-transition-easing-cubic": "cubic-bezier(0.65, 0.05, 0.36, 1)",
|
|
138
|
+
"--tt-transition-easing-quart": "cubic-bezier(0.77, 0, 0.18, 1)",
|
|
139
|
+
"--tt-transition-easing-circ": "cubic-bezier(0.79, 0.14, 0.15, 0.86)",
|
|
140
|
+
"--tt-transition-easing-back": "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
|
|
141
|
+
"--tt-accent-contrast": "8%",
|
|
142
|
+
"--tt-destructive-contrast": "8%",
|
|
143
|
+
"--tt-foreground-contrast": "8%",
|
|
144
|
+
"--tt-bg-color": "var(--white)",
|
|
145
|
+
"--tt-border-color": "var(--tt-gray-light-a-200)",
|
|
146
|
+
"--tt-border-color-tint": "var(--tt-gray-light-a-100)",
|
|
147
|
+
"--tt-sidebar-bg-color": "var(--tt-gray-light-100)",
|
|
148
|
+
"--tt-scrollbar-color": "var(--tt-gray-light-a-200)",
|
|
149
|
+
"--tt-cursor-color": "#3370ff",
|
|
150
|
+
"--tt-selection-color": "rgba(51, 112, 255, 0.2)",
|
|
151
|
+
"--tt-block-selected-color": "rgba(51, 112, 255, 0.18)",
|
|
152
|
+
"--tt-find-current-color": "rgba(245, 74, 69, 0.5)",
|
|
153
|
+
"--tt-find-match-color": "rgba(255, 198, 10, 0.5)",
|
|
154
|
+
"--tt-card-bg-color": "var(--white)",
|
|
155
|
+
"--tt-card-border-color": "var(--tt-gray-light-a-100)",
|
|
156
|
+
"--tt-color-text-gray": "#8f959e",
|
|
157
|
+
"--tt-color-text-red": "#d83931",
|
|
158
|
+
"--tt-color-text-orange": "#de7802",
|
|
159
|
+
"--tt-color-text-yellow": "#dc9b04",
|
|
160
|
+
"--tt-color-text-green": "#2ea121",
|
|
161
|
+
"--tt-color-text-blue": "#245bdb",
|
|
162
|
+
"--tt-color-text-purple": "#6425d0",
|
|
163
|
+
"--tt-color-text-brown": "#9f6b53",
|
|
164
|
+
"--tt-color-text-pink": "#c14c8a",
|
|
165
|
+
"--tt-color-text-gray-contrast": "hsla(39, 26%, 26%, 0.15)",
|
|
166
|
+
"--tt-color-text-brown-contrast": "hsla(18, 43%, 69%, 0.35)",
|
|
167
|
+
"--tt-color-text-orange-contrast": "hsla(24, 73%, 55%, 0.27)",
|
|
168
|
+
"--tt-color-text-yellow-contrast": "hsla(44, 82%, 59%, 0.39)",
|
|
169
|
+
"--tt-color-text-green-contrast": "hsla(126, 29%, 60%, 0.27)",
|
|
170
|
+
"--tt-color-text-blue-contrast": "hsla(202, 54%, 59%, 0.27)",
|
|
171
|
+
"--tt-color-text-purple-contrast": "hsla(274, 37%, 64%, 0.27)",
|
|
172
|
+
"--tt-color-text-pink-contrast": "hsla(331, 60%, 71%, 0.27)",
|
|
173
|
+
"--tt-color-text-red-contrast": "hsla(8, 79%, 79%, 0.4)",
|
|
174
|
+
"--tt-color-highlight-gray": "#f2f3f5",
|
|
175
|
+
"--tt-color-highlight-red": "#fbbfbc",
|
|
176
|
+
"--tt-color-highlight-orange": "rgba(254,212,164,0.8)",
|
|
177
|
+
"--tt-color-highlight-yellow": "rgba(255,246,122,0.8)",
|
|
178
|
+
"--tt-color-highlight-green": "rgba(183,237,177,0.8)",
|
|
179
|
+
"--tt-color-highlight-blue": "rgba(186,206,253,0.7)",
|
|
180
|
+
"--tt-color-highlight-purple": "rgba(205,178,250,0.7)",
|
|
181
|
+
"--tt-color-highlight-gray-medium": "rgba(222,224,227,0.8)",
|
|
182
|
+
"--tt-color-highlight-gray-strong": "#bbbfc4",
|
|
183
|
+
"--tt-color-highlight-red-strong": "#f76964",
|
|
184
|
+
"--tt-color-highlight-orange-strong": "#ffa53d",
|
|
185
|
+
"--tt-color-highlight-yellow-strong": "#ffe928",
|
|
186
|
+
"--tt-color-highlight-green-strong": "#62d256",
|
|
187
|
+
"--tt-color-highlight-blue-strong": "rgba(78,131,253,0.55)",
|
|
188
|
+
"--tt-color-highlight-purple-strong": "rgba(147,90,246,0.55)",
|
|
189
|
+
"--tt-color-highlight-brown": "#f4eeee",
|
|
190
|
+
"--tt-color-highlight-pink": "#fcf1f6",
|
|
191
|
+
"--tt-color-highlight-yellow-contrast": "#fbe604",
|
|
192
|
+
"--tt-color-highlight-green-contrast": "#c7fad8",
|
|
193
|
+
"--tt-color-highlight-blue-contrast": "#ceeafd",
|
|
194
|
+
"--tt-color-highlight-purple-contrast": "#e4ccff",
|
|
195
|
+
"--tt-color-highlight-red-contrast": "#ffccd0",
|
|
196
|
+
"--tt-color-highlight-gray-contrast": "rgba(84, 72, 49, 0.15)",
|
|
197
|
+
"--tt-color-highlight-brown-contrast": "rgba(210, 162, 141, 0.35)",
|
|
198
|
+
"--tt-color-highlight-orange-contrast": "rgba(224, 124, 57, 0.27)",
|
|
199
|
+
"--tt-color-highlight-pink-contrast": "rgba(225, 136, 179, 0.27)",
|
|
200
|
+
"--tt-color-block-gray": "rgba(245,246,247,0.9)",
|
|
201
|
+
"--tt-color-block-red": "#fef1f1",
|
|
202
|
+
"--tt-color-block-orange": "#fff5eb",
|
|
203
|
+
"--tt-color-block-yellow": "#fefff0",
|
|
204
|
+
"--tt-color-block-green": "#f0fbef",
|
|
205
|
+
"--tt-color-block-blue": "#f0f4ff",
|
|
206
|
+
"--tt-color-block-purple": "#f6f1fe",
|
|
207
|
+
"--tt-color-block-neutral-strong": "#f2f3f5",
|
|
208
|
+
"--tt-color-block-gray-strong": "#eff0f1",
|
|
209
|
+
"--tt-color-block-red-strong": "#fde2e2",
|
|
210
|
+
"--tt-color-block-orange-strong": "#feead2",
|
|
211
|
+
"--tt-color-block-yellow-strong": "#ffffcc",
|
|
212
|
+
"--tt-color-block-green-strong": "#d9f5d6",
|
|
213
|
+
"--tt-color-block-blue-strong": "#e1eaff",
|
|
214
|
+
"--tt-color-block-purple-strong": "#ece2fe",
|
|
215
|
+
"--tt-color-callout-border-neutral": "#eff0f1",
|
|
216
|
+
"--tt-color-callout-border-red": "#fbbfbc",
|
|
217
|
+
"--tt-color-callout-border-orange": "#fed4a4",
|
|
218
|
+
"--tt-color-callout-border-yellow": "#fff67a",
|
|
219
|
+
"--tt-color-callout-border-green": "#b7edb1",
|
|
220
|
+
"--tt-color-callout-border-blue": "#bacefd",
|
|
221
|
+
"--tt-color-callout-border-purple": "#cdb2fa",
|
|
222
|
+
"--tt-color-callout-border-neutral-strong": "#dee0e3",
|
|
223
|
+
"--tt-color-callout-border-red-strong": "#f98e8b",
|
|
224
|
+
"--tt-color-callout-border-orange-strong": "#ffba6b",
|
|
225
|
+
"--tt-color-callout-border-yellow-strong": "#fff258",
|
|
226
|
+
"--tt-color-callout-border-green-strong": "#8ee085",
|
|
227
|
+
"--tt-color-callout-border-blue-strong": "#82a7fc",
|
|
228
|
+
"--tt-color-callout-border-purple-strong": "#ad82f7"
|
|
229
|
+
};
|
|
230
|
+
var BASE_DARK_VARS = {
|
|
231
|
+
"--tt-bg-color": "var(--black)",
|
|
232
|
+
"--tt-border-color": "var(--tt-gray-dark-a-200)",
|
|
233
|
+
"--tt-border-color-tint": "var(--tt-gray-dark-a-100)",
|
|
234
|
+
"--tt-sidebar-bg-color": "var(--tt-gray-dark-100)",
|
|
235
|
+
"--tt-scrollbar-color": "var(--tt-gray-dark-a-200)",
|
|
236
|
+
"--tt-cursor-color": "#4c88ff",
|
|
237
|
+
"--tt-selection-color": "rgba(76, 136, 255, 0.2)",
|
|
238
|
+
"--tt-block-selected-color": "rgba(76, 136, 255, 0.26)",
|
|
239
|
+
"--tt-find-current-color": "rgba(209, 70, 66, 0.5)",
|
|
240
|
+
"--tt-find-match-color": "rgba(173, 125, 21, 0.5)",
|
|
241
|
+
"--tt-card-bg-color": "var(--tt-gray-dark-50)",
|
|
242
|
+
"--tt-card-border-color": "var(--tt-gray-dark-a-50)",
|
|
243
|
+
"--tt-shadow-elevated-md": "0px 16px 48px 0px rgba(0, 0, 0, 0.5), 0px 12px 24px 0px rgba(0, 0, 0, 0.24), 0px 6px 8px 0px rgba(0, 0, 0, 0.22), 0px 2px 3px 0px rgba(0, 0, 0, 0.12)",
|
|
244
|
+
"--tt-color-text-gray": "#757575",
|
|
245
|
+
"--tt-color-text-red": "#fa7873",
|
|
246
|
+
"--tt-color-text-orange": "#f5a54a",
|
|
247
|
+
"--tt-color-text-yellow": "#fcd456",
|
|
248
|
+
"--tt-color-text-green": "#6dd162",
|
|
249
|
+
"--tt-color-text-blue": "#70a0ff",
|
|
250
|
+
"--tt-color-text-purple": "#a472fc",
|
|
251
|
+
"--tt-color-text-brown": "#ba856f",
|
|
252
|
+
"--tt-color-text-pink": "#d15796",
|
|
253
|
+
"--tt-color-text-gray-contrast": "hsla(0, 0%, 100%, 0.09)",
|
|
254
|
+
"--tt-color-text-brown-contrast": "hsla(17, 45%, 50%, 0.25)",
|
|
255
|
+
"--tt-color-text-orange-contrast": "hsla(27, 82%, 53%, 0.2)",
|
|
256
|
+
"--tt-color-text-yellow-contrast": "hsla(35, 49%, 47%, 0.2)",
|
|
257
|
+
"--tt-color-text-green-contrast": "hsla(151, 55%, 39%, 0.2)",
|
|
258
|
+
"--tt-color-text-blue-contrast": "hsla(202, 54%, 43%, 0.2)",
|
|
259
|
+
"--tt-color-text-purple-contrast": "hsla(271, 56%, 60%, 0.18)",
|
|
260
|
+
"--tt-color-text-pink-contrast": "hsla(331, 67%, 58%, 0.22)",
|
|
261
|
+
"--tt-color-text-red-contrast": "hsla(0, 67%, 60%, 0.25)",
|
|
262
|
+
"--tt-color-highlight-gray": "rgba(67,67,67,0.4)",
|
|
263
|
+
"--tt-color-highlight-red": "rgba(240,91,86,0.28)",
|
|
264
|
+
"--tt-color-highlight-orange": "rgba(242,150,44,0.22)",
|
|
265
|
+
"--tt-color-highlight-yellow": "rgba(245,226,49,0.16)",
|
|
266
|
+
"--tt-color-highlight-green": "rgba(84,194,72,0.22)",
|
|
267
|
+
"--tt-color-highlight-blue": "rgba(76,136,255,0.28)",
|
|
268
|
+
"--tt-color-highlight-purple": "rgba(151,98,245,0.31)",
|
|
269
|
+
"--tt-color-highlight-gray-medium": "rgba(80,80,80,0.5)",
|
|
270
|
+
"--tt-color-highlight-gray-strong": "rgba(95,95,95,0.6)",
|
|
271
|
+
"--tt-color-highlight-red-strong": "rgba(240,91,86,0.47)",
|
|
272
|
+
"--tt-color-highlight-orange-strong": "rgba(242,150,44,0.36)",
|
|
273
|
+
"--tt-color-highlight-yellow-strong": "rgba(245,226,49,0.26)",
|
|
274
|
+
"--tt-color-highlight-green-strong": "rgba(84,194,72,0.36)",
|
|
275
|
+
"--tt-color-highlight-blue-strong": "rgba(76,136,255,0.46)",
|
|
276
|
+
"--tt-color-highlight-purple-strong": "rgba(151,98,245,0.51)",
|
|
277
|
+
"--tt-color-highlight-brown": "rgb(74,50,40)",
|
|
278
|
+
"--tt-color-highlight-pink": "rgb(78,44,60)",
|
|
279
|
+
"--tt-color-highlight-yellow-contrast": "#58531e",
|
|
280
|
+
"--tt-color-highlight-green-contrast": "#47855d",
|
|
281
|
+
"--tt-color-highlight-blue-contrast": "#5e86a1",
|
|
282
|
+
"--tt-color-highlight-purple-contrast": "#4c3564",
|
|
283
|
+
"--tt-color-highlight-red-contrast": "#643539",
|
|
284
|
+
"--tt-color-highlight-gray-contrast": "rgba(255, 255, 255, 0.094)",
|
|
285
|
+
"--tt-color-highlight-brown-contrast": "rgba(184, 101, 69, 0.25)",
|
|
286
|
+
"--tt-color-highlight-orange-contrast": "rgba(233, 126, 37, 0.2)",
|
|
287
|
+
"--tt-color-highlight-pink-contrast": "rgba(220, 76, 145, 0.22)",
|
|
288
|
+
"--tt-color-block-gray": "rgba(67,67,67,0.3)",
|
|
289
|
+
"--tt-color-block-red": "rgba(240,91,86,0.14)",
|
|
290
|
+
"--tt-color-block-orange": "rgba(242,150,44,0.12)",
|
|
291
|
+
"--tt-color-block-yellow": "rgba(245,226,49,0.08)",
|
|
292
|
+
"--tt-color-block-green": "rgba(84,194,72,0.12)",
|
|
293
|
+
"--tt-color-block-blue": "rgba(76,136,255,0.14)",
|
|
294
|
+
"--tt-color-block-purple": "rgba(151,98,245,0.16)",
|
|
295
|
+
"--tt-color-block-neutral-strong": "rgba(80,80,80,0.45)",
|
|
296
|
+
"--tt-color-block-gray-strong": "rgba(95,95,95,0.5)",
|
|
297
|
+
"--tt-color-block-red-strong": "rgba(240,91,86,0.26)",
|
|
298
|
+
"--tt-color-block-orange-strong": "rgba(242,150,44,0.22)",
|
|
299
|
+
"--tt-color-block-yellow-strong": "rgba(245,226,49,0.16)",
|
|
300
|
+
"--tt-color-block-green-strong": "rgba(84,194,72,0.22)",
|
|
301
|
+
"--tt-color-block-blue-strong": "rgba(76,136,255,0.26)",
|
|
302
|
+
"--tt-color-block-purple-strong": "rgba(151,98,245,0.28)",
|
|
303
|
+
"--tt-color-callout-border-neutral": "rgba(255,255,255,0.12)",
|
|
304
|
+
"--tt-color-callout-border-red": "rgba(240,91,86,0.35)",
|
|
305
|
+
"--tt-color-callout-border-orange": "rgba(242,150,44,0.35)",
|
|
306
|
+
"--tt-color-callout-border-yellow": "rgba(245,226,49,0.3)",
|
|
307
|
+
"--tt-color-callout-border-green": "rgba(84,194,72,0.35)",
|
|
308
|
+
"--tt-color-callout-border-blue": "rgba(76,136,255,0.38)",
|
|
309
|
+
"--tt-color-callout-border-purple": "rgba(151,98,245,0.4)",
|
|
310
|
+
"--tt-color-callout-border-neutral-strong": "rgba(255,255,255,0.22)",
|
|
311
|
+
"--tt-color-callout-border-red-strong": "rgba(240,91,86,0.6)",
|
|
312
|
+
"--tt-color-callout-border-orange-strong": "rgba(242,150,44,0.6)",
|
|
313
|
+
"--tt-color-callout-border-yellow-strong": "rgba(245,226,49,0.5)",
|
|
314
|
+
"--tt-color-callout-border-green-strong": "rgba(84,194,72,0.6)",
|
|
315
|
+
"--tt-color-callout-border-blue-strong": "rgba(76,136,255,0.6)",
|
|
316
|
+
"--tt-color-callout-border-purple-strong": "rgba(151,98,245,0.65)"
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// src/theme/editor-theme.ts
|
|
320
|
+
function luminance(color) {
|
|
321
|
+
let r;
|
|
322
|
+
let g;
|
|
323
|
+
let b;
|
|
324
|
+
const hex = color.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})([0-9a-f]{2})?$/i);
|
|
325
|
+
if (hex) {
|
|
326
|
+
const h = hex[1].length === 3 ? [...hex[1]].map((c) => c + c).join("") : hex[1];
|
|
327
|
+
r = Number.parseInt(h.slice(0, 2), 16);
|
|
328
|
+
g = Number.parseInt(h.slice(2, 4), 16);
|
|
329
|
+
b = Number.parseInt(h.slice(4, 6), 16);
|
|
330
|
+
} else {
|
|
331
|
+
const rgb = color.match(/rgba?\(\s*([\d.]+)[ ,]+([\d.]+)[ ,]+([\d.]+)/i);
|
|
332
|
+
if (!rgb) return null;
|
|
333
|
+
r = Number(rgb[1]);
|
|
334
|
+
g = Number(rgb[2]);
|
|
335
|
+
b = Number(rgb[3]);
|
|
336
|
+
}
|
|
337
|
+
return (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
|
|
338
|
+
}
|
|
339
|
+
function isDarkAntdToken(token, isDarkMode) {
|
|
340
|
+
if (isDarkMode) return true;
|
|
341
|
+
const l = luminance(token.colorBgContainer);
|
|
342
|
+
return l !== null && l < 0.5;
|
|
343
|
+
}
|
|
344
|
+
function notionSurface(token, isDark) {
|
|
345
|
+
if (isDark) {
|
|
346
|
+
return {
|
|
347
|
+
colorText: "rgba(255, 255, 255, 0.81)",
|
|
348
|
+
colorBgPage: token.colorBgContainer,
|
|
349
|
+
blockRadius: 10,
|
|
350
|
+
cardRadius: 10,
|
|
351
|
+
dividerColor: "rgba(255, 255, 255, 0.07)",
|
|
352
|
+
inlineCodeBg: "rgba(231, 231, 243, 0.07)",
|
|
353
|
+
inlineCodeBorder: "rgba(238, 238, 246, 0.11)",
|
|
354
|
+
blockBorderColor: "rgba(255, 255, 255, 0.094)",
|
|
355
|
+
blockHoverBorderColor: "rgba(255, 255, 255, 0.094)",
|
|
356
|
+
blockSelectedBorderColor: token.colorPrimary,
|
|
357
|
+
codeBg: "rgba(255, 255, 255, 0.04)",
|
|
358
|
+
// 标签栏用页面底色,和代码区拉开反差
|
|
359
|
+
codeHeaderBg: token.colorBgContainer,
|
|
360
|
+
codeDividerColor: "rgba(255, 255, 255, 0.07)",
|
|
361
|
+
calloutBordered: false,
|
|
362
|
+
tableBorderColor: "rgba(255, 255, 255, 0.094)",
|
|
363
|
+
tableHeaderBg: "rgba(255, 255, 255, 0.03)",
|
|
364
|
+
tableRadius: 8,
|
|
365
|
+
floatBg: token.colorBgElevated,
|
|
366
|
+
floatRadius: 10,
|
|
367
|
+
floatShadow: "0px 8px 12px 0px rgba(0, 0, 0, 0.24), 0px 2px 6px 0px rgba(0, 0, 0, 0.16), 0px 0px 0px 1px rgba(255, 255, 255, 0.094)",
|
|
368
|
+
floatBorderColor: "transparent",
|
|
369
|
+
itemRadius: 6,
|
|
370
|
+
itemHoverBg: "rgba(255, 255, 255, 0.055)",
|
|
371
|
+
controlHoverBg: "rgba(255, 255, 255, 0.055)",
|
|
372
|
+
cardBorderColor: "rgba(255, 255, 255, 0.094)",
|
|
373
|
+
cardHoverBg: "rgba(255, 255, 255, 0.03)",
|
|
374
|
+
toolbarRadius: 8,
|
|
375
|
+
inputRadius: 6,
|
|
376
|
+
accentColor: token.colorPrimary,
|
|
377
|
+
textSecondary: "rgba(255, 255, 255, 0.46)",
|
|
378
|
+
textTertiary: "rgba(255, 255, 255, 0.282)"
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
return {
|
|
382
|
+
colorText: "#2c2c2b",
|
|
383
|
+
// --c-texPri
|
|
384
|
+
colorBgPage: token.colorBgContainer,
|
|
385
|
+
blockRadius: 10,
|
|
386
|
+
// 代码块没量到,按提示框推断
|
|
387
|
+
cardRadius: 10,
|
|
388
|
+
// 提示框实测 10
|
|
389
|
+
dividerColor: "rgba(42, 28, 0, 0.07)",
|
|
390
|
+
// --ca-borSecTra
|
|
391
|
+
// 行内代码没量到,暂用飞书的值(待确认)
|
|
392
|
+
inlineCodeBg: "#f5f6f7",
|
|
393
|
+
inlineCodeBorder: "#dee0e3",
|
|
394
|
+
blockBorderColor: "rgba(28, 19, 1, 0.11)",
|
|
395
|
+
// --ca-borPriTra #1c13011c
|
|
396
|
+
// Notion 的块悬停不改描边;选中用主色
|
|
397
|
+
blockHoverBorderColor: "rgba(28, 19, 1, 0.11)",
|
|
398
|
+
blockSelectedBorderColor: token.colorPrimary,
|
|
399
|
+
// 代码区用冷灰(Notion 原值是暖灰 --c-codStiBloBac #f7f6f3,按需求改冷)
|
|
400
|
+
codeBg: "#f5f6f8",
|
|
401
|
+
// 代码分组的标签栏用页面底色(白),代码区保持暖灰,反差清楚
|
|
402
|
+
codeHeaderBg: token.colorBgContainer,
|
|
403
|
+
codeDividerColor: "rgba(42, 28, 0, 0.07)",
|
|
404
|
+
// --ca-borSecTra #2a1c0012
|
|
405
|
+
calloutBordered: false,
|
|
406
|
+
tableBorderColor: "#e6e5e3",
|
|
407
|
+
// --c-borPri
|
|
408
|
+
tableHeaderBg: "#f9f8f7",
|
|
409
|
+
// --c-bacSec(标题行底色是推断)
|
|
410
|
+
tableRadius: 8,
|
|
411
|
+
// 按需求:外框圆角(Notion 自己的简单表格其实是直角)
|
|
412
|
+
floatBg: token.colorBgElevated,
|
|
413
|
+
floatRadius: 10,
|
|
414
|
+
// --c-shaOutMd:两层淡阴影 + 一圈 #2a1c0012 当描边
|
|
415
|
+
floatShadow: "0px 8px 12px 0px rgba(25, 25, 25, 0.027), 0px 2px 6px 0px rgba(25, 25, 25, 0.027), 0px 0px 0px 1px rgba(42, 28, 0, 0.07)",
|
|
416
|
+
floatBorderColor: "transparent",
|
|
417
|
+
itemRadius: 6,
|
|
418
|
+
// 页面里悬停容器实测 6
|
|
419
|
+
itemHoverBg: "rgba(42, 28, 0, 0.07)",
|
|
420
|
+
// --ca-bacTerTra
|
|
421
|
+
controlHoverBg: "rgba(42, 28, 0, 0.07)",
|
|
422
|
+
cardBorderColor: "rgba(28, 19, 1, 0.11)",
|
|
423
|
+
// 同块描边
|
|
424
|
+
cardHoverBg: "rgba(42, 28, 0, 0.03)",
|
|
425
|
+
// 推断:比菜单项悬停再淡一档
|
|
426
|
+
toolbarRadius: 8,
|
|
427
|
+
// 推断
|
|
428
|
+
inputRadius: 6,
|
|
429
|
+
// 同悬停容器
|
|
430
|
+
accentColor: token.colorPrimary,
|
|
431
|
+
// 推断:Notion 经典次要 / 三级文字(rgba(55,53,47,.65) / .45 落在白底上)
|
|
432
|
+
textSecondary: "#787774",
|
|
433
|
+
textTertiary: "#9b9a97"
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function feishuSurface(token, isDark) {
|
|
437
|
+
if (isDark) {
|
|
438
|
+
return {
|
|
439
|
+
colorText: "rgba(245, 245, 245, 1)",
|
|
440
|
+
colorBgPage: token.colorBgContainer,
|
|
441
|
+
blockRadius: 4,
|
|
442
|
+
cardRadius: 8,
|
|
443
|
+
dividerColor: "rgba(238, 238, 246, 0.11)",
|
|
444
|
+
// 迁移前 --tt-gray-dark-a-200
|
|
445
|
+
inlineCodeBg: "rgba(231, 231, 243, 0.07)",
|
|
446
|
+
// --tt-gray-dark-a-100
|
|
447
|
+
inlineCodeBorder: "rgba(238, 238, 246, 0.11)",
|
|
448
|
+
// --tt-gray-dark-a-200
|
|
449
|
+
blockBorderColor: "rgba(238, 238, 246, 0.11)",
|
|
450
|
+
// 迁移前深色没有单独的悬停 / 选中色,沿用浅色那两个
|
|
451
|
+
blockHoverBorderColor: "#bacefd",
|
|
452
|
+
blockSelectedBorderColor: "#3370ff",
|
|
453
|
+
codeBg: "rgba(232, 232, 253, 0.05)",
|
|
454
|
+
codeHeaderBg: "rgba(231, 231, 243, 0.07)",
|
|
455
|
+
codeDividerColor: "rgba(238, 238, 246, 0.11)",
|
|
456
|
+
calloutBordered: true,
|
|
457
|
+
tableBorderColor: "rgba(239, 239, 245, 0.22)",
|
|
458
|
+
// 迁移前 --tt-gray-dark-a-300
|
|
459
|
+
tableHeaderBg: "rgba(231, 231, 243, 0.07)",
|
|
460
|
+
// 迁移前 --tt-gray-dark-a-100
|
|
461
|
+
tableRadius: 0,
|
|
462
|
+
floatBg: token.colorBgElevated,
|
|
463
|
+
floatRadius: 6,
|
|
464
|
+
floatShadow: "0px 8px 16px 0px rgba(0, 0, 0, 0.28)",
|
|
465
|
+
// --shadow-md-down(深色)
|
|
466
|
+
floatBorderColor: "rgba(255, 255, 255, 0.12)",
|
|
467
|
+
itemRadius: 4,
|
|
468
|
+
itemHoverBg: "rgba(231, 231, 243, 0.07)",
|
|
469
|
+
// 迁移前 --tt-gray-dark-a-100
|
|
470
|
+
controlHoverBg: "rgba(238, 238, 246, 0.11)",
|
|
471
|
+
// 迁移前 --tt-gray-dark-a-200
|
|
472
|
+
cardBorderColor: "var(--tt-border-color)",
|
|
473
|
+
cardHoverBg: "var(--tt-gray-light-a-50, #f5f6f7)",
|
|
474
|
+
toolbarRadius: 6,
|
|
475
|
+
inputRadius: 6,
|
|
476
|
+
accentColor: "#3370ff",
|
|
477
|
+
// 迁移前读 var(--tt-codeblock-muted):深色下它被误写成 undefined,颜色失效、继承了正文色。
|
|
478
|
+
// 这里取它本来要给的值 --tt-gray-dark-a-600
|
|
479
|
+
textSecondary: "rgba(247, 247, 253, 0.64)",
|
|
480
|
+
textTertiary: "rgba(247, 247, 253, 0.64)"
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
return {
|
|
484
|
+
colorText: "#1f2329",
|
|
485
|
+
// N900
|
|
486
|
+
colorBgPage: token.colorBgContainer,
|
|
487
|
+
blockRadius: 4,
|
|
488
|
+
cardRadius: 8,
|
|
489
|
+
// 规格:卡片类块圆角 8
|
|
490
|
+
dividerColor: "rgba(37, 39, 45, 0.1)",
|
|
491
|
+
// 迁移前 --tt-gray-light-a-200
|
|
492
|
+
inlineCodeBg: "#f5f6f7",
|
|
493
|
+
// N50
|
|
494
|
+
inlineCodeBorder: "#dee0e3",
|
|
495
|
+
// N300
|
|
496
|
+
blockBorderColor: "#dee0e3",
|
|
497
|
+
// --line-border-card
|
|
498
|
+
blockHoverBorderColor: "#bacefd",
|
|
499
|
+
// 规格 §40:悬停 #bacefd
|
|
500
|
+
blockSelectedBorderColor: "#3370ff",
|
|
501
|
+
// 选中 #3370ff
|
|
502
|
+
codeBg: "#f5f6f7",
|
|
503
|
+
// N50
|
|
504
|
+
codeHeaderBg: "rgba(31, 35, 41, 0.04)",
|
|
505
|
+
codeDividerColor: "#dee0e3",
|
|
506
|
+
calloutBordered: true,
|
|
507
|
+
tableBorderColor: "#dee0e3",
|
|
508
|
+
// 飞书知识库 docx 实测单元格边框 N300
|
|
509
|
+
tableHeaderBg: "rgba(15, 22, 36, 0.05)",
|
|
510
|
+
// 迁移前 --tt-gray-light-a-100
|
|
511
|
+
tableRadius: 0,
|
|
512
|
+
// 直角
|
|
513
|
+
floatBg: token.colorBgElevated,
|
|
514
|
+
floatRadius: 6,
|
|
515
|
+
floatShadow: "0px 4px 8px 0px rgba(31, 35, 41, 0.1)",
|
|
516
|
+
// --shadow-md-down
|
|
517
|
+
floatBorderColor: "#dee0e3",
|
|
518
|
+
itemRadius: 4,
|
|
519
|
+
itemHoverBg: "rgba(15, 22, 36, 0.05)",
|
|
520
|
+
// 迁移前 --tt-gray-light-a-100
|
|
521
|
+
controlHoverBg: "rgba(37, 39, 45, 0.1)",
|
|
522
|
+
// 迁移前 --tt-gray-light-a-200
|
|
523
|
+
// 卡片 / 小工具条 / 输入框 / 文字:各组件迁移前写死的原值(组件里用 pick 原样保留)
|
|
524
|
+
cardBorderColor: "var(--tt-border-color)",
|
|
525
|
+
cardHoverBg: "var(--tt-gray-light-a-50, #f5f6f7)",
|
|
526
|
+
toolbarRadius: 6,
|
|
527
|
+
inputRadius: 6,
|
|
528
|
+
accentColor: "#3370ff",
|
|
529
|
+
textSecondary: "rgba(36, 39, 46, 0.78)",
|
|
530
|
+
// 迁移前 --tt-codeblock-muted = --tt-gray-light-a-600
|
|
531
|
+
textTertiary: "rgba(36, 39, 46, 0.78)"
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function resolveEditorTheme(token, options = {}) {
|
|
535
|
+
const visualTheme = options.visualTheme ?? "notion";
|
|
536
|
+
const isDark = isDarkAntdToken(token, options.isDarkMode);
|
|
537
|
+
const surface = visualTheme === "feishu" ? feishuSurface(token, isDark) : notionSurface(token, isDark);
|
|
538
|
+
return { visualTheme, isDark, surface };
|
|
539
|
+
}
|
|
540
|
+
function brandVars(token) {
|
|
541
|
+
return {
|
|
542
|
+
"--tt-brand-color-50": token.colorPrimaryBg,
|
|
543
|
+
"--tt-brand-color-100": token.colorPrimaryBgHover,
|
|
544
|
+
"--tt-brand-color-200": token.colorPrimaryBorder,
|
|
545
|
+
"--tt-brand-color-300": token.colorPrimaryBorderHover,
|
|
546
|
+
"--tt-brand-color-400": token.colorPrimaryHover,
|
|
547
|
+
"--tt-brand-color-500": token.colorPrimary,
|
|
548
|
+
"--tt-brand-color-600": token.colorPrimaryActive,
|
|
549
|
+
"--tt-brand-color-700": token.colorPrimaryTextActive,
|
|
550
|
+
"--tt-brand-color-800": token.colorPrimaryTextActive,
|
|
551
|
+
"--tt-brand-color-900": token.colorPrimaryTextActive,
|
|
552
|
+
"--tt-brand-color-950": token.colorPrimaryTextActive
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
function tableVars({ surface, isDark }) {
|
|
556
|
+
return {
|
|
557
|
+
"--tt-table-border-color": surface.tableBorderColor,
|
|
558
|
+
// 选中单元格底色:迁移前浅色 0.4、深色 0.2
|
|
559
|
+
"--tt-table-selected-bg": isDark ? "rgba(195, 189, 255, 0.2)" : "rgba(195, 189, 255, 0.4)",
|
|
560
|
+
"--tt-table-selected-stroke": "var(--tt-brand-color-400)",
|
|
561
|
+
"--tt-table-column-resize-handle-bg": "var(--tt-brand-color-400)",
|
|
562
|
+
"--tt-table-cell-padding": "0.5rem",
|
|
563
|
+
"--tt-table-margin-block": "1.25rem",
|
|
564
|
+
"--tt-table-pad-block-start": "1rem",
|
|
565
|
+
"--tt-table-pad-block-end": "1.5rem",
|
|
566
|
+
"--tt-table-pad-inline-start": "1rem",
|
|
567
|
+
"--tt-table-pad-inline-end": "1.5rem"
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
function editorThemeVars(token, resolved) {
|
|
571
|
+
return {
|
|
572
|
+
...BASE_LIGHT_VARS,
|
|
573
|
+
...resolved.isDark ? BASE_DARK_VARS : {},
|
|
574
|
+
...brandVars(token),
|
|
575
|
+
...tableVars(resolved)
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
var declarations = (vars) => Object.entries(vars).map(([k, v]) => ` ${k}: ${v};`).join("\n");
|
|
579
|
+
function editorThemeCss(token, resolved) {
|
|
580
|
+
return `:root {
|
|
581
|
+
${declarations(editorThemeVars(token, resolved))}
|
|
582
|
+
}
|
|
583
|
+
`;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
// src/components/base/base-board.style.ts
|
|
587
|
+
var baseBoardStyles = ({ token, isDark }) => {
|
|
588
|
+
const c = isDark ? {
|
|
589
|
+
text: token.colorText,
|
|
590
|
+
caption: token.colorTextSecondary,
|
|
591
|
+
placeholder: token.colorTextQuaternary,
|
|
592
|
+
border: token.colorBorderSecondary,
|
|
593
|
+
hover: token.colorFillSecondary,
|
|
594
|
+
bg: token.colorBgContainer,
|
|
595
|
+
base: token.colorBgLayout,
|
|
596
|
+
column: token.colorFillQuaternary,
|
|
597
|
+
danger: token.colorError
|
|
598
|
+
} : {
|
|
599
|
+
text: "#1f2329",
|
|
600
|
+
caption: "#646a73",
|
|
601
|
+
placeholder: "#8f959e",
|
|
602
|
+
border: "#dee0e3",
|
|
603
|
+
hover: "rgba(31, 35, 41, 0.08)",
|
|
604
|
+
bg: "#ffffff",
|
|
605
|
+
base: "#f5f6f7",
|
|
606
|
+
column: "#f2f3f5",
|
|
607
|
+
danger: "#f54a45"
|
|
608
|
+
};
|
|
609
|
+
const primary = token.colorPrimary;
|
|
610
|
+
const shadow = isDark ? "0 6px 24px rgba(0, 0, 0, 0.45)" : "0 4px 16px 0 rgba(31, 35, 41, 0.12), 0 0 1px 0 rgba(31, 35, 41, 0.18)";
|
|
611
|
+
return `
|
|
612
|
+
.tt-base-kanban-wrap {
|
|
613
|
+
position: relative;
|
|
614
|
+
flex: 1;
|
|
615
|
+
min-width: 0;
|
|
616
|
+
min-height: 0;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.tt-base-kanban {
|
|
620
|
+
display: flex;
|
|
621
|
+
align-items: flex-start;
|
|
622
|
+
gap: 12px;
|
|
623
|
+
height: 100%;
|
|
624
|
+
padding: 12px 16px;
|
|
625
|
+
overflow: auto hidden;
|
|
626
|
+
box-sizing: border-box;
|
|
627
|
+
user-select: none;
|
|
628
|
+
|
|
629
|
+
&.is-dragging {
|
|
630
|
+
cursor: grabbing;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.tt-base-kanban__column {
|
|
635
|
+
display: flex;
|
|
636
|
+
flex: none;
|
|
637
|
+
flex-direction: column;
|
|
638
|
+
width: 256px;
|
|
639
|
+
max-height: 100%;
|
|
640
|
+
border-radius: 8px;
|
|
641
|
+
background: ${c.column};
|
|
642
|
+
box-sizing: border-box;
|
|
643
|
+
|
|
644
|
+
&.is-over {
|
|
645
|
+
box-shadow: inset 0 0 0 1px ${primary};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.tt-base-kanban__head {
|
|
650
|
+
display: flex;
|
|
651
|
+
flex: none;
|
|
652
|
+
align-items: center;
|
|
653
|
+
gap: 8px;
|
|
654
|
+
height: 40px;
|
|
655
|
+
padding: 0 8px 0 12px;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.tt-base-kanban__title {
|
|
659
|
+
font-size: 14px;
|
|
660
|
+
line-height: 22px;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.tt-base-kanban__users {
|
|
664
|
+
display: inline-flex;
|
|
665
|
+
min-width: 0;
|
|
666
|
+
gap: 4px;
|
|
667
|
+
overflow: hidden;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.tt-base-kanban__count {
|
|
671
|
+
color: ${c.caption};
|
|
672
|
+
font-size: 14px;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.tt-base-kanban__spacer {
|
|
676
|
+
flex: 1;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.tt-base-kanban__list {
|
|
680
|
+
display: flex;
|
|
681
|
+
flex: 0 1 auto;
|
|
682
|
+
flex-direction: column;
|
|
683
|
+
gap: 8px;
|
|
684
|
+
min-height: 8px;
|
|
685
|
+
padding: 0 8px 4px;
|
|
686
|
+
overflow: hidden auto;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.tt-base-kanban__card {
|
|
690
|
+
flex: none;
|
|
691
|
+
border-radius: 6px;
|
|
692
|
+
outline: none;
|
|
693
|
+
cursor: pointer;
|
|
694
|
+
|
|
695
|
+
&:focus-visible .tt-base-card {
|
|
696
|
+
box-shadow: 0 0 0 2px ${primary};
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
&.is-dragging {
|
|
700
|
+
opacity: 0.4;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.tt-base-kanban__drop {
|
|
705
|
+
flex: none;
|
|
706
|
+
height: 3px;
|
|
707
|
+
margin: -2px 0;
|
|
708
|
+
border-radius: 2px;
|
|
709
|
+
background: ${primary};
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.tt-base-kanban__add {
|
|
713
|
+
display: flex;
|
|
714
|
+
flex: none;
|
|
715
|
+
align-items: center;
|
|
716
|
+
gap: 4px;
|
|
717
|
+
height: 36px;
|
|
718
|
+
margin: 0 8px 8px;
|
|
719
|
+
padding: 0 8px;
|
|
720
|
+
border: none;
|
|
721
|
+
border-radius: 6px;
|
|
722
|
+
background: transparent;
|
|
723
|
+
color: ${c.caption};
|
|
724
|
+
font-size: 14px;
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
|
|
727
|
+
&:hover {
|
|
728
|
+
background: ${c.hover};
|
|
729
|
+
color: ${c.text};
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.tt-base-kanban__new {
|
|
734
|
+
display: flex;
|
|
735
|
+
flex: none;
|
|
736
|
+
align-items: center;
|
|
737
|
+
gap: 4px;
|
|
738
|
+
width: 256px;
|
|
739
|
+
height: 40px;
|
|
740
|
+
padding: 0 12px;
|
|
741
|
+
border: none;
|
|
742
|
+
border-radius: 8px;
|
|
743
|
+
background: ${c.column};
|
|
744
|
+
color: ${c.caption};
|
|
745
|
+
font-size: 14px;
|
|
746
|
+
cursor: pointer;
|
|
747
|
+
box-sizing: border-box;
|
|
748
|
+
|
|
749
|
+
&:hover {
|
|
750
|
+
color: ${c.text};
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
&.is-editing {
|
|
754
|
+
cursor: default;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.tt-base-kanban__ghost {
|
|
759
|
+
position: fixed;
|
|
760
|
+
left: 0;
|
|
761
|
+
top: 0;
|
|
762
|
+
z-index: 1200;
|
|
763
|
+
pointer-events: none;
|
|
764
|
+
|
|
765
|
+
.tt-base-card {
|
|
766
|
+
height: 100%;
|
|
767
|
+
box-shadow: ${shadow};
|
|
768
|
+
box-sizing: border-box;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.tt-base-kanban-empty {
|
|
773
|
+
display: flex;
|
|
774
|
+
flex-direction: column;
|
|
775
|
+
align-items: center;
|
|
776
|
+
justify-content: center;
|
|
777
|
+
gap: 12px;
|
|
778
|
+
height: 100%;
|
|
779
|
+
color: ${c.caption};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.tt-base-kanban-empty__button {
|
|
783
|
+
height: 32px;
|
|
784
|
+
padding: 0 16px;
|
|
785
|
+
border: 1px solid ${c.border};
|
|
786
|
+
border-radius: 6px;
|
|
787
|
+
background: ${c.bg};
|
|
788
|
+
color: ${c.text};
|
|
789
|
+
cursor: pointer;
|
|
790
|
+
|
|
791
|
+
&:hover {
|
|
792
|
+
border-color: ${primary};
|
|
793
|
+
color: ${primary};
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.tt-base-card {
|
|
798
|
+
display: flex;
|
|
799
|
+
flex-direction: column;
|
|
800
|
+
gap: 8px;
|
|
801
|
+
padding: 12px;
|
|
802
|
+
border: 1px solid ${c.border};
|
|
803
|
+
border-radius: 6px;
|
|
804
|
+
background: ${c.bg};
|
|
805
|
+
color: ${c.text};
|
|
806
|
+
font-size: 14px;
|
|
807
|
+
line-height: 22px;
|
|
808
|
+
overflow: hidden;
|
|
809
|
+
|
|
810
|
+
&.is-highlighted {
|
|
811
|
+
border-color: ${primary};
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.tt-base-card__cover {
|
|
816
|
+
height: 120px;
|
|
817
|
+
margin: -12px -12px 0;
|
|
818
|
+
background: ${c.base};
|
|
819
|
+
|
|
820
|
+
img {
|
|
821
|
+
display: block;
|
|
822
|
+
width: 100%;
|
|
823
|
+
height: 100%;
|
|
824
|
+
object-fit: cover;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.tt-base-card__title {
|
|
829
|
+
overflow: hidden;
|
|
830
|
+
font-weight: 600;
|
|
831
|
+
text-overflow: ellipsis;
|
|
832
|
+
white-space: nowrap;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.tt-base-card__field {
|
|
836
|
+
display: flex;
|
|
837
|
+
flex-direction: column;
|
|
838
|
+
gap: 2px;
|
|
839
|
+
min-width: 0;
|
|
840
|
+
font-size: 13px;
|
|
841
|
+
line-height: 20px;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.tt-base-card__label {
|
|
845
|
+
display: inline-flex;
|
|
846
|
+
align-items: center;
|
|
847
|
+
gap: 4px;
|
|
848
|
+
color: ${c.caption};
|
|
849
|
+
font-size: 12px;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.tt-base-card__text {
|
|
853
|
+
overflow: hidden;
|
|
854
|
+
color: ${c.text};
|
|
855
|
+
text-overflow: ellipsis;
|
|
856
|
+
white-space: nowrap;
|
|
857
|
+
|
|
858
|
+
&.is-multiline {
|
|
859
|
+
display: -webkit-box;
|
|
860
|
+
white-space: normal;
|
|
861
|
+
-webkit-box-orient: vertical;
|
|
862
|
+
-webkit-line-clamp: 2;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
a.tt-base-card__text {
|
|
867
|
+
color: ${primary};
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.tt-base-card__tags,
|
|
871
|
+
.tt-base-card__users,
|
|
872
|
+
.tt-base-card__files {
|
|
873
|
+
display: flex;
|
|
874
|
+
flex-wrap: wrap;
|
|
875
|
+
gap: 4px;
|
|
876
|
+
min-width: 0;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.tt-base-card__files img {
|
|
880
|
+
width: 32px;
|
|
881
|
+
height: 32px;
|
|
882
|
+
border-radius: 4px;
|
|
883
|
+
object-fit: cover;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.tt-base-card__check {
|
|
887
|
+
display: inline-flex;
|
|
888
|
+
align-items: center;
|
|
889
|
+
justify-content: center;
|
|
890
|
+
width: 16px;
|
|
891
|
+
height: 16px;
|
|
892
|
+
border: 1px solid ${c.border};
|
|
893
|
+
border-radius: 4px;
|
|
894
|
+
color: #fff;
|
|
895
|
+
font-size: 12px;
|
|
896
|
+
|
|
897
|
+
&.is-checked {
|
|
898
|
+
border-color: ${primary};
|
|
899
|
+
background: ${primary};
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.tt-base-card__progress {
|
|
904
|
+
display: inline-flex;
|
|
905
|
+
align-items: center;
|
|
906
|
+
gap: 6px;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.tt-base-card__bar {
|
|
910
|
+
width: 96px;
|
|
911
|
+
height: 6px;
|
|
912
|
+
border-radius: 3px;
|
|
913
|
+
background: ${c.hover};
|
|
914
|
+
overflow: hidden;
|
|
915
|
+
|
|
916
|
+
span {
|
|
917
|
+
display: block;
|
|
918
|
+
height: 100%;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.tt-base-card-options {
|
|
923
|
+
display: flex;
|
|
924
|
+
flex-direction: column;
|
|
925
|
+
gap: 8px;
|
|
926
|
+
margin-bottom: 12px;
|
|
927
|
+
padding-bottom: 12px;
|
|
928
|
+
border-bottom: 1px solid ${c.border};
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.tt-base-card-options__row {
|
|
932
|
+
display: flex;
|
|
933
|
+
align-items: center;
|
|
934
|
+
justify-content: space-between;
|
|
935
|
+
gap: 12px;
|
|
936
|
+
min-height: 28px;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.tt-base-card-options__select {
|
|
940
|
+
width: 160px;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.tt-base-form {
|
|
944
|
+
display: flex;
|
|
945
|
+
flex: 1;
|
|
946
|
+
flex-direction: column;
|
|
947
|
+
min-width: 0;
|
|
948
|
+
min-height: 0;
|
|
949
|
+
background: ${c.base};
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.tt-base-form__bar {
|
|
953
|
+
display: flex;
|
|
954
|
+
flex: none;
|
|
955
|
+
align-items: center;
|
|
956
|
+
gap: 8px;
|
|
957
|
+
height: 44px;
|
|
958
|
+
padding: 0 16px;
|
|
959
|
+
border-bottom: 1px solid ${c.border};
|
|
960
|
+
background: ${c.bg};
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.tt-base-form__modes {
|
|
964
|
+
display: inline-flex;
|
|
965
|
+
gap: 2px;
|
|
966
|
+
padding: 2px;
|
|
967
|
+
border-radius: 6px;
|
|
968
|
+
background: ${c.hover};
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
.tt-base-form__mode {
|
|
972
|
+
height: 26px;
|
|
973
|
+
padding: 0 12px;
|
|
974
|
+
border: none;
|
|
975
|
+
border-radius: 4px;
|
|
976
|
+
background: transparent;
|
|
977
|
+
color: ${c.caption};
|
|
978
|
+
font-size: 13px;
|
|
979
|
+
cursor: pointer;
|
|
980
|
+
|
|
981
|
+
&.is-active {
|
|
982
|
+
background: ${c.bg};
|
|
983
|
+
color: ${c.text};
|
|
984
|
+
font-weight: 500;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.tt-base-form__body {
|
|
989
|
+
display: flex;
|
|
990
|
+
flex: 1;
|
|
991
|
+
min-height: 0;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.tt-base-form__canvas {
|
|
995
|
+
flex: 1;
|
|
996
|
+
min-width: 0;
|
|
997
|
+
padding: 24px 16px 48px;
|
|
998
|
+
overflow: auto;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.tt-base-form__sheet {
|
|
1002
|
+
display: flex;
|
|
1003
|
+
flex-direction: column;
|
|
1004
|
+
gap: 8px;
|
|
1005
|
+
max-width: 720px;
|
|
1006
|
+
margin: 0 auto;
|
|
1007
|
+
padding: 32px 40px;
|
|
1008
|
+
border-radius: 8px;
|
|
1009
|
+
background: ${c.bg};
|
|
1010
|
+
box-sizing: border-box;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.tt-base-form__title.ant-input {
|
|
1014
|
+
padding: 0;
|
|
1015
|
+
font-size: 24px;
|
|
1016
|
+
font-weight: 600;
|
|
1017
|
+
line-height: 36px;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.tt-base-form__desc.ant-input {
|
|
1021
|
+
padding: 0;
|
|
1022
|
+
color: ${c.caption};
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.tt-base-form__question {
|
|
1026
|
+
display: flex;
|
|
1027
|
+
flex-direction: column;
|
|
1028
|
+
gap: 4px;
|
|
1029
|
+
margin-top: 8px;
|
|
1030
|
+
padding: 16px;
|
|
1031
|
+
border: 1px solid transparent;
|
|
1032
|
+
border-radius: 8px;
|
|
1033
|
+
|
|
1034
|
+
&:hover,
|
|
1035
|
+
&:focus-within {
|
|
1036
|
+
border-color: ${c.border};
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
&.is-dragging {
|
|
1040
|
+
opacity: 0.5;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.tt-base-form__q-head {
|
|
1045
|
+
display: flex;
|
|
1046
|
+
align-items: center;
|
|
1047
|
+
gap: 6px;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.tt-base-form__drag {
|
|
1051
|
+
display: inline-flex;
|
|
1052
|
+
margin-left: -20px;
|
|
1053
|
+
padding: 0;
|
|
1054
|
+
border: none;
|
|
1055
|
+
background: transparent;
|
|
1056
|
+
color: ${c.placeholder};
|
|
1057
|
+
cursor: grab;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.tt-base-form__index {
|
|
1061
|
+
color: ${c.caption};
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.tt-base-form__q-title.ant-input {
|
|
1065
|
+
flex: 1;
|
|
1066
|
+
padding: 0;
|
|
1067
|
+
font-weight: 500;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.tt-base-form__q-desc.ant-input {
|
|
1071
|
+
padding: 0;
|
|
1072
|
+
color: ${c.caption};
|
|
1073
|
+
font-size: 13px;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.tt-base-form__star {
|
|
1077
|
+
color: ${c.danger};
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.tt-base-form__preview {
|
|
1081
|
+
min-height: 32px;
|
|
1082
|
+
padding: 4px 11px;
|
|
1083
|
+
border: 1px solid ${c.border};
|
|
1084
|
+
border-radius: 6px;
|
|
1085
|
+
pointer-events: none;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.tt-base-form__q-actions {
|
|
1089
|
+
display: flex;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
justify-content: flex-end;
|
|
1092
|
+
gap: 12px;
|
|
1093
|
+
color: ${c.caption};
|
|
1094
|
+
font-size: 13px;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.tt-base-form__required {
|
|
1098
|
+
display: inline-flex;
|
|
1099
|
+
align-items: center;
|
|
1100
|
+
gap: 6px;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.tt-base-form__side {
|
|
1104
|
+
display: flex;
|
|
1105
|
+
flex: none;
|
|
1106
|
+
flex-direction: column;
|
|
1107
|
+
width: 240px;
|
|
1108
|
+
border-left: 1px solid ${c.border};
|
|
1109
|
+
background: ${c.bg};
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.tt-base-form__side-head,
|
|
1113
|
+
.tt-base-form__side-foot {
|
|
1114
|
+
display: flex;
|
|
1115
|
+
flex: none;
|
|
1116
|
+
align-items: center;
|
|
1117
|
+
justify-content: space-between;
|
|
1118
|
+
height: 44px;
|
|
1119
|
+
padding: 0 12px 0 16px;
|
|
1120
|
+
font-weight: 500;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.tt-base-form__side-foot {
|
|
1124
|
+
border-top: 1px solid ${c.border};
|
|
1125
|
+
font-weight: 400;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.tt-base-form__side-list {
|
|
1129
|
+
flex: 1;
|
|
1130
|
+
padding: 0 8px;
|
|
1131
|
+
overflow: auto;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
.tt-base-form__side-empty {
|
|
1135
|
+
padding: 24px 8px;
|
|
1136
|
+
color: ${c.placeholder};
|
|
1137
|
+
text-align: center;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.tt-base-form__field {
|
|
1141
|
+
display: flex;
|
|
1142
|
+
align-items: center;
|
|
1143
|
+
gap: 6px;
|
|
1144
|
+
width: 100%;
|
|
1145
|
+
height: 32px;
|
|
1146
|
+
padding: 0 8px;
|
|
1147
|
+
border: none;
|
|
1148
|
+
border-radius: 6px;
|
|
1149
|
+
background: transparent;
|
|
1150
|
+
color: ${c.text};
|
|
1151
|
+
font-size: 14px;
|
|
1152
|
+
text-align: left;
|
|
1153
|
+
cursor: pointer;
|
|
1154
|
+
|
|
1155
|
+
&:hover:not(:disabled) {
|
|
1156
|
+
background: ${c.hover};
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
&:disabled {
|
|
1160
|
+
color: ${c.placeholder};
|
|
1161
|
+
cursor: not-allowed;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.tt-base-form__field-name {
|
|
1166
|
+
flex: 1;
|
|
1167
|
+
min-width: 0;
|
|
1168
|
+
overflow: hidden;
|
|
1169
|
+
text-overflow: ellipsis;
|
|
1170
|
+
white-space: nowrap;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.tt-base-form__heading {
|
|
1174
|
+
margin: 0 0 4px;
|
|
1175
|
+
font-size: 24px;
|
|
1176
|
+
font-weight: 600;
|
|
1177
|
+
line-height: 36px;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
.tt-base-form__intro {
|
|
1181
|
+
margin: 0 0 8px;
|
|
1182
|
+
color: ${c.caption};
|
|
1183
|
+
white-space: pre-wrap;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.tt-base-form__notice {
|
|
1187
|
+
padding: 8px 12px;
|
|
1188
|
+
border-radius: 6px;
|
|
1189
|
+
background: ${c.base};
|
|
1190
|
+
color: ${c.caption};
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.tt-base-form__answer {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
flex-direction: column;
|
|
1196
|
+
gap: 6px;
|
|
1197
|
+
padding: 16px 0;
|
|
1198
|
+
border-bottom: 1px solid ${c.border};
|
|
1199
|
+
|
|
1200
|
+
&.is-error .tt-base-form__input {
|
|
1201
|
+
border-color: ${c.danger};
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.tt-base-form__label {
|
|
1206
|
+
display: flex;
|
|
1207
|
+
gap: 4px;
|
|
1208
|
+
font-weight: 500;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.tt-base-form__hint {
|
|
1212
|
+
color: ${c.caption};
|
|
1213
|
+
font-size: 13px;
|
|
1214
|
+
white-space: pre-wrap;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.tt-base-form__input {
|
|
1218
|
+
min-height: 32px;
|
|
1219
|
+
padding: 0 4px;
|
|
1220
|
+
border: 1px solid ${c.border};
|
|
1221
|
+
border-radius: 6px;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
.tt-base-form__error {
|
|
1225
|
+
color: ${c.danger};
|
|
1226
|
+
font-size: 12px;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
.tt-base-form__submit {
|
|
1230
|
+
align-self: flex-start;
|
|
1231
|
+
margin-top: 16px;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.tt-base-form__done {
|
|
1235
|
+
display: flex;
|
|
1236
|
+
flex-direction: column;
|
|
1237
|
+
align-items: center;
|
|
1238
|
+
gap: 12px;
|
|
1239
|
+
padding: 48px 0;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.tt-base-form__done-icon {
|
|
1243
|
+
display: flex;
|
|
1244
|
+
align-items: center;
|
|
1245
|
+
justify-content: center;
|
|
1246
|
+
width: 48px;
|
|
1247
|
+
height: 48px;
|
|
1248
|
+
border-radius: 50%;
|
|
1249
|
+
background: ${primary};
|
|
1250
|
+
color: #fff;
|
|
1251
|
+
font-size: 24px;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
.tt-base-form__done-text {
|
|
1255
|
+
font-size: 18px;
|
|
1256
|
+
font-weight: 600;
|
|
1257
|
+
}
|
|
1258
|
+
`;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
// src/components/base/base-grid.style.ts
|
|
1262
|
+
var baseGridStyles = ({ token, isDark }) => {
|
|
1263
|
+
const thumb = isDark ? "rgba(255, 255, 255, 0.35)" : "rgba(31, 35, 41, 0.35)";
|
|
1264
|
+
const thumbHover = isDark ? "rgba(255, 255, 255, 0.5)" : "rgba(31, 35, 41, 0.5)";
|
|
1265
|
+
return `
|
|
1266
|
+
.tt-base-grid {
|
|
1267
|
+
width: 100%;
|
|
1268
|
+
height: 100%;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
.tt-base-grid-container {
|
|
1272
|
+
position: relative;
|
|
1273
|
+
outline: none;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
.tt-base-grid-render-layer {
|
|
1277
|
+
pointer-events: none;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
.tt-base-grid-interaction {
|
|
1281
|
+
position: absolute;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.tt-base-grid-stage {
|
|
1285
|
+
width: 100%;
|
|
1286
|
+
height: 100%;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.tt-base-grid-scrollbar {
|
|
1290
|
+
position: absolute;
|
|
1291
|
+
cursor: pointer;
|
|
1292
|
+
will-change: transform;
|
|
1293
|
+
scrollbar-color: ${thumb} transparent;
|
|
1294
|
+
|
|
1295
|
+
&::-webkit-scrollbar {
|
|
1296
|
+
width: 8px;
|
|
1297
|
+
height: 8px;
|
|
1298
|
+
}
|
|
1299
|
+
&::-webkit-scrollbar-track {
|
|
1300
|
+
background: transparent;
|
|
1301
|
+
}
|
|
1302
|
+
&::-webkit-scrollbar-thumb {
|
|
1303
|
+
background: ${thumb};
|
|
1304
|
+
border-radius: 6px;
|
|
1305
|
+
}
|
|
1306
|
+
&:hover::-webkit-scrollbar-thumb {
|
|
1307
|
+
background: ${thumbHover};
|
|
1308
|
+
}
|
|
1309
|
+
&.is-hidden {
|
|
1310
|
+
opacity: 0;
|
|
1311
|
+
pointer-events: none;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.tt-base-grid-hscroll {
|
|
1316
|
+
bottom: 2px;
|
|
1317
|
+
left: 0;
|
|
1318
|
+
height: 16px;
|
|
1319
|
+
overflow-x: scroll;
|
|
1320
|
+
overflow-y: hidden;
|
|
1321
|
+
|
|
1322
|
+
&::-webkit-scrollbar-track {
|
|
1323
|
+
margin: 0 4px;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.tt-base-grid-vscroll {
|
|
1328
|
+
right: 2px;
|
|
1329
|
+
width: 16px;
|
|
1330
|
+
overflow-x: hidden;
|
|
1331
|
+
overflow-y: scroll;
|
|
1332
|
+
|
|
1333
|
+
&::-webkit-scrollbar-track {
|
|
1334
|
+
margin: 4px 0;
|
|
1335
|
+
}
|
|
1336
|
+
&::-webkit-scrollbar-thumb {
|
|
1337
|
+
min-height: 32px;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.tt-base-grid-hscroll-content {
|
|
1342
|
+
position: absolute;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
.tt-base-grid-scroll-content {
|
|
1346
|
+
display: flex;
|
|
1347
|
+
flex-direction: column;
|
|
1348
|
+
flex-shrink: 0;
|
|
1349
|
+
width: 1px;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.tt-base-grid-cell-scroller {
|
|
1353
|
+
position: absolute;
|
|
1354
|
+
width: 10px;
|
|
1355
|
+
cursor: pointer;
|
|
1356
|
+
overflow-x: hidden;
|
|
1357
|
+
overflow-y: scroll;
|
|
1358
|
+
opacity: 0;
|
|
1359
|
+
will-change: transform;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.tt-base-grid-editor-layer {
|
|
1363
|
+
position: absolute;
|
|
1364
|
+
left: 0;
|
|
1365
|
+
top: 0;
|
|
1366
|
+
width: 100%;
|
|
1367
|
+
pointer-events: none;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/* 不设 pointer-events:继承浮层的 none,未进入编辑时不挡住活动格上的点击;编辑器自己在编辑时设成 auto */
|
|
1371
|
+
.tt-base-grid-editor {
|
|
1372
|
+
position: absolute;
|
|
1373
|
+
z-index: 10;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
.tt-base-grid-hidden-editor,
|
|
1377
|
+
.tt-base-grid-hidden-input {
|
|
1378
|
+
width: 0;
|
|
1379
|
+
height: 0;
|
|
1380
|
+
padding: 0;
|
|
1381
|
+
border: none;
|
|
1382
|
+
outline: none;
|
|
1383
|
+
box-shadow: none;
|
|
1384
|
+
opacity: 0;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
.tt-base-grid-text-editor {
|
|
1388
|
+
position: relative;
|
|
1389
|
+
border-radius: 6px;
|
|
1390
|
+
background: ${token.colorBgContainer};
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
.tt-base-grid-text-editor-textarea {
|
|
1394
|
+
width: 100%;
|
|
1395
|
+
resize: none;
|
|
1396
|
+
border: none;
|
|
1397
|
+
border-radius: 4px;
|
|
1398
|
+
background: ${token.colorBgContainer};
|
|
1399
|
+
padding: 4px 8px 0;
|
|
1400
|
+
font-size: 14px;
|
|
1401
|
+
line-height: 1.4rem;
|
|
1402
|
+
color: ${token.colorText};
|
|
1403
|
+
outline: none;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.tt-base-grid-text-editor-hint {
|
|
1407
|
+
position: absolute;
|
|
1408
|
+
bottom: 2px;
|
|
1409
|
+
left: 0;
|
|
1410
|
+
width: 100%;
|
|
1411
|
+
padding: 0 4px 2px 0;
|
|
1412
|
+
border-radius: 0 0 6px 6px;
|
|
1413
|
+
background: ${token.colorBgContainer};
|
|
1414
|
+
text-align: end;
|
|
1415
|
+
font-size: 12px;
|
|
1416
|
+
color: ${token.colorTextQuaternary};
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
.tt-base-grid-text-editor-input {
|
|
1420
|
+
box-sizing: border-box;
|
|
1421
|
+
cursor: text;
|
|
1422
|
+
padding: 0 8px;
|
|
1423
|
+
border-radius: 2px;
|
|
1424
|
+
background: ${token.colorBgContainer};
|
|
1425
|
+
font-size: 14px;
|
|
1426
|
+
color: ${token.colorText};
|
|
1427
|
+
outline: none;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.tt-base-grid-select-editor {
|
|
1431
|
+
box-sizing: border-box;
|
|
1432
|
+
display: flex;
|
|
1433
|
+
flex-direction: column;
|
|
1434
|
+
gap: 4px;
|
|
1435
|
+
padding: 8px;
|
|
1436
|
+
border: 1px solid ${token.colorBorderSecondary};
|
|
1437
|
+
border-radius: 6px;
|
|
1438
|
+
background: ${token.colorBgElevated};
|
|
1439
|
+
box-shadow: ${token.boxShadowSecondary};
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.tt-base-grid-select-search {
|
|
1443
|
+
height: 32px;
|
|
1444
|
+
padding: 0 8px;
|
|
1445
|
+
border: 1px solid ${token.colorBorder};
|
|
1446
|
+
border-radius: 6px;
|
|
1447
|
+
font-size: 14px;
|
|
1448
|
+
color: ${token.colorText};
|
|
1449
|
+
background: transparent;
|
|
1450
|
+
outline: none;
|
|
1451
|
+
|
|
1452
|
+
&:focus {
|
|
1453
|
+
border-color: ${token.colorPrimary};
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.tt-base-grid-select-list {
|
|
1458
|
+
max-height: 240px;
|
|
1459
|
+
overflow-y: auto;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.tt-base-grid-select-item {
|
|
1463
|
+
display: flex;
|
|
1464
|
+
align-items: center;
|
|
1465
|
+
justify-content: space-between;
|
|
1466
|
+
gap: 8px;
|
|
1467
|
+
padding: 6px 8px;
|
|
1468
|
+
border-radius: 4px;
|
|
1469
|
+
cursor: pointer;
|
|
1470
|
+
|
|
1471
|
+
&.is-active {
|
|
1472
|
+
background: ${token.colorFillTertiary};
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.tt-base-grid-select-tag {
|
|
1477
|
+
overflow: hidden;
|
|
1478
|
+
padding: 0 8px;
|
|
1479
|
+
border-radius: 10px;
|
|
1480
|
+
font-size: 12px;
|
|
1481
|
+
line-height: 20px;
|
|
1482
|
+
text-overflow: ellipsis;
|
|
1483
|
+
white-space: nowrap;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
.tt-base-grid-select-check {
|
|
1487
|
+
flex-shrink: 0;
|
|
1488
|
+
font-size: 16px;
|
|
1489
|
+
color: ${token.colorPrimary};
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.tt-base-grid-select-empty {
|
|
1493
|
+
padding: 12px 8px;
|
|
1494
|
+
text-align: center;
|
|
1495
|
+
font-size: 12px;
|
|
1496
|
+
color: ${token.colorTextTertiary};
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
.tt-base-grid-indicators {
|
|
1500
|
+
position: absolute;
|
|
1501
|
+
left: 0;
|
|
1502
|
+
top: 0;
|
|
1503
|
+
pointer-events: none;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.tt-base-grid-indicator-cell {
|
|
1507
|
+
position: absolute;
|
|
1508
|
+
border-radius: 2px;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
.tt-base-grid-error-dot {
|
|
1512
|
+
position: absolute;
|
|
1513
|
+
top: 4px;
|
|
1514
|
+
right: 4px;
|
|
1515
|
+
display: flex;
|
|
1516
|
+
align-items: center;
|
|
1517
|
+
justify-content: center;
|
|
1518
|
+
width: 24px;
|
|
1519
|
+
height: 24px;
|
|
1520
|
+
border-radius: 50%;
|
|
1521
|
+
background: ${isDark ? "rgba(245, 74, 69, 0.3)" : "#fde2e2"};
|
|
1522
|
+
color: #f54a45;
|
|
1523
|
+
font-size: 16px;
|
|
1524
|
+
cursor: pointer;
|
|
1525
|
+
pointer-events: auto;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.tt-base-grid-error-tip {
|
|
1529
|
+
max-width: 280px;
|
|
1530
|
+
|
|
1531
|
+
p {
|
|
1532
|
+
margin: 0 0 8px;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.tt-base-grid-error-title {
|
|
1537
|
+
font-size: 14px;
|
|
1538
|
+
font-weight: 500;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
.tt-base-grid-error-message {
|
|
1542
|
+
font-size: 12px;
|
|
1543
|
+
word-break: break-word;
|
|
1544
|
+
opacity: 0.75;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
.tt-base-grid-error-actions {
|
|
1548
|
+
display: flex;
|
|
1549
|
+
gap: 8px;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.tt-base-grid-loading-stop {
|
|
1553
|
+
position: absolute;
|
|
1554
|
+
padding: 0;
|
|
1555
|
+
border: none;
|
|
1556
|
+
top: 4px;
|
|
1557
|
+
right: 4px;
|
|
1558
|
+
border-radius: 50%;
|
|
1559
|
+
background: ${token.colorBgContainer};
|
|
1560
|
+
cursor: pointer;
|
|
1561
|
+
pointer-events: auto;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
.tt-base-grid-loading-progress {
|
|
1565
|
+
position: absolute;
|
|
1566
|
+
top: 0;
|
|
1567
|
+
right: 0;
|
|
1568
|
+
display: flex;
|
|
1569
|
+
align-items: center;
|
|
1570
|
+
justify-content: center;
|
|
1571
|
+
width: 24px;
|
|
1572
|
+
height: 24px;
|
|
1573
|
+
border-radius: 50%;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.tt-base-grid-loading-ping {
|
|
1577
|
+
position: absolute;
|
|
1578
|
+
inset: 4px;
|
|
1579
|
+
border-radius: 50%;
|
|
1580
|
+
background: ${isDark ? "rgba(255, 255, 255, 0.15)" : "rgba(31, 35, 41, 0.15)"};
|
|
1581
|
+
animation: tt-base-grid-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
1582
|
+
|
|
1583
|
+
&.is-ai {
|
|
1584
|
+
background: rgba(255, 136, 0, 0.3);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.tt-base-grid-loading-inner {
|
|
1589
|
+
display: flex;
|
|
1590
|
+
align-items: center;
|
|
1591
|
+
justify-content: center;
|
|
1592
|
+
width: 20px;
|
|
1593
|
+
height: 20px;
|
|
1594
|
+
border-radius: 50%;
|
|
1595
|
+
background: ${token.colorBgContainer};
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.tt-base-grid-loading-ai {
|
|
1599
|
+
position: absolute;
|
|
1600
|
+
top: 4px;
|
|
1601
|
+
right: 4px;
|
|
1602
|
+
border-radius: 50%;
|
|
1603
|
+
background: ${token.colorBgContainer};
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
.tt-base-grid-loading-spin {
|
|
1607
|
+
position: absolute;
|
|
1608
|
+
inset: 0;
|
|
1609
|
+
border: 2px dotted transparent;
|
|
1610
|
+
border-top-color: #ff8800;
|
|
1611
|
+
border-radius: 50%;
|
|
1612
|
+
animation: tt-base-grid-spin 1.2s linear infinite;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
.tt-base-grid-loading-ai-icon {
|
|
1616
|
+
width: 24px;
|
|
1617
|
+
height: 24px;
|
|
1618
|
+
padding: 4px;
|
|
1619
|
+
box-sizing: border-box;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.tt-base-grid-icon-xs {
|
|
1623
|
+
font-size: 12px;
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.tt-base-grid-icon-sm {
|
|
1627
|
+
font-size: 16px;
|
|
1628
|
+
|
|
1629
|
+
&.is-ai {
|
|
1630
|
+
color: #ff8800;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
@keyframes tt-base-grid-ping {
|
|
1635
|
+
75%,
|
|
1636
|
+
100% {
|
|
1637
|
+
transform: scale(2);
|
|
1638
|
+
opacity: 0;
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
@keyframes tt-base-grid-spin {
|
|
1643
|
+
to {
|
|
1644
|
+
transform: rotate(360deg);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
`;
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
// src/components/base/base-view.style.ts
|
|
1651
|
+
var baseViewStyles = ({ token, isDark }) => {
|
|
1652
|
+
const c = isDark ? {
|
|
1653
|
+
text: token.colorText,
|
|
1654
|
+
caption: token.colorTextSecondary,
|
|
1655
|
+
placeholder: token.colorTextQuaternary,
|
|
1656
|
+
border: token.colorBorderSecondary,
|
|
1657
|
+
divider: token.colorSplit,
|
|
1658
|
+
hover: token.colorFillSecondary,
|
|
1659
|
+
pressed: token.colorFill,
|
|
1660
|
+
bg: token.colorBgContainer,
|
|
1661
|
+
base: token.colorBgLayout,
|
|
1662
|
+
float: token.colorBgElevated
|
|
1663
|
+
} : {
|
|
1664
|
+
text: "#1f2329",
|
|
1665
|
+
caption: "#646a73",
|
|
1666
|
+
placeholder: "#8f959e",
|
|
1667
|
+
border: "#dee0e3",
|
|
1668
|
+
hover: "rgba(31, 35, 41, 0.08)",
|
|
1669
|
+
pressed: "rgba(31, 35, 41, 0.12)",
|
|
1670
|
+
bg: "#ffffff",
|
|
1671
|
+
base: "#f5f6f7",
|
|
1672
|
+
float: "#ffffff"
|
|
1673
|
+
};
|
|
1674
|
+
const primary = token.colorPrimary;
|
|
1675
|
+
const primaryBg = token.colorPrimaryBg;
|
|
1676
|
+
const shadow = isDark ? "0 6px 24px rgba(0, 0, 0, 0.45)" : "0 6px 24px 0 rgba(31, 35, 41, 0.08), 0 0 1px 0 rgba(31, 35, 41, 0.18)";
|
|
1677
|
+
return `
|
|
1678
|
+
.tt-base-view {
|
|
1679
|
+
display: flex;
|
|
1680
|
+
width: 100%;
|
|
1681
|
+
height: 100%;
|
|
1682
|
+
min-height: 0;
|
|
1683
|
+
overflow: hidden;
|
|
1684
|
+
background: ${c.bg};
|
|
1685
|
+
color: ${c.text};
|
|
1686
|
+
font-size: 14px;
|
|
1687
|
+
line-height: 22px;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
.tt-base-view--empty {
|
|
1691
|
+
align-items: center;
|
|
1692
|
+
justify-content: center;
|
|
1693
|
+
color: ${c.caption};
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
.tt-base-icon {
|
|
1697
|
+
display: inline-flex;
|
|
1698
|
+
flex: none;
|
|
1699
|
+
align-items: center;
|
|
1700
|
+
justify-content: center;
|
|
1701
|
+
|
|
1702
|
+
& svg {
|
|
1703
|
+
display: block;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
&.is-flipped {
|
|
1707
|
+
transform: rotate(180deg);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.tt-base-icon-button {
|
|
1712
|
+
display: inline-flex;
|
|
1713
|
+
flex: none;
|
|
1714
|
+
align-items: center;
|
|
1715
|
+
justify-content: center;
|
|
1716
|
+
min-width: 28px;
|
|
1717
|
+
height: 28px;
|
|
1718
|
+
padding: 0 4px;
|
|
1719
|
+
border: none;
|
|
1720
|
+
border-radius: 6px;
|
|
1721
|
+
background: transparent;
|
|
1722
|
+
color: ${c.caption};
|
|
1723
|
+
cursor: pointer;
|
|
1724
|
+
|
|
1725
|
+
&:hover:not(:disabled) {
|
|
1726
|
+
background: ${c.hover};
|
|
1727
|
+
color: ${c.text};
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
&:active:not(:disabled) {
|
|
1731
|
+
background: ${c.pressed};
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
&:disabled {
|
|
1735
|
+
cursor: not-allowed;
|
|
1736
|
+
opacity: 0.4;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
/* ---------- 数据表侧栏 ---------- */
|
|
1741
|
+
|
|
1742
|
+
.tt-base-sidebar {
|
|
1743
|
+
display: flex;
|
|
1744
|
+
flex: none;
|
|
1745
|
+
flex-direction: column;
|
|
1746
|
+
width: 220px;
|
|
1747
|
+
border-right: 1px solid ${c.border};
|
|
1748
|
+
background: ${c.bg};
|
|
1749
|
+
transition: width 0.15s;
|
|
1750
|
+
|
|
1751
|
+
&.is-collapsed {
|
|
1752
|
+
width: 44px;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.tt-base-sidebar__head {
|
|
1757
|
+
display: flex;
|
|
1758
|
+
align-items: center;
|
|
1759
|
+
gap: 4px;
|
|
1760
|
+
height: 48px;
|
|
1761
|
+
padding: 0 8px 0 16px;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.tt-base-sidebar.is-collapsed .tt-base-sidebar__head {
|
|
1765
|
+
justify-content: center;
|
|
1766
|
+
padding: 0;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.tt-base-sidebar__title {
|
|
1770
|
+
flex: 1;
|
|
1771
|
+
color: ${c.caption};
|
|
1772
|
+
font-size: 12px;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.tt-base-sidebar__list {
|
|
1776
|
+
flex: 1;
|
|
1777
|
+
overflow: auto;
|
|
1778
|
+
padding: 0 8px 8px;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.tt-base-sidebar__item {
|
|
1782
|
+
display: flex;
|
|
1783
|
+
align-items: center;
|
|
1784
|
+
gap: 8px;
|
|
1785
|
+
height: 36px;
|
|
1786
|
+
padding: 0 4px 0 10px;
|
|
1787
|
+
border-radius: 6px;
|
|
1788
|
+
color: ${c.text};
|
|
1789
|
+
cursor: pointer;
|
|
1790
|
+
outline: none;
|
|
1791
|
+
|
|
1792
|
+
&:hover {
|
|
1793
|
+
background: ${c.hover};
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
&.is-active {
|
|
1797
|
+
background: ${primaryBg};
|
|
1798
|
+
color: ${primary};
|
|
1799
|
+
font-weight: 500;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
& .tt-base-rename {
|
|
1803
|
+
flex: 1;
|
|
1804
|
+
min-width: 0;
|
|
1805
|
+
overflow: hidden;
|
|
1806
|
+
text-overflow: ellipsis;
|
|
1807
|
+
white-space: nowrap;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.tt-base-sidebar__more {
|
|
1812
|
+
visibility: hidden;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.tt-base-sidebar__item:hover .tt-base-sidebar__more,
|
|
1816
|
+
.tt-base-sidebar__item.is-active .tt-base-sidebar__more {
|
|
1817
|
+
visibility: visible;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
.tt-base-rename__input {
|
|
1821
|
+
flex: 1;
|
|
1822
|
+
min-width: 0;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/* ---------- 主区 ---------- */
|
|
1826
|
+
|
|
1827
|
+
.tt-base-main {
|
|
1828
|
+
display: flex;
|
|
1829
|
+
flex: 1;
|
|
1830
|
+
flex-direction: column;
|
|
1831
|
+
min-width: 0;
|
|
1832
|
+
min-height: 0;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.tt-base-tabs {
|
|
1836
|
+
display: flex;
|
|
1837
|
+
flex: none;
|
|
1838
|
+
align-items: flex-end;
|
|
1839
|
+
gap: 2px;
|
|
1840
|
+
height: 44px;
|
|
1841
|
+
padding: 0 12px;
|
|
1842
|
+
overflow-x: auto;
|
|
1843
|
+
background: ${c.base};
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.tt-base-tabs__item {
|
|
1847
|
+
display: flex;
|
|
1848
|
+
flex: none;
|
|
1849
|
+
align-items: center;
|
|
1850
|
+
gap: 6px;
|
|
1851
|
+
height: 36px;
|
|
1852
|
+
max-width: 220px;
|
|
1853
|
+
padding: 0 12px;
|
|
1854
|
+
border-radius: 8px 8px 0 0;
|
|
1855
|
+
color: ${c.caption};
|
|
1856
|
+
cursor: pointer;
|
|
1857
|
+
outline: none;
|
|
1858
|
+
|
|
1859
|
+
&:hover {
|
|
1860
|
+
background: ${c.hover};
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
&.is-active {
|
|
1864
|
+
background: ${c.bg};
|
|
1865
|
+
color: ${c.text};
|
|
1866
|
+
font-weight: 500;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
& .tt-base-rename {
|
|
1870
|
+
overflow: hidden;
|
|
1871
|
+
text-overflow: ellipsis;
|
|
1872
|
+
white-space: nowrap;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
.tt-base-tabs__more {
|
|
1877
|
+
min-width: 20px;
|
|
1878
|
+
height: 20px;
|
|
1879
|
+
margin-right: -6px;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
.tt-base-tabs__add {
|
|
1883
|
+
align-self: center;
|
|
1884
|
+
margin-left: 4px;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
.tt-base-toolbar {
|
|
1888
|
+
display: flex;
|
|
1889
|
+
flex: none;
|
|
1890
|
+
align-items: center;
|
|
1891
|
+
gap: 4px;
|
|
1892
|
+
height: 44px;
|
|
1893
|
+
padding: 0 12px;
|
|
1894
|
+
border-bottom: 1px solid ${c.border};
|
|
1895
|
+
background: ${c.bg};
|
|
1896
|
+
overflow-x: auto;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
.tt-base-toolbar__button {
|
|
1900
|
+
display: inline-flex;
|
|
1901
|
+
flex: none;
|
|
1902
|
+
align-items: center;
|
|
1903
|
+
gap: 4px;
|
|
1904
|
+
height: 28px;
|
|
1905
|
+
padding: 0 8px;
|
|
1906
|
+
border: none;
|
|
1907
|
+
border-radius: 6px;
|
|
1908
|
+
background: transparent;
|
|
1909
|
+
color: ${c.text};
|
|
1910
|
+
font-size: 14px;
|
|
1911
|
+
white-space: nowrap;
|
|
1912
|
+
cursor: pointer;
|
|
1913
|
+
|
|
1914
|
+
& .tt-base-icon {
|
|
1915
|
+
color: ${c.caption};
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
&:hover {
|
|
1919
|
+
background: ${c.hover};
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
&.is-open {
|
|
1923
|
+
background: ${c.hover};
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
&.is-primary {
|
|
1927
|
+
color: ${primary};
|
|
1928
|
+
|
|
1929
|
+
& .tt-base-icon {
|
|
1930
|
+
color: ${primary};
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
&.is-active.is-filter {
|
|
1935
|
+
background: rgba(20, 86, 240, 0.2);
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
&.is-active.is-group {
|
|
1939
|
+
background: rgba(255, 129, 26, 0.15);
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
&.is-active.is-sort {
|
|
1943
|
+
background: rgba(62, 195, 247, 0.2);
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
&.is-active.is-fields {
|
|
1947
|
+
background: rgba(250, 211, 85, 0.2);
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
.tt-base-toolbar__divider {
|
|
1952
|
+
flex: none;
|
|
1953
|
+
width: 1px;
|
|
1954
|
+
height: 16px;
|
|
1955
|
+
margin: 0 4px;
|
|
1956
|
+
background: ${c.border};
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
.tt-base-toolbar__spacer {
|
|
1960
|
+
flex: 1;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
.tt-base-search {
|
|
1964
|
+
display: inline-flex;
|
|
1965
|
+
flex: none;
|
|
1966
|
+
align-items: center;
|
|
1967
|
+
gap: 4px;
|
|
1968
|
+
height: 28px;
|
|
1969
|
+
padding: 0 4px 0 8px;
|
|
1970
|
+
border: 1px solid ${primary};
|
|
1971
|
+
border-radius: 6px;
|
|
1972
|
+
color: ${c.caption};
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
.tt-base-search__input {
|
|
1976
|
+
width: 160px;
|
|
1977
|
+
border: none;
|
|
1978
|
+
outline: none;
|
|
1979
|
+
background: transparent;
|
|
1980
|
+
color: ${c.text};
|
|
1981
|
+
font-size: 14px;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
.tt-base-search__count {
|
|
1985
|
+
color: ${c.placeholder};
|
|
1986
|
+
font-size: 12px;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.tt-base-body {
|
|
1990
|
+
position: relative;
|
|
1991
|
+
display: flex;
|
|
1992
|
+
flex: 1;
|
|
1993
|
+
min-height: 0;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
.tt-base-grid-wrap {
|
|
1997
|
+
position: relative;
|
|
1998
|
+
flex: 1;
|
|
1999
|
+
min-width: 0;
|
|
2000
|
+
min-height: 0;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.tt-base-notice {
|
|
2004
|
+
position: fixed;
|
|
2005
|
+
left: 50%;
|
|
2006
|
+
top: 72px;
|
|
2007
|
+
z-index: 1100;
|
|
2008
|
+
padding: 9px 16px;
|
|
2009
|
+
border-radius: 8px;
|
|
2010
|
+
background: ${c.float};
|
|
2011
|
+
box-shadow: ${shadow};
|
|
2012
|
+
color: ${c.text};
|
|
2013
|
+
transform: translateX(-50%);
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
/* ---------- 弹出面板与菜单 ---------- */
|
|
2017
|
+
|
|
2018
|
+
.tt-base-popover,
|
|
2019
|
+
.tt-base-editor-panel {
|
|
2020
|
+
position: fixed;
|
|
2021
|
+
z-index: 1000;
|
|
2022
|
+
box-sizing: border-box;
|
|
2023
|
+
border: 1px solid ${c.border};
|
|
2024
|
+
border-radius: 8px;
|
|
2025
|
+
background: ${c.float};
|
|
2026
|
+
box-shadow: ${shadow};
|
|
2027
|
+
color: ${c.text};
|
|
2028
|
+
font-size: 14px;
|
|
2029
|
+
line-height: 22px;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
.tt-base-editor-panel {
|
|
2033
|
+
padding: 8px;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.tt-base-select-popup {
|
|
2037
|
+
z-index: 1060;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
.tt-base-menu {
|
|
2041
|
+
min-width: 200px;
|
|
2042
|
+
padding: 4px;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.tt-base-menu__item {
|
|
2046
|
+
display: flex;
|
|
2047
|
+
align-items: center;
|
|
2048
|
+
gap: 8px;
|
|
2049
|
+
width: 100%;
|
|
2050
|
+
height: 36px;
|
|
2051
|
+
padding: 0 8px;
|
|
2052
|
+
border: none;
|
|
2053
|
+
border-radius: 6px;
|
|
2054
|
+
background: transparent;
|
|
2055
|
+
color: ${c.text};
|
|
2056
|
+
font-size: 14px;
|
|
2057
|
+
text-align: left;
|
|
2058
|
+
cursor: pointer;
|
|
2059
|
+
|
|
2060
|
+
&:hover:not(:disabled) {
|
|
2061
|
+
background: ${c.hover};
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
&:disabled {
|
|
2065
|
+
color: ${c.placeholder};
|
|
2066
|
+
cursor: not-allowed;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
&.is-danger:not(:disabled) {
|
|
2070
|
+
color: ${token.colorError};
|
|
2071
|
+
|
|
2072
|
+
& .tt-base-menu__icon {
|
|
2073
|
+
color: ${token.colorError};
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.tt-base-menu__icon {
|
|
2079
|
+
display: inline-flex;
|
|
2080
|
+
width: 16px;
|
|
2081
|
+
color: ${c.caption};
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
.tt-base-menu__label {
|
|
2085
|
+
flex: 1;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
.tt-base-menu__check {
|
|
2089
|
+
color: ${primary};
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
.tt-base-menu__divider {
|
|
2093
|
+
height: 1px;
|
|
2094
|
+
margin: 4px 0;
|
|
2095
|
+
background: ${c.border};
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.tt-base-panel {
|
|
2099
|
+
padding: 12px 16px 16px;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
.tt-base-panel__title {
|
|
2103
|
+
display: flex;
|
|
2104
|
+
align-items: center;
|
|
2105
|
+
justify-content: space-between;
|
|
2106
|
+
margin-bottom: 12px;
|
|
2107
|
+
font-weight: 500;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
.tt-base-panel__label {
|
|
2111
|
+
margin: 12px 0 6px;
|
|
2112
|
+
color: ${c.caption};
|
|
2113
|
+
font-size: 12px;
|
|
2114
|
+
line-height: 20px;
|
|
2115
|
+
|
|
2116
|
+
&:first-child {
|
|
2117
|
+
margin-top: 0;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.tt-base-panel__hint {
|
|
2122
|
+
margin-top: 8px;
|
|
2123
|
+
color: ${c.placeholder};
|
|
2124
|
+
font-size: 12px;
|
|
2125
|
+
line-height: 18px;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
.tt-base-panel__add {
|
|
2129
|
+
margin-top: 4px;
|
|
2130
|
+
padding-left: 4px;
|
|
2131
|
+
color: ${primary};
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
.tt-base-panel__picker {
|
|
2135
|
+
width: 200px;
|
|
2136
|
+
margin-top: 4px;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
.tt-base-filter__conjunction {
|
|
2140
|
+
display: flex;
|
|
2141
|
+
align-items: center;
|
|
2142
|
+
gap: 6px;
|
|
2143
|
+
margin-bottom: 8px;
|
|
2144
|
+
color: ${c.caption};
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
.tt-base-filter__row {
|
|
2148
|
+
display: flex;
|
|
2149
|
+
align-items: center;
|
|
2150
|
+
gap: 8px;
|
|
2151
|
+
margin-bottom: 8px;
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
.tt-base-filter__field {
|
|
2155
|
+
width: 160px;
|
|
2156
|
+
flex: none;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
.tt-base-filter__operator {
|
|
2160
|
+
width: 120px;
|
|
2161
|
+
flex: none;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
.tt-base-filter__value {
|
|
2165
|
+
flex: 1;
|
|
2166
|
+
min-width: 0;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
.tt-base-filter__date {
|
|
2170
|
+
display: flex;
|
|
2171
|
+
flex: 1;
|
|
2172
|
+
gap: 6px;
|
|
2173
|
+
min-width: 0;
|
|
2174
|
+
|
|
2175
|
+
& > * {
|
|
2176
|
+
flex: 1;
|
|
2177
|
+
min-width: 0;
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
.tt-base-inline-field,
|
|
2182
|
+
.tt-base-inline-user {
|
|
2183
|
+
display: inline-flex;
|
|
2184
|
+
align-items: center;
|
|
2185
|
+
gap: 6px;
|
|
2186
|
+
vertical-align: middle;
|
|
2187
|
+
|
|
2188
|
+
& .tt-base-icon {
|
|
2189
|
+
color: ${c.caption};
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
.tt-base-tag {
|
|
2194
|
+
display: inline-block;
|
|
2195
|
+
max-width: 100%;
|
|
2196
|
+
padding: 0 8px;
|
|
2197
|
+
border-radius: 12px;
|
|
2198
|
+
overflow: hidden;
|
|
2199
|
+
font-size: 12px;
|
|
2200
|
+
line-height: 20px;
|
|
2201
|
+
text-overflow: ellipsis;
|
|
2202
|
+
white-space: nowrap;
|
|
2203
|
+
vertical-align: middle;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
.tt-base-fields__list {
|
|
2207
|
+
max-height: 360px;
|
|
2208
|
+
margin: 0 -8px;
|
|
2209
|
+
overflow: auto;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
.tt-base-fields__item {
|
|
2213
|
+
display: flex;
|
|
2214
|
+
align-items: center;
|
|
2215
|
+
gap: 6px;
|
|
2216
|
+
height: 36px;
|
|
2217
|
+
padding: 0 8px;
|
|
2218
|
+
border-radius: 6px;
|
|
2219
|
+
|
|
2220
|
+
&:hover {
|
|
2221
|
+
background: ${c.hover};
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
&.is-dragging {
|
|
2225
|
+
opacity: 0.5;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
& > .tt-base-icon {
|
|
2229
|
+
color: ${c.caption};
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
.tt-base-fields__drag {
|
|
2234
|
+
display: inline-flex;
|
|
2235
|
+
color: ${c.placeholder};
|
|
2236
|
+
cursor: grab;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
.tt-base-fields__name {
|
|
2240
|
+
flex: 1;
|
|
2241
|
+
min-width: 0;
|
|
2242
|
+
overflow: hidden;
|
|
2243
|
+
border: none;
|
|
2244
|
+
background: transparent;
|
|
2245
|
+
color: ${c.text};
|
|
2246
|
+
font-size: 14px;
|
|
2247
|
+
text-align: left;
|
|
2248
|
+
text-overflow: ellipsis;
|
|
2249
|
+
white-space: nowrap;
|
|
2250
|
+
cursor: pointer;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
.tt-base-field-config__type {
|
|
2254
|
+
width: 100%;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.tt-base-field-config__range {
|
|
2258
|
+
display: flex;
|
|
2259
|
+
align-items: center;
|
|
2260
|
+
gap: 8px;
|
|
2261
|
+
|
|
2262
|
+
& > .ant-select {
|
|
2263
|
+
flex: 1;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.tt-base-field-config__check {
|
|
2268
|
+
margin-top: 12px;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.tt-base-field-config__desc {
|
|
2272
|
+
display: block;
|
|
2273
|
+
margin-top: 12px;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
.tt-base-field-config .ant-select {
|
|
2277
|
+
width: 100%;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
.tt-base-options {
|
|
2281
|
+
display: flex;
|
|
2282
|
+
flex-direction: column;
|
|
2283
|
+
gap: 6px;
|
|
2284
|
+
max-height: 240px;
|
|
2285
|
+
overflow: auto;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
.tt-base-options__row {
|
|
2289
|
+
position: relative;
|
|
2290
|
+
display: flex;
|
|
2291
|
+
align-items: center;
|
|
2292
|
+
gap: 6px;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
.tt-base-options__swatch {
|
|
2296
|
+
flex: none;
|
|
2297
|
+
width: 16px;
|
|
2298
|
+
height: 16px;
|
|
2299
|
+
padding: 0;
|
|
2300
|
+
border: 1px solid transparent;
|
|
2301
|
+
border-radius: 50%;
|
|
2302
|
+
cursor: pointer;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
.tt-base-options__palette {
|
|
2306
|
+
position: absolute;
|
|
2307
|
+
left: 0;
|
|
2308
|
+
top: 26px;
|
|
2309
|
+
z-index: 2;
|
|
2310
|
+
display: grid;
|
|
2311
|
+
grid-template-columns: repeat(5, 24px);
|
|
2312
|
+
gap: 6px;
|
|
2313
|
+
padding: 8px;
|
|
2314
|
+
border-radius: 8px;
|
|
2315
|
+
background: ${c.float};
|
|
2316
|
+
box-shadow: ${shadow};
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
.tt-base-options__color {
|
|
2320
|
+
width: 24px;
|
|
2321
|
+
height: 24px;
|
|
2322
|
+
padding: 0;
|
|
2323
|
+
border: 2px solid transparent;
|
|
2324
|
+
border-radius: 6px;
|
|
2325
|
+
font-size: 12px;
|
|
2326
|
+
font-weight: 500;
|
|
2327
|
+
cursor: pointer;
|
|
2328
|
+
|
|
2329
|
+
&.is-active {
|
|
2330
|
+
border-color: ${primary};
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
/* ---------- 单元格编辑面板 ---------- */
|
|
2335
|
+
|
|
2336
|
+
.tt-base-editor-anchor {
|
|
2337
|
+
position: relative;
|
|
2338
|
+
pointer-events: none;
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
.tt-base-editor-focus {
|
|
2342
|
+
position: absolute;
|
|
2343
|
+
width: 0;
|
|
2344
|
+
height: 0;
|
|
2345
|
+
padding: 0;
|
|
2346
|
+
border: none;
|
|
2347
|
+
opacity: 0;
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
.tt-base-editor-input {
|
|
2351
|
+
box-sizing: border-box;
|
|
2352
|
+
width: 100%;
|
|
2353
|
+
height: 32px;
|
|
2354
|
+
padding: 0 8px;
|
|
2355
|
+
border: 1px solid ${c.border};
|
|
2356
|
+
border-radius: 6px;
|
|
2357
|
+
outline: none;
|
|
2358
|
+
background: ${c.bg};
|
|
2359
|
+
color: ${c.text};
|
|
2360
|
+
font-size: 14px;
|
|
2361
|
+
|
|
2362
|
+
&:focus {
|
|
2363
|
+
border-color: ${primary};
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
.tt-base-editor-label {
|
|
2368
|
+
display: flex;
|
|
2369
|
+
flex-direction: column;
|
|
2370
|
+
gap: 4px;
|
|
2371
|
+
margin-bottom: 8px;
|
|
2372
|
+
color: ${c.caption};
|
|
2373
|
+
font-size: 12px;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
.tt-base-editor-actions {
|
|
2377
|
+
display: flex;
|
|
2378
|
+
justify-content: flex-end;
|
|
2379
|
+
gap: 8px;
|
|
2380
|
+
margin-top: 16px;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
.tt-base-editor-button {
|
|
2384
|
+
height: 32px;
|
|
2385
|
+
padding: 0 16px;
|
|
2386
|
+
border: 1px solid ${c.border};
|
|
2387
|
+
border-radius: 6px;
|
|
2388
|
+
background: ${c.bg};
|
|
2389
|
+
color: ${c.text};
|
|
2390
|
+
font-size: 14px;
|
|
2391
|
+
cursor: pointer;
|
|
2392
|
+
|
|
2393
|
+
&:hover:not(:disabled) {
|
|
2394
|
+
background: ${c.hover};
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
&.is-primary {
|
|
2398
|
+
border-color: ${primary};
|
|
2399
|
+
background: ${primary};
|
|
2400
|
+
color: #fff;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
&.is-block {
|
|
2404
|
+
width: 100%;
|
|
2405
|
+
margin-top: 8px;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
&:disabled {
|
|
2409
|
+
cursor: not-allowed;
|
|
2410
|
+
opacity: 0.5;
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
.tt-base-editor-link {
|
|
2415
|
+
padding: 0;
|
|
2416
|
+
border: none;
|
|
2417
|
+
background: transparent;
|
|
2418
|
+
color: ${primary};
|
|
2419
|
+
font-size: 14px;
|
|
2420
|
+
cursor: pointer;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.tt-base-editor-empty {
|
|
2424
|
+
padding: 12px 4px;
|
|
2425
|
+
color: ${c.placeholder};
|
|
2426
|
+
text-align: center;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
.tt-base-editor-error {
|
|
2430
|
+
margin-top: 6px;
|
|
2431
|
+
color: ${token.colorError};
|
|
2432
|
+
font-size: 12px;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.tt-base-calendar__head {
|
|
2436
|
+
display: flex;
|
|
2437
|
+
align-items: center;
|
|
2438
|
+
gap: 2px;
|
|
2439
|
+
margin: 8px 0 4px;
|
|
2440
|
+
|
|
2441
|
+
& button {
|
|
2442
|
+
width: 28px;
|
|
2443
|
+
height: 28px;
|
|
2444
|
+
border: none;
|
|
2445
|
+
border-radius: 6px;
|
|
2446
|
+
background: transparent;
|
|
2447
|
+
color: ${c.caption};
|
|
2448
|
+
font-size: 16px;
|
|
2449
|
+
cursor: pointer;
|
|
2450
|
+
|
|
2451
|
+
&:hover {
|
|
2452
|
+
background: ${c.hover};
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
.tt-base-calendar__title {
|
|
2458
|
+
flex: 1;
|
|
2459
|
+
font-weight: 500;
|
|
2460
|
+
text-align: center;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
.tt-base-calendar__grid {
|
|
2464
|
+
display: grid;
|
|
2465
|
+
grid-template-columns: repeat(7, 1fr);
|
|
2466
|
+
gap: 2px;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
.tt-base-calendar__week {
|
|
2470
|
+
color: ${c.placeholder};
|
|
2471
|
+
font-size: 12px;
|
|
2472
|
+
line-height: 28px;
|
|
2473
|
+
text-align: center;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
.tt-base-calendar__cell {
|
|
2477
|
+
height: 30px;
|
|
2478
|
+
border: none;
|
|
2479
|
+
border-radius: 6px;
|
|
2480
|
+
background: transparent;
|
|
2481
|
+
color: ${c.text};
|
|
2482
|
+
font-size: 13px;
|
|
2483
|
+
cursor: pointer;
|
|
2484
|
+
|
|
2485
|
+
&:hover {
|
|
2486
|
+
background: ${c.hover};
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
&.is-other {
|
|
2490
|
+
color: ${c.placeholder};
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
&.is-today {
|
|
2494
|
+
color: ${primary};
|
|
2495
|
+
font-weight: 600;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
&.is-selected {
|
|
2499
|
+
background: ${primary};
|
|
2500
|
+
color: #fff;
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
.tt-base-calendar__foot {
|
|
2505
|
+
display: flex;
|
|
2506
|
+
align-items: center;
|
|
2507
|
+
justify-content: flex-end;
|
|
2508
|
+
gap: 12px;
|
|
2509
|
+
margin-top: 8px;
|
|
2510
|
+
padding-top: 8px;
|
|
2511
|
+
border-top: 1px solid ${c.border};
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
.tt-base-calendar__time {
|
|
2515
|
+
width: 72px;
|
|
2516
|
+
height: 28px;
|
|
2517
|
+
margin-right: auto;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
.tt-base-avatar {
|
|
2521
|
+
display: inline-flex;
|
|
2522
|
+
flex: none;
|
|
2523
|
+
align-items: center;
|
|
2524
|
+
justify-content: center;
|
|
2525
|
+
overflow: hidden;
|
|
2526
|
+
border-radius: 50%;
|
|
2527
|
+
color: #fff;
|
|
2528
|
+
object-fit: cover;
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
.tt-base-user-picker__box {
|
|
2532
|
+
display: flex;
|
|
2533
|
+
flex-wrap: wrap;
|
|
2534
|
+
gap: 4px;
|
|
2535
|
+
min-height: 32px;
|
|
2536
|
+
padding: 4px;
|
|
2537
|
+
border: 1px solid ${primary};
|
|
2538
|
+
border-radius: 6px;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
.tt-base-user-picker__input {
|
|
2542
|
+
flex: 1;
|
|
2543
|
+
min-width: 60px;
|
|
2544
|
+
border: none;
|
|
2545
|
+
outline: none;
|
|
2546
|
+
background: transparent;
|
|
2547
|
+
color: ${c.text};
|
|
2548
|
+
font-size: 14px;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
.tt-base-user-chip {
|
|
2552
|
+
display: inline-flex;
|
|
2553
|
+
align-items: center;
|
|
2554
|
+
gap: 4px;
|
|
2555
|
+
max-width: 160px;
|
|
2556
|
+
padding: 0 6px 0 2px;
|
|
2557
|
+
border-radius: 12px;
|
|
2558
|
+
background: ${c.hover};
|
|
2559
|
+
font-size: 13px;
|
|
2560
|
+
line-height: 22px;
|
|
2561
|
+
|
|
2562
|
+
& button {
|
|
2563
|
+
padding: 0;
|
|
2564
|
+
border: none;
|
|
2565
|
+
background: transparent;
|
|
2566
|
+
color: ${c.caption};
|
|
2567
|
+
cursor: pointer;
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
.tt-base-user-chip__name {
|
|
2572
|
+
overflow: hidden;
|
|
2573
|
+
text-overflow: ellipsis;
|
|
2574
|
+
white-space: nowrap;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
.tt-base-user-picker__list {
|
|
2578
|
+
max-height: 240px;
|
|
2579
|
+
margin: 6px -4px 0;
|
|
2580
|
+
overflow: auto;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
.tt-base-user-picker__item {
|
|
2584
|
+
display: flex;
|
|
2585
|
+
align-items: center;
|
|
2586
|
+
gap: 8px;
|
|
2587
|
+
height: 36px;
|
|
2588
|
+
padding: 0 8px;
|
|
2589
|
+
border-radius: 6px;
|
|
2590
|
+
cursor: pointer;
|
|
2591
|
+
|
|
2592
|
+
&.is-active {
|
|
2593
|
+
background: ${c.hover};
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
.tt-base-user-picker__name {
|
|
2598
|
+
flex: 1;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
.tt-base-user-picker__check {
|
|
2602
|
+
color: ${primary};
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
.tt-base-files {
|
|
2606
|
+
display: flex;
|
|
2607
|
+
flex-direction: column;
|
|
2608
|
+
gap: 4px;
|
|
2609
|
+
max-height: 260px;
|
|
2610
|
+
overflow: auto;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
.tt-base-files__item {
|
|
2614
|
+
display: flex;
|
|
2615
|
+
align-items: center;
|
|
2616
|
+
gap: 4px;
|
|
2617
|
+
padding: 2px;
|
|
2618
|
+
border-radius: 6px;
|
|
2619
|
+
|
|
2620
|
+
&:hover {
|
|
2621
|
+
background: ${c.hover};
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
&.is-uploading {
|
|
2625
|
+
padding: 6px 8px;
|
|
2626
|
+
color: ${c.caption};
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
.tt-base-files__open {
|
|
2631
|
+
display: flex;
|
|
2632
|
+
flex: 1;
|
|
2633
|
+
align-items: center;
|
|
2634
|
+
gap: 8px;
|
|
2635
|
+
min-width: 0;
|
|
2636
|
+
padding: 2px;
|
|
2637
|
+
border: none;
|
|
2638
|
+
background: transparent;
|
|
2639
|
+
color: ${c.text};
|
|
2640
|
+
font-size: 14px;
|
|
2641
|
+
text-align: left;
|
|
2642
|
+
cursor: pointer;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
.tt-base-files__thumb {
|
|
2646
|
+
flex: none;
|
|
2647
|
+
width: 32px;
|
|
2648
|
+
height: 32px;
|
|
2649
|
+
border-radius: 4px;
|
|
2650
|
+
object-fit: cover;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
.tt-base-files__name {
|
|
2654
|
+
flex: 1;
|
|
2655
|
+
min-width: 0;
|
|
2656
|
+
overflow: hidden;
|
|
2657
|
+
text-overflow: ellipsis;
|
|
2658
|
+
white-space: nowrap;
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
.tt-base-files__size {
|
|
2662
|
+
flex: none;
|
|
2663
|
+
color: ${c.placeholder};
|
|
2664
|
+
font-size: 12px;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
.tt-base-files__remove {
|
|
2668
|
+
flex: none;
|
|
2669
|
+
width: 24px;
|
|
2670
|
+
height: 24px;
|
|
2671
|
+
border: none;
|
|
2672
|
+
border-radius: 4px;
|
|
2673
|
+
background: transparent;
|
|
2674
|
+
color: ${c.caption};
|
|
2675
|
+
cursor: pointer;
|
|
2676
|
+
|
|
2677
|
+
&:hover {
|
|
2678
|
+
background: ${c.pressed};
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
/* ---------- 记录详情 ---------- */
|
|
2683
|
+
|
|
2684
|
+
/* 同飞书:记录详情浮在视图右侧,不挤占表格 */
|
|
2685
|
+
.tt-base-detail {
|
|
2686
|
+
position: absolute;
|
|
2687
|
+
top: 0;
|
|
2688
|
+
right: 0;
|
|
2689
|
+
bottom: 0;
|
|
2690
|
+
z-index: 5;
|
|
2691
|
+
display: flex;
|
|
2692
|
+
flex-direction: column;
|
|
2693
|
+
width: min(640px, 100%);
|
|
2694
|
+
border-left: 1px solid ${c.border};
|
|
2695
|
+
background: ${c.bg};
|
|
2696
|
+
box-shadow: ${isDark ? "-8px 0 24px rgba(0, 0, 0, 0.35)" : "-8px 0 24px rgba(31, 35, 41, 0.08)"};
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
.tt-base-detail__head {
|
|
2700
|
+
display: flex;
|
|
2701
|
+
align-items: center;
|
|
2702
|
+
justify-content: space-between;
|
|
2703
|
+
height: 56px;
|
|
2704
|
+
padding: 0 16px;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
.tt-base-detail__nav {
|
|
2708
|
+
display: inline-flex;
|
|
2709
|
+
gap: 4px;
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
.tt-base-detail__body {
|
|
2713
|
+
flex: 1;
|
|
2714
|
+
overflow: auto;
|
|
2715
|
+
padding: 0 40px 40px;
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
@container (max-width: 480px) {
|
|
2719
|
+
.tt-base-detail__body {
|
|
2720
|
+
padding: 0 16px 24px;
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
.tt-base-detail__title {
|
|
2725
|
+
margin: 8px 0 16px;
|
|
2726
|
+
font-size: 24px;
|
|
2727
|
+
font-weight: 600;
|
|
2728
|
+
line-height: 32px;
|
|
2729
|
+
word-break: break-word;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
.tt-base-detail__tabs {
|
|
2733
|
+
display: flex;
|
|
2734
|
+
gap: 24px;
|
|
2735
|
+
margin-bottom: 16px;
|
|
2736
|
+
border-bottom: 1px solid ${c.border};
|
|
2737
|
+
|
|
2738
|
+
& span {
|
|
2739
|
+
padding: 8px 0;
|
|
2740
|
+
color: ${c.caption};
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
& .is-active {
|
|
2744
|
+
border-bottom: 2px solid ${primary};
|
|
2745
|
+
color: ${primary};
|
|
2746
|
+
font-weight: 500;
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
.tt-base-detail__row {
|
|
2751
|
+
display: flex;
|
|
2752
|
+
align-items: flex-start;
|
|
2753
|
+
min-height: 42px;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
.tt-base-detail__label {
|
|
2757
|
+
display: flex;
|
|
2758
|
+
flex: none;
|
|
2759
|
+
align-items: center;
|
|
2760
|
+
gap: 6px;
|
|
2761
|
+
width: 160px;
|
|
2762
|
+
padding: 10px 12px 10px 0;
|
|
2763
|
+
color: ${c.caption};
|
|
2764
|
+
line-height: 22px;
|
|
2765
|
+
|
|
2766
|
+
& span:last-child {
|
|
2767
|
+
overflow: hidden;
|
|
2768
|
+
text-overflow: ellipsis;
|
|
2769
|
+
white-space: nowrap;
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
.tt-base-detail__value {
|
|
2774
|
+
flex: 1;
|
|
2775
|
+
min-width: 0;
|
|
2776
|
+
padding: 6px 0;
|
|
2777
|
+
line-height: 22px;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
.tt-base-detail__text {
|
|
2781
|
+
padding: 4px 11px;
|
|
2782
|
+
word-break: break-word;
|
|
2783
|
+
white-space: pre-wrap;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
.tt-base-detail__empty {
|
|
2787
|
+
color: ${c.placeholder};
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
.tt-base-detail__input.ant-input,
|
|
2791
|
+
.tt-base-detail__select {
|
|
2792
|
+
width: 100%;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
.tt-base-detail__input.ant-input:hover,
|
|
2796
|
+
.tt-base-detail__select:hover {
|
|
2797
|
+
background: ${c.hover};
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
.tt-base-detail__trigger {
|
|
2801
|
+
display: flex;
|
|
2802
|
+
align-items: center;
|
|
2803
|
+
min-height: 30px;
|
|
2804
|
+
width: 100%;
|
|
2805
|
+
padding: 4px 11px;
|
|
2806
|
+
border: none;
|
|
2807
|
+
border-radius: 6px;
|
|
2808
|
+
background: transparent;
|
|
2809
|
+
color: ${c.text};
|
|
2810
|
+
font-size: 14px;
|
|
2811
|
+
text-align: left;
|
|
2812
|
+
cursor: pointer;
|
|
2813
|
+
|
|
2814
|
+
&:hover:not(:disabled) {
|
|
2815
|
+
background: ${c.hover};
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
&:disabled {
|
|
2819
|
+
cursor: default;
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
.tt-base-detail__users {
|
|
2824
|
+
display: flex;
|
|
2825
|
+
flex-wrap: wrap;
|
|
2826
|
+
gap: 4px;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
.tt-base-detail__rating {
|
|
2830
|
+
display: flex;
|
|
2831
|
+
gap: 2px;
|
|
2832
|
+
padding: 4px 11px;
|
|
2833
|
+
|
|
2834
|
+
& button {
|
|
2835
|
+
display: inline-flex;
|
|
2836
|
+
padding: 0;
|
|
2837
|
+
border: none;
|
|
2838
|
+
background: transparent;
|
|
2839
|
+
cursor: pointer;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
.tt-base-detail__url {
|
|
2844
|
+
display: flex;
|
|
2845
|
+
align-items: center;
|
|
2846
|
+
gap: 4px;
|
|
2847
|
+
padding-left: 11px;
|
|
2848
|
+
|
|
2849
|
+
& a {
|
|
2850
|
+
overflow: hidden;
|
|
2851
|
+
color: ${primary};
|
|
2852
|
+
text-overflow: ellipsis;
|
|
2853
|
+
white-space: nowrap;
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
& .tt-base-detail__trigger {
|
|
2857
|
+
width: auto;
|
|
2858
|
+
padding: 4px;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
.tt-base-detail__files {
|
|
2863
|
+
padding: 0 11px;
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2866
|
+
.tt-base-detail__hidden {
|
|
2867
|
+
display: inline-flex;
|
|
2868
|
+
align-items: center;
|
|
2869
|
+
gap: 6px;
|
|
2870
|
+
margin: 16px 0 8px;
|
|
2871
|
+
padding: 0;
|
|
2872
|
+
border: none;
|
|
2873
|
+
background: transparent;
|
|
2874
|
+
color: ${c.caption};
|
|
2875
|
+
font-size: 14px;
|
|
2876
|
+
cursor: pointer;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
.tt-base-detail__hidden-list {
|
|
2880
|
+
padding-left: 12px;
|
|
2881
|
+
border-left: 2px solid ${c.border};
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
.tt-base-detail__missing {
|
|
2885
|
+
padding: 40px;
|
|
2886
|
+
color: ${c.placeholder};
|
|
2887
|
+
text-align: center;
|
|
2888
|
+
}
|
|
2889
|
+
`;
|
|
2890
|
+
};
|
|
2891
|
+
var SSR_PSEUDO_FLAG = "/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */";
|
|
2892
|
+
var PSEUDO = /:(?:first|nth|nth-last)-child/;
|
|
2893
|
+
function markUnsafePseudo(flat) {
|
|
2894
|
+
const parts = [];
|
|
2895
|
+
let segStart = 0;
|
|
2896
|
+
for (let i = 0; i < flat.length; i++) {
|
|
2897
|
+
const ch = flat.charCodeAt(i);
|
|
2898
|
+
if (ch !== 123 && ch !== 125) continue;
|
|
2899
|
+
const seg = flat.slice(segStart, i);
|
|
2900
|
+
parts.push(ch === 123 && PSEUDO.test(seg) ? `${seg} ${SSR_PSEUDO_FLAG} {` : seg + flat[i]);
|
|
2901
|
+
segStart = i + 1;
|
|
2902
|
+
}
|
|
2903
|
+
parts.push(flat.slice(segStart));
|
|
2904
|
+
return parts.join("");
|
|
2905
|
+
}
|
|
2906
|
+
var cache;
|
|
2907
|
+
function prepareForEmotion(css) {
|
|
2908
|
+
if (cache?.input === css) return cache.output;
|
|
2909
|
+
const flat = serialize(compile(css), stringify).replace(/\n/g, " ");
|
|
2910
|
+
const output = markUnsafePseudo(flat);
|
|
2911
|
+
cache = { input: css, output };
|
|
2912
|
+
return output;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
// src/theme/style-context.ts
|
|
2916
|
+
function createStyleContext(token, resolved) {
|
|
2917
|
+
const vars = resolved.isDark ? { ...BASE_LIGHT_VARS, ...BASE_DARK_VARS } : BASE_LIGHT_VARS;
|
|
2918
|
+
const mode = resolved.isDark ? "dark" : "light";
|
|
2919
|
+
return {
|
|
2920
|
+
token,
|
|
2921
|
+
surface: resolved.surface,
|
|
2922
|
+
isDark: resolved.isDark,
|
|
2923
|
+
visualTheme: resolved.visualTheme,
|
|
2924
|
+
gray: (level, alpha = true) => vars[`--tt-gray-${mode}-${alpha ? "a-" : ""}${level}`] ?? "",
|
|
2925
|
+
pick: (feishu, notion) => resolved.visualTheme === "feishu" ? feishu : notion
|
|
2926
|
+
};
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
export { DEFAULT_MAX_FILE_SIZES, EditorConfigProvider, baseBoardStyles, baseGridStyles, baseViewStyles, createStyleContext, detectMediaKind, editorThemeCss, isDarkAntdToken, prepareForEmotion, resolveEditorTheme, resolveMaxSize, useEditorConfig };
|
|
2930
|
+
//# sourceMappingURL=chunk-F4LWFKIA.js.map
|
|
2931
|
+
//# sourceMappingURL=chunk-F4LWFKIA.js.map
|