@tendaui/components 1.3.0 → 1.3.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 (142) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +176 -176
  3. package/button/_example/ghost.tsx +2 -5
  4. package/color-picker/utils/color-picker/cmyk.ts +89 -89
  5. package/color-picker/utils/color-picker/color.ts +467 -467
  6. package/color-picker/utils/color-picker/constants.ts +187 -187
  7. package/color-picker/utils/color-picker/draggable.ts +99 -99
  8. package/color-picker/utils/color-picker/format.ts +90 -90
  9. package/color-picker/utils/color-picker/gradient.ts +237 -237
  10. package/color-picker/utils/color-picker/index.ts +7 -7
  11. package/color-picker/utils/color-picker/types.ts +33 -33
  12. package/dialog/hooks/useDialogPosition.ts +35 -35
  13. package/form/type.ts +519 -519
  14. package/global-config/default-config.ts +95 -95
  15. package/global-config/locale/ar_KW.ts +259 -259
  16. package/global-config/locale/en_US.ts +265 -265
  17. package/global-config/locale/it_IT.ts +264 -264
  18. package/global-config/locale/ja_JP.ts +264 -264
  19. package/global-config/locale/ko_KR.ts +264 -264
  20. package/global-config/locale/ru_RU.ts +277 -277
  21. package/global-config/locale/zh_CN.ts +265 -265
  22. package/global-config/locale/zh_TW.ts +265 -265
  23. package/global-config/mobile/default-config.ts +6 -6
  24. package/global-config/mobile/locale/ar_KW.ts +112 -112
  25. package/global-config/mobile/locale/en_US.ts +113 -113
  26. package/global-config/mobile/locale/it_IT.ts +113 -113
  27. package/global-config/mobile/locale/ja_JP.ts +100 -100
  28. package/global-config/mobile/locale/ko_KR.ts +100 -100
  29. package/global-config/mobile/locale/ru_RU.ts +112 -112
  30. package/global-config/mobile/locale/zh_CN.ts +100 -100
  31. package/global-config/mobile/locale/zh_TW.ts +100 -100
  32. package/global-config/t.ts +111 -111
  33. package/input-number/InputNumber.tsx +124 -124
  34. package/input-number/defaultProps.ts +17 -17
  35. package/input-number/index.ts +9 -9
  36. package/input-number/style/css.js +1 -1
  37. package/input-number/style/index.js +1 -1
  38. package/input-number/useInputNumber.tsx +270 -270
  39. package/list/ListItem.tsx +36 -36
  40. package/list/ListItemMeta.tsx +40 -40
  41. package/list/defaultProps.ts +11 -11
  42. package/list/hooks/useListVirtualScroll.ts +82 -82
  43. package/list/style/css.js +1 -1
  44. package/list/style/index.js +1 -1
  45. package/locale/LocalReceiver.ts +55 -55
  46. package/locale/ar_KW.ts +7 -7
  47. package/locale/en_US.ts +7 -7
  48. package/locale/it_IT.ts +6 -6
  49. package/locale/ja_JP.ts +6 -6
  50. package/locale/ko_KR.ts +6 -6
  51. package/locale/ru_RU.ts +6 -6
  52. package/locale/zh_CN.ts +5 -5
  53. package/locale/zh_TW.ts +7 -7
  54. package/package.json +2 -2
  55. package/radio/_example/default.tsx +2 -2
  56. package/select/type.ts +382 -382
  57. package/select-input/type.ts +280 -280
  58. package/slider/SliderHandleButton.tsx +50 -50
  59. package/slider/defaultProps.ts +15 -15
  60. package/slider/style/css.js +1 -1
  61. package/slider/style/index.js +1 -1
  62. package/styles/_global.scss +40 -40
  63. package/styles/_vars.scss +374 -374
  64. package/styles/components/alert/_index.scss +175 -175
  65. package/styles/components/alert/_vars.scss +41 -41
  66. package/styles/components/badge/_index.scss +71 -71
  67. package/styles/components/badge/_vars.scss +26 -26
  68. package/styles/components/button/_index.scss +499 -499
  69. package/styles/components/button/_mixins.scss +40 -40
  70. package/styles/components/button/_vars.scss +121 -121
  71. package/styles/components/checkbox/_index.scss +158 -158
  72. package/styles/components/checkbox/_var.scss +59 -59
  73. package/styles/components/color-picker/_index.scss +586 -586
  74. package/styles/components/color-picker/_vars.scss +79 -79
  75. package/styles/components/dialog/_animate.scss +133 -133
  76. package/styles/components/dialog/_index.scss +310 -310
  77. package/styles/components/dialog/_vars.scss +60 -60
  78. package/styles/components/drawer/_index.scss +206 -206
  79. package/styles/components/drawer/_var.scss +55 -55
  80. package/styles/components/fireworks/_index.scss +86 -86
  81. package/styles/components/fireworks/_vars.scss +5 -5
  82. package/styles/components/form/_index.scss +175 -175
  83. package/styles/components/form/_mixins.scss +74 -74
  84. package/styles/components/form/_vars.scss +101 -101
  85. package/styles/components/input/_index.scss +350 -350
  86. package/styles/components/input/_mixins.scss +120 -120
  87. package/styles/components/input/_vars.scss +130 -130
  88. package/styles/components/input-number/_index.scss +327 -327
  89. package/styles/components/input-number/_vars.scss +56 -56
  90. package/styles/components/ip-input/_index.scss +277 -277
  91. package/styles/components/layout/_index.scss +47 -47
  92. package/styles/components/layout/_vars.scss +19 -19
  93. package/styles/components/layout/doc.scss +74 -74
  94. package/styles/components/list/_index.scss +172 -172
  95. package/styles/components/list/_vars.scss +42 -42
  96. package/styles/components/loading/_index.scss +113 -113
  97. package/styles/components/loading/_vars.scss +40 -40
  98. package/styles/components/notification/_index.scss +140 -140
  99. package/styles/components/notification/_mixins.scss +13 -13
  100. package/styles/components/notification/_vars.scss +60 -60
  101. package/styles/components/popup/_index.scss +78 -78
  102. package/styles/components/popup/_mixin.scss +149 -149
  103. package/styles/components/popup/_vars.scss +33 -33
  104. package/styles/components/radio/_index.scss +376 -376
  105. package/styles/components/radio/_vars.scss +89 -89
  106. package/styles/components/select/_index.scss +291 -291
  107. package/styles/components/select/_var.scss +64 -64
  108. package/styles/components/select-input/_index.scss +5 -5
  109. package/styles/components/select-input/_var.scss +4 -4
  110. package/styles/components/slider/_index.scss +241 -241
  111. package/styles/components/slider/_vars.scss +51 -51
  112. package/styles/components/switch/_index.scss +175 -175
  113. package/styles/components/switch/_vars.scss +63 -63
  114. package/styles/components/table/_index.scss +194 -194
  115. package/styles/components/table/_var.scss +52 -52
  116. package/styles/components/tabs/_index.scss +165 -165
  117. package/styles/components/tabs/_mixins.scss +11 -11
  118. package/styles/components/tabs/_vars.scss +72 -72
  119. package/styles/components/tag/_index.scss +317 -317
  120. package/styles/components/tag/_var.scss +86 -86
  121. package/styles/components/tag-input/_index.scss +164 -164
  122. package/styles/components/tag-input/_vars.scss +17 -17
  123. package/styles/mixins/_focus.scss +8 -8
  124. package/styles/mixins/_layout.scss +32 -32
  125. package/styles/mixins/_reset.scss +11 -11
  126. package/styles/mixins/_scrollbar.scss +32 -32
  127. package/styles/mixins/_text.scss +50 -50
  128. package/styles/themes/_dark.scss +169 -169
  129. package/styles/themes/_font.scss +69 -69
  130. package/styles/themes/_index.scss +5 -5
  131. package/styles/themes/_light.scss +170 -170
  132. package/styles/themes/_radius.scss +9 -9
  133. package/styles/themes/_size.scss +68 -68
  134. package/styles/utilities/_animation.scss +58 -58
  135. package/styles/utilities/_tips.scss +10 -10
  136. package/switch/_example/with-label.tsx +1 -1
  137. package/utils/input-number/large-number.ts +423 -423
  138. package/utils/input-number/number.ts +257 -257
  139. package/utils/log/index.ts +3 -3
  140. package/utils/log/log.ts +29 -29
  141. package/utils/log/types.ts +9 -9
  142. package/utils/style.ts +58 -58
@@ -1,170 +1,170 @@
1
- :root,
2
- :root[theme-mode="light"] {
3
- --td-brand-color-1: #f2f3ff;
4
- --td-brand-color-2: #d9e1ff;
5
- --td-brand-color-3: #b5c7ff;
6
- --td-brand-color-4: #8eabff;
7
- --td-brand-color-5: #618dff;
8
- --td-brand-color-6: #366ef4;
9
- --td-brand-color-7: #0052d9;
10
- --td-brand-color-8: #003cab;
11
- --td-brand-color-9: #002a7c;
12
- --td-brand-color-10: #001a57;
13
- --td-warning-color-1: #fff1e9;
14
- --td-warning-color-2: #ffd9c2;
15
- --td-warning-color-3: #ffb98c;
16
- --td-warning-color-4: #fa9550;
17
- --td-warning-color-5: #e37318;
18
- --td-warning-color-6: #be5a00;
19
- --td-warning-color-7: #954500;
20
- --td-warning-color-8: #713300;
21
- --td-warning-color-9: #532300;
22
- --td-warning-color-10: #3b1700;
23
- --td-error-color-1: #fff0ed;
24
- --td-error-color-2: #ffd8d2;
25
- --td-error-color-3: #ffb9b0;
26
- --td-error-color-4: #ff9285;
27
- --td-error-color-5: #f6685d;
28
- --td-error-color-6: #d54941;
29
- --td-error-color-7: #ad352f;
30
- --td-error-color-8: #881f1c;
31
- --td-error-color-9: #68070a;
32
- --td-error-color-10: #490002;
33
- --td-success-color-1: #e3f9e9;
34
- --td-success-color-2: #c6f3d7;
35
- --td-success-color-3: #92dab2;
36
- --td-success-color-4: #56c08d;
37
- --td-success-color-5: #2ba471;
38
- --td-success-color-6: #008858;
39
- --td-success-color-7: #006c45;
40
- --td-success-color-8: #005334;
41
- --td-success-color-9: #003b23;
42
- --td-success-color-10: #002515;
43
- --td-gray-color-1: #f3f3f3;
44
- --td-gray-color-2: #eee;
45
- --td-gray-color-3: #e8e8e8;
46
- --td-gray-color-4: #ddd;
47
- --td-gray-color-5: #c6c6c6;
48
- --td-gray-color-6: #a6a6a6;
49
- --td-gray-color-7: #8b8b8b;
50
- --td-gray-color-8: #777;
51
- --td-gray-color-9: #5e5e5e;
52
- --td-gray-color-10: #4b4b4b;
53
- --td-gray-color-11: #393939;
54
- --td-gray-color-12: #2c2c2c;
55
- --td-gray-color-13: #242424;
56
- --td-gray-color-14: #181818;
57
-
58
- // 文字 & 图标 颜色
59
- --td-font-white-1: rgba(255, 255, 255, 100%);
60
- --td-font-white-2: rgba(255, 255, 255, 55%);
61
- --td-font-white-3: rgba(255, 255, 255, 35%);
62
- --td-font-white-4: rgba(255, 255, 255, 22%);
63
- --td-font-gray-1: rgba(0, 0, 0, 90%);
64
- --td-font-gray-2: rgba(0, 0, 0, 60%);
65
- --td-font-gray-3: rgba(0, 0, 0, 40%);
66
- --td-font-gray-4: rgba(0, 0, 0, 26%);
67
-
68
- // 基础颜色
69
- --td-brand-color: var(--td-brand-color-7); // 色彩-品牌-可操作
70
- --td-warning-color: var(--td-warning-color-5); // 色彩-功能-警告
71
- --td-error-color: var(--td-error-color-6); // 色彩-功能-失败
72
- --td-success-color: var(--td-success-color-5); // 色彩-功能-成功
73
-
74
- // 基础颜色的扩充用于 hover / 聚焦 / 禁用 / 点击 等状态
75
- --td-brand-color-hover: var(--td-brand-color-6); // hover
76
- --td-brand-color-focus: var(--td-brand-color-2); // focus态,包括鼠标和键盘
77
- --td-brand-color-active: var(--td-brand-color-8); // 点击
78
- --td-brand-color-disabled: var(--td-brand-color-3); // 禁用
79
- --td-brand-color-light: var(--td-brand-color-1); // 浅色的选中
80
- --td-brand-color-light-hover: var(--td-brand-color-2);
81
-
82
- // 警告色扩充
83
- --td-warning-color-hover: var(--td-warning-color-4);
84
- --td-warning-color-focus: var(--td-warning-color-2);
85
- --td-warning-color-active: var(--td-warning-color-6);
86
- --td-warning-color-disabled: var(--td-warning-color-3);
87
- --td-warning-color-light: var(--td-warning-color-1);
88
- --td-warning-color-light-hover: var(--td-warning-color-2);
89
-
90
- // 失败/错误色扩充
91
- --td-error-color-hover: var(--td-error-color-5);
92
- --td-error-color-focus: var(--td-error-color-2);
93
- --td-error-color-active: var(--td-error-color-7);
94
- --td-error-color-disabled: var(--td-error-color-3);
95
- --td-error-color-light: var(--td-error-color-1);
96
- --td-error-color-light-hover: var(--td-error-color-2);
97
-
98
- // 成功色扩充
99
- --td-success-color-hover: var(--td-success-color-4);
100
- --td-success-color-focus: var(--td-success-color-2);
101
- --td-success-color-active: var(--td-success-color-6);
102
- --td-success-color-disabled: var(--td-success-color-3);
103
- --td-success-color-light: var(--td-success-color-1);
104
- --td-success-color-light-hover: var(--td-success-color-2);
105
-
106
- // 遮罩
107
- --td-mask-active: rgba(0, 0, 0, 60%); // 遮罩-弹出
108
- --td-mask-disabled: rgba(255, 255, 255, 60%); // 遮罩-禁用
109
- --td-mask-background: rgba(255, 255, 255, 96%); // 二维码遮罩
110
-
111
- // 背景颜色
112
- --td-bg-color-page: var(--td-gray-color-2); // 色彩 - page
113
- --td-bg-color-container: #fff; // 色彩 - 容器
114
- --td-bg-color-container-hover: var(--td-gray-color-1); // 色彩 - 容器 - hover
115
- --td-bg-color-container-active: var(--td-gray-color-3); // 色彩 - 容器 - active
116
- --td-bg-color-container-select: #fff; // 色彩 - 容器 - select
117
- --td-bg-color-secondarycontainer: var(--td-gray-color-1); // 色彩 - 次级容器
118
- --td-bg-color-secondarycontainer-hover: var(--td-gray-color-2); // 色彩 - 次级容器 - hover
119
- --td-bg-color-secondarycontainer-active: var(--td-gray-color-4); // 色彩 - 次级容器 - active
120
- --td-bg-color-component: var(--td-gray-color-3); // 色彩 - 组件
121
- --td-bg-color-component-hover: var(--td-gray-color-4); // 色彩 - 组件 - hover
122
- --td-bg-color-component-active: var(--td-gray-color-6); // 色彩 - 组件 - active
123
- --td-bg-color-secondarycomponent: var(--td-gray-color-4); // 色彩 - 次级组件
124
- --td-bg-color-secondarycomponent-hover: var(--td-gray-color-5); // 色彩 - 次级组件 - hover
125
- --td-bg-color-secondarycomponent-active: var(--td-gray-color-6); // 色彩 - 次级组件 - active
126
- --td-bg-color-component-disabled: var(--td-gray-color-2); // 色彩 - 组件 - disabled
127
-
128
- // 特殊组件背景色,目前只用button、input 组件多主题场景,浅色主题下固定为白色,深色主题下transparent 适配背景颜色
129
- --td-bg-color-specialcomponent: #fff;
130
-
131
- // 文本颜色
132
- --td-text-color-primary: var(--td-font-gray-1); // 色彩-文字-主要
133
- --td-text-color-secondary: var(--td-font-gray-2); // 色彩-文字-次要
134
- --td-text-color-placeholder: var(--td-font-gray-3); // 色彩-文字-占位说明
135
- --td-text-color-disabled: var(--td-font-gray-4); // 色彩-文字-禁用
136
- --td-text-color-anti: #fff; // 色彩-文字-反色
137
- --td-text-color-brand: var(--td-brand-color-7); // 色彩-文字-品牌
138
- --td-text-color-link: var(--td-brand-color-8); // 色彩-文字-链接
139
- --td-text-color-watermark: rgba(0, 0, 0, 10%); // 色彩-文字-水印颜色
140
-
141
- // 分割线
142
- --td-border-level-1-color: var(--td-gray-color-3);
143
- --td-component-stroke: var(--td-gray-color-3);
144
- // 边框
145
- --td-border-level-2-color: var(--td-gray-color-4);
146
- --td-component-border: var(--td-gray-color-4);
147
-
148
- // 基础/下层 投影 hover 使用的组件包括:表格
149
- --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
150
- // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认 / 选择
151
- --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
152
- // 上层投影(警告/弹窗)使用的组件包括:全局提示 / 消息通知
153
- --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%);
154
-
155
- // 内投影用于弹窗类组件(气泡确认 / 全局提示 / 消息通知)的内描影
156
- --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
157
- --td-shadow-inset-right: inset 0.5px 0 0 #dcdcdc;
158
- --td-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc;
159
- --td-shadow-inset-left: inset -0.5px 0 0 #dcdcdc;
160
-
161
- // table 特定阴影
162
- --td-table-shadow-color: rgba(0, 0, 0, 8%);
163
-
164
- // 滚动条颜色
165
- --td-scrollbar-color: rgba(0, 0, 0, 10%);
166
- // 滚动条悬浮颜色( hover )
167
- --td-scrollbar-hover-color: rgba(0, 0, 0, 30%);
168
- // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
169
- --td-scroll-track-color: #fff;
170
- }
1
+ :root,
2
+ :root[theme-mode="light"] {
3
+ --td-brand-color-1: #f2f3ff;
4
+ --td-brand-color-2: #d9e1ff;
5
+ --td-brand-color-3: #b5c7ff;
6
+ --td-brand-color-4: #8eabff;
7
+ --td-brand-color-5: #618dff;
8
+ --td-brand-color-6: #366ef4;
9
+ --td-brand-color-7: #0052d9;
10
+ --td-brand-color-8: #003cab;
11
+ --td-brand-color-9: #002a7c;
12
+ --td-brand-color-10: #001a57;
13
+ --td-warning-color-1: #fff1e9;
14
+ --td-warning-color-2: #ffd9c2;
15
+ --td-warning-color-3: #ffb98c;
16
+ --td-warning-color-4: #fa9550;
17
+ --td-warning-color-5: #e37318;
18
+ --td-warning-color-6: #be5a00;
19
+ --td-warning-color-7: #954500;
20
+ --td-warning-color-8: #713300;
21
+ --td-warning-color-9: #532300;
22
+ --td-warning-color-10: #3b1700;
23
+ --td-error-color-1: #fff0ed;
24
+ --td-error-color-2: #ffd8d2;
25
+ --td-error-color-3: #ffb9b0;
26
+ --td-error-color-4: #ff9285;
27
+ --td-error-color-5: #f6685d;
28
+ --td-error-color-6: #d54941;
29
+ --td-error-color-7: #ad352f;
30
+ --td-error-color-8: #881f1c;
31
+ --td-error-color-9: #68070a;
32
+ --td-error-color-10: #490002;
33
+ --td-success-color-1: #e3f9e9;
34
+ --td-success-color-2: #c6f3d7;
35
+ --td-success-color-3: #92dab2;
36
+ --td-success-color-4: #56c08d;
37
+ --td-success-color-5: #2ba471;
38
+ --td-success-color-6: #008858;
39
+ --td-success-color-7: #006c45;
40
+ --td-success-color-8: #005334;
41
+ --td-success-color-9: #003b23;
42
+ --td-success-color-10: #002515;
43
+ --td-gray-color-1: #f3f3f3;
44
+ --td-gray-color-2: #eee;
45
+ --td-gray-color-3: #e8e8e8;
46
+ --td-gray-color-4: #ddd;
47
+ --td-gray-color-5: #c6c6c6;
48
+ --td-gray-color-6: #a6a6a6;
49
+ --td-gray-color-7: #8b8b8b;
50
+ --td-gray-color-8: #777;
51
+ --td-gray-color-9: #5e5e5e;
52
+ --td-gray-color-10: #4b4b4b;
53
+ --td-gray-color-11: #393939;
54
+ --td-gray-color-12: #2c2c2c;
55
+ --td-gray-color-13: #242424;
56
+ --td-gray-color-14: #181818;
57
+
58
+ // 文字 & 图标 颜色
59
+ --td-font-white-1: rgba(255, 255, 255, 100%);
60
+ --td-font-white-2: rgba(255, 255, 255, 55%);
61
+ --td-font-white-3: rgba(255, 255, 255, 35%);
62
+ --td-font-white-4: rgba(255, 255, 255, 22%);
63
+ --td-font-gray-1: rgba(0, 0, 0, 90%);
64
+ --td-font-gray-2: rgba(0, 0, 0, 60%);
65
+ --td-font-gray-3: rgba(0, 0, 0, 40%);
66
+ --td-font-gray-4: rgba(0, 0, 0, 26%);
67
+
68
+ // 基础颜色
69
+ --td-brand-color: var(--td-brand-color-7); // 色彩-品牌-可操作
70
+ --td-warning-color: var(--td-warning-color-5); // 色彩-功能-警告
71
+ --td-error-color: var(--td-error-color-6); // 色彩-功能-失败
72
+ --td-success-color: var(--td-success-color-5); // 色彩-功能-成功
73
+
74
+ // 基础颜色的扩充用于 hover / 聚焦 / 禁用 / 点击 等状态
75
+ --td-brand-color-hover: var(--td-brand-color-6); // hover
76
+ --td-brand-color-focus: var(--td-brand-color-2); // focus态,包括鼠标和键盘
77
+ --td-brand-color-active: var(--td-brand-color-8); // 点击
78
+ --td-brand-color-disabled: var(--td-brand-color-3); // 禁用
79
+ --td-brand-color-light: var(--td-brand-color-1); // 浅色的选中
80
+ --td-brand-color-light-hover: var(--td-brand-color-2);
81
+
82
+ // 警告色扩充
83
+ --td-warning-color-hover: var(--td-warning-color-4);
84
+ --td-warning-color-focus: var(--td-warning-color-2);
85
+ --td-warning-color-active: var(--td-warning-color-6);
86
+ --td-warning-color-disabled: var(--td-warning-color-3);
87
+ --td-warning-color-light: var(--td-warning-color-1);
88
+ --td-warning-color-light-hover: var(--td-warning-color-2);
89
+
90
+ // 失败/错误色扩充
91
+ --td-error-color-hover: var(--td-error-color-5);
92
+ --td-error-color-focus: var(--td-error-color-2);
93
+ --td-error-color-active: var(--td-error-color-7);
94
+ --td-error-color-disabled: var(--td-error-color-3);
95
+ --td-error-color-light: var(--td-error-color-1);
96
+ --td-error-color-light-hover: var(--td-error-color-2);
97
+
98
+ // 成功色扩充
99
+ --td-success-color-hover: var(--td-success-color-4);
100
+ --td-success-color-focus: var(--td-success-color-2);
101
+ --td-success-color-active: var(--td-success-color-6);
102
+ --td-success-color-disabled: var(--td-success-color-3);
103
+ --td-success-color-light: var(--td-success-color-1);
104
+ --td-success-color-light-hover: var(--td-success-color-2);
105
+
106
+ // 遮罩
107
+ --td-mask-active: rgba(0, 0, 0, 60%); // 遮罩-弹出
108
+ --td-mask-disabled: rgba(255, 255, 255, 60%); // 遮罩-禁用
109
+ --td-mask-background: rgba(255, 255, 255, 96%); // 二维码遮罩
110
+
111
+ // 背景颜色
112
+ --td-bg-color-page: var(--td-gray-color-2); // 色彩 - page
113
+ --td-bg-color-container: #fff; // 色彩 - 容器
114
+ --td-bg-color-container-hover: var(--td-gray-color-1); // 色彩 - 容器 - hover
115
+ --td-bg-color-container-active: var(--td-gray-color-3); // 色彩 - 容器 - active
116
+ --td-bg-color-container-select: #fff; // 色彩 - 容器 - select
117
+ --td-bg-color-secondarycontainer: var(--td-gray-color-1); // 色彩 - 次级容器
118
+ --td-bg-color-secondarycontainer-hover: var(--td-gray-color-2); // 色彩 - 次级容器 - hover
119
+ --td-bg-color-secondarycontainer-active: var(--td-gray-color-4); // 色彩 - 次级容器 - active
120
+ --td-bg-color-component: var(--td-gray-color-3); // 色彩 - 组件
121
+ --td-bg-color-component-hover: var(--td-gray-color-4); // 色彩 - 组件 - hover
122
+ --td-bg-color-component-active: var(--td-gray-color-6); // 色彩 - 组件 - active
123
+ --td-bg-color-secondarycomponent: var(--td-gray-color-4); // 色彩 - 次级组件
124
+ --td-bg-color-secondarycomponent-hover: var(--td-gray-color-5); // 色彩 - 次级组件 - hover
125
+ --td-bg-color-secondarycomponent-active: var(--td-gray-color-6); // 色彩 - 次级组件 - active
126
+ --td-bg-color-component-disabled: var(--td-gray-color-2); // 色彩 - 组件 - disabled
127
+
128
+ // 特殊组件背景色,目前只用button、input 组件多主题场景,浅色主题下固定为白色,深色主题下transparent 适配背景颜色
129
+ --td-bg-color-specialcomponent: #fff;
130
+
131
+ // 文本颜色
132
+ --td-text-color-primary: var(--td-font-gray-1); // 色彩-文字-主要
133
+ --td-text-color-secondary: var(--td-font-gray-2); // 色彩-文字-次要
134
+ --td-text-color-placeholder: var(--td-font-gray-3); // 色彩-文字-占位说明
135
+ --td-text-color-disabled: var(--td-font-gray-4); // 色彩-文字-禁用
136
+ --td-text-color-anti: #fff; // 色彩-文字-反色
137
+ --td-text-color-brand: var(--td-brand-color-7); // 色彩-文字-品牌
138
+ --td-text-color-link: var(--td-brand-color-8); // 色彩-文字-链接
139
+ --td-text-color-watermark: rgba(0, 0, 0, 10%); // 色彩-文字-水印颜色
140
+
141
+ // 分割线
142
+ --td-border-level-1-color: var(--td-gray-color-3);
143
+ --td-component-stroke: var(--td-gray-color-3);
144
+ // 边框
145
+ --td-border-level-2-color: var(--td-gray-color-4);
146
+ --td-component-border: var(--td-gray-color-4);
147
+
148
+ // 基础/下层 投影 hover 使用的组件包括:表格
149
+ --td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
150
+ // 中层投影 下拉 使用的组件包括:下拉菜单 / 气泡确认 / 选择
151
+ --td-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
152
+ // 上层投影(警告/弹窗)使用的组件包括:全局提示 / 消息通知
153
+ --td-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%);
154
+
155
+ // 内投影用于弹窗类组件(气泡确认 / 全局提示 / 消息通知)的内描影
156
+ --td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
157
+ --td-shadow-inset-right: inset 0.5px 0 0 #dcdcdc;
158
+ --td-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc;
159
+ --td-shadow-inset-left: inset -0.5px 0 0 #dcdcdc;
160
+
161
+ // table 特定阴影
162
+ --td-table-shadow-color: rgba(0, 0, 0, 8%);
163
+
164
+ // 滚动条颜色
165
+ --td-scrollbar-color: rgba(0, 0, 0, 10%);
166
+ // 滚动条悬浮颜色( hover )
167
+ --td-scrollbar-hover-color: rgba(0, 0, 0, 30%);
168
+ // 滚动条轨道颜色,不能是带透明度,否则纵向滚动时,横向滚动条会穿透
169
+ --td-scroll-track-color: #fff;
170
+ }
@@ -1,9 +1,9 @@
1
- :root {
2
- --td-radius-small: 2px;
3
- --td-radius-default: 3px;
4
- --td-radius-medium: 6px;
5
- --td-radius-large: 9px;
6
- --td-radius-extraLarge: 12px;
7
- --td-radius-round: 999px;
8
- --td-radius-circle: 50%;
9
- }
1
+ :root {
2
+ --td-radius-small: 2px;
3
+ --td-radius-default: 3px;
4
+ --td-radius-medium: 6px;
5
+ --td-radius-large: 9px;
6
+ --td-radius-extraLarge: 12px;
7
+ --td-radius-round: 999px;
8
+ --td-radius-circle: 50%;
9
+ }
@@ -1,68 +1,68 @@
1
- // size/margin/padding相关 token
2
- :root {
3
- --td-size-1: 2px;
4
- --td-size-2: 4px;
5
- --td-size-3: 6px;
6
- --td-size-4: 8px;
7
- --td-size-5: 12px;
8
- --td-size-6: 16px;
9
- --td-size-7: 20px;
10
- --td-size-8: 24px;
11
- --td-size-9: 28px;
12
- --td-size-10: 32px;
13
- --td-size-11: 36px;
14
- --td-size-12: 40px;
15
- --td-size-13: 48px;
16
- --td-size-14: 56px;
17
- --td-size-15: 64px;
18
- --td-size-16: 72px;
19
-
20
- //全局 component 组件尺寸高度相关 token
21
- --td-comp-size-xxxs: var(--td-size-6);
22
- --td-comp-size-xxs: var(--td-size-7);
23
- --td-comp-size-xs: var(--td-size-8);
24
- --td-comp-size-s: var(--td-size-9);
25
- --td-comp-size-m: var(--td-size-10);
26
- --td-comp-size-l: var(--td-size-11);
27
- --td-comp-size-xl: var(--td-size-12);
28
- --td-comp-size-xxl: var(--td-size-13);
29
- --td-comp-size-xxxl: var(--td-size-14);
30
- --td-comp-size-xxxxl: var(--td-size-15);
31
- --td-comp-size-xxxxxl: var(--td-size-16);
32
-
33
- //全局 popup 弹出层整体边距token
34
- --td-pop-padding-s: var(--td-size-2);
35
- --td-pop-padding-m: var(--td-size-3);
36
- --td-pop-padding-l: var(--td-size-4);
37
- --td-pop-padding-xl: var(--td-size-5);
38
- --td-pop-padding-xxl: var(--td-size-6);
39
-
40
- //全局 component 组件左右边距 token
41
- --td-comp-paddingLR-xxs: var(--td-size-1);
42
- --td-comp-paddingLR-xs: var(--td-size-2);
43
- --td-comp-paddingLR-s: var(--td-size-4);
44
- --td-comp-paddingLR-m: var(--td-size-5);
45
- --td-comp-paddingLR-l: var(--td-size-6);
46
- --td-comp-paddingLR-xl: var(--td-size-8);
47
- --td-comp-paddingLR-xxl: var(--td-size-10);
48
-
49
- //全局 component 组件上下边距 token
50
- --td-comp-paddingTB-xxs: var(--td-size-1);
51
- --td-comp-paddingTB-xs: var(--td-size-2);
52
- --td-comp-paddingTB-s: var(--td-size-4);
53
- --td-comp-paddingTB-m: var(--td-size-5);
54
- --td-comp-paddingTB-l: var(--td-size-6);
55
- --td-comp-paddingTB-xl: var(--td-size-8);
56
- --td-comp-paddingTB-xxl: var(--td-size-10);
57
-
58
- //全局 component 组件间距 token
59
- --td-comp-margin-xxs: var(--td-size-1);
60
- --td-comp-margin-xs: var(--td-size-2);
61
- --td-comp-margin-s: var(--td-size-4);
62
- --td-comp-margin-m: var(--td-size-5);
63
- --td-comp-margin-l: var(--td-size-6);
64
- --td-comp-margin-xl: var(--td-size-7);
65
- --td-comp-margin-xxl: var(--td-size-8);
66
- --td-comp-margin-xxxl: var(--td-size-10);
67
- --td-comp-margin-xxxxl: var(--td-size-12);
68
- }
1
+ // size/margin/padding相关 token
2
+ :root {
3
+ --td-size-1: 2px;
4
+ --td-size-2: 4px;
5
+ --td-size-3: 6px;
6
+ --td-size-4: 8px;
7
+ --td-size-5: 12px;
8
+ --td-size-6: 16px;
9
+ --td-size-7: 20px;
10
+ --td-size-8: 24px;
11
+ --td-size-9: 28px;
12
+ --td-size-10: 32px;
13
+ --td-size-11: 36px;
14
+ --td-size-12: 40px;
15
+ --td-size-13: 48px;
16
+ --td-size-14: 56px;
17
+ --td-size-15: 64px;
18
+ --td-size-16: 72px;
19
+
20
+ //全局 component 组件尺寸高度相关 token
21
+ --td-comp-size-xxxs: var(--td-size-6);
22
+ --td-comp-size-xxs: var(--td-size-7);
23
+ --td-comp-size-xs: var(--td-size-8);
24
+ --td-comp-size-s: var(--td-size-9);
25
+ --td-comp-size-m: var(--td-size-10);
26
+ --td-comp-size-l: var(--td-size-11);
27
+ --td-comp-size-xl: var(--td-size-12);
28
+ --td-comp-size-xxl: var(--td-size-13);
29
+ --td-comp-size-xxxl: var(--td-size-14);
30
+ --td-comp-size-xxxxl: var(--td-size-15);
31
+ --td-comp-size-xxxxxl: var(--td-size-16);
32
+
33
+ //全局 popup 弹出层整体边距token
34
+ --td-pop-padding-s: var(--td-size-2);
35
+ --td-pop-padding-m: var(--td-size-3);
36
+ --td-pop-padding-l: var(--td-size-4);
37
+ --td-pop-padding-xl: var(--td-size-5);
38
+ --td-pop-padding-xxl: var(--td-size-6);
39
+
40
+ //全局 component 组件左右边距 token
41
+ --td-comp-paddingLR-xxs: var(--td-size-1);
42
+ --td-comp-paddingLR-xs: var(--td-size-2);
43
+ --td-comp-paddingLR-s: var(--td-size-4);
44
+ --td-comp-paddingLR-m: var(--td-size-5);
45
+ --td-comp-paddingLR-l: var(--td-size-6);
46
+ --td-comp-paddingLR-xl: var(--td-size-8);
47
+ --td-comp-paddingLR-xxl: var(--td-size-10);
48
+
49
+ //全局 component 组件上下边距 token
50
+ --td-comp-paddingTB-xxs: var(--td-size-1);
51
+ --td-comp-paddingTB-xs: var(--td-size-2);
52
+ --td-comp-paddingTB-s: var(--td-size-4);
53
+ --td-comp-paddingTB-m: var(--td-size-5);
54
+ --td-comp-paddingTB-l: var(--td-size-6);
55
+ --td-comp-paddingTB-xl: var(--td-size-8);
56
+ --td-comp-paddingTB-xxl: var(--td-size-10);
57
+
58
+ //全局 component 组件间距 token
59
+ --td-comp-margin-xxs: var(--td-size-1);
60
+ --td-comp-margin-xs: var(--td-size-2);
61
+ --td-comp-margin-s: var(--td-size-4);
62
+ --td-comp-margin-m: var(--td-size-5);
63
+ --td-comp-margin-l: var(--td-size-6);
64
+ --td-comp-margin-xl: var(--td-size-7);
65
+ --td-comp-margin-xxl: var(--td-size-8);
66
+ --td-comp-margin-xxxl: var(--td-size-10);
67
+ --td-comp-margin-xxxxl: var(--td-size-12);
68
+ }
@@ -1,58 +1,58 @@
1
- @use "../_vars.scss" as *;
2
- @use "../_vars.scss" as *;
3
-
4
- @keyframes t-fade-in {
5
- from {
6
- opacity: 0;
7
- }
8
-
9
- to {
10
- opacity: 1;
11
- }
12
- }
13
-
14
- @keyframes t-fade-out {
15
- from {
16
- opacity: 1;
17
- }
18
-
19
- to {
20
- opacity: 0;
21
- }
22
- }
23
-
24
- @keyframes t-spin {
25
- from {
26
- transform: rotate(0deg);
27
- }
28
-
29
- to {
30
- transform: rotate(360deg);
31
- }
32
- }
33
-
34
- .#{$prefix}-icon-loading {
35
- animation: t-spin 1s linear infinite;
36
- }
37
-
38
- // 动态生成 keyframes 动画
39
- @mixin anim-g-attr-change($name, $attr, $from, $to) {
40
- @keyframes #{$name} {
41
- from {
42
- #{$attr}: #{$from};
43
- }
44
- to {
45
- #{$attr}: #{$to};
46
- }
47
- }
48
- }
49
-
50
- @keyframes t-zoom-out {
51
- from {
52
- transform: scale(0.2);
53
- }
54
-
55
- to {
56
- transform: scale(1);
57
- }
58
- }
1
+ @use "../_vars.scss" as *;
2
+ @use "../_vars.scss" as *;
3
+
4
+ @keyframes t-fade-in {
5
+ from {
6
+ opacity: 0;
7
+ }
8
+
9
+ to {
10
+ opacity: 1;
11
+ }
12
+ }
13
+
14
+ @keyframes t-fade-out {
15
+ from {
16
+ opacity: 1;
17
+ }
18
+
19
+ to {
20
+ opacity: 0;
21
+ }
22
+ }
23
+
24
+ @keyframes t-spin {
25
+ from {
26
+ transform: rotate(0deg);
27
+ }
28
+
29
+ to {
30
+ transform: rotate(360deg);
31
+ }
32
+ }
33
+
34
+ .#{$prefix}-icon-loading {
35
+ animation: t-spin 1s linear infinite;
36
+ }
37
+
38
+ // 动态生成 keyframes 动画
39
+ @mixin anim-g-attr-change($name, $attr, $from, $to) {
40
+ @keyframes #{$name} {
41
+ from {
42
+ #{$attr}: #{$from};
43
+ }
44
+ to {
45
+ #{$attr}: #{$to};
46
+ }
47
+ }
48
+ }
49
+
50
+ @keyframes t-zoom-out {
51
+ from {
52
+ transform: scale(0.2);
53
+ }
54
+
55
+ to {
56
+ transform: scale(1);
57
+ }
58
+ }
@@ -1,10 +1,10 @@
1
- @use "../_vars.scss" as *;
2
- @use "../mixins/_text.scss" as *;
3
- .#{$prefix}-tips {
4
- font-size: $font-size-s;
5
- }
6
-
7
- @include tips-text-status(default);
8
- @include tips-text-status(error);
9
- @include tips-text-status(warning);
10
- @include tips-text-status(success);
1
+ @use "../_vars.scss" as *;
2
+ @use "../mixins/_text.scss" as *;
3
+ .#{$prefix}-tips {
4
+ font-size: $font-size-s;
5
+ }
6
+
7
+ @include tips-text-status(default);
8
+ @include tips-text-status(error);
9
+ @include tips-text-status(warning);
10
+ @include tips-text-status(success);
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Switch } from "@tendaui/react";
3
3
 
4
4
  const WithLabelExample = () => (
5
- <div>
5
+ <div style={{ display: "flex", flexDirection: "column", gap: "12px" }}>
6
6
  <div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
7
7
  <Switch label={["开", "关"]} defaultValue={true} />
8
8
  <span style={{ color: "#666" }}>数组形式</span>