@type-dom/ui 0.1.2 → 0.1.3

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 (132) hide show
  1. package/README.md +134 -134
  2. package/package.json +3 -1
  3. package/src/components/data/td-progress/td-progress.class.js +5 -5
  4. package/src/hooks/use-deprecated/index.js +2 -2
  5. package/src/hooks/use-id/index.js +4 -4
  6. package/src/hooks/use-z-index/index.js +1 -1
  7. package/src/theme-chalk/affix.scss +7 -7
  8. package/src/theme-chalk/alert.scss +115 -115
  9. package/src/theme-chalk/anchor-link.scss +41 -41
  10. package/src/theme-chalk/anchor.scss +88 -88
  11. package/src/theme-chalk/aside.scss +8 -8
  12. package/src/theme-chalk/autocomplete.scss +89 -89
  13. package/src/theme-chalk/avatar.scss +55 -55
  14. package/src/theme-chalk/backtop.scss +29 -29
  15. package/src/theme-chalk/badge.scss +58 -58
  16. package/src/theme-chalk/base.scss +3 -3
  17. package/src/theme-chalk/breadcrumb.scss +62 -62
  18. package/src/theme-chalk/button-group.scss +80 -80
  19. package/src/theme-chalk/button.scss +304 -304
  20. package/src/theme-chalk/calendar.scss +80 -80
  21. package/src/theme-chalk/card.scss +45 -45
  22. package/src/theme-chalk/carousel-item.scss +58 -58
  23. package/src/theme-chalk/carousel.scss +188 -188
  24. package/src/theme-chalk/cascader-panel.scss +138 -138
  25. package/src/theme-chalk/cascader.scss +247 -247
  26. package/src/theme-chalk/check-tag.scss +60 -60
  27. package/src/theme-chalk/checkbox-button.scss +140 -140
  28. package/src/theme-chalk/checkbox-group.scss +7 -7
  29. package/src/theme-chalk/checkbox.scss +298 -298
  30. package/src/theme-chalk/col.scss +48 -48
  31. package/src/theme-chalk/collapse.scss +70 -70
  32. package/src/theme-chalk/color/index.scss +20 -20
  33. package/src/theme-chalk/color-picker.scss +393 -393
  34. package/src/theme-chalk/common/popup.scss +47 -47
  35. package/src/theme-chalk/common/transition.scss +122 -122
  36. package/src/theme-chalk/common/var.scss +1655 -1655
  37. package/src/theme-chalk/container.scss +14 -14
  38. package/src/theme-chalk/dark/css-vars.scss +39 -39
  39. package/src/theme-chalk/dark/var.scss +222 -222
  40. package/src/theme-chalk/date-picker/date-picker.scss +110 -110
  41. package/src/theme-chalk/date-picker/date-range-picker.scss +113 -113
  42. package/src/theme-chalk/date-picker/date-table.scss +158 -158
  43. package/src/theme-chalk/date-picker/month-table.scss +112 -112
  44. package/src/theme-chalk/date-picker/picker-panel.scss +131 -131
  45. package/src/theme-chalk/date-picker/picker.scss +212 -212
  46. package/src/theme-chalk/date-picker/time-picker.scss +90 -90
  47. package/src/theme-chalk/date-picker/time-range-picker.scss +33 -33
  48. package/src/theme-chalk/date-picker/time-spinner.scss +111 -111
  49. package/src/theme-chalk/date-picker/year-table.scss +108 -108
  50. package/src/theme-chalk/date-picker.scss +9 -9
  51. package/src/theme-chalk/descriptions-item.scss +73 -73
  52. package/src/theme-chalk/descriptions.scss +152 -152
  53. package/src/theme-chalk/dialog.scss +192 -192
  54. package/src/theme-chalk/display.scss +12 -12
  55. package/src/theme-chalk/divider.scss +48 -48
  56. package/src/theme-chalk/drawer.scss +155 -155
  57. package/src/theme-chalk/dropdown.scss +208 -208
  58. package/src/theme-chalk/empty.scss +49 -49
  59. package/src/theme-chalk/footer.scss +12 -12
  60. package/src/theme-chalk/form.scss +244 -244
  61. package/src/theme-chalk/header.scss +12 -12
  62. package/src/theme-chalk/icon.scss +45 -45
  63. package/src/theme-chalk/image-viewer.scss +155 -155
  64. package/src/theme-chalk/image.scss +49 -49
  65. package/src/theme-chalk/index.scss +111 -111
  66. package/src/theme-chalk/input-number.scss +186 -186
  67. package/src/theme-chalk/input-tag.scss +220 -220
  68. package/src/theme-chalk/input.scss +474 -474
  69. package/src/theme-chalk/link.scss +90 -90
  70. package/src/theme-chalk/loading.scss +104 -104
  71. package/src/theme-chalk/main.scss +14 -14
  72. package/src/theme-chalk/mention.scss +92 -92
  73. package/src/theme-chalk/menu.scss +339 -339
  74. package/src/theme-chalk/message-box.scss +213 -213
  75. package/src/theme-chalk/message.scss +98 -98
  76. package/src/theme-chalk/mixins/_button.scss +165 -165
  77. package/src/theme-chalk/mixins/_col.scss +33 -33
  78. package/src/theme-chalk/mixins/_var.scss +67 -67
  79. package/src/theme-chalk/mixins/config.scss +5 -5
  80. package/src/theme-chalk/mixins/function.scss +88 -88
  81. package/src/theme-chalk/mixins/mixins.scss +240 -240
  82. package/src/theme-chalk/mixins/utils.scss +39 -39
  83. package/src/theme-chalk/notification.scss +107 -107
  84. package/src/theme-chalk/option-group.scss +33 -33
  85. package/src/theme-chalk/option.scss +71 -71
  86. package/src/theme-chalk/overlay.scss +17 -17
  87. package/src/theme-chalk/page-header.scss +60 -60
  88. package/src/theme-chalk/pagination.scss +238 -238
  89. package/src/theme-chalk/popconfirm.scss +16 -16
  90. package/src/theme-chalk/popover.scss +61 -61
  91. package/src/theme-chalk/popper.scss +106 -106
  92. package/src/theme-chalk/progress.scss +179 -179
  93. package/src/theme-chalk/radio-button.scss +169 -169
  94. package/src/theme-chalk/radio-group.scss +9 -9
  95. package/src/theme-chalk/radio.scss +215 -215
  96. package/src/theme-chalk/rate.scss +108 -108
  97. package/src/theme-chalk/reset.scss +98 -98
  98. package/src/theme-chalk/result.scss +57 -57
  99. package/src/theme-chalk/row.scss +35 -35
  100. package/src/theme-chalk/scrollbar.scss +97 -97
  101. package/src/theme-chalk/segmented.scss +183 -183
  102. package/src/theme-chalk/select-dropdown-v2.scss +1 -1
  103. package/src/theme-chalk/select-dropdown.scss +57 -57
  104. package/src/theme-chalk/select-v2.scss +4 -4
  105. package/src/theme-chalk/select.scss +264 -264
  106. package/src/theme-chalk/skeleton-item.scss +83 -83
  107. package/src/theme-chalk/skeleton.scss +44 -44
  108. package/src/theme-chalk/slider.scss +212 -212
  109. package/src/theme-chalk/space.scss +20 -20
  110. package/src/theme-chalk/spinner.scss +43 -43
  111. package/src/theme-chalk/statistic.scss +35 -35
  112. package/src/theme-chalk/step.scss +316 -316
  113. package/src/theme-chalk/steps.scss +21 -21
  114. package/src/theme-chalk/switch.scss +300 -300
  115. package/src/theme-chalk/table-column.scss +98 -98
  116. package/src/theme-chalk/table-v2.scss +236 -236
  117. package/src/theme-chalk/table.scss +694 -694
  118. package/src/theme-chalk/tabs.scss +660 -660
  119. package/src/theme-chalk/tag.scss +181 -181
  120. package/src/theme-chalk/text.scss +51 -51
  121. package/src/theme-chalk/time-picker.scss +5 -5
  122. package/src/theme-chalk/time-select.scss +37 -37
  123. package/src/theme-chalk/timeline-item.scss +84 -84
  124. package/src/theme-chalk/timeline.scss +46 -46
  125. package/src/theme-chalk/tooltip-v2.scss +95 -95
  126. package/src/theme-chalk/tour.scss +187 -187
  127. package/src/theme-chalk/transfer.scss +203 -203
  128. package/src/theme-chalk/tree-select.scss +41 -41
  129. package/src/theme-chalk/tree.scss +134 -134
  130. package/src/theme-chalk/upload.scss +654 -654
  131. package/src/theme-chalk/var.scss +87 -87
  132. package/src/theme-chalk/virtual-list.scss +40 -40
@@ -1,393 +1,393 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'common/var' as *;
5
-
6
- $color-picker-size: () !default;
7
- $color-picker-size: map.merge($common-component-size, $color-picker-size);
8
-
9
- @mixin color-picker-thumb {
10
- position: absolute;
11
- cursor: pointer;
12
- box-sizing: border-box;
13
- left: 0;
14
- top: 0;
15
- width: 4px;
16
- height: 100%;
17
- border-radius: 1px;
18
- background: #fff;
19
- border: 1px solid getCssVar('border-color', 'lighter');
20
- box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
21
- z-index: 1;
22
-
23
- &:focus-visible {
24
- outline: 2px solid getCssVar('color-primary');
25
- outline-offset: 1px;
26
- }
27
- }
28
-
29
- @mixin bar-background($side: right) {
30
- background: linear-gradient(
31
- to $side,
32
- #f00 0%,
33
- #ff0 17%,
34
- #0f0 33%,
35
- #0ff 50%,
36
- #00f 67%,
37
- #f0f 83%,
38
- #f00 100%
39
- );
40
- }
41
-
42
- @include b(color-predefine) {
43
- display: flex;
44
- font-size: 12px;
45
- margin-top: 8px;
46
- width: 280px;
47
-
48
- @include e(colors) {
49
- display: flex;
50
- flex: 1;
51
- flex-wrap: wrap;
52
- }
53
-
54
- @include e(color-selector) {
55
- margin: 0 0 8px 8px;
56
- width: 20px;
57
- height: 20px;
58
- border-radius: 4px;
59
- cursor: pointer;
60
-
61
- &:nth-child(10n + 1) {
62
- margin-left: 0;
63
- }
64
-
65
- &.selected {
66
- box-shadow: 0 0 3px 2px getCssVar('color-primary');
67
- }
68
-
69
- > div {
70
- display: flex;
71
- height: 100%;
72
- border-radius: 3px;
73
- }
74
-
75
- @include when(alpha) {
76
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
77
- }
78
- }
79
- }
80
-
81
- @include b(color-hue-slider) {
82
- position: relative;
83
- box-sizing: border-box;
84
- width: 280px;
85
- height: 12px;
86
- background-color: #f00;
87
- padding: 0 2px;
88
- float: right;
89
-
90
- @include e(bar) {
91
- position: relative;
92
- @include bar-background;
93
- height: 100%;
94
- }
95
-
96
- @include e(thumb) {
97
- @include color-picker-thumb;
98
- }
99
-
100
- @include when(vertical) {
101
- width: 12px;
102
- height: 180px;
103
- padding: 2px 0;
104
-
105
- .#{$namespace}-color-hue-slider__bar {
106
- @include bar-background(bottom);
107
- }
108
-
109
- .#{$namespace}-color-hue-slider__thumb {
110
- left: 0;
111
- top: 0;
112
- width: 100%;
113
- height: 4px;
114
- }
115
- }
116
- }
117
-
118
- @include b(color-svpanel) {
119
- position: relative;
120
- width: 280px;
121
- height: 180px;
122
-
123
- @include e(('white', 'black')) {
124
- position: absolute;
125
- top: 0;
126
- left: 0;
127
- right: 0;
128
- bottom: 0;
129
- }
130
-
131
- @include e('white') {
132
- background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
133
- }
134
-
135
- @include e('black') {
136
- background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
137
- }
138
-
139
- @include e(cursor) {
140
- position: absolute;
141
-
142
- > div {
143
- cursor: head;
144
- width: 4px;
145
- height: 4px;
146
- box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, 0.3),
147
- 0 0 1px 2px rgba(0, 0, 0, 0.4);
148
- border-radius: 50%;
149
- transform: translate(-2px, -2px);
150
- }
151
- }
152
- }
153
-
154
- @mixin alpha-bg {
155
- background-image: linear-gradient(
156
- 45deg,
157
- getCssVar('color-picker', 'alpha-bg-a') 25%,
158
- getCssVar('color-picker', 'alpha-bg-b') 25%
159
- ),
160
- linear-gradient(
161
- 135deg,
162
- getCssVar('color-picker', 'alpha-bg-a') 25%,
163
- getCssVar('color-picker', 'alpha-bg-b') 25%
164
- ),
165
- linear-gradient(
166
- 45deg,
167
- getCssVar('color-picker', 'alpha-bg-b') 75%,
168
- getCssVar('color-picker', 'alpha-bg-a') 75%
169
- ),
170
- linear-gradient(
171
- 135deg,
172
- getCssVar('color-picker', 'alpha-bg-b') 75%,
173
- getCssVar('color-picker', 'alpha-bg-a') 75%
174
- );
175
- background-size: 12px 12px;
176
- background-position: 0 0, 6px 0, 6px -6px, 0 6px;
177
- }
178
-
179
- @include b(color-alpha-slider) {
180
- position: relative;
181
- box-sizing: border-box;
182
- width: 280px;
183
- height: 12px;
184
- @include alpha-bg;
185
-
186
- @include e(bar) {
187
- position: relative;
188
- background: linear-gradient(
189
- to right,
190
- rgba(255, 255, 255, 0) 0%,
191
- getCssVar('bg-color') 100%
192
- );
193
- height: 100%;
194
- }
195
-
196
- @include e(thumb) {
197
- @include color-picker-thumb;
198
- }
199
-
200
- @include when(vertical) {
201
- width: 20px;
202
- height: 180px;
203
-
204
- .#{$namespace}-color-alpha-slider__bar {
205
- background: linear-gradient(
206
- to bottom,
207
- rgba(255, 255, 255, 0) 0%,
208
- rgba(255, 255, 255, 1) 100%
209
- );
210
- }
211
-
212
- .#{$namespace}-color-alpha-slider__thumb {
213
- left: 0;
214
- top: 0;
215
- width: 100%;
216
- height: 4px;
217
- }
218
- }
219
- }
220
-
221
- @include b(color-dropdown) {
222
- width: 300px;
223
-
224
- @include e(main-wrapper) {
225
- margin-bottom: 6px;
226
-
227
- &::after {
228
- content: '';
229
- display: table;
230
- clear: both;
231
- }
232
- }
233
-
234
- @include e(btns) {
235
- margin-top: 12px;
236
- text-align: right;
237
- }
238
-
239
- @include e(value) {
240
- float: left;
241
- line-height: 26px;
242
- font-size: 12px;
243
- color: $color-black;
244
- width: 160px;
245
- }
246
- }
247
-
248
- @include b(color-picker) {
249
- display: inline-block;
250
- position: relative;
251
- line-height: normal;
252
- outline: none;
253
-
254
- &:hover:not(.is-disabled, .is-focused) {
255
- .#{$namespace}-color-picker__trigger {
256
- border-color: getCssVar('border-color-hover');
257
- }
258
- }
259
-
260
- &:focus-visible:not(.is-disabled) {
261
- .#{$namespace}-color-picker__trigger {
262
- outline: 2px solid getCssVar('color-primary');
263
- outline-offset: 1px;
264
- }
265
- }
266
-
267
- @include when(focused) {
268
- .#{$namespace}-color-picker__trigger {
269
- border-color: getCssVar('color-primary');
270
- }
271
- }
272
-
273
- @include when(disabled) {
274
- pointer-events: none;
275
- .#{$namespace}-color-picker__trigger {
276
- cursor: not-allowed;
277
- }
278
- }
279
-
280
- @each $size in (large, small) {
281
- @include m($size) {
282
- height: map.get($color-picker-size, $size);
283
-
284
- .#{$namespace}-color-picker__trigger {
285
- height: map.get($color-picker-size, $size);
286
- width: map.get($color-picker-size, $size);
287
- }
288
-
289
- .#{$namespace}-color-picker__mask {
290
- height: map.get($color-picker-size, $size)-2px;
291
- width: map.get($color-picker-size, $size)-2px;
292
- }
293
- }
294
- }
295
-
296
- @include m(small) {
297
- .#{$namespace}-color-picker__icon,
298
- .#{$namespace}-color-picker__empty {
299
- transform: scale(0.8);
300
- }
301
- }
302
-
303
- @include e(mask) {
304
- height: map.get($color-picker-size, 'default')-2px;
305
- width: map.get($color-picker-size, 'default')-2px;
306
- border-radius: 4px;
307
- position: absolute;
308
- top: 1px;
309
- left: 1px;
310
- z-index: 1;
311
- cursor: not-allowed;
312
- background-color: rgba(255, 255, 255, 0.7);
313
- }
314
-
315
- @include e(trigger) {
316
- display: inline-flex;
317
- justify-content: center;
318
- align-items: center;
319
-
320
- box-sizing: border-box;
321
- height: map.get($color-picker-size, 'default');
322
- width: map.get($color-picker-size, 'default');
323
- padding: 4px;
324
- border: 1px solid getCssVar('border-color');
325
- border-radius: 4px;
326
- font-size: 0;
327
- position: relative;
328
- cursor: pointer;
329
- }
330
-
331
- @include e(color) {
332
- position: relative;
333
- display: block;
334
- box-sizing: border-box;
335
- border: 1px solid getCssVar('text-color', 'secondary');
336
- border-radius: getCssVar('border-radius-small');
337
- width: 100%;
338
- height: 100%;
339
- text-align: center;
340
-
341
- @include when(alpha) {
342
- @include alpha-bg;
343
- // background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
344
- }
345
- }
346
-
347
- @include e(color-inner) {
348
- display: inline-flex;
349
- justify-content: center;
350
- align-items: center;
351
- width: 100%;
352
- height: 100%;
353
- }
354
-
355
- & .#{$namespace}-color-picker__empty {
356
- font-size: 12px;
357
- color: getCssVar('text-color', 'secondary');
358
- }
359
-
360
- & .#{$namespace}-color-picker__icon {
361
- display: inline-flex;
362
- justify-content: center;
363
- align-items: center;
364
- color: $color-white;
365
- font-size: 12px;
366
- }
367
-
368
- @include e(panel) {
369
- position: absolute;
370
- z-index: 10;
371
- padding: 6px;
372
- box-sizing: content-box;
373
- background-color: $color-white;
374
- border-radius: getCssVar('border-radius-base');
375
- box-shadow: map.get($dropdown, 'menu-box-shadow');
376
- &.#{$namespace}-popper {
377
- border: 1px solid getCssVar('border-color-lighter');
378
- }
379
- }
380
- }
381
-
382
- .#{bem('color-picker')},
383
- .#{bem('color-picker', 'panel')} {
384
- @include set-css-var-value(('color-picker', 'alpha-bg-a'), '#ccc');
385
- @include set-css-var-value(('color-picker', 'alpha-bg-b'), 'transparent');
386
- }
387
-
388
- .dark {
389
- .#{bem('color-picker')},
390
- .#{bem('color-picker', 'panel')} {
391
- @include set-css-var-value(('color-picker', 'alpha-bg-a'), '#333333');
392
- }
393
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'common/var' as *;
5
+
6
+ $color-picker-size: () !default;
7
+ $color-picker-size: map.merge($common-component-size, $color-picker-size);
8
+
9
+ @mixin color-picker-thumb {
10
+ position: absolute;
11
+ cursor: pointer;
12
+ box-sizing: border-box;
13
+ left: 0;
14
+ top: 0;
15
+ width: 4px;
16
+ height: 100%;
17
+ border-radius: 1px;
18
+ background: #fff;
19
+ border: 1px solid getCssVar('border-color', 'lighter');
20
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
21
+ z-index: 1;
22
+
23
+ &:focus-visible {
24
+ outline: 2px solid getCssVar('color-primary');
25
+ outline-offset: 1px;
26
+ }
27
+ }
28
+
29
+ @mixin bar-background($side: right) {
30
+ background: linear-gradient(
31
+ to $side,
32
+ #f00 0%,
33
+ #ff0 17%,
34
+ #0f0 33%,
35
+ #0ff 50%,
36
+ #00f 67%,
37
+ #f0f 83%,
38
+ #f00 100%
39
+ );
40
+ }
41
+
42
+ @include b(color-predefine) {
43
+ display: flex;
44
+ font-size: 12px;
45
+ margin-top: 8px;
46
+ width: 280px;
47
+
48
+ @include e(colors) {
49
+ display: flex;
50
+ flex: 1;
51
+ flex-wrap: wrap;
52
+ }
53
+
54
+ @include e(color-selector) {
55
+ margin: 0 0 8px 8px;
56
+ width: 20px;
57
+ height: 20px;
58
+ border-radius: 4px;
59
+ cursor: pointer;
60
+
61
+ &:nth-child(10n + 1) {
62
+ margin-left: 0;
63
+ }
64
+
65
+ &.selected {
66
+ box-shadow: 0 0 3px 2px getCssVar('color-primary');
67
+ }
68
+
69
+ > div {
70
+ display: flex;
71
+ height: 100%;
72
+ border-radius: 3px;
73
+ }
74
+
75
+ @include when(alpha) {
76
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
77
+ }
78
+ }
79
+ }
80
+
81
+ @include b(color-hue-slider) {
82
+ position: relative;
83
+ box-sizing: border-box;
84
+ width: 280px;
85
+ height: 12px;
86
+ background-color: #f00;
87
+ padding: 0 2px;
88
+ float: right;
89
+
90
+ @include e(bar) {
91
+ position: relative;
92
+ @include bar-background;
93
+ height: 100%;
94
+ }
95
+
96
+ @include e(thumb) {
97
+ @include color-picker-thumb;
98
+ }
99
+
100
+ @include when(vertical) {
101
+ width: 12px;
102
+ height: 180px;
103
+ padding: 2px 0;
104
+
105
+ .#{$namespace}-color-hue-slider__bar {
106
+ @include bar-background(bottom);
107
+ }
108
+
109
+ .#{$namespace}-color-hue-slider__thumb {
110
+ left: 0;
111
+ top: 0;
112
+ width: 100%;
113
+ height: 4px;
114
+ }
115
+ }
116
+ }
117
+
118
+ @include b(color-svpanel) {
119
+ position: relative;
120
+ width: 280px;
121
+ height: 180px;
122
+
123
+ @include e(('white', 'black')) {
124
+ position: absolute;
125
+ top: 0;
126
+ left: 0;
127
+ right: 0;
128
+ bottom: 0;
129
+ }
130
+
131
+ @include e('white') {
132
+ background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
133
+ }
134
+
135
+ @include e('black') {
136
+ background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
137
+ }
138
+
139
+ @include e(cursor) {
140
+ position: absolute;
141
+
142
+ > div {
143
+ cursor: head;
144
+ width: 4px;
145
+ height: 4px;
146
+ box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, 0.3),
147
+ 0 0 1px 2px rgba(0, 0, 0, 0.4);
148
+ border-radius: 50%;
149
+ transform: translate(-2px, -2px);
150
+ }
151
+ }
152
+ }
153
+
154
+ @mixin alpha-bg {
155
+ background-image: linear-gradient(
156
+ 45deg,
157
+ getCssVar('color-picker', 'alpha-bg-a') 25%,
158
+ getCssVar('color-picker', 'alpha-bg-b') 25%
159
+ ),
160
+ linear-gradient(
161
+ 135deg,
162
+ getCssVar('color-picker', 'alpha-bg-a') 25%,
163
+ getCssVar('color-picker', 'alpha-bg-b') 25%
164
+ ),
165
+ linear-gradient(
166
+ 45deg,
167
+ getCssVar('color-picker', 'alpha-bg-b') 75%,
168
+ getCssVar('color-picker', 'alpha-bg-a') 75%
169
+ ),
170
+ linear-gradient(
171
+ 135deg,
172
+ getCssVar('color-picker', 'alpha-bg-b') 75%,
173
+ getCssVar('color-picker', 'alpha-bg-a') 75%
174
+ );
175
+ background-size: 12px 12px;
176
+ background-position: 0 0, 6px 0, 6px -6px, 0 6px;
177
+ }
178
+
179
+ @include b(color-alpha-slider) {
180
+ position: relative;
181
+ box-sizing: border-box;
182
+ width: 280px;
183
+ height: 12px;
184
+ @include alpha-bg;
185
+
186
+ @include e(bar) {
187
+ position: relative;
188
+ background: linear-gradient(
189
+ to right,
190
+ rgba(255, 255, 255, 0) 0%,
191
+ getCssVar('bg-color') 100%
192
+ );
193
+ height: 100%;
194
+ }
195
+
196
+ @include e(thumb) {
197
+ @include color-picker-thumb;
198
+ }
199
+
200
+ @include when(vertical) {
201
+ width: 20px;
202
+ height: 180px;
203
+
204
+ .#{$namespace}-color-alpha-slider__bar {
205
+ background: linear-gradient(
206
+ to bottom,
207
+ rgba(255, 255, 255, 0) 0%,
208
+ rgba(255, 255, 255, 1) 100%
209
+ );
210
+ }
211
+
212
+ .#{$namespace}-color-alpha-slider__thumb {
213
+ left: 0;
214
+ top: 0;
215
+ width: 100%;
216
+ height: 4px;
217
+ }
218
+ }
219
+ }
220
+
221
+ @include b(color-dropdown) {
222
+ width: 300px;
223
+
224
+ @include e(main-wrapper) {
225
+ margin-bottom: 6px;
226
+
227
+ &::after {
228
+ content: '';
229
+ display: table;
230
+ clear: both;
231
+ }
232
+ }
233
+
234
+ @include e(btns) {
235
+ margin-top: 12px;
236
+ text-align: right;
237
+ }
238
+
239
+ @include e(value) {
240
+ float: left;
241
+ line-height: 26px;
242
+ font-size: 12px;
243
+ color: $color-black;
244
+ width: 160px;
245
+ }
246
+ }
247
+
248
+ @include b(color-picker) {
249
+ display: inline-block;
250
+ position: relative;
251
+ line-height: normal;
252
+ outline: none;
253
+
254
+ &:hover:not(.is-disabled, .is-focused) {
255
+ .#{$namespace}-color-picker__trigger {
256
+ border-color: getCssVar('border-color-hover');
257
+ }
258
+ }
259
+
260
+ &:focus-visible:not(.is-disabled) {
261
+ .#{$namespace}-color-picker__trigger {
262
+ outline: 2px solid getCssVar('color-primary');
263
+ outline-offset: 1px;
264
+ }
265
+ }
266
+
267
+ @include when(focused) {
268
+ .#{$namespace}-color-picker__trigger {
269
+ border-color: getCssVar('color-primary');
270
+ }
271
+ }
272
+
273
+ @include when(disabled) {
274
+ pointer-events: none;
275
+ .#{$namespace}-color-picker__trigger {
276
+ cursor: not-allowed;
277
+ }
278
+ }
279
+
280
+ @each $size in (large, small) {
281
+ @include m($size) {
282
+ height: map.get($color-picker-size, $size);
283
+
284
+ .#{$namespace}-color-picker__trigger {
285
+ height: map.get($color-picker-size, $size);
286
+ width: map.get($color-picker-size, $size);
287
+ }
288
+
289
+ .#{$namespace}-color-picker__mask {
290
+ height: map.get($color-picker-size, $size)-2px;
291
+ width: map.get($color-picker-size, $size)-2px;
292
+ }
293
+ }
294
+ }
295
+
296
+ @include m(small) {
297
+ .#{$namespace}-color-picker__icon,
298
+ .#{$namespace}-color-picker__empty {
299
+ transform: scale(0.8);
300
+ }
301
+ }
302
+
303
+ @include e(mask) {
304
+ height: map.get($color-picker-size, 'default')-2px;
305
+ width: map.get($color-picker-size, 'default')-2px;
306
+ border-radius: 4px;
307
+ position: absolute;
308
+ top: 1px;
309
+ left: 1px;
310
+ z-index: 1;
311
+ cursor: not-allowed;
312
+ background-color: rgba(255, 255, 255, 0.7);
313
+ }
314
+
315
+ @include e(trigger) {
316
+ display: inline-flex;
317
+ justify-content: center;
318
+ align-items: center;
319
+
320
+ box-sizing: border-box;
321
+ height: map.get($color-picker-size, 'default');
322
+ width: map.get($color-picker-size, 'default');
323
+ padding: 4px;
324
+ border: 1px solid getCssVar('border-color');
325
+ border-radius: 4px;
326
+ font-size: 0;
327
+ position: relative;
328
+ cursor: pointer;
329
+ }
330
+
331
+ @include e(color) {
332
+ position: relative;
333
+ display: block;
334
+ box-sizing: border-box;
335
+ border: 1px solid getCssVar('text-color', 'secondary');
336
+ border-radius: getCssVar('border-radius-small');
337
+ width: 100%;
338
+ height: 100%;
339
+ text-align: center;
340
+
341
+ @include when(alpha) {
342
+ @include alpha-bg;
343
+ // background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
344
+ }
345
+ }
346
+
347
+ @include e(color-inner) {
348
+ display: inline-flex;
349
+ justify-content: center;
350
+ align-items: center;
351
+ width: 100%;
352
+ height: 100%;
353
+ }
354
+
355
+ & .#{$namespace}-color-picker__empty {
356
+ font-size: 12px;
357
+ color: getCssVar('text-color', 'secondary');
358
+ }
359
+
360
+ & .#{$namespace}-color-picker__icon {
361
+ display: inline-flex;
362
+ justify-content: center;
363
+ align-items: center;
364
+ color: $color-white;
365
+ font-size: 12px;
366
+ }
367
+
368
+ @include e(panel) {
369
+ position: absolute;
370
+ z-index: 10;
371
+ padding: 6px;
372
+ box-sizing: content-box;
373
+ background-color: $color-white;
374
+ border-radius: getCssVar('border-radius-base');
375
+ box-shadow: map.get($dropdown, 'menu-box-shadow');
376
+ &.#{$namespace}-popper {
377
+ border: 1px solid getCssVar('border-color-lighter');
378
+ }
379
+ }
380
+ }
381
+
382
+ .#{bem('color-picker')},
383
+ .#{bem('color-picker', 'panel')} {
384
+ @include set-css-var-value(('color-picker', 'alpha-bg-a'), '#ccc');
385
+ @include set-css-var-value(('color-picker', 'alpha-bg-b'), 'transparent');
386
+ }
387
+
388
+ .dark {
389
+ .#{bem('color-picker')},
390
+ .#{bem('color-picker', 'panel')} {
391
+ @include set-css-var-value(('color-picker', 'alpha-bg-a'), '#333333');
392
+ }
393
+ }