ep-craft 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 (154) hide show
  1. package/dist/components/button/EpButton.vue.d.ts +4 -4
  2. package/dist/components/button/EpButton.vue.js +19 -19
  3. package/dist/components/button/button.d.ts +2 -2
  4. package/dist/components/button/button.js +1 -1
  5. package/dist/components/button/index.d.ts +2 -1
  6. package/dist/components/button/index.js +4 -3
  7. package/dist/index.css +2 -2
  8. package/dist/resolver.js +9 -12
  9. package/package.json +4 -2
  10. package/theme-chalk/src/affix.scss +7 -0
  11. package/theme-chalk/src/alert.scss +115 -0
  12. package/theme-chalk/src/anchor-link.scss +45 -0
  13. package/theme-chalk/src/anchor.scss +93 -0
  14. package/theme-chalk/src/aside.scss +8 -0
  15. package/theme-chalk/src/autocomplete.scss +95 -0
  16. package/theme-chalk/src/avatar-group.scss +25 -0
  17. package/theme-chalk/src/avatar.scss +55 -0
  18. package/theme-chalk/src/backtop.scss +29 -0
  19. package/theme-chalk/src/badge.scss +58 -0
  20. package/theme-chalk/src/base.scss +3 -0
  21. package/theme-chalk/src/breadcrumb-item.scss +58 -0
  22. package/theme-chalk/src/breadcrumb.scss +9 -0
  23. package/theme-chalk/src/button-group.scss +133 -0
  24. package/theme-chalk/src/button.scss +325 -0
  25. package/theme-chalk/src/calendar.scss +94 -0
  26. package/theme-chalk/src/card.scss +49 -0
  27. package/theme-chalk/src/carousel-item.scss +58 -0
  28. package/theme-chalk/src/carousel.scss +195 -0
  29. package/theme-chalk/src/cascader-panel.scss +150 -0
  30. package/theme-chalk/src/cascader.scss +289 -0
  31. package/theme-chalk/src/check-tag.scss +60 -0
  32. package/theme-chalk/src/checkbox-button.scss +142 -0
  33. package/theme-chalk/src/checkbox-group.scss +7 -0
  34. package/theme-chalk/src/checkbox.scss +300 -0
  35. package/theme-chalk/src/col.scss +56 -0
  36. package/theme-chalk/src/collapse-item.scss +72 -0
  37. package/theme-chalk/src/collapse-transition.scss +1 -0
  38. package/theme-chalk/src/collapse.scss +29 -0
  39. package/theme-chalk/src/color/index.scss +20 -0
  40. package/theme-chalk/src/color-picker-panel.scss +294 -0
  41. package/theme-chalk/src/color-picker.scss +165 -0
  42. package/theme-chalk/src/common/popup.scss +47 -0
  43. package/theme-chalk/src/common/transition.scss +125 -0
  44. package/theme-chalk/src/common/var.scss +1730 -0
  45. package/theme-chalk/src/config-provider.scss +0 -0
  46. package/theme-chalk/src/container.scss +14 -0
  47. package/theme-chalk/src/dark/css-vars.scss +45 -0
  48. package/theme-chalk/src/dark/var.scss +224 -0
  49. package/theme-chalk/src/date-picker/date-picker.scss +121 -0
  50. package/theme-chalk/src/date-picker/date-range-picker.scss +165 -0
  51. package/theme-chalk/src/date-picker/date-table.scss +164 -0
  52. package/theme-chalk/src/date-picker/month-table.scss +112 -0
  53. package/theme-chalk/src/date-picker/picker-panel.scss +152 -0
  54. package/theme-chalk/src/date-picker/picker.scss +217 -0
  55. package/theme-chalk/src/date-picker/time-picker.scss +90 -0
  56. package/theme-chalk/src/date-picker/time-range-picker.scss +33 -0
  57. package/theme-chalk/src/date-picker/time-spinner.scss +115 -0
  58. package/theme-chalk/src/date-picker/utils.scss +14 -0
  59. package/theme-chalk/src/date-picker/year-table.scss +108 -0
  60. package/theme-chalk/src/date-picker-panel.scss +34 -0
  61. package/theme-chalk/src/date-picker.scss +0 -0
  62. package/theme-chalk/src/descriptions-item.scss +77 -0
  63. package/theme-chalk/src/descriptions.scss +151 -0
  64. package/theme-chalk/src/dialog.scss +207 -0
  65. package/theme-chalk/src/display.scss +12 -0
  66. package/theme-chalk/src/divider.scss +48 -0
  67. package/theme-chalk/src/drawer.scss +251 -0
  68. package/theme-chalk/src/dropdown-item.scss +0 -0
  69. package/theme-chalk/src/dropdown-menu.scss +0 -0
  70. package/theme-chalk/src/dropdown.scss +208 -0
  71. package/theme-chalk/src/empty.scss +49 -0
  72. package/theme-chalk/src/footer.scss +12 -0
  73. package/theme-chalk/src/form-item.scss +246 -0
  74. package/theme-chalk/src/form.scss +28 -0
  75. package/theme-chalk/src/header.scss +12 -0
  76. package/theme-chalk/src/icon.scss +41 -0
  77. package/theme-chalk/src/image-viewer.scss +161 -0
  78. package/theme-chalk/src/image.scss +49 -0
  79. package/theme-chalk/src/index.scss +116 -0
  80. package/theme-chalk/src/infinite-scroll.scss +0 -0
  81. package/theme-chalk/src/input-number.scss +192 -0
  82. package/theme-chalk/src/input-otp.scss +191 -0
  83. package/theme-chalk/src/input-tag.scss +249 -0
  84. package/theme-chalk/src/input.scss +541 -0
  85. package/theme-chalk/src/link.scss +90 -0
  86. package/theme-chalk/src/loading.scss +104 -0
  87. package/theme-chalk/src/main.scss +14 -0
  88. package/theme-chalk/src/mention.scss +88 -0
  89. package/theme-chalk/src/menu-item-group.scss +0 -0
  90. package/theme-chalk/src/menu-item.scss +0 -0
  91. package/theme-chalk/src/menu.scss +376 -0
  92. package/theme-chalk/src/message-box.scss +220 -0
  93. package/theme-chalk/src/message.scss +123 -0
  94. package/theme-chalk/src/mixins/_button.scss +240 -0
  95. package/theme-chalk/src/mixins/_col.scss +41 -0
  96. package/theme-chalk/src/mixins/_var.scss +67 -0
  97. package/theme-chalk/src/mixins/config.scss +5 -0
  98. package/theme-chalk/src/mixins/function.scss +99 -0
  99. package/theme-chalk/src/mixins/mixins.scss +257 -0
  100. package/theme-chalk/src/mixins/utils.scss +39 -0
  101. package/theme-chalk/src/notification.scss +109 -0
  102. package/theme-chalk/src/option-group.scss +33 -0
  103. package/theme-chalk/src/option.scss +71 -0
  104. package/theme-chalk/src/overlay.scss +17 -0
  105. package/theme-chalk/src/page-header.scss +60 -0
  106. package/theme-chalk/src/pagination.scss +235 -0
  107. package/theme-chalk/src/popconfirm.scss +17 -0
  108. package/theme-chalk/src/popover.scss +61 -0
  109. package/theme-chalk/src/popper.scss +117 -0
  110. package/theme-chalk/src/progress.scss +179 -0
  111. package/theme-chalk/src/radio-button.scss +165 -0
  112. package/theme-chalk/src/radio-group.scss +9 -0
  113. package/theme-chalk/src/radio.scss +220 -0
  114. package/theme-chalk/src/rate.scss +121 -0
  115. package/theme-chalk/src/reset.scss +99 -0
  116. package/theme-chalk/src/result.scss +57 -0
  117. package/theme-chalk/src/row.scss +34 -0
  118. package/theme-chalk/src/scrollbar.scss +97 -0
  119. package/theme-chalk/src/segmented.scss +186 -0
  120. package/theme-chalk/src/select-dropdown-v2.scss +1 -0
  121. package/theme-chalk/src/select-dropdown.scss +57 -0
  122. package/theme-chalk/src/select-v2.scss +4 -0
  123. package/theme-chalk/src/select.scss +269 -0
  124. package/theme-chalk/src/skeleton-item.scss +83 -0
  125. package/theme-chalk/src/skeleton.scss +44 -0
  126. package/theme-chalk/src/slider.scss +212 -0
  127. package/theme-chalk/src/space.scss +20 -0
  128. package/theme-chalk/src/spinner.scss +43 -0
  129. package/theme-chalk/src/splitter-panel.scss +8 -0
  130. package/theme-chalk/src/splitter.scss +148 -0
  131. package/theme-chalk/src/statistic.scss +35 -0
  132. package/theme-chalk/src/step.scss +320 -0
  133. package/theme-chalk/src/steps.scss +22 -0
  134. package/theme-chalk/src/sub-menu.scss +0 -0
  135. package/theme-chalk/src/switch.scss +294 -0
  136. package/theme-chalk/src/tab-pane.scss +0 -0
  137. package/theme-chalk/src/table-column.scss +100 -0
  138. package/theme-chalk/src/table-v2.scss +239 -0
  139. package/theme-chalk/src/table.scss +698 -0
  140. package/theme-chalk/src/tabs.scss +699 -0
  141. package/theme-chalk/src/tag.scss +195 -0
  142. package/theme-chalk/src/text.scss +51 -0
  143. package/theme-chalk/src/time-picker.scss +5 -0
  144. package/theme-chalk/src/time-select.scss +37 -0
  145. package/theme-chalk/src/timeline-item.scss +135 -0
  146. package/theme-chalk/src/timeline.scss +101 -0
  147. package/theme-chalk/src/tooltip.scss +0 -0
  148. package/theme-chalk/src/tour.scss +187 -0
  149. package/theme-chalk/src/transfer.scss +201 -0
  150. package/theme-chalk/src/tree-select.scss +41 -0
  151. package/theme-chalk/src/tree.scss +134 -0
  152. package/theme-chalk/src/upload.scss +660 -0
  153. package/theme-chalk/src/var.scss +87 -0
  154. package/theme-chalk/src/virtual-list.scss +40 -0
@@ -0,0 +1,207 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+ @use 'common/popup' as *;
7
+
8
+ @include b(dialog) {
9
+ @include set-component-css-var('dialog', $dialog);
10
+
11
+ position: relative;
12
+ margin: var(#{getCssVarName('dialog-margin-top')}, 15vh) auto 50px;
13
+ background: getCssVar('dialog', 'bg-color');
14
+ border-radius: getCssVar('dialog', 'border-radius');
15
+ box-shadow: getCssVar('dialog', 'box-shadow');
16
+ box-sizing: border-box;
17
+ padding: getCssVar('dialog', 'padding-primary');
18
+ width: var(#{getCssVarName('dialog-width')}, 50%);
19
+ overflow-wrap: break-word;
20
+
21
+ &:focus {
22
+ outline: none !important;
23
+ }
24
+
25
+ @include when(align-center) {
26
+ margin: auto;
27
+ }
28
+
29
+ @include when(fullscreen) {
30
+ @include set-css-var-value('dialog-width', 100%);
31
+ @include set-css-var-value('dialog-margin-top', 0);
32
+
33
+ margin-bottom: 0;
34
+ height: 100%;
35
+ overflow: auto;
36
+ border-radius: 0px;
37
+ }
38
+
39
+ @include e(wrapper) {
40
+ position: fixed;
41
+ top: 0;
42
+ right: 0;
43
+ bottom: 0;
44
+ left: 0;
45
+ overflow: auto;
46
+ margin: 0;
47
+ }
48
+
49
+ @include when(draggable) {
50
+ @include e(header) {
51
+ cursor: move;
52
+ user-select: none;
53
+ }
54
+ }
55
+
56
+ @include e(header) {
57
+ padding-bottom: getCssVar('dialog', 'padding-primary');
58
+
59
+ &.show-close {
60
+ padding-right: calc(
61
+ getCssVar('dialog', 'padding-primary') +
62
+ var(
63
+ #{getCssVarName('message-close-size')},
64
+ map.get($message, 'close-size')
65
+ )
66
+ );
67
+ }
68
+ }
69
+
70
+ @include e(headerbtn) {
71
+ position: absolute;
72
+ top: 0;
73
+ right: 0;
74
+ padding: 0;
75
+ width: 48px;
76
+ height: 48px;
77
+ background: transparent;
78
+ border: none;
79
+ outline: none;
80
+ cursor: pointer;
81
+ font-size: var(
82
+ #{getCssVarName('message-close-size')},
83
+ map.get($message, 'close-size')
84
+ );
85
+
86
+ .#{$namespace}-dialog__close {
87
+ color: getCssVar('color', 'info');
88
+ font-size: inherit;
89
+ }
90
+
91
+ &:focus,
92
+ &:hover {
93
+ .#{$namespace}-dialog__close {
94
+ color: getCssVar('color', 'primary');
95
+ }
96
+ }
97
+ }
98
+
99
+ @include e(title) {
100
+ line-height: getCssVar('dialog-font-line-height');
101
+ font-size: getCssVar('dialog-title-font-size');
102
+ color: getCssVar('text-color', 'primary');
103
+ }
104
+
105
+ @include e(body) {
106
+ color: getCssVar('text-color', 'regular');
107
+ font-size: getCssVar('dialog-content-font-size');
108
+ }
109
+
110
+ @include e(footer) {
111
+ padding-top: getCssVar('dialog', 'padding-primary');
112
+ text-align: right;
113
+ box-sizing: border-box;
114
+ }
115
+
116
+ // 内容居中布局
117
+ @include m(center) {
118
+ text-align: center;
119
+
120
+ @include e(body) {
121
+ text-align: initial;
122
+ }
123
+
124
+ @include e(footer) {
125
+ text-align: inherit;
126
+ }
127
+ }
128
+ }
129
+
130
+ .#{$namespace}-modal-dialog {
131
+ &.is-penetrable {
132
+ pointer-events: none;
133
+
134
+ .#{$namespace}-dialog {
135
+ pointer-events: auto;
136
+ }
137
+ }
138
+ }
139
+
140
+ .#{$namespace}-overlay-dialog {
141
+ position: fixed;
142
+ top: 0;
143
+ right: 0;
144
+ bottom: 0;
145
+ left: 0;
146
+ overflow: auto;
147
+
148
+ @include when(closing) {
149
+ @include b(dialog) {
150
+ pointer-events: none;
151
+ }
152
+ }
153
+ }
154
+
155
+ .dialog-fade-enter-active {
156
+ animation: modal-fade-in getCssVar('transition-duration');
157
+ .#{$namespace}-overlay-dialog {
158
+ animation: dialog-fade-in getCssVar('transition-duration');
159
+ }
160
+ }
161
+
162
+ .dialog-fade-leave-active {
163
+ animation: modal-fade-out getCssVar('transition-duration');
164
+ .#{$namespace}-overlay-dialog {
165
+ animation: dialog-fade-out getCssVar('transition-duration');
166
+ }
167
+ }
168
+
169
+ @keyframes dialog-fade-in {
170
+ 0% {
171
+ transform: translate3d(0, -20px, 0);
172
+ opacity: 0;
173
+ }
174
+ 100% {
175
+ transform: translate3d(0, 0, 0);
176
+ opacity: 1;
177
+ }
178
+ }
179
+
180
+ @keyframes dialog-fade-out {
181
+ 0% {
182
+ transform: translate3d(0, 0, 0);
183
+ opacity: 1;
184
+ }
185
+ 100% {
186
+ transform: translate3d(0, -20px, 0);
187
+ opacity: 0;
188
+ }
189
+ }
190
+
191
+ @keyframes modal-fade-in {
192
+ 0% {
193
+ opacity: 0;
194
+ }
195
+ 100% {
196
+ opacity: 1;
197
+ }
198
+ }
199
+
200
+ @keyframes modal-fade-out {
201
+ 0% {
202
+ opacity: 1;
203
+ }
204
+ 100% {
205
+ opacity: 0;
206
+ }
207
+ }
@@ -0,0 +1,12 @@
1
+ @use 'common/var' as *;
2
+ @use 'mixins/mixins' as *;
3
+
4
+ .hidden {
5
+ @each $break-point-name, $value in $breakpoints-spec {
6
+ &-#{$break-point-name} {
7
+ @include res($break-point-name, $breakpoints-spec) {
8
+ display: none !important;
9
+ }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,48 @@
1
+ @use 'common/var' as *;
2
+ @use 'mixins/mixins' as *;
3
+
4
+ @include b(divider) {
5
+ position: relative;
6
+
7
+ @include m(horizontal) {
8
+ display: block;
9
+ height: 1px;
10
+ width: 100%;
11
+ margin: 24px 0;
12
+ border-top: 1px getCssVar('border-color') getCssVar('border-style');
13
+ }
14
+
15
+ @include m(vertical) {
16
+ display: inline-block;
17
+ width: 1px;
18
+ height: 1em;
19
+ margin: 0 8px;
20
+ vertical-align: middle;
21
+ position: relative;
22
+ border-left: 1px getCssVar('border-color') getCssVar('border-style');
23
+ }
24
+
25
+ @include e(text) {
26
+ position: absolute;
27
+ background-color: getCssVar('bg-color');
28
+ padding: 0 20px;
29
+ font-weight: 500;
30
+ color: getCssVar('text-color', 'primary');
31
+ font-size: 14px;
32
+
33
+ @include when(left) {
34
+ left: 20px;
35
+ transform: translateY(-50%);
36
+ }
37
+
38
+ @include when(center) {
39
+ left: 50%;
40
+ transform: translateX(-50%) translateY(-50%);
41
+ }
42
+
43
+ @include when(right) {
44
+ right: 20px;
45
+ transform: translateY(-50%);
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,251 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ $directions: rtl, ltr, ttb, btt;
6
+
7
+ .#{$namespace}-overlay.is-drawer {
8
+ overflow: hidden;
9
+ }
10
+
11
+ @include b(drawer) {
12
+ @include set-component-css-var('drawer', $drawer);
13
+ }
14
+
15
+ @include b(drawer) {
16
+ position: absolute;
17
+ box-sizing: border-box;
18
+ background-color: getCssVar('drawer', 'bg-color');
19
+ display: flex;
20
+ flex-direction: column;
21
+ box-shadow: getCssVar('box-shadow', 'dark');
22
+ transition: all getCssVar('transition-duration');
23
+
24
+ @each $direction in $directions {
25
+ .#{$direction} {
26
+ transform: translate(0, 0);
27
+ }
28
+ }
29
+
30
+ &__sr-focus:focus {
31
+ outline: none !important;
32
+ }
33
+
34
+ &__header {
35
+ align-items: center;
36
+ color: getCssVar('text-color', 'primary');
37
+ display: flex;
38
+ margin-bottom: 32px;
39
+ padding: getCssVar('drawer-padding-primary');
40
+ padding-bottom: 0;
41
+ overflow: hidden;
42
+ & > :first-child {
43
+ flex: 1;
44
+ }
45
+ }
46
+
47
+ &__title {
48
+ margin: 0;
49
+ flex: 1;
50
+ line-height: inherit;
51
+ font-size: 16px;
52
+ }
53
+
54
+ @include e(footer) {
55
+ padding: getCssVar('drawer-padding-primary');
56
+ padding-top: 10px;
57
+ text-align: right;
58
+ overflow: hidden;
59
+ }
60
+
61
+ &__close-btn {
62
+ display: inline-flex;
63
+ border: none;
64
+ cursor: pointer;
65
+ font-size: getCssVar('font-size-extra-large');
66
+ color: inherit;
67
+ background-color: transparent;
68
+ outline: none;
69
+ &:focus,
70
+ &:hover {
71
+ i {
72
+ color: getCssVar('color-primary');
73
+ }
74
+ }
75
+ }
76
+
77
+ &__body {
78
+ flex: 1;
79
+ padding: getCssVar('drawer-padding-primary');
80
+ overflow: auto;
81
+ & > * {
82
+ box-sizing: border-box;
83
+ }
84
+ }
85
+
86
+ @include when(dragging) {
87
+ transition: none;
88
+ }
89
+
90
+ @include e(dragger) {
91
+ position: absolute;
92
+ background-color: transparent;
93
+ user-select: none;
94
+ transition: all 0.2s;
95
+
96
+ &::before {
97
+ content: '';
98
+ position: absolute;
99
+ background-color: transparent;
100
+ transition: all 0.2s;
101
+ }
102
+
103
+ &:hover::before {
104
+ background-color: getCssVar('color-primary');
105
+ }
106
+ }
107
+
108
+ &.ltr,
109
+ &.rtl {
110
+ height: 100%;
111
+ top: 0;
112
+ bottom: 0;
113
+
114
+ > .#{$namespace}-drawer__dragger {
115
+ height: 100%;
116
+ width: getCssVar('drawer-dragger-size');
117
+ top: 0;
118
+ bottom: 0;
119
+ cursor: ew-resize;
120
+
121
+ &::before {
122
+ top: 0;
123
+ bottom: 0;
124
+ width: 3px;
125
+ }
126
+ }
127
+ }
128
+
129
+ &.ttb,
130
+ &.btt {
131
+ width: 100%;
132
+ left: 0;
133
+ right: 0;
134
+
135
+ > .#{$namespace}-drawer__dragger {
136
+ width: 100%;
137
+ height: getCssVar('drawer-dragger-size');
138
+ left: 0;
139
+ right: 0;
140
+ cursor: ns-resize;
141
+
142
+ &::before {
143
+ left: 0;
144
+ right: 0;
145
+ height: 3px;
146
+ }
147
+ }
148
+ }
149
+
150
+ &.ltr {
151
+ left: 0;
152
+
153
+ > .#{$namespace}-drawer__dragger {
154
+ right: 0;
155
+
156
+ &::before {
157
+ right: -2px;
158
+ }
159
+ }
160
+ }
161
+
162
+ &.rtl {
163
+ right: 0;
164
+
165
+ > .#{$namespace}-drawer__dragger {
166
+ left: 0;
167
+
168
+ &::before {
169
+ left: -2px;
170
+ }
171
+ }
172
+ }
173
+
174
+ &.ttb {
175
+ top: 0;
176
+
177
+ > .#{$namespace}-drawer__dragger {
178
+ bottom: 0;
179
+
180
+ &::before {
181
+ bottom: -2px;
182
+ }
183
+ }
184
+ }
185
+
186
+ &.btt {
187
+ bottom: 0;
188
+
189
+ > .#{$namespace}-drawer__dragger {
190
+ top: 0;
191
+
192
+ &::before {
193
+ top: -2px;
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ .#{$namespace}-modal-drawer {
200
+ &.is-penetrable {
201
+ pointer-events: none;
202
+
203
+ .#{$namespace}-drawer {
204
+ pointer-events: auto;
205
+ }
206
+ }
207
+ }
208
+
209
+ .#{$namespace}-drawer-fade {
210
+ &-enter-active,
211
+ &-leave-active {
212
+ transition: all getCssVar('transition-duration');
213
+ }
214
+
215
+ &-enter-from,
216
+ &-enter-active,
217
+ &-enter-to,
218
+ &-leave-from,
219
+ &-leave-active,
220
+ &-leave-to {
221
+ overflow: hidden !important;
222
+ }
223
+
224
+ &-enter-from,
225
+ &-leave-to {
226
+ background-color: transparent !important;
227
+ }
228
+
229
+ &-enter-from,
230
+ &-leave-to {
231
+ @each $direction in $directions {
232
+ .#{$direction} {
233
+ @if $direction == ltr {
234
+ transform: translateX(-100%);
235
+ }
236
+
237
+ @if $direction == rtl {
238
+ transform: translateX(100%);
239
+ }
240
+
241
+ @if $direction == ttb {
242
+ transform: translateY(-100%);
243
+ }
244
+
245
+ @if $direction == btt {
246
+ transform: translateY(100%);
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
File without changes
File without changes
@@ -0,0 +1,208 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ $dropdown-item-line-height: () !default;
8
+ $dropdown-item-line-height: map.merge(
9
+ (
10
+ 'large': 22px,
11
+ 'default': 22px,
12
+ 'small': 20px,
13
+ ),
14
+ $dropdown-item-line-height
15
+ );
16
+
17
+ $dropdown-item-padding: () !default;
18
+ $dropdown-item-padding: map.merge(
19
+ (
20
+ 'large': 7px 20px,
21
+ 'default': 5px 16px,
22
+ 'small': 2px 12px,
23
+ ),
24
+ $dropdown-item-padding
25
+ );
26
+
27
+ $dropdown-item-divided-margin: () !default;
28
+ $dropdown-item-divided-margin: map.merge(
29
+ (
30
+ 'large': 8px 0,
31
+ 'default': 6px 0,
32
+ 'small': 4px 0,
33
+ ),
34
+ $dropdown-item-divided-margin
35
+ );
36
+
37
+ $dropdown-caret-width: () !default;
38
+ $dropdown-caret-width: map.merge($common-component-size, $dropdown-caret-width);
39
+
40
+ $dropdown-divider-width: 1px !default;
41
+
42
+ @include b(dropdown) {
43
+ @include set-component-css-var('dropdown', $dropdown);
44
+
45
+ display: inline-flex;
46
+ position: relative;
47
+ color: getCssVar('text-color', 'regular');
48
+ font-size: getCssVar('font-size', 'base');
49
+ line-height: 1;
50
+ vertical-align: top;
51
+
52
+ &.is-disabled {
53
+ color: getCssVar('text-color', 'placeholder');
54
+ cursor: not-allowed;
55
+ }
56
+
57
+ @include e(popper) {
58
+ @include set-component-css-var('dropdown', $dropdown);
59
+
60
+ // using attributes selector to override
61
+
62
+ @include picker-popper(
63
+ getCssVar('bg-color', 'overlay'),
64
+ 1px solid getCssVar('border-color-light'),
65
+ getCssVar('dropdown-menu-box-shadow')
66
+ );
67
+
68
+ .#{$namespace}-dropdown-menu {
69
+ border: none;
70
+ }
71
+
72
+ #{& + '-selfdefine'} {
73
+ outline: none;
74
+ }
75
+
76
+ @include b(scrollbar__bar) {
77
+ z-index: calc(#{getCssVar('dropdown', 'menu-index')} + 1);
78
+ }
79
+
80
+ @include b(dropdown__list) {
81
+ list-style: none;
82
+ padding: 0;
83
+ margin: 0;
84
+ box-sizing: border-box;
85
+ }
86
+ }
87
+
88
+ & .#{$namespace}-dropdown__caret-button {
89
+ padding-left: 0;
90
+ padding-right: 0;
91
+ display: inline-flex;
92
+ justify-content: center;
93
+ align-items: center;
94
+ width: map.get($dropdown-caret-width, 'default');
95
+ border-left: none;
96
+
97
+ > span {
98
+ display: inline-flex;
99
+ }
100
+
101
+ &::before {
102
+ content: '';
103
+ position: absolute;
104
+ display: block;
105
+ width: 1px;
106
+ top: -1px;
107
+ bottom: -1px;
108
+ left: 0;
109
+ background: getCssVar('overlay-color', 'lighter');
110
+ }
111
+
112
+ &.#{$namespace}-button::before {
113
+ background: getCssVar('border-color');
114
+ opacity: 0.5;
115
+ }
116
+
117
+ & .#{$namespace}-dropdown__icon {
118
+ font-size: inherit;
119
+ padding-left: 0;
120
+ }
121
+ }
122
+
123
+ .#{$namespace}-dropdown-selfdefine {
124
+ // 自定义
125
+ outline: none;
126
+ }
127
+
128
+ @each $size in (large, small) {
129
+ @include m($size) {
130
+ .#{$namespace}-dropdown__caret-button {
131
+ width: map.get($dropdown-caret-width, $size);
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+ $dropdown-menu-padding-vertical: () !default;
138
+ $dropdown-menu-padding-vertical: map.merge(
139
+ (
140
+ 'large': 8px,
141
+ 'default': 6px,
142
+ 'small': 4px,
143
+ ),
144
+ $dropdown-menu-padding-vertical
145
+ );
146
+
147
+ @include b(dropdown-menu) {
148
+ position: relative;
149
+ top: 0;
150
+ left: 0;
151
+ z-index: getCssVar('dropdown-menu-index');
152
+ padding: map.get($dropdown-menu-padding-vertical, 'default')-$border-width 0;
153
+ margin: 0;
154
+ background-color: getCssVar('bg-color', 'overlay');
155
+ border: none;
156
+ border-radius: getCssVar('border-radius-base');
157
+ box-shadow: none;
158
+ list-style: none;
159
+
160
+ @include e(item) {
161
+ display: flex;
162
+ align-items: center;
163
+ white-space: nowrap;
164
+ list-style: none;
165
+ line-height: map.get($dropdown-item-line-height, 'default');
166
+ padding: map.get($dropdown-item-padding, 'default');
167
+ margin: 0;
168
+ font-size: getCssVar('font-size', 'base');
169
+ color: getCssVar('text-color', 'regular');
170
+ cursor: pointer;
171
+ outline: none;
172
+ &:not(.is-disabled):hover,
173
+ &:not(.is-disabled):focus {
174
+ background-color: getCssVar('dropdown-menuItem-hover-fill');
175
+ color: getCssVar('dropdown-menuItem-hover-color');
176
+ }
177
+
178
+ i {
179
+ margin-right: 5px;
180
+ }
181
+
182
+ @include m(divided) {
183
+ margin: map.get($dropdown-item-divided-margin, 'default');
184
+ border-top: 1px solid getCssVar('border-color-lighter');
185
+ }
186
+
187
+ @include when(disabled) {
188
+ cursor: not-allowed;
189
+ color: getCssVar('text-color-disabled');
190
+ }
191
+ }
192
+
193
+ @each $size in (large, small) {
194
+ @include m($size) {
195
+ padding: map.get($dropdown-menu-padding-vertical, $size)-$border-width 0;
196
+
197
+ @include e(item) {
198
+ padding: map.get($dropdown-item-padding, $size);
199
+ line-height: map.get($dropdown-item-line-height, $size);
200
+ font-size: map.get($input-font-size, $size);
201
+
202
+ @include m(divided) {
203
+ margin: map.get($dropdown-item-divided-margin, $size);
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }