vue-element-ui-x 0.2.2 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/lib/components/Attachments/index.js +18 -18
  2. package/lib/components/Bubble/index.js +145 -155
  3. package/lib/components/BubbleList/index.js +180 -207
  4. package/lib/components/Conversations/index.js +14370 -14370
  5. package/lib/components/FilesCard/index.js +5 -5
  6. package/lib/components/Prompts/index.js +25 -25
  7. package/lib/components/Sender/index.js +1606 -1459
  8. package/lib/components/Thinking/index.js +157 -23
  9. package/lib/components/ThoughtChain/index.js +143 -144
  10. package/lib/components/Typewriter/index.js +124 -125
  11. package/lib/components/Welcome/index.js +5 -5
  12. package/lib/index.common.js +1 -1
  13. package/lib/index.esm.js +1 -1
  14. package/lib/index.js +817 -389
  15. package/lib/index.umd.js +1 -1
  16. package/lib/locale/index.js +97 -0
  17. package/lib/locale/lang/ar-SA.js +18 -0
  18. package/lib/locale/lang/ar-SA.umd.js +26 -0
  19. package/lib/locale/lang/ar.js +18 -0
  20. package/lib/locale/lang/ar.umd.js +26 -0
  21. package/lib/locale/lang/de-DE.js +18 -0
  22. package/lib/locale/lang/de-DE.umd.js +26 -0
  23. package/lib/locale/lang/de.js +18 -0
  24. package/lib/locale/lang/de.umd.js +26 -0
  25. package/lib/locale/lang/en.js +18 -0
  26. package/lib/locale/lang/en.umd.js +26 -0
  27. package/lib/locale/lang/es-ES.js +18 -0
  28. package/lib/locale/lang/es-ES.umd.js +26 -0
  29. package/lib/locale/lang/es.js +18 -0
  30. package/lib/locale/lang/es.umd.js +26 -0
  31. package/lib/locale/lang/fr-FR.js +18 -0
  32. package/lib/locale/lang/fr-FR.umd.js +26 -0
  33. package/lib/locale/lang/fr.js +18 -0
  34. package/lib/locale/lang/fr.umd.js +26 -0
  35. package/lib/locale/lang/index.js +50 -0
  36. package/lib/locale/lang/it-IT.js +18 -0
  37. package/lib/locale/lang/it-IT.umd.js +26 -0
  38. package/lib/locale/lang/it.js +18 -0
  39. package/lib/locale/lang/it.umd.js +26 -0
  40. package/lib/locale/lang/ja-JP.js +18 -0
  41. package/lib/locale/lang/ja-JP.umd.js +26 -0
  42. package/lib/locale/lang/ja.js +18 -0
  43. package/lib/locale/lang/ja.umd.js +26 -0
  44. package/lib/locale/lang/ko-KR.js +18 -0
  45. package/lib/locale/lang/ko-KR.umd.js +26 -0
  46. package/lib/locale/lang/ko.js +18 -0
  47. package/lib/locale/lang/ko.umd.js +26 -0
  48. package/lib/locale/lang/pt-BR.js +18 -0
  49. package/lib/locale/lang/pt-BR.umd.js +26 -0
  50. package/lib/locale/lang/ru-RU.js +18 -0
  51. package/lib/locale/lang/ru-RU.umd.js +26 -0
  52. package/lib/locale/lang/zh-CN.js +18 -0
  53. package/lib/locale/lang/zh-CN.umd.js +26 -0
  54. package/lib/locale/lang/zh-TW.js +18 -0
  55. package/lib/locale/lang/zh-TW.umd.js +26 -0
  56. package/lib/locale/mixin.js +9 -0
  57. package/package.json +15 -10
  58. package/src/components/Attachments/src/main.vue +2 -10
  59. package/src/components/Bubble/src/main.vue +288 -299
  60. package/src/components/BubbleList/src/main.vue +2 -19
  61. package/src/components/Conversations/src/main.vue +0 -41
  62. package/src/components/Prompts/src/main.vue +248 -248
  63. package/src/components/Sender/src/components/LoadingButton.vue +37 -39
  64. package/src/components/Sender/src/components/SpeechLoadingButton.vue +41 -43
  65. package/src/components/Sender/src/main.vue +13 -3
  66. package/src/components/Thinking/src/main.vue +13 -9
  67. package/src/components/ThoughtChain/src/main.vue +1 -3
  68. package/src/components/Typewriter/src/main.vue +3 -7
  69. package/src/components/Welcome/src/main.vue +151 -151
  70. package/src/index.js +23 -6
  71. package/src/locale/index.js +97 -0
  72. package/src/locale/lang/ar.js +18 -0
  73. package/src/locale/lang/de.js +18 -0
  74. package/src/locale/lang/en.js +18 -0
  75. package/src/locale/lang/es.js +18 -0
  76. package/src/locale/lang/fr.js +18 -0
  77. package/src/locale/lang/index.js +62 -0
  78. package/src/locale/lang/it.js +18 -0
  79. package/src/locale/lang/ja.js +18 -0
  80. package/src/locale/lang/ko.js +18 -0
  81. package/src/locale/lang/pt-br.js +18 -0
  82. package/src/locale/lang/ru-RU.js +18 -0
  83. package/src/locale/lang/zh-CN.js +18 -0
  84. package/src/locale/lang/zh-TW.js +18 -0
  85. package/src/locale/mixin.js +9 -0
  86. package/src/styles/Attachments.scss +236 -236
  87. package/src/styles/Bubble.scss +5 -4
  88. package/src/styles/BubbleList.scss +148 -148
  89. package/src/styles/Conversations.scss +260 -260
  90. package/src/styles/FilesCard.scss +222 -221
  91. package/src/styles/Prompts.scss +197 -195
  92. package/src/styles/Sender.scss +207 -199
  93. package/src/styles/Thinking.scss +36 -6
  94. package/src/styles/ThoughtChain.scss +113 -113
  95. package/src/styles/Typewriter.scss +66 -66
  96. package/src/styles/var.scss +4 -5
  97. package/src/theme/var.scss +183 -72
@@ -1,195 +1,197 @@
1
- @import '../theme/var.scss';
2
-
3
- // 移动设备断点
4
- $--mobile-breakpoint: 768px;
5
-
6
- // Prompts 组件样式
7
- .el-x-prompts {
8
- // 基础样式
9
- &,
10
- & * {
11
- box-sizing: border-box;
12
- }
13
-
14
- max-width: 100%;
15
-
16
- // RTL 支持
17
- &.el-x-prompts-rtl {
18
- direction: rtl;
19
- }
20
-
21
- // 标题样式
22
- .el-x-prompts-title {
23
- font-weight: normal;
24
- font-size: $--el-x-font-size-medium;
25
- color: $--color-text-secondary;
26
- margin-top: 0;
27
- margin-bottom: 0.5em;
28
- }
29
-
30
- // 列表样式
31
- .el-x-prompts-list {
32
- display: flex;
33
- gap: $--el-x-padding-sm;
34
- overflow-x: auto;
35
- // 隐藏滚动条
36
- scrollbar-width: none;
37
- -ms-overflow-style: none;
38
- &::-webkit-scrollbar {
39
- display: none;
40
- }
41
- list-style: none;
42
- padding-left: 0;
43
- margin: 0;
44
- align-items: stretch;
45
-
46
- // 换行
47
- &-wrap {
48
- flex-wrap: wrap;
49
- }
50
-
51
- // 垂直排列
52
- &-vertical {
53
- flex-direction: column;
54
- align-items: flex-start;
55
- }
56
-
57
- // 移动设备响应式
58
- @media screen and (max-width: $--mobile-breakpoint) {
59
- flex-wrap: wrap;
60
- gap: 8px;
61
-
62
- &-wrap {
63
- justify-content: space-between;
64
- }
65
- }
66
- }
67
-
68
- // 项目样式
69
- .el-x-prompts-item {
70
- flex: none;
71
- display: flex;
72
- gap: 4px;
73
- height: auto;
74
- padding: $--el-x-padding-md $--el-x-padding-lg;
75
- align-items: flex-start;
76
- justify-content: flex-start;
77
- background: $--color-white;
78
- border-radius: $--el-x-border-radius-md;
79
- transition: border $--all-transition, background $--all-transition;
80
- border: $--border-width-base $--border-style-base $--border-color-lighter;
81
-
82
- // 移动设备响应式
83
- @media screen and (max-width: $--mobile-breakpoint) {
84
- width: calc(50% - 4px); // 小屏幕上默认两列布局
85
- min-width: 150px;
86
- padding: $--el-x-padding-sm $--el-x-padding-md;
87
-
88
- .el-x-prompts-list-wrap & {
89
- width: calc(50% - 4px);
90
- margin-bottom: 8px;
91
- }
92
-
93
- .el-x-prompts-list-vertical & {
94
- width: 100%;
95
- }
96
- }
97
-
98
- &:not(.el-x-prompts-item-has-nest) {
99
- &:hover {
100
- cursor: pointer;
101
- background: $--background-color-base;
102
- }
103
-
104
- &:active {
105
- background: $--color-primary-light-9;
106
- }
107
- }
108
-
109
- // 内容样式
110
- .el-x-prompts-content {
111
- flex: auto;
112
- min-width: 0;
113
- display: flex;
114
- gap: 4px;
115
- flex-direction: column;
116
- align-items: flex-start;
117
-
118
- // 移动设备响应式
119
- @media screen and (max-width: $--mobile-breakpoint) {
120
- width: 100%;
121
- gap: 2px;
122
- }
123
- }
124
-
125
- // 图标、标签和描述共同样式
126
- .el-x-prompts-icon,
127
- .el-x-prompts-label,
128
- .el-x-prompts-desc {
129
- margin: 0;
130
- padding: 0;
131
- font-size: $--el-x-font-size-base;
132
- line-height: $--el-x-font-line-height-primary;
133
- text-align: start;
134
- white-space: normal;
135
-
136
- // 移动设备响应式
137
- @media screen and (max-width: $--mobile-breakpoint) {
138
- font-size: 14px;
139
- line-height: 1.4;
140
- overflow: hidden;
141
- text-overflow: ellipsis;
142
- display: -webkit-box;
143
- -webkit-line-clamp: 2;
144
- -webkit-box-orient: vertical;
145
- }
146
- }
147
-
148
- // 标签样式
149
- .el-x-prompts-label {
150
- color: $--color-text-primary;
151
- font-weight: 500;
152
- }
153
-
154
- // 描述样式
155
- .el-x-prompts-label + .el-x-prompts-desc {
156
- color: $--color-text-secondary;
157
- }
158
-
159
- // 禁用状态
160
- &.el-x-prompts-item-disabled {
161
- pointer-events: none;
162
- background: $--background-color-base;
163
-
164
- .el-x-prompts-label,
165
- .el-x-prompts-desc {
166
- color: $--color-text-secondary;
167
- }
168
- }
169
- }
170
-
171
- // 嵌套样式
172
- .el-x-prompts-item-has-nest {
173
- > .el-x-prompts-content {
174
- > .el-x-prompts-label {
175
- font-size: $--font-size-large;
176
- line-height: $--font-line-height-primary;
177
- }
178
- }
179
- }
180
-
181
- // 嵌套组件样式
182
- &.el-x-prompts-nested {
183
- margin-top: 5px;
184
- align-self: stretch;
185
-
186
- .el-x-prompts-list {
187
- align-items: stretch;
188
- }
189
-
190
- .el-x-prompts-item {
191
- border: 0;
192
- background: $--background-color-base;
193
- }
194
- }
195
- }
1
+ @import '../theme/var.scss';
2
+
3
+ // 移动设备断点
4
+ $--mobile-breakpoint: 768px;
5
+
6
+ // Prompts 组件样式
7
+ .el-x-prompts {
8
+ max-width: 100%;
9
+
10
+ &,
11
+ & * {
12
+ box-sizing: border-box;
13
+ }
14
+
15
+
16
+ // RTL 支持
17
+ &.el-x-prompts-rtl {
18
+ direction: rtl;
19
+ }
20
+
21
+ // 标题样式
22
+ .el-x-prompts-title {
23
+ font-weight: normal;
24
+ font-size: $--el-x-font-size-medium;
25
+ color: $--color-text-secondary;
26
+ margin-top: 0;
27
+ margin-bottom: 0.5em;
28
+ }
29
+
30
+ // 列表样式
31
+ .el-x-prompts-list {
32
+ display: flex;
33
+ gap: $--el-x-padding-sm;
34
+ overflow-x: auto;
35
+ // 隐藏滚动条
36
+ scrollbar-width: none;
37
+ -ms-overflow-style: none;
38
+
39
+ &::-webkit-scrollbar {
40
+ display: none;
41
+ }
42
+
43
+ list-style: none;
44
+ padding-left: 0;
45
+ margin: 0;
46
+ align-items: stretch;
47
+
48
+ // 换行
49
+ &-wrap {
50
+ flex-wrap: wrap;
51
+ }
52
+
53
+ // 垂直排列
54
+ &-vertical {
55
+ flex-direction: column;
56
+ align-items: flex-start;
57
+ }
58
+
59
+ // 移动设备响应式
60
+ @media screen and (max-width: $--mobile-breakpoint) {
61
+ flex-wrap: wrap;
62
+ gap: 8px;
63
+
64
+ &-wrap {
65
+ justify-content: space-between;
66
+ }
67
+ }
68
+ }
69
+
70
+ // 项目样式
71
+ .el-x-prompts-item {
72
+ flex: none;
73
+ display: flex;
74
+ gap: 4px;
75
+ height: auto;
76
+ padding: $--el-x-padding-md $--el-x-padding-lg;
77
+ align-items: flex-start;
78
+ justify-content: flex-start;
79
+ background: $--color-white;
80
+ border-radius: $--el-x-border-radius-md;
81
+ transition: border $--all-transition, background $--all-transition;
82
+ border: $--border-width-base $--border-style-base $--border-color-lighter;
83
+
84
+ // 移动设备响应式
85
+ @media screen and (max-width: $--mobile-breakpoint) {
86
+ width: calc(50% - 4px); // 小屏幕上默认两列布局
87
+ min-width: 150px;
88
+ padding: $--el-x-padding-sm $--el-x-padding-md;
89
+
90
+ .el-x-prompts-list-wrap & {
91
+ width: calc(50% - 4px);
92
+ margin-bottom: 8px;
93
+ }
94
+
95
+ .el-x-prompts-list-vertical & {
96
+ width: 100%;
97
+ }
98
+ }
99
+
100
+ &:not(.el-x-prompts-item-has-nest) {
101
+ &:hover {
102
+ cursor: pointer;
103
+ background: $--background-color-base;
104
+ }
105
+
106
+ &:active {
107
+ background: $--color-primary-light-9;
108
+ }
109
+ }
110
+
111
+ // 内容样式
112
+ .el-x-prompts-content {
113
+ flex: auto;
114
+ min-width: 0;
115
+ display: flex;
116
+ gap: 4px;
117
+ flex-direction: column;
118
+ align-items: flex-start;
119
+
120
+ // 移动设备响应式
121
+ @media screen and (max-width: $--mobile-breakpoint) {
122
+ width: 100%;
123
+ gap: 2px;
124
+ }
125
+ }
126
+
127
+ // 图标、标签和描述共同样式
128
+ .el-x-prompts-icon,
129
+ .el-x-prompts-label,
130
+ .el-x-prompts-desc {
131
+ margin: 0;
132
+ padding: 0;
133
+ font-size: $--el-x-font-size-base;
134
+ line-height: $--el-x-font-line-height-primary;
135
+ text-align: start;
136
+ white-space: normal;
137
+
138
+ // 移动设备响应式
139
+ @media screen and (max-width: $--mobile-breakpoint) {
140
+ font-size: 14px;
141
+ line-height: 1.4;
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ display: -webkit-box;
145
+ -webkit-line-clamp: 2;
146
+ -webkit-box-orient: vertical;
147
+ }
148
+ }
149
+
150
+ // 标签样式
151
+ .el-x-prompts-label {
152
+ color: $--color-text-primary;
153
+ font-weight: 500;
154
+ }
155
+
156
+ // 描述样式
157
+ .el-x-prompts-label+.el-x-prompts-desc {
158
+ color: $--color-text-secondary;
159
+ }
160
+
161
+ // 禁用状态
162
+ &.el-x-prompts-item-disabled {
163
+ pointer-events: none;
164
+ background: $--background-color-base;
165
+
166
+ .el-x-prompts-label,
167
+ .el-x-prompts-desc {
168
+ color: $--color-text-secondary;
169
+ }
170
+ }
171
+ }
172
+
173
+ // 嵌套样式
174
+ .el-x-prompts-item-has-nest {
175
+ >.el-x-prompts-content {
176
+ >.el-x-prompts-label {
177
+ font-size: $--font-size-large;
178
+ line-height: $--font-line-height-primary;
179
+ }
180
+ }
181
+ }
182
+
183
+ // 嵌套组件样式
184
+ &.el-x-prompts-nested {
185
+ margin-top: 5px;
186
+ align-self: stretch;
187
+
188
+ .el-x-prompts-list {
189
+ align-items: stretch;
190
+ }
191
+
192
+ .el-x-prompts-item {
193
+ border: 0;
194
+ background: $--background-color-base;
195
+ }
196
+ }
197
+ }