@qsxy/element-plus-react 1.0.2 → 1.0.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 (216) hide show
  1. package/dist/Alert/Alert.d.ts +7 -0
  2. package/dist/Alert/Alert.js +98 -0
  3. package/dist/Alert/index.d.ts +2 -0
  4. package/dist/Alert/index.js +1 -0
  5. package/dist/Alert/typings.d.ts +45 -0
  6. package/dist/Alert/typings.js +1 -0
  7. package/dist/Card/Card.js +5 -3
  8. package/dist/Cascader/useCascader.d.ts +0 -14
  9. package/dist/Cascader/useCascader.js +33 -32
  10. package/dist/Checkbox/Checkbox.js +3 -2
  11. package/dist/ConfigProvider/ConfigProvider.js +2 -24
  12. package/dist/ConfigProvider/ConfigProviderContext.js +1 -1
  13. package/dist/ConfigProvider/typings.d.ts +1 -1
  14. package/dist/Container/Main.d.ts +1 -1
  15. package/dist/Container/typings.d.ts +1 -1
  16. package/dist/Dialog/Dialog.js +5 -12
  17. package/dist/Input/Input.js +68 -43
  18. package/dist/Input/TextArea.js +1 -1
  19. package/dist/Input/typings.d.ts +42 -1
  20. package/dist/Input/utils.d.ts +1 -0
  21. package/dist/Input/utils.js +5 -1
  22. package/dist/InputNumber/InputNumber.js +351 -141
  23. package/dist/InputNumber/typings.d.ts +15 -1
  24. package/dist/Loading/Loading.js +5 -2
  25. package/dist/Menu/Menu.js +25 -1
  26. package/dist/Menu/MenuItem.js +4 -2
  27. package/dist/Menu/SubMenu.js +2 -2
  28. package/dist/Menu/SubMenuCollapseTransition.js +14 -9
  29. package/dist/Menu/typings.d.ts +2 -1
  30. package/dist/Message/Message.js +51 -23
  31. package/dist/Message/index.js +8 -10
  32. package/dist/Message/typings.d.ts +8 -5
  33. package/dist/MessageBox/MessageBox.js +52 -30
  34. package/dist/MessageBox/index.d.ts +2 -1
  35. package/dist/MessageBox/index.js +4 -2
  36. package/dist/MessageBox/typings.d.ts +3 -0
  37. package/dist/Notification/Notification.js +26 -19
  38. package/dist/Select/SelectContext.d.ts +2 -1
  39. package/dist/Select/SelectContext.js +2 -1
  40. package/dist/Select/SelectCore.js +13 -7
  41. package/dist/Select/SelectDropdown.js +23 -15
  42. package/dist/Select/index.d.ts +1 -1
  43. package/dist/Select/typings.d.ts +13 -9
  44. package/dist/Select/useSelect.d.ts +13 -10
  45. package/dist/Select/useSelect.js +34 -26
  46. package/dist/Space/Space.d.ts +4 -0
  47. package/dist/Space/Space.js +128 -0
  48. package/dist/Space/SpaceItem.d.ts +7 -0
  49. package/dist/Space/SpaceItem.js +14 -0
  50. package/dist/Space/index.d.ts +3 -0
  51. package/dist/Space/index.js +2 -0
  52. package/dist/Space/typings.d.ts +26 -0
  53. package/dist/Space/typings.js +1 -0
  54. package/dist/Space/useSpace.d.ts +7 -0
  55. package/dist/Space/useSpace.js +104 -0
  56. package/dist/Statistic/Statistic.d.ts +4 -0
  57. package/dist/Statistic/Statistic.js +92 -0
  58. package/dist/Statistic/index.d.ts +2 -0
  59. package/dist/Statistic/index.js +1 -0
  60. package/dist/Statistic/typings.d.ts +28 -0
  61. package/dist/Statistic/typings.js +1 -0
  62. package/dist/Switch/Switch.js +2 -2
  63. package/dist/Table/Table.js +3 -0
  64. package/dist/Table/typings.d.ts +2 -0
  65. package/dist/Tag/typings.d.ts +1 -1
  66. package/dist/Text/Text.d.ts +4 -0
  67. package/dist/Text/Text.js +84 -0
  68. package/dist/Text/index.d.ts +2 -0
  69. package/dist/Text/index.js +1 -0
  70. package/dist/Text/typings.d.ts +15 -0
  71. package/dist/Text/typings.js +1 -0
  72. package/dist/Tree/CollapseTransition.d.ts +7 -0
  73. package/dist/Tree/CollapseTransition.js +60 -0
  74. package/dist/Tree/Tree.d.ts +3 -140
  75. package/dist/Tree/Tree.js +350 -77
  76. package/dist/Tree/TreeContext.d.ts +9 -0
  77. package/dist/Tree/TreeContext.js +14 -0
  78. package/dist/Tree/TreeNode.d.ts +5 -3
  79. package/dist/Tree/TreeNode.js +321 -331
  80. package/dist/Tree/TreeNodeContent.d.ts +9 -0
  81. package/dist/Tree/TreeNodeContent.js +22 -0
  82. package/dist/Tree/index.d.ts +3 -8
  83. package/dist/Tree/index.js +1 -4
  84. package/dist/Tree/model/node.d.ts +62 -0
  85. package/dist/Tree/model/node.js +601 -0
  86. package/dist/Tree/model/tree-store.d.ts +52 -0
  87. package/dist/Tree/model/tree-store.js +510 -0
  88. package/dist/Tree/model/useDragNode.d.ts +30 -0
  89. package/dist/Tree/model/useDragNode.js +293 -0
  90. package/dist/Tree/model/useKeydown.d.ts +0 -0
  91. package/dist/Tree/model/useKeydown.js +104 -0
  92. package/dist/Tree/model/useNodeExpandEventBroadcast.d.ts +15 -0
  93. package/dist/Tree/model/useNodeExpandEventBroadcast.js +54 -0
  94. package/dist/Tree/model/util.d.ts +7 -0
  95. package/dist/Tree/model/util.js +24 -0
  96. package/dist/Tree/typings.d.ts +225 -114
  97. package/dist/TreeSelect/TreeSelect.d.ts +2 -10
  98. package/dist/TreeSelect/TreeSelect.js +90 -566
  99. package/dist/TreeSelect/TreeSelectOption.d.ts +6 -0
  100. package/dist/TreeSelect/TreeSelectOption.js +62 -0
  101. package/dist/TreeSelect/cacheOptions.d.ts +9 -0
  102. package/dist/TreeSelect/cacheOptions.js +22 -0
  103. package/dist/TreeSelect/index.d.ts +0 -1
  104. package/dist/TreeSelect/typings.d.ts +11 -63
  105. package/dist/TreeSelect/useSelect.d.ts +125 -0
  106. package/dist/TreeSelect/useSelect.js +104 -0
  107. package/dist/TreeSelect/useTree.d.ts +130 -0
  108. package/dist/TreeSelect/useTree.js +285 -0
  109. package/dist/TreeSelect/utils.d.ts +10 -0
  110. package/dist/TreeSelect/utils.js +38 -0
  111. package/dist/Upload/UploadContent.js +2 -0
  112. package/dist/Upload/ajax.js +3 -0
  113. package/dist/Upload/typings.d.ts +4 -0
  114. package/dist/Util/aria.js +12 -12
  115. package/dist/Util/base.d.ts +5 -0
  116. package/dist/Util/base.js +140 -1
  117. package/dist/config/Constants.d.ts +3 -0
  118. package/dist/config/Constants.js +8 -0
  119. package/dist/hooks/index.d.ts +1 -0
  120. package/dist/hooks/index.js +1 -0
  121. package/dist/hooks/popperPropsUtils.js +1 -1
  122. package/dist/hooks/treePropsUtils.d.ts +3 -3
  123. package/dist/hooks/treePropsUtils.js +2 -2
  124. package/dist/hooks/useConfigProvider.d.ts +27 -0
  125. package/dist/hooks/useConfigProvider.js +78 -0
  126. package/dist/hooks/useResizeObserver.js +6 -6
  127. package/dist/index.css +1 -1
  128. package/dist/index.d.ts +18 -11
  129. package/dist/index.js +11 -5
  130. package/package.json +1 -1
  131. package/theme-chalk/alert.scss +115 -0
  132. package/theme-chalk/aside.scss +8 -8
  133. package/theme-chalk/button-group.scss +80 -80
  134. package/theme-chalk/button.scss +304 -304
  135. package/theme-chalk/calendar/date-table.scss +164 -164
  136. package/theme-chalk/checkbox.scss +34 -0
  137. package/theme-chalk/color/index.scss +20 -20
  138. package/theme-chalk/common/transition.scss +142 -142
  139. package/theme-chalk/container.scss +14 -14
  140. package/theme-chalk/dark/css-vars.scss +39 -39
  141. package/theme-chalk/dark/var.scss +225 -225
  142. package/theme-chalk/date-picker.scss +12 -12
  143. package/theme-chalk/drawer.scss +1 -0
  144. package/theme-chalk/footer.scss +12 -12
  145. package/theme-chalk/header.scss +12 -12
  146. package/theme-chalk/index.scss +4 -0
  147. package/theme-chalk/input/input-range.scss +2 -1
  148. package/theme-chalk/input/input.scss +439 -424
  149. package/theme-chalk/input-number.bak +172 -0
  150. package/theme-chalk/input-number.scss +192 -172
  151. package/theme-chalk/link.scss +87 -87
  152. package/theme-chalk/main.scss +14 -14
  153. package/theme-chalk/menu.scss +353 -353
  154. package/theme-chalk/message.scss +104 -178
  155. package/theme-chalk/mixins/_button.scss +224 -224
  156. package/theme-chalk/mixins/_col.scss +33 -33
  157. package/theme-chalk/mixins/_var.scss +67 -67
  158. package/theme-chalk/mixins/config.scss +5 -5
  159. package/theme-chalk/mixins/function.scss +99 -99
  160. package/theme-chalk/mixins/mixins.scss +240 -240
  161. package/theme-chalk/mixins/utils.scss +39 -39
  162. package/theme-chalk/notification.bak +156 -0
  163. package/theme-chalk/notification.scss +109 -156
  164. package/theme-chalk/popper.scss +104 -104
  165. package/theme-chalk/radio-button.scss +169 -169
  166. package/theme-chalk/select/index.scss +278 -272
  167. package/theme-chalk/space.scss +20 -0
  168. package/theme-chalk/statistic.scss +35 -0
  169. package/theme-chalk/switch.scss +300 -300
  170. package/theme-chalk/tag.scss +181 -181
  171. package/theme-chalk/text.scss +48 -0
  172. package/theme-chalk/transition.scss +34 -4
  173. package/theme-chalk/tree-select.scss +41 -25
  174. package/theme-chalk/tree.scss +136 -0
  175. package/theme-chalk/var.scss +83 -83
  176. package/dist/Input/Input.1.d.ts +0 -16
  177. package/dist/Input/Input.1.js +0 -376
  178. package/dist/Tree/DirectoryTree.d.ts +0 -15
  179. package/dist/Tree/DirectoryTree.js +0 -183
  180. package/dist/Tree/DropIndicator.d.ts +0 -8
  181. package/dist/Tree/DropIndicator.js +0 -34
  182. package/dist/Tree/Indent.d.ts +0 -9
  183. package/dist/Tree/Indent.js +0 -25
  184. package/dist/Tree/MotionTreeNode.d.ts +0 -14
  185. package/dist/Tree/MotionTreeNode.js +0 -125
  186. package/dist/Tree/NodeList.d.ts +0 -50
  187. package/dist/Tree/NodeList.js +0 -301
  188. package/dist/Tree/RCTree.d.ts +0 -248
  189. package/dist/Tree/RCTree.js +0 -1216
  190. package/dist/Tree/contextTypes.d.ts +0 -69
  191. package/dist/Tree/contextTypes.js +0 -9
  192. package/dist/Tree/typings.tsx--bak +0 -245
  193. package/dist/Tree/useUnmount.d.ts +0 -5
  194. package/dist/Tree/useUnmount.js +0 -34
  195. package/dist/Tree/util.d.ts +0 -51
  196. package/dist/Tree/util.js +0 -303
  197. package/dist/Tree/utils/conductUtil.d.ts +0 -17
  198. package/dist/Tree/utils/conductUtil.js +0 -209
  199. package/dist/Tree/utils/dictUtil.d.ts +0 -13
  200. package/dist/Tree/utils/dictUtil.js +0 -75
  201. package/dist/Tree/utils/diffUtil.d.ts +0 -7
  202. package/dist/Tree/utils/diffUtil.js +0 -48
  203. package/dist/Tree/utils/dropIndicator.d.ts +0 -11
  204. package/dist/Tree/utils/dropIndicator.js +0 -36
  205. package/dist/Tree/utils/iconUtil.d.ts +0 -5
  206. package/dist/Tree/utils/iconUtil.js +0 -62
  207. package/dist/Tree/utils/keyUtil.d.ts +0 -2
  208. package/dist/Tree/utils/keyUtil.js +0 -3
  209. package/dist/Tree/utils/motion.d.ts +0 -10
  210. package/dist/Tree/utils/motion.js +0 -54
  211. package/dist/Tree/utils/pickAttrs.d.ts +0 -11
  212. package/dist/Tree/utils/pickAttrs.js +0 -51
  213. package/dist/Tree/utils/treeUtil.d.ts +0 -86
  214. package/dist/Tree/utils/treeUtil.js +0 -364
  215. package/dist/TreeSelect/Utils.d.ts +0 -3
  216. package/dist/TreeSelect/Utils.js +0 -20
@@ -1,181 +1,181 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/var' as *;
5
- @use 'common/var' as *;
6
-
7
- @include b(tag) {
8
- @include set-component-css-var('tag', $tag);
9
- }
10
-
11
- $tag-border-width: 1px;
12
-
13
- $tag-icon-span-gap: () !default;
14
- $tag-icon-span-gap: map.merge(
15
- (
16
- 'large': 8px,
17
- 'default': 6px,
18
- 'small': 4px,
19
- ),
20
- $tag-icon-span-gap
21
- );
22
-
23
- @function returnVarList($var, $type: 'primary') {
24
- $list: ('fill-color', 'blank');
25
-
26
- @if $var !=false {
27
- $list: ('color', $type, $var);
28
- }
29
-
30
- @return $list;
31
- }
32
-
33
- // false mean --el-color-white
34
- @mixin genTheme($backgroundColorWeight, $borderColorWeight, $hoverColorWeight) {
35
- @include css-var-from-global(
36
- ('tag', 'bg-color'),
37
- returnVarList($backgroundColorWeight)
38
- );
39
- @include css-var-from-global(
40
- ('tag', 'border-color'),
41
- returnVarList($borderColorWeight)
42
- );
43
- @include css-var-from-global(
44
- ('tag', 'hover-color'),
45
- returnVarList($hoverColorWeight)
46
- );
47
-
48
- @each $type in $types {
49
- &.#{bem('tag', '', $type)} {
50
- @include css-var-from-global(
51
- ('tag', 'bg-color'),
52
- returnVarList($backgroundColorWeight, $type)
53
- );
54
- @include css-var-from-global(
55
- ('tag', 'border-color'),
56
- returnVarList($borderColorWeight, $type)
57
- );
58
- @include css-var-from-global(
59
- ('tag', 'hover-color'),
60
- returnVarList($hoverColorWeight, $type)
61
- );
62
- }
63
- }
64
- }
65
-
66
- @include b(tag) {
67
- background-color: getCssVar('tag-bg-color');
68
- border-color: getCssVar('tag-border-color');
69
- color: getCssVar('tag-text-color');
70
-
71
- display: inline-flex;
72
- justify-content: center;
73
- align-items: center;
74
- vertical-align: middle;
75
- height: map.get($tag-height, 'default');
76
- padding: 0 map.get($tag-padding, 'default') - $border-width;
77
-
78
- font-size: getCssVar('tag-font-size');
79
- line-height: 1;
80
- border-width: $tag-border-width;
81
- border-style: solid;
82
- border-radius: getCssVar('tag-border-radius');
83
- box-sizing: border-box;
84
- white-space: nowrap;
85
-
86
- @include set-css-var-value('icon-size', 14px);
87
- @include genTheme('light-9', 'light-8', '');
88
-
89
- @include when(hit) {
90
- border-color: getCssVar('color', 'primary');
91
- }
92
-
93
- @include when(round) {
94
- border-radius: getCssVar('tag', 'border-radius-rounded');
95
- }
96
-
97
- .#{$namespace}-tag__close {
98
- flex-shrink: 0;
99
- color: getCssVar('tag', 'text-color');
100
-
101
- &:hover {
102
- color: getCssVar('color-white');
103
- background-color: getCssVar('tag-hover-color');
104
- }
105
- }
106
-
107
- @each $type in $types {
108
- &.#{bem('tag', '', $type)} {
109
- @include css-var-from-global(('tag', 'text-color'), ('color', $type));
110
- }
111
- }
112
-
113
- $svg-margin-size: 1px;
114
-
115
- .#{$namespace}-icon {
116
- border-radius: 50%;
117
- cursor: pointer;
118
-
119
- font-size: calc(#{getCssVar('icon-size')} - #{$svg-margin-size * 2});
120
- height: getCssVar('icon-size');
121
- width: getCssVar('icon-size');
122
- }
123
-
124
- .#{$namespace}-tag__close {
125
- margin-left: map.get($tag-icon-span-gap, 'default');
126
- }
127
-
128
- @include m(dark) {
129
- @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
130
- @include genTheme('', '', 'light-3');
131
-
132
- @each $type in $types {
133
- &.#{bem('tag', '', $type)} {
134
- @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
135
- }
136
- }
137
- }
138
-
139
- @include m(plain) {
140
- @include css-var-from-global(('tag', 'bg-color'), ('fill-color', 'blank'));
141
- @include genTheme(false, 'light-5', '');
142
- }
143
-
144
- &.is-closable {
145
- padding-right: map.get($tag-icon-span-gap, 'default') - $border-width;
146
- }
147
-
148
- @each $size in (large, small) {
149
- @include m($size) {
150
- padding: 0 map.get($tag-padding, $size) - $tag-border-width;
151
- height: map.get($tag-height, $size);
152
-
153
- @include set-css-var-value(
154
- 'icon-size',
155
- #{map.get($tag-icon-size, $size)}
156
- );
157
-
158
- .#{$namespace}-tag__close {
159
- margin-left: map.get($tag-icon-span-gap, $size);
160
- }
161
-
162
- &.is-closable {
163
- padding-right: map.get($tag-icon-span-gap, $size) - $border-width;
164
- }
165
- }
166
- }
167
-
168
- @include m(small) {
169
- .#{$namespace}-icon-close {
170
- transform: scale(0.8);
171
- }
172
- }
173
-
174
- @each $type in $types {
175
- &.#{bem('tag', '', $type)} {
176
- @include when(hit) {
177
- border-color: getCssVar('color', $type);
178
- }
179
- }
180
- }
181
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(tag) {
8
+ @include set-component-css-var('tag', $tag);
9
+ }
10
+
11
+ $tag-border-width: 1px;
12
+
13
+ $tag-icon-span-gap: () !default;
14
+ $tag-icon-span-gap: map.merge(
15
+ (
16
+ 'large': 8px,
17
+ 'default': 6px,
18
+ 'small': 4px,
19
+ ),
20
+ $tag-icon-span-gap
21
+ );
22
+
23
+ @function returnVarList($var, $type: 'primary') {
24
+ $list: ('fill-color', 'blank');
25
+
26
+ @if $var !=false {
27
+ $list: ('color', $type, $var);
28
+ }
29
+
30
+ @return $list;
31
+ }
32
+
33
+ // false mean --el-color-white
34
+ @mixin genTheme($backgroundColorWeight, $borderColorWeight, $hoverColorWeight) {
35
+ @include css-var-from-global(
36
+ ('tag', 'bg-color'),
37
+ returnVarList($backgroundColorWeight)
38
+ );
39
+ @include css-var-from-global(
40
+ ('tag', 'border-color'),
41
+ returnVarList($borderColorWeight)
42
+ );
43
+ @include css-var-from-global(
44
+ ('tag', 'hover-color'),
45
+ returnVarList($hoverColorWeight)
46
+ );
47
+
48
+ @each $type in $types {
49
+ &.#{bem('tag', '', $type)} {
50
+ @include css-var-from-global(
51
+ ('tag', 'bg-color'),
52
+ returnVarList($backgroundColorWeight, $type)
53
+ );
54
+ @include css-var-from-global(
55
+ ('tag', 'border-color'),
56
+ returnVarList($borderColorWeight, $type)
57
+ );
58
+ @include css-var-from-global(
59
+ ('tag', 'hover-color'),
60
+ returnVarList($hoverColorWeight, $type)
61
+ );
62
+ }
63
+ }
64
+ }
65
+
66
+ @include b(tag) {
67
+ background-color: getCssVar('tag-bg-color');
68
+ border-color: getCssVar('tag-border-color');
69
+ color: getCssVar('tag-text-color');
70
+
71
+ display: inline-flex;
72
+ justify-content: center;
73
+ align-items: center;
74
+ vertical-align: middle;
75
+ height: map.get($tag-height, 'default');
76
+ padding: 0 map.get($tag-padding, 'default') - $border-width;
77
+
78
+ font-size: getCssVar('tag-font-size');
79
+ line-height: 1;
80
+ border-width: $tag-border-width;
81
+ border-style: solid;
82
+ border-radius: getCssVar('tag-border-radius');
83
+ box-sizing: border-box;
84
+ white-space: nowrap;
85
+
86
+ @include set-css-var-value('icon-size', 14px);
87
+ @include genTheme('light-9', 'light-8', '');
88
+
89
+ @include when(hit) {
90
+ border-color: getCssVar('color', 'primary');
91
+ }
92
+
93
+ @include when(round) {
94
+ border-radius: getCssVar('tag', 'border-radius-rounded');
95
+ }
96
+
97
+ .#{$namespace}-tag__close {
98
+ flex-shrink: 0;
99
+ color: getCssVar('tag', 'text-color');
100
+
101
+ &:hover {
102
+ color: getCssVar('color-white');
103
+ background-color: getCssVar('tag-hover-color');
104
+ }
105
+ }
106
+
107
+ @each $type in $types {
108
+ &.#{bem('tag', '', $type)} {
109
+ @include css-var-from-global(('tag', 'text-color'), ('color', $type));
110
+ }
111
+ }
112
+
113
+ $svg-margin-size: 1px;
114
+
115
+ .#{$namespace}-icon {
116
+ border-radius: 50%;
117
+ cursor: pointer;
118
+
119
+ font-size: calc(#{getCssVar('icon-size')} - #{$svg-margin-size * 2});
120
+ height: getCssVar('icon-size');
121
+ width: getCssVar('icon-size');
122
+ }
123
+
124
+ .#{$namespace}-tag__close {
125
+ margin-left: map.get($tag-icon-span-gap, 'default');
126
+ }
127
+
128
+ @include m(dark) {
129
+ @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
130
+ @include genTheme('', '', 'light-3');
131
+
132
+ @each $type in $types {
133
+ &.#{bem('tag', '', $type)} {
134
+ @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
135
+ }
136
+ }
137
+ }
138
+
139
+ @include m(plain) {
140
+ @include css-var-from-global(('tag', 'bg-color'), ('fill-color', 'blank'));
141
+ @include genTheme(false, 'light-5', '');
142
+ }
143
+
144
+ &.is-closable {
145
+ padding-right: map.get($tag-icon-span-gap, 'default') - $border-width;
146
+ }
147
+
148
+ @each $size in (large, small) {
149
+ @include m($size) {
150
+ padding: 0 map.get($tag-padding, $size) - $tag-border-width;
151
+ height: map.get($tag-height, $size);
152
+
153
+ @include set-css-var-value(
154
+ 'icon-size',
155
+ #{map.get($tag-icon-size, $size)}
156
+ );
157
+
158
+ .#{$namespace}-tag__close {
159
+ margin-left: map.get($tag-icon-span-gap, $size);
160
+ }
161
+
162
+ &.is-closable {
163
+ padding-right: map.get($tag-icon-span-gap, $size) - $border-width;
164
+ }
165
+ }
166
+ }
167
+
168
+ @include m(small) {
169
+ .#{$namespace}-icon-close {
170
+ transform: scale(0.8);
171
+ }
172
+ }
173
+
174
+ @each $type in $types {
175
+ &.#{bem('tag', '', $type)} {
176
+ @include when(hit) {
177
+ border-color: getCssVar('color', $type);
178
+ }
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,48 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(text) {
8
+ @include set-component-css-var('text', $text);
9
+ }
10
+
11
+ @include b(text) {
12
+ align-self: center;
13
+ margin: 0;
14
+ padding: 0;
15
+ font-size: getCssVar('text', 'font-size');
16
+ color: getCssVar('text', 'color');
17
+ overflow-wrap: break-word;
18
+
19
+ @include when(truncated) {
20
+ display: inline-block;
21
+ max-width: 100%;
22
+ text-overflow: ellipsis;
23
+ white-space: nowrap;
24
+ overflow: hidden;
25
+ }
26
+
27
+ @include when(line-clamp) {
28
+ display: -webkit-inline-box;
29
+ -webkit-box-orient: vertical;
30
+ overflow: hidden;
31
+ }
32
+
33
+ @each $size in (large, default, small) {
34
+ @include m($size) {
35
+ @include set-css-var-value(('text', 'font-size'), map.get($text-font-size, $size));
36
+ }
37
+ }
38
+
39
+ @each $type in $types {
40
+ &.#{bem('text', '', $type)} {
41
+ @include css-var-from-global(('text', 'color'), ('color', $type));
42
+ }
43
+ }
44
+
45
+ & > .#{bem('icon')} {
46
+ vertical-align: -2px;
47
+ }
48
+ }
@@ -376,20 +376,20 @@
376
376
  }
377
377
 
378
378
  .#{$namespace}-anim-bounce-out {
379
- // animation-name: rBounceOut;
379
+ animation-name: rBounceOut;
380
380
  animation-duration: 0.3s;
381
381
  animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
382
- // animation-fill-mode: forwards;
382
+ animation-fill-mode: forwards;
383
383
 
384
384
  @keyframes rBounceOut {
385
385
  from {
386
386
  opacity: 1;
387
- transform: scale(1);
387
+ // transform: scale(1);
388
388
  }
389
389
 
390
390
  to {
391
391
  opacity: 0;
392
- transform: scale(0.8);
392
+ // transform: scale(0.8);
393
393
  }
394
394
  }
395
395
  }
@@ -658,6 +658,10 @@
658
658
  transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
659
659
  }
660
660
 
661
+ .el-collapse-transition {
662
+ transition: 0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out;
663
+ }
664
+
661
665
  .#{$namespace}-menu-collapse-enter-active,
662
666
  .#{$namespace}-menu-collapse-leave-active {
663
667
  animation-duration: 0.3s;
@@ -754,3 +758,29 @@
754
758
  opacity: 0;
755
759
  transform: scale(0.45, 0.45);
756
760
  }
761
+
762
+ .dialog-fade-enter-active {
763
+ animation: modal-fade-in var(--el-transition-duration);
764
+ }
765
+
766
+ @keyframes modal-fade-in {
767
+ 0% {
768
+ opacity: 0;
769
+ }
770
+ 100% {
771
+ opacity: 1;
772
+ }
773
+ }
774
+
775
+ .dialog-fade-leave-active {
776
+ animation: modal-fade-out var(--el-transition-duration);
777
+ }
778
+
779
+ @keyframes modal-fade-out {
780
+ 0% {
781
+ opacity: 1;
782
+ }
783
+ 100% {
784
+ opacity: 0;
785
+ }
786
+ }
@@ -1,25 +1,41 @@
1
- @use './mixins/config' as *;
2
-
3
- .#{$namespace}-select-dropdown__list {
4
- .#{$namespace}-tree.#{$namespace}-tree-directory {
5
- .#{$namespace}-tree-treenode-selected:hover {
6
- background: var(--#{$namespace}-tree-node-hover-bg-color) !important;
7
- }
8
-
9
- .#{$namespace}-tree-treenode-selected::before {
10
- background: transparent !important;
11
- }
12
-
13
- .#{$namespace}-tree-treenode .#{$namespace}-tree-node-content-wrapper.#{$namespace}-tree-node-selected {
14
- color: var(--#{$namespace}-color-primary) !important;
15
- font-weight: 700;
16
- }
17
-
18
- .#{$namespace}-tree-treenode.#{$namespace}-tree-treenode-checkbox-checked {
19
- .#{$namespace}-tree-node-content-wrapper {
20
- color: var(--#{$namespace}-color-primary) !important;
21
- font-weight: 700;
22
- }
23
- }
24
- }
25
- }
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(tree-select) {
6
+ @include set-component-css-var('tree', $tree);
7
+ }
8
+
9
+ @include b(tree-select) {
10
+ @include e(popper) {
11
+ // padding-left same with select option
12
+ .#{$namespace}-tree-node__expand-icon {
13
+ margin-left: 8px;
14
+ }
15
+
16
+ // remove icon when show checkbox
17
+ .#{$namespace}-tree-node.is-checked
18
+ > .#{$namespace}-tree-node__content
19
+ .#{$namespace}-select-dropdown__item.selected::after {
20
+ content: none;
21
+ }
22
+
23
+ .#{$namespace}-select-dropdown__list
24
+ > .#{$namespace}-select-dropdown__item {
25
+ padding-left: 32px;
26
+ }
27
+
28
+ .#{$namespace}-select-dropdown__item {
29
+ flex: 1;
30
+ background: transparent !important;
31
+
32
+ // padding-left move to `el-tree-node__expand-icon`
33
+ padding-left: 0;
34
+
35
+ // fix: select height > tree node height
36
+ // https://github.com/yujinpan/el-select-tree/pull/33
37
+ height: 20px;
38
+ line-height: 20px;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,136 @@
1
+ @use './mixins/mixins' as *;
2
+ @use './mixins/var' as *;
3
+ @use './common/var' as *;
4
+ @use './common/transition';
5
+
6
+ @include b(tree) {
7
+ @include set-component-css-var('tree', $tree);
8
+ }
9
+
10
+ @include b(tree) {
11
+ position: relative;
12
+ cursor: default;
13
+ background: getCssVar('fill-color', 'blank');
14
+ color: getCssVar('tree-text-color');
15
+ font-size: getCssVar('font-size', 'base');
16
+
17
+ @include e(empty-block) {
18
+ position: relative;
19
+ min-height: 60px;
20
+ text-align: center;
21
+ width: 100%;
22
+ height: 100%;
23
+ }
24
+
25
+ @include e(empty-text) {
26
+ position: absolute;
27
+ left: 50%;
28
+ top: 50%;
29
+ transform: translate(-50%, -50%);
30
+ color: getCssVar('text-color', 'secondary');
31
+ font-size: getCssVar('font-size', 'base');
32
+ }
33
+
34
+ @include e(drop-indicator) {
35
+ position: absolute;
36
+ left: 0;
37
+ right: 0;
38
+ height: 1px;
39
+ background-color: getCssVar('color-primary');
40
+ }
41
+ }
42
+
43
+ @include b(tree-node) {
44
+ white-space: nowrap;
45
+ outline: none;
46
+ &:focus {
47
+ /* focus */
48
+ > .#{$namespace}-tree-node__content {
49
+ background-color: getCssVar('tree-node-hover-bg-color');
50
+ }
51
+ }
52
+
53
+ @include when(drop-inner) {
54
+ > .#{$namespace}-tree-node__content .#{$namespace}-tree-node__label {
55
+ background-color: getCssVar('color-primary');
56
+ color: #fff;
57
+ }
58
+ }
59
+
60
+ @include when(hidden) {
61
+ display: none;
62
+ }
63
+
64
+ @include e(content) {
65
+ @include css-var-from-global('checkbox-height', 'tree-node-content-height');
66
+
67
+ display: flex;
68
+ align-items: center;
69
+ height: getCssVar('tree-node-content-height');
70
+ cursor: pointer;
71
+
72
+ & > .#{$namespace}-tree-node__expand-icon {
73
+ padding: 6px;
74
+ box-sizing: content-box;
75
+ }
76
+ & > label.#{$namespace}-checkbox {
77
+ margin-right: 8px;
78
+ }
79
+ &:hover {
80
+ background-color: getCssVar('tree-node-hover-bg-color');
81
+ }
82
+
83
+ .#{$namespace}-tree.is-dragging & {
84
+ cursor: move;
85
+
86
+ & * {
87
+ pointer-events: none;
88
+ }
89
+ }
90
+
91
+ .#{$namespace}-tree.is-dragging.is-drop-not-allow & {
92
+ cursor: not-allowed;
93
+ }
94
+ }
95
+
96
+ @include e(expand-icon) {
97
+ cursor: pointer;
98
+ color: getCssVar('tree-expand-icon-color');
99
+ font-size: 12px;
100
+
101
+ transform: rotate(0deg);
102
+ transition: transform getCssVar('transition-duration') ease-in-out;
103
+
104
+ &.expanded {
105
+ transform: rotate(90deg);
106
+ }
107
+
108
+ &.is-leaf {
109
+ color: transparent;
110
+ cursor: default;
111
+ visibility: hidden;
112
+ }
113
+ &.is-hidden {
114
+ visibility: hidden;
115
+ }
116
+ }
117
+
118
+ @include e(loading-icon) {
119
+ margin-right: 8px;
120
+ font-size: getCssVar('font-size', 'base');
121
+ color: getCssVar('tree-expand-icon-color');
122
+ }
123
+
124
+ & > .#{$namespace}-tree-node__children {
125
+ overflow: hidden;
126
+ background-color: transparent;
127
+ }
128
+
129
+ &.is-expanded > .#{$namespace}-tree-node__children {
130
+ display: block;
131
+ }
132
+ }
133
+
134
+ .#{$namespace}-tree--highlight-current .#{$namespace}-tree-node.is-current > .#{$namespace}-tree-node__content {
135
+ background-color: getCssVar('color-primary-light-9');
136
+ }