@wot-ui/ui 2.0.0-alpha.5 → 2.0.0-alpha.6

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.
package/changelog.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # 更新日志
2
2
 
3
3
 
4
+ ## [2.0.0-alpha.6](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2026-04-12)
5
+
6
+
7
+ ### ✨ Features | 新功能
8
+
9
+ * ✨ WIP ([9582280](https://github.com/wot-ui/wot-ui/commit/9582280662b6a336f52707d4cabb436f15d4a2cb))
10
+ * ✨ WIP ([9d8a173](https://github.com/wot-ui/wot-ui/commit/9d8a1734fb7f7387e044d806392b70936da314a7))
11
+ * ✨ WIP ([cb70bfd](https://github.com/wot-ui/wot-ui/commit/cb70bfd76fb549e6137968d0584c28e7a7014d71))
12
+ * ✨ WIP ([aef0140](https://github.com/wot-ui/wot-ui/commit/aef0140e0c72faa7c36238b1309642d1316c21fd))
13
+ * ✨ WIP ([e9c7159](https://github.com/wot-ui/wot-ui/commit/e9c71596af0e18f7545d242cc0925872f1848cfb))
14
+ * ✨ WIP ([cec770b](https://github.com/wot-ui/wot-ui/commit/cec770b08893e7df7be7767b8817e9a6fe2685ee))
15
+ * ✨ WIP ([3c2b401](https://github.com/wot-ui/wot-ui/commit/3c2b4018abcd8833d39c485fe8ea5354d0fe7061))
16
+ * ✨ WIP ([343fc11](https://github.com/wot-ui/wot-ui/commit/343fc11f71ba800b8049d9ce05976022499fbb35))
17
+ * **button:** ✨ 新增 soft 类型变体 ([#1](https://github.com/wot-ui/wot-ui/issues/1)) ([a9c15df](https://github.com/wot-ui/wot-ui/commit/a9c15df53b9f92528ad61bbbd725c1c6781c33d0))
18
+
4
19
  ## [2.0.0-alpha.5](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2026-04-08)
5
20
 
6
21
 
@@ -18,6 +18,10 @@ $button-primary-plain-bg-active: var(--wot-button-primary-plain-bg-active, $prim
18
18
  $button-primary-plain-border: var(--wot-button-primary-plain-border, $primary-6) !default;
19
19
  // 主类型 plain 边框激活色
20
20
  $button-primary-plain-border-active: var(--wot-button-primary-plain-border-active, $primary-7) !default;
21
+ // 主类型 soft 背景色
22
+ $button-primary-soft-bg: var(--wot-button-primary-soft-bg, $primary-1) !default;
23
+ // 主类型 soft 背景激活色
24
+ $button-primary-soft-bg-active: var(--wot-button-primary-soft-bg-active, $primary-2) !default;
21
25
  // 成功类型背景色
22
26
  $button-success-bg: var(--wot-button-success-bg, $success-main) !default;
23
27
  // 成功类型背景激活色
@@ -34,6 +38,10 @@ $button-success-plain-bg-active: var(--wot-button-success-plain-bg-active, $succ
34
38
  $button-success-plain-border: var(--wot-button-success-plain-border, $success-main) !default;
35
39
  // 成功类型 plain 边框激活色
36
40
  $button-success-plain-border-active: var(--wot-button-success-plain-border-active, $success-clicked) !default;
41
+ // 成功类型 soft 背景色
42
+ $button-success-soft-bg: var(--wot-button-success-soft-bg, $success-surface) !default;
43
+ // 成功类型 soft 背景激活色
44
+ $button-success-soft-bg-active: var(--wot-button-success-soft-bg-active, $success-particular) !default;
37
45
  // 危险类型背景色
38
46
  $button-danger-bg: var(--wot-button-danger-bg, $danger-main) !default;
39
47
  // 危险类型背景激活色
@@ -50,6 +58,10 @@ $button-danger-plain-bg-active: var(--wot-button-danger-plain-bg-active, $danger
50
58
  $button-danger-plain-border: var(--wot-button-danger-plain-border, $danger-main) !default;
51
59
  // 危险类型 plain 边框激活色
52
60
  $button-danger-plain-border-active: var(--wot-button-danger-plain-border-active, $danger-clicked) !default;
61
+ // 危险类型 soft 背景色
62
+ $button-danger-soft-bg: var(--wot-button-danger-soft-bg, $danger-surface) !default;
63
+ // 危险类型 soft 背景激活色
64
+ $button-danger-soft-bg-active: var(--wot-button-danger-soft-bg-active, $danger-particular) !default;
53
65
  // 警告类型背景色
54
66
  $button-warning-bg: var(--wot-button-warning-bg, $warning-main) !default;
55
67
  // 警告类型背景激活色
@@ -66,6 +78,10 @@ $button-warning-plain-bg-active: var(--wot-button-warning-plain-bg-active, $warn
66
78
  $button-warning-plain-border: var(--wot-button-warning-plain-border, $warning-main) !default;
67
79
  // 警告类型 plain 边框激活色
68
80
  $button-warning-plain-border-active: var(--wot-button-warning-plain-border-active, $warning-clicked) !default;
81
+ // 警告类型 soft 背景色
82
+ $button-warning-soft-bg: var(--wot-button-warning-soft-bg, $warning-surface) !default;
83
+ // 警告类型 soft 背景激活色
84
+ $button-warning-soft-bg-active: var(--wot-button-warning-soft-bg-active, $warning-particular) !default;
69
85
  // 信息类型背景色
70
86
  $button-info-bg: var(--wot-button-info-bg, $filled-content) !default;
71
87
  // 信息类型背景激活色
@@ -82,6 +98,10 @@ $button-info-plain-bg-active: var(--wot-button-info-plain-bg-active, $filled-bot
82
98
  $button-info-plain-border: var(--wot-button-info-plain-border, $border-main) !default;
83
99
  // 信息类型 plain 边框激活色
84
100
  $button-info-plain-border-active: var(--wot-button-info-plain-border-active, $border-strong) !default;
101
+ // 信息类型 soft 背景色
102
+ $button-info-soft-bg: var(--wot-button-info-soft-bg, $filled-bottom) !default;
103
+ // 信息类型 soft 背景激活色
104
+ $button-info-soft-bg-active: var(--wot-button-info-soft-bg-active, $filled-content) !default;
85
105
  // 实心按钮默认文本色
86
106
  $button-main-color: var(--wot-button-main-color, $text-white) !default;
87
107
  // mini 尺寸图标字号
@@ -154,7 +174,9 @@ $button-radius-full: var(--wot-button-radius-full, $radius-radius-full) !default
154
174
  $button-disabled: var(--wot-button-disabled, $opacity-disabled) !default;
155
175
 
156
176
  // 按钮类型配置映射
157
- $button-types: ("primary": ("bg": $button-primary-bg,
177
+ $button-types: (
178
+ "primary": (
179
+ "bg": $button-primary-bg,
158
180
  "bg-active": $button-primary-bg-active,
159
181
  "text": $button-main-color,
160
182
  "plain-bg": $button-primary-plain-bg,
@@ -162,8 +184,12 @@ $button-types: ("primary": ("bg": $button-primary-bg,
162
184
  "plain-text": $button-primary-color,
163
185
  "plain-text-active": $button-primary-color-active,
164
186
  "plain-border": $button-primary-plain-border,
165
- "plain-border-active": $button-primary-plain-border-active),
166
- "success": ("bg": $button-success-bg,
187
+ "plain-border-active": $button-primary-plain-border-active,
188
+ "soft-bg": $button-primary-soft-bg,
189
+ "soft-bg-active": $button-primary-soft-bg-active,
190
+ ),
191
+ "success": (
192
+ "bg": $button-success-bg,
167
193
  "bg-active": $button-success-bg-active,
168
194
  "text": $button-main-color,
169
195
  "plain-bg": $button-success-plain-bg,
@@ -171,8 +197,12 @@ $button-types: ("primary": ("bg": $button-primary-bg,
171
197
  "plain-text": $button-success-color,
172
198
  "plain-text-active": $button-success-color-active,
173
199
  "plain-border": $button-success-plain-border,
174
- "plain-border-active": $button-success-plain-border-active),
175
- "info": ("bg": $button-info-bg,
200
+ "plain-border-active": $button-success-plain-border-active,
201
+ "soft-bg": $button-success-soft-bg,
202
+ "soft-bg-active": $button-success-soft-bg-active,
203
+ ),
204
+ "info": (
205
+ "bg": $button-info-bg,
176
206
  "bg-active": $button-info-bg-active,
177
207
  "text": $button-info-color,
178
208
  "plain-bg": $button-info-plain-bg,
@@ -180,8 +210,12 @@ $button-types: ("primary": ("bg": $button-primary-bg,
180
210
  "plain-text": $button-info-color,
181
211
  "plain-text-active": $button-info-color-active,
182
212
  "plain-border": $button-info-plain-border,
183
- "plain-border-active": $button-info-plain-border-active),
184
- "warning": ("bg": $button-warning-bg,
213
+ "plain-border-active": $button-info-plain-border-active,
214
+ "soft-bg": $button-info-soft-bg,
215
+ "soft-bg-active": $button-info-soft-bg-active,
216
+ ),
217
+ "warning": (
218
+ "bg": $button-warning-bg,
185
219
  "bg-active": $button-warning-bg-active,
186
220
  "text": $button-main-color,
187
221
  "plain-bg": $button-warning-plain-bg,
@@ -189,8 +223,12 @@ $button-types: ("primary": ("bg": $button-primary-bg,
189
223
  "plain-text": $button-warning-color,
190
224
  "plain-text-active": $button-warning-color-active,
191
225
  "plain-border": $button-warning-plain-border,
192
- "plain-border-active": $button-warning-plain-border-active),
193
- "danger": ("bg": $button-danger-bg,
226
+ "plain-border-active": $button-warning-plain-border-active,
227
+ "soft-bg": $button-warning-soft-bg,
228
+ "soft-bg-active": $button-warning-soft-bg-active,
229
+ ),
230
+ "danger": (
231
+ "bg": $button-danger-bg,
194
232
  "bg-active": $button-danger-bg-active,
195
233
  "text": $button-main-color,
196
234
  "plain-bg": $button-danger-plain-bg,
@@ -198,43 +236,59 @@ $button-types: ("primary": ("bg": $button-primary-bg,
198
236
  "plain-text": $button-danger-color,
199
237
  "plain-text-active": $button-danger-color-active,
200
238
  "plain-border": $button-danger-plain-border,
201
- "plain-border-active": $button-danger-plain-border-active));
239
+ "plain-border-active": $button-danger-plain-border-active,
240
+ "soft-bg": $button-danger-soft-bg,
241
+ "soft-bg-active": $button-danger-soft-bg-active,
242
+ )
243
+ );
202
244
 
203
245
  // 按钮尺寸配置映射
204
- $button-sizes: ("mini": ("padding-y": $button-up-down-padding-mini,
246
+ $button-sizes: (
247
+ "mini": (
248
+ "padding-y": $button-up-down-padding-mini,
205
249
  "padding-x": $button-left-right-padding-mini,
206
250
  "font-size": $button-font-size-mini,
207
251
  "line-height": $button-line-height-mini,
208
252
  "icon-font-size": $button-size-icon-mini,
209
253
  "spacing": $button-spacing-mini,
210
- "icon-padding": $button-only-icon-padding-mini),
211
- "small": ("padding-y": $button-up-down-padding-small,
254
+ "icon-padding": $button-only-icon-padding-mini
255
+ ),
256
+ "small": (
257
+ "padding-y": $button-up-down-padding-small,
212
258
  "padding-x": $button-left-right-padding-small,
213
259
  "font-size": $button-font-size-small,
214
260
  "line-height": $button-line-height-small,
215
261
  "icon-font-size": $button-size-icon-small,
216
262
  "spacing": $button-spacing-small,
217
- "icon-padding": $button-only-icon-padding-small),
218
- "medium": ("padding-y": $button-up-down-padding-medium,
263
+ "icon-padding": $button-only-icon-padding-small
264
+ ),
265
+ "medium": (
266
+ "padding-y": $button-up-down-padding-medium,
219
267
  "padding-x": $button-left-right-padding-medium,
220
268
  "font-size": $button-font-size-medium,
221
269
  "line-height": $button-line-height-medium,
222
270
  "icon-font-size": $button-size-icon-medium,
223
271
  "spacing": $button-spacing-medium,
224
- "icon-padding": $button-only-icon-padding-medium),
225
- "large": ("padding-y": $button-up-down-padding-large,
272
+ "icon-padding": $button-only-icon-padding-medium
273
+ ),
274
+ "large": (
275
+ "padding-y": $button-up-down-padding-large,
226
276
  "padding-x": $button-left-right-padding-large,
227
277
  "font-size": $button-font-size-large,
228
278
  "line-height": $button-line-height-large,
229
279
  "icon-font-size": $button-size-icon-large,
230
280
  "spacing": $button-spacing-large,
231
- "icon-padding": $button-only-icon-padding-large));
281
+ "icon-padding": $button-only-icon-padding-large
282
+ )
283
+ );
232
284
 
233
285
  // 按钮视觉变体配置映射
234
- $button-variants: ("text": ("hide-border": true),
286
+ $button-variants: (
235
287
  "plain": ("show-border": true),
236
- "dashed": ("show-border": true,
237
- "border-style": dashed));
288
+ "dashed": ("show-border": true, "border-style": dashed),
289
+ "soft": ("hide-border": true, "soft-bg": true),
290
+ "text": ("hide-border": true)
291
+ );
238
292
 
239
293
  @include b(button) {
240
294
  position: relative;
@@ -314,6 +368,10 @@ $button-variants: ("text": ("hide-border": true),
314
368
  background: transparent;
315
369
  }
316
370
 
371
+ @else if map.get($variant-conf, "soft-bg") {
372
+ background: map.get($type-conf, "soft-bg");
373
+ }
374
+
317
375
  @else {
318
376
  background: map.get($type-conf, "plain-bg");
319
377
  }
@@ -335,6 +393,10 @@ $button-variants: ("text": ("hide-border": true),
335
393
  background: transparent;
336
394
  }
337
395
 
396
+ @else if map.get($variant-conf, "soft-bg") {
397
+ background: map.get($type-conf, "soft-bg-active");
398
+ }
399
+
338
400
  @else {
339
401
  background: map.get($type-conf, "plain-bg-active");
340
402
  }
@@ -402,7 +464,7 @@ $button-variants: ("text": ("hide-border": true),
402
464
  font-size: map.get($conf, "icon-font-size");
403
465
  line-height: 1;
404
466
 
405
- +.wd-button__text {
467
+ + .wd-button__text {
406
468
  margin-left: map.get($conf, "spacing");
407
469
  }
408
470
  }
@@ -9,9 +9,9 @@ import { type LoadingProps } from '../wd-loading/types'
9
9
  export type ButtonType = 'primary' | 'success' | 'info' | 'warning' | 'danger'
10
10
  /**
11
11
  * 按钮变体
12
- * 可选值: 'base' | 'plain' | 'dashed' | 'text'
12
+ * 可选值: 'base' | 'plain' | 'dashed' | 'soft' | 'text'
13
13
  */
14
- export type ButtonVariant = 'base' | 'plain' | 'dashed' | 'text'
14
+ export type ButtonVariant = 'base' | 'plain' | 'dashed' | 'soft' | 'text'
15
15
  /**
16
16
  * 按钮尺寸
17
17
  * 可选值: 'mini' | 'small' | 'medium' | 'large'
@@ -192,7 +192,7 @@ export const buttonProps = {
192
192
  /**
193
193
  * 按钮变体
194
194
  * 类型: ButtonVariant
195
- * 可选值: 'base' | 'plain' | 'dashed' | 'text'
195
+ * 可选值: 'base' | 'plain' | 'dashed' | 'soft' | 'text'
196
196
  * 默认值: 'base'
197
197
  */
198
198
  variant: makeStringProp<ButtonVariant>('base')
@@ -212,7 +212,7 @@ export type baseThemeVars = {
212
212
  opacityDimmer?: string
213
213
  opacityDisabled?: string
214
214
  opacityMain?: string
215
- opacityOveylay?: string
215
+ opacityOverlay?: string
216
216
  opacwhite1_02?: string
217
217
  opacwhite10_85?: string
218
218
  opacwhite2_04?: string
@@ -314,7 +314,7 @@ export type baseThemeVars = {
314
314
  spacingUltraSpacious?: string
315
315
  spacingUltraTight?: string
316
316
  spacingZero?: string
317
- strokeBlod?: string
317
+ strokeBold?: string
318
318
  strokeLight?: string
319
319
  strokeMain?: string
320
320
  strokeZero?: string
@@ -520,6 +520,8 @@ export type buttonThemeVars = {
520
520
  buttonDangerPlainBgActive?: string // 危险类型 plain 背景激活色
521
521
  buttonDangerPlainBorder?: string // 危险类型 plain 边框色
522
522
  buttonDangerPlainBorderActive?: string // 危险类型 plain 边框激活色
523
+ buttonDangerSoftBg?: string // 危险类型 soft 背景色
524
+ buttonDangerSoftBgActive?: string // 危险类型 soft 背景激活色
523
525
  buttonDisabled?: string // 禁用态透明度
524
526
  buttonFontSizeLarge?: string // large 尺寸文字字号
525
527
  buttonFontSizeMedium?: string // medium 尺寸文字字号
@@ -533,6 +535,8 @@ export type buttonThemeVars = {
533
535
  buttonInfoPlainBgActive?: string // 信息类型 plain 背景激活色
534
536
  buttonInfoPlainBorder?: string // 信息类型 plain 边框色
535
537
  buttonInfoPlainBorderActive?: string // 信息类型 plain 边框激活色
538
+ buttonInfoSoftBg?: string // 信息类型 soft 背景色
539
+ buttonInfoSoftBgActive?: string // 信息类型 soft 背景激活色
536
540
  buttonLeftRightPaddingLarge?: string // large 尺寸左右内边距
537
541
  buttonLeftRightPaddingMedium?: string // medium 尺寸左右内边距
538
542
  buttonLeftRightPaddingMini?: string // mini 尺寸左右内边距
@@ -556,6 +560,8 @@ export type buttonThemeVars = {
556
560
  buttonPrimaryPlainBgActive?: string // 主类型 plain 背景激活色
557
561
  buttonPrimaryPlainBorder?: string // 主类型 plain 边框色
558
562
  buttonPrimaryPlainBorderActive?: string // 主类型 plain 边框激活色
563
+ buttonPrimarySoftBg?: string // 主类型 soft 背景色
564
+ buttonPrimarySoftBgActive?: string // 主类型 soft 背景激活色
559
565
  buttonRadiusFull?: string // 圆形圆角
560
566
  buttonRadiusMain?: string // 默认圆角
561
567
  buttonSizeIconLarge?: string // large 尺寸图标字号
@@ -575,6 +581,8 @@ export type buttonThemeVars = {
575
581
  buttonSuccessPlainBgActive?: string // 成功类型 plain 背景激活色
576
582
  buttonSuccessPlainBorder?: string // 成功类型 plain 边框色
577
583
  buttonSuccessPlainBorderActive?: string // 成功类型 plain 边框激活色
584
+ buttonSuccessSoftBg?: string // 成功类型 soft 背景色
585
+ buttonSuccessSoftBgActive?: string // 成功类型 soft 背景激活色
578
586
  buttonUpDownPaddingLarge?: string // large 尺寸上下内边距
579
587
  buttonUpDownPaddingMedium?: string // medium 尺寸上下内边距
580
588
  buttonUpDownPaddingMini?: string // mini 尺寸上下内边距
@@ -587,6 +595,8 @@ export type buttonThemeVars = {
587
595
  buttonWarningPlainBgActive?: string // 警告类型 plain 背景激活色
588
596
  buttonWarningPlainBorder?: string // 警告类型 plain 边框色
589
597
  buttonWarningPlainBorderActive?: string // 警告类型 plain 边框激活色
598
+ buttonWarningSoftBg?: string // 警告类型 soft 背景色
599
+ buttonWarningSoftBgActive?: string // 警告类型 soft 背景激活色
590
600
  }
591
601
 
592
602
  export type calendarThemeVars = {
@@ -1164,6 +1174,11 @@ export type loadingThemeVars = {
1164
1174
  loadingTextFontSize?: string // 文本字号
1165
1175
  loadingTextLineHeight?: string // 文本行高
1166
1176
  loadingTextSpacing?: string // 文本与加载器间距
1177
+ loadingWaveAnimationDuration?: string // 波形加载器动画时长
1178
+ loadingWaveBarHeight?: string // 波形加载器单柱高度
1179
+ loadingWaveBarRadius?: string // 波形加载器单柱圆角
1180
+ loadingWaveBarWidth?: string // 波形加载器单柱宽度
1181
+ loadingWaveGap?: string // 波形加载器间距
1167
1182
  }
1168
1183
 
1169
1184
  export type loadmoreThemeVars = {
@@ -46,7 +46,7 @@ $dialog-content-input-padding-top: var(--wot-dialog-content-input-padding-top, $
46
46
  // 滚动条颜色
47
47
  $dialog-scrollbar-color: var(--wot-dialog-scrollbar-color, $border-main) !default;
48
48
  // 滚动条宽度
49
- $dialog-scrollbar-width: var(--wot-dialog-scrollbar-width, $stroke-blod) !default;
49
+ $dialog-scrollbar-width: var(--wot-dialog-scrollbar-width, $stroke-bold) !default;
50
50
  // 滚动条圆角
51
51
  $dialog-scrollbar-radius: var(--wot-dialog-scrollbar-radius, $radius-small) !default;
52
52
  // 默认图标颜色
@@ -22,7 +22,7 @@ $img-cropper-cut-z-index: var(--wot-img-cropper-cut-z-index, 9) !default;
22
22
  // 裁剪框边框颜色
23
23
  $img-cropper-cut-border-color: var(--wot-img-cropper-cut-border-color, $base-white) !default;
24
24
  // 角标粗细
25
- $img-cropper-corner-size: var(--wot-img-cropper-corner-size, $stroke-blod) !default;
25
+ $img-cropper-corner-size: var(--wot-img-cropper-corner-size, $stroke-bold) !default;
26
26
  // 角标长度
27
27
  $img-cropper-corner-length: var(--wot-img-cropper-corner-length, $n-20) !default;
28
28
  // 角标颜色
@@ -31,6 +31,16 @@ $loading-spinner-dot-radius: var(--wot-loading-spinner-dot-radius, $radius-radiu
31
31
  $loading-spinner-dots-dot-size: var(--wot-loading-spinner-dots-dot-size, 20%) !default;
32
32
  // 点状加载器单点圆角
33
33
  $loading-spinner-dots-dot-radius: var(--wot-loading-spinner-dots-dot-radius, $radius-radius-full) !default;
34
+ // 波形加载器间距
35
+ $loading-wave-gap: var(--wot-loading-wave-gap, 6.25%) !default;
36
+ // 波形加载器单柱宽度
37
+ $loading-wave-bar-width: var(--wot-loading-wave-bar-width, 12.5%) !default;
38
+ // 波形加载器单柱高度
39
+ $loading-wave-bar-height: var(--wot-loading-wave-bar-height, 83.333333%) !default;
40
+ // 波形加载器单柱圆角
41
+ $loading-wave-bar-radius: var(--wot-loading-wave-bar-radius, $radius-radius-full) !default;
42
+ // 波形加载器动画时长
43
+ $loading-wave-animation-duration: var(--wot-loading-wave-animation-duration, 834ms) !default;
34
44
  // 加载器内边距
35
45
  $loading-spinner-padding: var(--wot-loading-spinner-padding, $padding-ultra-tight) !default;
36
46
  // 文本与加载器间距
@@ -138,6 +148,29 @@ $loading-text-line-height: var(--wot-loading-text-line-height, $typography-body-
138
148
  @include dot-delay(3, $loading-spinner-animation-duration);
139
149
  }
140
150
  }
151
+
152
+ @include m(wave) {
153
+ animation: none;
154
+
155
+ @include me(spinner-wraper) {
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ margin: 0 auto;
160
+ }
161
+
162
+ @include me(spinner-wave-bar) {
163
+ display: flex;
164
+ align-items: center;
165
+ animation-duration: $loading-wave-animation-duration;
166
+ animation-timing-function: linear;
167
+ animation-iteration-count: infinite;
168
+
169
+ &:nth-of-type(n + 2) {
170
+ margin-left: $loading-wave-gap;
171
+ }
172
+ }
173
+ }
141
174
  }
142
175
 
143
176
  @include e(spinner-dot) {
@@ -165,6 +198,47 @@ $loading-text-line-height: var(--wot-loading-text-line-height, $typography-body-
165
198
  height: 100%;
166
199
  }
167
200
 
201
+ @include e(spinner-wave-bar) {
202
+ flex: none;
203
+ width: $loading-wave-bar-width;
204
+ height: $loading-wave-bar-height;
205
+
206
+ &:nth-of-type(1) {
207
+ .wd-loading__spinner-wave-bar-inner {
208
+ animation-name: wd-wave-bar-1;
209
+ }
210
+ }
211
+
212
+ &:nth-of-type(2) {
213
+ .wd-loading__spinner-wave-bar-inner {
214
+ animation-name: wd-wave-bar-2;
215
+ }
216
+ }
217
+
218
+ &:nth-of-type(3) {
219
+ .wd-loading__spinner-wave-bar-inner {
220
+ animation-name: wd-wave-bar-3;
221
+ }
222
+ }
223
+
224
+ &:nth-of-type(4) {
225
+ .wd-loading__spinner-wave-bar-inner {
226
+ animation-name: wd-wave-bar-4;
227
+ }
228
+ }
229
+ }
230
+
231
+ @include e(spinner-wave-bar-inner) {
232
+ width: 100%;
233
+ height: 100%;
234
+ border-radius: $loading-wave-bar-radius;
235
+ background-color: currentColor;
236
+ animation-duration: $loading-wave-animation-duration;
237
+ animation-timing-function: linear;
238
+ animation-iteration-count: infinite;
239
+ will-change: height;
240
+ }
241
+
168
242
  @include e(text) {
169
243
  font-size: $loading-text-font-size;
170
244
  line-height: $loading-text-line-height;
@@ -203,3 +277,77 @@ $loading-text-line-height: var(--wot-loading-text-line-height, $typography-body-
203
277
  opacity: 0.15;
204
278
  }
205
279
  }
280
+
281
+ @keyframes wd-wave-bar-1 {
282
+ 0%,100% {
283
+ height: 20%;
284
+ }
285
+
286
+ 25.779376%,
287
+ 87.889688% {
288
+ height: 40%;
289
+ }
290
+
291
+ 37.889688%,
292
+ 75.779376% {
293
+ height: 70%;
294
+ }
295
+
296
+ 50% {
297
+ height: 100%;
298
+ }
299
+ }
300
+
301
+ @keyframes wd-wave-bar-2 {
302
+ 0%,100% {
303
+ height: 40%;
304
+ }
305
+
306
+ 25.779376%,
307
+ 87.889688%,
308
+ 50% {
309
+ height: 70%;
310
+ }
311
+
312
+ 37.889688%,
313
+ 75.779376% {
314
+ height: 100%;
315
+ }
316
+ }
317
+
318
+ @keyframes wd-wave-bar-3 {
319
+ 0%,100%,
320
+ 37.889688%,
321
+ 75.779376% {
322
+ height: 70%;
323
+ }
324
+
325
+ 25.779376%,
326
+ 87.889688% {
327
+ height: 100%;
328
+ }
329
+
330
+ 50% {
331
+ height: 40%;
332
+ }
333
+ }
334
+
335
+ @keyframes wd-wave-bar-4 {
336
+ 0%,100%{
337
+ height: 100%;
338
+ }
339
+
340
+ 25.779376%,
341
+ 87.889688% {
342
+ height: 70%;
343
+ }
344
+
345
+ 37.889688%,
346
+ 75.779376% {
347
+ height: 40%;
348
+ }
349
+
350
+ 50% {
351
+ height: 20%;
352
+ }
353
+ }
@@ -10,7 +10,7 @@
10
10
  import type { ExtractPropTypes } from 'vue'
11
11
  import { baseProps, makeStringProp, numericProp } from '../../common/props'
12
12
 
13
- export type LoadingType = 'circular' | 'spinner' | 'dots' // 提示信息加载状态类型
13
+ export type LoadingType = 'circular' | 'spinner' | 'dots' | 'wave' // 提示信息加载状态类型
14
14
 
15
15
  export type LoadingDirection = 'horizontal' | 'vertical' // 加载指示器方向,可选值:'horizontal' | 'vertical',默认值:'vertical'
16
16
 
@@ -24,7 +24,7 @@ export const loadingProps = {
24
24
  /**
25
25
  * 加载指示器类型
26
26
  * 类型: LoadingType
27
- * 可选值: 'circular' | 'spinner' | 'dots'
27
+ * 可选值: 'circular' | 'spinner' | 'dots' | 'wave'
28
28
  * 默认值: 'circular'
29
29
  */
30
30
  type: makeStringProp<LoadingType>('circular'),
@@ -14,6 +14,13 @@
14
14
  <view class="wd-loading__spinner-dot" v-for="i in 3" :key="i"></view>
15
15
  </view>
16
16
  </template>
17
+ <template v-else-if="type === 'wave'">
18
+ <view class="wd-loading__spinner-wraper">
19
+ <view class="wd-loading__spinner-wave-bar" v-for="i in 4" :key="i">
20
+ <view class="wd-loading__spinner-wave-bar-inner"></view>
21
+ </view>
22
+ </view>
23
+ </template>
17
24
  </view>
18
25
  <view class="wd-loading__text" v-if="$slots.default || text">
19
26
  <slot>{{ text }}</slot>
@@ -69,7 +69,7 @@ $switch-disabled: var(--wot-switch-disabled, $opacity-disabled) !default;
69
69
  }
70
70
 
71
71
  @include when(loading) {
72
- opacity: $opacity-oveylay;
72
+ opacity: $opacity-overlay;
73
73
  }
74
74
 
75
75
  @include e(inner) {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0-alpha.5","license":"MIT","description":"一个基于Vue3+TS开发的uni-app组件库,提供70+高质量组件,支持暗黑模式、国际化和自定义主题。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}
1
+ {"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0-alpha.6","license":"MIT","description":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}
@@ -8,6 +8,6 @@ page,
8
8
  --wot-font-weight-regular: 400;
9
9
  --wot-font-weight-medium: 600;
10
10
  --wot-font-weight-semibold: 700;
11
+ --wot-font-weight-bold: 700;
11
12
  }
12
-
13
-
13
+
@@ -1,32 +1,32 @@
1
1
  :root,
2
2
  page,
3
3
  .wd-root-portal {
4
- --wot-spacing-zero: var(--wot-number-n0);
5
- --wot-padding-zero: var(--wot-number-n0);
6
- --wot-padding-ultra-tight: var(--wot-number-n2);
7
- --wot-padding-super-tight: var(--wot-number-n4);
8
- --wot-padding-extra-tight: var(--wot-number-n6);
9
- --wot-padding-tight: var(--wot-number-n8);
10
- --wot-padding-main: var(--wot-number-n10);
11
- --wot-padding-loose: var(--wot-number-n12);
12
- --wot-padding-extra-loose: var(--wot-number-n16);
13
- --wot-padding-super-loose: var(--wot-number-n20);
14
- --wot-padding-ultra-loose: var(--wot-number-n24);
15
- --wot-padding-spacious: var(--wot-number-n28);
16
- --wot-padding-extra-spacious: var(--wot-number-n32);
17
- --wot-padding-super-spacious: var(--wot-number-n40);
18
- --wot-padding-ultra-spacious: var(--wot-number-n48);
19
- --wot-spacing-ultra-tight: var(--wot-number-n2);
20
- --wot-spacing-super-tight: var(--wot-number-n4);
21
- --wot-spacing-extra-tight: var(--wot-number-n6);
22
- --wot-spacing-tight: var(--wot-number-n8);
23
- --wot-spacing-main: var(--wot-number-n10);
24
- --wot-spacing-loose: var(--wot-number-n12);
25
- --wot-spacing-extra-loose: var(--wot-number-n16);
26
- --wot-spacing-super-loose: var(--wot-number-n20);
27
- --wot-spacing-ultra-loose: var(--wot-number-n24);
28
- --wot-spacing-spacious: var(--wot-number-n28);
29
- --wot-spacing-extra-spacious: var(--wot-number-n32);
30
- --wot-spacing-super-spacious: var(--wot-number-n40);
31
- --wot-spacing-ultra-spacious: var(--wot-number-n48);
4
+ --wot-spacing-zero: var(--wot-n-0);
5
+ --wot-padding-zero: var(--wot-n-0);
6
+ --wot-padding-ultra-tight: var(--wot-n-2);
7
+ --wot-padding-super-tight: var(--wot-n-4);
8
+ --wot-padding-extra-tight: var(--wot-n-6);
9
+ --wot-padding-tight: var(--wot-n-8);
10
+ --wot-padding-main: var(--wot-n-10);
11
+ --wot-padding-loose: var(--wot-n-12);
12
+ --wot-padding-extra-loose: var(--wot-n-16);
13
+ --wot-padding-super-loose: var(--wot-n-20);
14
+ --wot-padding-ultra-loose: var(--wot-n-24);
15
+ --wot-padding-spacious: var(--wot-n-28);
16
+ --wot-padding-extra-spacious: var(--wot-n-32);
17
+ --wot-padding-super-spacious: var(--wot-n-40);
18
+ --wot-padding-ultra-spacious: var(--wot-n-48);
19
+ --wot-spacing-ultra-tight: var(--wot-n-2);
20
+ --wot-spacing-super-tight: var(--wot-n-4);
21
+ --wot-spacing-extra-tight: var(--wot-n-6);
22
+ --wot-spacing-tight: var(--wot-n-8);
23
+ --wot-spacing-main: var(--wot-n-10);
24
+ --wot-spacing-loose: var(--wot-n-12);
25
+ --wot-spacing-extra-loose: var(--wot-n-16);
26
+ --wot-spacing-super-loose: var(--wot-n-20);
27
+ --wot-spacing-ultra-loose: var(--wot-n-24);
28
+ --wot-spacing-spacious: var(--wot-n-28);
29
+ --wot-spacing-extra-spacious: var(--wot-n-32);
30
+ --wot-spacing-super-spacious: var(--wot-n-40);
31
+ --wot-spacing-ultra-spacious: var(--wot-n-48);
32
32
  }