@arco-design/mobile-react 2.20.0 → 2.21.0
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/CHANGELOG.md +30 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/avatar/index.d.ts +1 -1
- package/cjs/avatar/index.js +1 -1
- package/cjs/badge/index.d.ts +1 -1
- package/cjs/badge/index.js +1 -1
- package/cjs/carousel/index.d.ts +1 -1
- package/cjs/carousel/index.js +1 -1
- package/cjs/cell/index.d.ts +1 -1
- package/cjs/cell/index.js +1 -1
- package/cjs/checkbox/index.d.ts +1 -1
- package/cjs/checkbox/index.js +1 -1
- package/cjs/collapse/index.d.ts +1 -1
- package/cjs/collapse/index.js +1 -1
- package/cjs/count-down/index.d.ts +1 -1
- package/cjs/count-down/index.js +1 -1
- package/cjs/date-picker/index.d.ts +1 -1
- package/cjs/date-picker/index.js +1 -1
- package/cjs/dropdown/dropdown.js +36 -20
- package/cjs/dropdown/style/css/index.css +3 -0
- package/cjs/dropdown/style/index.less +2 -0
- package/cjs/ellipsis/index.d.ts +1 -1
- package/cjs/ellipsis/index.js +1 -1
- package/cjs/image/index.d.ts +1 -1
- package/cjs/image/index.js +1 -1
- package/cjs/image-picker/index.d.ts +4 -175
- package/cjs/image-picker/index.js +41 -18
- package/cjs/image-picker/type.d.ts +174 -0
- package/cjs/image-picker/type.js +3 -0
- package/cjs/image-preview/index.d.ts +1 -1
- package/cjs/image-preview/index.js +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +9 -1
- package/cjs/input/hooks.js +49 -8
- package/cjs/input/index.d.ts +1 -1
- package/cjs/input/index.js +1 -1
- package/cjs/input/props.d.ts +8 -2
- package/cjs/notice-bar/index.d.ts +1 -1
- package/cjs/notice-bar/index.js +1 -1
- package/cjs/picker/index.d.ts +1 -1
- package/cjs/picker/index.js +1 -1
- package/cjs/picker-view/index.d.ts +1 -1
- package/cjs/picker-view/index.js +1 -1
- package/cjs/popover/index.d.ts +1 -1
- package/cjs/popover/index.js +1 -1
- package/cjs/popup-swiper/index.js +3 -2
- package/cjs/radio/index.d.ts +1 -1
- package/cjs/radio/index.js +1 -1
- package/cjs/rate/index.d.ts +1 -1
- package/cjs/rate/index.js +1 -1
- package/cjs/search-bar/association.d.ts +3 -0
- package/cjs/search-bar/association.js +92 -0
- package/cjs/search-bar/cancel-button.d.ts +10 -0
- package/cjs/search-bar/cancel-button.js +41 -0
- package/cjs/search-bar/demo/style/css/mobile.css +5 -0
- package/cjs/search-bar/demo/style/mobile.less +9 -0
- package/cjs/search-bar/highlight.d.ts +12 -0
- package/cjs/search-bar/highlight.js +77 -0
- package/cjs/search-bar/index.d.ts +13 -0
- package/cjs/search-bar/index.js +239 -0
- package/cjs/search-bar/style/css/index.css +148 -0
- package/cjs/search-bar/style/css/index.d.ts +2 -0
- package/cjs/search-bar/style/css/index.js +5 -0
- package/cjs/search-bar/style/index.d.ts +2 -0
- package/cjs/search-bar/style/index.js +5 -0
- package/cjs/search-bar/style/index.less +111 -0
- package/cjs/search-bar/type.d.ts +163 -0
- package/cjs/search-bar/type.js +3 -0
- package/cjs/slider/index.d.ts +1 -1
- package/cjs/slider/index.js +1 -1
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/index.js +1 -1
- package/cjs/sticky/index.d.ts +1 -1
- package/cjs/style.d.ts +2 -0
- package/cjs/style.js +4 -0
- package/cjs/swipe-action/demo/style/css/mobile.css +5 -0
- package/cjs/swipe-action/demo/style/mobile.less +9 -0
- package/cjs/swipe-action/index.d.ts +12 -0
- package/cjs/swipe-action/index.js +339 -0
- package/cjs/swipe-action/item.d.ts +11 -0
- package/cjs/swipe-action/item.js +52 -0
- package/cjs/swipe-action/style/css/index.css +88 -0
- package/cjs/swipe-action/style/css/index.d.ts +2 -0
- package/cjs/swipe-action/style/css/index.js +5 -0
- package/cjs/swipe-action/style/index.d.ts +2 -0
- package/cjs/swipe-action/style/index.js +5 -0
- package/cjs/swipe-action/style/index.less +89 -0
- package/cjs/swipe-action/type.d.ts +123 -0
- package/cjs/swipe-action/type.js +3 -0
- package/cjs/switch/index.d.ts +1 -1
- package/cjs/switch/index.js +1 -1
- package/cjs/tabs/tab-pane.js +5 -1
- package/cjs/tag/index.d.ts +1 -1
- package/cjs/tag/index.js +1 -1
- package/cjs/textarea/index.d.ts +1 -1
- package/cjs/textarea/index.js +1 -1
- package/dist/index.js +7450 -6611
- package/dist/index.min.js +6 -6
- package/dist/style.css +203 -0
- package/dist/style.min.css +1 -1
- package/esm/avatar/index.d.ts +1 -1
- package/esm/avatar/index.js +1 -1
- package/esm/badge/index.d.ts +1 -1
- package/esm/badge/index.js +1 -1
- package/esm/carousel/index.d.ts +1 -1
- package/esm/carousel/index.js +1 -1
- package/esm/cell/index.d.ts +1 -1
- package/esm/cell/index.js +1 -1
- package/esm/checkbox/index.d.ts +1 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/collapse/index.d.ts +1 -1
- package/esm/collapse/index.js +1 -1
- package/esm/count-down/index.d.ts +1 -1
- package/esm/count-down/index.js +1 -1
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.js +1 -1
- package/esm/dropdown/dropdown.js +36 -20
- package/esm/dropdown/style/css/index.css +3 -0
- package/esm/dropdown/style/index.less +2 -0
- package/esm/ellipsis/index.d.ts +1 -1
- package/esm/ellipsis/index.js +1 -1
- package/esm/image/index.d.ts +1 -1
- package/esm/image/index.js +1 -1
- package/esm/image-picker/index.d.ts +4 -175
- package/esm/image-picker/index.js +30 -17
- package/esm/image-picker/type.d.ts +174 -0
- package/esm/image-picker/type.js +1 -0
- package/esm/image-preview/index.d.ts +1 -1
- package/esm/image-preview/index.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/input/hooks.js +49 -8
- package/esm/input/index.d.ts +1 -1
- package/esm/input/index.js +1 -1
- package/esm/input/props.d.ts +8 -2
- package/esm/notice-bar/index.d.ts +1 -1
- package/esm/notice-bar/index.js +1 -1
- package/esm/picker/index.d.ts +1 -1
- package/esm/picker/index.js +1 -1
- package/esm/picker-view/index.d.ts +1 -1
- package/esm/picker-view/index.js +1 -1
- package/esm/popover/index.d.ts +1 -1
- package/esm/popover/index.js +1 -1
- package/esm/popup-swiper/index.js +3 -2
- package/esm/radio/index.d.ts +1 -1
- package/esm/radio/index.js +1 -1
- package/esm/rate/index.d.ts +1 -1
- package/esm/rate/index.js +1 -1
- package/esm/search-bar/association.d.ts +3 -0
- package/esm/search-bar/association.js +82 -0
- package/esm/search-bar/cancel-button.d.ts +10 -0
- package/esm/search-bar/cancel-button.js +30 -0
- package/esm/search-bar/demo/style/css/mobile.css +5 -0
- package/esm/search-bar/demo/style/mobile.less +9 -0
- package/esm/search-bar/highlight.d.ts +12 -0
- package/esm/search-bar/highlight.js +66 -0
- package/esm/search-bar/index.d.ts +13 -0
- package/esm/search-bar/index.js +213 -0
- package/esm/search-bar/style/css/index.css +148 -0
- package/esm/search-bar/style/css/index.d.ts +2 -0
- package/esm/search-bar/style/css/index.js +2 -0
- package/esm/search-bar/style/index.d.ts +2 -0
- package/esm/search-bar/style/index.js +2 -0
- package/esm/search-bar/style/index.less +111 -0
- package/esm/search-bar/type.d.ts +163 -0
- package/esm/search-bar/type.js +1 -0
- package/esm/slider/index.d.ts +1 -1
- package/esm/slider/index.js +1 -1
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/index.js +1 -1
- package/esm/sticky/index.d.ts +1 -1
- package/esm/style.d.ts +2 -0
- package/esm/style.js +2 -0
- package/esm/swipe-action/demo/style/css/mobile.css +5 -0
- package/esm/swipe-action/demo/style/mobile.less +9 -0
- package/esm/swipe-action/index.d.ts +12 -0
- package/esm/swipe-action/index.js +321 -0
- package/esm/swipe-action/item.d.ts +11 -0
- package/esm/swipe-action/item.js +42 -0
- package/esm/swipe-action/style/css/index.css +88 -0
- package/esm/swipe-action/style/css/index.d.ts +2 -0
- package/esm/swipe-action/style/css/index.js +2 -0
- package/esm/swipe-action/style/index.d.ts +2 -0
- package/esm/swipe-action/style/index.js +2 -0
- package/esm/swipe-action/style/index.less +89 -0
- package/esm/swipe-action/type.d.ts +123 -0
- package/esm/swipe-action/type.js +1 -0
- package/esm/switch/index.d.ts +1 -1
- package/esm/switch/index.js +1 -1
- package/esm/tabs/tab-pane.js +5 -1
- package/esm/tag/index.d.ts +1 -1
- package/esm/tag/index.js +1 -1
- package/esm/textarea/index.d.ts +1 -1
- package/esm/textarea/index.js +1 -1
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +34 -0
- package/tokens/app/arcodesign/default/index.d.ts +34 -0
- package/tokens/app/arcodesign/default/index.js +34 -0
- package/tokens/app/arcodesign/default/index.json +398 -0
- package/tokens/app/arcodesign/default/index.less +34 -0
- package/umd/avatar/index.d.ts +1 -1
- package/umd/avatar/index.js +1 -1
- package/umd/badge/index.d.ts +1 -1
- package/umd/badge/index.js +1 -1
- package/umd/carousel/index.d.ts +1 -1
- package/umd/carousel/index.js +1 -1
- package/umd/cell/index.d.ts +1 -1
- package/umd/cell/index.js +1 -1
- package/umd/checkbox/index.d.ts +1 -1
- package/umd/checkbox/index.js +1 -1
- package/umd/collapse/index.d.ts +1 -1
- package/umd/collapse/index.js +1 -1
- package/umd/count-down/index.d.ts +1 -1
- package/umd/count-down/index.js +1 -1
- package/umd/date-picker/index.d.ts +1 -1
- package/umd/date-picker/index.js +1 -1
- package/umd/dropdown/dropdown.js +36 -20
- package/umd/dropdown/style/css/index.css +3 -0
- package/umd/dropdown/style/index.less +2 -0
- package/umd/ellipsis/index.d.ts +1 -1
- package/umd/ellipsis/index.js +1 -1
- package/umd/image/index.d.ts +1 -1
- package/umd/image/index.js +1 -1
- package/umd/image-picker/index.d.ts +4 -175
- package/umd/image-picker/index.js +40 -22
- package/umd/image-picker/type.d.ts +174 -0
- package/umd/image-picker/type.js +17 -0
- package/umd/image-preview/index.d.ts +1 -1
- package/umd/image-preview/index.js +1 -1
- package/umd/index.d.ts +2 -0
- package/umd/index.js +9 -5
- package/umd/input/hooks.js +48 -7
- package/umd/input/index.d.ts +1 -1
- package/umd/input/index.js +1 -1
- package/umd/input/props.d.ts +8 -2
- package/umd/notice-bar/index.d.ts +1 -1
- package/umd/notice-bar/index.js +1 -1
- package/umd/picker/index.d.ts +1 -1
- package/umd/picker/index.js +1 -1
- package/umd/picker-view/index.d.ts +1 -1
- package/umd/picker-view/index.js +1 -1
- package/umd/popover/index.d.ts +1 -1
- package/umd/popover/index.js +1 -1
- package/umd/popup-swiper/index.js +3 -2
- package/umd/radio/index.d.ts +1 -1
- package/umd/radio/index.js +1 -1
- package/umd/rate/index.d.ts +1 -1
- package/umd/rate/index.js +1 -1
- package/umd/search-bar/association.d.ts +3 -0
- package/umd/search-bar/association.js +101 -0
- package/umd/search-bar/cancel-button.d.ts +10 -0
- package/umd/search-bar/cancel-button.js +52 -0
- package/umd/search-bar/demo/style/css/mobile.css +5 -0
- package/umd/search-bar/demo/style/mobile.less +9 -0
- package/umd/search-bar/highlight.d.ts +12 -0
- package/umd/search-bar/highlight.js +87 -0
- package/umd/search-bar/index.d.ts +13 -0
- package/umd/search-bar/index.js +235 -0
- package/umd/search-bar/style/css/index.css +148 -0
- package/umd/search-bar/style/css/index.d.ts +2 -0
- package/umd/search-bar/style/css/index.js +15 -0
- package/umd/search-bar/style/index.d.ts +2 -0
- package/umd/search-bar/style/index.js +15 -0
- package/umd/search-bar/style/index.less +111 -0
- package/umd/search-bar/type.d.ts +163 -0
- package/umd/search-bar/type.js +17 -0
- package/umd/slider/index.d.ts +1 -1
- package/umd/slider/index.js +1 -1
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/index.js +1 -1
- package/umd/sticky/index.d.ts +1 -1
- package/umd/style.d.ts +2 -0
- package/umd/style.js +4 -4
- package/umd/swipe-action/demo/style/css/mobile.css +5 -0
- package/umd/swipe-action/demo/style/mobile.less +9 -0
- package/umd/swipe-action/index.d.ts +12 -0
- package/umd/swipe-action/index.js +342 -0
- package/umd/swipe-action/item.d.ts +11 -0
- package/umd/swipe-action/item.js +62 -0
- package/umd/swipe-action/style/css/index.css +88 -0
- package/umd/swipe-action/style/css/index.d.ts +2 -0
- package/umd/swipe-action/style/css/index.js +15 -0
- package/umd/swipe-action/style/index.d.ts +2 -0
- package/umd/swipe-action/style/index.js +15 -0
- package/umd/swipe-action/style/index.less +89 -0
- package/umd/swipe-action/type.d.ts +123 -0
- package/umd/swipe-action/type.js +17 -0
- package/umd/switch/index.d.ts +1 -1
- package/umd/switch/index.js +1 -1
- package/umd/tabs/tab-pane.js +5 -1
- package/umd/tag/index.d.ts +1 -1
- package/umd/tag/index.js +1 -1
- package/umd/textarea/index.d.ts +1 -1
- package/umd/textarea/index.js +1 -1
@@ -0,0 +1,148 @@
|
|
1
|
+
.arco-search-bar-container {
|
2
|
+
display: -webkit-box;
|
3
|
+
display: -webkit-flex;
|
4
|
+
display: flex;
|
5
|
+
-webkit-box-align: center;
|
6
|
+
-webkit-align-items: center;
|
7
|
+
align-items: center;
|
8
|
+
position: relative;
|
9
|
+
padding: 0.32rem ;
|
10
|
+
background-color: #FFFFFF ;
|
11
|
+
}
|
12
|
+
.arco-search-bar-square .arco-search-bar-wrap {
|
13
|
+
border-radius: 0.04rem ;
|
14
|
+
}
|
15
|
+
.arco-search-bar-round .arco-search-bar-wrap {
|
16
|
+
border-radius: 199.98rem ;
|
17
|
+
}
|
18
|
+
.arco-search-bar-wrap {
|
19
|
+
display: -webkit-box;
|
20
|
+
display: -webkit-flex;
|
21
|
+
display: flex;
|
22
|
+
-webkit-box-align: center;
|
23
|
+
-webkit-align-items: center;
|
24
|
+
align-items: center;
|
25
|
+
-webkit-box-flex: 1;
|
26
|
+
-webkit-flex: 1;
|
27
|
+
flex: 1;
|
28
|
+
height: 0.72rem ;
|
29
|
+
font-size: 0.28rem ;
|
30
|
+
padding: 0.16rem 0.28rem ;
|
31
|
+
background-color: #F2F3F5 ;
|
32
|
+
}
|
33
|
+
.arco-search-bar-input {
|
34
|
+
-webkit-box-flex: 1;
|
35
|
+
-webkit-flex: 1;
|
36
|
+
flex: 1;
|
37
|
+
background-color: transparent;
|
38
|
+
height: 0.4rem ;
|
39
|
+
caret-color: #165dff ;
|
40
|
+
}
|
41
|
+
.arco-search-bar-input-left {
|
42
|
+
text-align: left;
|
43
|
+
}
|
44
|
+
.arco-search-bar-input-right {
|
45
|
+
text-align: right;
|
46
|
+
}
|
47
|
+
.arco-search-bar-input-center {
|
48
|
+
text-align: center;
|
49
|
+
}
|
50
|
+
.arco-search-bar-input::-webkit-input-placeholder {
|
51
|
+
color: #c9cdd4 ;
|
52
|
+
}
|
53
|
+
.arco-search-bar-input::placeholder {
|
54
|
+
color: #c9cdd4 ;
|
55
|
+
}
|
56
|
+
.arco-search-bar-input::-webkit-search-cancel-button {
|
57
|
+
display: none;
|
58
|
+
}
|
59
|
+
.arco-search-bar-prefix,
|
60
|
+
.arco-search-bar-suffix,
|
61
|
+
.arco-search-bar-clear {
|
62
|
+
-webkit-box-align: center;
|
63
|
+
-webkit-align-items: center;
|
64
|
+
align-items: center;
|
65
|
+
-webkit-box-pack: center;
|
66
|
+
-webkit-justify-content: center;
|
67
|
+
justify-content: center;
|
68
|
+
display: -webkit-box;
|
69
|
+
display: -webkit-flex;
|
70
|
+
display: flex;
|
71
|
+
}
|
72
|
+
.arco-search-bar-prefix {
|
73
|
+
margin-right: 0.18rem ;
|
74
|
+
}
|
75
|
+
.arco-search-bar-clear {
|
76
|
+
color: #C9CDD4 ;
|
77
|
+
}
|
78
|
+
.arco-search-bar-search-icon {
|
79
|
+
color: #86909C ;
|
80
|
+
font-size: 0.32rem ;
|
81
|
+
}
|
82
|
+
.arco-search-bar-cancel-btn {
|
83
|
+
margin-left: 0.32rem ;
|
84
|
+
color: #165dff ;
|
85
|
+
font-size: 0.3rem ;
|
86
|
+
}
|
87
|
+
.arco-search-bar-association {
|
88
|
+
position: absolute;
|
89
|
+
left: 0;
|
90
|
+
right: 0;
|
91
|
+
background-color: #FFFFFF ;
|
92
|
+
top: 100%;
|
93
|
+
display: none;
|
94
|
+
}
|
95
|
+
.arco-search-bar-association-visible {
|
96
|
+
display: block;
|
97
|
+
}
|
98
|
+
.arco-search-bar-association-item {
|
99
|
+
height: 1.04rem ;
|
100
|
+
display: -webkit-box;
|
101
|
+
display: -webkit-flex;
|
102
|
+
display: flex;
|
103
|
+
-webkit-box-align: center;
|
104
|
+
-webkit-align-items: center;
|
105
|
+
align-items: center;
|
106
|
+
position: relative;
|
107
|
+
color: #1d2129 ;
|
108
|
+
padding: 0.32rem ;
|
109
|
+
font-size: 0.3rem ;
|
110
|
+
}
|
111
|
+
.arco-search-bar-association-item:not(:last-child) {
|
112
|
+
position: relative;
|
113
|
+
border-width: 0;
|
114
|
+
}
|
115
|
+
.arco-search-bar-association-item:not(:last-child)::after {
|
116
|
+
content: '';
|
117
|
+
width: 100%;
|
118
|
+
height: 1PX;
|
119
|
+
position: absolute;
|
120
|
+
left: 0;
|
121
|
+
bottom: 0;
|
122
|
+
z-index: 1;
|
123
|
+
border-bottom-style: solid;
|
124
|
+
border-bottom-width: 1PX;
|
125
|
+
border-bottom-color: #e5e6eb;
|
126
|
+
box-sizing: border-box;
|
127
|
+
transform-origin: left bottom;
|
128
|
+
-webkit-transform-origin: left bottom;
|
129
|
+
pointer-events: none;
|
130
|
+
border-radius: 0;
|
131
|
+
}
|
132
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
|
133
|
+
.arco-search-bar-association-item:not(:last-child)::after {
|
134
|
+
transform: scaleY(0.5);
|
135
|
+
-webkit-transform: scaleY(0.5);
|
136
|
+
border-radius: 0;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
|
140
|
+
.arco-search-bar-association-item:not(:last-child)::after {
|
141
|
+
transform: scaleY(0.33333333);
|
142
|
+
-webkit-transform: scaleY(0.33333333);
|
143
|
+
border-radius: 0;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
.arco-search-bar-association-item-highlight {
|
147
|
+
color: #165dff ;
|
148
|
+
}
|
@@ -0,0 +1,111 @@
|
|
1
|
+
@import '../../../style/mixin.less';
|
2
|
+
|
3
|
+
.@{prefix}-search-bar {
|
4
|
+
&-container {
|
5
|
+
display: flex;
|
6
|
+
align-items: center;
|
7
|
+
position: relative;
|
8
|
+
.use-var(padding, search-bar-padding);
|
9
|
+
.use-var(background-color, search-bar-background-color);
|
10
|
+
}
|
11
|
+
&-square {
|
12
|
+
.@{prefix}-search-bar-wrap {
|
13
|
+
.use-var(border-radius, search-bar-square-shape-border-radius);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
&-round {
|
17
|
+
.@{prefix}-search-bar-wrap {
|
18
|
+
.use-var(border-radius, search-bar-round-shape-border-radius);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
&-wrap {
|
22
|
+
display: flex;
|
23
|
+
align-items: center;
|
24
|
+
flex: 1;
|
25
|
+
.use-var(height, search-bar-input-wrapper-height);
|
26
|
+
.use-var(font-size, search-bar-input-wrapper-font-size);
|
27
|
+
.use-var(padding, search-bar-input-wrapper-padding);
|
28
|
+
.use-var(background-color, search-bar-input-wrapper-background-color);
|
29
|
+
}
|
30
|
+
&-input {
|
31
|
+
flex: 1;
|
32
|
+
background-color: transparent;
|
33
|
+
.use-var(height, search-bar-input-height);
|
34
|
+
.use-var(caret-color, search-bar-input-caret-color);
|
35
|
+
&-left {
|
36
|
+
text-align: left;
|
37
|
+
}
|
38
|
+
&-right {
|
39
|
+
text-align: right;
|
40
|
+
}
|
41
|
+
&-center {
|
42
|
+
text-align: center;
|
43
|
+
}
|
44
|
+
|
45
|
+
&::placeholder {
|
46
|
+
.use-var(color, search-bar-input-placeholder-color);
|
47
|
+
}
|
48
|
+
|
49
|
+
&::-webkit-search-cancel-button {
|
50
|
+
display: none;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
&-prefix,
|
55
|
+
&-suffix,
|
56
|
+
&-clear {
|
57
|
+
align-items: center;
|
58
|
+
justify-content: center;
|
59
|
+
display: flex;
|
60
|
+
}
|
61
|
+
|
62
|
+
&-prefix {
|
63
|
+
.use-var(margin-right, search-bar-prefix-margin-right);
|
64
|
+
}
|
65
|
+
|
66
|
+
&-clear {
|
67
|
+
.use-var(color, search-bar-clear-icon-color);
|
68
|
+
}
|
69
|
+
|
70
|
+
&-search-icon {
|
71
|
+
.use-var(color, search-bar-search-icon-color);
|
72
|
+
.use-var(font-size, search-bar-search-icon-font-size);
|
73
|
+
}
|
74
|
+
|
75
|
+
&-cancel-btn {
|
76
|
+
.use-var(margin-left, search-bar-cancel-btn-margin-left);
|
77
|
+
.use-var(color, search-bar-cancel-btn-color);
|
78
|
+
.use-var(font-size, search-bar-cancel-btn-font-size);
|
79
|
+
}
|
80
|
+
|
81
|
+
&-association {
|
82
|
+
position: absolute;
|
83
|
+
left: 0;
|
84
|
+
right: 0;
|
85
|
+
.use-var(background-color, search-bar-association-background-color);
|
86
|
+
top: 100%;
|
87
|
+
display: none;
|
88
|
+
|
89
|
+
&-visible {
|
90
|
+
display: block;
|
91
|
+
}
|
92
|
+
|
93
|
+
&-item {
|
94
|
+
.use-var(height, search-bar-association-item-height);
|
95
|
+
display: flex;
|
96
|
+
align-items: center;
|
97
|
+
position: relative;
|
98
|
+
.use-var(color, search-bar-association-item-color);
|
99
|
+
.use-var(padding, search-bar-association-item-padding);
|
100
|
+
.use-var(font-size, search-bar-association-item-font-size);
|
101
|
+
|
102
|
+
&:not(:last-child) {
|
103
|
+
.onepx-border-var(bottom, line-color);
|
104
|
+
}
|
105
|
+
|
106
|
+
&-highlight {
|
107
|
+
.use-var(color, search-bar-association-item-highlight-color)
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
@@ -0,0 +1,163 @@
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
2
|
+
import { InputProps } from '../input/index';
|
3
|
+
export declare type SearchBarShape = 'square' | 'round';
|
4
|
+
export declare type SearchAssociationShowType = 'focus' | 'value' | 'default' | 'always';
|
5
|
+
export declare type SearchAssociationHighlightMode = 'prefix' | 'contain' | 'none' | ((content: string, keyword: string, defaultHighlightClassName: string) => ReactNode);
|
6
|
+
export interface SearchAssociationBaseItem {
|
7
|
+
/**
|
8
|
+
* 基础内容
|
9
|
+
* @en basic content
|
10
|
+
*/
|
11
|
+
content: string;
|
12
|
+
}
|
13
|
+
export declare type SearchAssociationItem<ExtraData = Record<string, any>> = SearchAssociationBaseItem & ExtraData;
|
14
|
+
export interface SearchBarAssociationProps<Data = Record<string, any>> {
|
15
|
+
/**
|
16
|
+
* 前缀class名
|
17
|
+
* @en prefix class
|
18
|
+
*/
|
19
|
+
prefixCls: string;
|
20
|
+
/**
|
21
|
+
* 搜索关键字
|
22
|
+
* @en search value
|
23
|
+
*/
|
24
|
+
keyword: string;
|
25
|
+
/**
|
26
|
+
* 是否显示搜索联想框
|
27
|
+
* @en Whether to show the search prediction box
|
28
|
+
*/
|
29
|
+
visible: boolean;
|
30
|
+
/**
|
31
|
+
* 每一项搜索内容
|
32
|
+
* @en every search
|
33
|
+
*/
|
34
|
+
associationItems?: SearchAssociationItem<Data>[];
|
35
|
+
/**
|
36
|
+
* 搜索结果高亮模式,可以是内置的两种模式,或者一个自定义的高亮函数(接受选项内容content、搜索关键字keyword、默认的高亮class,返回一个ReactNode) - prefix 高亮最长前缀匹配字符串 - contain 高亮所有搜索关键字 - none 关闭高亮
|
37
|
+
* @en Search result highlighting mode, which can be two built-in modes, or a custom highlighting function(Accept option content content, search keyword keyword, default highlight class, return a ReactNode) - "prefix" to highlight the longest prefix matching string - "contain" to highlight all search keywords - "none" to turn off highlighting
|
38
|
+
* @default "none"
|
39
|
+
*/
|
40
|
+
highlightMode?: SearchAssociationHighlightMode;
|
41
|
+
/**
|
42
|
+
* 要为高亮结果添加的样式,仅非自定高亮模式下生效
|
43
|
+
* @en The style to be added to the highlighted result, only available in non-custom highlight mode
|
44
|
+
*/
|
45
|
+
highlightStyle?: CSSProperties;
|
46
|
+
/**
|
47
|
+
* 要为高亮结果添加的class,仅非自定义高亮模式下生效
|
48
|
+
* @en The class to be added to the highlighting result, only valid in non-custom highlighting mode
|
49
|
+
*/
|
50
|
+
highlightClassName?: string;
|
51
|
+
/**
|
52
|
+
* 右侧取消按钮的点击回调
|
53
|
+
* @en Right cancel button click callback
|
54
|
+
*/
|
55
|
+
onCancel?: () => void;
|
56
|
+
/**
|
57
|
+
* 每行搜索结果的点击回调
|
58
|
+
* @en Click callback for each row of search results
|
59
|
+
*/
|
60
|
+
onAssociationItemClick?: (item: SearchAssociationItem<Data>, index: number) => void;
|
61
|
+
/**
|
62
|
+
* 搜索联想框整体被点击的回调
|
63
|
+
* @en The callback for the overall click of the search association box
|
64
|
+
*/
|
65
|
+
onAssociationClick?: React.MouseEventHandler<HTMLDivElement>;
|
66
|
+
/**
|
67
|
+
* 自定义渲染每行搜索结果
|
68
|
+
* @en Custom rendering of each row of search results
|
69
|
+
*/
|
70
|
+
renderAssociationItem?: (item: SearchAssociationItem<Data>, index: number, node: ReactNode) => ReactNode;
|
71
|
+
/**
|
72
|
+
* 自定义渲染搜索联想框整体内容
|
73
|
+
* @en Customize the rendering of the overall content of the search association box
|
74
|
+
*/
|
75
|
+
renderAssociation?: (Content: ReactNode) => ReactNode;
|
76
|
+
}
|
77
|
+
export interface SearchBarProps<Data = Record<string, any>> extends Omit<SearchBarAssociationProps<Data>, 'keyword' | 'visible' | 'prefixCls'>, Omit<InputProps, 'label' | 'border' | 'required'> {
|
78
|
+
/**
|
79
|
+
* 输入框形状
|
80
|
+
* @en input box shape
|
81
|
+
* @default "square"
|
82
|
+
*/
|
83
|
+
shape?: SearchBarShape;
|
84
|
+
/**
|
85
|
+
* 搜索栏内容位置
|
86
|
+
* @en Search bar content location
|
87
|
+
* @default "left"
|
88
|
+
*/
|
89
|
+
textAlign?: 'left' | 'center' | 'right';
|
90
|
+
/**
|
91
|
+
* 搜索栏头部插入的内容
|
92
|
+
* @en Content inserted in the header of the search box
|
93
|
+
*/
|
94
|
+
prepend?: ReactNode | ((focusing: boolean, value: string) => ReactNode);
|
95
|
+
/**
|
96
|
+
* 搜索栏尾部要插入的内容, 默认在搜索栏激活态时会插入一个按钮
|
97
|
+
* @en The content to be inserted at the end of the search box, a button will be inserted by default when the search box is activated
|
98
|
+
* @default (focusing) => focusing ? (<span>取消</span>) : null
|
99
|
+
*/
|
100
|
+
append?: ReactNode | ((focusing: boolean, value: string) => ReactNode);
|
101
|
+
/**
|
102
|
+
* 搜索栏最右侧要插入的按钮,默认情况下插入一个取消按钮
|
103
|
+
* @en The button to insert on the far right side of the search box, a cancel button is inserted by default
|
104
|
+
* @default <CancelButton />
|
105
|
+
*/
|
106
|
+
actionButton?: ReactNode;
|
107
|
+
/**
|
108
|
+
* 是否开启搜索联想框功能
|
109
|
+
* @en Whether to enable the search association box function
|
110
|
+
* @default false
|
111
|
+
*/
|
112
|
+
enableAssociation?: boolean;
|
113
|
+
/**
|
114
|
+
* (受控模式)搜索联想框的可见态
|
115
|
+
* @en (Controlled mode) Visible state of search association box
|
116
|
+
*/
|
117
|
+
associationVisible?: boolean;
|
118
|
+
/**
|
119
|
+
* 非受控模式下,搜索联想框的展示时机 - focus 仅聚焦时 - value 搜索词不为空 - default 搜索栏被聚焦或者搜索词不为空 - always 一直展示
|
120
|
+
* @en In uncontrolled mode, the display timing of the search association box - "focus" only when focused - "value" search term is not empty - "default" search bar is focused or search term is not empty - "always" always displayed
|
121
|
+
* @default "default"
|
122
|
+
*/
|
123
|
+
associationShowType?: SearchAssociationShowType;
|
124
|
+
}
|
125
|
+
export interface SearchBarRef {
|
126
|
+
/**
|
127
|
+
* 最外层元素 DOM
|
128
|
+
* @en The outermost element DOM
|
129
|
+
*/
|
130
|
+
dom: HTMLDivElement | null;
|
131
|
+
/**
|
132
|
+
* 原生输入框 DOM
|
133
|
+
* @en Native input box DOM
|
134
|
+
*/
|
135
|
+
input: HTMLInputElement | null;
|
136
|
+
/**
|
137
|
+
* 仅非受控模式下生效,手动控制搜索联想框的显隐,如果没有传入值则默认将显隐状态反转
|
138
|
+
* @en It only takes effect in uncontrolled mode. Manually control the display and hide of the search association box. If there is no incoming value, the display and hidden state will be reversed by default.
|
139
|
+
*/
|
140
|
+
toggleAssociation: (newVisible?: boolean) => void;
|
141
|
+
}
|
142
|
+
export interface SearchBarAssociationHighlightConfig {
|
143
|
+
/**
|
144
|
+
* 要为高亮结果添加的样式,仅非自定高亮模式下生效
|
145
|
+
* @en The style to be added to the highlighted result, only available in non-custom highlight mode
|
146
|
+
*/
|
147
|
+
highlightStyle?: CSSProperties;
|
148
|
+
/**
|
149
|
+
* 要为高亮结果添加的class,仅非自定义高亮模式下生效
|
150
|
+
* @en The class to be added to the highlighting result, only valid in non-custom highlighting mode
|
151
|
+
*/
|
152
|
+
highlightClassName?: string;
|
153
|
+
/**
|
154
|
+
* 搜索关键字
|
155
|
+
* @en search for the keyword
|
156
|
+
*/
|
157
|
+
keyword: string;
|
158
|
+
/**
|
159
|
+
* 搜索候选项的内容
|
160
|
+
* @en Contents of search candidates
|
161
|
+
*/
|
162
|
+
content: string;
|
163
|
+
}
|
package/cjs/slider/index.d.ts
CHANGED
@@ -143,7 +143,7 @@ export interface SliderRef {
|
|
143
143
|
* @en Slide input component, displays the current value and optional range.
|
144
144
|
* @name 滑动输入条
|
145
145
|
* @name_en Slider
|
146
|
-
* @type
|
146
|
+
* @type 数据录入
|
147
147
|
* @type_en Data Entry
|
148
148
|
*/
|
149
149
|
declare const SliderWrapper: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<SliderRef>>;
|
package/cjs/slider/index.js
CHANGED
@@ -173,7 +173,7 @@ var Slider = /*#__PURE__*/(0, _react.forwardRef)(function (_, ref) {
|
|
173
173
|
* @en Slide input component, displays the current value and optional range.
|
174
174
|
* @name 滑动输入条
|
175
175
|
* @name_en Slider
|
176
|
-
* @type
|
176
|
+
* @type 数据录入
|
177
177
|
* @type_en Data Entry
|
178
178
|
*/
|
179
179
|
|
package/cjs/steps/index.d.ts
CHANGED
@@ -13,7 +13,7 @@ declare const _default: React.ForwardRefExoticComponent<StepsProps & React.RefAt
|
|
13
13
|
* @en Display the progress of a task, or guide users to complete a complex task.
|
14
14
|
* @name 步骤条
|
15
15
|
* @name_en Steps
|
16
|
-
* @type
|
16
|
+
* @type 信息展示
|
17
17
|
* @type_en Data Display
|
18
18
|
*/
|
19
19
|
export default _default;
|
package/cjs/steps/index.js
CHANGED
@@ -114,7 +114,7 @@ var Steps = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
114
114
|
* @en Display the progress of a task, or guide users to complete a complex task.
|
115
115
|
* @name 步骤条
|
116
116
|
* @name_en Steps
|
117
|
-
* @type
|
117
|
+
* @type 信息展示
|
118
118
|
* @type_en Data Display
|
119
119
|
*/
|
120
120
|
|
package/cjs/sticky/index.d.ts
CHANGED
@@ -118,7 +118,7 @@ export interface StickyProps {
|
|
118
118
|
*/
|
119
119
|
getContainer?: () => HTMLElement | string;
|
120
120
|
/**
|
121
|
-
*
|
121
|
+
* 指定滚动容器;如果返回string则使用querySelector选取容器
|
122
122
|
* @en Specifies the scrolling container. If this value is specified, the relative property is always regarded as false; if a string is input, use querySelector to select the container
|
123
123
|
* @default () => window
|
124
124
|
*/
|
package/cjs/style.d.ts
CHANGED
@@ -42,8 +42,10 @@ import './pull-refresh/style';
|
|
42
42
|
import './radio/style';
|
43
43
|
import './rate/style';
|
44
44
|
import './slider/style';
|
45
|
+
import './search-bar/style';
|
45
46
|
import './steps/style';
|
46
47
|
import './sticky/style';
|
48
|
+
import './swipe-action/style';
|
47
49
|
import './swipe-load/style';
|
48
50
|
import './tab-bar/style';
|
49
51
|
import './tag/style';
|
package/cjs/style.js
CHANGED
@@ -88,10 +88,14 @@ require("./rate/style");
|
|
88
88
|
|
89
89
|
require("./slider/style");
|
90
90
|
|
91
|
+
require("./search-bar/style");
|
92
|
+
|
91
93
|
require("./steps/style");
|
92
94
|
|
93
95
|
require("./sticky/style");
|
94
96
|
|
97
|
+
require("./swipe-action/style");
|
98
|
+
|
95
99
|
require("./swipe-load/style");
|
96
100
|
|
97
101
|
require("./tab-bar/style");
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { SwipeActionProps, SwipeActionRef } from './type';
|
3
|
+
/**
|
4
|
+
* 滑动操作组件,左右滑动拉出菜单栏
|
5
|
+
* @en SwipeAction component, slide left and right to pull out the menu bar
|
6
|
+
* @type 反馈
|
7
|
+
* @type_en FeedBack
|
8
|
+
* @name 滑动操作
|
9
|
+
* @name_en SwipeAction
|
10
|
+
*/
|
11
|
+
declare const SwipeAction: React.ForwardRefExoticComponent<SwipeActionProps & React.RefAttributes<SwipeActionRef>>;
|
12
|
+
export default SwipeAction;
|