@qsxy/element-plus-react 1.0.0-next.18 → 1.0.0-next.21

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 (144) hide show
  1. package/README.md +12 -39
  2. package/dist/Breadcrumb/BreadcrumbItem.js +4 -7
  3. package/dist/Switch/Switch.js +50 -17
  4. package/dist/Switch/typings.d.ts +4 -0
  5. package/dist/Tooltip/Tooltip.js +2 -1
  6. package/dist/index.css +1 -1
  7. package/dist/index.d.ts +5 -5
  8. package/dist/index.js +2 -2
  9. package/package.json +1 -2
  10. package/theme-chalk/{avatar/index.scss → avatar.scss} +1 -1
  11. package/theme-chalk/{badge/index.scss → badge.scss} +1 -1
  12. package/theme-chalk/{breadcrumb/index.scss → breadcrumb.scss} +1 -1
  13. package/theme-chalk/build.scss +1 -1
  14. package/theme-chalk/button/_mixins.scss +3 -3
  15. package/theme-chalk/button/button-group.scss +1 -1
  16. package/theme-chalk/button/button.scss +2 -2
  17. package/theme-chalk/button/index.scss +2 -2
  18. package/theme-chalk/button--bak/_mixins.scss +317 -0
  19. package/theme-chalk/button--bak/button-group.scss +83 -0
  20. package/theme-chalk/button--bak/button.scss +382 -0
  21. package/theme-chalk/button--bak/index.scss +2 -0
  22. package/theme-chalk/button-group.scss +80 -0
  23. package/theme-chalk/button.scss +304 -0
  24. package/theme-chalk/calendar/date-picker.scss +1 -1
  25. package/theme-chalk/calendar/date-range-picker.scss +1 -1
  26. package/theme-chalk/calendar/date-table.scss +164 -156
  27. package/theme-chalk/calendar/date-table.scss--bak +156 -0
  28. package/theme-chalk/calendar/index.scss +6 -6
  29. package/theme-chalk/calendar/month-table.scss +1 -1
  30. package/theme-chalk/calendar/picker-panel.scss +1 -1
  31. package/theme-chalk/calendar/year-table.scss +1 -1
  32. package/theme-chalk/{card/index.scss → card.scss} +1 -1
  33. package/theme-chalk/{carousel/index.scss → carousel.scss} +1 -1
  34. package/theme-chalk/{cascader/cascader-panel.scss → cascader-panel.scss} +1 -1
  35. package/theme-chalk/{cascader/cascader.scss → cascader.scss} +1 -1
  36. package/theme-chalk/{checkbox-button/index.scss → checkbox-button.scss} +1 -1
  37. package/theme-chalk/{checkbox-group/index.scss → checkbox-group.scss} +1 -1
  38. package/theme-chalk/{checkbox/index.scss → checkbox.scss} +2 -1
  39. package/theme-chalk/col/_mixins.scss +5 -3
  40. package/theme-chalk/col/index.scss +2 -2
  41. package/theme-chalk/{collapse/index.scss → collapse.scss} +1 -1
  42. package/theme-chalk/color/index.scss +20 -0
  43. package/theme-chalk/{color-picker/index.scss → color-picker.scss} +3 -3
  44. package/theme-chalk/common/index.scss +127 -178
  45. package/theme-chalk/common/var.scss +1632 -0
  46. package/theme-chalk/dark/css-vars.scss +39 -0
  47. package/theme-chalk/dark/var.scss +225 -0
  48. package/theme-chalk/{date-picker/index.scss → date-picker.scss} +1 -1
  49. package/theme-chalk/{date-time-picker/time-picker.scss → date-time-picker.scss} +1 -1
  50. package/theme-chalk/{descriptions/descriptions-item.scss → descriptions-item.scss} +1 -1
  51. package/theme-chalk/{descriptions/descriptions.scss → descriptions.scss} +1 -1
  52. package/theme-chalk/dev.scss +2 -2
  53. package/theme-chalk/{dialog/index.scss → dialog.scss} +1 -1
  54. package/theme-chalk/display.scss +1 -1
  55. package/theme-chalk/{divider/index.scss → divider.scss} +1 -1
  56. package/theme-chalk/doc.scss +2 -2
  57. package/theme-chalk/{drawer/index.scss → drawer.scss} +1 -1
  58. package/theme-chalk/{dropdown/index.scss → dropdown.scss} +1 -1
  59. package/theme-chalk/{empty/index.scss → empty.scss} +1 -1
  60. package/theme-chalk/{form/index.scss → form.scss} +1 -1
  61. package/theme-chalk/icon/fonts.scss +9 -9
  62. package/theme-chalk/icon/index.scss +1 -1
  63. package/theme-chalk/icon/scss/_animated.scss +1 -0
  64. package/theme-chalk/icon/scss/_bordered-pulled.scss +1 -0
  65. package/theme-chalk/icon/scss/_core.scss +2 -0
  66. package/theme-chalk/icon/scss/_duotone-icons.scss +3 -4
  67. package/theme-chalk/icon/scss/_fixed-width.scss +1 -0
  68. package/theme-chalk/icon/scss/_functions.scss +2 -1
  69. package/theme-chalk/icon/scss/_icons.scss +3 -4
  70. package/theme-chalk/icon/scss/_list.scss +1 -0
  71. package/theme-chalk/icon/scss/_mixins.scss +10 -7
  72. package/theme-chalk/icon/scss/_rotated-flipped.scss +1 -0
  73. package/theme-chalk/icon/scss/_screen-reader.scss +2 -0
  74. package/theme-chalk/icon/scss/_shims.scss +292 -290
  75. package/theme-chalk/icon/scss/_sizing.scss +2 -0
  76. package/theme-chalk/icon/scss/_stacked.scss +1 -0
  77. package/theme-chalk/icon/scss/brands.scss +8 -6
  78. package/theme-chalk/icon/scss/duotone.scss +6 -5
  79. package/theme-chalk/icon/scss/fontawesome.scss +13 -13
  80. package/theme-chalk/icon/scss/index.scss +12 -15
  81. package/theme-chalk/icon/scss/light.scss +3 -2
  82. package/theme-chalk/icon/scss/regular.scss +3 -2
  83. package/theme-chalk/icon/scss/solid.scss +3 -2
  84. package/theme-chalk/icon/scss/thin.scss +3 -2
  85. package/theme-chalk/icon/scss/{_variables.scss → variables.scss} +2 -0
  86. package/theme-chalk/index.scss +63 -57
  87. package/theme-chalk/input/_mixins.scss +1 -1
  88. package/theme-chalk/input/index.scss +2 -3
  89. package/theme-chalk/input/input-range.scss +2 -1
  90. package/theme-chalk/input/input.scss +2 -1
  91. package/theme-chalk/{input-number/index.scss → input-number.scss} +4 -4
  92. package/theme-chalk/{link/index.scss → link.scss} +1 -1
  93. package/theme-chalk/{loading/index.scss → loading.scss} +1 -1
  94. package/theme-chalk/{message-box/index.scss → message-box.scss} +1 -1
  95. package/theme-chalk/{message/index.scss → message.scss} +2 -1
  96. package/theme-chalk/mixins/_button.scss +224 -0
  97. package/theme-chalk/mixins/_col.scss +33 -0
  98. package/theme-chalk/mixins/_var.scss +67 -0
  99. package/theme-chalk/{common/_var.scss → mixins/config.scss} +5 -6
  100. package/theme-chalk/mixins/function.scss +99 -0
  101. package/theme-chalk/mixins/mixins.scss +240 -0
  102. package/theme-chalk/mixins/utils.scss +39 -0
  103. package/theme-chalk/{notification/index.scss → notification.scss} +2 -1
  104. package/theme-chalk/pagination.scss +303 -0
  105. package/theme-chalk/{popconfirm/index.scss → popconfirm.scss} +1 -1
  106. package/theme-chalk/{popover/index.scss → popover.scss} +1 -1
  107. package/theme-chalk/popper.scss +104 -0
  108. package/theme-chalk/{popper/index.scss → popper.scss--bak} +1 -1
  109. package/theme-chalk/{progress/index.scss → progress.scss} +1 -1
  110. package/theme-chalk/radio-button.scss +169 -0
  111. package/theme-chalk/{radio/radio-button.scss → radio-button.scss--bak} +1 -1
  112. package/theme-chalk/{radio-group/index.scss → radio-group.scss} +1 -10
  113. package/theme-chalk/{radio/radio.scss → radio.scss} +1 -1
  114. package/theme-chalk/{row/index.scss → row.scss} +1 -1
  115. package/theme-chalk/{scrollbar/index.scss → scrollbar.scss} +1 -1
  116. package/theme-chalk/select/index.scss +1 -1
  117. package/theme-chalk/{skeleton/index.scss → skeleton.scss} +1 -1
  118. package/theme-chalk/switch.scss +300 -0
  119. package/theme-chalk/{switch/index.scss → switch.scss--bak} +1 -1
  120. package/theme-chalk/{table/index.scss → table.scss} +1 -1
  121. package/theme-chalk/{tabs/index.scss → tabs.scss} +1 -1
  122. package/theme-chalk/{tag/index.scss → tag.scss} +1 -1
  123. package/theme-chalk/{time-line/_timeline.scss → time-line.scss} +1 -1
  124. package/theme-chalk/{time-picker/index.scss → time-picker.scss} +1 -1
  125. package/theme-chalk/{date-time-picker/time-range-picker.scss → time-range-picker.scss} +1 -1
  126. package/theme-chalk/{time-line/_timeline-item.scss → timeline-item.scss} +1 -1
  127. package/theme-chalk/{tooltip/index.scss → tooltip.scss} +1 -1
  128. package/theme-chalk/{transfer/index.scss → transfer.scss} +1 -1
  129. package/theme-chalk/{transition/index.scss → transition.scss} +1 -1
  130. package/theme-chalk/tree/_directory.scss +1 -1
  131. package/theme-chalk/tree/_tree.scss +1 -1
  132. package/theme-chalk/tree/index.scss +2 -2
  133. package/theme-chalk/{tree-select/index.scss → tree-select.scss} +1 -1
  134. package/theme-chalk/{upload/index.scss → upload.scss} +1 -1
  135. package/theme-chalk/var.scss +83 -0
  136. package/theme-chalk/cascader/index.scss +0 -2
  137. package/theme-chalk/common/index.ts +0 -1
  138. package/theme-chalk/date-time-picker/index.scss +0 -3
  139. package/theme-chalk/descriptions/index.scss +0 -2
  140. package/theme-chalk/icon/scss/v4-shims.scss +0 -3
  141. package/theme-chalk/pagination/index.scss +0 -303
  142. package/theme-chalk/placeholder/index.scss +0 -120
  143. package/theme-chalk/radio/index.scss +0 -2
  144. package/theme-chalk/time-line/index.scss +0 -2
@@ -0,0 +1,304 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'common/var' as *;
4
+ @use 'mixins/function' as *;
5
+ @use 'mixins/button' as *;
6
+ @use 'mixins/mixins' as *;
7
+ @use 'mixins/utils' as *;
8
+ @use 'mixins/var' as *;
9
+
10
+ $button-icon-span-gap: () !default;
11
+ $button-icon-span-gap: map.merge(
12
+ (
13
+ 'large': 8px,
14
+ 'default': 6px,
15
+ 'small': 4px,
16
+ ),
17
+ $button-icon-span-gap
18
+ );
19
+
20
+ @include b(button) {
21
+ @include set-component-css-var('button', $button);
22
+ }
23
+
24
+ @include b(button) {
25
+ display: inline-flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+
29
+ line-height: 1;
30
+ // min-height will expand when in flex
31
+ height: map.get($input-height, 'default');
32
+ white-space: nowrap;
33
+ cursor: pointer;
34
+ color: getCssVar('button', 'text-color');
35
+ text-align: center;
36
+ box-sizing: border-box;
37
+ outline: none;
38
+ transition: 0.1s;
39
+ font-weight: getCssVar('button', 'font-weight');
40
+ user-select: none;
41
+ vertical-align: middle;
42
+ -webkit-appearance: none;
43
+ background-color: getCssVar('button', 'bg-color');
44
+ border: 1px getCssVar('button', 'border-style');
45
+ border-color: getCssVar('button', 'border-color');
46
+
47
+ &:hover {
48
+ color: getCssVar('button', 'hover', 'text-color');
49
+ border-color: getCssVar('button', 'hover', 'border-color');
50
+ background-color: getCssVar('button', 'hover', 'bg-color');
51
+ outline: none;
52
+ }
53
+
54
+ &:active {
55
+ color: getCssVar('button', 'active', 'text-color');
56
+ border-color: getCssVar('button', 'active', 'border-color');
57
+ background-color: getCssVar('button', 'active', 'bg-color');
58
+ outline: none;
59
+ }
60
+
61
+ &:focus-visible {
62
+ outline: 2px solid getCssVar('button', 'outline-color');
63
+ outline-offset: 1px;
64
+ transition: outline-offset 0s, outline 0s;
65
+ }
66
+
67
+ > span {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ }
71
+
72
+ & + & {
73
+ margin-left: 12px;
74
+ }
75
+
76
+ & {
77
+ @include button-size(
78
+ map.get($button-padding-vertical, 'default') - $button-border-width,
79
+ map.get($button-padding-horizontal, 'default') - $button-border-width,
80
+ map.get($button-font-size, 'default'),
81
+ map.get($button-border-radius, 'default')
82
+ );
83
+ }
84
+
85
+ &::-moz-focus-inner {
86
+ border: 0;
87
+ }
88
+
89
+ & [class*='#{$namespace}-icon'] {
90
+ & + span {
91
+ margin-left: map.get($button-icon-span-gap, 'default');
92
+ }
93
+ svg {
94
+ vertical-align: bottom;
95
+ }
96
+ }
97
+
98
+ @include when(plain) {
99
+ @include css-var-from-global(('button', 'hover', 'text-color'), ('color', 'primary'));
100
+ @include css-var-from-global(('button', 'hover', 'bg-color'), ('fill-color', 'blank'));
101
+ @include css-var-from-global(('button', 'hover', 'border-color'), ('color', 'primary'));
102
+ }
103
+
104
+ @include when(dashed) {
105
+ $varName: getCssVarName('button', 'border-style');
106
+ @include css-var-from-global(('button', 'hover', 'text-color'), ('color', 'primary'));
107
+ @include css-var-from-global(('button', 'hover', 'bg-color'), ('fill-color', 'blank'));
108
+ @include css-var-from-global(('button', 'hover', 'border-color'), ('color', 'primary'));
109
+ #{$varName}: dashed;
110
+ @include css-var-from-global(('button', 'active', 'bg-color'), ('fill-color', 'blank'));
111
+ @include css-var-from-global(('button', 'active', 'text-color'), ('color', 'primary', 'light-3'));
112
+ @include css-var-from-global(('button', 'active', 'border-color'), ('color', 'primary', 'light-3'));
113
+ }
114
+
115
+ @include when(active) {
116
+ color: getCssVar('button', 'active', 'text-color');
117
+ border-color: getCssVar('button', 'active', 'border-color');
118
+ background-color: getCssVar('button', 'active', 'bg-color');
119
+ outline: none;
120
+ }
121
+
122
+ @include when(disabled) {
123
+ &,
124
+ &:hover {
125
+ color: getCssVar('button', 'disabled', 'text-color');
126
+ cursor: not-allowed;
127
+ background-image: none;
128
+ background-color: getCssVar('button', 'disabled', 'bg-color');
129
+ border-color: getCssVar('button', 'disabled', 'border-color');
130
+ }
131
+ }
132
+
133
+ @include when(loading) {
134
+ position: relative;
135
+ pointer-events: none;
136
+
137
+ &:before {
138
+ // mask the button
139
+ z-index: 1;
140
+ pointer-events: none;
141
+ content: '';
142
+ position: absolute;
143
+ left: -1px;
144
+ top: -1px;
145
+ right: -1px;
146
+ bottom: -1px;
147
+ border-radius: inherit;
148
+ background-color: getCssVar('mask-color', 'extra-light');
149
+ }
150
+ }
151
+ @include when(round) {
152
+ border-radius: getCssVar('border-radius', 'round');
153
+ }
154
+ @include when(circle) {
155
+ width: map.get($input-height, 'default');
156
+ border-radius: 50%;
157
+ padding: map.get($button-padding-vertical, 'default') - $button-border-width;
158
+ }
159
+
160
+ @include when(text) {
161
+ color: getCssVar('button', 'text-color');
162
+ border: 0 solid transparent;
163
+ background-color: transparent;
164
+
165
+ @include when(disabled) {
166
+ color: getCssVar('button', 'disabled', 'text-color');
167
+ background-color: transparent !important;
168
+ }
169
+
170
+ &:not(.is-disabled) {
171
+ &:hover {
172
+ background-color: getCssVar('fill-color', 'light');
173
+ }
174
+
175
+ &:focus-visible {
176
+ outline: 2px solid getCssVar('button', 'outline-color');
177
+ outline-offset: 1px;
178
+ transition: outline-offset 0s, outline 0s;
179
+ }
180
+
181
+ &:active {
182
+ background-color: getCssVar('fill-color');
183
+ }
184
+
185
+ @include when(has-bg) {
186
+ background-color: getCssVar('fill-color', 'light');
187
+
188
+ &:hover {
189
+ background-color: getCssVar('fill-color');
190
+ }
191
+
192
+ &:active {
193
+ background-color: getCssVar('fill-color', 'dark');
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ @include e(text) {
200
+ @include m(expand) {
201
+ letter-spacing: 0.3em;
202
+ margin-right: -0.3em;
203
+ }
204
+ }
205
+
206
+ @include when(link) {
207
+ border-color: transparent;
208
+ color: getCssVar('button', 'text-color');
209
+ background: transparent;
210
+ padding: 2px;
211
+ height: auto;
212
+
213
+ &:hover {
214
+ color: getCssVar('button', 'hover', 'link-text-color');
215
+ }
216
+
217
+ @include when(disabled) {
218
+ color: getCssVar('button', 'disabled', 'text-color');
219
+ background-color: transparent !important;
220
+ border-color: transparent !important;
221
+ }
222
+
223
+ &:not(.is-disabled) {
224
+ &:hover {
225
+ border-color: transparent;
226
+ background-color: transparent;
227
+ }
228
+
229
+ &:active {
230
+ color: getCssVar('button', 'active-color');
231
+ border-color: transparent;
232
+ background-color: transparent;
233
+ }
234
+ }
235
+ }
236
+
237
+ @include m(text) {
238
+ border-color: transparent;
239
+ background: transparent;
240
+ color: getCssVar('color', 'primary');
241
+ padding-left: 0;
242
+ padding-right: 0;
243
+ @include when(disabled) {
244
+ color: getCssVar('button', 'disabled', 'text-color');
245
+ background-color: transparent !important;
246
+ border-color: transparent !important;
247
+ }
248
+
249
+ &:not(.is-disabled) {
250
+ &:hover {
251
+ color: getCssVar('color', 'primary', 'light-3');
252
+ border-color: transparent;
253
+ background-color: transparent;
254
+ }
255
+
256
+ &:active {
257
+ color: getCssVar('color', 'primary', 'dark-2');
258
+ border-color: transparent;
259
+ background-color: transparent;
260
+ }
261
+ }
262
+ }
263
+
264
+ @include e(link) {
265
+ @include m(expand) {
266
+ letter-spacing: 0.3em;
267
+ margin-right: -0.3em;
268
+ }
269
+ }
270
+
271
+ @each $type in (primary, success, warning, danger, info) {
272
+ @include m($type) {
273
+ @include button-variant($type);
274
+ }
275
+ }
276
+
277
+ @each $size in (large, small) {
278
+ @include m($size) {
279
+ @include set-css-var-value(('button', 'size'), map.get($input-height, $size));
280
+
281
+ height: getCssVar('button', 'size');
282
+
283
+ & [class*='#{$namespace}-icon'] {
284
+ & + span {
285
+ margin-left: map.get($button-icon-span-gap, $size);
286
+ }
287
+ }
288
+
289
+ & {
290
+ @include button-size(
291
+ map.get($button-padding-vertical, $size) - $button-border-width,
292
+ map.get($button-padding-horizontal, $size) - $button-border-width,
293
+ map.get($button-font-size, $size),
294
+ map.get($button-border-radius, $size)
295
+ );
296
+ }
297
+
298
+ @include when(circle) {
299
+ width: getCssVar('button', 'size');
300
+ padding: map.get($button-padding-vertical, $size) - $button-border-width;
301
+ }
302
+ }
303
+ }
304
+ }
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use '../mixins/config' as *;
2
2
 
3
3
  .#{$namespace}-date-picker {
4
4
  --#{$namespace}-datepicker-text-color: var(--#{$namespace}-text-color-regular);
@@ -1,4 +1,4 @@
1
- @use '../common/var';
1
+ @use '../mixins/config' as *;
2
2
 
3
3
  .#{$namespace}-date-range-picker {
4
4
  --#{$namespace}-datepicker-text-color: var(--#{$namespace}-text-color-regular);
@@ -1,156 +1,164 @@
1
- @use '../common/var';
2
-
3
- .#{$namespace}-date-table {
4
- font-size: 12px;
5
- user-select: none;
6
-
7
- &.is-week-mode {
8
- .#{$namespace}-date-table__row {
9
- &:hover {
10
- .#{$namespace}-date-table-cell {
11
- background-color: #f2f6fc;
12
- }
13
- td.available:hover {
14
- color: #606266;
15
- }
16
- td:first-child .#{$namespace}-date-table-cell {
17
- margin-left: 5px;
18
- border-top-left-radius: 15px;
19
- border-bottom-left-radius: 15px;
20
- }
21
- td:last-child .#{$namespace}-date-table-cell {
22
- margin-right: 5px;
23
- border-top-right-radius: 15px;
24
- border-bottom-right-radius: 15px;
25
- }
26
- }
27
-
28
- &.current .#{$namespace}-date-table-cell {
29
- background-color: #f2f6fc;
30
- }
31
- }
32
- }
33
-
34
- td {
35
- width: 32px;
36
- height: 30px;
37
- padding: 4px 0;
38
- box-sizing: border-box;
39
- text-align: center;
40
- cursor: pointer;
41
- position: relative;
42
-
43
- .#{$namespace}-date-table-cell {
44
- height: 30px;
45
- padding: 3px 0;
46
- box-sizing: border-box;
47
- .#{$namespace}-date-table-cell__text {
48
- width: 24px;
49
- height: 24px;
50
- display: block;
51
- margin: 0 auto;
52
- line-height: 24px;
53
- position: absolute;
54
- left: 50%;
55
- transform: translateX(-50%);
56
- border-radius: 50%;
57
- font-size: 14px;
58
- }
59
- }
60
-
61
- &.next-month,
62
- &.prev-month {
63
- color: var(--#{$namespace}-datepicker-off-text-color);
64
-
65
- &:hover .#{$namespace}-date-table-cell__text {
66
- background: var(--#{$namespace}-fill-color-light);
67
- }
68
- }
69
-
70
- &.today {
71
- position: relative;
72
-
73
- .#{$namespace}-date-table-cell__text {
74
- color: var(--#{$namespace}-color-primary);
75
- font-weight: bold;
76
- }
77
- &.start-date .#{$namespace}-date-table-cell__text,
78
- &.end-date .#{$namespace}-date-table-cell__text {
79
- color: #ffffff;
80
- }
81
- }
82
-
83
- &.available:hover .#{$namespace}-date-table-cell__text {
84
- color: var(--#{$namespace}-datepicker-hover-text-color);
85
- background: var(--#{$namespace}-fill-color-light);
86
- }
87
-
88
- &.in-range .#{$namespace}-date-table-cell {
89
- background-color: var(--#{$namespace}-datepicker-inrange-bg-color);
90
- &:hover {
91
- background-color: var(--#{$namespace}-datepicker-inrange-bg-color);
92
- color: var(--#{$namespace}-datepicker-hover-text-color);
93
- }
94
- }
95
-
96
- &.current:not(.disabled) .#{$namespace}-date-table-cell__text {
97
- color: #ffffff;
98
- background: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary));
99
- }
100
-
101
- &.start-date .#{$namespace}-date-table-cell__text,
102
- &.end-date .#{$namespace}-date-table-cell__text {
103
- background: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary)) !important;
104
- color: #ffffff !important;
105
- }
106
-
107
- &.start-date .#{$namespace}-date-table-cell {
108
- margin-left: 5px;
109
- border-top-left-radius: 15px;
110
- border-bottom-left-radius: 15px;
111
- }
112
-
113
- &.end-date .#{$namespace}-date-table-cell {
114
- margin-right: 5px;
115
- border-top-right-radius: 15px;
116
- border-bottom-right-radius: 15px;
117
- }
118
-
119
- &.disabled .#{$namespace}-date-table-cell {
120
- background-color: var(--#{$namespace}-fill-color-light);
121
- opacity: 1;
122
- cursor: not-allowed;
123
- color: var(--#{$namespace}-datepicker-off-text-color);
124
- }
125
-
126
- &.selected .#{$namespace}-date-table-cell {
127
- margin-left: 5px;
128
- margin-right: 5px;
129
- background-color: #f2f6fc;
130
- border-radius: 15px;
131
- &:hover {
132
- background-color: #f2f6fc;
133
- }
134
- }
135
-
136
- &.selected .#{$namespace}-date-table-cell__text {
137
- background: var(--#{$namespace}-bg-color-primary, var(--#{$namespace}-color-primary));
138
- color: #ffffff;
139
- border-radius: 15px;
140
- }
141
-
142
- &.week {
143
- font-size: 80%;
144
- color: #606266;
145
- }
146
- }
147
-
148
- th {
149
- padding: 5px;
150
- color: var(--#{$namespace}-datepicker-header-text-color);
151
- font-size: 14px;
152
- font-weight: 600;
153
- border-bottom: solid 1px var(--#{$namespace}-border-color-light);
154
- text-align: center;
155
- }
156
- }
1
+ @use '../common/var' as *;
2
+ @use '../mixins/mixins' as *;
3
+
4
+ @include b(date-table) {
5
+ font-size: 12px;
6
+ user-select: none;
7
+
8
+ @include when(week-mode) {
9
+ .#{$namespace}-date-table__row {
10
+ &:hover {
11
+ .#{$namespace}-date-table-cell {
12
+ background-color: getCssVar('datepicker-inrange-bg-color');
13
+ }
14
+ td.available:hover {
15
+ color: getCssVar('datepicker-text-color');
16
+ }
17
+ td:first-child .#{$namespace}-date-table-cell {
18
+ margin-left: 5px;
19
+ border-top-left-radius: 15px;
20
+ border-bottom-left-radius: 15px;
21
+ }
22
+ td:last-child .#{$namespace}-date-table-cell {
23
+ margin-right: 5px;
24
+ border-top-right-radius: 15px;
25
+ border-bottom-right-radius: 15px;
26
+ }
27
+ }
28
+
29
+ &.current .#{$namespace}-date-table-cell {
30
+ background-color: getCssVar('datepicker-inrange-bg-color');
31
+ }
32
+ }
33
+ }
34
+
35
+ td {
36
+ width: 32px;
37
+ height: 30px;
38
+ padding: 4px 0;
39
+ box-sizing: border-box;
40
+ text-align: center;
41
+ cursor: pointer;
42
+ position: relative;
43
+
44
+ @include b(date-table-cell) {
45
+ height: 30px;
46
+ padding: 3px 0;
47
+ box-sizing: border-box;
48
+ @include b(date-table-cell__text) {
49
+ width: 24px;
50
+ height: 24px;
51
+ display: block;
52
+ margin: 0 auto;
53
+ line-height: 24px;
54
+ position: absolute;
55
+ left: 50%;
56
+ transform: translateX(-50%);
57
+ border-radius: 50%;
58
+ }
59
+ }
60
+
61
+ &.next-month,
62
+ &.prev-month {
63
+ color: getCssVar('datepicker-off-text-color');
64
+ }
65
+
66
+ &.today {
67
+ position: relative;
68
+ .#{$namespace}-date-table-cell__text {
69
+ color: getCssVar('color-primary');
70
+ font-weight: bold;
71
+ }
72
+ &.start-date .#{$namespace}-date-table-cell__text,
73
+ &.end-date .#{$namespace}-date-table-cell__text {
74
+ color: $color-white;
75
+ }
76
+ }
77
+
78
+ &.available:hover {
79
+ color: getCssVar('datepicker-hover-text-color');
80
+ }
81
+
82
+ &.in-range .#{$namespace}-date-table-cell {
83
+ background-color: getCssVar('datepicker-inrange-bg-color');
84
+ &:hover {
85
+ background-color: getCssVar('datepicker-inrange-hover-bg-color');
86
+ }
87
+ }
88
+
89
+ &.current:not(.disabled) {
90
+ .#{$namespace}-date-table-cell__text {
91
+ color: $color-white;
92
+ background-color: getCssVar('datepicker-active-color');
93
+ }
94
+ &:focus-visible {
95
+ .#{$namespace}-date-table-cell__text {
96
+ outline: 2px solid getCssVar('datepicker-active-color');
97
+ outline-offset: 1px;
98
+ }
99
+ }
100
+ }
101
+ &.start-date .#{$namespace}-date-table-cell,
102
+ &.end-date .#{$namespace}-date-table-cell {
103
+ color: $color-white;
104
+ }
105
+
106
+ &.start-date .#{$namespace}-date-table-cell__text,
107
+ &.end-date .#{$namespace}-date-table-cell__text {
108
+ background-color: getCssVar('datepicker-active-color');
109
+ }
110
+
111
+ &.start-date .#{$namespace}-date-table-cell {
112
+ margin-left: 5px;
113
+ border-top-left-radius: 15px;
114
+ border-bottom-left-radius: 15px;
115
+ }
116
+
117
+ &.end-date .#{$namespace}-date-table-cell {
118
+ margin-right: 5px;
119
+ border-top-right-radius: 15px;
120
+ border-bottom-right-radius: 15px;
121
+ }
122
+
123
+ &.disabled .#{$namespace}-date-table-cell {
124
+ background-color: getCssVar('fill-color', 'light');
125
+ opacity: 1;
126
+ cursor: not-allowed;
127
+ color: getCssVar('text-color', 'placeholder');
128
+ }
129
+
130
+ &.selected .#{$namespace}-date-table-cell {
131
+ margin-left: 5px;
132
+ margin-right: 5px;
133
+ border-radius: 15px;
134
+ }
135
+
136
+ &.selected .#{$namespace}-date-table-cell__text {
137
+ background-color: getCssVar('datepicker-active-color');
138
+ color: $color-white;
139
+ border-radius: 15px;
140
+ }
141
+
142
+ &.week {
143
+ font-size: 80%;
144
+ color: getCssVar('datepicker-off-text-color');
145
+ cursor: default;
146
+ }
147
+
148
+ &:focus {
149
+ outline: none;
150
+ }
151
+ }
152
+
153
+ th {
154
+ padding: 5px;
155
+ color: getCssVar('datepicker-header-text-color');
156
+ font-weight: 400;
157
+ border-bottom: solid 1px getCssVar('border-color-lighter');
158
+
159
+ &.#{$namespace}-date-table__week-header {
160
+ padding: 0;
161
+ width: 24px;
162
+ }
163
+ }
164
+ }