savor-ui 0.3.2 → 0.4.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 (135) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/es/components/index.d.ts +4 -0
  3. package/dist/es/components/index.mjs +6 -1
  4. package/dist/es/components/src/alert/alert.d.ts +22 -0
  5. package/dist/es/components/src/alert/alert.vue.mjs +5 -0
  6. package/dist/es/components/src/alert/alert.vue_vue_type_script_setup_true_vapor_true_lang.mjs +58 -0
  7. package/dist/es/components/src/alert/index.d.ts +26 -0
  8. package/dist/es/components/src/alert/index.mjs +7 -0
  9. package/dist/es/components/src/alert/types.d.ts +24 -0
  10. package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +93 -82
  11. package/dist/es/components/src/cascader/index.d.ts +1 -0
  12. package/dist/es/components/src/cascader/types.d.ts +2 -0
  13. package/dist/es/components/src/chat-list/chat-list.d.ts +35 -0
  14. package/dist/es/components/src/chat-list/chat-list.vue.mjs +5 -0
  15. package/dist/es/components/src/chat-list/chat-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +55 -0
  16. package/dist/es/components/src/chat-list/index.d.ts +47 -0
  17. package/dist/es/components/src/chat-list/index.mjs +7 -0
  18. package/dist/es/components/src/chat-list/types.d.ts +44 -0
  19. package/dist/es/components/src/chat-sender/chat-sender.d.ts +26 -0
  20. package/dist/es/components/src/chat-sender/chat-sender.vue.mjs +5 -0
  21. package/dist/es/components/src/chat-sender/chat-sender.vue_vue_type_script_setup_true_vapor_true_lang.mjs +92 -0
  22. package/dist/es/components/src/chat-sender/index.d.ts +27 -0
  23. package/dist/es/components/src/chat-sender/index.mjs +7 -0
  24. package/dist/es/components/src/chat-sender/types.d.ts +24 -0
  25. package/dist/es/components/src/collapse/collapse-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
  26. package/dist/es/components/src/date-picker/date-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
  27. package/dist/es/components/src/datetime-picker/datetime-picker.vue_vue_type_script_setup_true_vapor_true_lang.mjs +28 -28
  28. package/dist/es/components/src/drawer/drawer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +72 -72
  29. package/dist/es/components/src/form/form-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +13 -13
  30. package/dist/es/components/src/form/use-form-item.d.ts +1 -1
  31. package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +26 -17
  32. package/dist/es/components/src/grid/grid.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -6
  33. package/dist/es/components/src/grid/types.d.ts +2 -0
  34. package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
  35. package/dist/es/components/src/input-number/input-number.vue_vue_type_script_setup_true_vapor_true_lang.mjs +83 -83
  36. package/dist/es/components/src/input-tag/input-tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +10 -10
  37. package/dist/es/components/src/layer/layer.vue_vue_type_script_setup_true_vapor_true_lang.mjs +105 -105
  38. package/dist/es/components/src/list/index.d.ts +5 -5
  39. package/dist/es/components/src/list/list.d.ts +3 -3
  40. package/dist/es/components/src/list/list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +7 -12
  41. package/dist/es/components/src/list/types.d.ts +7 -5
  42. package/dist/es/components/src/menu/menu-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +46 -37
  43. package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
  44. package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +121 -121
  45. package/dist/es/components/src/panel/panel.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
  46. package/dist/es/components/src/popover/index.d.ts +1 -0
  47. package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +77 -76
  48. package/dist/es/components/src/popover/types.d.ts +4 -0
  49. package/dist/es/components/src/scrollbar/index.d.ts +7 -2
  50. package/dist/es/components/src/scrollbar/scrollbar.d.ts +5 -2
  51. package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +131 -96
  52. package/dist/es/components/src/scrollbar/types.d.ts +15 -1
  53. package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +41 -45
  54. package/dist/es/components/src/select/select.vue_vue_type_script_setup_true_vapor_true_lang.mjs +9 -9
  55. package/dist/es/components/src/table/col-group.d.ts +22 -0
  56. package/dist/es/components/src/table/col-group.vue.mjs +5 -0
  57. package/dist/es/components/src/table/col-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +25 -0
  58. package/dist/es/components/src/table/index.d.ts +18 -41
  59. package/dist/es/components/src/table/index.mjs +1 -0
  60. package/dist/es/components/src/table/table-body.d.ts +32 -0
  61. package/dist/es/components/src/table/table-body.vue.mjs +5 -0
  62. package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +153 -0
  63. package/dist/es/components/src/table/table-header.d.ts +23 -0
  64. package/dist/es/components/src/table/table-header.vue.mjs +5 -0
  65. package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +80 -0
  66. package/dist/es/components/src/table/table.d.ts +12 -25
  67. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +167 -380
  68. package/dist/es/components/src/table/types.d.ts +61 -45
  69. package/dist/es/components/src/table/types.mjs +4 -0
  70. package/dist/es/components/src/textarea/textarea.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -6
  71. package/dist/es/components/src/tooltip/index.d.ts +1 -0
  72. package/dist/es/components/src/tooltip/tooltip.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -0
  73. package/dist/es/components/src/tooltip/types.d.ts +2 -0
  74. package/dist/es/components/src/transition/index.d.ts +29 -0
  75. package/dist/es/components/src/transition/index.mjs +7 -0
  76. package/dist/es/components/src/{_comp/HeightTransition.d.ts → transition/transition-height.d.ts} +0 -4
  77. package/dist/es/components/src/transition/transition-height.vue.mjs +5 -0
  78. package/dist/es/components/src/transition/transition-height.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
  79. package/dist/es/components/src/transition/transition-opacity.vue.mjs +5 -0
  80. package/dist/es/components/src/{_comp/OpacityTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-opacity.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
  81. package/dist/es/components/src/transition/transition-scale.vue.mjs +5 -0
  82. package/dist/es/components/src/{_comp/ScaleTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-scale.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
  83. package/dist/es/components/src/transition/transition-side.vue.mjs +5 -0
  84. package/dist/es/components/src/{_comp/SideTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs → transition/transition-side.vue_vue_type_script_setup_true_vapor_true_lang.mjs} +2 -2
  85. package/dist/es/components/src/transition/transition-width.d.ts +31 -0
  86. package/dist/es/components/src/transition/transition-width.vue.mjs +5 -0
  87. package/dist/es/components/src/transition/transition-width.vue_vue_type_script_setup_true_vapor_true_lang.mjs +54 -0
  88. package/dist/es/components/src/transition/transition.d.ts +27 -0
  89. package/dist/es/components/src/transition/transition.vue.mjs +5 -0
  90. package/dist/es/components/src/transition/transition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +47 -0
  91. package/dist/es/components/src/transition/types.d.ts +28 -0
  92. package/dist/es/components/src/tree/index.d.ts +15 -7
  93. package/dist/es/components/src/tree/node.d.ts +2 -1
  94. package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -29
  95. package/dist/es/components/src/tree/tree.d.ts +8 -2
  96. package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +69 -65
  97. package/dist/es/components/src/tree/types.d.ts +18 -12
  98. package/dist/es/core/components.mjs +94 -86
  99. package/dist/es/core/index.mjs +84 -79
  100. package/dist/es/hooks/src/use-element-size.mjs +7 -38
  101. package/dist/es/icons/index.d.ts +4 -1
  102. package/dist/es/icons/index.mjs +3 -0
  103. package/dist/es/icons/src/loading-stop.d.ts +19 -0
  104. package/dist/es/icons/src/loading-stop.vue.mjs +11 -0
  105. package/dist/es/icons/src/send.d.ts +19 -0
  106. package/dist/es/icons/src/send.vue.mjs +11 -0
  107. package/dist/es/icons/src/stop.d.ts +19 -0
  108. package/dist/es/icons/src/stop.vue.mjs +5 -0
  109. package/dist/es/theme/components/alert.scss +101 -0
  110. package/dist/es/theme/components/button.scss +21 -4
  111. package/dist/es/theme/components/cascader.scss +3 -0
  112. package/dist/es/theme/components/chat-list.scss +134 -0
  113. package/dist/es/theme/components/chat-sender.scss +123 -0
  114. package/dist/es/theme/components/index.scss +3 -0
  115. package/dist/es/theme/components/input.scss +2 -1
  116. package/dist/es/theme/components/list.scss +7 -0
  117. package/dist/es/theme/components/menu.scss +14 -1
  118. package/dist/es/theme/components/scrollbar.scss +61 -7
  119. package/dist/es/theme/components/table.scss +360 -328
  120. package/dist/es/theme/components/transition.scss +21 -21
  121. package/dist/es/theme/components/tree.scss +8 -0
  122. package/dist/es/utils/src/tool.d.ts +8 -3
  123. package/dist/es/utils/src/tool.mjs +6 -6
  124. package/dist/json/vetur-attributes.json +196 -46
  125. package/dist/json/vetur-tags.json +82 -15
  126. package/dist/json/web-types.json +432 -75
  127. package/package.json +1 -1
  128. package/dist/es/components/src/_comp/HeightTransition.vue.mjs +0 -5
  129. package/dist/es/components/src/_comp/HeightTransition.vue_vue_type_script_setup_true_vapor_true_lang.mjs +0 -77
  130. package/dist/es/components/src/_comp/OpacityTransition.vue.mjs +0 -5
  131. package/dist/es/components/src/_comp/ScaleTransition.vue.mjs +0 -5
  132. package/dist/es/components/src/_comp/SideTransition.vue.mjs +0 -5
  133. /package/dist/es/components/src/{_comp/OpacityTransition.d.ts → transition/transition-opacity.d.ts} +0 -0
  134. /package/dist/es/components/src/{_comp/ScaleTransition.d.ts → transition/transition-scale.d.ts} +0 -0
  135. /package/dist/es/components/src/{_comp/SideTransition.d.ts → transition/transition-side.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.4.0](https://gitee.com/mach552/savor-ui/compare/v0.3.3...v0.4.0) (2026-06-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **cascader:** 修复清空值后没有清空激活状态的问题 ([0e7b7c8](https://gitee.com/mach552/savor-ui/commits/0e7b7c8c50f2b4c8bdf9b2c7f368db7babf2fa62))
11
+ * **grid:** 修复动态计算span无效的问题 ([23c5e60](https://gitee.com/mach552/savor-ui/commits/23c5e606aa8a1f030ff7ddfc5a1f1aa17748fe32))
12
+ * **menu:** 修复子菜单展开动画卡顿问题 ([e245006](https://gitee.com/mach552/savor-ui/commits/e245006281ad47719e10190fb052811bc5695e7b))
13
+ * **popover:** 修复快速打开关闭时没有定位样式的问题 ([5190f75](https://gitee.com/mach552/savor-ui/commits/5190f75a3cb2e733e2dba5634de4c5e6f39d8686))
14
+ * **scrollbar:** 修复容器和滚动条位置不一致问题 ([5fa85dd](https://gitee.com/mach552/savor-ui/commits/5fa85dd2b5abffff502f0b06ecdddebf4fa2035e))
15
+ * **segmented:** 修复激活块偶发宽度不足的问题 ([a50c4c4](https://gitee.com/mach552/savor-ui/commits/a50c4c461b12919714662d1ce46e31e6bf01231e))
16
+ * **table:** 修复从有数据变成数据为空时报错问题 ([ff7dfa0](https://gitee.com/mach552/savor-ui/commits/ff7dfa0295fb5cc82ed83bfeb3451e7c10b11ad0))
17
+ * **table:** 修复单独设置`minWidth`无效的问题 ([a645d10](https://gitee.com/mach552/savor-ui/commits/a645d108cf615cee1b4d0e7551f830cb1804ebe6))
18
+ * **table:** 修复复选框没有垂直居中的问题 ([923fe9b](https://gitee.com/mach552/savor-ui/commits/923fe9be0bed99e4e5c0109255c9ac8d09a21cfd))
19
+ * **table:** 修复高度不足时空状态导致的表格整体滚动问题 ([9dc78c9](https://gitee.com/mach552/savor-ui/commits/9dc78c9a6de12a73a64836ca6b7b962db3b965fa))
20
+ * **table:** 修复列宽无法固定的问题 ([02a8e36](https://gitee.com/mach552/savor-ui/commits/02a8e361a6c0a56869f1d5083a6be31bd563a822))
21
+ * **table:** 修复fiexd列的阴影样式显示异常问题 ([41d8adf](https://gitee.com/mach552/savor-ui/commits/41d8adf817919136f198af57f435b14927b1a6d3))
22
+ * **tree:** 修复容器高度计算错误的问题 ([7208476](https://gitee.com/mach552/savor-ui/commits/720847683d04664a8b0e91c34d88a907b64d5340))
23
+
24
+
25
+ ### Features
26
+
27
+ * **alert:** 新增警告提示组件 ([aae1dce](https://gitee.com/mach552/savor-ui/commits/aae1dce10f29f9aa2999ed11b5cfaf4cc4d510c0))
28
+ * **chat-list:** 新增对话列表组件 ([7a28c84](https://gitee.com/mach552/savor-ui/commits/7a28c8420cd105d48b08ec618fa2cc7f9191c23f))
29
+ * **scrollbar:** 新增滚动到结束方法 ([c41e4fc](https://gitee.com/mach552/savor-ui/commits/c41e4fcafb2a48c0c6bdb7ab818491a4bba8857d))
30
+ * **scrollbar:** 新增原生滚动属性和触底事件 ([92b3474](https://gitee.com/mach552/savor-ui/commits/92b3474bcf19d4208e473ecaafb074d7ac5906aa))
31
+ * **sender:** 新增AI对话输入组件 ([3ad13b0](https://gitee.com/mach552/savor-ui/commits/3ad13b0fd9bfc3faddfd629514cb5c202398aac7))
32
+ * **transition:** 新增过渡组件 ([d2cbf62](https://gitee.com/mach552/savor-ui/commits/d2cbf623b64fd9300888f0c5448f4090c3e203f1))
33
+
34
+ ## [0.3.3](https://gitee.com/mach552/savor-ui/compare/v0.3.2...v0.3.3) (2026-06-09)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * **button:** 修复禁用状态样式无效问题 ([604ca42](https://gitee.com/mach552/savor-ui/commits/604ca427631e89bceaada29a04baf75371c77c60))
40
+ * **cascader:** 修复不显示下拉箭头图标问题 ([c2eb385](https://gitee.com/mach552/savor-ui/commits/c2eb38597b79bda04e98c94a0a61bf32b1c6af59))
41
+ * **cascader:** 修复空状态显示样式问题 ([25d0db3](https://gitee.com/mach552/savor-ui/commits/25d0db39d24b889de90ab15d8ccc663dcb04c424))
42
+ * **cascader:** 修复清除图标不显示问题 ([0f6fda6](https://gitee.com/mach552/savor-ui/commits/0f6fda6a85611dce909f72bdc6062a77f348abc0))
43
+ * **grid:** 修复动态增减item时不动态计算位置的问题 ([67785f2](https://gitee.com/mach552/savor-ui/commits/67785f208652f0fd5a66f0e593790461789283ee))
44
+ * **input:** 修复禁用状态hover样式 ([cede93e](https://gitee.com/mach552/savor-ui/commits/cede93e6c8b72e6c608a37f59a6b395f4be4719f))
45
+ * **menu:** 修复折叠时的样式问题 ([9633091](https://gitee.com/mach552/savor-ui/commits/9633091ba4a04f4ce8e18cca24332268b21e7401))
46
+ * **table:** 修复横向滚动条在最右边反复横跳问题 ([a5e1902](https://gitee.com/mach552/savor-ui/commits/a5e19026cfe255fd0e303d7018a6eb69b62d4427))
47
+ * **table:** 修复树形展开时图标不旋转问题 ([6813adb](https://gitee.com/mach552/savor-ui/commits/6813adb8387a3a64ced2f045a9d12d82023aa692))
48
+ * **tree:** 修复各种事件无效问题 ([007a8ae](https://gitee.com/mach552/savor-ui/commits/007a8aecc76a257e61f5985c3e3a8803eb7d2f1e))
49
+
5
50
  ## [0.3.2](https://gitee.com/mach552/savor-ui/compare/v0.3.1...v0.3.2) (2026-06-08)
6
51
 
7
52
 
@@ -1,3 +1,4 @@
1
+ export * from './src/alert';
1
2
  export * from './src/anchor';
2
3
  export * from './src/auto-complete';
3
4
  export * from './src/avatar';
@@ -7,6 +8,8 @@ export * from './src/button';
7
8
  export * from './src/card';
8
9
  export * from './src/carousel';
9
10
  export * from './src/cascader';
11
+ export * from './src/chat-list';
12
+ export * from './src/chat-sender';
10
13
  export * from './src/checkbox';
11
14
  export * from './src/collapse';
12
15
  export * from './src/color-picker';
@@ -53,6 +56,7 @@ export * from './src/text';
53
56
  export * from './src/textarea';
54
57
  export * from './src/timeline';
55
58
  export * from './src/tooltip';
59
+ export * from './src/transition';
56
60
  export * from './src/tree';
57
61
  export * from './src/upload';
58
62
  export * from './src/waterfall';
@@ -1,3 +1,4 @@
1
+ import "./src/alert/index.mjs";
1
2
  import "./src/anchor/types.mjs";
2
3
  import "./src/anchor/index.mjs";
3
4
  import "./src/form/types.mjs";
@@ -16,12 +17,15 @@ import "./src/badge/index.mjs";
16
17
  import "./src/button/index.mjs";
17
18
  import "./src/card/index.mjs";
18
19
  import "./src/carousel/index.mjs";
20
+ import "./src/empty/index.mjs";
19
21
  import "./src/cascader/index.mjs";
22
+ import "./src/chat-list/index.mjs";
23
+ import "./src/chat-sender/index.mjs";
20
24
  import "./src/checkbox/types.mjs";
21
25
  import "./src/checkbox/index.mjs";
26
+ import "./src/transition/index.mjs";
22
27
  import "./src/collapse/types.mjs";
23
28
  import "./src/collapse/index.mjs";
24
- import "./src/empty/index.mjs";
25
29
  import "./src/icon/index.mjs";
26
30
  import "./src/tag/index.mjs";
27
31
  import "./src/select/index.mjs";
@@ -63,6 +67,7 @@ import "./src/skeleton/index.mjs";
63
67
  import "./src/space/index.mjs";
64
68
  import "./src/statistic/index.mjs";
65
69
  import "./src/switch/index.mjs";
70
+ import "./src/table/types.mjs";
66
71
  import "./src/table/index.mjs";
67
72
  import "./src/tabs/types.mjs";
68
73
  import "./src/tabs/index.mjs";
@@ -0,0 +1,22 @@
1
+ import { AlertProps, AlertSlots } from './types';
2
+ import { PublicProps, VNode } from 'vue';
3
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: PublicProps & __VLS_PrettifyLocal<AlertProps & {
5
+ onClose?: (() => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: AlertSlots;
12
+ emit: (evt: "close") => void;
13
+ }>) => VNode & {
14
+ __ctx?: Awaited<typeof __VLS_setup>;
15
+ };
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
19
+ [K in keyof T]: T[K];
20
+ } : {
21
+ [K in keyof T as K]: T[K];
22
+ }) & {};
@@ -0,0 +1,5 @@
1
+ import e from "./alert.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
+ //#region ../components/src/alert/alert.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,58 @@
1
+ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
+ import "../../../hooks/index.mjs";
3
+ import t from "../../../icons/src/check-circle-fill.vue.mjs";
4
+ import n from "../../../icons/src/close-circle-fill.vue.mjs";
5
+ import r from "../../../icons/src/close.vue.mjs";
6
+ import i from "../../../icons/src/info-circle-fill.vue.mjs";
7
+ import a from "../../../icons/src/warning-circle-fill.vue.mjs";
8
+ import "../../../icons/index.mjs";
9
+ import { child as o, createComponent as s, createIf as c, createInvoker as l, createSlot as u, defineVaporComponent as d, delegateEvents as f, renderEffect as p, setClass as m, setInsertionState as h, setText as g, template as _, toDisplayString as v, unref as y } from "vue";
10
+ //#region ../components/src/alert/alert.vue?vue&type=script&setup=true&vapor=true&lang.ts
11
+ var b = _("<div>"), x = _(" "), S = _("<div><div></div>"), C = _("<div><div><div></div>", 1);
12
+ f("click");
13
+ var w = /*@__PURE__*/ d({
14
+ name: "SAlert",
15
+ __name: "alert",
16
+ props: {
17
+ type: { default: "default" },
18
+ size: { default: "medium" },
19
+ showIcon: { type: Boolean },
20
+ title: {},
21
+ content: {},
22
+ closable: { type: Boolean }
23
+ },
24
+ emits: ["close"],
25
+ setup(d, { emit: f, slots: _ }) {
26
+ let w = f, T = e("alert"), E = () => {
27
+ w("close");
28
+ }, D = C(), O = o(D, 1), k = o(O, 1);
29
+ return p(() => {
30
+ let e = y(T);
31
+ m(D, [
32
+ e.b(),
33
+ e.m(d.type),
34
+ e.m(d.size)
35
+ ]);
36
+ }), h(D, 0, 0), c(() => d.title || _.title, () => {
37
+ let e = S(), r = o(e, 1);
38
+ return p(() => m(e, [y(T).e("header")])), h(e, 0, 0), c(() => d.showIcon && (d.title || _.title), () => {
39
+ let e = b();
40
+ return p(() => m(e, [y(T).e("icon")])), h(e, null, 0), c(() => d.type === "warning", () => s(y(a)), () => c(() => d.type === "primary", () => s(y(i)), () => c(() => d.type === "info", () => s(y(i)), () => c(() => d.type === "success", () => s(y(t)), () => c(() => d.type === "danger", () => s(y(n))), 1029), 773), 517), 261), e;
41
+ }), p(() => m(r, [y(T).e("title")])), h(r, null, 0), u("title", null, () => {
42
+ let e = x();
43
+ return p(() => g(e, v(d.title))), e;
44
+ }), e;
45
+ }), p(() => m(O, [y(T).e("body")])), h(O, 0, 0), c(() => d.showIcon && (!d.title || !_.title), () => {
46
+ let e = b();
47
+ return p(() => m(e, [y(T).e("icon")])), h(e, null, 0), c(() => d.type === "warning", () => s(y(a)), () => c(() => d.type === "primary", () => s(y(i)), () => c(() => d.type === "info", () => s(y(i)), () => c(() => d.type === "success", () => s(y(t)), () => c(() => d.type === "danger", () => s(y(n))), 2821), 2565), 2309), 2053), e;
48
+ }), p(() => m(k, [y(T).e("content")])), h(k, null, 0), u("default", null, () => {
49
+ let e = x();
50
+ return p(() => g(e, v(d.content))), e;
51
+ }), h(O, null, 2), c(() => d.closable, () => {
52
+ let e = b();
53
+ return p(() => m(e, [y(T).e("close")])), h(e, null, 0), s(y(r)), e.$evtclick = l(E), e;
54
+ }), D;
55
+ }
56
+ });
57
+ //#endregion
58
+ export { w as default };
@@ -0,0 +1,26 @@
1
+ import { AlertSlots } from './types';
2
+ import { PublicProps, VNode, Plugin } from 'vue';
3
+ export declare const SAlert: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
+ attrs: any;
5
+ slots: AlertSlots;
6
+ emit: (evt: "close") => void;
7
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
+ props: PublicProps & {
9
+ type?: "default" | "primary" | "success" | "warning" | "danger" | "info" | undefined;
10
+ size?: "small" | "medium" | "large" | undefined;
11
+ showIcon?: boolean | undefined;
12
+ title?: string | undefined;
13
+ content?: string | undefined;
14
+ closable?: boolean | undefined;
15
+ onClose?: (() => any) | undefined;
16
+ } & (typeof globalThis extends {
17
+ __VLS_PROPS_FALLBACK: infer P;
18
+ } ? P : {});
19
+ expose: (exposed: {}) => void;
20
+ attrs: any;
21
+ slots: AlertSlots;
22
+ emit: (evt: "close") => void;
23
+ }>) => VNode & {
24
+ __ctx?: Awaited<typeof __VLS_setup>;
25
+ }) & Plugin;
26
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ import { withInstall as e } from "../../../utils/src/install.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import t from "./alert.vue.mjs";
4
+ //#region ../components/src/alert/index.ts
5
+ var n = e(t);
6
+ //#endregion
7
+ export { n as SAlert };
@@ -0,0 +1,24 @@
1
+ export interface AlertProps {
2
+ /** 类型 */
3
+ type?: "default" | "primary" | "success" | "warning" | "danger" | "info";
4
+ /** 大小 */
5
+ size?: "small" | "medium" | "large";
6
+ /** 是否显示图标 */
7
+ showIcon?: boolean;
8
+ /** 标题 */
9
+ title?: string;
10
+ /** 内容 */
11
+ content?: string;
12
+ /** 是否可关闭 */
13
+ closable?: boolean;
14
+ }
15
+ export interface AlertSlots {
16
+ /** 默认 */
17
+ default?: () => any;
18
+ /** 标题 */
19
+ title?: () => any;
20
+ }
21
+ export interface AlertEmits {
22
+ /** 关闭 */
23
+ close: [];
24
+ }
@@ -1,17 +1,20 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
- import { useFormItem as t } from "../form/use-form-item.mjs";
4
- import { SPopover as n } from "../popover/index.mjs";
5
- import { SInput as r } from "../input/index.mjs";
6
- import i from "./cascader-column.vue.mjs";
7
- import { computed as a, createComponent as o, createComponentWithFallback as s, createIf as c, createInvoker as l, createTemplateRefSetter as u, defineVaporComponent as d, delegateEvents as f, mergeModels as p, on as ee, onMounted as m, ref as h, renderEffect as g, resolveComponent as _, setClass as v, setInsertionState as y, template as b, toRefs as x, unref as S, useModel as C, useTemplateRef as w, watch as T, withModifiers as E } from "vue";
3
+ import t from "../../../icons/src/down.vue.mjs";
4
+ import "../../../icons/index.mjs";
5
+ import { useFormItem as n } from "../form/use-form-item.mjs";
6
+ import { SPopover as r } from "../popover/index.mjs";
7
+ import { SInput as i } from "../input/index.mjs";
8
+ import { SEmpty as a } from "../empty/index.mjs";
9
+ import o from "./cascader-column.vue.mjs";
10
+ import { computed as s, createComponent as c, createComponentWithFallback as l, createIf as u, createInvoker as d, createTemplateRefSetter as f, defineVaporComponent as p, delegateEvents as m, mergeModels as h, on as g, onMounted as _, ref as v, renderEffect as y, resolveComponent as b, setClass as x, setInsertionState as S, template as C, toRefs as w, unref as T, useModel as E, useTemplateRef as D, watch as O, withModifiers as k } from "vue";
8
11
  //#region ../components/src/cascader/cascader.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
- var D = b("<div>"), O = b("<div>", 1);
10
- f("click");
11
- var k = /*@__PURE__*/ d({
12
+ var ee = C("<div style=\"padding: 12px\">"), A = C("<div>"), j = C("<div>", 1);
13
+ m("click");
14
+ var M = /*@__PURE__*/ p({
12
15
  name: "SCascader",
13
16
  __name: "cascader",
14
- props: /*@__PURE__*/ p({
17
+ props: /*@__PURE__*/ h({
15
18
  modelValue: {},
16
19
  options: { default: () => [] },
17
20
  placeholder: { default: "请选择" },
@@ -28,6 +31,7 @@ var k = /*@__PURE__*/ d({
28
31
  size: { default: "medium" },
29
32
  error: { type: Boolean },
30
33
  disabled: { type: Boolean },
34
+ clearable: { type: Boolean },
31
35
  checkStrictly: { type: Boolean },
32
36
  multiple: { type: Boolean }
33
37
  }, {
@@ -38,7 +42,7 @@ var k = /*@__PURE__*/ d({
38
42
  expanded: { default: () => [] },
39
43
  expandedModifiers: {}
40
44
  }),
41
- emits: /*@__PURE__*/ p([
45
+ emits: /*@__PURE__*/ h([
42
46
  "selectItem",
43
47
  "expand",
44
48
  "clear"
@@ -47,107 +51,114 @@ var k = /*@__PURE__*/ d({
47
51
  "update:expandedKeys",
48
52
  "update:expanded"
49
53
  ]),
50
- setup(d, { emit: f }) {
51
- let p = d, b = e("cascader"), k = f, A = C(d, "modelValue"), { size: j, error: M } = x(p), { mergedSize: N, mergedError: P } = t({
52
- size: j,
53
- error: M
54
- }), F = C(d, "expandedKeys"), I = C(d, "expanded"), L = a(() => ({
54
+ setup(p, { emit: m }) {
55
+ let h = p, C = e("cascader"), M = m, N = E(p, "modelValue"), { size: P, error: F } = w(h), { mergedSize: I, mergedError: L } = n({
56
+ size: P,
57
+ error: F
58
+ }), R = E(p, "expandedKeys"), z = E(p, "expanded"), B = s(() => ({
55
59
  label: "label",
56
60
  key: "key",
57
61
  children: "children",
58
- ...p.fieldNames
59
- })), R = h(""), z = ({ item: e, expandeds: t }) => {
60
- R.value = t.map((e) => e[L.value.label]).join(p.pathSeparator), U(!1), p.pathTextMode ? A.value = t.map((e) => e[L.value.key]).join(p.pathSeparator) : p.pathMode ? A.value = t.map((e) => e[L.value.key]) : A.value = e[L.value.key], k("selectItem", {
62
+ ...h.fieldNames
63
+ })), V = v(""), H = ({ item: e, expandeds: t }) => {
64
+ V.value = t.map((e) => e[B.value.label]).join(h.pathSeparator), K(!1), h.pathTextMode ? N.value = t.map((e) => e[B.value.key]).join(h.pathSeparator) : h.pathMode ? N.value = t.map((e) => e[B.value.key]) : N.value = e[B.value.key], M("selectItem", {
61
65
  item: e,
62
66
  expandeds: t
63
67
  });
64
- }, B = () => {
65
- k("expand", F.value);
66
- }, V = w("popoverRef"), H = h(!1), U = (e) => {
67
- H.value = e, e ? V.value?.show() : V.value?.hide();
68
- }, W = () => {
69
- let e = !H.value;
70
- e && J(), U(e);
71
- }, G = () => {
72
- U(!1);
73
- }, K = (e, t, n = []) => {
68
+ }, U = () => {
69
+ M("expand", R.value);
70
+ }, W = D("popoverRef"), G = v(!1), K = (e) => {
71
+ G.value = e, e ? W.value?.show() : W.value?.hide();
72
+ }, q = () => {
73
+ let e = !G.value;
74
+ e && Z(), K(e);
75
+ }, J = () => {
76
+ K(!1);
77
+ }, Y = (e, t, n = []) => {
74
78
  for (let r of e) {
75
79
  let e = [...n, r];
76
- if (r[L.value.key] === t) return e;
77
- if (r[L.value.children]) {
78
- let n = K(r[L.value.children], t, e);
80
+ if (r[B.value.key] === t) return e;
81
+ if (r[B.value.children]) {
82
+ let n = Y(r[B.value.children], t, e);
79
83
  if (n) return n;
80
84
  }
81
85
  }
82
86
  return null;
83
- }, q = (e, t) => {
87
+ }, X = (e, t) => {
84
88
  let n = [], r = e;
85
89
  for (let e of t) {
86
- let t = r.find((t) => t[L.value.key] === e);
90
+ let t = r.find((t) => t[B.value.key] === e);
87
91
  if (!t) return null;
88
- n.push(t), r = t[L.value.children] || [];
92
+ n.push(t), r = t[B.value.children] || [];
89
93
  }
90
94
  return n;
91
- }, J = () => {
92
- if (A.value !== void 0) {
95
+ }, Z = () => {
96
+ if (N.value !== void 0) {
93
97
  let e = null;
94
- if (p.pathTextMode && typeof A.value == "string") {
95
- let t = A.value.split(p.pathSeparator);
96
- e = q(p.options, t);
97
- } else e = Array.isArray(A.value) ? q(p.options, A.value) : K(p.options, A.value);
98
- e && (F.value = e.map((e) => e[L.value.key]), I.value = e, R.value = e.map((e) => e[L.value.label]).join(p.pathSeparator));
98
+ if (h.pathTextMode && typeof N.value == "string") {
99
+ let t = N.value.split(h.pathSeparator);
100
+ e = X(h.options, t);
101
+ } else e = Array.isArray(N.value) ? X(h.options, N.value) : Y(h.options, N.value);
102
+ e && (R.value = e.map((e) => e[B.value.key]), z.value = e, V.value = e.map((e) => e[B.value.label]).join(h.pathSeparator));
99
103
  }
100
- }, Y = (e) => {
101
- A.value === void 0 ? e.forEach((e) => {
102
- F.value.includes(e[L.value.key]) && (R.value = R.value ? `${R.value}${p.pathSeparator}${e[L.value.label]}` : e[L.value.label], e[L.value.children] && Y(e[L.value.children]));
103
- }) : J();
104
- }, X = () => {
105
- A.value = "", k("clear");
104
+ }, Q = (e) => {
105
+ N.value === void 0 ? e.forEach((e) => {
106
+ R.value.includes(e[B.value.key]) && (V.value = V.value ? `${V.value}${h.pathSeparator}${e[B.value.label]}` : e[B.value.label], e[B.value.children] && Q(e[B.value.children]));
107
+ }) : Z();
108
+ }, te = () => {
109
+ N.value = "", R.value = [], z.value = [], V.value = "", M("clear");
106
110
  };
107
- T(A, () => {
108
- J();
109
- }), m(() => {
110
- Y(p.options);
111
+ O(N, () => {
112
+ Z();
113
+ }), _(() => {
114
+ Q(h.options);
111
115
  });
112
- let Z = u(), Q = _("SEmpty"), $ = O();
113
- return g(() => v($, [S(b).b()])), y($, null, 0), Z(o(S(n), { $: [() => ({
116
+ let ne = f(), re = b("SIcon"), $ = j();
117
+ return y(() => x($, [T(C).b()])), S($, null, 0), ne(c(T(r), { $: [() => ({
114
118
  offset: [0, 4],
115
119
  placement: "bottom-start",
116
120
  manual: !0,
117
- ...d.popoverProps
118
- }), { onClickOutside: () => G }] }, {
121
+ ...p.popoverProps
122
+ }), { onClickOutside: () => J }] }, {
119
123
  content: () => {
120
- let e = D();
121
- return g(() => v(e, [S(b).e("wrapper")])), y(e, null, 0), c(() => !d.options.length, () => s(Q), () => {
122
- let e = D();
123
- return g(() => v(e, [S(b).e("panel")])), y(e, null, 0), o(i, {
124
- expandTrigger: () => d.expandTrigger,
125
- fieldNames: () => d.fieldNames,
126
- options: () => d.options,
127
- onClickItem: () => z,
128
- onExpand: () => B,
129
- modelValue: () => A.value,
130
- "onUpdate:modelValue": () => (e) => A.value = e,
131
- expanded: () => I.value,
132
- "onUpdate:expanded": () => (e) => I.value = e,
133
- expandedKeys: () => F.value,
134
- "onUpdate:expandedKeys": () => (e) => F.value = e
124
+ let e = A();
125
+ return y(() => x(e, [T(C).e("wrapper")])), S(e, null, 0), u(() => !p.options.length, () => {
126
+ let e = ee();
127
+ return S(e, null, 0), c(T(a)), e;
128
+ }, () => {
129
+ let e = A();
130
+ return y(() => x(e, [T(C).e("panel")])), S(e, null, 0), c(o, {
131
+ expandTrigger: () => p.expandTrigger,
132
+ fieldNames: () => p.fieldNames,
133
+ options: () => p.options,
134
+ onClickItem: () => H,
135
+ onExpand: () => U,
136
+ modelValue: () => N.value,
137
+ "onUpdate:modelValue": () => (e) => N.value = e,
138
+ expanded: () => z.value,
139
+ "onUpdate:expanded": () => (e) => z.value = e,
140
+ expandedKeys: () => R.value,
141
+ "onUpdate:expandedKeys": () => (e) => R.value = e
135
142
  }), e;
136
- }, 261), ee(e, "click", E(() => {}, ["stop"])), e;
143
+ }, 261), g(e, "click", k(() => {}, ["stop"])), e;
137
144
  },
138
- default: () => o(S(r), {
139
- placeholder: () => d.placeholder,
140
- disabled: () => d.disabled,
141
- error: () => S(P),
142
- size: () => S(N),
143
- modelValue: () => R.value,
144
- "onUpdate:modelValue": () => (e) => R.value = e,
145
+ default: () => c(T(i), {
146
+ placeholder: () => p.placeholder,
147
+ disabled: () => p.disabled,
148
+ error: () => T(L),
149
+ size: () => T(I),
150
+ modelValue: () => V.value,
151
+ "onUpdate:modelValue": () => (e) => V.value = e,
145
152
  readonly: "",
153
+ clearable: () => p.clearable,
146
154
  style: "width: 100%",
147
- onClear: () => X
148
- })
149
- }), V, null, "popoverRef"), $.$evtclick = l(W), $;
155
+ onClear: () => te
156
+ }, { suffix: () => l(re, {
157
+ class: () => [T(C).e("suffix-icon")],
158
+ style: () => ({ transform: G.value ? "rotate(180deg)" : "" })
159
+ }, () => c(T(t))) })
160
+ }), W, null, "popoverRef"), $.$evtclick = d(q), $;
150
161
  }
151
162
  });
152
163
  //#endregion
153
- export { k as default };
164
+ export { M as default };
@@ -26,6 +26,7 @@ export declare const SCascader: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
26
26
  size?: "mini" | "small" | "medium" | "large" | undefined;
27
27
  error?: boolean | undefined;
28
28
  disabled?: boolean | undefined;
29
+ clearable?: boolean | undefined;
29
30
  checkStrictly?: boolean | undefined;
30
31
  multiple?: boolean | undefined;
31
32
  expandedKeys?: Array<string | number> | undefined;
@@ -32,6 +32,8 @@ export interface CascaderProps {
32
32
  error?: boolean;
33
33
  /** 是否禁用 */
34
34
  disabled?: boolean;
35
+ /** 是否可清除 */
36
+ clearable?: boolean;
35
37
  /** 是否严格选择子项 */
36
38
  checkStrictly?: boolean;
37
39
  /** 是否支持多选 */
@@ -0,0 +1,35 @@
1
+ import { ChatListProps, ChatListItemProps } from './types';
2
+ import { PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: PublicProps & __VLS_PrettifyLocal<ChatListProps> & (typeof globalThis extends {
5
+ __VLS_PROPS_FALLBACK: infer P;
6
+ } ? P : {});
7
+ expose: (exposed: ShallowUnwrapRef<{
8
+ scrollToTop: () => void;
9
+ scrollToBottom: () => void;
10
+ }>) => void;
11
+ attrs: any;
12
+ slots: {
13
+ 'user-text'?: (props: {
14
+ item: ChatListItemProps;
15
+ }) => any;
16
+ } & {
17
+ 'assistant-text'?: (props: {
18
+ item: ChatListItemProps;
19
+ }) => any;
20
+ } & {
21
+ extra?: (props: {
22
+ item: ChatListItemProps;
23
+ }) => any;
24
+ };
25
+ emit: {};
26
+ }>) => VNode & {
27
+ __ctx?: Awaited<typeof __VLS_setup>;
28
+ };
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
32
+ [K in keyof T]: T[K];
33
+ } : {
34
+ [K in keyof T as K]: T[K];
35
+ }) & {};
@@ -0,0 +1,5 @@
1
+ import e from "./chat-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs";
2
+ //#region ../components/src/chat-list/chat-list.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,55 @@
1
+ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
+ import "../../../hooks/index.mjs";
3
+ import { SScrollbar as t } from "../scrollbar/index.mjs";
4
+ import { child as n, createComponent as r, createFor as i, createIf as a, createSlot as o, defineVaporComponent as s, next as c, renderEffect as l, setClass as u, setInsertionState as d, setStaticTemplateRef as f, setText as p, template as m, toDisplayString as h, unref as g, useTemplateRef as _ } from "vue";
5
+ //#region ../components/src/chat-list/chat-list.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
+ var v = m(" "), y = m("<div><div><div></div></div><div>U</div>"), b = m("<div><div>AI</div><div><div></div></div>"), x = m("<div>"), S = m("<div>", 1), C = /*@__PURE__*/ s({
7
+ name: "SChatList",
8
+ __name: "chat-list",
9
+ props: { data: { default: () => [] } },
10
+ setup(s, { expose: m, slots: C }) {
11
+ let w = s, T = e("chat-list"), E = _("scrollRef");
12
+ m({
13
+ scrollToTop: () => {
14
+ E.value?.scrollTo(0);
15
+ },
16
+ scrollToBottom: () => {
17
+ E.value?.scrollToEnd("y", !1);
18
+ }
19
+ });
20
+ let D = S();
21
+ return l(() => u(D, [g(T).b()])), d(D, null, 0), f(r(g(t), { padding: "20px" }, () => {
22
+ let e = x();
23
+ return l(() => u(e, [g(T).e("list")])), d(e, null, 0), i(() => w.data, (e) => {
24
+ let t = x();
25
+ return l(() => u(t, [g(T).e("item")])), d(t, null, 0), a(() => e.value.role === "user", () => {
26
+ let t = y(), r = n(t), i = n(r), a = c(r, 1);
27
+ return l(() => {
28
+ let e = g(T);
29
+ u(t, [e.e("user")]), u(r, [e.e("content"), e.e("user-content")]), u(i, [e.e("text"), e.e("user-text")]);
30
+ }), d(i, null, 0), o("user-text", { item: () => e.value }, () => {
31
+ let t = v();
32
+ return l(() => p(t, h(e.value?.content?.[0]?.data))), t;
33
+ }), l(() => {
34
+ let e = g(T);
35
+ u(a, [e.e("avatar"), e.e("user-avatar")]);
36
+ }), t;
37
+ }, () => a(() => e.value.role === "assistant", () => {
38
+ let t = b(), r = n(t), i = c(r, 1), a = n(i);
39
+ return l(() => {
40
+ let e = g(T);
41
+ u(t, [e.e("assistant")]), u(r, [e.e("avatar"), e.e("assistant-avatar")]), u(i, [e.e("content"), e.e("assistant-content")]), u(a, [e.e("text"), e.e("assistant-text")]);
42
+ }), d(a, null, 0), o("assistant-text", { item: () => e.value }, () => {
43
+ let t = v();
44
+ return l(() => p(t, h(e.value?.content?.[0]?.data))), t;
45
+ }), t;
46
+ }), 261), d(t, null, 1), a(() => C.extra, () => {
47
+ let t = x();
48
+ return l(() => u(t, [g(T).e("extra")])), d(t, null, 0), o("extra", { item: () => e.value }), t;
49
+ }), t;
50
+ }, (e) => e.datetime, 9), e;
51
+ }), E, null, "scrollRef"), D;
52
+ }
53
+ });
54
+ //#endregion
55
+ export { C as default };