@nutui/nutui-react-taro 3.0.19-cpp.26-beta.1 → 3.0.19-cpp.26-beta.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.
- package/dist/cjs/locales/base.d.ts +3 -0
- package/dist/cjs/locales/en-US.js +4 -1
- package/dist/cjs/locales/id-ID.js +4 -1
- package/dist/cjs/locales/ja-JP.js +4 -1
- package/dist/cjs/locales/tr-TR.js +4 -1
- package/dist/cjs/locales/zh-CN.js +4 -1
- package/dist/cjs/locales/zh-TW.js +4 -1
- package/dist/cjs/locales/zh-UG.js +4 -1
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +19 -7
- package/dist/cjs/packages/address/style/style.harmony.css +19 -7
- package/dist/cjs/packages/calendar/style/style.harmony.css +19 -7
- package/dist/cjs/packages/cascader/style/style.harmony.css +19 -7
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/datepicker/style/style.harmony.css +19 -7
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +19 -7
- package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +19 -7
- package/dist/cjs/packages/nutui.react.build.d.ts +3 -1
- package/dist/cjs/packages/nutui.react.build.js +18 -14
- package/dist/cjs/packages/nutui.react.d.ts +4 -1
- package/dist/cjs/packages/nutui.react.js +19 -14
- package/dist/cjs/packages/nutui.react.scss.d.ts +1 -0
- package/dist/cjs/packages/nutui.react.scss.js +1 -0
- package/dist/cjs/packages/overlay/overlay.js +11 -17
- package/dist/cjs/packages/picker/style/style.harmony.css +19 -7
- package/dist/cjs/packages/popover/style/style.harmony.css +19 -7
- package/dist/cjs/packages/popup/popup.js +171 -99
- package/dist/cjs/packages/popup/style/popup.scss +19 -8
- package/dist/cjs/packages/popup/style/style.css +19 -7
- package/dist/cjs/packages/popup/style/style.harmony.css +19 -7
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +19 -8
- package/dist/cjs/packages/popup/style-jmapp/style.css +19 -7
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +19 -8
- package/dist/cjs/packages/popup/style-jrkf/style.css +19 -7
- package/dist/cjs/packages/quickenter/index.d.ts +3 -0
- package/dist/cjs/packages/quickenter/index.js +13 -0
- package/dist/cjs/packages/quickenter/quickenter.d.ts +4 -0
- package/dist/cjs/packages/quickenter/quickenter.js +147 -0
- package/dist/cjs/packages/quickenter/style/css.js +2 -0
- package/dist/cjs/packages/quickenter/style/index.js +2 -0
- package/dist/cjs/packages/quickenter/style/quickenter.scss +112 -0
- package/dist/cjs/packages/quickenter/style/style.css +100 -0
- package/dist/cjs/packages/quickenter/style/style.harmony.css +501 -0
- package/dist/cjs/packages/quickenter/style-jmapp/css.js +2 -0
- package/dist/cjs/packages/quickenter/style-jmapp/index.js +2 -0
- package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +112 -0
- package/dist/cjs/packages/quickenter/style-jmapp/style.css +100 -0
- package/dist/cjs/packages/quickenter/style-jrkf/css.js +2 -0
- package/dist/cjs/packages/quickenter/style-jrkf/index.js +2 -0
- package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +112 -0
- package/dist/cjs/packages/quickenter/style-jrkf/style.css +100 -0
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +19 -7
- package/dist/cjs/packages/timeselect/style/style.harmony.css +19 -7
- package/dist/cjs/packages/tour/style/style.harmony.css +19 -7
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +3 -0
- package/dist/cjs/types/spec/quickenter/base.d.ts +26 -0
- package/dist/cjs/types/spec/quickenter/base.js +4 -0
- package/dist/cjs/types/spec/quickenter/h5.d.ts +5 -0
- package/dist/cjs/types/spec/quickenter/h5.js +4 -0
- package/dist/cjs/types/spec/quickenter/taro.d.ts +5 -0
- package/dist/cjs/types/spec/quickenter/taro.js +4 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition.d.ts +15 -0
- package/dist/cjs/utils/taro/ConfigurableCSSTransition.js +90 -0
- package/dist/es/locales/base.d.ts +3 -0
- package/dist/es/locales/en-US.js +4 -1
- package/dist/es/locales/id-ID.js +4 -1
- package/dist/es/locales/ja-JP.js +4 -1
- package/dist/es/locales/tr-TR.js +4 -1
- package/dist/es/locales/zh-CN.js +4 -1
- package/dist/es/locales/zh-TW.js +4 -1
- package/dist/es/locales/zh-UG.js +4 -1
- package/dist/es/packages/actionsheet/style/style.harmony.css +19 -7
- package/dist/es/packages/address/style/style.harmony.css +19 -7
- package/dist/es/packages/calendar/style/style.harmony.css +19 -7
- package/dist/es/packages/cascader/style/style.harmony.css +19 -7
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/datepicker/style/style.harmony.css +19 -7
- package/dist/es/packages/imagepreview/style/style.harmony.css +19 -7
- package/dist/es/packages/inputnumber/inputnumber.js +1 -1
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +19 -7
- package/dist/es/packages/nutui.react.build.d.ts +3 -1
- package/dist/es/packages/nutui.react.build.js +3 -1
- package/dist/es/packages/overlay/overlay.js +11 -17
- package/dist/es/packages/picker/style/style.harmony.css +19 -7
- package/dist/es/packages/popover/style/style.harmony.css +19 -7
- package/dist/es/packages/popup/popup.js +172 -101
- package/dist/es/packages/popup/style/popup.scss +19 -8
- package/dist/es/packages/popup/style/style.css +19 -7
- package/dist/es/packages/popup/style/style.harmony.css +19 -7
- package/dist/es/packages/popup/style-jmapp/popup.scss +19 -8
- package/dist/es/packages/popup/style-jmapp/style.css +19 -7
- package/dist/es/packages/popup/style-jrkf/popup.scss +19 -8
- package/dist/es/packages/popup/style-jrkf/style.css +19 -7
- package/dist/es/packages/quickenter/index.d.ts +3 -0
- package/dist/es/packages/quickenter/index.js +2 -0
- package/dist/es/packages/quickenter/quickenter.d.ts +4 -0
- package/dist/es/packages/quickenter/quickenter.js +135 -0
- package/dist/es/packages/quickenter/style/css.js +2 -0
- package/dist/es/packages/quickenter/style/index.js +2 -0
- package/dist/es/packages/quickenter/style/quickenter.scss +112 -0
- package/dist/es/packages/quickenter/style/style.css +100 -0
- package/dist/es/packages/quickenter/style/style.harmony.css +501 -0
- package/dist/es/packages/quickenter/style-jmapp/css.js +2 -0
- package/dist/es/packages/quickenter/style-jmapp/index.js +2 -0
- package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +112 -0
- package/dist/es/packages/quickenter/style-jmapp/style.css +100 -0
- package/dist/es/packages/quickenter/style-jrkf/css.js +2 -0
- package/dist/es/packages/quickenter/style-jrkf/index.js +2 -0
- package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +112 -0
- package/dist/es/packages/quickenter/style-jrkf/style.css +100 -0
- package/dist/es/packages/shortpassword/style/style.harmony.css +19 -7
- package/dist/es/packages/timeselect/style/style.harmony.css +19 -7
- package/dist/es/packages/tour/style/style.harmony.css +19 -7
- package/dist/es/types/index.d.ts +3 -0
- package/dist/es/types/index.js +3 -0
- package/dist/es/types/spec/quickenter/base.d.ts +44 -0
- package/dist/es/types/spec/quickenter/base.js +1 -0
- package/dist/es/types/spec/quickenter/h5.d.ts +5 -0
- package/dist/es/types/spec/quickenter/h5.js +1 -0
- package/dist/es/types/spec/quickenter/taro.d.ts +5 -0
- package/dist/es/types/spec/quickenter/taro.js +1 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition.d.ts +15 -0
- package/dist/es/utils/taro/ConfigurableCSSTransition.js +79 -0
- package/dist/nutui.react.umd.js +583 -296
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +36 -35
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +38 -37
- package/dist/style.css +1 -1
- package/dist/style.scss +32 -31
- package/dist/styles/variables-daojia.scss +40 -0
- package/dist/styles/variables-jmapp.scss +40 -0
- package/dist/styles/variables-jrkf.scss +40 -0
- package/dist/styles/variables.scss +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.nut-quickenter {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-height: $quickenter-max-height; // Limit height for scrolling
|
|
4
|
+
background: $quickenter-bg-color;
|
|
5
|
+
border-radius: 0 0 12px 12px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
box-shadow: $quickenter-box-shadow;
|
|
11
|
+
// backdrop-filter: $quickenter-backdrop-filter;
|
|
12
|
+
|
|
13
|
+
&-control {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
padding: 30px 16px 0;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-title {
|
|
22
|
+
flex: 1;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
text-align: left;
|
|
27
|
+
color: $quickenter-title-color;
|
|
28
|
+
font-size: $quickenter-title-font-size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-close-btn {
|
|
32
|
+
color: $quickenter-close-icon-color;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
|
|
37
|
+
svg,
|
|
38
|
+
.nut-icon {
|
|
39
|
+
width: $quickenter-close-icon-size;
|
|
40
|
+
height: $quickenter-close-icon-size;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-content {
|
|
45
|
+
flex: 1;
|
|
46
|
+
padding: 10px 28px;
|
|
47
|
+
overflow-y: hidden; // Default: no scrolling
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
|
|
50
|
+
&-scrollable {
|
|
51
|
+
overflow-y: auto; // Only scroll when > 8 items
|
|
52
|
+
-webkit-overflow-scrolling: touch;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&-list {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
align-items: flex-start;
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-item {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: flex-start;
|
|
68
|
+
width: 56px;
|
|
69
|
+
padding: 0 0 12px 0; // Reduced from 16px to ensure 2 rows fit in 256px
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
|
|
73
|
+
// Calculate gap for 4 items per row: (100% - 4 * 56px) / 3
|
|
74
|
+
margin-right: calc((100% - 224px) / 3);
|
|
75
|
+
|
|
76
|
+
&:nth-child(4n) {
|
|
77
|
+
margin-right: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&-icon {
|
|
81
|
+
width: 56px;
|
|
82
|
+
height: 56px;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
background: $quickenter-item-icon-bg-color;
|
|
88
|
+
color: $quickenter-item-icon-color;
|
|
89
|
+
margin-bottom: 8px;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
|
|
92
|
+
svg,
|
|
93
|
+
.nut-icon {
|
|
94
|
+
width: 22px;
|
|
95
|
+
height: 22px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-title {
|
|
100
|
+
font-size: $quickenter-item-title-font-size;
|
|
101
|
+
color: $quickenter-item-title-color;
|
|
102
|
+
text-align: center;
|
|
103
|
+
line-height: 1.4;
|
|
104
|
+
// Allow multi-line if text is long, preventing truncation
|
|
105
|
+
white-space: normal;
|
|
106
|
+
word-wrap: break-word;
|
|
107
|
+
width: 72px; // Allow text to be slightly wider than icon
|
|
108
|
+
margin-left: -8px; // Center 72px title over 56px icon
|
|
109
|
+
margin-right: -8px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* #ifdef harmony */
|
|
2
|
+
/* #endif */
|
|
3
|
+
/* #ifndef harmony */
|
|
4
|
+
/* #endif */
|
|
5
|
+
.nut-quickenter {
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-height: var(--nutui-quickenter-max-height, 256px);
|
|
8
|
+
background: var(--nutui-quickenter-bg-color, #f5f5f5);
|
|
9
|
+
border-radius: 0 0 12px 12px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
|
|
15
|
+
}
|
|
16
|
+
.nut-quickenter-control {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 30px 16px 0;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
.nut-quickenter-title {
|
|
24
|
+
flex: 1;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
text-align: left;
|
|
29
|
+
color: var(--nutui-quickenter-title-color, var(--nutui-color-title));
|
|
30
|
+
font-size: var(--nutui-quickenter-title-font-size, var(--nutui-font-text));
|
|
31
|
+
}
|
|
32
|
+
.nut-quickenter-close-btn {
|
|
33
|
+
color: var(--nutui-quickenter-close-icon-color, #808080);
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
}
|
|
38
|
+
.nut-quickenter-close-btn svg,
|
|
39
|
+
.nut-quickenter-close-btn .nut-icon {
|
|
40
|
+
width: var(--nutui-quickenter-close-icon-size, 12px);
|
|
41
|
+
height: var(--nutui-quickenter-close-icon-size, 12px);
|
|
42
|
+
}
|
|
43
|
+
.nut-quickenter-content {
|
|
44
|
+
flex: 1;
|
|
45
|
+
padding: 10px 28px;
|
|
46
|
+
overflow-y: hidden;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
.nut-quickenter-content-scrollable {
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
-webkit-overflow-scrolling: touch;
|
|
52
|
+
}
|
|
53
|
+
.nut-quickenter-list {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
align-items: flex-start;
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
.nut-quickenter-item {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: flex-start;
|
|
64
|
+
width: 56px;
|
|
65
|
+
padding: 0 0 12px 0;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
margin-right: calc((100% - 224px) / 3);
|
|
69
|
+
}
|
|
70
|
+
.nut-quickenter-item:nth-child(4n) {
|
|
71
|
+
margin-right: 0;
|
|
72
|
+
}
|
|
73
|
+
.nut-quickenter-item-icon {
|
|
74
|
+
width: 56px;
|
|
75
|
+
height: 56px;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
background: var(--nutui-quickenter-item-icon-bg-color, #ffffff);
|
|
81
|
+
color: var(--nutui-quickenter-item-icon-color, var(--nutui-color-title));
|
|
82
|
+
margin-bottom: 8px;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
}
|
|
85
|
+
.nut-quickenter-item-icon svg,
|
|
86
|
+
.nut-quickenter-item-icon .nut-icon {
|
|
87
|
+
width: 22px;
|
|
88
|
+
height: 22px;
|
|
89
|
+
}
|
|
90
|
+
.nut-quickenter-item-title {
|
|
91
|
+
font-size: var(--nutui-quickenter-item-title-font-size, var(--nutui-font-text-small));
|
|
92
|
+
color: var(--nutui-quickenter-item-title-color, var(--nutui-color-title));
|
|
93
|
+
text-align: center;
|
|
94
|
+
line-height: 1.4;
|
|
95
|
+
white-space: normal;
|
|
96
|
+
word-wrap: break-word;
|
|
97
|
+
width: 72px;
|
|
98
|
+
margin-left: -8px;
|
|
99
|
+
margin-right: -8px;
|
|
100
|
+
}
|
|
@@ -251,6 +251,9 @@
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
@keyframes popup-slide-top-exit {
|
|
254
|
+
from {
|
|
255
|
+
transform: translate3d(0, 0%, 0);
|
|
256
|
+
}
|
|
254
257
|
to {
|
|
255
258
|
transform: translate3d(0, -100%, 0);
|
|
256
259
|
}
|
|
@@ -275,6 +278,9 @@
|
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
@keyframes popup-slide-right-exit {
|
|
281
|
+
from {
|
|
282
|
+
transform: translate3d(0%, 0, 0);
|
|
283
|
+
}
|
|
278
284
|
to {
|
|
279
285
|
transform: translate3d(100%, 0, 0);
|
|
280
286
|
}
|
|
@@ -285,7 +291,7 @@
|
|
|
285
291
|
animation-name: popup-slide-right-enter;
|
|
286
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
287
293
|
}
|
|
288
|
-
.nut-popup-slide-right-exit {
|
|
294
|
+
.nut-popup-slide-right-exit-active {
|
|
289
295
|
animation-fill-mode: both;
|
|
290
296
|
animation-name: popup-slide-right-exit;
|
|
291
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -298,20 +304,23 @@
|
|
|
298
304
|
transform: translate3d(0, 0%, 0);
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
|
-
@keyframes slide-bottom-exit {
|
|
307
|
+
@keyframes popup-slide-bottom-exit {
|
|
308
|
+
from {
|
|
309
|
+
transform: translate3d(0, 0%, 0);
|
|
310
|
+
}
|
|
302
311
|
to {
|
|
303
312
|
transform: translate3d(0, 100%, 0);
|
|
304
313
|
}
|
|
305
314
|
}
|
|
306
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
307
|
-
transform:
|
|
316
|
+
transform: translate3d(0, 0, 0);
|
|
308
317
|
animation-fill-mode: both;
|
|
309
318
|
animation-name: popup-slide-bottom-enter;
|
|
310
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
311
320
|
}
|
|
312
|
-
.nut-popup-slide-bottom-exit {
|
|
321
|
+
.nut-popup-slide-bottom-exit-active {
|
|
313
322
|
animation-fill-mode: both;
|
|
314
|
-
animation-name: slide-bottom-exit;
|
|
323
|
+
animation-name: popup-slide-bottom-exit;
|
|
315
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
316
325
|
}
|
|
317
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -323,17 +332,20 @@
|
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
@keyframes popup-slide-left-exit {
|
|
335
|
+
from {
|
|
336
|
+
transform: translate3d(0%, 0, 0);
|
|
337
|
+
}
|
|
326
338
|
to {
|
|
327
339
|
transform: translate3d(-100%, 0, 0);
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
331
|
-
transform:
|
|
343
|
+
transform: translate3d(0, 0, 0);
|
|
332
344
|
animation-fill-mode: both;
|
|
333
345
|
animation-name: popup-slide-left-enter;
|
|
334
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
335
347
|
}
|
|
336
|
-
.nut-popup-slide-left-exit-active
|
|
348
|
+
.nut-popup-slide-left-exit-active {
|
|
337
349
|
animation-fill-mode: both;
|
|
338
350
|
animation-name: popup-slide-left-exit;
|
|
339
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -251,6 +251,9 @@
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
@keyframes popup-slide-top-exit {
|
|
254
|
+
from {
|
|
255
|
+
transform: translate3d(0, 0%, 0);
|
|
256
|
+
}
|
|
254
257
|
to {
|
|
255
258
|
transform: translate3d(0, -100%, 0);
|
|
256
259
|
}
|
|
@@ -275,6 +278,9 @@
|
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
@keyframes popup-slide-right-exit {
|
|
281
|
+
from {
|
|
282
|
+
transform: translate3d(0%, 0, 0);
|
|
283
|
+
}
|
|
278
284
|
to {
|
|
279
285
|
transform: translate3d(100%, 0, 0);
|
|
280
286
|
}
|
|
@@ -285,7 +291,7 @@
|
|
|
285
291
|
animation-name: popup-slide-right-enter;
|
|
286
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
287
293
|
}
|
|
288
|
-
.nut-popup-slide-right-exit {
|
|
294
|
+
.nut-popup-slide-right-exit-active {
|
|
289
295
|
animation-fill-mode: both;
|
|
290
296
|
animation-name: popup-slide-right-exit;
|
|
291
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -298,20 +304,23 @@
|
|
|
298
304
|
transform: translate3d(0, 0%, 0);
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
|
-
@keyframes slide-bottom-exit {
|
|
307
|
+
@keyframes popup-slide-bottom-exit {
|
|
308
|
+
from {
|
|
309
|
+
transform: translate3d(0, 0%, 0);
|
|
310
|
+
}
|
|
302
311
|
to {
|
|
303
312
|
transform: translate3d(0, 100%, 0);
|
|
304
313
|
}
|
|
305
314
|
}
|
|
306
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
307
|
-
transform:
|
|
316
|
+
transform: translate3d(0, 0, 0);
|
|
308
317
|
animation-fill-mode: both;
|
|
309
318
|
animation-name: popup-slide-bottom-enter;
|
|
310
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
311
320
|
}
|
|
312
|
-
.nut-popup-slide-bottom-exit {
|
|
321
|
+
.nut-popup-slide-bottom-exit-active {
|
|
313
322
|
animation-fill-mode: both;
|
|
314
|
-
animation-name: slide-bottom-exit;
|
|
323
|
+
animation-name: popup-slide-bottom-exit;
|
|
315
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
316
325
|
}
|
|
317
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -323,17 +332,20 @@
|
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
@keyframes popup-slide-left-exit {
|
|
335
|
+
from {
|
|
336
|
+
transform: translate3d(0%, 0, 0);
|
|
337
|
+
}
|
|
326
338
|
to {
|
|
327
339
|
transform: translate3d(-100%, 0, 0);
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
331
|
-
transform:
|
|
343
|
+
transform: translate3d(0, 0, 0);
|
|
332
344
|
animation-fill-mode: both;
|
|
333
345
|
animation-name: popup-slide-left-enter;
|
|
334
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
335
347
|
}
|
|
336
|
-
.nut-popup-slide-left-exit-active
|
|
348
|
+
.nut-popup-slide-left-exit-active {
|
|
337
349
|
animation-fill-mode: both;
|
|
338
350
|
animation-name: popup-slide-left-exit;
|
|
339
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -251,6 +251,9 @@
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
@keyframes popup-slide-top-exit {
|
|
254
|
+
from {
|
|
255
|
+
transform: translate3d(0, 0%, 0);
|
|
256
|
+
}
|
|
254
257
|
to {
|
|
255
258
|
transform: translate3d(0, -100%, 0);
|
|
256
259
|
}
|
|
@@ -275,6 +278,9 @@
|
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
@keyframes popup-slide-right-exit {
|
|
281
|
+
from {
|
|
282
|
+
transform: translate3d(0%, 0, 0);
|
|
283
|
+
}
|
|
278
284
|
to {
|
|
279
285
|
transform: translate3d(100%, 0, 0);
|
|
280
286
|
}
|
|
@@ -285,7 +291,7 @@
|
|
|
285
291
|
animation-name: popup-slide-right-enter;
|
|
286
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
287
293
|
}
|
|
288
|
-
.nut-popup-slide-right-exit {
|
|
294
|
+
.nut-popup-slide-right-exit-active {
|
|
289
295
|
animation-fill-mode: both;
|
|
290
296
|
animation-name: popup-slide-right-exit;
|
|
291
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -298,20 +304,23 @@
|
|
|
298
304
|
transform: translate3d(0, 0%, 0);
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
|
-
@keyframes slide-bottom-exit {
|
|
307
|
+
@keyframes popup-slide-bottom-exit {
|
|
308
|
+
from {
|
|
309
|
+
transform: translate3d(0, 0%, 0);
|
|
310
|
+
}
|
|
302
311
|
to {
|
|
303
312
|
transform: translate3d(0, 100%, 0);
|
|
304
313
|
}
|
|
305
314
|
}
|
|
306
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
307
|
-
transform:
|
|
316
|
+
transform: translate3d(0, 0, 0);
|
|
308
317
|
animation-fill-mode: both;
|
|
309
318
|
animation-name: popup-slide-bottom-enter;
|
|
310
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
311
320
|
}
|
|
312
|
-
.nut-popup-slide-bottom-exit {
|
|
321
|
+
.nut-popup-slide-bottom-exit-active {
|
|
313
322
|
animation-fill-mode: both;
|
|
314
|
-
animation-name: slide-bottom-exit;
|
|
323
|
+
animation-name: popup-slide-bottom-exit;
|
|
315
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
316
325
|
}
|
|
317
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -323,17 +332,20 @@
|
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
@keyframes popup-slide-left-exit {
|
|
335
|
+
from {
|
|
336
|
+
transform: translate3d(0%, 0, 0);
|
|
337
|
+
}
|
|
326
338
|
to {
|
|
327
339
|
transform: translate3d(-100%, 0, 0);
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
331
|
-
transform:
|
|
343
|
+
transform: translate3d(0, 0, 0);
|
|
332
344
|
animation-fill-mode: both;
|
|
333
345
|
animation-name: popup-slide-left-enter;
|
|
334
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
335
347
|
}
|
|
336
|
-
.nut-popup-slide-left-exit-active
|
|
348
|
+
.nut-popup-slide-left-exit-active {
|
|
337
349
|
animation-fill-mode: both;
|
|
338
350
|
animation-name: popup-slide-left-exit;
|
|
339
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
package/dist/es/types/index.d.ts
CHANGED
|
@@ -262,3 +262,6 @@ export * from './spec/audio/taro';
|
|
|
262
262
|
export * from './spec/steps/base';
|
|
263
263
|
export * from './spec/steps/h5';
|
|
264
264
|
export * from './spec/steps/taro';
|
|
265
|
+
export * from './spec/quickenter/base';
|
|
266
|
+
export * from './spec/quickenter/h5';
|
|
267
|
+
export * from './spec/quickenter/taro';
|
package/dist/es/types/index.js
CHANGED
|
@@ -262,3 +262,6 @@ export * from "./spec/audio/taro";
|
|
|
262
262
|
export * from "./spec/steps/base";
|
|
263
263
|
export * from "./spec/steps/h5";
|
|
264
264
|
export * from "./spec/steps/taro";
|
|
265
|
+
export * from "./spec/quickenter/base";
|
|
266
|
+
export * from "./spec/quickenter/h5";
|
|
267
|
+
export * from "./spec/quickenter/taro";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseProps } from '../../base/props';
|
|
3
|
+
export type QuickEnterRef = QuickEnterActions;
|
|
4
|
+
export type QuickEnterActions = {
|
|
5
|
+
open: () => void;
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
export interface QuickEnterOption extends Record<string, any> {
|
|
9
|
+
title?: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
type?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
badge?: boolean | ReactNode;
|
|
14
|
+
badgeProps?: any;
|
|
15
|
+
}
|
|
16
|
+
export interface BaseQuickEnter<POPUP_PROPS = any> extends BaseProps {
|
|
17
|
+
/**
|
|
18
|
+
* 是否可见
|
|
19
|
+
*/
|
|
20
|
+
visible?: boolean
|
|
21
|
+
/**
|
|
22
|
+
* 标题
|
|
23
|
+
*/
|
|
24
|
+
title?: ReactNode
|
|
25
|
+
/**
|
|
26
|
+
* 选项列表
|
|
27
|
+
*/
|
|
28
|
+
options?: QuickEnterOption[]
|
|
29
|
+
/**
|
|
30
|
+
* 透传给 Popup 组件的属性
|
|
31
|
+
*/
|
|
32
|
+
popupProps?: POPUP_PROPS
|
|
33
|
+
/**
|
|
34
|
+
* 是否在点击遮罩层后关闭
|
|
35
|
+
*/
|
|
36
|
+
closeOnOverlayClick?: boolean
|
|
37
|
+
/**
|
|
38
|
+
* 自定义关闭图标
|
|
39
|
+
*/
|
|
40
|
+
closeIcon?: ReactNode
|
|
41
|
+
onClose?: () => void;
|
|
42
|
+
onChange?: (item: QuickEnterOption, index: number) => void;
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TransitionStatus = 'entering' | 'entered' | 'exiting' | 'exited' | 'unmounted';
|
|
3
|
+
interface CSSTransitionProps {
|
|
4
|
+
in?: boolean;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
classNames?: string;
|
|
7
|
+
nodeRef?: React.RefObject<any>;
|
|
8
|
+
mountOnEnter?: boolean;
|
|
9
|
+
unmountOnExit?: boolean;
|
|
10
|
+
onEntered?: () => void;
|
|
11
|
+
onExited?: () => void;
|
|
12
|
+
children: React.ReactElement;
|
|
13
|
+
}
|
|
14
|
+
declare const ConfigurableCSSTransition: React.FC<CSSTransitionProps>;
|
|
15
|
+
export default ConfigurableCSSTransition;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
2
|
+
import React, { useState, useEffect, useRef, cloneElement, useCallback } from "react";
|
|
3
|
+
var ConfigurableCSSTransition = function(props) {
|
|
4
|
+
var inPhase = props.in, _props_timeout = props.timeout, timeout = _props_timeout === void 0 ? 300 : _props_timeout, tmp = props.classNames, baseClassName = tmp === void 0 ? '' : tmp, nodeRef = props.nodeRef, mountOnEnter = props.mountOnEnter, unmountOnExit = props.unmountOnExit, onEntered = props.onEntered, onExited = props.onExited, children = props.children;
|
|
5
|
+
var _useState = _sliced_to_array(useState(function() {
|
|
6
|
+
if (inPhase) return 'entered';
|
|
7
|
+
return unmountOnExit || mountOnEnter ? 'unmounted' : 'exited';
|
|
8
|
+
}), 2), status = _useState[0], setStatus = _useState[1];
|
|
9
|
+
var _useState1 = _sliced_to_array(useState(function() {
|
|
10
|
+
if (inPhase) return "".concat(baseClassName, "-enter-done");
|
|
11
|
+
return "".concat(baseClassName, "-exit-done");
|
|
12
|
+
}), 2), classes = _useState1[0], setClasses = _useState1[1];
|
|
13
|
+
var timerRef = useRef(null);
|
|
14
|
+
var statusRef = useRef(status);
|
|
15
|
+
var prevInPhase = useRef(inPhase);
|
|
16
|
+
var updateStatus = useCallback(function(nextStatus) {
|
|
17
|
+
statusRef.current = nextStatus;
|
|
18
|
+
setStatus(nextStatus);
|
|
19
|
+
}, []);
|
|
20
|
+
var enter = useCallback(function() {
|
|
21
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
22
|
+
if (statusRef.current === 'unmounted') {
|
|
23
|
+
updateStatus('exited');
|
|
24
|
+
}
|
|
25
|
+
updateStatus('entering');
|
|
26
|
+
setClasses("".concat(baseClassName, "-enter ").concat(baseClassName, "-enter-active"));
|
|
27
|
+
timerRef.current = setTimeout(function() {
|
|
28
|
+
updateStatus('entered');
|
|
29
|
+
setClasses("".concat(baseClassName, "-enter-done"));
|
|
30
|
+
onEntered === null || onEntered === void 0 ? void 0 : onEntered();
|
|
31
|
+
}, timeout);
|
|
32
|
+
}, [
|
|
33
|
+
baseClassName,
|
|
34
|
+
onEntered,
|
|
35
|
+
timeout,
|
|
36
|
+
updateStatus
|
|
37
|
+
]);
|
|
38
|
+
var exit = useCallback(function() {
|
|
39
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
40
|
+
updateStatus('exiting');
|
|
41
|
+
setClasses("".concat(baseClassName, "-exit ").concat(baseClassName, "-exit-active"));
|
|
42
|
+
timerRef.current = setTimeout(function() {
|
|
43
|
+
updateStatus('exited');
|
|
44
|
+
setClasses("".concat(baseClassName, "-exit-done"));
|
|
45
|
+
if (unmountOnExit) {
|
|
46
|
+
updateStatus('unmounted');
|
|
47
|
+
}
|
|
48
|
+
onExited === null || onExited === void 0 ? void 0 : onExited();
|
|
49
|
+
}, timeout);
|
|
50
|
+
}, [
|
|
51
|
+
baseClassName,
|
|
52
|
+
onExited,
|
|
53
|
+
timeout,
|
|
54
|
+
unmountOnExit,
|
|
55
|
+
updateStatus
|
|
56
|
+
]);
|
|
57
|
+
useEffect(function() {
|
|
58
|
+
if (prevInPhase.current !== inPhase) {
|
|
59
|
+
if (inPhase) {
|
|
60
|
+
enter();
|
|
61
|
+
} else {
|
|
62
|
+
exit();
|
|
63
|
+
}
|
|
64
|
+
prevInPhase.current = inPhase;
|
|
65
|
+
}
|
|
66
|
+
return function() {
|
|
67
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
inPhase,
|
|
71
|
+
enter,
|
|
72
|
+
exit
|
|
73
|
+
]);
|
|
74
|
+
if (status === 'unmounted') return null;
|
|
75
|
+
return /*#__PURE__*/ cloneElement(children, {
|
|
76
|
+
className: "".concat(children.props.className || '', " ").concat(classes)
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
export default ConfigurableCSSTransition;
|