@vaebe/ccui 2.0.0-beta.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.
Files changed (189) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/affix/ccui-cli.css +2 -0
  4. package/affix/index.es.js +132 -0
  5. package/affix/index.umd.js +1 -0
  6. package/alert/ccui-cli.css +2 -0
  7. package/alert/index.es.js +127 -0
  8. package/alert/index.umd.js +1 -0
  9. package/anchor/ccui-cli.css +2 -0
  10. package/anchor/index.es.js +160 -0
  11. package/anchor/index.umd.js +1 -0
  12. package/avatar/ccui-cli.css +2 -0
  13. package/avatar/index.es.js +235 -0
  14. package/avatar/index.umd.js +1 -0
  15. package/badge/ccui-cli.css +2 -0
  16. package/badge/index.es.js +146 -0
  17. package/badge/index.umd.js +1 -0
  18. package/breadcrumb/ccui-cli.css +2 -0
  19. package/breadcrumb/index.es.js +89 -0
  20. package/breadcrumb/index.umd.js +1 -0
  21. package/button/ccui-cli.css +2 -0
  22. package/button/index.es.js +1236 -0
  23. package/button/index.umd.js +1 -0
  24. package/button-3d/ccui-cli.css +2 -0
  25. package/button-3d/index.es.js +80 -0
  26. package/button-3d/index.umd.js +1 -0
  27. package/calendar/ccui-cli.css +2 -0
  28. package/calendar/index.es.js +450 -0
  29. package/calendar/index.umd.js +1 -0
  30. package/card/ccui-cli.css +2 -0
  31. package/card/index.es.js +78 -0
  32. package/card/index.umd.js +1 -0
  33. package/ccui-cli.css +2 -0
  34. package/check-box/ccui-cli.css +2 -0
  35. package/check-box/index.es.js +173 -0
  36. package/check-box/index.umd.js +1 -0
  37. package/collapse/ccui-cli.css +2 -0
  38. package/collapse/index.es.js +176 -0
  39. package/collapse/index.umd.js +1 -0
  40. package/config-provider/index.es.js +204 -0
  41. package/config-provider/index.umd.js +1 -0
  42. package/date-picker/ccui-cli.css +2 -0
  43. package/date-picker/index.es.js +2447 -0
  44. package/date-picker/index.umd.js +1 -0
  45. package/descriptions/ccui-cli.css +2 -0
  46. package/descriptions/index.es.js +175 -0
  47. package/descriptions/index.umd.js +1 -0
  48. package/divider/ccui-cli.css +2 -0
  49. package/divider/index.es.js +78 -0
  50. package/divider/index.umd.js +1 -0
  51. package/drawer/ccui-cli.css +2 -0
  52. package/drawer/index.es.js +1320 -0
  53. package/drawer/index.umd.js +1 -0
  54. package/dropdown/ccui-cli.css +2 -0
  55. package/dropdown/index.es.js +606 -0
  56. package/dropdown/index.umd.js +1 -0
  57. package/empty/ccui-cli.css +2 -0
  58. package/empty/index.es.js +173 -0
  59. package/empty/index.umd.js +1 -0
  60. package/flex/ccui-cli.css +2 -0
  61. package/flex/index.es.js +87 -0
  62. package/flex/index.umd.js +1 -0
  63. package/float-button/ccui-cli.css +2 -0
  64. package/float-button/index.es.js +169 -0
  65. package/float-button/index.umd.js +1 -0
  66. package/form/ccui-cli.css +2 -0
  67. package/form/index.es.js +752 -0
  68. package/form/index.umd.js +1 -0
  69. package/grid/ccui-cli.css +2 -0
  70. package/grid/index.es.js +207 -0
  71. package/grid/index.umd.js +1 -0
  72. package/icon/ccui-cli.css +2 -0
  73. package/icon/index.es.js +1228 -0
  74. package/icon/index.umd.js +1 -0
  75. package/image/ccui-cli.css +2 -0
  76. package/image/index.es.js +276 -0
  77. package/image/index.umd.js +1 -0
  78. package/index.d.ts +7 -0
  79. package/input/ccui-cli.css +2 -0
  80. package/input/index.es.js +1293 -0
  81. package/input/index.umd.js +1 -0
  82. package/input-number/ccui-cli.css +2 -0
  83. package/input-number/index.es.js +263 -0
  84. package/input-number/index.umd.js +1 -0
  85. package/layout/ccui-cli.css +2 -0
  86. package/layout/index.es.js +184 -0
  87. package/layout/index.umd.js +1 -0
  88. package/masonry/ccui-cli.css +2 -0
  89. package/masonry/index.es.js +119 -0
  90. package/masonry/index.umd.js +1 -0
  91. package/menu/ccui-cli.css +2 -0
  92. package/menu/index.es.js +385 -0
  93. package/menu/index.umd.js +1 -0
  94. package/message/ccui-cli.css +2 -0
  95. package/message/index.es.js +351 -0
  96. package/message/index.umd.js +1 -0
  97. package/modal/ccui-cli.css +2 -0
  98. package/modal/index.es.js +1553 -0
  99. package/modal/index.umd.js +1 -0
  100. package/notification/ccui-cli.css +2 -0
  101. package/notification/index.es.js +347 -0
  102. package/notification/index.umd.js +1 -0
  103. package/nuxt/components/category.js +2 -0
  104. package/nuxt/components/install.js +2 -0
  105. package/nuxt/components/status.js +2 -0
  106. package/nuxt/components/title.js +2 -0
  107. package/nuxt/index.js +13 -0
  108. package/package.json +53 -0
  109. package/pagination/ccui-cli.css +2 -0
  110. package/pagination/index.es.js +296 -0
  111. package/pagination/index.umd.js +1 -0
  112. package/popconfirm/ccui-cli.css +2 -0
  113. package/popconfirm/index.es.js +735 -0
  114. package/popconfirm/index.umd.js +1 -0
  115. package/popover/ccui-cli.css +2 -0
  116. package/popover/index.es.js +530 -0
  117. package/popover/index.umd.js +1 -0
  118. package/progress/ccui-cli.css +2 -0
  119. package/progress/index.es.js +167 -0
  120. package/progress/index.umd.js +1 -0
  121. package/radio/ccui-cli.css +2 -0
  122. package/radio/index.es.js +157 -0
  123. package/radio/index.umd.js +1 -0
  124. package/rate/ccui-cli.css +2 -0
  125. package/rate/index.es.js +115 -0
  126. package/rate/index.umd.js +1 -0
  127. package/result/ccui-cli.css +2 -0
  128. package/result/index.es.js +90 -0
  129. package/result/index.umd.js +1 -0
  130. package/segmented/ccui-cli.css +2 -0
  131. package/segmented/index.es.js +99 -0
  132. package/segmented/index.umd.js +1 -0
  133. package/select/ccui-cli.css +2 -0
  134. package/select/index.es.js +1885 -0
  135. package/select/index.umd.js +1 -0
  136. package/skeleton/ccui-cli.css +2 -0
  137. package/skeleton/index.es.js +117 -0
  138. package/skeleton/index.umd.js +1 -0
  139. package/slider/ccui-cli.css +2 -0
  140. package/slider/index.es.js +1071 -0
  141. package/slider/index.umd.js +1 -0
  142. package/space/ccui-cli.css +2 -0
  143. package/space/index.es.js +108 -0
  144. package/space/index.umd.js +1 -0
  145. package/spin/ccui-cli.css +2 -0
  146. package/spin/index.es.js +86 -0
  147. package/spin/index.umd.js +1 -0
  148. package/splitter/ccui-cli.css +2 -0
  149. package/splitter/index.es.js +198 -0
  150. package/splitter/index.umd.js +1 -0
  151. package/status/ccui-cli.css +2 -0
  152. package/status/index.es.js +44 -0
  153. package/status/index.umd.js +1 -0
  154. package/steps/ccui-cli.css +2 -0
  155. package/steps/index.es.js +118 -0
  156. package/steps/index.umd.js +1 -0
  157. package/switch/ccui-cli.css +2 -0
  158. package/switch/index.es.js +118 -0
  159. package/switch/index.umd.js +1 -0
  160. package/table/ccui-cli.css +2 -0
  161. package/table/index.es.js +553 -0
  162. package/table/index.umd.js +1 -0
  163. package/tabs/ccui-cli.css +2 -0
  164. package/tabs/index.es.js +128 -0
  165. package/tabs/index.umd.js +1 -0
  166. package/tag/ccui-cli.css +2 -0
  167. package/tag/index.es.js +116 -0
  168. package/tag/index.umd.js +1 -0
  169. package/theme/darkTheme.css +352 -0
  170. package/theme/theme.scss +703 -0
  171. package/timeline/ccui-cli.css +2 -0
  172. package/timeline/index.es.js +113 -0
  173. package/timeline/index.umd.js +1 -0
  174. package/tooltip/ccui-cli.css +2 -0
  175. package/tooltip/index.es.js +423 -0
  176. package/tooltip/index.umd.js +1 -0
  177. package/tree/ccui-cli.css +2 -0
  178. package/tree/index.es.js +810 -0
  179. package/tree/index.umd.js +1 -0
  180. package/typography/ccui-cli.css +2 -0
  181. package/typography/index.es.js +270 -0
  182. package/typography/index.umd.js +1 -0
  183. package/util/index.es.js +78 -0
  184. package/util/index.umd.js +1 -0
  185. package/vue-ccui.es.js +18989 -0
  186. package/vue-ccui.umd.js +1 -0
  187. package/watermark/ccui-cli.css +2 -0
  188. package/watermark/index.es.js +179 -0
  189. package/watermark/index.umd.js +1 -0
@@ -0,0 +1,553 @@
1
+ import { computed as e, defineComponent as t, h as n, provide as r, ref as i, shallowRef as a, triggerRef as o, watch as s } from "vue";
2
+ //#region ../ccui/ui/shared/hooks/use-namespace.ts
3
+ function c(e, t, n) {
4
+ let r = e;
5
+ return t && (r += `__${t}`), n && (r += `--${n}`), r;
6
+ }
7
+ function l(e, t = !1) {
8
+ let n = t ? `.ccui-${e}` : `ccui-${e}`;
9
+ return {
10
+ b: () => c(n),
11
+ e: (e) => e ? c(n, e) : "",
12
+ m: (e) => e ? c(n, "", e) : "",
13
+ em: (e, t) => e && t ? c(n, e, t) : "",
14
+ is: (e) => `is-${e}`
15
+ };
16
+ }
17
+ //#endregion
18
+ //#region ../ccui/ui/table/src/table-types.ts
19
+ var u = {
20
+ columns: {
21
+ type: Array,
22
+ default: () => []
23
+ },
24
+ dataSource: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ rowKey: {
29
+ type: [String, Function],
30
+ default: "key"
31
+ },
32
+ bordered: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ loading: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ showHeader: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ size: {
45
+ type: String,
46
+ default: "default"
47
+ },
48
+ rowSelection: {
49
+ type: Object,
50
+ default: void 0
51
+ },
52
+ expandable: {
53
+ type: Object,
54
+ default: void 0
55
+ },
56
+ scroll: {
57
+ type: Object,
58
+ default: void 0
59
+ },
60
+ childrenColumnName: {
61
+ type: String,
62
+ default: "children"
63
+ },
64
+ indentSize: {
65
+ type: Number,
66
+ default: 15
67
+ },
68
+ classNames: {
69
+ type: Object,
70
+ default: void 0
71
+ },
72
+ styles: {
73
+ type: Object,
74
+ default: void 0
75
+ }
76
+ }, d = Symbol("TableColumnsCollector"), f = Symbol("TableSummaryCollector");
77
+ //#endregion
78
+ //#region ../ccui/ui/table/src/table.tsx
79
+ function p(e, t) {
80
+ return e.key ? e.key : Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex || String(t);
81
+ }
82
+ function m(e, t) {
83
+ if (t) return (Array.isArray(t) ? t : t.split(".")).reduce((e, t) => e?.[t], e);
84
+ }
85
+ function h(e, t, n) {
86
+ if (typeof n == "function") return n(e, t);
87
+ let r = m(e, n);
88
+ return typeof r == "string" || typeof r == "number" ? r : t;
89
+ }
90
+ function g(e, t) {
91
+ return e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
92
+ }
93
+ function _(e) {
94
+ if (e === void 0) return 0;
95
+ if (typeof e == "number") return e;
96
+ let t = String(e).match(/^([\d.]+)px$/);
97
+ return t ? Number(t[1]) : 0;
98
+ }
99
+ function v(e) {
100
+ if (e !== void 0) return typeof e == "number" ? `${e}px` : String(e);
101
+ }
102
+ var y = /* @__PURE__ */ t({
103
+ name: "CTable",
104
+ props: u,
105
+ emits: [
106
+ "change",
107
+ "update:filters",
108
+ "update:sorter",
109
+ "update:selectedRowKeys",
110
+ "update:expandedRowKeys",
111
+ "expand"
112
+ ],
113
+ setup(t, { emit: c, slots: u }) {
114
+ let y = l("table"), b = i({}), x = i({ order: null }), S = i([]), C = i([]), w = /* @__PURE__ */ new Map(), T = a([]), ee = () => {
115
+ T.value = Array.from(w.values()).sort((e, t) => e.order - t.order).map((e) => e.column), o(T);
116
+ };
117
+ r(d, {
118
+ register(e, t, n) {
119
+ w.set(e, {
120
+ column: t,
121
+ order: n
122
+ }), ee();
123
+ },
124
+ unregister(e) {
125
+ w.delete(e), ee();
126
+ }
127
+ });
128
+ let E = a(null);
129
+ r(f, { setSummary(e) {
130
+ E.value = e;
131
+ } });
132
+ let D = e(() => t.columns && t.columns.length > 0 ? t.columns : T.value), te = (e) => {
133
+ let t = [], n = (e) => {
134
+ e.forEach((e) => {
135
+ e.children && e.children.length > 0 ? n(e.children) : t.push(e);
136
+ });
137
+ };
138
+ return n(e), t;
139
+ }, O = e(() => te(D.value)), ne = e(() => D.value.some((e) => e.children && e.children.length > 0));
140
+ s(() => t.rowSelection, (e) => {
141
+ if (e?.selectedRowKeys) {
142
+ S.value = [...e.selectedRowKeys];
143
+ return;
144
+ }
145
+ e?.defaultSelectedRowKeys && (S.value = [...e.defaultSelectedRowKeys]);
146
+ }, {
147
+ immediate: !0,
148
+ deep: !0
149
+ }), s(() => t.expandable, (e) => {
150
+ if (e?.expandedRowKeys) {
151
+ C.value = [...e.expandedRowKeys];
152
+ return;
153
+ }
154
+ if (e?.defaultExpandAllRows) {
155
+ C.value = t.dataSource.map((e, n) => h(e, n, t.rowKey));
156
+ return;
157
+ }
158
+ e?.defaultExpandedRowKeys && (C.value = [...e.defaultExpandedRowKeys]);
159
+ }, {
160
+ immediate: !0,
161
+ deep: !0
162
+ });
163
+ let k = e(() => {
164
+ let e = [], t = [], n = [];
165
+ return O.value.forEach((r, i) => {
166
+ r.fixed === "left" ? e.push({
167
+ column: r,
168
+ originalIndex: i
169
+ }) : r.fixed === "right" ? n.push({
170
+ column: r,
171
+ originalIndex: i
172
+ }) : t.push({
173
+ column: r,
174
+ originalIndex: i
175
+ });
176
+ }), [
177
+ ...e,
178
+ ...t,
179
+ ...n
180
+ ];
181
+ }), A = e(() => O.value.some((e) => e.fixed === "left")), re = e(() => O.value.some((e) => e.fixed === "right")), j = e(() => !!t.rowSelection), M = e(() => !!t.expandable?.expandedRowRender), N = e(() => j.value && (t.rowSelection?.fixed || A.value)), P = e(() => M.value && (t.expandable?.fixed || A.value)), F = e(() => {
182
+ if (!j.value) return 0;
183
+ let e = t.rowSelection?.columnWidth;
184
+ return _(e === void 0 ? 48 : e);
185
+ }), ie = e(() => {
186
+ if (!M.value) return 0;
187
+ let e = t.expandable?.columnWidth;
188
+ return _(e === void 0 ? 48 : e);
189
+ }), ae = e(() => {
190
+ let e = [], t = 0;
191
+ return t += N.value ? F.value : 0, t += P.value ? ie.value : 0, k.value.forEach(({ column: n }) => {
192
+ n.fixed === "left" ? (e.push(t), t += _(n.width)) : e.push(0);
193
+ }), e;
194
+ }), oe = e(() => {
195
+ let e = k.value.map(() => 0), t = 0;
196
+ for (let n = k.value.length - 1; n >= 0; n--) {
197
+ let { column: r } = k.value[n];
198
+ r.fixed === "right" && (e[n] = t, t += _(r.width));
199
+ }
200
+ return e;
201
+ }), se = e(() => ({
202
+ [y.b()]: !0,
203
+ [y.m(t.size)]: t.size !== "default",
204
+ [y.m("bordered")]: t.bordered,
205
+ [y.m("loading")]: t.loading,
206
+ [y.m("has-fixed-left")]: A.value || N.value || P.value,
207
+ [y.m("has-fixed-right")]: re.value
208
+ })), ce = e(() => {
209
+ let e = {};
210
+ return t.scroll?.x && (e.overflowX = "auto"), t.scroll?.y && (e.maxHeight = v(t.scroll.y), e.overflowY = "auto"), e;
211
+ }), le = e(() => {
212
+ let e = {};
213
+ return t.scroll?.x && (e.minWidth = v(t.scroll.x)), e;
214
+ }), I = e(() => {
215
+ let e = O.value.findIndex((e) => e.sortOrder !== void 0);
216
+ if (e >= 0) {
217
+ let t = O.value[e];
218
+ return {
219
+ column: t,
220
+ columnKey: p(t, e),
221
+ order: t.sortOrder ?? null
222
+ };
223
+ }
224
+ return x.value;
225
+ }), L = e(() => {
226
+ let e = { ...b.value };
227
+ return O.value.forEach((t, n) => {
228
+ t.filteredValue !== void 0 && (e[p(t, n)] = t.filteredValue);
229
+ }), e;
230
+ }), R = e(() => t.dataSource.filter((e) => O.value.every((t, n) => {
231
+ let r = L.value[p(t, n)];
232
+ return r?.length ? r.includes(m(e, t.dataIndex)) : !0;
233
+ }))), z = e(() => {
234
+ let { column: e, order: t } = I.value;
235
+ if (!e || !t || !e.sorter) return R.value;
236
+ let n = t === "ascend" ? 1 : -1;
237
+ return [...R.value].sort((t, r) => (typeof e.sorter == "function" ? e.sorter(t, r) : g(m(t, e.dataIndex), m(r, e.dataIndex))) * n);
238
+ }), B = e(() => new Set(t.rowSelection?.selectedRowKeys ?? S.value)), V = e(() => new Set(t.expandable?.expandedRowKeys ?? C.value)), H = (e) => {
239
+ let n = new Set(e);
240
+ return z.value.filter((e, r) => n.has(h(e, r, t.rowKey)));
241
+ }, U = (e) => t.rowSelection?.getCheckboxProps?.(e) ?? {}, W = (e) => !!U(e).disabled, G = e(() => z.value.map((e, n) => ({
242
+ record: e,
243
+ index: n,
244
+ key: h(e, n, t.rowKey)
245
+ })).filter(({ record: e }) => !W(e))), K = e(() => G.value.map(({ key: e }) => e).filter((e) => B.value.has(e))), q = e(() => G.value.length > 0 && K.value.length === G.value.length), ue = e(() => K.value.length > 0 && !q.value), J = (e, n, r) => {
246
+ t.rowSelection?.selectedRowKeys || (S.value = e), c("update:selectedRowKeys", e), t.rowSelection?.onChange?.(e, n), r?.();
247
+ }, de = (e, n, r) => {
248
+ if (!t.rowSelection || W(e)) return;
249
+ let i = h(e, n, t.rowKey), a = B.value, o = t.rowSelection.type === "radio" ? r ? [i] : [] : r ? [...a, i] : [...a].filter((e) => e !== i), s = H(o);
250
+ J(o, s, () => {
251
+ t.rowSelection?.onSelect?.(e, r, s);
252
+ });
253
+ }, fe = (e) => {
254
+ if (!t.rowSelection || t.rowSelection.type === "radio") return;
255
+ let n = G.value.map(({ key: e }) => e), r = B.value, i = e ? Array.from(new Set([...r, ...n])) : [...r].filter((e) => !n.includes(e)), a = H(i);
256
+ J(i, a, () => {
257
+ t.rowSelection?.onSelectAll?.(e, a, G.value.map(({ record: e }) => e));
258
+ });
259
+ }, pe = (e, n, r) => {
260
+ t.expandable?.expandedRowKeys || (C.value = e), c("update:expandedRowKeys", e), c("expand", r, n), t.expandable?.onChange?.(e), t.expandable?.onExpand?.(r, n);
261
+ }, Y = (e) => t.expandable?.rowExpandable ? t.expandable.rowExpandable(e) : !0, me = (e) => {
262
+ let n = e[t.childrenColumnName];
263
+ return Array.isArray(n) && n.length > 0;
264
+ }, X = (e, t) => {
265
+ if (!M.value && !me(e) || M.value && !Y(e)) return;
266
+ let n = V.value.has(t);
267
+ pe(n ? [...V.value].filter((e) => e !== t) : [...V.value, t], e, !n);
268
+ }, he = () => {
269
+ c("change", L.value, I.value, z.value);
270
+ }, ge = (e, t) => {
271
+ if (!e.sorter) return;
272
+ let n = p(e, t), r = I.value.columnKey === n ? I.value.order : null, i = r === "ascend" ? "descend" : r === "descend" ? null : "ascend", a = {
273
+ column: i ? e : void 0,
274
+ columnKey: n,
275
+ order: i
276
+ };
277
+ x.value = a, c("update:sorter", a), he();
278
+ }, _e = (e, t, n) => {
279
+ let r = p(e, t);
280
+ b.value = {
281
+ ...b.value,
282
+ [r]: n
283
+ }, c("update:filters", b.value), he();
284
+ }, ve = (e, t, n) => {
285
+ let r = m(e, n.dataIndex), i = {
286
+ text: r,
287
+ record: e,
288
+ index: t,
289
+ column: n
290
+ };
291
+ return u.bodyCell ? u.bodyCell(i) : n.customRender ? n.customRender(i) : r;
292
+ }, Z = (e, t, n) => {
293
+ let r = { ...n };
294
+ return t.width !== void 0 && (r.width = v(t.width)), t.fixed === "left" ? (r.position = "sticky", r.left = `${ae.value[e]}px`, r.zIndex = 2) : t.fixed === "right" && (r.position = "sticky", r.right = `${oe.value[e]}px`, r.zIndex = 2), r;
295
+ }, ye = () => {
296
+ if (!j.value) return null;
297
+ let { columnWidth: e, hideSelectAll: r, type: i } = t.rowSelection, a = { width: v(e) };
298
+ return N.value && (a.position = "sticky", a.left = "0px", a.zIndex = 3), n("th", {
299
+ key: "__selection__",
300
+ class: [
301
+ y.e("th"),
302
+ y.e("selection-cell"),
303
+ N.value && y.em("cell", "fixed-left")
304
+ ],
305
+ style: a
306
+ }, i === "radio" || r ? void 0 : n("input", {
307
+ class: [y.e("selection-input"), ue.value && y.em("selection-input", "mixed")],
308
+ type: "checkbox",
309
+ checked: q.value,
310
+ disabled: G.value.length === 0,
311
+ "aria-label": "Select all rows",
312
+ onClick: (e) => e.stopPropagation(),
313
+ onChange: (e) => fe(e.target.checked)
314
+ }));
315
+ }, be = (e, r) => {
316
+ if (!j.value) return null;
317
+ let i = t.rowSelection, a = h(e, r, t.rowKey), o = U(e), s = {};
318
+ return N.value && (s.position = "sticky", s.left = "0px", s.zIndex = 1), n("td", {
319
+ key: "__selection__",
320
+ class: [
321
+ y.e("td"),
322
+ y.e("selection-cell"),
323
+ N.value && y.em("cell", "fixed-left")
324
+ ],
325
+ style: s
326
+ }, n("input", {
327
+ ...o,
328
+ class: y.e("selection-input"),
329
+ type: i.type === "radio" ? "radio" : "checkbox",
330
+ checked: B.value.has(a),
331
+ disabled: o.disabled,
332
+ "aria-label": "Select row",
333
+ onClick: (e) => e.stopPropagation(),
334
+ onChange: (t) => de(e, r, t.target.checked)
335
+ }));
336
+ }, xe = () => {
337
+ if (!M.value) return null;
338
+ let e = { width: v(t.expandable?.columnWidth ?? 48) };
339
+ return P.value && (e.position = "sticky", e.left = `${N.value ? F.value : 0}px`, e.zIndex = 3), n("th", {
340
+ key: "__expand__",
341
+ class: [
342
+ y.e("th"),
343
+ y.e("expand-cell"),
344
+ P.value && y.em("cell", "fixed-left")
345
+ ],
346
+ style: e
347
+ }, "");
348
+ }, Se = (e, t, r) => {
349
+ if (!M.value) return null;
350
+ let i = Y(e), a = V.value.has(r), o = {};
351
+ return P.value && (o.position = "sticky", o.left = `${N.value ? F.value : 0}px`, o.zIndex = 1), n("td", {
352
+ key: "__expand__",
353
+ class: [
354
+ y.e("td"),
355
+ y.e("expand-cell"),
356
+ P.value && y.em("cell", "fixed-left")
357
+ ],
358
+ style: o,
359
+ onClick: (e) => e.stopPropagation()
360
+ }, [i ? n("button", {
361
+ type: "button",
362
+ class: [y.e("expand-icon"), a && y.em("expand-icon", "expanded")],
363
+ "aria-label": a ? "Collapse row" : "Expand row",
364
+ "aria-expanded": a,
365
+ onClick: (t) => {
366
+ t.stopPropagation(), X(e, r);
367
+ }
368
+ }, a ? "−" : "+") : null]);
369
+ }, Ce = (e, t) => {
370
+ if (!e.filters?.length) return null;
371
+ let r = p(e, t), i = L.value[r] ?? [], a = [...e.filterMultiple === !1 ? [n("option", { value: "" }, "All")] : [], ...e.filters.map((e, t) => n("option", {
372
+ key: String(e.value),
373
+ value: String(t)
374
+ }, e.text))];
375
+ return n("select", {
376
+ class: y.e("filter"),
377
+ value: e.filterMultiple === !1 ? i.length ? e.filters.findIndex((e) => e.value === i[0]).toString() : "" : i.map((t) => e.filters.findIndex((e) => e.value === t)).filter((e) => e >= 0).map(String),
378
+ multiple: e.filterMultiple !== !1,
379
+ onClick: (e) => e.stopPropagation(),
380
+ onChange: (n) => {
381
+ let r = n.target;
382
+ _e(e, t, e.filterMultiple === !1 ? r.value === "" ? [] : [e.filters[Number(r.value)].value] : Array.from(r.selectedOptions).map((t) => e.filters[Number(t.value)].value));
383
+ }
384
+ }, a);
385
+ }, we = (e) => !e.children || e.children.length === 0 ? 1 : e.children.reduce((e, t) => e + we(t), 0), Q = (e, t, r, i) => {
386
+ let a = p(e, t), o = I.value.columnKey === a ? I.value.order : null, s = u.headerCell ? u.headerCell({
387
+ column: e,
388
+ index: t
389
+ }) : e.title, c = e.onHeaderCell ? e.onHeaderCell(e) : {};
390
+ return c.colSpan === 0 || c.rowSpan === 0 ? null : n("th", {
391
+ key: a,
392
+ ...i,
393
+ class: [
394
+ y.e("th"),
395
+ e.align && y.em("th", e.align),
396
+ e.sorter && y.em("th", "sortable"),
397
+ o && y.em("th", o),
398
+ e.fixed === "left" && y.em("cell", "fixed-left"),
399
+ e.fixed === "right" && y.em("cell", "fixed-right"),
400
+ c.class
401
+ ],
402
+ style: Z(r, e, c.style),
403
+ rowspan: c.rowSpan ?? i?.rowspan,
404
+ colspan: c.colSpan ?? i?.colspan,
405
+ onClick: () => ge(e, t)
406
+ }, [n("div", { class: y.e("title") }, [n("span", null, s), e.sorter ? n("span", { class: y.e("sorter") }) : null]), Ce(e, t)]);
407
+ }, Te = () => {
408
+ if (!t.showHeader) return null;
409
+ if (!ne.value) return n("thead", {
410
+ class: [y.e("thead"), t.classNames?.header],
411
+ style: t.styles?.header
412
+ }, n("tr", null, [
413
+ ye(),
414
+ xe(),
415
+ ...k.value.map(({ column: e, originalIndex: t }, n) => Q(e, t, n))
416
+ ]));
417
+ let e = D.value, r = /* @__PURE__ */ new Map();
418
+ k.value.forEach(({ column: e }, t) => {
419
+ r.set(e, t);
420
+ });
421
+ let i = /* @__PURE__ */ new Map();
422
+ O.value.forEach((e, t) => {
423
+ i.set(e, t);
424
+ });
425
+ let a = [ye(), xe()], o = [];
426
+ return e.forEach((e, t) => {
427
+ if (e.children && e.children.length > 0) {
428
+ let s = e.onHeaderCell ? e.onHeaderCell(e) : {}, c = we(e);
429
+ a.push(n("th", {
430
+ key: `__group_${t}`,
431
+ class: [
432
+ y.e("th"),
433
+ y.em("th", "group"),
434
+ e.align && y.em("th", e.align),
435
+ e.fixed === "left" && y.em("cell", "fixed-left"),
436
+ e.fixed === "right" && y.em("cell", "fixed-right"),
437
+ s.class
438
+ ],
439
+ style: s.style,
440
+ colspan: c
441
+ }, n("div", { class: y.e("title") }, [n("span", null, e.title)])));
442
+ let l = (e) => !e.children || e.children.length === 0 ? [e] : e.children.flatMap(l);
443
+ l(e).forEach((e) => {
444
+ let t = r.get(e) ?? 0, n = i.get(e) ?? 0;
445
+ o.push(Q(e, n, t));
446
+ });
447
+ } else {
448
+ let t = r.get(e) ?? 0, n = i.get(e) ?? 0;
449
+ a.push(Q(e, n, t, { rowspan: 2 }));
450
+ }
451
+ }), n("thead", {
452
+ class: [y.e("thead"), t.classNames?.header],
453
+ style: t.styles?.header
454
+ }, [n("tr", null, a), n("tr", null, o)]);
455
+ }, Ee = e(() => k.value.length + +!!j.value + +!!M.value), De = () => n("tr", { class: y.e("empty-row") }, [n("td", {
456
+ class: y.e("empty"),
457
+ colspan: Math.max(1, Ee.value)
458
+ }, u.empty ? u.empty() : "No data")]), Oe = (e, r, i) => !M.value || !V.value.has(i) ? null : n("tr", {
459
+ key: `${i}__expanded`,
460
+ class: y.e("expanded-row")
461
+ }, n("td", {
462
+ class: [y.e("td"), y.e("expanded-cell")],
463
+ colspan: Ee.value
464
+ }, t.expandable.expandedRowRender(e, r))), $ = (e, r, i = 0) => {
465
+ let a = h(e, r, t.rowKey), o = e[t.childrenColumnName], s = Array.isArray(o) && o.length > 0, c = s && V.value.has(a), l = k.value.map(({ column: o, originalIndex: l }, u) => {
466
+ let d = o.onCell ? o.onCell(e, r) : {};
467
+ if (d.rowSpan === 0 || d.colSpan === 0) return null;
468
+ let f = u === 0, m = i * t.indentSize, h = ve(e, r, o), g = f && (i > 0 || s) ? n("span", { style: {
469
+ paddingLeft: `${m}px`,
470
+ display: "inline-flex",
471
+ alignItems: "center",
472
+ gap: "4px"
473
+ } }, [s ? n("span", {
474
+ class: [y.e("tree-expand-icon")],
475
+ style: {
476
+ cursor: "pointer",
477
+ userSelect: "none"
478
+ },
479
+ onClick: (t) => {
480
+ t.stopPropagation(), X(e, a);
481
+ }
482
+ }, c ? "−" : "+") : n("span", { style: {
483
+ width: "14px",
484
+ display: "inline-block"
485
+ } }), h]) : h;
486
+ return n("td", {
487
+ key: p(o, l),
488
+ class: [
489
+ y.e("td"),
490
+ o.align && y.em("td", o.align),
491
+ o.fixed === "left" && y.em("cell", "fixed-left"),
492
+ o.fixed === "right" && y.em("cell", "fixed-right"),
493
+ d.class
494
+ ],
495
+ style: Z(u, o, d.style),
496
+ rowspan: d.rowSpan,
497
+ colspan: d.colSpan
498
+ }, g);
499
+ }).filter(Boolean), u = t.expandable?.expandRowByClick ? () => X(e, a) : void 0, d = [n("tr", {
500
+ key: a,
501
+ class: [
502
+ y.e("tr"),
503
+ B.value.has(a) && y.em("tr", "selected"),
504
+ t.classNames?.row
505
+ ],
506
+ style: t.styles?.row,
507
+ onClick: u
508
+ }, [
509
+ be(e, r),
510
+ Se(e, r, a),
511
+ ...l
512
+ ]), Oe(e, r, a)];
513
+ return s && c && o.forEach((e, t) => {
514
+ d.push(...$(e, t, i + 1));
515
+ }), d;
516
+ }, ke = () => E.value ? n("tfoot", { class: y.e("summary") }, [E.value()]) : null, Ae = () => u.default ? n("div", {
517
+ class: y.e("children-collector"),
518
+ style: { display: "none" }
519
+ }, u.default()) : null;
520
+ return () => n("div", {
521
+ class: [se.value, t.classNames?.root],
522
+ style: t.styles?.root
523
+ }, [Ae(), n("div", {
524
+ class: y.e("container"),
525
+ style: ce.value
526
+ }, [n("table", {
527
+ class: y.e("table"),
528
+ style: le.value
529
+ }, [
530
+ Te(),
531
+ n("tbody", {
532
+ class: [y.e("tbody"), t.classNames?.body],
533
+ style: t.styles?.body
534
+ }, z.value.length ? z.value.flatMap((e, t) => $(e, t)) : De()),
535
+ ke()
536
+ ]), t.loading ? n("div", { class: y.e("loading") }, [n("span", { class: y.e("loading-dot") })]) : null])]);
537
+ }
538
+ });
539
+ //#endregion
540
+ //#region ../ccui/ui/table/index.ts
541
+ y.install = function(e) {
542
+ e.component(y.name, y);
543
+ };
544
+ var b = {
545
+ title: "Table 表格",
546
+ category: "数据展示",
547
+ status: "95%",
548
+ install(e) {
549
+ e.component(y.name, y);
550
+ }
551
+ };
552
+ //#endregion
553
+ export { y as Table, b as default };
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function n(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function r(e,t=!1){let r=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>n(r),e:e=>e?n(r,e):``,m:e=>e?n(r,``,e):``,em:(e,t)=>e&&t?n(r,e,t):``,is:e=>`is-${e}`}}var i={columns:{type:Array,default:()=>[]},dataSource:{type:Array,default:()=>[]},rowKey:{type:[String,Function],default:`key`},bordered:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},size:{type:String,default:`default`},rowSelection:{type:Object,default:void 0},expandable:{type:Object,default:void 0},scroll:{type:Object,default:void 0},childrenColumnName:{type:String,default:`children`},indentSize:{type:Number,default:15},classNames:{type:Object,default:void 0},styles:{type:Object,default:void 0}},a=Symbol(`TableColumnsCollector`),o=Symbol(`TableSummaryCollector`);function s(e,t){return e.key?e.key:Array.isArray(e.dataIndex)?e.dataIndex.join(`.`):e.dataIndex||String(t)}function c(e,t){if(t)return(Array.isArray(t)?t:t.split(`.`)).reduce((e,t)=>e?.[t],e)}function l(e,t,n){if(typeof n==`function`)return n(e,t);let r=c(e,n);return typeof r==`string`||typeof r==`number`?r:t}function u(e,t){return e===t?0:e==null?-1:t==null?1:typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function d(e){if(e===void 0)return 0;if(typeof e==`number`)return e;let t=String(e).match(/^([\d.]+)px$/);return t?Number(t[1]):0}function f(e){if(e!==void 0)return typeof e==`number`?`${e}px`:String(e)}var p=(0,t.defineComponent)({name:`CTable`,props:i,emits:[`change`,`update:filters`,`update:sorter`,`update:selectedRowKeys`,`update:expandedRowKeys`,`expand`],setup(e,{emit:n,slots:i}){let p=r(`table`),m=(0,t.ref)({}),h=(0,t.ref)({order:null}),g=(0,t.ref)([]),_=(0,t.ref)([]),v=new Map,y=(0,t.shallowRef)([]),b=()=>{y.value=Array.from(v.values()).sort((e,t)=>e.order-t.order).map(e=>e.column),(0,t.triggerRef)(y)};(0,t.provide)(a,{register(e,t,n){v.set(e,{column:t,order:n}),b()},unregister(e){v.delete(e),b()}});let x=(0,t.shallowRef)(null);(0,t.provide)(o,{setSummary(e){x.value=e}});let S=(0,t.computed)(()=>e.columns&&e.columns.length>0?e.columns:y.value),ee=e=>{let t=[],n=e=>{e.forEach(e=>{e.children&&e.children.length>0?n(e.children):t.push(e)})};return n(e),t},C=(0,t.computed)(()=>ee(S.value)),te=(0,t.computed)(()=>S.value.some(e=>e.children&&e.children.length>0));(0,t.watch)(()=>e.rowSelection,e=>{if(e?.selectedRowKeys){g.value=[...e.selectedRowKeys];return}e?.defaultSelectedRowKeys&&(g.value=[...e.defaultSelectedRowKeys])},{immediate:!0,deep:!0}),(0,t.watch)(()=>e.expandable,t=>{if(t?.expandedRowKeys){_.value=[...t.expandedRowKeys];return}if(t?.defaultExpandAllRows){_.value=e.dataSource.map((t,n)=>l(t,n,e.rowKey));return}t?.defaultExpandedRowKeys&&(_.value=[...t.defaultExpandedRowKeys])},{immediate:!0,deep:!0});let w=(0,t.computed)(()=>{let e=[],t=[],n=[];return C.value.forEach((r,i)=>{r.fixed===`left`?e.push({column:r,originalIndex:i}):r.fixed===`right`?n.push({column:r,originalIndex:i}):t.push({column:r,originalIndex:i})}),[...e,...t,...n]}),T=(0,t.computed)(()=>C.value.some(e=>e.fixed===`left`)),ne=(0,t.computed)(()=>C.value.some(e=>e.fixed===`right`)),E=(0,t.computed)(()=>!!e.rowSelection),D=(0,t.computed)(()=>!!e.expandable?.expandedRowRender),O=(0,t.computed)(()=>E.value&&(e.rowSelection?.fixed||T.value)),k=(0,t.computed)(()=>D.value&&(e.expandable?.fixed||T.value)),A=(0,t.computed)(()=>{if(!E.value)return 0;let t=e.rowSelection?.columnWidth;return d(t===void 0?48:t)}),re=(0,t.computed)(()=>{if(!D.value)return 0;let t=e.expandable?.columnWidth;return d(t===void 0?48:t)}),ie=(0,t.computed)(()=>{let e=[],t=0;return t+=O.value?A.value:0,t+=k.value?re.value:0,w.value.forEach(({column:n})=>{n.fixed===`left`?(e.push(t),t+=d(n.width)):e.push(0)}),e}),ae=(0,t.computed)(()=>{let e=w.value.map(()=>0),t=0;for(let n=w.value.length-1;n>=0;n--){let{column:r}=w.value[n];r.fixed===`right`&&(e[n]=t,t+=d(r.width))}return e}),oe=(0,t.computed)(()=>({[p.b()]:!0,[p.m(e.size)]:e.size!==`default`,[p.m(`bordered`)]:e.bordered,[p.m(`loading`)]:e.loading,[p.m(`has-fixed-left`)]:T.value||O.value||k.value,[p.m(`has-fixed-right`)]:ne.value})),se=(0,t.computed)(()=>{let t={};return e.scroll?.x&&(t.overflowX=`auto`),e.scroll?.y&&(t.maxHeight=f(e.scroll.y),t.overflowY=`auto`),t}),ce=(0,t.computed)(()=>{let t={};return e.scroll?.x&&(t.minWidth=f(e.scroll.x)),t}),j=(0,t.computed)(()=>{let e=C.value.findIndex(e=>e.sortOrder!==void 0);if(e>=0){let t=C.value[e];return{column:t,columnKey:s(t,e),order:t.sortOrder??null}}return h.value}),M=(0,t.computed)(()=>{let e={...m.value};return C.value.forEach((t,n)=>{t.filteredValue!==void 0&&(e[s(t,n)]=t.filteredValue)}),e}),N=(0,t.computed)(()=>e.dataSource.filter(e=>C.value.every((t,n)=>{let r=M.value[s(t,n)];return r?.length?r.includes(c(e,t.dataIndex)):!0}))),P=(0,t.computed)(()=>{let{column:e,order:t}=j.value;if(!e||!t||!e.sorter)return N.value;let n=t===`ascend`?1:-1;return[...N.value].sort((t,r)=>(typeof e.sorter==`function`?e.sorter(t,r):u(c(t,e.dataIndex),c(r,e.dataIndex)))*n)}),F=(0,t.computed)(()=>new Set(e.rowSelection?.selectedRowKeys??g.value)),I=(0,t.computed)(()=>new Set(e.expandable?.expandedRowKeys??_.value)),L=t=>{let n=new Set(t);return P.value.filter((t,r)=>n.has(l(t,r,e.rowKey)))},R=t=>e.rowSelection?.getCheckboxProps?.(t)??{},z=e=>!!R(e).disabled,B=(0,t.computed)(()=>P.value.map((t,n)=>({record:t,index:n,key:l(t,n,e.rowKey)})).filter(({record:e})=>!z(e))),V=(0,t.computed)(()=>B.value.map(({key:e})=>e).filter(e=>F.value.has(e))),H=(0,t.computed)(()=>B.value.length>0&&V.value.length===B.value.length),le=(0,t.computed)(()=>V.value.length>0&&!H.value),U=(t,r,i)=>{e.rowSelection?.selectedRowKeys||(g.value=t),n(`update:selectedRowKeys`,t),e.rowSelection?.onChange?.(t,r),i?.()},ue=(t,n,r)=>{if(!e.rowSelection||z(t))return;let i=l(t,n,e.rowKey),a=F.value,o=e.rowSelection.type===`radio`?r?[i]:[]:r?[...a,i]:[...a].filter(e=>e!==i),s=L(o);U(o,s,()=>{e.rowSelection?.onSelect?.(t,r,s)})},de=t=>{if(!e.rowSelection||e.rowSelection.type===`radio`)return;let n=B.value.map(({key:e})=>e),r=F.value,i=t?Array.from(new Set([...r,...n])):[...r].filter(e=>!n.includes(e)),a=L(i);U(i,a,()=>{e.rowSelection?.onSelectAll?.(t,a,B.value.map(({record:e})=>e))})},fe=(t,r,i)=>{e.expandable?.expandedRowKeys||(_.value=t),n(`update:expandedRowKeys`,t),n(`expand`,i,r),e.expandable?.onChange?.(t),e.expandable?.onExpand?.(i,r)},W=t=>e.expandable?.rowExpandable?e.expandable.rowExpandable(t):!0,pe=t=>{let n=t[e.childrenColumnName];return Array.isArray(n)&&n.length>0},G=(e,t)=>{if(!D.value&&!pe(e)||D.value&&!W(e))return;let n=I.value.has(t);fe(n?[...I.value].filter(e=>e!==t):[...I.value,t],e,!n)},K=()=>{n(`change`,M.value,j.value,P.value)},me=(e,t)=>{if(!e.sorter)return;let r=s(e,t),i=j.value.columnKey===r?j.value.order:null,a=i===`ascend`?`descend`:i===`descend`?null:`ascend`,o={column:a?e:void 0,columnKey:r,order:a};h.value=o,n(`update:sorter`,o),K()},he=(e,t,r)=>{let i=s(e,t);m.value={...m.value,[i]:r},n(`update:filters`,m.value),K()},ge=(e,t,n)=>{let r=c(e,n.dataIndex),a={text:r,record:e,index:t,column:n};return i.bodyCell?i.bodyCell(a):n.customRender?n.customRender(a):r},q=(e,t,n)=>{let r={...n};return t.width!==void 0&&(r.width=f(t.width)),t.fixed===`left`?(r.position=`sticky`,r.left=`${ie.value[e]}px`,r.zIndex=2):t.fixed===`right`&&(r.position=`sticky`,r.right=`${ae.value[e]}px`,r.zIndex=2),r},J=()=>{if(!E.value)return null;let{columnWidth:n,hideSelectAll:r,type:i}=e.rowSelection,a={width:f(n)};return O.value&&(a.position=`sticky`,a.left=`0px`,a.zIndex=3),(0,t.h)(`th`,{key:`__selection__`,class:[p.e(`th`),p.e(`selection-cell`),O.value&&p.em(`cell`,`fixed-left`)],style:a},i===`radio`||r?void 0:(0,t.h)(`input`,{class:[p.e(`selection-input`),le.value&&p.em(`selection-input`,`mixed`)],type:`checkbox`,checked:H.value,disabled:B.value.length===0,"aria-label":`Select all rows`,onClick:e=>e.stopPropagation(),onChange:e=>de(e.target.checked)}))},_e=(n,r)=>{if(!E.value)return null;let i=e.rowSelection,a=l(n,r,e.rowKey),o=R(n),s={};return O.value&&(s.position=`sticky`,s.left=`0px`,s.zIndex=1),(0,t.h)(`td`,{key:`__selection__`,class:[p.e(`td`),p.e(`selection-cell`),O.value&&p.em(`cell`,`fixed-left`)],style:s},(0,t.h)(`input`,{...o,class:p.e(`selection-input`),type:i.type===`radio`?`radio`:`checkbox`,checked:F.value.has(a),disabled:o.disabled,"aria-label":`Select row`,onClick:e=>e.stopPropagation(),onChange:e=>ue(n,r,e.target.checked)}))},Y=()=>{if(!D.value)return null;let n={width:f(e.expandable?.columnWidth??48)};return k.value&&(n.position=`sticky`,n.left=`${O.value?A.value:0}px`,n.zIndex=3),(0,t.h)(`th`,{key:`__expand__`,class:[p.e(`th`),p.e(`expand-cell`),k.value&&p.em(`cell`,`fixed-left`)],style:n},``)},ve=(e,n,r)=>{if(!D.value)return null;let i=W(e),a=I.value.has(r),o={};return k.value&&(o.position=`sticky`,o.left=`${O.value?A.value:0}px`,o.zIndex=1),(0,t.h)(`td`,{key:`__expand__`,class:[p.e(`td`),p.e(`expand-cell`),k.value&&p.em(`cell`,`fixed-left`)],style:o,onClick:e=>e.stopPropagation()},[i?(0,t.h)(`button`,{type:`button`,class:[p.e(`expand-icon`),a&&p.em(`expand-icon`,`expanded`)],"aria-label":a?`Collapse row`:`Expand row`,"aria-expanded":a,onClick:t=>{t.stopPropagation(),G(e,r)}},a?`−`:`+`):null])},ye=(e,n)=>{if(!e.filters?.length)return null;let r=s(e,n),i=M.value[r]??[],a=[...e.filterMultiple===!1?[(0,t.h)(`option`,{value:``},`All`)]:[],...e.filters.map((e,n)=>(0,t.h)(`option`,{key:String(e.value),value:String(n)},e.text))];return(0,t.h)(`select`,{class:p.e(`filter`),value:e.filterMultiple===!1?i.length?e.filters.findIndex(e=>e.value===i[0]).toString():``:i.map(t=>e.filters.findIndex(e=>e.value===t)).filter(e=>e>=0).map(String),multiple:e.filterMultiple!==!1,onClick:e=>e.stopPropagation(),onChange:t=>{let r=t.target;he(e,n,e.filterMultiple===!1?r.value===``?[]:[e.filters[Number(r.value)].value]:Array.from(r.selectedOptions).map(t=>e.filters[Number(t.value)].value))}},a)},X=e=>!e.children||e.children.length===0?1:e.children.reduce((e,t)=>e+X(t),0),Z=(e,n,r,a)=>{let o=s(e,n),c=j.value.columnKey===o?j.value.order:null,l=i.headerCell?i.headerCell({column:e,index:n}):e.title,u=e.onHeaderCell?e.onHeaderCell(e):{};return u.colSpan===0||u.rowSpan===0?null:(0,t.h)(`th`,{key:o,...a,class:[p.e(`th`),e.align&&p.em(`th`,e.align),e.sorter&&p.em(`th`,`sortable`),c&&p.em(`th`,c),e.fixed===`left`&&p.em(`cell`,`fixed-left`),e.fixed===`right`&&p.em(`cell`,`fixed-right`),u.class],style:q(r,e,u.style),rowspan:u.rowSpan??a?.rowspan,colspan:u.colSpan??a?.colspan,onClick:()=>me(e,n)},[(0,t.h)(`div`,{class:p.e(`title`)},[(0,t.h)(`span`,null,l),e.sorter?(0,t.h)(`span`,{class:p.e(`sorter`)}):null]),ye(e,n)])},be=()=>{if(!e.showHeader)return null;if(!te.value)return(0,t.h)(`thead`,{class:[p.e(`thead`),e.classNames?.header],style:e.styles?.header},(0,t.h)(`tr`,null,[J(),Y(),...w.value.map(({column:e,originalIndex:t},n)=>Z(e,t,n))]));let n=S.value,r=new Map;w.value.forEach(({column:e},t)=>{r.set(e,t)});let i=new Map;C.value.forEach((e,t)=>{i.set(e,t)});let a=[J(),Y()],o=[];return n.forEach((e,n)=>{if(e.children&&e.children.length>0){let s=e.onHeaderCell?e.onHeaderCell(e):{},c=X(e);a.push((0,t.h)(`th`,{key:`__group_${n}`,class:[p.e(`th`),p.em(`th`,`group`),e.align&&p.em(`th`,e.align),e.fixed===`left`&&p.em(`cell`,`fixed-left`),e.fixed===`right`&&p.em(`cell`,`fixed-right`),s.class],style:s.style,colspan:c},(0,t.h)(`div`,{class:p.e(`title`)},[(0,t.h)(`span`,null,e.title)])));let l=e=>!e.children||e.children.length===0?[e]:e.children.flatMap(l);l(e).forEach(e=>{let t=r.get(e)??0,n=i.get(e)??0;o.push(Z(e,n,t))})}else{let t=r.get(e)??0,n=i.get(e)??0;a.push(Z(e,n,t,{rowspan:2}))}}),(0,t.h)(`thead`,{class:[p.e(`thead`),e.classNames?.header],style:e.styles?.header},[(0,t.h)(`tr`,null,a),(0,t.h)(`tr`,null,o)])},Q=(0,t.computed)(()=>w.value.length+ +!!E.value+ +!!D.value),xe=()=>(0,t.h)(`tr`,{class:p.e(`empty-row`)},[(0,t.h)(`td`,{class:p.e(`empty`),colspan:Math.max(1,Q.value)},i.empty?i.empty():`No data`)]),Se=(n,r,i)=>!D.value||!I.value.has(i)?null:(0,t.h)(`tr`,{key:`${i}__expanded`,class:p.e(`expanded-row`)},(0,t.h)(`td`,{class:[p.e(`td`),p.e(`expanded-cell`)],colspan:Q.value},e.expandable.expandedRowRender(n,r))),$=(n,r,i=0)=>{let a=l(n,r,e.rowKey),o=n[e.childrenColumnName],c=Array.isArray(o)&&o.length>0,u=c&&I.value.has(a),d=w.value.map(({column:o,originalIndex:l},d)=>{let f=o.onCell?o.onCell(n,r):{};if(f.rowSpan===0||f.colSpan===0)return null;let m=d===0,h=i*e.indentSize,g=ge(n,r,o),_=m&&(i>0||c)?(0,t.h)(`span`,{style:{paddingLeft:`${h}px`,display:`inline-flex`,alignItems:`center`,gap:`4px`}},[c?(0,t.h)(`span`,{class:[p.e(`tree-expand-icon`)],style:{cursor:`pointer`,userSelect:`none`},onClick:e=>{e.stopPropagation(),G(n,a)}},u?`−`:`+`):(0,t.h)(`span`,{style:{width:`14px`,display:`inline-block`}}),g]):g;return(0,t.h)(`td`,{key:s(o,l),class:[p.e(`td`),o.align&&p.em(`td`,o.align),o.fixed===`left`&&p.em(`cell`,`fixed-left`),o.fixed===`right`&&p.em(`cell`,`fixed-right`),f.class],style:q(d,o,f.style),rowspan:f.rowSpan,colspan:f.colSpan},_)}).filter(Boolean),f=e.expandable?.expandRowByClick?()=>G(n,a):void 0,m=[(0,t.h)(`tr`,{key:a,class:[p.e(`tr`),F.value.has(a)&&p.em(`tr`,`selected`),e.classNames?.row],style:e.styles?.row,onClick:f},[_e(n,r),ve(n,r,a),...d]),Se(n,r,a)];return c&&u&&o.forEach((e,t)=>{m.push(...$(e,t,i+1))}),m},Ce=()=>x.value?(0,t.h)(`tfoot`,{class:p.e(`summary`)},[x.value()]):null,we=()=>i.default?(0,t.h)(`div`,{class:p.e(`children-collector`),style:{display:`none`}},i.default()):null;return()=>(0,t.h)(`div`,{class:[oe.value,e.classNames?.root],style:e.styles?.root},[we(),(0,t.h)(`div`,{class:p.e(`container`),style:se.value},[(0,t.h)(`table`,{class:p.e(`table`),style:ce.value},[be(),(0,t.h)(`tbody`,{class:[p.e(`tbody`),e.classNames?.body],style:e.styles?.body},P.value.length?P.value.flatMap((e,t)=>$(e,t)):xe()),Ce()]),e.loading?(0,t.h)(`div`,{class:p.e(`loading`)},[(0,t.h)(`span`,{class:p.e(`loading-dot`)})]):null])])}});p.install=function(e){e.component(p.name,p)},e.Table=p,e.default={title:`Table 表格`,category:`数据展示`,status:`95%`,install(e){e.component(p.name,p)}}});
@@ -0,0 +1,2 @@
1
+ .ccui-tab{padding:4px;position:relative;overflow:hidden}.ccui-tabs .ccui-tabs-nav--top,.ccui-tabs .ccui-tabs-nav--bottom{align-items:center;display:flex;position:relative}.ccui-tabs .ccui-tabs-nav--top:after,.ccui-tabs .ccui-tabs-nav--bottom:after{content:"";background-color:var(--ccui-color-border-secondary,#f0f0f0);position:absolute}.ccui-tabs .ccui-tabs-nav--top,.ccui-tabs .ccui-tabs-nav--bottom{gap:32px}.ccui-tabs .ccui-tabs-nav--top:after,.ccui-tabs .ccui-tabs-nav--bottom:after{width:100%;height:1px;left:0}.ccui-tabs .ccui-tabs-nav--top-item,.ccui-tabs .ccui-tabs-nav--bottom-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav--top-item:hover,.ccui-tabs .ccui-tabs-nav--bottom-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav--top-item,.ccui-tabs .ccui-tabs-nav--bottom-item{border-bottom:2px solid #0000;position:relative}.ccui-tabs .ccui-tabs-nav--top-item-active,.ccui-tabs .ccui-tabs-nav--bottom-item-active{color:var(--ccui-color-primary,#1677ff);border-bottom-color:var(--ccui-color-primary,#1677ff);font-weight:500}.ccui-tabs .ccui-tabs-nav--top:after{bottom:0}.ccui-tabs .ccui-tabs-nav--bottom:after{top:0}.ccui-tabs .ccui-tabs-nav--left,.ccui-tabs .ccui-tabs-nav--right{flex-direction:column;gap:8px;height:100%;display:flex;position:relative}.ccui-tabs .ccui-tabs-nav--left:after,.ccui-tabs .ccui-tabs-nav--right:after{content:"";background-color:var(--ccui-color-border-secondary,#f0f0f0);width:1px;height:100%;position:absolute;top:0}.ccui-tabs .ccui-tabs-nav--left-item,.ccui-tabs .ccui-tabs-nav--right-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav--left-item:hover,.ccui-tabs .ccui-tabs-nav--right-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav--left-item,.ccui-tabs .ccui-tabs-nav--right-item{border-right:2px solid #0000;padding:8px 24px}.ccui-tabs .ccui-tabs-nav--left-item-active,.ccui-tabs .ccui-tabs-nav--right-item-active{color:var(--ccui-color-primary,#1677ff);font-weight:500}.ccui-tabs .ccui-tabs-nav--left:after{right:0}.ccui-tabs .ccui-tabs-nav--left-item{text-align:end;border-right:2px solid #0000}.ccui-tabs .ccui-tabs-nav--left-item-active{border-right-color:var(--ccui-color-primary,#1677ff)}.ccui-tabs .ccui-tabs-nav--right:after{left:0}.ccui-tabs .ccui-tabs-nav--right-item{text-align:start;border-left:2px solid #0000}.ccui-tabs .ccui-tabs-nav--right-item-active{border-left-color:var(--ccui-color-primary,#1677ff)}.ccui-tabs .ccui-tabs-nav-card--top,.ccui-tabs .ccui-tabs-nav-card--bottom{gap:2px;display:flex;position:relative}.ccui-tabs .ccui-tabs-nav-card--top:after,.ccui-tabs .ccui-tabs-nav-card--bottom:after{content:"";background-color:var(--ccui-color-border-secondary,#f0f0f0);width:100%;height:1px;position:absolute;bottom:0;left:0}.ccui-tabs .ccui-tabs-nav-card--top-item,.ccui-tabs .ccui-tabs-nav-card--bottom-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav-card--top-item:hover,.ccui-tabs .ccui-tabs-nav-card--bottom-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav-card--top-item,.ccui-tabs .ccui-tabs-nav-card--bottom-item{background-color:var(--ccui-color-fill-quaternary,#00000005);border:1px solid var(--ccui-color-border-secondary,#f0f0f0);border-radius:var(--ccui-border-radius,6px) var(--ccui-border-radius,6px) 0 0;padding:6px 16px}.ccui-tabs .ccui-tabs-nav-card--top-item-active,.ccui-tabs .ccui-tabs-nav-card--bottom-item-active{color:var(--ccui-color-primary,#1677ff);background-color:var(--ccui-color-bg-container,#fff);border-color:var(--ccui-color-border-secondary,#f0f0f0);border-bottom-color:var(--ccui-color-bg-container,#fff);font-weight:500}.ccui-tabs .ccui-tabs-nav-card--bottom:after{top:0;bottom:auto}.ccui-tabs .ccui-tabs-nav-card--bottom-item{border-radius:0 0 var(--ccui-border-radius,6px) var(--ccui-border-radius,6px)}.ccui-tabs .ccui-tabs-nav-card--bottom-item-active{border-top-color:var(--ccui-color-bg-container,#fff);border-bottom-color:var(--ccui-color-border-secondary,#f0f0f0)}.ccui-tabs .ccui-tabs-nav-card--left,.ccui-tabs .ccui-tabs-nav-card--right{flex-direction:column;gap:2px;height:100%;display:flex;position:relative}.ccui-tabs .ccui-tabs-nav-card--left-item,.ccui-tabs .ccui-tabs-nav-card--right-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav-card--left-item:hover,.ccui-tabs .ccui-tabs-nav-card--right-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav-card--left-item,.ccui-tabs .ccui-tabs-nav-card--right-item{background-color:var(--ccui-color-fill-quaternary,#00000005);border:1px solid var(--ccui-color-border-secondary,#f0f0f0);padding:6px 16px}.ccui-tabs .ccui-tabs-nav-card--left-item-active,.ccui-tabs .ccui-tabs-nav-card--right-item-active{color:var(--ccui-color-primary,#1677ff);background-color:var(--ccui-color-bg-container,#fff);font-weight:500}.ccui-tabs .ccui-tabs-nav-card--left-item{border-radius:var(--ccui-border-radius,6px) 0 0 var(--ccui-border-radius,6px)}.ccui-tabs .ccui-tabs-nav-card--right-item{border-radius:0 var(--ccui-border-radius,6px) var(--ccui-border-radius,6px) 0}.ccui-tabs .ccui-tabs-nav-border-card--top,.ccui-tabs .ccui-tabs-nav-border-card--bottom{background-color:var(--ccui-color-fill-quaternary,#00000005);border:1px solid var(--ccui-color-border-secondary,#f0f0f0);display:flex;position:relative}.ccui-tabs .ccui-tabs-nav-border-card--top-item,.ccui-tabs .ccui-tabs-nav-border-card--bottom-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav-border-card--top-item:hover,.ccui-tabs .ccui-tabs-nav-border-card--bottom-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav-border-card--top-item,.ccui-tabs .ccui-tabs-nav-border-card--bottom-item{border-right:1px solid var(--ccui-color-border-secondary,#f0f0f0);padding:8px 16px}.ccui-tabs .ccui-tabs-nav-border-card--top-item:last-of-type,.ccui-tabs .ccui-tabs-nav-border-card--bottom-item:last-of-type{border-right:none}.ccui-tabs .ccui-tabs-nav-border-card--top-item-active,.ccui-tabs .ccui-tabs-nav-border-card--bottom-item-active{color:var(--ccui-color-primary,#1677ff);background-color:var(--ccui-color-bg-container,#fff);font-weight:500}.ccui-tabs .ccui-tabs-nav-border-card--top{border-bottom:1px solid #0000;margin-bottom:-1px}.ccui-tabs .ccui-tabs-nav-border-card--bottom{border-top:1px solid #0000;margin-top:-1px}.ccui-tabs .ccui-tabs-nav-border-card--left,.ccui-tabs .ccui-tabs-nav-border-card--right{background-color:var(--ccui-color-fill-quaternary,#00000005);border:1px solid var(--ccui-color-border-secondary,#f0f0f0);flex-direction:column;height:100%;display:flex;position:relative}.ccui-tabs .ccui-tabs-nav-border-card--left-item,.ccui-tabs .ccui-tabs-nav-border-card--right-item{font-size:var(--ccui-font-size,14px);line-height:var(--ccui-line-height-base,1.57143);color:var(--ccui-color-text,#000000e0);cursor:pointer;transition:color var(--ccui-motion-duration-mid,.2s), border-color var(--ccui-motion-duration-mid,.2s);margin:0;padding:12px 0}.ccui-tabs .ccui-tabs-nav-border-card--left-item:hover,.ccui-tabs .ccui-tabs-nav-border-card--right-item:hover{color:var(--ccui-color-primary-hover,#4096ff)}.ccui-tabs .ccui-tabs-nav-border-card--left-item,.ccui-tabs .ccui-tabs-nav-border-card--right-item{border-bottom:1px solid var(--ccui-color-border-secondary,#f0f0f0);padding:8px 16px}.ccui-tabs .ccui-tabs-nav-border-card--left-item:last-of-type,.ccui-tabs .ccui-tabs-nav-border-card--right-item:last-of-type{border-bottom:none}.ccui-tabs .ccui-tabs-nav-border-card--left-item-active,.ccui-tabs .ccui-tabs-nav-border-card--right-item-active{color:var(--ccui-color-primary,#1677ff);background-color:var(--ccui-color-bg-container,#fff);font-weight:500}:root{--ccui-global-bg:#f5f5f5;--ccui-global-bg-normal:#fff;--ccui-base-bg:#fff;--ccui-base-bg-dark:#000000d9;--ccui-brand:#1677ff;--ccui-brand-foil:#e6f4ff;--ccui-brand-hover:#4096ff;--ccui-brand-active:#0958d9;--ccui-brand-active-focus:#003eb3;--ccui-contrast:#ff4d4f;--ccui-text:#000000e0;--ccui-text-weak:#000000a6;--ccui-aide-text:#00000073;--ccui-aide-text-stress:#000000a6;--ccui-placeholder:#00000040;--ccui-light-text:#fff;--ccui-dark-text:#000000e0;--ccui-link:#1677ff;--ccui-link-active:#0958d9;--ccui-link-light:#4096ff;--ccui-link-light-active:#69b1ff;--ccui-line:#d9d9d9;--ccui-dividing-line:#f0f0f0;--ccui-block:#fff;--ccui-area:#fafafa;--ccui-danger:#ff4d4f;--ccui-warning:#faad14;--ccui-waiting:#00000073;--ccui-success:#52c41a;--ccui-info:#1677ff;--ccui-initial:#e6f4ff;--ccui-unavailable:#f5f5f5;--ccui-shadow:#00000026;--ccui-light-shadow:#0000000f;--ccui-icon-text:#000000e0;--ccui-icon-bg:#fff;--ccui-icon-fill:#00000073;--ccui-icon-fill-hover:#000000a6;--ccui-icon-fill-active:#1677ff;--ccui-icon-fill-active-hover:#4096ff;--ccui-form-control-line:#d9d9d9;--ccui-form-control-line-hover:#4096ff;--ccui-form-control-line-active:#1677ff;--ccui-form-control-line-active-hover:#0958d9;--ccui-list-item-active-bg:#1677ff;--ccui-list-item-active-text:#fff;--ccui-list-item-active-hover-bg:#4096ff;--ccui-list-item-hover-bg:#0000000a;--ccui-list-item-hover-text:#1677ff;--ccui-list-item-selected-bg:#e6f4ff;--ccui-list-item-strip-bg:#fafafa;--ccui-disabled-bg:#0000000a;--ccui-disabled-line:#d9d9d9;--ccui-disabled-text:#00000040;--ccui-primary-disabled:#91caff;--ccui-icon-fill-active-disabled:#91caff;--ccui-label-bg:#fafafa;--ccui-connected-overlay-bg:#fff;--ccui-connected-overlay-line:#1677ff;--ccui-fullscreen-overlay-bg:#fff;--ccui-feedback-overlay-bg:#000000d9;--ccui-feedback-overlay-text:#fff;--ccui-embed-search-bg:#fafafa;--ccui-embed-search-bg-hover:#f0f0f0;--ccui-float-block-shadow:#1677ff29;--ccui-highlight-overlay:#fffc;--ccui-range-item-hover-bg:#e6f4ff;--ccui-primary:#1677ff;--ccui-primary-hover:#4096ff;--ccui-primary-active:#0958d9;--ccui-contrast-hover:#ff7875;--ccui-contrast-active:#d9363e;--ccui-secondary:#000000a6;--ccui-danger-line:#ffccc7;--ccui-danger-bg:#fff2f0;--ccui-warning-line:#ffe58f;--ccui-warning-bg:#fffbe6;--ccui-info-line:#91caff;--ccui-info-bg:#e6f4ff;--ccui-success-line:#b7eb8f;--ccui-success-bg:#f6ffed;--ccui-primary-line:#91caff;--ccui-primary-bg:#e6f4ff;--ccui-default-line:#d9d9d9;--ccui-default-bg:#fff;--ccui-font-size:14px;--ccui-font-size-card-title:16px;--ccui-font-size-page-title:20px;--ccui-font-size-modal-title:16px;--ccui-font-size-price:24px;--ccui-font-size-data-overview:30px;--ccui-font-size-icon:16px;--ccui-font-size-sm:12px;--ccui-font-size-md:14px;--ccui-font-size-lg:16px;--ccui-font-title-weight:600;--ccui-font-content-weight:400;--ccui-line-height-base:1.57143;--ccui-border-radius:6px;--ccui-border-radius-feedback:8px;--ccui-border-radius-card:8px;--ccui-shadow-length-base:0 1px 2px 0;--ccui-shadow-length-slide-left:-6px 0 16px 0;--ccui-shadow-length-slide-right:6px 0 16px 0;--ccui-shadow-length-connected-overlay:0 6px 16px 0;--ccui-shadow-length-hover:0 6px 16px 0;--ccui-shadow-length-feedback-overlay:0 6px 16px 0;--ccui-shadow-fullscreen-overlay:0 6px 16px 0;--ccui-animation-duration-slow:.3s;--ccui-animation-duration-base:.2s;--ccui-animation-duration-fast:.1s;--ccui-animation-ease-in:cubic-bezier(.7, 0, .84, 0);--ccui-animation-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-animation-ease-in-out:cubic-bezier(.78, .14, .15, .86);--ccui-animation-ease-in-smooth:cubic-bezier(.645, .045, .355, 1);--ccui-animation-linear:cubic-bezier(0, 0, 1, 1);--ccui-z-index-full-page-overlay:1080;--ccui-z-index-pop-up:1060;--ccui-z-index-dropdown:1052;--ccui-z-index-modal:1050;--ccui-z-index-drawer:1040;--ccui-z-index-framework:1000;--ccui-size-sm:24px;--ccui-size-md:32px;--ccui-size-lg:40px;--ccui-color-primary:#1677ff;--ccui-color-primary-hover:#4096ff;--ccui-color-primary-active:#0958d9;--ccui-color-primary-bg:#e6f4ff;--ccui-color-primary-bg-hover:#bae0ff;--ccui-color-primary-border:#91caff;--ccui-color-primary-border-hover:#69b1ff;--ccui-color-success:#52c41a;--ccui-color-success-hover:#73d13d;--ccui-color-success-active:#389e0d;--ccui-color-success-bg:#f6ffed;--ccui-color-success-border:#b7eb8f;--ccui-color-warning:#faad14;--ccui-color-warning-hover:#ffc53d;--ccui-color-warning-active:#d48806;--ccui-color-warning-bg:#fffbe6;--ccui-color-warning-border:#ffe58f;--ccui-color-error:#ff4d4f;--ccui-color-error-hover:#ff7875;--ccui-color-error-active:#d9363e;--ccui-color-error-bg:#fff2f0;--ccui-color-error-border:#ffccc7;--ccui-color-info:#1677ff;--ccui-color-info-hover:#4096ff;--ccui-color-info-bg:#e6f4ff;--ccui-color-info-border:#91caff;--ccui-color-text:#000000e0;--ccui-color-text-secondary:#000000a6;--ccui-color-text-tertiary:#00000073;--ccui-color-text-quaternary:#00000040;--ccui-color-text-disabled:#00000040;--ccui-color-text-placeholder:#00000040;--ccui-color-text-heading:#000000e0;--ccui-color-text-light-solid:#fff;--ccui-color-bg-base:#fff;--ccui-color-bg-container:#fff;--ccui-color-bg-elevated:#fff;--ccui-color-bg-layout:#f5f5f5;--ccui-color-bg-spotlight:#000000d9;--ccui-color-bg-mask:#00000073;--ccui-color-bg-text-hover:#0000000f;--ccui-color-bg-text-active:#00000026;--ccui-color-border:#d9d9d9;--ccui-color-border-secondary:#f0f0f0;--ccui-color-border-disabled:#0000000a;--ccui-color-split:#0505050f;--ccui-color-fill:#00000026;--ccui-color-fill-secondary:#0000000f;--ccui-color-fill-tertiary:#0000000a;--ccui-color-fill-quaternary:#00000005;--ccui-control-outline:#0591ff1a;--ccui-control-outline-error:#ff26050f;--ccui-control-outline-warning:#ffd7051a;--ccui-red-1:#fff1f0;--ccui-red-2:#ffccc7;--ccui-red-3:#ffa39e;--ccui-red-4:#ff7875;--ccui-red-5:#ff4d4f;--ccui-red-6:#f5222d;--ccui-red-7:#cf1322;--ccui-red-8:#a8071a;--ccui-red-9:#820014;--ccui-red-10:#5c0011;--ccui-volcano-1:#fff2e8;--ccui-volcano-2:#ffd8bf;--ccui-volcano-3:#ffbb96;--ccui-volcano-4:#ff9c6e;--ccui-volcano-5:#ff7a45;--ccui-volcano-6:#fa541c;--ccui-volcano-7:#d4380d;--ccui-volcano-8:#ad2102;--ccui-volcano-9:#871400;--ccui-volcano-10:#610b00;--ccui-orange-1:#fff7e6;--ccui-orange-2:#ffe7ba;--ccui-orange-3:#ffd591;--ccui-orange-4:#ffc069;--ccui-orange-5:#ffa940;--ccui-orange-6:#fa8c16;--ccui-orange-7:#d46b08;--ccui-orange-8:#ad4e00;--ccui-orange-9:#873800;--ccui-orange-10:#612500;--ccui-gold-1:#fffbe6;--ccui-gold-2:#fff1b8;--ccui-gold-3:#ffe58f;--ccui-gold-4:#ffd666;--ccui-gold-5:#ffc53d;--ccui-gold-6:#faad14;--ccui-gold-7:#d48806;--ccui-gold-8:#ad6800;--ccui-gold-9:#874d00;--ccui-gold-10:#613400;--ccui-yellow-1:#feffe6;--ccui-yellow-2:#ffffb8;--ccui-yellow-3:#fffb8f;--ccui-yellow-4:#fff566;--ccui-yellow-5:#ffec3d;--ccui-yellow-6:#fadb14;--ccui-yellow-7:#d4b106;--ccui-yellow-8:#ad8b00;--ccui-yellow-9:#876800;--ccui-yellow-10:#614700;--ccui-lime-1:#fcffe6;--ccui-lime-2:#f4ffb8;--ccui-lime-3:#eaff8f;--ccui-lime-4:#d3f261;--ccui-lime-5:#bae637;--ccui-lime-6:#a0d911;--ccui-lime-7:#7cb305;--ccui-lime-8:#5b8c00;--ccui-lime-9:#3f6600;--ccui-lime-10:#254000;--ccui-green-1:#f6ffed;--ccui-green-2:#d9f7be;--ccui-green-3:#b7eb8f;--ccui-green-4:#95de64;--ccui-green-5:#73d13d;--ccui-green-6:#52c41a;--ccui-green-7:#389e0d;--ccui-green-8:#237804;--ccui-green-9:#135200;--ccui-green-10:#092b00;--ccui-cyan-1:#e6fffb;--ccui-cyan-2:#b5f5ec;--ccui-cyan-3:#87e8de;--ccui-cyan-4:#5cdbd3;--ccui-cyan-5:#36cfc9;--ccui-cyan-6:#13c2c2;--ccui-cyan-7:#08979c;--ccui-cyan-8:#006d75;--ccui-cyan-9:#00474f;--ccui-cyan-10:#002329;--ccui-blue-1:#e6f4ff;--ccui-blue-2:#bae0ff;--ccui-blue-3:#91caff;--ccui-blue-4:#69b1ff;--ccui-blue-5:#4096ff;--ccui-blue-6:#1677ff;--ccui-blue-7:#0958d9;--ccui-blue-8:#003eb3;--ccui-blue-9:#002c8c;--ccui-blue-10:#001d66;--ccui-geekblue-1:#f0f5ff;--ccui-geekblue-2:#d6e4ff;--ccui-geekblue-3:#adc6ff;--ccui-geekblue-4:#85a5ff;--ccui-geekblue-5:#597ef7;--ccui-geekblue-6:#2f54eb;--ccui-geekblue-7:#1d39c4;--ccui-geekblue-8:#10239e;--ccui-geekblue-9:#061178;--ccui-geekblue-10:#030852;--ccui-purple-1:#f9f0ff;--ccui-purple-2:#efdbff;--ccui-purple-3:#d3adf7;--ccui-purple-4:#b37feb;--ccui-purple-5:#9254de;--ccui-purple-6:#722ed1;--ccui-purple-7:#531dab;--ccui-purple-8:#391085;--ccui-purple-9:#22075e;--ccui-purple-10:#120338;--ccui-magenta-1:#fff0f6;--ccui-magenta-2:#ffd6e7;--ccui-magenta-3:#ffadd2;--ccui-magenta-4:#ff85c0;--ccui-magenta-5:#f759ab;--ccui-magenta-6:#eb2f96;--ccui-magenta-7:#c41d7f;--ccui-magenta-8:#9e1068;--ccui-magenta-9:#780650;--ccui-magenta-10:#520339;--ccui-pink-1:#fff0f6;--ccui-pink-6:#eb2f96;--ccui-border-radius-lg:8px;--ccui-border-radius-sm:4px;--ccui-border-radius-xs:2px;--ccui-border-radius-outer:4px;--ccui-font-size-xl:20px;--ccui-font-size-heading-1:38px;--ccui-font-size-heading-2:30px;--ccui-font-size-heading-3:24px;--ccui-font-size-heading-4:20px;--ccui-font-size-heading-5:16px;--ccui-line-height-lg:1.5;--ccui-line-height-sm:1.66;--ccui-line-height-heading-1:1.21052;--ccui-line-height-heading-2:1.26666;--ccui-line-height-heading-3:1.33333;--ccui-line-height-heading-4:1.4;--ccui-line-height-heading-5:1.5;--ccui-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ccui-font-family-code:SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;--ccui-control-height:32px;--ccui-control-height-sm:24px;--ccui-control-height-lg:40px;--ccui-control-height-xs:16px;--ccui-box-shadow:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-secondary:0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;--ccui-box-shadow-tertiary:0 1px 2px 0 #00000008, 0 1px 6px -1px #00000005, 0 2px 4px 0 #00000005;--ccui-motion-duration-slow:.3s;--ccui-motion-duration-mid:.2s;--ccui-motion-duration-fast:.1s;--ccui-motion-ease-in-out:cubic-bezier(.645, .045, .355, 1);--ccui-motion-ease-out:cubic-bezier(.215, .61, .355, 1);--ccui-motion-ease-in:cubic-bezier(.55, .055, .675, .19);--ccui-motion-ease-out-back:cubic-bezier(.12, .4, .29, 1.46);--ccui-motion-ease-in-back:cubic-bezier(.71, -.46, .88, .6);--ccui-motion-ease-out-circ:cubic-bezier(.08, .82, .17, 1);--ccui-motion-ease-in-out-circ:cubic-bezier(.78, .14, .15, .86);--ccui-padding-xxs:4px;--ccui-padding-xs:8px;--ccui-padding-sm:12px;--ccui-padding:16px;--ccui-padding-md:20px;--ccui-padding-lg:24px;--ccui-padding-xl:32px;--ccui-margin-xxs:4px;--ccui-margin-xs:8px;--ccui-margin-sm:12px;--ccui-margin:16px;--ccui-margin-md:20px;--ccui-margin-lg:24px;--ccui-margin-xl:32px}.ccui-tabs{width:100%;font-size:var(--ccui-font-size,14px);color:var(--ccui-color-text,#000000e0);flex-direction:column;display:flex}.ccui-tabs__content{padding-top:16px}
2
+ /*$vite$:1*/