@varlet/ui 2.9.3 → 2.9.4-alpha.1679850560801
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/bottom-navigation-item/provide.mjs +2 -1
- package/es/breadcrumb/provide.mjs +2 -1
- package/es/collapse-item/provide.mjs +2 -1
- package/es/index-anchor/provide.mjs +2 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/option/provide.mjs +2 -1
- package/es/select/Select.mjs +2 -1
- package/es/slider/Slider.mjs +3 -2
- package/es/step/provide.mjs +2 -1
- package/es/swipe-item/provide.mjs +2 -1
- package/es/tab/provide.mjs +2 -1
- package/es/tab-item/provide.mjs +2 -1
- package/es/utils/elements.mjs +3 -2
- package/es/utils/logger.mjs +6 -0
- package/es/varlet.esm.js +3361 -3376
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +21 -15
- package/package.json +6 -6
- package/umd/varlet.js +4 -4
package/lib/varlet.cjs.js
CHANGED
|
@@ -140,6 +140,12 @@ var padStart$1 = function(str, maxLength, fillString) {
|
|
|
140
140
|
var repeatCount = Math.floor(len / fillString.length);
|
|
141
141
|
return fillString.repeat(repeatCount) + fillString.slice(0, len % fillString.length) + str;
|
|
142
142
|
};
|
|
143
|
+
function error$1(source, message) {
|
|
144
|
+
throw Error("Varlet [" + source + "]: " + message);
|
|
145
|
+
}
|
|
146
|
+
function warn(source, message) {
|
|
147
|
+
console.warn("Varlet [" + source + "]: " + message);
|
|
148
|
+
}
|
|
143
149
|
function asyncGeneratorStep$e(gen, resolve, reject, _next, _throw, key, arg) {
|
|
144
150
|
try {
|
|
145
151
|
var info = gen[key](arg);
|
|
@@ -251,13 +257,13 @@ function getTarget(target, componentName) {
|
|
|
251
257
|
if (isString(target)) {
|
|
252
258
|
var el = document.querySelector(target);
|
|
253
259
|
if (!el) {
|
|
254
|
-
|
|
260
|
+
error$1(componentName, "target element cannot found");
|
|
255
261
|
}
|
|
256
262
|
return el;
|
|
257
263
|
}
|
|
258
264
|
if (isObject(target))
|
|
259
265
|
return target;
|
|
260
|
-
|
|
266
|
+
error$1(componentName, 'type of prop "target" should be a selector or an element object');
|
|
261
267
|
}
|
|
262
268
|
var isRem = (value) => isString(value) && value.endsWith("rem");
|
|
263
269
|
var isPx = (value) => isString(value) && value.endsWith("px") || isNumber(value);
|
|
@@ -3744,7 +3750,7 @@ function useBottomNavigation() {
|
|
|
3744
3750
|
bindParent
|
|
3745
3751
|
} = useParent(BOTTOM_NAVIGATION_BIND_BOTTOM_NAVIGATION_ITEM_KEY);
|
|
3746
3752
|
if (!bindParent) {
|
|
3747
|
-
|
|
3753
|
+
error$1("BottomNavigationItem", "<var-bottom-navigation-item/> must in <var-bottom-navigation/>");
|
|
3748
3754
|
}
|
|
3749
3755
|
return {
|
|
3750
3756
|
index,
|
|
@@ -3912,7 +3918,7 @@ function useBreadcrumb() {
|
|
|
3912
3918
|
index
|
|
3913
3919
|
} = useParent(BREADCRUMBS_BIND_BREADCRUMB_ITEM_KEY);
|
|
3914
3920
|
if (!bindParent) {
|
|
3915
|
-
|
|
3921
|
+
error$1("Breadcrumb", "<var-breadcrumb/> must in <var-breadcrumbs/>");
|
|
3916
3922
|
}
|
|
3917
3923
|
return {
|
|
3918
3924
|
index,
|
|
@@ -5801,7 +5807,7 @@ function useCollapse() {
|
|
|
5801
5807
|
bindParent
|
|
5802
5808
|
} = useParent(COLLAPSE_BIND_COLLAPSE_ITEM_KEY);
|
|
5803
5809
|
if (!bindParent) {
|
|
5804
|
-
|
|
5810
|
+
error$1("Collapse", "<var-collapse-item/> must in <var-collapse>");
|
|
5805
5811
|
}
|
|
5806
5812
|
return {
|
|
5807
5813
|
index,
|
|
@@ -14432,7 +14438,7 @@ function useSwipe() {
|
|
|
14432
14438
|
parentProvider
|
|
14433
14439
|
} = useParent(SWIPE_BIND_SWIPE_ITEM_KEY);
|
|
14434
14440
|
if (!bindParent) {
|
|
14435
|
-
|
|
14441
|
+
error$1("SwipeItem", "<var-swipe-item/> must in <var-swipe/>");
|
|
14436
14442
|
}
|
|
14437
14443
|
return {
|
|
14438
14444
|
index,
|
|
@@ -15205,7 +15211,7 @@ function useIndexBar() {
|
|
|
15205
15211
|
bindParent
|
|
15206
15212
|
} = useParent(INDEX_BAR_BIND_INDEX_ANCHOR_KEY);
|
|
15207
15213
|
if (!bindParent) {
|
|
15208
|
-
|
|
15214
|
+
error$1("IndexAnchor", 'You should use this component in "IndexBar"');
|
|
15209
15215
|
}
|
|
15210
15216
|
return {
|
|
15211
15217
|
index,
|
|
@@ -16777,7 +16783,7 @@ function useSelect() {
|
|
|
16777
16783
|
bindParent
|
|
16778
16784
|
} = useParent(SELECT_BIND_OPTION_KEY);
|
|
16779
16785
|
if (!bindParent) {
|
|
16780
|
-
|
|
16786
|
+
error$1("Option", "<var-option/> must in <var-select/>");
|
|
16781
16787
|
}
|
|
16782
16788
|
return {
|
|
16783
16789
|
index,
|
|
@@ -20345,7 +20351,7 @@ var __sfc__$g = vue.defineComponent({
|
|
|
20345
20351
|
modelValue
|
|
20346
20352
|
} = props2;
|
|
20347
20353
|
if (multiple2 && !isArray(modelValue)) {
|
|
20348
|
-
|
|
20354
|
+
error$1("Select", "The modelValue must be an array when multiple is true");
|
|
20349
20355
|
}
|
|
20350
20356
|
});
|
|
20351
20357
|
vue.watch(() => props2.modelValue, syncOptions, {
|
|
@@ -21057,11 +21063,11 @@ var __sfc__$e = vue.defineComponent({
|
|
|
21057
21063
|
var stepValidator = () => {
|
|
21058
21064
|
var stepNumber = toNumber(props2.step);
|
|
21059
21065
|
if (isNaN(stepNumber)) {
|
|
21060
|
-
|
|
21066
|
+
warn("Slider", 'type of prop "step" should be Number');
|
|
21061
21067
|
return false;
|
|
21062
21068
|
}
|
|
21063
21069
|
if (stepNumber < 0) {
|
|
21064
|
-
|
|
21070
|
+
warn("Slider", '"step" should be > 0');
|
|
21065
21071
|
return false;
|
|
21066
21072
|
}
|
|
21067
21073
|
return true;
|
|
@@ -21832,7 +21838,7 @@ function useSteps() {
|
|
|
21832
21838
|
bindParent
|
|
21833
21839
|
} = useParent(STEPS_BIND_STEP_KEY);
|
|
21834
21840
|
if (!bindParent) {
|
|
21835
|
-
|
|
21841
|
+
error$1("Steps", "<step/> must in <steps>");
|
|
21836
21842
|
}
|
|
21837
21843
|
return {
|
|
21838
21844
|
index,
|
|
@@ -22423,7 +22429,7 @@ function useTabs() {
|
|
|
22423
22429
|
index
|
|
22424
22430
|
} = useParent(TABS_BIND_TAB_KEY);
|
|
22425
22431
|
if (!bindParent) {
|
|
22426
|
-
|
|
22432
|
+
error$1("Tab", "<var-tab/> must in <var-tabs/>");
|
|
22427
22433
|
}
|
|
22428
22434
|
return {
|
|
22429
22435
|
index,
|
|
@@ -22556,7 +22562,7 @@ function useTabsItems() {
|
|
|
22556
22562
|
index
|
|
22557
22563
|
} = useParent(TABS_ITEMS_BIND_TAB_ITEM_KEY);
|
|
22558
22564
|
if (!bindParent) {
|
|
22559
|
-
|
|
22565
|
+
error$1("TabItem", "<var-tab-item/> must in <var-tabs-items/>");
|
|
22560
22566
|
}
|
|
22561
22567
|
return {
|
|
22562
22568
|
index,
|
|
@@ -25017,7 +25023,7 @@ const TimePickerSfc = "";
|
|
|
25017
25023
|
const TooltipSfc = "";
|
|
25018
25024
|
const uploader = "";
|
|
25019
25025
|
const UploaderSfc = "";
|
|
25020
|
-
const version = "2.9.
|
|
25026
|
+
const version = "2.9.4-alpha.1679850560801";
|
|
25021
25027
|
function install(app) {
|
|
25022
25028
|
ActionSheet.install && app.use(ActionSheet);
|
|
25023
25029
|
AppBar.install && app.use(AppBar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4-alpha.1679850560801",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@popperjs/core": "^2.11.6",
|
|
47
47
|
"dayjs": "^1.10.4",
|
|
48
48
|
"decimal.js": "^10.2.1",
|
|
49
|
-
"@varlet/icons": "2.9.
|
|
50
|
-
"@varlet/shared": "2.9.
|
|
51
|
-
"@varlet/use": "2.9.
|
|
49
|
+
"@varlet/icons": "2.9.4-alpha.1679850560801",
|
|
50
|
+
"@varlet/shared": "2.9.4-alpha.1679850560801",
|
|
51
|
+
"@varlet/use": "2.9.4-alpha.1679850560801"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/jest": "^26.0.15",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"typescript": "^4.4.4",
|
|
64
64
|
"vue": "3.2.25",
|
|
65
65
|
"vue-router": "4.0.12",
|
|
66
|
-
"@varlet/cli": "2.9.
|
|
67
|
-
"@varlet/touch-emulator": "2.9.
|
|
66
|
+
"@varlet/cli": "2.9.4-alpha.1679850560801",
|
|
67
|
+
"@varlet/touch-emulator": "2.9.4-alpha.1679850560801"
|
|
68
68
|
},
|
|
69
69
|
"browserslist": [
|
|
70
70
|
"Chrome >= 54",
|