@ruixinkeji/prism-ui 1.0.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 (48) hide show
  1. package/README.md +141 -0
  2. package/components/PrismAIAssist/PrismAIAssist.vue +98 -0
  3. package/components/PrismAddressInput/PrismAddressInput.vue +597 -0
  4. package/components/PrismCityCascadeSelect/PrismCityCascadeSelect.vue +793 -0
  5. package/components/PrismCityPicker/PrismCityPicker.vue +1008 -0
  6. package/components/PrismCitySelect/PrismCitySelect.vue +435 -0
  7. package/components/PrismCode/PrismCode.vue +749 -0
  8. package/components/PrismCodeInput/PrismCodeInput.vue +156 -0
  9. package/components/PrismDateTimePicker/PrismDateTimePicker.vue +953 -0
  10. package/components/PrismDropdown/PrismDropdown.vue +77 -0
  11. package/components/PrismGroupSticky/PrismGroupSticky.vue +352 -0
  12. package/components/PrismIdCardInput/PrismIdCardInput.vue +253 -0
  13. package/components/PrismImagePicker/PrismImagePicker.vue +457 -0
  14. package/components/PrismIndexBar/PrismIndexBar.vue +243 -0
  15. package/components/PrismLicensePlateInput/PrismLicensePlateInput.vue +1100 -0
  16. package/components/PrismMusicPlayer/PrismMusicPlayer.vue +530 -0
  17. package/components/PrismNavBar/PrismNavBar.vue +199 -0
  18. package/components/PrismSecureInput/PrismSecureInput.vue +360 -0
  19. package/components/PrismSticky/PrismSticky.vue +173 -0
  20. package/components/PrismSwiper/PrismSwiper.vue +339 -0
  21. package/components/PrismSwitch/PrismSwitch.vue +202 -0
  22. package/components/PrismTabBar/PrismTabBar.vue +147 -0
  23. package/components/PrismTabs/PrismTabs.vue +49 -0
  24. package/components/PrismVoiceInput/PrismVoiceInput.vue +529 -0
  25. package/index.d.ts +24 -0
  26. package/index.esm.js +25 -0
  27. package/index.js +25 -0
  28. package/package.json +89 -0
  29. package/styles/base.scss +227 -0
  30. package/styles/button.scss +120 -0
  31. package/styles/card.scss +306 -0
  32. package/styles/colors.scss +877 -0
  33. package/styles/data.scss +1229 -0
  34. package/styles/effects.scss +407 -0
  35. package/styles/feedback.scss +698 -0
  36. package/styles/form.scss +1574 -0
  37. package/styles/index.scss +46 -0
  38. package/styles/list.scss +184 -0
  39. package/styles/navigation.scss +554 -0
  40. package/styles/overlay.scss +182 -0
  41. package/styles/utilities.scss +134 -0
  42. package/styles/variables.scss +138 -0
  43. package/theme/blue.scss +36 -0
  44. package/theme/cyan.scss +32 -0
  45. package/theme/green.scss +32 -0
  46. package/theme/orange.scss +32 -0
  47. package/theme/purple.scss +32 -0
  48. package/theme/red.scss +32 -0
@@ -0,0 +1,306 @@
1
+ /**
2
+ * Prism UI - 卡片和容器组件样式
3
+ *
4
+ * 基础样式 .prism-card-base 定义在 @/styles/colors.scss
5
+ */
6
+
7
+ /* ============================================================
8
+ prism-card - 卡片容器(带背景)
9
+
10
+ 结构:
11
+ .prism-card
12
+ .card-title - 卡片标题(带左侧色块)
13
+ .card-desc - 卡片描述
14
+ 内容
15
+ ============================================================ */
16
+
17
+ .prism-card {
18
+ position: relative;
19
+ border-radius: 20rpx;
20
+ padding: 32rpx;
21
+ transition: all 0.2s ease;
22
+ background: var(--prism-bg-color-card, #FFFFFF);
23
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
24
+
25
+ .dark-mode & {
26
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
27
+ }
28
+
29
+ // 卡片标题(带左侧色块)
30
+ .card-title {
31
+ font-size: 32rpx;
32
+ font-weight: 600;
33
+ color: var(--prism-text-primary, #1D2129);
34
+ margin-bottom: $prism-section-spacing;
35
+ padding-left: 16rpx;
36
+ position: relative;
37
+ display: flex;
38
+ align-items: center;
39
+
40
+ &::before {
41
+ content: '';
42
+ position: absolute;
43
+ left: 0;
44
+ top: 50%;
45
+ transform: translateY(-50%);
46
+ width: 6rpx;
47
+ height: 32rpx;
48
+ background: var(--prism-primary-color, #3478F6);
49
+ border-radius: 3rpx;
50
+ }
51
+
52
+ .dark-mode & {
53
+ color: var(--prism-text-primary, #E5E6EB);
54
+ }
55
+ }
56
+
57
+ // 卡片描述
58
+ .card-desc {
59
+ display: block;
60
+ font-size: 24rpx;
61
+ color: var(--prism-text-secondary, #86909C);
62
+ margin-bottom: 16rpx;
63
+ line-height: 1.5;
64
+
65
+ .dark-mode & {
66
+ color: var(--prism-text-secondary, #A9AEB8);
67
+ }
68
+ }
69
+
70
+ // 子区块(复用 prism-section 的 subsection 结构)
71
+ .subsection {
72
+ margin-bottom: $prism-section-spacing;
73
+
74
+ &:last-child {
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+
79
+ .subsection-title {
80
+ font-size: 26rpx;
81
+ color: var(--prism-text-secondary, #86909C);
82
+ margin-bottom: 16rpx;
83
+
84
+ .dark-mode & {
85
+ color: var(--prism-text-secondary, #A9AEB8);
86
+ }
87
+ }
88
+
89
+ .subsection-desc {
90
+ font-size: 24rpx;
91
+ color: var(--prism-text-secondary, #86909C);
92
+ padding: 16rpx 24rpx;
93
+ margin-bottom: 16rpx;
94
+ background: var(--prism-bg-color, #F7F8FA);
95
+ border-radius: 8rpx;
96
+ line-height: 1.5;
97
+
98
+ .dark-mode & {
99
+ background: rgba(255, 255, 255, 0.06);
100
+ color: var(--prism-text-secondary, #A9AEB8);
101
+ }
102
+ }
103
+ }
104
+
105
+
106
+ /* ============================================================
107
+ prism-section - 区块容器(透明背景)
108
+
109
+ 结构:
110
+ .prism-section
111
+ .section-title - 区块标题
112
+ .section-desc - 区块描述
113
+ .subsection - 子区块
114
+ .subsection-title - 子区块标题
115
+ .subsection-desc - 子区块描述
116
+ 内容
117
+ ============================================================ */
118
+
119
+ .prism-section {
120
+ padding: $prism-section-spacing $prism-page-spacing;
121
+
122
+ // 相邻 section 之间的间距(减半避免叠加过大)
123
+ & + & {
124
+ padding-bottom: calc($prism-section-spacing / 2);
125
+ }
126
+
127
+ // 区块标题
128
+ .section-title {
129
+ font-size: 32rpx;
130
+ font-weight: 600;
131
+ color: var(--prism-text-primary, #1D2129);
132
+ margin-bottom: $prism-section-spacing;
133
+
134
+ .dark-mode & {
135
+ color: var(--prism-text-primary, #E5E6EB);
136
+ }
137
+ }
138
+
139
+ // 区块描述
140
+ .section-desc {
141
+ font-size: 24rpx;
142
+ color: var(--prism-text-secondary, #86909C);
143
+ margin-bottom: 16rpx;
144
+ line-height: 1.5;
145
+
146
+ .dark-mode & {
147
+ color: var(--prism-text-secondary, #A9AEB8);
148
+ }
149
+ }
150
+
151
+ // prism-section 内的卡片间距(排除 glass 形态)
152
+ .prism-card:not(.glass) {
153
+ margin-bottom: $prism-section-spacing;
154
+
155
+ &:last-child {
156
+ margin-bottom: 0;
157
+ }
158
+ }
159
+
160
+ // 子区块
161
+ .subsection {
162
+ margin-bottom: $prism-section-spacing;
163
+
164
+ &:last-child {
165
+ margin-bottom: 0;
166
+ }
167
+ }
168
+
169
+ // 子区块标题
170
+ .subsection-title {
171
+ font-size: 26rpx;
172
+ color: var(--prism-text-secondary, #86909C);
173
+ margin-bottom: 16rpx;
174
+
175
+ .dark-mode & {
176
+ color: var(--prism-text-secondary, #A9AEB8);
177
+ }
178
+ }
179
+
180
+ // 子区块描述
181
+ .subsection-desc {
182
+ font-size: 24rpx;
183
+ color: var(--prism-text-secondary, #86909C);
184
+ padding: 16rpx 24rpx;
185
+ margin-bottom: 16rpx;
186
+ background: var(--prism-bg-color, #F7F8FA);
187
+ border-radius: 8rpx;
188
+ line-height: 1.5;
189
+
190
+ .dark-mode & {
191
+ background: rgba(255, 255, 255, 0.06);
192
+ color: var(--prism-text-secondary, #A9AEB8);
193
+ }
194
+ }
195
+ }
196
+
197
+ /* ============================================================
198
+ 区块头部
199
+ ============================================================ */
200
+
201
+ .prism-section-header {
202
+ display: flex;
203
+ justify-content: space-between;
204
+ align-items: center;
205
+ margin-bottom: 16rpx;
206
+ }
207
+
208
+ .prism-section-title {
209
+ font-size: 32rpx;
210
+ font-weight: 600;
211
+ padding: 24rpx 0;
212
+ color: var(--prism-text-primary, #1D2129);
213
+
214
+ .dark-mode & {
215
+ color: var(--prism-text-primary, #E5E6EB);
216
+ }
217
+ }
218
+
219
+ .prism-more-link {
220
+ display: flex;
221
+ align-items: center;
222
+ gap: 4rpx;
223
+
224
+ .more-text,
225
+ .more-icon {
226
+ font-size: 24rpx;
227
+ color: var(--prism-primary-color, #3478F6);
228
+ }
229
+ }
230
+
231
+ /* ============================================================
232
+ prism-grid - 通用宫格布局
233
+
234
+ 用法:
235
+ .prism-grid.col-{3|4|5} - 指定列数(默认4列)
236
+
237
+ 结构:
238
+ .prism-grid.col-4
239
+ .grid-item
240
+ .prism-icon.{color}
241
+ .grid-label
242
+ ============================================================ */
243
+
244
+ .prism-grid {
245
+ display: grid;
246
+ grid-template-columns: repeat(4, 1fr);
247
+ gap: 16rpx;
248
+
249
+ &.col-3 { grid-template-columns: repeat(3, 1fr); }
250
+ &.col-4 { grid-template-columns: repeat(4, 1fr); }
251
+ &.col-5 { grid-template-columns: repeat(5, 1fr); }
252
+
253
+ // glass 形态
254
+ &.glass {
255
+ padding: 24rpx 16rpx;
256
+ background: var(--prism-bg-color-card, #FFFFFF);
257
+ border-radius: 16rpx;
258
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
259
+
260
+ .dark-mode & {
261
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.2);
262
+ }
263
+ }
264
+
265
+ .grid-item {
266
+ display: flex;
267
+ flex-direction: column;
268
+ align-items: center;
269
+ position: relative;
270
+
271
+ &:active {
272
+ opacity: 0.8;
273
+ }
274
+
275
+ // 图标下边距
276
+ .prism-icon {
277
+ margin-bottom: 12rpx;
278
+ width: 80rpx;
279
+ height: 80rpx;
280
+ border-radius: 20rpx;
281
+
282
+ .fa, .fa-solid, .iconfont {
283
+ font-size: 32rpx;
284
+ }
285
+ }
286
+
287
+ .prism-badge {
288
+ top: -4rpx;
289
+ right: 16rpx;
290
+ }
291
+
292
+ .prism-number-badge {
293
+ top: -4rpx;
294
+ right: 12rpx;
295
+ }
296
+ }
297
+
298
+ .grid-label {
299
+ font-size: 22rpx;
300
+ color: var(--prism-text-primary, #1D2129);
301
+
302
+ .dark-mode & {
303
+ color: var(--prism-text-primary, #E5E6EB);
304
+ }
305
+ }
306
+ }