@qsxy/element-plus-react 1.0.0-next.3 → 1.0.0-next.5

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 (50) hide show
  1. package/README.md +5 -7
  2. package/dist/Badge/Badge.js +1 -1
  3. package/dist/Carousel/Carousel.d.ts +4 -0
  4. package/dist/Carousel/Carousel.js +168 -0
  5. package/dist/Carousel/CarouselContext.d.ts +4 -0
  6. package/dist/Carousel/CarouselContext.js +52 -0
  7. package/dist/Carousel/CarouselItem.d.ts +4 -0
  8. package/dist/Carousel/CarouselItem.js +75 -0
  9. package/dist/Carousel/hooks/useCarousel.d.ts +37 -0
  10. package/dist/Carousel/hooks/useCarousel.js +348 -0
  11. package/dist/Carousel/hooks/useCarouselItem.d.ts +8 -0
  12. package/dist/Carousel/hooks/useCarouselItem.js +161 -0
  13. package/dist/Carousel/index.d.ts +3 -0
  14. package/dist/Carousel/index.js +42 -0
  15. package/dist/Carousel/typings.d.ts +83 -0
  16. package/dist/Carousel/typings.js +17 -0
  17. package/dist/Collapse/CollapseItem.js +1 -1
  18. package/dist/DatePicker/DatePicker.js +1 -1
  19. package/dist/DateTimePicker/DateTimePicker.js +3 -3
  20. package/dist/Dialog/Dialog.js +2 -2
  21. package/dist/Dialog/typings.d.ts +2 -2
  22. package/dist/Drawer/Drawer.js +18 -9
  23. package/dist/Dropdown/Dropdown.js +1 -1
  24. package/dist/Dropdown/typings.d.ts +1 -1
  25. package/dist/Form/utils/classUtil.js +2 -2
  26. package/dist/Input/Input.js +2 -1
  27. package/dist/Input/InputRange.js +3 -3
  28. package/dist/MessageBox/MessageBox.js +1 -1
  29. package/dist/Popconfirm/Popconfirm.js +1 -1
  30. package/dist/Popconfirm/typings.d.ts +2 -1
  31. package/dist/Popover/Popover.js +1 -1
  32. package/dist/Popover/typings.d.ts +1 -1
  33. package/dist/Popper/Popper.js +7 -7
  34. package/dist/Progress/Progress.js +1 -1
  35. package/dist/Table/hooks/useSelection.d.ts +0 -7
  36. package/dist/Table/util.js +2 -2
  37. package/dist/Tabs/Tabs.js +1 -1
  38. package/dist/TimePicker/TimePicker.js +2 -1
  39. package/dist/TimePicker/TimeSpinnerPanel.js +2 -1
  40. package/dist/hooks/prefix.d.ts +1 -1
  41. package/dist/hooks/prefix.js +4 -4
  42. package/dist/hooks/useClassNames.js +1 -1
  43. package/dist/index.css +222 -0
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.js +5 -0
  46. package/dist/theme-chalk/carousel/index.scss +237 -0
  47. package/dist/theme-chalk/dev.scss +2 -0
  48. package/dist/theme-chalk/index.scss +1 -1
  49. package/package.json +1 -1
  50. package/dist/theme-chalk/build.scss +0 -64
package/dist/index.d.ts CHANGED
@@ -53,6 +53,8 @@ export { Badge as ElBadge } from './Badge';
53
53
  export type { BadgeProps } from './Badge';
54
54
  export { Card as ElCard } from './Card';
55
55
  export type { CardProps } from './Card';
56
+ export { Carousel as ElCarousel, CarouselItem as ElCarouselItem } from './Carousel';
57
+ export type { CarouselItemProps, CarouselProps, CarouselRef } from './Carousel';
56
58
  export { Collapse as ElCollapse, CollapseItem as ElCollapseItem } from './Collapse';
57
59
  export type { CollapseItemProps, CollapseProps } from './Collapse';
58
60
  export { Descriptions as ElDescriptions, DescriptionsItem as ElDescriptionsItem } from './Descriptions';
package/dist/index.js CHANGED
@@ -28,6 +28,8 @@ __export(src_exports, {
28
28
  ElBreadcrumbItem: () => import_Breadcrumb.BreadcrumbItem,
29
29
  ElButton: () => import_Button.Button,
30
30
  ElCard: () => import_Card.Card,
31
+ ElCarousel: () => import_Carousel.Carousel,
32
+ ElCarouselItem: () => import_Carousel.CarouselItem,
31
33
  ElCascader: () => import_Cascader.Cascader,
32
34
  ElCheckbox: () => import_Checkbox.Checkbox,
33
35
  ElCheckboxButton: () => import_Checkbox.CheckboxButton,
@@ -125,6 +127,7 @@ var import_Form = require("./Form");
125
127
  var import_Upload = require("./Upload");
126
128
  var import_Badge = require("./Badge");
127
129
  var import_Card = require("./Card");
130
+ var import_Carousel = require("./Carousel");
128
131
  var import_Collapse = require("./Collapse");
129
132
  var import_Descriptions = require("./Descriptions");
130
133
  var import_Pagination = require("./Pagination");
@@ -163,6 +166,8 @@ var import_ConfigProvider = require("./ConfigProvider");
163
166
  ElBreadcrumbItem,
164
167
  ElButton,
165
168
  ElCard,
169
+ ElCarousel,
170
+ ElCarouselItem,
166
171
  ElCascader,
167
172
  ElCheckbox,
168
173
  ElCheckboxButton,
@@ -0,0 +1,237 @@
1
+ @use '../common/var';
2
+
3
+ .#{$namespace}-carousel__item {
4
+ position: absolute;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ display: inline-block;
10
+ overflow: hidden;
11
+ z-index: calc(var(--#{$namespace}-index-normal) - 1);
12
+
13
+ &.is-active {
14
+ z-index: calc(var(--#{$namespace}-index-normal) - 1);
15
+ }
16
+
17
+ &.is-animating {
18
+ transition: transform 0.4s ease-in-out;
19
+ }
20
+ }
21
+
22
+ .#{$namespace}-carousel__item--card {
23
+ width: 50%;
24
+ transition: transform 0.4s ease-in-out;
25
+
26
+ &.is-in-stage {
27
+ cursor: pointer;
28
+ z-index: var(--#{$namespace}-index-normal);
29
+ }
30
+
31
+ &.is-in-stage:hover .#{$namespace}-carousel__mask,
32
+ &.is-in-stage.is-hover .#{$namespace}-carousel__mask {
33
+ opacity: 0.12;
34
+ }
35
+
36
+ &.is-active {
37
+ z-index: calc(var(--#{$namespace}-index-normal) + 1);
38
+ }
39
+ }
40
+
41
+ .#{$namespace}-carousel__item--card-vertical {
42
+ width: 100%;
43
+ height: 50%;
44
+ }
45
+
46
+ .#{$namespace}-carousel__mask {
47
+ position: absolute;
48
+ width: 100%;
49
+ height: 100%;
50
+ top: 0;
51
+ left: 0;
52
+ background-color: var(--#{$namespace}-color-white);
53
+ opacity: 0.24;
54
+ transition: var(--#{$namespace}-transition-duration-fast);
55
+ }
56
+
57
+ .#{$namespace}-carousel {
58
+ --#{$namespace}-carousel-arrow-font-size: 12px;
59
+ --#{$namespace}-carousel-arrow-size: 36px;
60
+ --#{$namespace}-carousel-arrow-background: rgba(31, 45, 61, 0.11);
61
+ --#{$namespace}-carousel-arrow-hover-background: rgba(31, 45, 61, 0.23);
62
+ --#{$namespace}-carousel-indicator-width: 30px;
63
+ --#{$namespace}-carousel-indicator-height: 2px;
64
+ --#{$namespace}-carousel-indicator-padding-horizontal: 4px;
65
+ --#{$namespace}-carousel-indicator-padding-vertical: 12px;
66
+ --#{$namespace}-carousel-indicator-out-color: var(--#{$namespace}-border-color-hover);
67
+ position: relative;
68
+ }
69
+
70
+ .#{$namespace}-carousel--horizontal,
71
+ .#{$namespace}-carousel--vertical {
72
+ overflow: hidden;
73
+ }
74
+
75
+ .#{$namespace}-carousel__container {
76
+ position: relative;
77
+ height: 300px;
78
+ }
79
+
80
+ .#{$namespace}-carousel__arrow {
81
+ border: none;
82
+ outline: none;
83
+ padding: 0;
84
+ margin: 0;
85
+ height: var(--#{$namespace}-carousel-arrow-size);
86
+ width: var(--#{$namespace}-carousel-arrow-size);
87
+ cursor: pointer;
88
+ transition: var(--#{$namespace}-transition-duration);
89
+ border-radius: 50%;
90
+ background-color: var(--#{$namespace}-carousel-arrow-background);
91
+ color: #fff;
92
+ position: absolute;
93
+ top: 50%;
94
+ z-index: 10;
95
+ transform: translateY(-50%);
96
+ text-align: center;
97
+ font-size: var(--#{$namespace}-carousel-arrow-font-size);
98
+ display: inline-flex;
99
+ justify-content: center;
100
+ align-items: center;
101
+
102
+ &:hover {
103
+ background-color: var(--#{$namespace}-carousel-arrow-hover-background);
104
+ }
105
+
106
+ & i {
107
+ cursor: pointer;
108
+ }
109
+ }
110
+
111
+ .#{$namespace}-carousel__arrow--left {
112
+ left: 16px;
113
+ }
114
+
115
+ .#{$namespace}-carousel__arrow--right {
116
+ right: 16px;
117
+ }
118
+
119
+ .#{$namespace}-carousel__indicators {
120
+ position: absolute;
121
+ list-style: none;
122
+ margin: 0;
123
+ padding: 0;
124
+ z-index: calc(var(--#{$namespace}-index-normal) + 1);
125
+ }
126
+
127
+ .#{$namespace}-carousel__indicators--horizontal {
128
+ bottom: 0;
129
+ left: 50%;
130
+ transform: translate(-50%);
131
+ }
132
+
133
+ .#{$namespace}-carousel__indicators--vertical {
134
+ right: 0;
135
+ top: 50%;
136
+ transform: translateY(-50%);
137
+ }
138
+
139
+ .#{$namespace}-carousel__indicators--outside {
140
+ bottom: calc(var(--#{$namespace}-carousel-indicator-height) + var(--#{$namespace}-carousel-indicator-padding-vertical) * 2);
141
+ text-align: center;
142
+ position: static;
143
+ transform: none;
144
+
145
+ .#{$namespace}-carousel__indicator:hover button {
146
+ opacity: 0.64;
147
+ }
148
+
149
+ button {
150
+ background-color: var(--#{$namespace}-carousel-indicator-out-color);
151
+ opacity: 0.24;
152
+ }
153
+ }
154
+
155
+ .#{$namespace}-carousel__indicators--right {
156
+ right: 0;
157
+ }
158
+
159
+ .#{$namespace}-carousel__indicators--labels {
160
+ left: 0;
161
+ right: 0;
162
+ transform: none;
163
+ text-align: center;
164
+
165
+ .#{$namespace}-carousel__button {
166
+ height: auto;
167
+ width: auto;
168
+ padding: 2px 18px;
169
+ font-size: 12px;
170
+ color: #000;
171
+ }
172
+
173
+ .#{$namespace}-carousel__indicator {
174
+ padding: 6px 4px;
175
+ }
176
+ }
177
+
178
+ .#{$namespace}-carousel__indicator {
179
+ background-color: transparent;
180
+ cursor: pointer;
181
+
182
+ &:hover button {
183
+ opacity: 0.72;
184
+ }
185
+ }
186
+
187
+ .#{$namespace}-carousel__indicator--horizontal {
188
+ display: inline-block;
189
+ padding: var(--#{$namespace}-carousel-indicator-padding-vertical) var(--#{$namespace}-carousel-indicator-padding-horizontal);
190
+ }
191
+
192
+ .#{$namespace}-carousel__indicator--vertical {
193
+ padding: var(--#{$namespace}-carousel-indicator-padding-horizontal) var(--#{$namespace}-carousel-indicator-padding-vertical);
194
+
195
+ .#{$namespace}-carousel__button {
196
+ width: var(--#{$namespace}-carousel-indicator-height);
197
+ height: calc(var(--#{$namespace}-carousel-indicator-width) / 2);
198
+ }
199
+ }
200
+
201
+ .#{$namespace}-carousel__indicator.is-active button {
202
+ opacity: 1;
203
+ }
204
+
205
+ .#{$namespace}-carousel__button {
206
+ display: block;
207
+ opacity: 0.48;
208
+ width: var(--#{$namespace}-carousel-indicator-width);
209
+ height: var(--#{$namespace}-carousel-indicator-height);
210
+ background-color: #fff;
211
+ border: none;
212
+ outline: none;
213
+ padding: 0;
214
+ margin: 0;
215
+ cursor: pointer;
216
+ transition: var(--#{$namespace}-transition-duration);
217
+ }
218
+
219
+ .carousel-arrow-left-enter-from,
220
+ .carousel-arrow-left-leave-active {
221
+ transform: translateY(-50%) translate(-10px);
222
+ opacity: 0;
223
+ }
224
+
225
+ .carousel-arrow-right-enter-from,
226
+ .carousel-arrow-right-leave-active {
227
+ transform: translateY(-50%) translate(10px);
228
+ opacity: 0;
229
+ }
230
+
231
+ .#{$namespace}-transitioning {
232
+ filter: url(#elCarouselHorizontal);
233
+ }
234
+
235
+ .#{$namespace}-transitioning-vertical {
236
+ filter: url(#elCarouselVertical);
237
+ }
@@ -0,0 +1,2 @@
1
+ @import './index.scss';
2
+ @import './icon/fonts';
@@ -2,7 +2,6 @@
2
2
  @import './common';
3
3
  @import './link';
4
4
  @import './button';
5
- @import './icon/fonts';
6
5
  @import './icon';
7
6
  @import './row';
8
7
  @import './col';
@@ -12,6 +11,7 @@
12
11
 
13
12
  /* Form 表单组件 */
14
13
  @import './cascader';
14
+ @import './carousel/';
15
15
  @import './checkbox';
16
16
  @import './checkbox-button';
17
17
  @import './checkbox-group';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qsxy/element-plus-react",
3
- "version": "1.0.0-next.3",
3
+ "version": "1.0.0-next.5",
4
4
  "description": "element-plus-react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,64 +0,0 @@
1
- /* Basic 基础组件 */
2
- @import './common';
3
- @import './link';
4
- @import './button';
5
- @import './icon';
6
- @import './row';
7
- @import './col';
8
- @import './scrollbar';
9
- @import './popper';
10
- @import './transition';
11
-
12
- /* Form 表单组件 */
13
- @import './cascader';
14
- @import './checkbox';
15
- @import './checkbox-button';
16
- @import './checkbox-group';
17
- @import './color-picker';
18
- @import './radio';
19
- @import './radio-group';
20
- @import './input';
21
- @import './input-number';
22
- @import './select';
23
- @import './calendar';
24
- @import './date-picker';
25
- @import './date-time-picker';
26
- @import './time-picker';
27
- @import './switch';
28
- @import './transfer';
29
- @import './form';
30
- @import './upload';
31
-
32
- /* Data 数据展示 */
33
- @import './badge';
34
- @import './card';
35
- @import './collapse';
36
- @import './descriptions';
37
- @import './pagination';
38
- @import './progress';
39
- @import './table';
40
- @import './time-line';
41
- @import './tree';
42
- @import './tree-select';
43
- @import './tag';
44
-
45
- // /* Navigation 导航 */
46
- @import './breadcrumb';
47
- @import './dropdown';
48
- @import './tabs';
49
- @import './empty';
50
- @import './placeholder';
51
-
52
- /* Feedback 反馈组件 */
53
- @import './dialog';
54
- @import './drawer';
55
- @import './loading';
56
- @import './message';
57
- @import './message-box';
58
- @import './notification';
59
- @import './tooltip';
60
- @import './popconfirm';
61
- @import './popover';
62
-
63
- /* Others 其他 */
64
- @import './divider';