@varlet/ui 2.3.1 → 2.4.0-alpha.1670751751241
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/es/app-bar/AppBar.js +1 -1
- package/es/app-bar/appBar.css +1 -1
- package/es/app-bar/props.js +4 -0
- package/es/card/Card.js +1 -1
- package/es/index.js +15 -0
- package/es/loading-bar/LoadingBar.js +33 -0
- package/es/loading-bar/index.js +66 -0
- package/es/loading-bar/loadingBar.css +1 -0
- package/es/loading-bar/props.js +26 -0
- package/es/loading-bar/style/index.js +2 -0
- package/es/overlay/Overlay.js +83 -0
- package/es/overlay/index.js +8 -0
- package/es/overlay/overlay.css +1 -0
- package/es/overlay/props.js +19 -0
- package/es/overlay/style/index.js +2 -0
- package/es/popup/Popup.js +1 -1
- package/es/popup/popup.css +1 -1
- package/es/popup/props.js +4 -0
- package/es/result/Empty.js +23 -0
- package/es/result/Error.js +23 -0
- package/es/result/Info.js +23 -0
- package/es/result/Question.js +23 -0
- package/es/result/Result.js +95 -0
- package/es/result/ResultSfc.css +0 -0
- package/es/result/Success.js +74 -0
- package/es/result/Warning.js +23 -0
- package/es/result/index.js +8 -0
- package/es/result/props.js +24 -0
- package/es/result/result.css +1 -0
- package/es/result/style/index.js +3 -0
- package/es/style.css +1 -1
- package/es/style.js +3 -0
- package/es/themes/dark/index.js +2 -1
- package/es/themes/dark/result.js +9 -0
- package/es/umdIndex.js +15 -0
- package/es/utils/elements.js +11 -7
- package/es/varlet.esm.js +5272 -4795
- package/highlight/attributes.json +41 -1
- package/highlight/tags.json +22 -1
- package/highlight/web-types.json +139 -2
- package/lib/app-bar/AppBar.js +1 -1
- package/lib/app-bar/appBar.css +1 -1
- package/lib/app-bar/props.js +4 -0
- package/lib/card/Card.js +1 -1
- package/lib/index.js +9 -0
- package/lib/loading-bar/LoadingBar.js +49 -0
- package/lib/loading-bar/index.js +78 -0
- package/lib/loading-bar/loadingBar.css +1 -0
- package/lib/loading-bar/props.js +31 -0
- package/lib/loading-bar/style/index.js +2 -0
- package/lib/overlay/Overlay.js +96 -0
- package/lib/overlay/index.js +17 -0
- package/lib/overlay/overlay.css +1 -0
- package/lib/overlay/props.js +24 -0
- package/lib/overlay/style/index.js +2 -0
- package/lib/popup/Popup.js +1 -1
- package/lib/popup/popup.css +1 -1
- package/lib/popup/props.js +4 -0
- package/lib/result/Empty.js +32 -0
- package/lib/result/Error.js +32 -0
- package/lib/result/Info.js +32 -0
- package/lib/result/Question.js +32 -0
- package/lib/result/Result.js +117 -0
- package/lib/result/ResultSfc.css +0 -0
- package/lib/result/Success.js +86 -0
- package/lib/result/Warning.js +32 -0
- package/lib/result/index.js +17 -0
- package/lib/result/props.js +30 -0
- package/lib/result/result.css +1 -0
- package/lib/result/style/index.js +3 -0
- package/lib/style.css +1 -1
- package/lib/style.js +3 -0
- package/lib/themes/dark/index.js +3 -1
- package/lib/themes/dark/result.js +14 -0
- package/lib/utils/elements.js +18 -8
- package/package.json +6 -7
- package/types/appBar.d.ts +1 -0
- package/types/index.d.ts +6 -0
- package/types/loadingBar.d.ts +18 -0
- package/types/overlay.d.ts +19 -0
- package/types/popup.d.ts +2 -2
- package/types/result.d.ts +25 -0
- package/umd/varlet.js +7 -7
- package/CHANGELOG.md +0 -1885
package/es/style.js
CHANGED
|
@@ -31,9 +31,11 @@ import './lazy/style'
|
|
|
31
31
|
import './link/style'
|
|
32
32
|
import './list/style'
|
|
33
33
|
import './loading/style'
|
|
34
|
+
import './loading-bar/style'
|
|
34
35
|
import './locale/style'
|
|
35
36
|
import './menu/style'
|
|
36
37
|
import './option/style'
|
|
38
|
+
import './overlay/style'
|
|
37
39
|
import './pagination/style'
|
|
38
40
|
import './picker/style'
|
|
39
41
|
import './popup/style'
|
|
@@ -42,6 +44,7 @@ import './pull-refresh/style'
|
|
|
42
44
|
import './radio/style'
|
|
43
45
|
import './radio-group/style'
|
|
44
46
|
import './rate/style'
|
|
47
|
+
import './result/style'
|
|
45
48
|
import './ripple/style'
|
|
46
49
|
import './row/style'
|
|
47
50
|
import './select/style'
|
package/es/themes/dark/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import picker from './picker';
|
|
|
17
17
|
import popup from './popup';
|
|
18
18
|
import pullRefresh from './pullRefresh';
|
|
19
19
|
import radio from './radio';
|
|
20
|
+
import result from './result';
|
|
20
21
|
import select from './select';
|
|
21
22
|
import skeleton from './skeleton';
|
|
22
23
|
import steps from './steps';
|
|
@@ -41,4 +42,4 @@ export default _extends({
|
|
|
41
42
|
'--color-danger': '#ef5350',
|
|
42
43
|
'--color-disabled': '#404040',
|
|
43
44
|
'--color-text-disabled': '#757575'
|
|
44
|
-
}, button, cell, card, timePicker, datePicker, skeleton, tabs, tab, popup, dialog, actionSheet, chip, badge, uploader, collapse, pullRefresh, switchThemes, steps, pagination, table, input, select, radio, checkbox, divider, picker, appBar, bottomNavigation, bottomNavigationItem, menu);
|
|
45
|
+
}, button, cell, card, timePicker, datePicker, skeleton, tabs, tab, popup, dialog, actionSheet, chip, badge, uploader, collapse, pullRefresh, switchThemes, steps, pagination, table, input, select, radio, checkbox, divider, picker, appBar, bottomNavigation, bottomNavigationItem, menu, result);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'--result-background': '#303030',
|
|
3
|
+
'--result-title-color': '#ffffff',
|
|
4
|
+
'--result-description-color': '#aaaaaa',
|
|
5
|
+
'--result-question-color': '#7f8e96',
|
|
6
|
+
'--result-question-border-color': 'rgba(151,194,216,0.3)',
|
|
7
|
+
'--result-empty-color': '#adadad',
|
|
8
|
+
'--result-empty-border-color': 'rgba(232,229,229,0.3)'
|
|
9
|
+
};
|
package/es/umdIndex.js
CHANGED
|
@@ -31,9 +31,11 @@ import Lazy, * as LazyModule from './lazy'
|
|
|
31
31
|
import Link, * as LinkModule from './link'
|
|
32
32
|
import List, * as ListModule from './list'
|
|
33
33
|
import Loading, * as LoadingModule from './loading'
|
|
34
|
+
import LoadingBar, * as LoadingBarModule from './loading-bar'
|
|
34
35
|
import Locale, * as LocaleModule from './locale'
|
|
35
36
|
import Menu, * as MenuModule from './menu'
|
|
36
37
|
import Option, * as OptionModule from './option'
|
|
38
|
+
import Overlay, * as OverlayModule from './overlay'
|
|
37
39
|
import Pagination, * as PaginationModule from './pagination'
|
|
38
40
|
import Picker, * as PickerModule from './picker'
|
|
39
41
|
import Popup, * as PopupModule from './popup'
|
|
@@ -42,6 +44,7 @@ import PullRefresh, * as PullRefreshModule from './pull-refresh'
|
|
|
42
44
|
import Radio, * as RadioModule from './radio'
|
|
43
45
|
import RadioGroup, * as RadioGroupModule from './radio-group'
|
|
44
46
|
import Rate, * as RateModule from './rate'
|
|
47
|
+
import Result, * as ResultModule from './result'
|
|
45
48
|
import Ripple, * as RippleModule from './ripple'
|
|
46
49
|
import Row, * as RowModule from './row'
|
|
47
50
|
import Select, * as SelectModule from './select'
|
|
@@ -98,9 +101,11 @@ import './lazy/style'
|
|
|
98
101
|
import './link/style'
|
|
99
102
|
import './list/style'
|
|
100
103
|
import './loading/style'
|
|
104
|
+
import './loading-bar/style'
|
|
101
105
|
import './locale/style'
|
|
102
106
|
import './menu/style'
|
|
103
107
|
import './option/style'
|
|
108
|
+
import './overlay/style'
|
|
104
109
|
import './pagination/style'
|
|
105
110
|
import './picker/style'
|
|
106
111
|
import './popup/style'
|
|
@@ -109,6 +114,7 @@ import './pull-refresh/style'
|
|
|
109
114
|
import './radio/style'
|
|
110
115
|
import './radio-group/style'
|
|
111
116
|
import './rate/style'
|
|
117
|
+
import './result/style'
|
|
112
118
|
import './ripple/style'
|
|
113
119
|
import './row/style'
|
|
114
120
|
import './select/style'
|
|
@@ -167,9 +173,11 @@ function install(app) {
|
|
|
167
173
|
Link.install && app.use(Link)
|
|
168
174
|
List.install && app.use(List)
|
|
169
175
|
Loading.install && app.use(Loading)
|
|
176
|
+
LoadingBar.install && app.use(LoadingBar)
|
|
170
177
|
Locale.install && app.use(Locale)
|
|
171
178
|
Menu.install && app.use(Menu)
|
|
172
179
|
Option.install && app.use(Option)
|
|
180
|
+
Overlay.install && app.use(Overlay)
|
|
173
181
|
Pagination.install && app.use(Pagination)
|
|
174
182
|
Picker.install && app.use(Picker)
|
|
175
183
|
Popup.install && app.use(Popup)
|
|
@@ -178,6 +186,7 @@ function install(app) {
|
|
|
178
186
|
Radio.install && app.use(Radio)
|
|
179
187
|
RadioGroup.install && app.use(RadioGroup)
|
|
180
188
|
Rate.install && app.use(Rate)
|
|
189
|
+
Result.install && app.use(Result)
|
|
181
190
|
Ripple.install && app.use(Ripple)
|
|
182
191
|
Row.install && app.use(Row)
|
|
183
192
|
Select.install && app.use(Select)
|
|
@@ -237,9 +246,11 @@ export {
|
|
|
237
246
|
Link,
|
|
238
247
|
List,
|
|
239
248
|
Loading,
|
|
249
|
+
LoadingBar,
|
|
240
250
|
Locale,
|
|
241
251
|
Menu,
|
|
242
252
|
Option,
|
|
253
|
+
Overlay,
|
|
243
254
|
Pagination,
|
|
244
255
|
Picker,
|
|
245
256
|
Popup,
|
|
@@ -248,6 +259,7 @@ export {
|
|
|
248
259
|
Radio,
|
|
249
260
|
RadioGroup,
|
|
250
261
|
Rate,
|
|
262
|
+
Result,
|
|
251
263
|
Ripple,
|
|
252
264
|
Row,
|
|
253
265
|
Select,
|
|
@@ -307,9 +319,11 @@ export default {
|
|
|
307
319
|
Link,
|
|
308
320
|
List,
|
|
309
321
|
Loading,
|
|
322
|
+
LoadingBar,
|
|
310
323
|
Locale,
|
|
311
324
|
Menu,
|
|
312
325
|
Option,
|
|
326
|
+
Overlay,
|
|
313
327
|
Pagination,
|
|
314
328
|
Picker,
|
|
315
329
|
Popup,
|
|
@@ -318,6 +332,7 @@ export default {
|
|
|
318
332
|
Radio,
|
|
319
333
|
RadioGroup,
|
|
320
334
|
Rate,
|
|
335
|
+
Result,
|
|
321
336
|
Ripple,
|
|
322
337
|
Row,
|
|
323
338
|
Select,
|
package/es/utils/elements.js
CHANGED
|
@@ -94,15 +94,19 @@ export function getAllParentScroller(el) {
|
|
|
94
94
|
return allParentScroller;
|
|
95
95
|
} // example 1rem
|
|
96
96
|
|
|
97
|
-
export var isRem = value => isString(value) && value.endsWith('rem'); //
|
|
97
|
+
export var isRem = value => isString(value) && value.endsWith('rem'); // e.g. 1 || 1px
|
|
98
98
|
|
|
99
|
-
export var isPx = value => isString(value) && value.endsWith('px') || isNumber(value); //
|
|
99
|
+
export var isPx = value => isString(value) && value.endsWith('px') || isNumber(value); // e.g. 1%
|
|
100
100
|
|
|
101
|
-
export var isPercent = value => isString(value) && value.endsWith('%'); //
|
|
101
|
+
export var isPercent = value => isString(value) && value.endsWith('%'); // e.g. 1vw
|
|
102
102
|
|
|
103
|
-
export var isVw = value => isString(value) && value.endsWith('vw'); //
|
|
103
|
+
export var isVw = value => isString(value) && value.endsWith('vw'); // e.g. 1vh
|
|
104
104
|
|
|
105
|
-
export var isVh = value => isString(value) && value.endsWith('vh'); //
|
|
105
|
+
export var isVh = value => isString(value) && value.endsWith('vh'); // e.g. calc(1px + 1px)
|
|
106
|
+
|
|
107
|
+
export var isCalc = value => isString(value) && value.startsWith('calc('); // e.g. var(--color-primary)
|
|
108
|
+
|
|
109
|
+
export var isVar = value => isString(value) && value.startsWith('var('); // e.g. return 1
|
|
106
110
|
|
|
107
111
|
export var toPxNum = value => {
|
|
108
112
|
if (isNumber(value)) {
|
|
@@ -133,14 +137,14 @@ export var toPxNum = value => {
|
|
|
133
137
|
|
|
134
138
|
|
|
135
139
|
return 0;
|
|
136
|
-
}; //
|
|
140
|
+
}; // e.g. return 1px 1% 1vw 1vh 1rem null var(--color-primary) calc(1px + 1px)
|
|
137
141
|
|
|
138
142
|
export var toSizeUnit = value => {
|
|
139
143
|
if (value == null) {
|
|
140
144
|
return undefined;
|
|
141
145
|
}
|
|
142
146
|
|
|
143
|
-
if (isPercent(value) || isVw(value) || isVh(value) || isRem(value)) {
|
|
147
|
+
if (isPercent(value) || isVw(value) || isVh(value) || isRem(value) || isCalc(value) || isVar(value)) {
|
|
144
148
|
return value;
|
|
145
149
|
}
|
|
146
150
|
|