@tiny-design/react 1.4.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 (168) 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.css +14 -14
  8. package/es/calendar/style/_index.scss +9 -9
  9. package/es/calendar/style/index.css +9 -9
  10. package/es/card/style/index.css +3 -3
  11. package/es/cascader/style/_index.scss +9 -9
  12. package/es/cascader/style/index.css +9 -9
  13. package/es/checkbox/style/_index.scss +9 -12
  14. package/es/checkbox/style/index.css +9 -12
  15. package/es/collapse/style/index.css +3 -3
  16. package/es/color-picker/style/_index.scss +7 -7
  17. package/es/color-picker/style/index.css +4 -4
  18. package/es/date-picker/style/_index.scss +1 -1
  19. package/es/date-picker/style/index.css +1 -1
  20. package/es/descriptions/style/_index.scss +5 -6
  21. package/es/descriptions/style/index.css +6 -6
  22. package/es/empty/style/_index.scss +1 -1
  23. package/es/empty/style/index.css +1 -1
  24. package/es/form/style/_index.scss +5 -6
  25. package/es/form/style/index.css +4 -4
  26. package/es/index.d.ts +2 -1
  27. package/es/index.js +2 -1
  28. package/es/input/style/_index.scss +5 -4
  29. package/es/input/style/_mixin.scss +1 -1
  30. package/es/input/style/index.css +21 -20
  31. package/es/input-number/input-number.js +11 -5
  32. package/es/input-number/input-number.js.map +1 -1
  33. package/es/input-number/style/_index.scss +5 -3
  34. package/es/input-number/style/index.css +13 -11
  35. package/es/input-otp/style/_index.scss +1 -1
  36. package/es/input-otp/style/index.css +8 -8
  37. package/es/list/style/_index.scss +3 -3
  38. package/es/list/style/index.css +3 -3
  39. package/es/marquee/index.d.ts +1 -0
  40. package/es/marquee/index.js +9 -0
  41. package/es/marquee/index.js.map +1 -0
  42. package/es/marquee/marquee.d.ts +8 -0
  43. package/es/marquee/marquee.js +42 -0
  44. package/es/marquee/marquee.js.map +1 -0
  45. package/es/marquee/style/_index.scss +77 -0
  46. package/es/marquee/style/index.css +64 -0
  47. package/es/marquee/style/index.d.ts +1 -0
  48. package/es/marquee/style/index.js +1 -0
  49. package/es/marquee/types.d.ts +21 -0
  50. package/es/native-select/style/index.css +4 -4
  51. package/es/notification/style/_index.scss +1 -1
  52. package/es/notification/style/index.css +1 -1
  53. package/es/pop-confirm/style/_index.scss +1 -1
  54. package/es/pop-confirm/style/index.css +1 -1
  55. package/es/popup/style/_index.scss +9 -9
  56. package/es/popup/style/index.css +10 -10
  57. package/es/radio/style/_index.scss +5 -8
  58. package/es/radio/style/index.css +5 -8
  59. package/es/segmented/style/_index.scss +10 -10
  60. package/es/segmented/style/index.css +9 -9
  61. package/es/select/style/_index.scss +16 -17
  62. package/es/select/style/index.css +15 -16
  63. package/es/speed-dial/style/_index.scss +2 -2
  64. package/es/speed-dial/style/index.css +2 -2
  65. package/es/statistic/style/_index.scss +2 -2
  66. package/es/statistic/style/index.css +2 -2
  67. package/es/style/_component.scss +1 -0
  68. package/es/style/base.css +57 -0
  69. package/es/table/style/_index.scss +6 -6
  70. package/es/table/style/index.css +5 -5
  71. package/es/tag/style/index.css +1 -1
  72. package/es/textarea/style/index.css +2 -2
  73. package/es/time-picker/style/_index.scss +1 -1
  74. package/es/time-picker/style/index.css +1 -1
  75. package/es/timeline/style/_index.scss +3 -3
  76. package/es/timeline/style/index.css +3 -3
  77. package/es/tooltip/style/index.css +1 -1
  78. package/es/transfer/style/_index.scss +4 -4
  79. package/es/transfer/style/index.css +4 -4
  80. package/es/tree/style/index.css +1 -1
  81. package/es/typography/style/_index.scss +2 -2
  82. package/es/typography/style/index.css +2 -2
  83. package/es/upload/style/_index.scss +4 -4
  84. package/es/upload/style/index.css +4 -4
  85. package/lib/alert/style/_index.scss +2 -2
  86. package/lib/alert/style/index.css +2 -2
  87. package/lib/auto-complete/style/_index.scss +4 -5
  88. package/lib/auto-complete/style/index.css +4 -5
  89. package/lib/breadcrumb/style/index.css +1 -1
  90. package/lib/breadcrumb/types.d.ts +1 -1
  91. package/lib/button/style/index.css +14 -14
  92. package/lib/calendar/style/_index.scss +9 -9
  93. package/lib/calendar/style/index.css +9 -9
  94. package/lib/card/style/index.css +3 -3
  95. package/lib/cascader/style/_index.scss +9 -9
  96. package/lib/cascader/style/index.css +9 -9
  97. package/lib/checkbox/style/_index.scss +9 -12
  98. package/lib/checkbox/style/index.css +9 -12
  99. package/lib/collapse/style/index.css +3 -3
  100. package/lib/color-picker/style/_index.scss +7 -7
  101. package/lib/color-picker/style/index.css +4 -4
  102. package/lib/date-picker/style/_index.scss +1 -1
  103. package/lib/date-picker/style/index.css +1 -1
  104. package/lib/descriptions/style/_index.scss +5 -6
  105. package/lib/descriptions/style/index.css +6 -6
  106. package/lib/empty/style/_index.scss +1 -1
  107. package/lib/empty/style/index.css +1 -1
  108. package/lib/form/style/_index.scss +5 -6
  109. package/lib/form/style/index.css +4 -4
  110. package/lib/index.d.ts +2 -1
  111. package/lib/index.js +76 -74
  112. package/lib/input/style/_index.scss +5 -4
  113. package/lib/input/style/_mixin.scss +1 -1
  114. package/lib/input/style/index.css +21 -20
  115. package/lib/input-number/input-number.js +11 -5
  116. package/lib/input-number/input-number.js.map +1 -1
  117. package/lib/input-number/style/_index.scss +5 -3
  118. package/lib/input-number/style/index.css +13 -11
  119. package/lib/input-otp/style/_index.scss +1 -1
  120. package/lib/input-otp/style/index.css +8 -8
  121. package/lib/list/style/_index.scss +3 -3
  122. package/lib/list/style/index.css +3 -3
  123. package/lib/marquee/index.js +8 -0
  124. package/lib/marquee/index.js.map +1 -0
  125. package/lib/marquee/marquee.d.ts +8 -0
  126. package/lib/marquee/marquee.js +45 -0
  127. package/lib/marquee/marquee.js.map +1 -0
  128. package/lib/marquee/style/_index.scss +77 -0
  129. package/lib/marquee/style/index.css +64 -0
  130. package/lib/marquee/style/index.d.ts +1 -0
  131. package/lib/marquee/style/index.js +1 -0
  132. package/lib/marquee/types.d.ts +21 -0
  133. package/lib/native-select/style/index.css +4 -4
  134. package/lib/notification/style/_index.scss +1 -1
  135. package/lib/notification/style/index.css +1 -1
  136. package/lib/pop-confirm/style/_index.scss +1 -1
  137. package/lib/pop-confirm/style/index.css +1 -1
  138. package/lib/popup/style/_index.scss +9 -9
  139. package/lib/popup/style/index.css +10 -10
  140. package/lib/radio/style/_index.scss +5 -8
  141. package/lib/radio/style/index.css +5 -8
  142. package/lib/segmented/style/_index.scss +10 -10
  143. package/lib/segmented/style/index.css +9 -9
  144. package/lib/select/style/_index.scss +16 -17
  145. package/lib/select/style/index.css +15 -16
  146. package/lib/speed-dial/style/_index.scss +2 -2
  147. package/lib/speed-dial/style/index.css +2 -2
  148. package/lib/statistic/style/_index.scss +2 -2
  149. package/lib/statistic/style/index.css +2 -2
  150. package/lib/style/_component.scss +1 -0
  151. package/lib/style/base.css +57 -0
  152. package/lib/table/style/_index.scss +6 -6
  153. package/lib/table/style/index.css +5 -5
  154. package/lib/tag/style/index.css +1 -1
  155. package/lib/textarea/style/index.css +2 -2
  156. package/lib/time-picker/style/_index.scss +1 -1
  157. package/lib/time-picker/style/index.css +1 -1
  158. package/lib/timeline/style/_index.scss +3 -3
  159. package/lib/timeline/style/index.css +3 -3
  160. package/lib/tooltip/style/index.css +1 -1
  161. package/lib/transfer/style/_index.scss +4 -4
  162. package/lib/transfer/style/index.css +4 -4
  163. package/lib/tree/style/index.css +1 -1
  164. package/lib/typography/style/_index.scss +2 -2
  165. package/lib/typography/style/index.css +2 -2
  166. package/lib/upload/style/_index.scss +4 -4
  167. package/lib/upload/style/index.css +4 -4
  168. 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;
@@ -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 {
@@ -311,18 +311,18 @@
311
311
  }
312
312
  .ty-btn_sm {
313
313
  padding: 0 10px;
314
- font-size: 0.875rem;
315
- height: 24px;
314
+ font-size: var(--ty-font-size-sm);
315
+ height: var(--ty-height-sm);
316
316
  }
317
317
  .ty-btn_md {
318
318
  padding: 0 15px;
319
- font-size: 1rem;
320
- height: 32px;
319
+ font-size: var(--ty-font-size-base);
320
+ height: var(--ty-height-md);
321
321
  }
322
322
  .ty-btn_lg {
323
323
  padding: 0 28px;
324
- font-size: 1.25rem;
325
- height: 42px;
324
+ font-size: var(--ty-font-size-lg);
325
+ height: var(--ty-height-lg);
326
326
  }
327
327
  .ty-btn_block {
328
328
  width: 100%;
@@ -331,7 +331,7 @@
331
331
  margin: 0;
332
332
  }
333
333
  .ty-btn_round {
334
- border-radius: 42px;
334
+ border-radius: var(--ty-height-lg);
335
335
  }
336
336
  .ty-btn_loading {
337
337
  position: relative;
@@ -370,12 +370,12 @@
370
370
  z-index: 1;
371
371
  }
372
372
  .ty-btn-group .ty-btn:first-child {
373
- border-top-left-radius: 2px;
374
- border-bottom-left-radius: 2px;
373
+ border-top-left-radius: var(--ty-border-radius);
374
+ border-bottom-left-radius: var(--ty-border-radius);
375
375
  }
376
376
  .ty-btn-group .ty-btn:last-child {
377
- border-top-right-radius: 2px;
378
- border-bottom-right-radius: 2px;
377
+ border-top-right-radius: var(--ty-border-radius);
378
+ border-bottom-right-radius: var(--ty-border-radius);
379
379
  }
380
380
  .ty-btn-group_round .ty-btn:first-child {
381
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
 
@@ -2,7 +2,7 @@
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
5
- font-size: 1rem;
5
+ font-size: var(--ty-font-size-base);
6
6
  margin-right: 8px;
7
7
  color: var(--ty-color-text);
8
8
  box-sizing: border-box;
@@ -12,10 +12,7 @@
12
12
  }
13
13
  .ty-checkbox__native {
14
14
  position: absolute;
15
- top: 0;
16
- right: 0;
17
- bottom: 0;
18
- left: 0;
15
+ inset: 0;
19
16
  width: 100%;
20
17
  height: 100%;
21
18
  z-index: 1;
@@ -37,7 +34,7 @@
37
34
  line-height: 1;
38
35
  vertical-align: middle;
39
36
  }
40
- .ty-checkbox__inner:before {
37
+ .ty-checkbox__inner::before {
41
38
  content: "";
42
39
  position: absolute;
43
40
  display: block;
@@ -49,7 +46,7 @@
49
46
  transition: all 200ms;
50
47
  transform: scale(0);
51
48
  }
52
- .ty-checkbox__inner:after {
49
+ .ty-checkbox__inner::after {
53
50
  transform: rotate(45deg) scaleY(1);
54
51
  pointer-events: none;
55
52
  box-sizing: content-box;
@@ -71,21 +68,21 @@
71
68
  background-color: var(--ty-color-primary);
72
69
  border-color: var(--ty-color-primary);
73
70
  }
74
- .ty-checkbox_checked .ty-checkbox__inner:after {
71
+ .ty-checkbox_checked .ty-checkbox__inner::after {
75
72
  content: "";
76
73
  transform: rotate(45deg) scale(1);
77
74
  }
78
- .ty-checkbox_checked .ty-checkbox__inner:before {
75
+ .ty-checkbox_checked .ty-checkbox__inner::before {
79
76
  transform: scale(0);
80
77
  }
81
78
  .ty-checkbox_indeterminate .ty-checkbox__inner {
82
79
  background-color: var(--ty-color-primary);
83
80
  border-color: var(--ty-color-primary);
84
81
  }
85
- .ty-checkbox_indeterminate .ty-checkbox__inner:before {
82
+ .ty-checkbox_indeterminate .ty-checkbox__inner::before {
86
83
  transform: scale(1);
87
84
  }
88
- .ty-checkbox_indeterminate .ty-checkbox__inner:after {
85
+ .ty-checkbox_indeterminate .ty-checkbox__inner::after {
89
86
  transform: rotate(45deg) scale(0);
90
87
  }
91
88
  .ty-checkbox_disabled .ty-checkbox__native {
@@ -95,7 +92,7 @@
95
92
  background-color: var(--ty-checkbox-disabled-bg);
96
93
  border-color: var(--ty-checkbox-border) !important;
97
94
  }
98
- .ty-checkbox_disabled .ty-checkbox__inner:after {
95
+ .ty-checkbox_disabled .ty-checkbox__inner::after {
99
96
  border-color: var(--ty-color-text-quaternary);
100
97
  }
101
98
  .ty-checkbox_disabled .ty-checkbox__inner + span {
@@ -1,6 +1,6 @@
1
1
  .ty-collapse {
2
2
  box-sizing: border-box;
3
- border-radius: 2px;
3
+ border-radius: var(--ty-border-radius);
4
4
  color: var(--ty-color-text);
5
5
  font-size: 14px;
6
6
  border: 1px solid var(--ty-collapse-border);
@@ -13,10 +13,10 @@
13
13
  border-bottom: 1px solid var(--ty-collapse-border);
14
14
  }
15
15
  .ty-collapse-item:last-child {
16
- border-radius: 0 0 2px 2px;
16
+ border-radius: 0 0 var(--ty-border-radius) var(--ty-border-radius);
17
17
  }
18
18
  .ty-collapse-item:last-child .ty-collapse-item__content {
19
- border-radius: 0 0 2px 2px;
19
+ border-radius: 0 0 var(--ty-border-radius) var(--ty-border-radius);
20
20
  }
21
21
  .ty-collapse-item__header {
22
22
  display: flex;
@@ -23,7 +23,7 @@
23
23
  &__swatch {
24
24
  width: 32px;
25
25
  height: 32px;
26
- border-radius: $border-radius;
26
+ border-radius: var(--ty-border-radius);
27
27
  border: 1px solid var(--ty-color-picker-border, #{$gray-300});
28
28
  padding: 3px;
29
29
  cursor: pointer;
@@ -39,7 +39,7 @@
39
39
  padding: 12px;
40
40
  background: var(--ty-color-picker-bg, #fff);
41
41
  border-radius: 8px;
42
- box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
42
+ box-shadow: 0 6px 16px 0 rgb(0 0 0 / 8%), 0 3px 6px -4px rgb(0 0 0 / 12%), 0 9px 28px 8px rgb(0 0 0 / 5%);
43
43
  width: 240px;
44
44
  }
45
45
 
@@ -70,7 +70,7 @@
70
70
  height: 12px;
71
71
  border-radius: 50%;
72
72
  border: 2px solid #fff;
73
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
73
+ box-shadow: 0 0 2px rgb(0 0 0 / 30%);
74
74
  transform: translate(-50%, -50%);
75
75
  pointer-events: none;
76
76
  }
@@ -128,7 +128,7 @@
128
128
  height: 14px;
129
129
  border-radius: 50%;
130
130
  border: 2px solid #fff;
131
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
131
+ box-shadow: 0 0 2px rgb(0 0 0 / 30%);
132
132
  transform: translate(-50%, -50%);
133
133
  pointer-events: none;
134
134
  background: transparent;
@@ -144,7 +144,7 @@
144
144
  &__format-btn {
145
145
  border: 1px solid var(--ty-color-picker-border, #{$gray-300});
146
146
  background: transparent;
147
- border-radius: $border-radius;
147
+ border-radius: var(--ty-border-radius);
148
148
  padding: 2px 6px;
149
149
  cursor: pointer;
150
150
  font-size: 12px;
@@ -159,7 +159,7 @@
159
159
  &__hex-input {
160
160
  flex: 1;
161
161
  border: 1px solid var(--ty-color-picker-border, #{$gray-300});
162
- border-radius: $border-radius;
162
+ border-radius: var(--ty-border-radius);
163
163
  padding: 2px 6px;
164
164
  font-size: 12px;
165
165
  font-family: $font-family-monospace;
@@ -184,7 +184,7 @@
184
184
  &__preset {
185
185
  width: 20px;
186
186
  height: 20px;
187
- border-radius: $border-radius;
187
+ border-radius: var(--ty-border-radius);
188
188
  cursor: pointer;
189
189
  border: 1px solid var(--ty-color-picker-border, #{$gray-300});
190
190
  transition: transform 0.15s;