@campus-admin/ui 1.0.0 → 2.0.1

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 (129) hide show
  1. package/README.md +138 -335
  2. package/dist/campus/card/index.d.ts +9 -0
  3. package/dist/campus/index.d.ts +7 -0
  4. package/dist/campus/parent/index.d.ts +9 -0
  5. package/dist/campus/student/index.d.ts +9 -0
  6. package/dist/campus/teacher/index.d.ts +9 -0
  7. package/dist/campus/tel/index.d.ts +9 -0
  8. package/dist/{base/empty/src/empty.vue.d.ts → components/basic/CaIcon.vue.d.ts} +4 -7
  9. package/dist/components/basic/CaPageActions.vue.d.ts +15 -0
  10. package/dist/components/basic/icons.d.ts +48 -0
  11. package/dist/components/basic/index.d.ts +838 -0
  12. package/dist/components/button/index.d.ts +348 -0
  13. package/dist/components/chart/bar-chart/CaBarChart.vue.d.ts +31 -0
  14. package/dist/components/chart/chart-math.d.ts +178 -0
  15. package/dist/components/chart/gauge/CaGauge.vue.d.ts +31 -0
  16. package/dist/components/chart/index.d.ts +195 -0
  17. package/dist/components/chart/line-chart/CaLineChart.vue.d.ts +40 -0
  18. package/dist/components/chart/parts/ChartLegend.vue.d.ts +28 -0
  19. package/dist/{atom/slogan/src/slogan.vue.d.ts → components/chart/parts/ChartStatus.vue.d.ts} +3 -5
  20. package/dist/components/chart/parts/ChartTable.vue.d.ts +19 -0
  21. package/dist/components/chart/parts/ChartTooltip.vue.d.ts +23 -0
  22. package/dist/components/chart/pie-chart/CaPieChart.vue.d.ts +25 -0
  23. package/dist/components/chart/sparkline/CaSparkline.vue.d.ts +20 -0
  24. package/dist/components/chart/use-chart.d.ts +36 -0
  25. package/dist/components/config/CaConfigProvider.vue.d.ts +16 -0
  26. package/dist/components/config/index.d.ts +33 -0
  27. package/dist/components/display/index.d.ts +99 -0
  28. package/dist/{base/copyright/src/copyright.vue.d.ts → components/display/stat-card/CaStatCard.vue.d.ts} +7 -11
  29. package/dist/{base/skeleton/src/skeleton.vue.d.ts → components/display/status-tag/CaStatusTag.vue.d.ts} +4 -7
  30. package/dist/components/display/types.d.ts +7 -0
  31. package/dist/components/form/index.d.ts +112 -0
  32. package/dist/components/form/schema-form/CaSchemaForm.vue.d.ts +31 -0
  33. package/dist/components/form/types.d.ts +17 -0
  34. package/dist/components/index.d.ts +22 -0
  35. package/dist/components/layout/index.d.ts +34 -0
  36. package/dist/components/navigation/CaMenu.vue.d.ts +13 -0
  37. package/dist/components/navigation/index.d.ts +64 -0
  38. package/dist/components/overlay/index.d.ts +1511 -0
  39. package/dist/components/table/data-table/CaDataTable.vue.d.ts +49 -0
  40. package/dist/components/table/index.d.ts +33 -0
  41. package/dist/components/table/types.d.ts +46 -0
  42. package/dist/index.d.ts +21 -1106
  43. package/dist/index.js +2187 -0
  44. package/dist/oms/index.d.ts +3 -0
  45. package/dist/oms/school/index.d.ts +10 -0
  46. package/dist/shared/inject.d.ts +8 -0
  47. package/dist/shared/registry.d.ts +5 -0
  48. package/dist/shared/types.d.ts +9 -0
  49. package/dist/shared/wrap.d.ts +7 -0
  50. package/dist/style.css +2 -0
  51. package/package.json +17 -49
  52. package/dist/atom/attendance-badge/index.d.ts +0 -5
  53. package/dist/atom/attendance-badge/src/attendance-badge.vue.d.ts +0 -13
  54. package/dist/atom/attendance-badge/src/core.d.ts +0 -11
  55. package/dist/atom/avatar/index.d.ts +0 -3
  56. package/dist/atom/avatar/src/avatar.vue.d.ts +0 -14
  57. package/dist/atom/button/index.d.ts +0 -3
  58. package/dist/atom/button/src/button.vue.d.ts +0 -40
  59. package/dist/atom/checkbox/index.d.ts +0 -3
  60. package/dist/atom/checkbox/src/checkbox.vue.d.ts +0 -24
  61. package/dist/atom/icon/index.d.ts +0 -3
  62. package/dist/atom/icon/src/icon.vue.d.ts +0 -27
  63. package/dist/atom/index.d.ts +0 -444
  64. package/dist/atom/input/index.d.ts +0 -3
  65. package/dist/atom/input/src/input.vue.d.ts +0 -43
  66. package/dist/atom/progress/index.d.ts +0 -4
  67. package/dist/atom/progress/src/core.d.ts +0 -9
  68. package/dist/atom/progress/src/progress.vue.d.ts +0 -19
  69. package/dist/atom/select/index.d.ts +0 -5
  70. package/dist/atom/select/src/core.d.ts +0 -9
  71. package/dist/atom/select/src/select.vue.d.ts +0 -22
  72. package/dist/atom/slogan/index.d.ts +0 -3
  73. package/dist/atom/switch/index.d.ts +0 -3
  74. package/dist/atom/switch/src/switch.vue.d.ts +0 -16
  75. package/dist/atom/tag/index.d.ts +0 -3
  76. package/dist/atom/tag/src/tag.vue.d.ts +0 -31
  77. package/dist/atom/textarea/index.d.ts +0 -3
  78. package/dist/atom/textarea/src/textarea.vue.d.ts +0 -19
  79. package/dist/base/breadcrumb/index.d.ts +0 -4
  80. package/dist/base/breadcrumb/src/breadcrumb.vue.d.ts +0 -29
  81. package/dist/base/class-tree/index.d.ts +0 -5
  82. package/dist/base/class-tree/src/class-tree.vue.d.ts +0 -29
  83. package/dist/base/class-tree/src/core.d.ts +0 -30
  84. package/dist/base/copyright/index.d.ts +0 -3
  85. package/dist/base/drawer/index.d.ts +0 -3
  86. package/dist/base/drawer/src/drawer.vue.d.ts +0 -36
  87. package/dist/base/empty/index.d.ts +0 -3
  88. package/dist/base/index.d.ts +0 -651
  89. package/dist/base/menu/core.d.ts +0 -34
  90. package/dist/base/menu/index.d.ts +0 -13
  91. package/dist/base/menu/side-menu/index.d.ts +0 -5
  92. package/dist/base/menu/side-menu/src/side-menu.vue.d.ts +0 -59
  93. package/dist/base/modal/index.d.ts +0 -4
  94. package/dist/base/modal/src/core.d.ts +0 -8
  95. package/dist/base/modal/src/modal.vue.d.ts +0 -46
  96. package/dist/base/page-header/index.d.ts +0 -3
  97. package/dist/base/page-header/src/page-header.vue.d.ts +0 -27
  98. package/dist/base/pagination/index.d.ts +0 -5
  99. package/dist/base/pagination/src/core.d.ts +0 -11
  100. package/dist/base/pagination/src/pagination.vue.d.ts +0 -26
  101. package/dist/base/search-form/index.d.ts +0 -3
  102. package/dist/base/search-form/src/search-form.vue.d.ts +0 -34
  103. package/dist/base/skeleton/index.d.ts +0 -3
  104. package/dist/base/statistic/index.d.ts +0 -3
  105. package/dist/base/statistic/src/statistic.vue.d.ts +0 -16
  106. package/dist/base/table/index.d.ts +0 -5
  107. package/dist/base/table/src/core.d.ts +0 -25
  108. package/dist/base/table/src/table.vue.d.ts +0 -44
  109. package/dist/base/toast/index.d.ts +0 -5
  110. package/dist/base/toast/src/store.d.ts +0 -56
  111. package/dist/base/toast/src/toast-container.vue.d.ts +0 -3
  112. package/dist/campus-ui.css +0 -2
  113. package/dist/campus-ui.js +0 -2229
  114. package/dist/campus-ui.umd.cjs +0 -1
  115. package/dist/core/index.d.ts +0 -4
  116. package/dist/core/namespace.d.ts +0 -16
  117. package/dist/core/theme.d.ts +0 -49
  118. package/dist/feature/daily-agenda/index.d.ts +0 -5
  119. package/dist/feature/daily-agenda/src/core.d.ts +0 -25
  120. package/dist/feature/daily-agenda/src/daily-agenda.vue.d.ts +0 -12
  121. package/dist/feature/daily-agenda/src/data.d.ts +0 -3
  122. package/dist/feature/index.d.ts +0 -61
  123. package/dist/feature/student-picker/index.d.ts +0 -5
  124. package/dist/feature/student-picker/src/core.d.ts +0 -19
  125. package/dist/feature/student-picker/src/student-picker.vue.d.ts +0 -26
  126. package/dist/feature/weekly-timetable/index.d.ts +0 -6
  127. package/dist/feature/weekly-timetable/src/core.d.ts +0 -33
  128. package/dist/feature/weekly-timetable/src/data.d.ts +0 -3
  129. package/dist/feature/weekly-timetable/src/weekly-timetable.vue.d.ts +0 -7
@@ -0,0 +1,195 @@
1
+ /**
2
+ * 分类:图表(chart)
3
+ *
4
+ * 判据:把一组数据画成图形的组件。全部自绘 SVG,不依赖任何图表库,也不依赖基座(Element Plus),
5
+ * 所以这里没有 wrap()、也没有基座样式的引入;外观靠 ./chart.css(--ca-* 变量)。
6
+ *
7
+ * CaLineChart 折线 / 面积图 多系列、平滑、悬停十字线、图例开关
8
+ * CaBarChart 柱状图 竖向 / 横向、分组 / 堆叠、选择性数值标签
9
+ * CaPieChart 饼图 / 环形图 中心文字、悬停联动、名称 / 数值 / 占比图例
10
+ * CaSparkline 迷你趋势 指标卡里的小折线 / 小柱
11
+ * CaGauge 进度环 / 仪表 单值百分比,阈值变色
12
+ *
13
+ * 共同约束:宽度跟随容器;加载中保留上一次的图并变淡;没有数据显示“暂无数据”;
14
+ * 每个图都有 role="img" 的文字摘要和一张视觉隐藏的数据表;减弱动效时没有入场动画。
15
+ * 纯计算(刻度、路径、角度)在 chart-math.ts,有单元测试。
16
+ *
17
+ * 这些组件在 scripts/check-catalog.mjs 的自研白名单里:它们不是对基座组件的封装,
18
+ * 基座组件总览里没有对应条目,不需要登记到演示站 catalog。
19
+ */
20
+ import './chart.css';
21
+ import CaLineChart from './line-chart/CaLineChart.vue';
22
+ import CaBarChart from './bar-chart/CaBarChart.vue';
23
+ import CaPieChart from './pie-chart/CaPieChart.vue';
24
+ import CaSparkline from './sparkline/CaSparkline.vue';
25
+ import CaGauge from './gauge/CaGauge.vue';
26
+ export { CaLineChart, CaBarChart, CaPieChart, CaSparkline, CaGauge };
27
+ export type { LineSeries } from './line-chart/CaLineChart.vue';
28
+ export type { BarSeries } from './bar-chart/CaBarChart.vue';
29
+ export type { PieItem } from './pie-chart/CaPieChart.vue';
30
+ export type { GaugeShape, Threshold } from './chart-math.js';
31
+ export declare const chartComponents: {
32
+ CaLineChart: import("vue").DefineComponent<{
33
+ categories: string[];
34
+ series: import("@campus-admin/core").LineSeries[];
35
+ height?: number;
36
+ width?: number;
37
+ smooth?: boolean;
38
+ area?: boolean;
39
+ zero?: boolean;
40
+ legend?: boolean;
41
+ loading?: boolean;
42
+ title?: string;
43
+ yFormatter?: (value: number) => string;
44
+ valueFormatter?: (value: number) => string;
45
+ yMin?: number;
46
+ yMax?: number;
47
+ animated?: boolean;
48
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
49
+ categories: string[];
50
+ series: import("@campus-admin/core").LineSeries[];
51
+ height?: number;
52
+ width?: number;
53
+ smooth?: boolean;
54
+ area?: boolean;
55
+ zero?: boolean;
56
+ legend?: boolean;
57
+ loading?: boolean;
58
+ title?: string;
59
+ yFormatter?: (value: number) => string;
60
+ valueFormatter?: (value: number) => string;
61
+ yMin?: number;
62
+ yMax?: number;
63
+ animated?: boolean;
64
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
65
+ CaBarChart: import("vue").DefineComponent<{
66
+ categories: string[];
67
+ series: import("@campus-admin/core").BarSeries[];
68
+ height?: number;
69
+ width?: number;
70
+ stacked?: boolean;
71
+ horizontal?: boolean;
72
+ showValues?: boolean;
73
+ barSize?: number;
74
+ legend?: boolean;
75
+ loading?: boolean;
76
+ title?: string;
77
+ yFormatter?: (value: number) => string;
78
+ valueFormatter?: (value: number) => string;
79
+ animated?: boolean;
80
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
81
+ categories: string[];
82
+ series: import("@campus-admin/core").BarSeries[];
83
+ height?: number;
84
+ width?: number;
85
+ stacked?: boolean;
86
+ horizontal?: boolean;
87
+ showValues?: boolean;
88
+ barSize?: number;
89
+ legend?: boolean;
90
+ loading?: boolean;
91
+ title?: string;
92
+ yFormatter?: (value: number) => string;
93
+ valueFormatter?: (value: number) => string;
94
+ animated?: boolean;
95
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
96
+ CaPieChart: import("vue").DefineComponent<{
97
+ items: import("@campus-admin/core").PieItem[];
98
+ donut?: boolean;
99
+ size?: number;
100
+ centerLabel?: string;
101
+ centerValue?: string;
102
+ legend?: boolean;
103
+ loading?: boolean;
104
+ title?: string;
105
+ valueFormatter?: (value: number) => string;
106
+ animated?: boolean;
107
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
108
+ items: import("@campus-admin/core").PieItem[];
109
+ donut?: boolean;
110
+ size?: number;
111
+ centerLabel?: string;
112
+ centerValue?: string;
113
+ legend?: boolean;
114
+ loading?: boolean;
115
+ title?: string;
116
+ valueFormatter?: (value: number) => string;
117
+ animated?: boolean;
118
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
119
+ CaSparkline: import("vue").DefineComponent<{
120
+ data: import("./chart-math.js").Value[];
121
+ type?: "line" | "bar";
122
+ area?: boolean;
123
+ smooth?: boolean;
124
+ color?: string;
125
+ height?: number;
126
+ width?: number;
127
+ title?: string;
128
+ valueFormatter?: (value: number) => string;
129
+ animated?: boolean;
130
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
131
+ data: import("./chart-math.js").Value[];
132
+ type?: "line" | "bar";
133
+ area?: boolean;
134
+ smooth?: boolean;
135
+ color?: string;
136
+ height?: number;
137
+ width?: number;
138
+ title?: string;
139
+ valueFormatter?: (value: number) => string;
140
+ animated?: boolean;
141
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
142
+ CaGauge: {
143
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
144
+ value: import("./chart-math.js").Value;
145
+ max?: number;
146
+ shape?: import("@campus-admin/core").GaugeShape;
147
+ size?: number;
148
+ thickness?: number;
149
+ label?: string;
150
+ color?: string;
151
+ thresholds?: import("@campus-admin/core").Threshold[];
152
+ loading?: boolean;
153
+ title?: string;
154
+ animated?: boolean;
155
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
156
+ P: {};
157
+ B: {};
158
+ D: {};
159
+ C: {};
160
+ M: {};
161
+ Defaults: {};
162
+ }, Readonly<{
163
+ value: import("./chart-math.js").Value;
164
+ max?: number;
165
+ shape?: import("@campus-admin/core").GaugeShape;
166
+ size?: number;
167
+ thickness?: number;
168
+ label?: string;
169
+ color?: string;
170
+ thresholds?: import("@campus-admin/core").Threshold[];
171
+ loading?: boolean;
172
+ title?: string;
173
+ animated?: boolean;
174
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
175
+ __isFragment?: never;
176
+ __isTeleport?: never;
177
+ __isSuspense?: never;
178
+ } & import("vue").ComponentOptionsBase<Readonly<{
179
+ value: import("./chart-math.js").Value;
180
+ max?: number;
181
+ shape?: import("@campus-admin/core").GaugeShape;
182
+ size?: number;
183
+ thickness?: number;
184
+ label?: string;
185
+ color?: string;
186
+ thresholds?: import("@campus-admin/core").Threshold[];
187
+ loading?: boolean;
188
+ title?: string;
189
+ animated?: boolean;
190
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
191
+ $slots: {
192
+ center?: (props: {}) => any;
193
+ };
194
+ });
195
+ };
@@ -0,0 +1,40 @@
1
+ import { type Value } from '../chart-math.js';
2
+ export interface LineSeries {
3
+ name: string;
4
+ /** 与 categories 一一对应;缺失值用 null,折线在此断开 */
5
+ data: Value[];
6
+ /** 自定义颜色(CSS 颜色或 var(...));不传则按系列下标取主题色板 */
7
+ color?: string;
8
+ }
9
+ type __VLS_Props = {
10
+ /** 横轴类目标签 */
11
+ categories: string[];
12
+ series: LineSeries[];
13
+ /** 绘图区高度(像素) */
14
+ height?: number;
15
+ /** 固定宽度;不传则跟随容器宽度 */
16
+ width?: number;
17
+ /** 平滑曲线(保单调三次插值) */
18
+ smooth?: boolean;
19
+ /** 填充线下面积(同时强制纵轴从 0 起) */
20
+ area?: boolean;
21
+ /** 纵轴是否强制包含 0;折线图可以设为 false 让波动更清楚(面积图总是包含) */
22
+ zero?: boolean;
23
+ /** 是否显示图例;不传时有 2 个及以上系列才显示 */
24
+ legend?: boolean;
25
+ loading?: boolean;
26
+ /** 图表名称:用于读屏摘要和数据表标题,不会显示在图上 */
27
+ title?: string;
28
+ /** 纵轴刻度格式,默认大数用“万 / 亿” */
29
+ yFormatter?: (value: number) => string;
30
+ /** 悬停提示与摘要里的数值格式,默认千分位 */
31
+ valueFormatter?: (value: number) => string;
32
+ /** 强制纵轴下界 / 上界(仍会取整到好看的刻度) */
33
+ yMin?: number;
34
+ yMax?: number;
35
+ /** 入场动画(系统“减弱动效”时自动关闭) */
36
+ animated?: boolean;
37
+ };
38
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ declare const _default: typeof __VLS_export;
40
+ export default _default;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 图例(内部组件,不对外注册)。
3
+ *
4
+ * 规则:两个及以上系列时总是显示图例——不能只靠颜色传达身份;
5
+ * 可点击的图例(interactive)用于隐藏 / 显示某个系列,用 aria-pressed 表达开关状态,
6
+ * 隐藏的系列图例项变成空心色块并半透明,但仍然留在原位(颜色跟着实体走,位置不乱)。
7
+ *
8
+ * 系列名来自数据,可能是接口返回的任意文本:只用插值输出(自动转义),不拼 HTML。
9
+ */
10
+ export interface LegendItem {
11
+ name: string;
12
+ color: string;
13
+ /** 被隐藏(只在可点击的图例里有意义) */
14
+ off?: boolean;
15
+ }
16
+ type __VLS_Props = {
17
+ items: LegendItem[];
18
+ /** 色块形状:折线用短线,柱状 / 饼用方块 */
19
+ shape?: 'box' | 'line';
20
+ interactive?: boolean;
21
+ };
22
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ toggle: (index: number) => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onToggle?: ((index: number) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -1,9 +1,7 @@
1
1
  type __VLS_Props = {
2
- /** 学校 / 机构标语,为空时用默认的众校通标语 */
3
- title?: string;
2
+ loading?: boolean;
3
+ empty?: boolean;
4
4
  };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
- title: string;
7
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
6
  declare const _default: typeof __VLS_export;
9
7
  export default _default;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 数据表(内部组件):把图里的全部数值以真实表格输出,视觉上隐藏,读屏和键盘用户可读。
3
+ *
4
+ * 为什么需要:图形本身对读屏软件只是一个 role="img",悬停提示又依赖指针;
5
+ * 数据表保证“看不到图 / 用不了鼠标”的人也能拿到每一个数值。
6
+ * 行数很多时由调用方截断(见 MAX_ROWS),避免给页面塞几千个看不见的节点。
7
+ *
8
+ * 为什么外面还要套一层 div:<table> 是表格盒,height 只当最小值用,
9
+ * 直接给它 1px 高它也会被内容撑到几百像素,在可滚动的祖先里会凭空多出一大段滚动区。
10
+ * 外层是普通块盒,1px 高 + overflow 隐藏就能真正收起,表格语义仍然保留。
11
+ */
12
+ type __VLS_Props = {
13
+ caption?: string;
14
+ head: string[];
15
+ rows: string[][];
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 悬停提示(内部组件):一个 HTML 浮层,列出同一位置上所有系列的值。
3
+ *
4
+ * 为什么是 HTML 而不是 SVG:文字换行、阴影、圆角在 HTML 里自然,也不会被 SVG 视口裁剪。
5
+ * 定位:x、y 是相对图表容器左上角的像素;点在容器右半边时浮层翻到左边,避免被裁出容器。
6
+ * 提示只“增强”不“独占”:所有数值同样出现在图例、数据表和文字摘要里。
7
+ */
8
+ export interface TipRow {
9
+ name: string;
10
+ value: string;
11
+ color: string;
12
+ }
13
+ type __VLS_Props = {
14
+ x: number;
15
+ y: number;
16
+ /** 容器宽度,用来决定翻向左边还是右边 */
17
+ width: number;
18
+ title?: string;
19
+ rows: TipRow[];
20
+ };
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { type Value } from '../chart-math.js';
2
+ export interface PieItem {
3
+ name: string;
4
+ value: Value;
5
+ color?: string;
6
+ }
7
+ type __VLS_Props = {
8
+ items: PieItem[];
9
+ /** 环形图(中间挖空,显示合计或悬停详情) */
10
+ donut?: boolean;
11
+ /** 图的直径(像素);容器更窄时自动缩小 */
12
+ size?: number;
13
+ /** 环形图中心:默认文字是“合计”,数值是各项之和;都可以覆盖 */
14
+ centerLabel?: string;
15
+ centerValue?: string;
16
+ /** 显示图例清单 */
17
+ legend?: boolean;
18
+ loading?: boolean;
19
+ title?: string;
20
+ valueFormatter?: (value: number) => string;
21
+ animated?: boolean;
22
+ };
23
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { type Value } from '../chart-math.js';
2
+ type __VLS_Props = {
3
+ data: Value[];
4
+ type?: 'line' | 'bar';
5
+ /** 折线下方填充 */
6
+ area?: boolean;
7
+ /** 折线平滑(默认开启,迷你图看起来更柔和;不会过冲) */
8
+ smooth?: boolean;
9
+ /** CSS 颜色,默认取色板第 1 色 */
10
+ color?: string;
11
+ height?: number;
12
+ width?: number;
13
+ /** 图表名称,只用于读屏摘要 */
14
+ title?: string;
15
+ valueFormatter?: (value: number) => string;
16
+ animated?: boolean;
17
+ };
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 图表组件共用的组合函数(有 Vue、有 DOM,但不含任何绘制逻辑;绘制用的纯计算在 chart-math.ts)。
3
+ */
4
+ import { type Ref } from 'vue';
5
+ /** 没有测到容器宽度之前(服务端渲染、首帧)用的宽度:避免首帧画出 0 宽的空图 */
6
+ export declare const FALLBACK_WIDTH = 480;
7
+ /**
8
+ * 跟随容器宽度。
9
+ *
10
+ * 为什么用 ResizeObserver 而不是 window.resize:图表所在的内容区宽度会因为折叠侧栏、
11
+ * 内容全屏、抽屉展开等和窗口大小无关的原因变化,只有观察容器本身才准。
12
+ *
13
+ * 两个约束:
14
+ * - 忽略宽度为 0 的回调:页面被 KeepAlive 缓存时 DOM 会被摘下,此时测得 0,
15
+ * 如果照单全收,重新激活的那一帧会先闪出一个 0 宽的图;保持上一次的宽度,激活后观察器会立刻再报一次真实宽度。
16
+ * - 传了固定宽度(fixed)时不观察,直接用它:测试和固定尺寸场景用。
17
+ *
18
+ * @returns width 当前宽度(像素,取整);el 绑定到容器元素的 ref
19
+ */
20
+ export declare function useElementWidth(fixed?: () => number | undefined): {
21
+ el: Ref<HTMLElement | undefined>;
22
+ width: Ref<number>;
23
+ };
24
+ /**
25
+ * 图例开关:点击图例项隐藏 / 显示对应系列。
26
+ * 隐藏状态用“系列下标”记,而不是“可见系列的序号”——颜色跟着实体走,
27
+ * 隐藏一个系列后,剩下的系列不能因此换颜色。
28
+ */
29
+ export declare function useHiddenSeries(): {
30
+ hidden: Ref<Set<number> & Omit<Set<number>, keyof Set<any>>, Set<number> | (Set<number> & Omit<Set<number>, keyof Set<any>>)>;
31
+ toggle: (index: number, total: number) => void;
32
+ };
33
+ /** 第 index 个系列的默认颜色:取主题色板,下标从 0 起,超过 8 个时循环(文档建议尾部合并为“其他”) */
34
+ export declare function seriesColor(index: number, custom?: string): string;
35
+ /** 生成页面内唯一的 id(给 aria-describedby、clipPath 等引用用);服务端和客户端各自递增,不依赖随机数 */
36
+ export declare function nextId(prefix: string): string;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ locale?: string;
3
+ };
4
+ declare var __VLS_7: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_7) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 分类:配置(config)
3
+ *
4
+ * 分类名与基座组件总览一致。目前只有全局配置容器。
5
+ */
6
+ import CaConfigProvider from './CaConfigProvider.vue';
7
+ import 'element-plus/es/components/config-provider/style/css';
8
+ export { CaConfigProvider };
9
+ export declare const configComponents: {
10
+ CaConfigProvider: {
11
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
12
+ locale?: string;
13
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
14
+ P: {};
15
+ B: {};
16
+ D: {};
17
+ C: {};
18
+ M: {};
19
+ Defaults: {};
20
+ }, Readonly<{
21
+ locale?: string;
22
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
23
+ __isFragment?: never;
24
+ __isTeleport?: never;
25
+ __isSuspense?: never;
26
+ } & import("vue").ComponentOptionsBase<Readonly<{
27
+ locale?: string;
28
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
29
+ $slots: {
30
+ default?: (props: {}) => any;
31
+ };
32
+ });
33
+ };
@@ -0,0 +1,99 @@
1
+ /**
2
+ * 分类:数据展示(display)
3
+ *
4
+ * 判据:只负责“把数据展示得好看”的组件,不录入、不请求。
5
+ * 例如统计卡、状态标签;以后的时间线、排行榜、进度环等也放这里。
6
+ */
7
+ import { ElAvatar, ElAvatarGroup, ElBadge, ElCalendar, ElCarousel, ElCarouselItem, ElCollapse, ElCollapseItem, ElDescriptions, ElDescriptionsItem, ElEmpty, ElImage, ElImageViewer, ElPagination, ElProgress, ElResult, ElSkeleton, ElSkeletonItem, ElTimeline, ElTimelineItem, ElTour, ElTourStep, ElTree, ElTreeV2, ElSegmented, ElStatistic, ElCountdown, ElCheckTag } from 'element-plus';
8
+ import 'element-plus/es/components/avatar/style/css';
9
+ import 'element-plus/es/components/avatar-group/style/css';
10
+ import 'element-plus/es/components/badge/style/css';
11
+ import 'element-plus/es/components/calendar/style/css';
12
+ import 'element-plus/es/components/carousel/style/css';
13
+ import 'element-plus/es/components/carousel-item/style/css';
14
+ import 'element-plus/es/components/collapse/style/css';
15
+ import 'element-plus/es/components/collapse-item/style/css';
16
+ import 'element-plus/es/components/descriptions/style/css';
17
+ import 'element-plus/es/components/descriptions-item/style/css';
18
+ import 'element-plus/es/components/empty/style/css';
19
+ import 'element-plus/es/components/image/style/css';
20
+ import 'element-plus/es/components/image-viewer/style/css';
21
+ import 'element-plus/es/components/pagination/style/css';
22
+ import 'element-plus/es/components/progress/style/css';
23
+ import 'element-plus/es/components/result/style/css';
24
+ import 'element-plus/es/components/skeleton/style/css';
25
+ import 'element-plus/es/components/skeleton-item/style/css';
26
+ import 'element-plus/es/components/timeline/style/css';
27
+ import 'element-plus/es/components/timeline-item/style/css';
28
+ import 'element-plus/es/components/tour/style/css';
29
+ import 'element-plus/es/components/tour-step/style/css';
30
+ import 'element-plus/es/components/tree/style/css';
31
+ import 'element-plus/es/components/tree-v2/style/css';
32
+ import 'element-plus/es/components/segmented/style/css';
33
+ import 'element-plus/es/components/statistic/style/css';
34
+ import 'element-plus/es/components/countdown/style/css';
35
+ import 'element-plus/es/components/check-tag/style/css';
36
+ import CaStatCard from './stat-card/CaStatCard.vue';
37
+ import CaStatusTag from './status-tag/CaStatusTag.vue';
38
+ export declare const CaAvatar: typeof ElAvatar;
39
+ export declare const CaAvatarGroup: typeof ElAvatarGroup;
40
+ export declare const CaBadge: typeof ElBadge;
41
+ export declare const CaCalendar: typeof ElCalendar;
42
+ export declare const CaCarousel: typeof ElCarousel;
43
+ export declare const CaCarouselItem: typeof ElCarouselItem;
44
+ export declare const CaCollapse: typeof ElCollapse;
45
+ export declare const CaCollapseItem: typeof ElCollapseItem;
46
+ export declare const CaDescriptions: typeof ElDescriptions;
47
+ export declare const CaDescriptionsItem: typeof ElDescriptionsItem;
48
+ export declare const CaEmpty: typeof ElEmpty;
49
+ export declare const CaImage: typeof ElImage;
50
+ export declare const CaImageViewer: typeof ElImageViewer;
51
+ export declare const CaPagination: typeof ElPagination;
52
+ export declare const CaProgress: typeof ElProgress;
53
+ export declare const CaResult: typeof ElResult;
54
+ export declare const CaSkeleton: typeof ElSkeleton;
55
+ export declare const CaSkeletonItem: typeof ElSkeletonItem;
56
+ export declare const CaTimeline: typeof ElTimeline;
57
+ export declare const CaTimelineItem: typeof ElTimelineItem;
58
+ export declare const CaTour: typeof ElTour;
59
+ export declare const CaTourStep: typeof ElTourStep;
60
+ export declare const CaTree: typeof ElTree;
61
+ export declare const CaTreeV2: typeof ElTreeV2;
62
+ export declare const CaSegmented: typeof ElSegmented;
63
+ export declare const CaStatistic: typeof ElStatistic;
64
+ export declare const CaCountdown: typeof ElCountdown;
65
+ export declare const CaCheckTag: typeof ElCheckTag;
66
+ export { CaStatCard, CaStatusTag };
67
+ export type { StatusMap, TagType } from './types.js';
68
+ export declare const displayComponents: {
69
+ CaAvatar: typeof CaAvatar;
70
+ CaAvatarGroup: typeof CaAvatarGroup;
71
+ CaBadge: typeof CaBadge;
72
+ CaCalendar: typeof CaCalendar;
73
+ CaCarousel: typeof CaCarousel;
74
+ CaCarouselItem: typeof CaCarouselItem;
75
+ CaCollapse: typeof CaCollapse;
76
+ CaCollapseItem: typeof CaCollapseItem;
77
+ CaDescriptions: typeof CaDescriptions;
78
+ CaDescriptionsItem: typeof CaDescriptionsItem;
79
+ CaEmpty: typeof CaEmpty;
80
+ CaImage: typeof CaImage;
81
+ CaImageViewer: typeof CaImageViewer;
82
+ CaPagination: typeof CaPagination;
83
+ CaProgress: typeof CaProgress;
84
+ CaResult: typeof CaResult;
85
+ CaSkeleton: typeof CaSkeleton;
86
+ CaSkeletonItem: typeof CaSkeletonItem;
87
+ CaTimeline: typeof CaTimeline;
88
+ CaTimelineItem: typeof CaTimelineItem;
89
+ CaTour: typeof CaTour;
90
+ CaTourStep: typeof CaTourStep;
91
+ CaTree: typeof CaTree;
92
+ CaTreeV2: typeof CaTreeV2;
93
+ CaSegmented: typeof CaSegmented;
94
+ CaStatistic: typeof CaStatistic;
95
+ CaCountdown: typeof CaCountdown;
96
+ CaCheckTag: typeof CaCheckTag;
97
+ CaStatCard: typeof CaStatCard;
98
+ CaStatusTag: typeof CaStatusTag;
99
+ };
@@ -1,20 +1,16 @@
1
1
  type __VLS_Props = {
2
- /** 版权主体:学校 / 机构名,渲染为「© 年份 名称」 */
3
- name?: string;
4
- /** 完整自定义版权行;传了就整行替代 name 的自动拼装 */
5
- displayCopyright?: string;
6
- /** 开发者 / 渠道方名称 */
7
- partner?: string;
2
+ title: string;
3
+ value: string | number;
4
+ hint?: string;
5
+ /** 环比,正数上升、负数下降;不传则不显示 */
6
+ trend?: number;
7
+ tag?: string;
8
8
  };
9
9
  declare var __VLS_1: {};
10
10
  type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_1) => any;
12
12
  };
13
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
- name: string;
15
- displayCopyright: string;
16
- partner: string;
17
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
15
  declare const _default: typeof __VLS_export;
20
16
  export default _default;
@@ -1,11 +1,8 @@
1
+ import type { StatusMap } from '../types.js';
1
2
  type __VLS_Props = {
2
- /** 骨架行数 */
3
- rows?: number;
4
- variant?: 'text' | 'card' | 'avatar';
3
+ value: string | number;
4
+ map: StatusMap;
5
5
  };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
- variant: "text" | "card" | "avatar";
8
- rows: number;
9
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
7
  declare const _default: typeof __VLS_export;
11
8
  export default _default;
@@ -0,0 +1,7 @@
1
+ /** 状态标签支持的颜色语义,与基座的标签类型一一对应 */
2
+ export type TagType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
3
+ /** 状态值 → 展示文字与颜色的映射,由平台按业务提供 */
4
+ export type StatusMap = Record<string, {
5
+ label: string;
6
+ type?: TagType;
7
+ }>;