@cloudbase/weda-ui 1.0.21 → 2.0.9

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 (170) hide show
  1. package/package.json +6 -4
  2. package/src/configs/components/button.json +0 -2
  3. package/src/configs/components/calendar.json +5 -2
  4. package/src/configs/components/carousel.json +18 -9
  5. package/src/configs/components/chart/bar.json +12 -6
  6. package/src/configs/components/chart/line.json +8 -4
  7. package/src/configs/components/chart/pie.json +8 -4
  8. package/src/configs/components/dataView.json +11 -6
  9. package/src/configs/components/form/radio.json +27 -0
  10. package/src/configs/components/form/select.json +2 -2
  11. package/src/configs/components/graphicCard.json +6 -2
  12. package/src/configs/components/image.json +12 -6
  13. package/src/configs/components/link.json +6 -3
  14. package/src/configs/components/listView.json +21 -11
  15. package/src/configs/components/lottery.json +153 -0
  16. package/src/configs/components/navLayout.json +12 -6
  17. package/src/configs/components/richtextview.json +2 -1
  18. package/src/configs/components/scrollVeiw.json +24 -12
  19. package/src/configs/components/swiper.json +18 -9
  20. package/src/configs/components/tabs.json +4 -2
  21. package/src/configs/components/text.json +10 -5
  22. package/src/configs/index.js +2 -0
  23. package/src/docs/common/format.tsx +112 -0
  24. package/src/docs/common/tableView.css +164 -0
  25. package/src/docs/common/tableView.tsx +273 -0
  26. package/src/docs/compsdocs/chart/Bar.mdx +159 -0
  27. package/src/docs/compsdocs/chart/Line.mdx +100 -0
  28. package/src/docs/compsdocs/chart/Pie.mdx +83 -0
  29. package/src/docs/compsdocs/chart/_category_.json +1 -0
  30. package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
  31. package/src/docs/compsdocs/database/DataView.mdx +33 -0
  32. package/src/docs/compsdocs/database/ListView.mdx +33 -0
  33. package/src/docs/compsdocs/database/_category_.json +1 -0
  34. package/src/docs/compsdocs/form/Form.mdx +35 -0
  35. package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
  36. package/src/docs/compsdocs/form/FormDate.mdx +30 -0
  37. package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
  38. package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
  39. package/src/docs/compsdocs/form/FormInput.mdx +30 -0
  40. package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
  41. package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
  42. package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
  43. package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
  44. package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
  45. package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
  46. package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
  47. package/src/docs/compsdocs/form/FormTime.mdx +30 -0
  48. package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
  49. package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
  50. package/src/docs/compsdocs/form/_category_.json +1 -0
  51. package/src/docs/compsdocs/grid/Card.mdx +32 -0
  52. package/src/docs/compsdocs/grid/Container.mdx +42 -0
  53. package/src/docs/compsdocs/grid/Footer.mdx +31 -0
  54. package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
  55. package/src/docs/compsdocs/grid/Header.mdx +31 -0
  56. package/src/docs/compsdocs/grid/Layout.mdx +25 -0
  57. package/src/docs/compsdocs/grid/List.mdx +31 -0
  58. package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
  59. package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
  60. package/src/docs/compsdocs/grid/_category_.json +1 -0
  61. package/src/docs/compsdocs/media/Icon.mdx +31 -0
  62. package/src/docs/compsdocs/media/Image.mdx +55 -0
  63. package/src/docs/compsdocs/media/_category_.json +1 -0
  64. package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
  65. package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
  66. package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
  67. package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
  68. package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
  69. package/src/docs/compsdocs/model/_category_.json +1 -0
  70. package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
  71. package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
  72. package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
  73. package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
  74. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
  75. package/src/docs/compsdocs/navmenu/_category_.json +1 -0
  76. package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
  77. package/src/docs/compsdocs/senior/Modal.mdx +58 -0
  78. package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
  79. package/src/docs/compsdocs/senior/_category_.json +1 -0
  80. package/src/docs/compsdocs/show/Calendar.mdx +29 -0
  81. package/src/docs/compsdocs/show/Divider.mdx +31 -0
  82. package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
  83. package/src/docs/compsdocs/show/Item.mdx +32 -0
  84. package/src/docs/compsdocs/show/ItemList.mdx +47 -0
  85. package/src/docs/compsdocs/show/Media.mdx +25 -0
  86. package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
  87. package/src/docs/compsdocs/show/Swiper.mdx +33 -0
  88. package/src/docs/compsdocs/show/Tabs.mdx +38 -0
  89. package/src/docs/compsdocs/show/_category_.json +1 -0
  90. package/src/docs/compsdocs/show/button.mdx +25 -0
  91. package/src/docs/compsdocs/text/Link.mdx +43 -0
  92. package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
  93. package/src/docs/compsdocs/text/Text.mdx +31 -0
  94. package/src/docs/compsdocs/text/Title.mdx +32 -0
  95. package/src/docs/compsdocs/text/_category_.json +1 -0
  96. package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
  97. package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
  98. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
  99. package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
  100. package/src/index.js +2 -0
  101. package/src/mp/components/button/index.js +18 -2
  102. package/src/mp/components/button/index.wxml +7 -4
  103. package/src/mp/components/form/form/index.wxml +1 -2
  104. package/src/mp/components/form/formcell/index.wxml +1 -1
  105. package/src/mp/components/form/formcell/index.wxss +17 -0
  106. package/src/mp/components/form/input/index.wxss +15 -0
  107. package/src/mp/components/form/location/index.wxss +4 -6
  108. package/src/mp/components/form/select/index.js +13 -23
  109. package/src/mp/components/form/select/index.wxss +4 -0
  110. package/src/mp/components/form/select/region/index.js +6 -3
  111. package/src/mp/components/form/textarea/index.js +1 -1
  112. package/src/mp/components/form/textarea/index.wxss +4 -0
  113. package/src/mp/components/form/uploader/index.json +3 -2
  114. package/src/mp/components/form/uploader/index.wxml +11 -7
  115. package/src/mp/components/form/uploader/index.wxss +20 -2
  116. package/src/mp/components/form/uploader/weui-uploader.js +209 -0
  117. package/src/mp/components/form/uploader/weui-uploader.json +7 -0
  118. package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
  119. package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
  120. package/src/mp/components/form/uploaderFile/index.wxss +4 -4
  121. package/src/mp/components/image/index.wxss +3 -2
  122. package/src/mp/components/listView/index.js +5 -16
  123. package/src/mp/components/lottery/index.js +270 -0
  124. package/src/mp/components/lottery/index.json +4 -0
  125. package/src/mp/components/lottery/index.wxml +43 -0
  126. package/src/mp/components/lottery/index.wxss +317 -0
  127. package/src/mp/components/wxOpenApi/phone/index.js +1 -1
  128. package/src/mp/index.json +4 -3
  129. package/src/mp/style/weda-ui.wxss +14 -0
  130. package/src/mp/utils/constant.js +15 -0
  131. package/src/mp/utils/lodash.js +2 -0
  132. package/src/web/components/button/index.tsx +7 -7
  133. package/src/web/components/calendar/index.jsx +1 -1
  134. package/src/web/components/carousel/index.tsx +8 -8
  135. package/src/web/components/chart/common/config/line.js +1 -1
  136. package/src/web/components/form/checkbox/index.tsx +6 -0
  137. package/src/web/components/form/form/index.css +5 -1
  138. package/src/web/components/form/form/index.tsx +3 -1
  139. package/src/web/components/form/formcell/index.css +22 -1
  140. package/src/web/components/form/formcell/index.tsx +11 -6
  141. package/src/web/components/form/input/index.css +7 -12
  142. package/src/web/components/form/location/components/LocationH5/index.css +4 -7
  143. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
  144. package/src/web/components/form/radio/index.tsx +6 -0
  145. package/src/web/components/form/select/h5.tsx +5 -24
  146. package/src/web/components/form/select/index.css +11 -0
  147. package/src/web/components/form/select/index.tsx +4 -17
  148. package/src/web/components/form/textarea/index.css +4 -0
  149. package/src/web/components/form/textarea/index.tsx +2 -2
  150. package/src/web/components/form/tips/index.css +4 -0
  151. package/src/web/components/form/tips/index.tsx +4 -3
  152. package/src/web/components/form/uploader/index.css +26 -2
  153. package/src/web/components/form/uploader/uploader.h5.tsx +81 -56
  154. package/src/web/components/form/uploaderFile/index.css +2 -4
  155. package/src/web/components/image/index.css +5 -5
  156. package/src/web/components/image/index.tsx +6 -7
  157. package/src/web/components/index.js +1 -0
  158. package/src/web/components/link/index.tsx +2 -2
  159. package/src/web/components/listView/index.tsx +6 -19
  160. package/src/web/components/lottery/index.css +327 -0
  161. package/src/web/components/lottery/index.tsx +567 -0
  162. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  163. package/src/web/components/navLayout/index.tsx +2 -2
  164. package/src/web/components/navigationBar/index.tsx +0 -1
  165. package/src/web/components/picker/timePicker.tsx +2 -2
  166. package/src/web/components/slot/index.tsx +1 -1
  167. package/src/web/components/text/index.tsx +6 -6
  168. package/src/web/utils/{constant.js → constant.ts} +17 -2
  169. package/src/web/utils/lodash.ts +2 -0
  170. package/src/web/weda-ui.css +5 -1
@@ -0,0 +1,327 @@
1
+ /* pc style start */
2
+ .weda-lottery {
3
+ width: 326px;
4
+ height: 326px;
5
+ position: relative;
6
+ }
7
+ .weda-lottery .weda-lottery__wrap {
8
+ position: relative;
9
+ width: 100%;
10
+ height: 100%;
11
+ background: #FF465C;
12
+ border: 1px solid rgba(255, 255, 255, 0.6);
13
+ box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0.5);
14
+ border-radius: 10px;
15
+ }
16
+
17
+ .weda-lottery .weda-lottery__dot-top {
18
+ position: absolute;
19
+ top: 4px;
20
+ left: calc((100% - 217px) / 2);
21
+ }
22
+
23
+ .weda-lottery .weda-lottery__dot-bottom {
24
+ position: absolute;
25
+ bottom: 4px;
26
+ left: calc((100% - 217px) / 2);
27
+ }
28
+
29
+ .weda-lottery .weda-lottery__dot-left {
30
+ position: absolute;
31
+ left: 4px;
32
+ top: calc((100% - 217px) / 2);
33
+ }
34
+
35
+ .weda-lottery .weda-lottery__dot-right {
36
+ position: absolute;
37
+ right: 4px;
38
+ top: calc((100% - 217px) / 2);
39
+ }
40
+
41
+ .weda-lottery .weda-lottery__dot {
42
+ display: flex;
43
+ }
44
+
45
+ .weda-lottery .weda-lottery__dot-horizontal {
46
+ flex-direction: row;
47
+ }
48
+
49
+ .weda-lottery .weda-lottery__dot-vertical {
50
+ flex-direction: column;
51
+ }
52
+
53
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item,
54
+ .weda-lottery .weda-lottery__dot-single {
55
+ width: 9px;
56
+ height: 9px;
57
+ box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
58
+ border-radius: 50%;
59
+ background: #FFFFFF;
60
+ }
61
+
62
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(odd) {
63
+ background: #FFEE52;
64
+ }
65
+
66
+ .weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(even) {
67
+ background: #FFFFFF
68
+ }
69
+
70
+ .weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item {
71
+ margin-right: 43px;
72
+ }
73
+
74
+ .weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item:last-child {
75
+ margin-right: 0 !important;
76
+ }
77
+
78
+ .weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item {
79
+ margin-bottom: 43px;
80
+ }
81
+
82
+ .weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item:last-child {
83
+ margin-bottom: 0 !important;
84
+ }
85
+
86
+ .weda-lottery .weda-lottery__dot-left-top {
87
+ position: absolute;
88
+ top: 9px;
89
+ left: 6px;
90
+ }
91
+
92
+ .weda-lottery .weda-lottery__dot-right-top {
93
+ position: absolute;
94
+ top: 9px;
95
+ right: 6px;
96
+ }
97
+
98
+ .weda-lottery .weda-lottery__dot-left-bottom {
99
+ position: absolute;
100
+ left: 6px;
101
+ bottom: 9px;
102
+ }
103
+
104
+ .weda-lottery .weda-lottery__dot-right-bottom {
105
+ position: absolute;
106
+ right: 6px;
107
+ bottom: 9px;
108
+ }
109
+
110
+ .weda-lottery .weda-lottery__inner {
111
+ padding: 18px;
112
+ width: 100%;
113
+ height: 100%;
114
+ box-sizing: border-box;
115
+ }
116
+
117
+ .weda-lottery .weda-lottery__inner .weda-lottery__inner-wrap {
118
+ position: relative;
119
+ width: 100%;
120
+ box-sizing: border-box;
121
+ background: linear-gradient(180deg, #DD0D00 0%, #D80027 100%);
122
+ border: 1px solid rgba(255, 255, 255, 0.25);
123
+ box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0.5);
124
+ border-radius: 10px;
125
+ height: 100%;
126
+ }
127
+
128
+ .weda-lottery .weda-lottery__inner .weda-lottery__list {
129
+ position: absolute;
130
+ top: 0;
131
+ left: 0;
132
+ right: 0;
133
+ bottom: 0;
134
+ z-index: 1;
135
+ box-sizing: border-box;
136
+ }
137
+
138
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item {
139
+ position: absolute;
140
+ width: calc((100% - 32px)/ 3);
141
+ height: calc((100% - 32px)/ 3);
142
+ font-size: 0;
143
+ text-align: center;
144
+ background: #FFF8EE;
145
+ box-shadow: inset 0px -2px 0px #FFDDBD;
146
+ border-radius: 8px;
147
+ }
148
+
149
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived {
150
+ background: #FFF8EE;
151
+ box-shadow: 0px 0px 6px #FFFFFF;
152
+ }
153
+
154
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected {
155
+ background: #FF6666;
156
+ box-shadow: inset 0px -2px 0px #FFA4A4;
157
+ }
158
+
159
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:first-child {
160
+ top: 8px;
161
+ left: 8px;
162
+ }
163
+
164
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(2) {
165
+ top: 8px;
166
+ left: calc((100% - 32px)/ 3 + 16px);
167
+ }
168
+
169
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(3) {
170
+ top: 8px;
171
+ right: 8px;
172
+ }
173
+
174
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(4) {
175
+ top: calc((100% - 32px)/ 3 + 16px);
176
+ right: 8px;
177
+ }
178
+
179
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(5) {
180
+ bottom: 8px;
181
+ right: 8px;
182
+ }
183
+
184
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(6) {
185
+ bottom: 8px;
186
+ left: calc((100% - 32px)/ 3 + 16px);
187
+ }
188
+
189
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(7) {
190
+ bottom: 8px;
191
+ left: 8px;
192
+ }
193
+
194
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(8) {
195
+ bottom: calc((100% - 32px)/ 3 + 16px);
196
+ left: 8px;
197
+ }
198
+
199
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell {
200
+ width: 100%;
201
+ height: 100%;
202
+ max-width: 100%;
203
+ max-height: 100%;
204
+ box-sizing: border-box;
205
+ border-style: solid;
206
+ border-color: transparent;
207
+ border-radius: 8px;
208
+ display: flex;
209
+ flex-direction: column;
210
+ align-items: center;
211
+ }
212
+
213
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived .weda-lottery__turntable-cell {
214
+ border-color: #FFE05F;
215
+ }
216
+
217
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-image {
218
+ height: 40px;
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ }
223
+
224
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-icon {
225
+ display: block;
226
+ width: 40px;
227
+ height: 40px;
228
+ object-fit: contain;
229
+ }
230
+
231
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-desc {
232
+ margin-top: 6px;
233
+ font-weight: 400;
234
+ font-size: 12px;
235
+ line-height: 17px;
236
+ text-align: center;
237
+ color: #BA0000;
238
+ white-space: nowrap;
239
+ text-overflow: ellipsis;
240
+ overflow: hidden;
241
+ width: 100%;
242
+ }
243
+
244
+ .weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected .weda-lottery__turntable-cell-desc {
245
+ color: #FFFFFF;
246
+ }
247
+
248
+ .weda-lottery .weda-lottery__turntable-btn {
249
+ z-index: 2;
250
+ position: absolute;
251
+ width: calc((100% - 32px)/ 3);
252
+ height: calc((100% - 32px)/ 3);
253
+ top: calc((100% - 32px)/ 3 + 16px);
254
+ left: calc((100% - 32px)/ 3 + 16px);
255
+ background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
256
+ box-shadow: inset 0px -2px 0px #FF7A00;
257
+ border-radius: 50%;
258
+ }
259
+
260
+ .weda-lottery .weda-lottery__turntable-btn.is-actived {
261
+ background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
262
+ box-shadow: inset 0px 2px 0px #FFFFFF;
263
+ }
264
+
265
+ .weda-lottery .weda-lottery__btn-inner {
266
+ padding: 9px;
267
+ width: 100%;
268
+ height: 100%;
269
+ }
270
+
271
+ .weda-lottery .weda-lottery__btn {
272
+ width: 100%;
273
+ height: 100%;
274
+ background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
275
+ box-shadow: inset 0px 0px 8px rgba(234, 27, 53, 0.5);
276
+ border-radius: 50%;
277
+ display: flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ }
281
+
282
+ .weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn {
283
+ background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
284
+ box-shadow: inset 0px 0px 8px rgba(234, 27, 53, 0.5);
285
+ }
286
+
287
+ .weda-lottery .weda-lottery__btn-image {
288
+ padding: 11px 15px;
289
+ width: 100%;
290
+ height: 100%;
291
+ box-sizing: border-box;
292
+ display: flex;
293
+ align-items: center;
294
+ text-decoration: none
295
+ }
296
+
297
+ .weda-lottery .weda-lottery__btn-image .weda-lottery__btn-text {
298
+ font-weight: 600;
299
+ font-size: 18px;
300
+ line-height: 22px;
301
+ text-align: center;
302
+ color: #FFFFFF;
303
+ text-shadow: 0px 0.5px 0px #E42B27;
304
+ max-height: 100%;
305
+ display: -webkit-box;
306
+ overflow: hidden;
307
+ text-overflow: ellipsis;
308
+ -webkit-box-orient: vertical;
309
+ -webkit-line-clamp: 2;
310
+ width: 100%;
311
+ }
312
+
313
+ .weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn-image {
314
+ opacity: 0.6;
315
+ }
316
+ /* pc style end */
317
+
318
+ /* mobile style start */
319
+ .weda-lottery-mobile {
320
+ width: 100%;
321
+ }
322
+
323
+ .weda-lottery-mobile .weda-lottery__wrap,
324
+ .weda-lottery-mobile .weda-lottery__content {
325
+ width: 100%;
326
+ }
327
+ /* mobile style end */