@type-dom/ui 0.4.0 → 0.4.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 (154) hide show
  1. package/README.md +134 -134
  2. package/dist/package.json +1 -1
  3. package/dist/src/components/data/td-progress/td-progress.class.js +5 -5
  4. package/dist/src/components/data/td-statistic/td-statistic.class.d.ts +2 -2
  5. package/dist/src/components/data/td-statistic/td-statistic.class.d.ts.map +1 -1
  6. package/dist/src/components/feedback/td-message/method.d.ts +1 -1
  7. package/dist/src/components/feedback/td-message/method.d.ts.map +1 -1
  8. package/dist/src/components/feedback/td-message/method.js +24 -7
  9. package/dist/src/components/feedback/td-message/method.js.map +1 -1
  10. package/dist/src/components/feedback/td-tooltip/td-tooltip.const.d.ts.map +1 -1
  11. package/dist/src/components/form/td-date-picker/composables/use-shortcut.d.ts +1 -1
  12. package/dist/src/components/form/td-date-picker/composables/use-shortcut.d.ts.map +1 -1
  13. package/dist/src/components/form/td-date-picker/composables/use-shortcut.js +1 -1
  14. package/dist/src/components/form/td-date-picker/composables/use-shortcut.js.map +1 -1
  15. package/dist/src/components/form/td-date-picker/utils.d.ts +1 -1
  16. package/dist/src/components/form/td-date-picker/utils.d.ts.map +1 -1
  17. package/dist/src/components/form/td-date-picker/utils.js +1 -1
  18. package/dist/src/components/form/td-date-picker/utils.js.map +1 -1
  19. package/dist/src/components/form/td-time-picker/time-picker-com/panel-time-pick.class.js +1 -1
  20. package/dist/src/components/form/td-time-picker/time-picker-com/panel-time-pick.class.js.map +1 -1
  21. package/dist/src/components/form/td-time-picker/utils.d.ts +1 -1
  22. package/dist/src/components/form/td-time-picker/utils.d.ts.map +1 -1
  23. package/dist/src/components/form/td-time-picker/utils.js +1 -1
  24. package/dist/src/components/form/td-time-picker/utils.js.map +1 -1
  25. package/dist/src/hooks/use-deprecated/index.js +2 -2
  26. package/dist/src/hooks/use-id/index.js +4 -4
  27. package/dist/src/hooks/use-z-index/index.js +1 -1
  28. package/dist/src/theme-chalk/affix.scss +7 -7
  29. package/dist/src/theme-chalk/alert.scss +115 -115
  30. package/dist/src/theme-chalk/anchor-link.scss +41 -41
  31. package/dist/src/theme-chalk/anchor.scss +88 -88
  32. package/dist/src/theme-chalk/aside.scss +8 -8
  33. package/dist/src/theme-chalk/autocomplete.scss +89 -89
  34. package/dist/src/theme-chalk/avatar.scss +55 -55
  35. package/dist/src/theme-chalk/backtop.scss +29 -29
  36. package/dist/src/theme-chalk/badge.scss +58 -58
  37. package/dist/src/theme-chalk/base.scss +3 -3
  38. package/dist/src/theme-chalk/breadcrumb.scss +62 -62
  39. package/dist/src/theme-chalk/button-group.scss +80 -80
  40. package/dist/src/theme-chalk/button.scss +304 -304
  41. package/dist/src/theme-chalk/calendar.scss +80 -80
  42. package/dist/src/theme-chalk/card.scss +45 -45
  43. package/dist/src/theme-chalk/carousel-item.scss +58 -58
  44. package/dist/src/theme-chalk/carousel.scss +188 -188
  45. package/dist/src/theme-chalk/cascader-panel.scss +138 -138
  46. package/dist/src/theme-chalk/cascader.scss +247 -247
  47. package/dist/src/theme-chalk/check-tag.scss +60 -60
  48. package/dist/src/theme-chalk/checkbox-button.scss +140 -140
  49. package/dist/src/theme-chalk/checkbox-group.scss +7 -7
  50. package/dist/src/theme-chalk/checkbox.scss +298 -298
  51. package/dist/src/theme-chalk/col.scss +48 -48
  52. package/dist/src/theme-chalk/collapse.scss +70 -70
  53. package/dist/src/theme-chalk/color/index.scss +20 -20
  54. package/dist/src/theme-chalk/color-picker.scss +393 -393
  55. package/dist/src/theme-chalk/common/popup.scss +47 -47
  56. package/dist/src/theme-chalk/common/transition.scss +122 -122
  57. package/dist/src/theme-chalk/common/var.scss +1655 -1655
  58. package/dist/src/theme-chalk/container.scss +14 -14
  59. package/dist/src/theme-chalk/dark/css-vars.scss +39 -39
  60. package/dist/src/theme-chalk/dark/var.scss +222 -222
  61. package/dist/src/theme-chalk/date-picker/date-picker.scss +110 -110
  62. package/dist/src/theme-chalk/date-picker/date-range-picker.scss +113 -113
  63. package/dist/src/theme-chalk/date-picker/date-table.scss +158 -158
  64. package/dist/src/theme-chalk/date-picker/month-table.scss +112 -112
  65. package/dist/src/theme-chalk/date-picker/picker-panel.scss +131 -131
  66. package/dist/src/theme-chalk/date-picker/picker.scss +212 -212
  67. package/dist/src/theme-chalk/date-picker/time-picker.scss +90 -90
  68. package/dist/src/theme-chalk/date-picker/time-range-picker.scss +33 -33
  69. package/dist/src/theme-chalk/date-picker/time-spinner.scss +111 -111
  70. package/dist/src/theme-chalk/date-picker/year-table.scss +108 -108
  71. package/dist/src/theme-chalk/date-picker.scss +9 -9
  72. package/dist/src/theme-chalk/descriptions-item.scss +73 -73
  73. package/dist/src/theme-chalk/descriptions.scss +152 -152
  74. package/dist/src/theme-chalk/dialog.scss +192 -192
  75. package/dist/src/theme-chalk/display.scss +12 -12
  76. package/dist/src/theme-chalk/divider.scss +48 -48
  77. package/dist/src/theme-chalk/drawer.scss +155 -155
  78. package/dist/src/theme-chalk/dropdown.scss +208 -208
  79. package/dist/src/theme-chalk/empty.scss +49 -49
  80. package/dist/src/theme-chalk/footer.scss +12 -12
  81. package/dist/src/theme-chalk/form.scss +244 -244
  82. package/dist/src/theme-chalk/header.scss +12 -12
  83. package/dist/src/theme-chalk/icon.scss +45 -45
  84. package/dist/src/theme-chalk/image-viewer.scss +155 -155
  85. package/dist/src/theme-chalk/image.scss +49 -49
  86. package/dist/src/theme-chalk/index.scss +111 -111
  87. package/dist/src/theme-chalk/input-number.scss +186 -186
  88. package/dist/src/theme-chalk/input-tag.scss +220 -220
  89. package/dist/src/theme-chalk/input.scss +474 -474
  90. package/dist/src/theme-chalk/link.scss +90 -90
  91. package/dist/src/theme-chalk/loading.scss +104 -104
  92. package/dist/src/theme-chalk/main.scss +14 -14
  93. package/dist/src/theme-chalk/mention.scss +92 -92
  94. package/dist/src/theme-chalk/menu.scss +339 -339
  95. package/dist/src/theme-chalk/message-box.scss +213 -213
  96. package/dist/src/theme-chalk/message.scss +98 -98
  97. package/dist/src/theme-chalk/mixins/_button.scss +165 -165
  98. package/dist/src/theme-chalk/mixins/_col.scss +33 -33
  99. package/dist/src/theme-chalk/mixins/_var.scss +67 -67
  100. package/dist/src/theme-chalk/mixins/config.scss +5 -5
  101. package/dist/src/theme-chalk/mixins/function.scss +88 -88
  102. package/dist/src/theme-chalk/mixins/mixins.scss +240 -240
  103. package/dist/src/theme-chalk/mixins/utils.scss +39 -39
  104. package/dist/src/theme-chalk/notification.scss +107 -107
  105. package/dist/src/theme-chalk/option-group.scss +33 -33
  106. package/dist/src/theme-chalk/option.scss +71 -71
  107. package/dist/src/theme-chalk/overlay.scss +17 -17
  108. package/dist/src/theme-chalk/page-header.scss +60 -60
  109. package/dist/src/theme-chalk/pagination.scss +238 -238
  110. package/dist/src/theme-chalk/popconfirm.scss +16 -16
  111. package/dist/src/theme-chalk/popover.scss +61 -61
  112. package/dist/src/theme-chalk/popper.scss +106 -106
  113. package/dist/src/theme-chalk/progress.scss +179 -179
  114. package/dist/src/theme-chalk/radio-button.scss +169 -169
  115. package/dist/src/theme-chalk/radio-group.scss +9 -9
  116. package/dist/src/theme-chalk/radio.scss +215 -215
  117. package/dist/src/theme-chalk/rate.scss +108 -108
  118. package/dist/src/theme-chalk/reset.scss +98 -98
  119. package/dist/src/theme-chalk/result.scss +57 -57
  120. package/dist/src/theme-chalk/row.scss +35 -35
  121. package/dist/src/theme-chalk/scrollbar.scss +97 -97
  122. package/dist/src/theme-chalk/segmented.scss +183 -183
  123. package/dist/src/theme-chalk/select-dropdown-v2.scss +1 -1
  124. package/dist/src/theme-chalk/select-dropdown.scss +57 -57
  125. package/dist/src/theme-chalk/select-v2.scss +4 -4
  126. package/dist/src/theme-chalk/select.scss +264 -264
  127. package/dist/src/theme-chalk/skeleton-item.scss +83 -83
  128. package/dist/src/theme-chalk/skeleton.scss +44 -44
  129. package/dist/src/theme-chalk/slider.scss +212 -212
  130. package/dist/src/theme-chalk/space.scss +20 -20
  131. package/dist/src/theme-chalk/spinner.scss +43 -43
  132. package/dist/src/theme-chalk/statistic.scss +35 -35
  133. package/dist/src/theme-chalk/step.scss +316 -316
  134. package/dist/src/theme-chalk/steps.scss +21 -21
  135. package/dist/src/theme-chalk/switch.scss +300 -300
  136. package/dist/src/theme-chalk/table-column.scss +98 -98
  137. package/dist/src/theme-chalk/table-v2.scss +236 -236
  138. package/dist/src/theme-chalk/table.scss +694 -694
  139. package/dist/src/theme-chalk/tabs.scss +660 -660
  140. package/dist/src/theme-chalk/tag.scss +181 -181
  141. package/dist/src/theme-chalk/text.scss +51 -51
  142. package/dist/src/theme-chalk/time-picker.scss +5 -5
  143. package/dist/src/theme-chalk/time-select.scss +37 -37
  144. package/dist/src/theme-chalk/timeline-item.scss +84 -84
  145. package/dist/src/theme-chalk/timeline.scss +46 -46
  146. package/dist/src/theme-chalk/tooltip-v2.scss +95 -95
  147. package/dist/src/theme-chalk/tour.scss +187 -187
  148. package/dist/src/theme-chalk/transfer.scss +203 -203
  149. package/dist/src/theme-chalk/tree-select.scss +41 -41
  150. package/dist/src/theme-chalk/tree.scss +134 -134
  151. package/dist/src/theme-chalk/upload.scss +654 -654
  152. package/dist/src/theme-chalk/var.scss +87 -87
  153. package/dist/src/theme-chalk/virtual-list.scss +40 -40
  154. package/package.json +42 -42
@@ -1,215 +1,215 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/utils' as *;
5
- @use 'mixins/var' as *;
6
- @use 'mixins/button' as *;
7
- @use 'common/var' as *;
8
-
9
- $radio-font-size: () !default;
10
- $radio-font-size: map.merge(
11
- (
12
- 'large': 14px,
13
- 'small': 12px,
14
- ),
15
- $radio-font-size
16
- );
17
-
18
- @include b(radio) {
19
- @include set-component-css-var('radio', $radio);
20
- }
21
-
22
- @include b(radio) {
23
- color: getCssVar('radio-text-color');
24
- font-weight: getCssVar('radio-font-weight');
25
- position: relative;
26
- cursor: pointer;
27
- display: inline-flex;
28
- align-items: center;
29
- white-space: nowrap;
30
- outline: none;
31
- font-size: getCssVar('font-size', 'base');
32
- user-select: none;
33
- margin-right: 30px;
34
- height: map.get($radio-height, 'default');
35
-
36
- @each $size in (large, small) {
37
- &.#{$namespace}-radio--#{$size} {
38
- height: map.get($radio-height, $size);
39
- }
40
- }
41
-
42
- @include when(bordered) {
43
- padding: 0 map.get($checkbox-bordered-padding-right, 'default')-$border-width
44
- 0 map.get($checkbox-bordered-padding-left, 'default')-$border-width;
45
-
46
- border-radius: getCssVar('border-radius-base');
47
- border: getCssVar('border');
48
- box-sizing: border-box;
49
-
50
- &.is-checked {
51
- border-color: getCssVar('color-primary');
52
- }
53
-
54
- &.is-disabled {
55
- cursor: not-allowed;
56
- border-color: getCssVar('border-color-lighter');
57
- }
58
-
59
- @each $size in (large, small) {
60
- &.#{$namespace}-radio--#{$size} {
61
- padding: 0
62
- map.get($checkbox-bordered-padding-right, $size)-$border-width
63
- 0
64
- map.get($checkbox-bordered-padding-left, $size)-$border-width;
65
- border-radius: getCssVar('border-radius-base');
66
-
67
- .#{$namespace}-radio__label {
68
- font-size: map.get($button-font-size, $size);
69
- }
70
-
71
- .#{$namespace}-radio__inner {
72
- height: map.get($radio-bordered-input-height, $size);
73
- width: map.get($radio-bordered-input-width, $size);
74
- }
75
- }
76
- }
77
- }
78
-
79
- &:last-child {
80
- margin-right: 0;
81
- }
82
-
83
- @include e(input) {
84
- white-space: nowrap;
85
- cursor: pointer;
86
- outline: none;
87
- display: inline-flex;
88
- position: relative;
89
- vertical-align: middle;
90
-
91
- @include when(disabled) {
92
- .#{$namespace}-radio__inner {
93
- background-color: map.get($radio-disabled, 'input-fill');
94
- border-color: map.get($radio-disabled, 'input-border-color');
95
- cursor: not-allowed;
96
-
97
- &::after {
98
- cursor: not-allowed;
99
- background-color: map.get($radio-disabled, 'icon-color');
100
- }
101
-
102
- & + .#{$namespace}-radio__label {
103
- cursor: not-allowed;
104
- }
105
- }
106
- &.is-checked {
107
- .#{$namespace}-radio__inner {
108
- background-color: map.get($radio-disabled, 'checked-input-fill');
109
- border-color: map.get($radio-disabled, 'checked-input-border-color');
110
-
111
- &::after {
112
- background-color: map.get($radio-disabled, 'checked-icon-color');
113
- }
114
- }
115
- }
116
- & + span.#{$namespace}-radio__label {
117
- color: getCssVar('text-color', 'placeholder');
118
- cursor: not-allowed;
119
- }
120
- }
121
-
122
- @include when(checked) {
123
- .#{$namespace}-radio__inner {
124
- border-color: map.get($radio-checked, 'input-border-color');
125
- background: map.get($radio-checked, 'icon-color');
126
-
127
- &::after {
128
- transform: translate(-50%, -50%) scale(1);
129
- }
130
- }
131
-
132
- & + .#{$namespace}-radio__label {
133
- color: map.get($radio-checked, 'text-color');
134
- }
135
- }
136
-
137
- @include when(focus) {
138
- .#{$namespace}-radio__inner {
139
- border-color: getCssVar('radio-input-border-color-hover');
140
- }
141
- }
142
- }
143
- @include e(inner) {
144
- border: getCssVar('radio-input-border');
145
- border-radius: getCssVar('radio-input-border-radius');
146
- width: getCssVar('radio-input-width');
147
- height: getCssVar('radio-input-height');
148
- background-color: getCssVar('radio-input-bg-color');
149
- position: relative;
150
- cursor: pointer;
151
- display: inline-block;
152
- box-sizing: border-box;
153
-
154
- &:hover {
155
- border-color: getCssVar('radio-input-border-color-hover');
156
- }
157
-
158
- &::after {
159
- width: 4px;
160
- height: 4px;
161
- border-radius: getCssVar('radio-input-border-radius');
162
- background-color: getCssVar('color-white');
163
- content: '';
164
- position: absolute;
165
- left: 50%;
166
- top: 50%;
167
- transform: translate(-50%, -50%) scale(0);
168
- transition: transform 0.15s ease-in;
169
- }
170
- }
171
-
172
- @include e(original) {
173
- opacity: 0;
174
- outline: none;
175
- position: absolute;
176
- z-index: -1;
177
- top: 0;
178
- left: 0;
179
- right: 0;
180
- bottom: 0;
181
- margin: 0;
182
-
183
- &:focus-visible {
184
- & + .#{$namespace}-radio__inner {
185
- outline: 2px solid getCssVar('radio-input-border-color-hover');
186
- outline-offset: 1px;
187
- border-radius: getCssVar('radio-input-border-radius');
188
- }
189
- }
190
- }
191
-
192
- &:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) {
193
- /*获得焦点时 样式提醒*/
194
- .#{$namespace}-radio__inner {
195
- box-shadow: 0 0 2px 2px getCssVar('radio-input-border-color-hover');
196
- }
197
- }
198
-
199
- @include e(label) {
200
- font-size: getCssVar('radio-font-size');
201
- padding-left: 8px;
202
- }
203
-
204
- @each $size in (large, small) {
205
- &.#{$namespace}-radio--#{$size} {
206
- @include e(label) {
207
- font-size: map.get($radio-font-size, $size);
208
- }
209
- @include e(inner) {
210
- width: map.get($radio-font-size, $size);
211
- height: map.get($radio-font-size, $size);
212
- }
213
- }
214
- }
215
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/utils' as *;
5
+ @use 'mixins/var' as *;
6
+ @use 'mixins/button' as *;
7
+ @use 'common/var' as *;
8
+
9
+ $radio-font-size: () !default;
10
+ $radio-font-size: map.merge(
11
+ (
12
+ 'large': 14px,
13
+ 'small': 12px,
14
+ ),
15
+ $radio-font-size
16
+ );
17
+
18
+ @include b(radio) {
19
+ @include set-component-css-var('radio', $radio);
20
+ }
21
+
22
+ @include b(radio) {
23
+ color: getCssVar('radio-text-color');
24
+ font-weight: getCssVar('radio-font-weight');
25
+ position: relative;
26
+ cursor: pointer;
27
+ display: inline-flex;
28
+ align-items: center;
29
+ white-space: nowrap;
30
+ outline: none;
31
+ font-size: getCssVar('font-size', 'base');
32
+ user-select: none;
33
+ margin-right: 30px;
34
+ height: map.get($radio-height, 'default');
35
+
36
+ @each $size in (large, small) {
37
+ &.#{$namespace}-radio--#{$size} {
38
+ height: map.get($radio-height, $size);
39
+ }
40
+ }
41
+
42
+ @include when(bordered) {
43
+ padding: 0 map.get($checkbox-bordered-padding-right, 'default')-$border-width
44
+ 0 map.get($checkbox-bordered-padding-left, 'default')-$border-width;
45
+
46
+ border-radius: getCssVar('border-radius-base');
47
+ border: getCssVar('border');
48
+ box-sizing: border-box;
49
+
50
+ &.is-checked {
51
+ border-color: getCssVar('color-primary');
52
+ }
53
+
54
+ &.is-disabled {
55
+ cursor: not-allowed;
56
+ border-color: getCssVar('border-color-lighter');
57
+ }
58
+
59
+ @each $size in (large, small) {
60
+ &.#{$namespace}-radio--#{$size} {
61
+ padding: 0
62
+ map.get($checkbox-bordered-padding-right, $size)-$border-width
63
+ 0
64
+ map.get($checkbox-bordered-padding-left, $size)-$border-width;
65
+ border-radius: getCssVar('border-radius-base');
66
+
67
+ .#{$namespace}-radio__label {
68
+ font-size: map.get($button-font-size, $size);
69
+ }
70
+
71
+ .#{$namespace}-radio__inner {
72
+ height: map.get($radio-bordered-input-height, $size);
73
+ width: map.get($radio-bordered-input-width, $size);
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ &:last-child {
80
+ margin-right: 0;
81
+ }
82
+
83
+ @include e(input) {
84
+ white-space: nowrap;
85
+ cursor: pointer;
86
+ outline: none;
87
+ display: inline-flex;
88
+ position: relative;
89
+ vertical-align: middle;
90
+
91
+ @include when(disabled) {
92
+ .#{$namespace}-radio__inner {
93
+ background-color: map.get($radio-disabled, 'input-fill');
94
+ border-color: map.get($radio-disabled, 'input-border-color');
95
+ cursor: not-allowed;
96
+
97
+ &::after {
98
+ cursor: not-allowed;
99
+ background-color: map.get($radio-disabled, 'icon-color');
100
+ }
101
+
102
+ & + .#{$namespace}-radio__label {
103
+ cursor: not-allowed;
104
+ }
105
+ }
106
+ &.is-checked {
107
+ .#{$namespace}-radio__inner {
108
+ background-color: map.get($radio-disabled, 'checked-input-fill');
109
+ border-color: map.get($radio-disabled, 'checked-input-border-color');
110
+
111
+ &::after {
112
+ background-color: map.get($radio-disabled, 'checked-icon-color');
113
+ }
114
+ }
115
+ }
116
+ & + span.#{$namespace}-radio__label {
117
+ color: getCssVar('text-color', 'placeholder');
118
+ cursor: not-allowed;
119
+ }
120
+ }
121
+
122
+ @include when(checked) {
123
+ .#{$namespace}-radio__inner {
124
+ border-color: map.get($radio-checked, 'input-border-color');
125
+ background: map.get($radio-checked, 'icon-color');
126
+
127
+ &::after {
128
+ transform: translate(-50%, -50%) scale(1);
129
+ }
130
+ }
131
+
132
+ & + .#{$namespace}-radio__label {
133
+ color: map.get($radio-checked, 'text-color');
134
+ }
135
+ }
136
+
137
+ @include when(focus) {
138
+ .#{$namespace}-radio__inner {
139
+ border-color: getCssVar('radio-input-border-color-hover');
140
+ }
141
+ }
142
+ }
143
+ @include e(inner) {
144
+ border: getCssVar('radio-input-border');
145
+ border-radius: getCssVar('radio-input-border-radius');
146
+ width: getCssVar('radio-input-width');
147
+ height: getCssVar('radio-input-height');
148
+ background-color: getCssVar('radio-input-bg-color');
149
+ position: relative;
150
+ cursor: pointer;
151
+ display: inline-block;
152
+ box-sizing: border-box;
153
+
154
+ &:hover {
155
+ border-color: getCssVar('radio-input-border-color-hover');
156
+ }
157
+
158
+ &::after {
159
+ width: 4px;
160
+ height: 4px;
161
+ border-radius: getCssVar('radio-input-border-radius');
162
+ background-color: getCssVar('color-white');
163
+ content: '';
164
+ position: absolute;
165
+ left: 50%;
166
+ top: 50%;
167
+ transform: translate(-50%, -50%) scale(0);
168
+ transition: transform 0.15s ease-in;
169
+ }
170
+ }
171
+
172
+ @include e(original) {
173
+ opacity: 0;
174
+ outline: none;
175
+ position: absolute;
176
+ z-index: -1;
177
+ top: 0;
178
+ left: 0;
179
+ right: 0;
180
+ bottom: 0;
181
+ margin: 0;
182
+
183
+ &:focus-visible {
184
+ & + .#{$namespace}-radio__inner {
185
+ outline: 2px solid getCssVar('radio-input-border-color-hover');
186
+ outline-offset: 1px;
187
+ border-radius: getCssVar('radio-input-border-radius');
188
+ }
189
+ }
190
+ }
191
+
192
+ &:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) {
193
+ /*获得焦点时 样式提醒*/
194
+ .#{$namespace}-radio__inner {
195
+ box-shadow: 0 0 2px 2px getCssVar('radio-input-border-color-hover');
196
+ }
197
+ }
198
+
199
+ @include e(label) {
200
+ font-size: getCssVar('radio-font-size');
201
+ padding-left: 8px;
202
+ }
203
+
204
+ @each $size in (large, small) {
205
+ &.#{$namespace}-radio--#{$size} {
206
+ @include e(label) {
207
+ font-size: map.get($radio-font-size, $size);
208
+ }
209
+ @include e(inner) {
210
+ width: map.get($radio-font-size, $size);
211
+ height: map.get($radio-font-size, $size);
212
+ }
213
+ }
214
+ }
215
+ }
@@ -1,108 +1,108 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/var' as *;
5
- @use 'common/var' as *;
6
-
7
- $rate-height: () !default;
8
- $rate-height: map.merge(
9
- (
10
- 'large': 40px,
11
- 'default': 32px,
12
- 'small': 24px,
13
- ),
14
- $rate-height
15
- );
16
-
17
- $rate-size: () !default;
18
- $rate-size: map.merge(
19
- (
20
- 'small': 14px,
21
- ),
22
- $rate-size
23
- );
24
-
25
- @include b(rate) {
26
- @include set-component-css-var('rate', $rate);
27
- }
28
-
29
- @include b(rate) {
30
- display: inline-flex;
31
- align-items: center;
32
- height: map.get($rate-height, 'default');
33
-
34
- &:focus,
35
- &:active {
36
- outline: none;
37
- }
38
-
39
- @include e(item) {
40
- cursor: pointer;
41
- display: inline-block;
42
- position: relative;
43
- font-size: 0;
44
- vertical-align: middle;
45
- color: getCssVar('rate-void-color');
46
- line-height: normal;
47
- }
48
-
49
- & .#{bem('rate', 'icon')} {
50
- position: relative;
51
- display: inline-block;
52
- font-size: getCssVar('rate-icon-size');
53
- margin-right: getCssVar('rate-icon-margin');
54
- transition: getCssVar('transition-duration');
55
-
56
- &.hover {
57
- transform: scale(1.15);
58
- }
59
-
60
- .path2 {
61
- position: absolute;
62
- left: 0;
63
- top: 0;
64
- }
65
-
66
- @include when(active) {
67
- color: getCssVar('rate', 'fill-color');
68
- }
69
- }
70
-
71
- @include e(decimal) {
72
- position: absolute;
73
- top: 0;
74
- left: 0;
75
- display: inline-block;
76
- overflow: hidden;
77
- color: getCssVar('rate', 'fill-color');
78
-
79
- @include m('box') {
80
- position: absolute;
81
- top: 0;
82
- left: 0;
83
- }
84
- }
85
-
86
- @include e(text) {
87
- font-size: getCssVar('rate-font-size');
88
- vertical-align: middle;
89
- color: getCssVar('rate', 'text-color');
90
- }
91
-
92
- @each $size in (large, small) {
93
- @include m($size) {
94
- height: map.get($rate-height, $size);
95
-
96
- & .#{bem('rate', 'icon')} {
97
- font-size: map.get($rate-size, $size);
98
- }
99
- }
100
- }
101
-
102
- @include when(disabled) {
103
- @include e(item) {
104
- cursor: auto;
105
- color: getCssVar('rate', 'disabled-void-color');
106
- }
107
- }
108
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ $rate-height: () !default;
8
+ $rate-height: map.merge(
9
+ (
10
+ 'large': 40px,
11
+ 'default': 32px,
12
+ 'small': 24px,
13
+ ),
14
+ $rate-height
15
+ );
16
+
17
+ $rate-size: () !default;
18
+ $rate-size: map.merge(
19
+ (
20
+ 'small': 14px,
21
+ ),
22
+ $rate-size
23
+ );
24
+
25
+ @include b(rate) {
26
+ @include set-component-css-var('rate', $rate);
27
+ }
28
+
29
+ @include b(rate) {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ height: map.get($rate-height, 'default');
33
+
34
+ &:focus,
35
+ &:active {
36
+ outline: none;
37
+ }
38
+
39
+ @include e(item) {
40
+ cursor: pointer;
41
+ display: inline-block;
42
+ position: relative;
43
+ font-size: 0;
44
+ vertical-align: middle;
45
+ color: getCssVar('rate-void-color');
46
+ line-height: normal;
47
+ }
48
+
49
+ & .#{bem('rate', 'icon')} {
50
+ position: relative;
51
+ display: inline-block;
52
+ font-size: getCssVar('rate-icon-size');
53
+ margin-right: getCssVar('rate-icon-margin');
54
+ transition: getCssVar('transition-duration');
55
+
56
+ &.hover {
57
+ transform: scale(1.15);
58
+ }
59
+
60
+ .path2 {
61
+ position: absolute;
62
+ left: 0;
63
+ top: 0;
64
+ }
65
+
66
+ @include when(active) {
67
+ color: getCssVar('rate', 'fill-color');
68
+ }
69
+ }
70
+
71
+ @include e(decimal) {
72
+ position: absolute;
73
+ top: 0;
74
+ left: 0;
75
+ display: inline-block;
76
+ overflow: hidden;
77
+ color: getCssVar('rate', 'fill-color');
78
+
79
+ @include m('box') {
80
+ position: absolute;
81
+ top: 0;
82
+ left: 0;
83
+ }
84
+ }
85
+
86
+ @include e(text) {
87
+ font-size: getCssVar('rate-font-size');
88
+ vertical-align: middle;
89
+ color: getCssVar('rate', 'text-color');
90
+ }
91
+
92
+ @each $size in (large, small) {
93
+ @include m($size) {
94
+ height: map.get($rate-height, $size);
95
+
96
+ & .#{bem('rate', 'icon')} {
97
+ font-size: map.get($rate-size, $size);
98
+ }
99
+ }
100
+ }
101
+
102
+ @include when(disabled) {
103
+ @include e(item) {
104
+ cursor: auto;
105
+ color: getCssVar('rate', 'disabled-void-color');
106
+ }
107
+ }
108
+ }