@tiny-design/react 1.3.0 → 1.5.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 (190) hide show
  1. package/es/alert/style/_index.scss +2 -2
  2. package/es/alert/style/index.css +2 -2
  3. package/es/auto-complete/style/_index.scss +4 -5
  4. package/es/auto-complete/style/index.css +4 -5
  5. package/es/breadcrumb/style/index.css +1 -1
  6. package/es/breadcrumb/types.d.ts +1 -1
  7. package/es/button/style/_index.scss +16 -11
  8. package/es/button/style/index.css +40 -19
  9. package/es/calendar/style/_index.scss +9 -9
  10. package/es/calendar/style/index.css +9 -9
  11. package/es/card/style/index.css +3 -3
  12. package/es/cascader/style/_index.scss +9 -9
  13. package/es/cascader/style/index.css +9 -9
  14. package/es/checkbox/style/_index.scss +9 -12
  15. package/es/checkbox/style/index.css +9 -12
  16. package/es/collapse/style/index.css +3 -3
  17. package/es/color-picker/style/_index.scss +7 -7
  18. package/es/color-picker/style/index.css +4 -4
  19. package/es/date-picker/style/_index.scss +1 -1
  20. package/es/date-picker/style/index.css +1 -1
  21. package/es/descriptions/style/_index.scss +5 -6
  22. package/es/descriptions/style/index.css +6 -6
  23. package/es/empty/style/_index.scss +1 -1
  24. package/es/empty/style/index.css +1 -1
  25. package/es/form/style/_index.scss +5 -6
  26. package/es/form/style/index.css +4 -4
  27. package/es/index.d.ts +2 -1
  28. package/es/index.js +2 -1
  29. package/es/input/style/_index.scss +5 -4
  30. package/es/input/style/_mixin.scss +1 -1
  31. package/es/input/style/index.css +21 -20
  32. package/es/input-number/input-number.js +11 -5
  33. package/es/input-number/input-number.js.map +1 -1
  34. package/es/input-number/style/_index.scss +5 -3
  35. package/es/input-number/style/index.css +13 -11
  36. package/es/input-otp/style/_index.scss +1 -1
  37. package/es/input-otp/style/index.css +8 -8
  38. package/es/list/style/_index.scss +3 -3
  39. package/es/list/style/index.css +3 -3
  40. package/es/marquee/index.d.ts +1 -0
  41. package/es/marquee/index.js +9 -0
  42. package/es/marquee/index.js.map +1 -0
  43. package/es/marquee/marquee.d.ts +8 -0
  44. package/es/marquee/marquee.js +42 -0
  45. package/es/marquee/marquee.js.map +1 -0
  46. package/es/marquee/style/_index.scss +77 -0
  47. package/es/marquee/style/index.css +64 -0
  48. package/es/marquee/style/index.d.ts +1 -0
  49. package/es/marquee/style/index.js +1 -0
  50. package/es/marquee/types.d.ts +21 -0
  51. package/es/native-select/style/index.css +4 -4
  52. package/es/notification/style/_index.scss +1 -1
  53. package/es/notification/style/index.css +1 -1
  54. package/es/pop-confirm/style/_index.scss +5 -1
  55. package/es/pop-confirm/style/index.css +5 -1
  56. package/es/popup/style/_index.scss +9 -9
  57. package/es/popup/style/index.css +10 -10
  58. package/es/radio/style/_index.scss +5 -8
  59. package/es/radio/style/index.css +5 -8
  60. package/es/segmented/style/_index.scss +10 -10
  61. package/es/segmented/style/index.css +9 -9
  62. package/es/select/style/_index.scss +16 -17
  63. package/es/select/style/index.css +15 -16
  64. package/es/slider/style/_index.scss +1 -9
  65. package/es/slider/style/index.css +1 -6
  66. package/es/speed-dial/style/_index.scss +8 -9
  67. package/es/speed-dial/style/index.css +7 -7
  68. package/es/statistic/style/_index.scss +2 -2
  69. package/es/statistic/style/index.css +2 -2
  70. package/es/style/_component.scss +1 -0
  71. package/es/style/base.css +81 -3
  72. package/es/table/style/_index.scss +6 -6
  73. package/es/table/style/index.css +5 -5
  74. package/es/tag/style/_index.scss +24 -0
  75. package/es/tag/style/index.css +21 -1
  76. package/es/tag/types.d.ts +2 -1
  77. package/es/tag/types.js +7 -2
  78. package/es/tag/types.js.map +1 -1
  79. package/es/textarea/style/index.css +2 -2
  80. package/es/time-picker/style/_index.scss +14 -1
  81. package/es/time-picker/style/index.css +11 -1
  82. package/es/time-picker/time-panel.js +28 -28
  83. package/es/time-picker/time-panel.js.map +1 -1
  84. package/es/time-picker/time-picker.js +50 -29
  85. package/es/time-picker/time-picker.js.map +1 -1
  86. package/es/timeline/style/_index.scss +3 -3
  87. package/es/timeline/style/index.css +3 -3
  88. package/es/tooltip/style/index.css +1 -1
  89. package/es/transfer/style/_index.scss +4 -4
  90. package/es/transfer/style/index.css +4 -4
  91. package/es/tree/style/index.css +1 -1
  92. package/es/typography/style/_index.scss +2 -2
  93. package/es/typography/style/index.css +2 -2
  94. package/es/upload/style/_index.scss +4 -4
  95. package/es/upload/style/index.css +4 -4
  96. package/lib/alert/style/_index.scss +2 -2
  97. package/lib/alert/style/index.css +2 -2
  98. package/lib/auto-complete/style/_index.scss +4 -5
  99. package/lib/auto-complete/style/index.css +4 -5
  100. package/lib/breadcrumb/style/index.css +1 -1
  101. package/lib/breadcrumb/types.d.ts +1 -1
  102. package/lib/button/style/_index.scss +16 -11
  103. package/lib/button/style/index.css +40 -19
  104. package/lib/calendar/style/_index.scss +9 -9
  105. package/lib/calendar/style/index.css +9 -9
  106. package/lib/card/style/index.css +3 -3
  107. package/lib/cascader/style/_index.scss +9 -9
  108. package/lib/cascader/style/index.css +9 -9
  109. package/lib/checkbox/style/_index.scss +9 -12
  110. package/lib/checkbox/style/index.css +9 -12
  111. package/lib/collapse/style/index.css +3 -3
  112. package/lib/color-picker/style/_index.scss +7 -7
  113. package/lib/color-picker/style/index.css +4 -4
  114. package/lib/date-picker/style/_index.scss +1 -1
  115. package/lib/date-picker/style/index.css +1 -1
  116. package/lib/descriptions/style/_index.scss +5 -6
  117. package/lib/descriptions/style/index.css +6 -6
  118. package/lib/empty/style/_index.scss +1 -1
  119. package/lib/empty/style/index.css +1 -1
  120. package/lib/form/style/_index.scss +5 -6
  121. package/lib/form/style/index.css +4 -4
  122. package/lib/index.d.ts +2 -1
  123. package/lib/index.js +76 -74
  124. package/lib/input/style/_index.scss +5 -4
  125. package/lib/input/style/_mixin.scss +1 -1
  126. package/lib/input/style/index.css +21 -20
  127. package/lib/input-number/input-number.js +11 -5
  128. package/lib/input-number/input-number.js.map +1 -1
  129. package/lib/input-number/style/_index.scss +5 -3
  130. package/lib/input-number/style/index.css +13 -11
  131. package/lib/input-otp/style/_index.scss +1 -1
  132. package/lib/input-otp/style/index.css +8 -8
  133. package/lib/list/style/_index.scss +3 -3
  134. package/lib/list/style/index.css +3 -3
  135. package/lib/marquee/index.js +8 -0
  136. package/lib/marquee/index.js.map +1 -0
  137. package/lib/marquee/marquee.d.ts +8 -0
  138. package/lib/marquee/marquee.js +45 -0
  139. package/lib/marquee/marquee.js.map +1 -0
  140. package/lib/marquee/style/_index.scss +77 -0
  141. package/lib/marquee/style/index.css +64 -0
  142. package/lib/marquee/style/index.d.ts +1 -0
  143. package/lib/marquee/style/index.js +1 -0
  144. package/lib/marquee/types.d.ts +21 -0
  145. package/lib/native-select/style/index.css +4 -4
  146. package/lib/notification/style/_index.scss +1 -1
  147. package/lib/notification/style/index.css +1 -1
  148. package/lib/pop-confirm/style/_index.scss +5 -1
  149. package/lib/pop-confirm/style/index.css +5 -1
  150. package/lib/popup/style/_index.scss +9 -9
  151. package/lib/popup/style/index.css +10 -10
  152. package/lib/radio/style/_index.scss +5 -8
  153. package/lib/radio/style/index.css +5 -8
  154. package/lib/segmented/style/_index.scss +10 -10
  155. package/lib/segmented/style/index.css +9 -9
  156. package/lib/select/style/_index.scss +16 -17
  157. package/lib/select/style/index.css +15 -16
  158. package/lib/slider/style/_index.scss +1 -9
  159. package/lib/slider/style/index.css +1 -6
  160. package/lib/speed-dial/style/_index.scss +8 -9
  161. package/lib/speed-dial/style/index.css +7 -7
  162. package/lib/statistic/style/_index.scss +2 -2
  163. package/lib/statistic/style/index.css +2 -2
  164. package/lib/style/_component.scss +1 -0
  165. package/lib/style/base.css +81 -3
  166. package/lib/table/style/_index.scss +6 -6
  167. package/lib/table/style/index.css +5 -5
  168. package/lib/tag/style/_index.scss +24 -0
  169. package/lib/tag/style/index.css +21 -1
  170. package/lib/tag/types.d.ts +2 -1
  171. package/lib/tag/types.js +7 -2
  172. package/lib/tag/types.js.map +1 -1
  173. package/lib/textarea/style/index.css +2 -2
  174. package/lib/time-picker/style/_index.scss +14 -1
  175. package/lib/time-picker/style/index.css +11 -1
  176. package/lib/time-picker/time-panel.js +28 -28
  177. package/lib/time-picker/time-panel.js.map +1 -1
  178. package/lib/time-picker/time-picker.js +50 -29
  179. package/lib/time-picker/time-picker.js.map +1 -1
  180. package/lib/timeline/style/_index.scss +3 -3
  181. package/lib/timeline/style/index.css +3 -3
  182. package/lib/tooltip/style/index.css +1 -1
  183. package/lib/transfer/style/_index.scss +4 -4
  184. package/lib/transfer/style/index.css +4 -4
  185. package/lib/tree/style/index.css +1 -1
  186. package/lib/typography/style/_index.scss +2 -2
  187. package/lib/typography/style/index.css +2 -2
  188. package/lib/upload/style/_index.scss +4 -4
  189. package/lib/upload/style/index.css +4 -4
  190. package/package.json +3 -3
@@ -7,9 +7,9 @@
7
7
  box-sizing: border-box;
8
8
  padding: 10px 30px 10px 13px;
9
9
  position: relative;
10
- font-weight: $font-weight;
10
+ font-weight: var(--ty-font-weight);
11
11
  opacity: 1;
12
- font-size: $font-size-base;
12
+ font-size: var(--ty-font-size-base);
13
13
  transition: all 300ms;
14
14
  transform-origin: center top;
15
15
  overflow: hidden;
@@ -4,9 +4,9 @@
4
4
  box-sizing: border-box;
5
5
  padding: 10px 30px 10px 13px;
6
6
  position: relative;
7
- font-weight: 400;
7
+ font-weight: var(--ty-font-weight);
8
8
  opacity: 1;
9
- font-size: 1rem;
9
+ font-size: var(--ty-font-size-base);
10
10
  transition: all 300ms;
11
11
  transform-origin: center top;
12
12
  overflow: hidden;
@@ -18,12 +18,11 @@
18
18
  list-style-type: none;
19
19
  background-color: var(--ty-select-dropdown-bg);
20
20
  box-sizing: border-box;
21
- overflow-x: hidden;
22
- overflow-y: auto;
21
+ overflow: hidden auto;
23
22
  z-index: 10;
24
23
  box-shadow: var(--ty-shadow-popup);
25
- border-radius: $border-radius;
26
- font-size: $font-size-base;
24
+ border-radius: var(--ty-border-radius);
25
+ font-size: var(--ty-font-size-base);
27
26
  max-height: $select-dropdown-max-height;
28
27
  }
29
28
 
@@ -32,7 +31,7 @@
32
31
  padding: 16px;
33
32
  text-align: center;
34
33
  color: var(--ty-color-text-quaternary);
35
- font-size: $font-size-sm;
34
+ font-size: var(--ty-font-size-sm);
36
35
  }
37
36
  }
38
37
 
@@ -14,19 +14,18 @@
14
14
  list-style-type: none;
15
15
  background-color: var(--ty-select-dropdown-bg);
16
16
  box-sizing: border-box;
17
- overflow-x: hidden;
18
- overflow-y: auto;
17
+ overflow: hidden auto;
19
18
  z-index: 10;
20
19
  box-shadow: var(--ty-shadow-popup);
21
- border-radius: 2px;
22
- font-size: 1rem;
20
+ border-radius: var(--ty-border-radius);
21
+ font-size: var(--ty-font-size-base);
23
22
  max-height: 300px;
24
23
  }
25
24
  .ty-auto-complete__empty {
26
25
  padding: 16px;
27
26
  text-align: center;
28
27
  color: var(--ty-color-text-quaternary);
29
- font-size: 0.875rem;
28
+ font-size: var(--ty-font-size-sm);
30
29
  }
31
30
 
32
31
  .ty-auto-complete-option {
@@ -5,7 +5,7 @@
5
5
  display: flex;
6
6
  align-items: center;
7
7
  color: var(--ty-color-text-tertiary);
8
- font-size: 1rem;
8
+ font-size: var(--ty-font-size-base);
9
9
  }
10
10
  .ty-breadcrumb-item__separator {
11
11
  margin: 0 8px;
@@ -4,7 +4,7 @@ import React, { ReactElement } from "react";
4
4
  //#region src/breadcrumb/types.d.ts
5
5
  interface BreadcrumbProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['nav']> {
6
6
  separator?: React.ReactNode;
7
- children: ReactElement<BreadcrumbItemProps>;
7
+ children: ReactElement<BreadcrumbItemProps> | ReactElement<BreadcrumbItemProps>[];
8
8
  }
9
9
  interface BreadcrumbItemProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['li']> {
10
10
  separator?: React.ReactNode;
@@ -24,7 +24,7 @@ $btn-prefix: #{$prefix}-btn;
24
24
  line-height: $btn-line-height;
25
25
 
26
26
  &__loader {
27
- @include loader();
27
+ @include loader;
28
28
  }
29
29
 
30
30
  &__icon-container, &__loader {
@@ -91,19 +91,27 @@ $btn-prefix: #{$prefix}-btn;
91
91
  }
92
92
 
93
93
  &_info {
94
- @include button-style(#fff, var(--ty-color-info), var(--ty-color-info));
94
+ @include button-style(#fff, var(--ty-color-info), var(--ty-color-info),
95
+ var(--ty-color-info-hover), var(--ty-color-info-hover), #fff,
96
+ var(--ty-color-info-active), var(--ty-color-info-active), #fff);
95
97
  }
96
98
 
97
99
  &_success {
98
- @include button-style(#fff, var(--ty-color-success), var(--ty-color-success));
100
+ @include button-style(#fff, var(--ty-color-success), var(--ty-color-success),
101
+ var(--ty-color-success-hover), var(--ty-color-success-hover), #fff,
102
+ var(--ty-color-success-active), var(--ty-color-success-active), #fff);
99
103
  }
100
104
 
101
105
  &_warning {
102
- @include button-style(#fff, var(--ty-color-warning), var(--ty-color-warning));
106
+ @include button-style(#fff, var(--ty-color-warning), var(--ty-color-warning),
107
+ var(--ty-color-warning-hover), var(--ty-color-warning-hover), #fff,
108
+ var(--ty-color-warning-active), var(--ty-color-warning-active), #fff);
103
109
  }
104
110
 
105
111
  &_danger {
106
- @include button-style(#fff, var(--ty-color-danger), var(--ty-color-danger));
112
+ @include button-style(#fff, var(--ty-color-danger), var(--ty-color-danger),
113
+ var(--ty-color-danger-hover), var(--ty-color-danger-hover), #fff,
114
+ var(--ty-color-danger-active), var(--ty-color-danger-active), #fff);
107
115
  }
108
116
 
109
117
  // Sizes
@@ -135,13 +143,10 @@ $btn-prefix: #{$prefix}-btn;
135
143
  position: relative;
136
144
  pointer-events: none;
137
145
 
138
- &:before {
146
+ &::before {
139
147
  content: '';
140
148
  position: absolute;
141
- top: -1px;
142
- right: -1px;
143
- bottom: -1px;
144
- left: -1px;
149
+ inset: -1px;
145
150
  z-index: 1;
146
151
  display: block;
147
152
  background: var(--ty-btn-loading-bg);
@@ -208,7 +213,7 @@ $btn-prefix: #{$prefix}-btn;
208
213
  &_danger {
209
214
  .#{$btn-prefix} {
210
215
  &:not(:first-child) {
211
- border-left-color: rgba(255, 255, 255, 0.2);
216
+ border-left-color: rgb(255 255 255 / 20%);
212
217
  }
213
218
  }
214
219
  }
@@ -41,9 +41,9 @@
41
41
  -webkit-user-select: none;
42
42
  -moz-user-select: none;
43
43
  user-select: none;
44
- border-radius: 2px;
44
+ border-radius: var(--ty-border-radius);
45
45
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
46
- line-height: 1.5;
46
+ line-height: var(--ty-line-height-base);
47
47
  }
48
48
  .ty-btn__loader {
49
49
  display: inline-block;
@@ -59,7 +59,7 @@
59
59
  .ty-btn__icon-container, .ty-btn__loader {
60
60
  display: inline-block;
61
61
  pointer-events: none;
62
- line-height: 1.5;
62
+ line-height: var(--ty-line-height-base);
63
63
  vertical-align: middle;
64
64
  }
65
65
  .ty-btn__icon-container + span, .ty-btn__loader + span {
@@ -212,13 +212,19 @@
212
212
  }
213
213
  .ty-btn_info:hover {
214
214
  color: #fff;
215
+ background: var(--ty-color-info-hover);
216
+ border-color: var(--ty-color-info-hover);
215
217
  }
216
218
  .ty-btn_info:focus {
217
219
  color: #fff;
220
+ background: var(--ty-color-info-hover);
221
+ border-color: var(--ty-color-info-hover);
218
222
  z-index: 1;
219
223
  }
220
224
  .ty-btn_info:active {
221
225
  color: #fff;
226
+ background: var(--ty-color-info-active);
227
+ border-color: var(--ty-color-info-active);
222
228
  }
223
229
  .ty-btn_info:disabled {
224
230
  color: var(--ty-btn-disabled-color);
@@ -232,13 +238,19 @@
232
238
  }
233
239
  .ty-btn_success:hover {
234
240
  color: #fff;
241
+ background: var(--ty-color-success-hover);
242
+ border-color: var(--ty-color-success-hover);
235
243
  }
236
244
  .ty-btn_success:focus {
237
245
  color: #fff;
246
+ background: var(--ty-color-success-hover);
247
+ border-color: var(--ty-color-success-hover);
238
248
  z-index: 1;
239
249
  }
240
250
  .ty-btn_success:active {
241
251
  color: #fff;
252
+ background: var(--ty-color-success-active);
253
+ border-color: var(--ty-color-success-active);
242
254
  }
243
255
  .ty-btn_success:disabled {
244
256
  color: var(--ty-btn-disabled-color);
@@ -252,13 +264,19 @@
252
264
  }
253
265
  .ty-btn_warning:hover {
254
266
  color: #fff;
267
+ background: var(--ty-color-warning-hover);
268
+ border-color: var(--ty-color-warning-hover);
255
269
  }
256
270
  .ty-btn_warning:focus {
257
271
  color: #fff;
272
+ background: var(--ty-color-warning-hover);
273
+ border-color: var(--ty-color-warning-hover);
258
274
  z-index: 1;
259
275
  }
260
276
  .ty-btn_warning:active {
261
277
  color: #fff;
278
+ background: var(--ty-color-warning-active);
279
+ border-color: var(--ty-color-warning-active);
262
280
  }
263
281
  .ty-btn_warning:disabled {
264
282
  color: var(--ty-btn-disabled-color);
@@ -272,13 +290,19 @@
272
290
  }
273
291
  .ty-btn_danger:hover {
274
292
  color: #fff;
293
+ background: var(--ty-color-danger-hover);
294
+ border-color: var(--ty-color-danger-hover);
275
295
  }
276
296
  .ty-btn_danger:focus {
277
297
  color: #fff;
298
+ background: var(--ty-color-danger-hover);
299
+ border-color: var(--ty-color-danger-hover);
278
300
  z-index: 1;
279
301
  }
280
302
  .ty-btn_danger:active {
281
303
  color: #fff;
304
+ background: var(--ty-color-danger-active);
305
+ border-color: var(--ty-color-danger-active);
282
306
  }
283
307
  .ty-btn_danger:disabled {
284
308
  color: var(--ty-btn-disabled-color);
@@ -287,18 +311,18 @@
287
311
  }
288
312
  .ty-btn_sm {
289
313
  padding: 0 10px;
290
- font-size: 0.875rem;
291
- height: 24px;
314
+ font-size: var(--ty-font-size-sm);
315
+ height: var(--ty-height-sm);
292
316
  }
293
317
  .ty-btn_md {
294
318
  padding: 0 15px;
295
- font-size: 1rem;
296
- height: 32px;
319
+ font-size: var(--ty-font-size-base);
320
+ height: var(--ty-height-md);
297
321
  }
298
322
  .ty-btn_lg {
299
323
  padding: 0 28px;
300
- font-size: 1.25rem;
301
- height: 42px;
324
+ font-size: var(--ty-font-size-lg);
325
+ height: var(--ty-height-lg);
302
326
  }
303
327
  .ty-btn_block {
304
328
  width: 100%;
@@ -307,19 +331,16 @@
307
331
  margin: 0;
308
332
  }
309
333
  .ty-btn_round {
310
- border-radius: 42px;
334
+ border-radius: var(--ty-height-lg);
311
335
  }
312
336
  .ty-btn_loading {
313
337
  position: relative;
314
338
  pointer-events: none;
315
339
  }
316
- .ty-btn_loading:before {
340
+ .ty-btn_loading::before {
317
341
  content: "";
318
342
  position: absolute;
319
- top: -1px;
320
- right: -1px;
321
- bottom: -1px;
322
- left: -1px;
343
+ inset: -1px;
323
344
  z-index: 1;
324
345
  display: block;
325
346
  background: var(--ty-btn-loading-bg);
@@ -349,12 +370,12 @@
349
370
  z-index: 1;
350
371
  }
351
372
  .ty-btn-group .ty-btn:first-child {
352
- border-top-left-radius: 2px;
353
- border-bottom-left-radius: 2px;
373
+ border-top-left-radius: var(--ty-border-radius);
374
+ border-bottom-left-radius: var(--ty-border-radius);
354
375
  }
355
376
  .ty-btn-group .ty-btn:last-child {
356
- border-top-right-radius: 2px;
357
- border-bottom-right-radius: 2px;
377
+ border-top-right-radius: var(--ty-border-radius);
378
+ border-bottom-right-radius: var(--ty-border-radius);
358
379
  }
359
380
  .ty-btn-group_round .ty-btn:first-child {
360
381
  border-top-left-radius: 30px;
@@ -3,7 +3,7 @@
3
3
  .#{$prefix}-calendar {
4
4
  background: var(--ty-calendar-bg, #fff);
5
5
  border: 1px solid var(--ty-calendar-border, #{$gray-200});
6
- border-radius: $border-radius;
6
+ border-radius: var(--ty-border-radius);
7
7
 
8
8
  &_fullscreen {
9
9
  width: 100%;
@@ -30,7 +30,7 @@
30
30
  border: none;
31
31
  background: transparent;
32
32
  cursor: pointer;
33
- border-radius: $border-radius;
33
+ border-radius: var(--ty-border-radius);
34
34
  font-size: 18px;
35
35
  color: var(--ty-color-text, #{$gray-700});
36
36
 
@@ -41,7 +41,7 @@
41
41
 
42
42
  &__title {
43
43
  font-weight: 500;
44
- font-size: $font-size-base;
44
+ font-size: var(--ty-font-size-base);
45
45
  }
46
46
 
47
47
  &__title-btn {
@@ -51,7 +51,7 @@
51
51
  font-weight: inherit;
52
52
  font-size: inherit;
53
53
  padding: 4px 8px;
54
- border-radius: $border-radius;
54
+ border-radius: var(--ty-border-radius);
55
55
  color: var(--ty-color-text, #{$gray-800});
56
56
 
57
57
  &:hover {
@@ -73,7 +73,7 @@
73
73
  padding: 8px 0;
74
74
  text-align: center;
75
75
  font-weight: 500;
76
- font-size: $font-size-sm;
76
+ font-size: var(--ty-font-size-sm);
77
77
  color: var(--ty-color-text-secondary, #{$gray-600});
78
78
  }
79
79
 
@@ -111,7 +111,7 @@
111
111
  &_selected .#{$prefix}-calendar__cell-inner {
112
112
  background: var(--ty-color-primary, #{$primary-color});
113
113
  color: #fff;
114
- border-radius: $border-radius;
114
+ border-radius: var(--ty-border-radius);
115
115
  }
116
116
 
117
117
  &_selected .#{$prefix}-calendar__cell-date {
@@ -121,7 +121,7 @@
121
121
 
122
122
  &__cell-inner {
123
123
  padding: 4px;
124
- border-radius: $border-radius;
124
+ border-radius: var(--ty-border-radius);
125
125
  min-height: 24px;
126
126
  display: flex;
127
127
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  line-height: 24px;
140
140
  min-width: 24px;
141
141
  text-align: center;
142
- font-size: $font-size-sm;
142
+ font-size: var(--ty-font-size-sm);
143
143
  }
144
144
 
145
145
  &__cell-content {
@@ -159,7 +159,7 @@
159
159
  text-align: center;
160
160
  padding: 16px 8px;
161
161
  cursor: pointer;
162
- border-radius: $border-radius;
162
+ border-radius: var(--ty-border-radius);
163
163
  transition: all 0.2s;
164
164
 
165
165
  &:hover {
@@ -1,7 +1,7 @@
1
1
  .ty-calendar {
2
2
  background: var(--ty-calendar-bg, #fff);
3
3
  border: 1px solid var(--ty-calendar-border, #e9ecef);
4
- border-radius: 2px;
4
+ border-radius: var(--ty-border-radius);
5
5
  }
6
6
  .ty-calendar_fullscreen {
7
7
  width: 100%;
@@ -25,7 +25,7 @@
25
25
  border: none;
26
26
  background: transparent;
27
27
  cursor: pointer;
28
- border-radius: 2px;
28
+ border-radius: var(--ty-border-radius);
29
29
  font-size: 18px;
30
30
  color: var(--ty-color-text, #525f7f);
31
31
  }
@@ -34,7 +34,7 @@
34
34
  }
35
35
  .ty-calendar__title {
36
36
  font-weight: 500;
37
- font-size: 1rem;
37
+ font-size: var(--ty-font-size-base);
38
38
  }
39
39
  .ty-calendar__title-btn {
40
40
  border: none;
@@ -43,7 +43,7 @@
43
43
  font-weight: inherit;
44
44
  font-size: inherit;
45
45
  padding: 4px 8px;
46
- border-radius: 2px;
46
+ border-radius: var(--ty-border-radius);
47
47
  color: var(--ty-color-text, #32325d);
48
48
  }
49
49
  .ty-calendar__title-btn:hover {
@@ -61,7 +61,7 @@
61
61
  padding: 8px 0;
62
62
  text-align: center;
63
63
  font-weight: 500;
64
- font-size: 0.875rem;
64
+ font-size: var(--ty-font-size-sm);
65
65
  color: var(--ty-color-text-secondary, #8898aa);
66
66
  }
67
67
  .ty-calendar__cell {
@@ -92,14 +92,14 @@
92
92
  .ty-calendar__cell_selected .ty-calendar__cell-inner {
93
93
  background: var(--ty-color-primary, #6e41bf);
94
94
  color: #fff;
95
- border-radius: 2px;
95
+ border-radius: var(--ty-border-radius);
96
96
  }
97
97
  .ty-calendar__cell_selected .ty-calendar__cell-date {
98
98
  color: inherit;
99
99
  }
100
100
  .ty-calendar__cell-inner {
101
101
  padding: 4px;
102
- border-radius: 2px;
102
+ border-radius: var(--ty-border-radius);
103
103
  min-height: 24px;
104
104
  display: flex;
105
105
  flex-direction: column;
@@ -115,7 +115,7 @@
115
115
  line-height: 24px;
116
116
  min-width: 24px;
117
117
  text-align: center;
118
- font-size: 0.875rem;
118
+ font-size: var(--ty-font-size-sm);
119
119
  }
120
120
  .ty-calendar__cell-content {
121
121
  font-size: 12px;
@@ -131,7 +131,7 @@
131
131
  text-align: center;
132
132
  padding: 16px 8px;
133
133
  cursor: pointer;
134
- border-radius: 2px;
134
+ border-radius: var(--ty-border-radius);
135
135
  transition: all 0.2s;
136
136
  }
137
137
  .ty-calendar__month-cell:hover {
@@ -2,7 +2,7 @@
2
2
  box-sizing: border-box;
3
3
  padding: 0;
4
4
  margin: 0;
5
- border-radius: 2px;
5
+ border-radius: var(--ty-border-radius);
6
6
  transition: all 0.3s;
7
7
  background-color: var(--ty-card-bg);
8
8
  }
@@ -10,7 +10,7 @@
10
10
  margin-top: 15px;
11
11
  }
12
12
  .ty-card > img:first-child {
13
- border-radius: 2px 2px 0 0;
13
+ border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
14
14
  }
15
15
  .ty-card_bordered {
16
16
  border: 1px solid var(--ty-card-border);
@@ -36,7 +36,7 @@
36
36
  font-size: 16px;
37
37
  background: transparent;
38
38
  border-bottom: 1px solid var(--ty-card-border);
39
- border-radius: 2px 2px 0 0;
39
+ border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
40
40
  }
41
41
  .ty-card__body {
42
42
  box-sizing: border-box;
@@ -11,20 +11,20 @@
11
11
  }
12
12
 
13
13
  &_sm &__selector {
14
- height: $height-sm;
15
- font-size: $font-size-sm;
14
+ height: var(--ty-height-sm);
15
+ font-size: var(--ty-font-size-sm);
16
16
  padding: 0 28px 0 8px;
17
17
  }
18
18
 
19
19
  &_md &__selector {
20
- height: $height-md;
21
- font-size: $font-size-base;
20
+ height: var(--ty-height-md);
21
+ font-size: var(--ty-font-size-base);
22
22
  padding: 0 32px 0 10px;
23
23
  }
24
24
 
25
25
  &_lg &__selector {
26
- height: $height-lg;
27
- font-size: $font-size-lg;
26
+ height: var(--ty-height-lg);
27
+ font-size: var(--ty-font-size-lg);
28
28
  padding: 0 36px 0 12px;
29
29
  }
30
30
 
@@ -33,7 +33,7 @@
33
33
  align-items: center;
34
34
  width: 100%;
35
35
  border: 1px solid var(--ty-cascader-border, #{$gray-300});
36
- border-radius: $border-radius;
36
+ border-radius: var(--ty-border-radius);
37
37
  background: var(--ty-cascader-bg, #fff);
38
38
  cursor: pointer;
39
39
  transition: all 0.2s;
@@ -95,9 +95,9 @@
95
95
 
96
96
  &__dropdown {
97
97
  background: var(--ty-cascader-dropdown-bg, #fff);
98
- border-radius: $border-radius;
98
+ border-radius: var(--ty-border-radius);
99
99
  box-shadow: $select-dropdown-shadow;
100
- font-size: $font-size-base;
100
+ font-size: var(--ty-font-size-base);
101
101
  }
102
102
 
103
103
  &__menus {
@@ -8,18 +8,18 @@
8
8
  pointer-events: none;
9
9
  }
10
10
  .ty-cascader_sm .ty-cascader__selector {
11
- height: 24px;
12
- font-size: 0.875rem;
11
+ height: var(--ty-height-sm);
12
+ font-size: var(--ty-font-size-sm);
13
13
  padding: 0 28px 0 8px;
14
14
  }
15
15
  .ty-cascader_md .ty-cascader__selector {
16
- height: 32px;
17
- font-size: 1rem;
16
+ height: var(--ty-height-md);
17
+ font-size: var(--ty-font-size-base);
18
18
  padding: 0 32px 0 10px;
19
19
  }
20
20
  .ty-cascader_lg .ty-cascader__selector {
21
- height: 42px;
22
- font-size: 1.25rem;
21
+ height: var(--ty-height-lg);
22
+ font-size: var(--ty-font-size-lg);
23
23
  padding: 0 36px 0 12px;
24
24
  }
25
25
  .ty-cascader__selector {
@@ -27,7 +27,7 @@
27
27
  align-items: center;
28
28
  width: 100%;
29
29
  border: 1px solid var(--ty-cascader-border, #dee2e6);
30
- border-radius: 2px;
30
+ border-radius: var(--ty-border-radius);
31
31
  background: var(--ty-cascader-bg, #fff);
32
32
  cursor: pointer;
33
33
  transition: all 0.2s;
@@ -79,9 +79,9 @@
79
79
  }
80
80
  .ty-cascader__dropdown {
81
81
  background: var(--ty-cascader-dropdown-bg, #fff);
82
- border-radius: 2px;
82
+ border-radius: var(--ty-border-radius);
83
83
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
84
- font-size: 1rem;
84
+ font-size: var(--ty-font-size-base);
85
85
  }
86
86
  .ty-cascader__menus {
87
87
  display: flex;
@@ -4,7 +4,7 @@
4
4
  position: relative;
5
5
  display: inline-flex;
6
6
  align-items: center;
7
- font-size: $font-size-base;
7
+ font-size: var(--ty-font-size-base);
8
8
  margin-right: 8px;
9
9
  color: var(--ty-color-text);
10
10
  box-sizing: border-box;
@@ -17,10 +17,7 @@
17
17
 
18
18
  &__native {
19
19
  position: absolute;
20
- top: 0;
21
- right: 0;
22
- bottom: 0;
23
- left: 0;
20
+ inset: 0;
24
21
  width: 100%;
25
22
  height: 100%;
26
23
  z-index: 1;
@@ -43,7 +40,7 @@
43
40
  line-height: 1;
44
41
  vertical-align: middle;
45
42
 
46
- &:before {
43
+ &::before {
47
44
  content: '';
48
45
  position: absolute;
49
46
  display: block;
@@ -56,7 +53,7 @@
56
53
  transform: scale(0);
57
54
  }
58
55
 
59
- &:after {
56
+ &::after {
60
57
  transform: rotate(45deg) scaleY(1);
61
58
  pointer-events: none;
62
59
  box-sizing: content-box;
@@ -83,12 +80,12 @@
83
80
  background-color: var(--ty-color-primary);
84
81
  border-color: var(--ty-color-primary);
85
82
 
86
- &:after {
83
+ &::after {
87
84
  content: '';
88
85
  transform: rotate(45deg) scale(1);
89
86
  }
90
87
 
91
- &:before {
88
+ &::before {
92
89
  transform: scale(0);
93
90
  }
94
91
  }
@@ -101,11 +98,11 @@
101
98
  background-color: var(--ty-color-primary);
102
99
  border-color: var(--ty-color-primary);
103
100
 
104
- &:before {
101
+ &::before {
105
102
  transform: scale(1);
106
103
  }
107
104
 
108
- &:after {
105
+ &::after {
109
106
  transform: rotate(45deg) scale(0);
110
107
  }
111
108
  }
@@ -122,7 +119,7 @@
122
119
  background-color: var(--ty-checkbox-disabled-bg);
123
120
  border-color: var(--ty-checkbox-border) !important;
124
121
 
125
- &:after {
122
+ &::after {
126
123
  border-color: var(--ty-color-text-quaternary);
127
124
  }
128
125