@varlet/ui 1.27.7 → 1.27.9-alpha.1653036733481
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/badge/Badge.js +1 -1
- package/es/card/Card.js +213 -12
- package/es/card/card.css +1 -1
- package/es/card/card.less +109 -7
- package/es/card/props.js +18 -0
- package/es/col/Col.js +6 -6
- package/es/col/col.css +1 -1
- package/es/col/col.less +27 -2
- package/es/index-bar/IndexBar.js +4 -4
- package/es/index-bar/props.js +1 -1
- package/es/loading/Loading.js +5 -14
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +20 -0
- package/es/picker/Picker.js +10 -7
- package/es/picker/props.js +4 -0
- package/es/progress/Progress.js +14 -11
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +3 -0
- package/es/progress/props.js +1 -1
- package/es/rate/Rate.js +4 -2
- package/es/rate/props.js +2 -4
- package/es/rate/rate.css +1 -1
- package/es/rate/rate.less +7 -0
- package/es/select/Select.js +3 -1
- package/es/slider/Slider.js +10 -9
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/style.css +1 -1
- package/es/switch/Switch.js +22 -19
- package/es/switch/props.js +1 -2
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +18 -4
- package/es/utils/elements.js +13 -0
- package/es/utils/jest.js +19 -0
- package/es/varlet.esm.js +338 -103
- package/highlight/attributes.json +24 -4
- package/highlight/tags.json +6 -1
- package/highlight/web-types.json +58 -5
- package/lib/badge/Badge.js +1 -1
- package/lib/card/Card.js +213 -8
- package/lib/card/card.css +1 -1
- package/lib/card/card.less +109 -7
- package/lib/card/props.js +18 -0
- package/lib/col/Col.js +6 -6
- package/lib/col/col.css +1 -1
- package/lib/col/col.less +27 -2
- package/lib/index-bar/IndexBar.js +3 -3
- package/lib/index-bar/props.js +1 -1
- package/lib/loading/Loading.js +6 -15
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +20 -0
- package/lib/picker/Picker.js +10 -7
- package/lib/picker/props.js +4 -0
- package/lib/progress/Progress.js +15 -11
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +3 -0
- package/lib/progress/props.js +1 -1
- package/lib/rate/Rate.js +3 -1
- package/lib/rate/props.js +2 -4
- package/lib/rate/rate.css +1 -1
- package/lib/rate/rate.less +7 -0
- package/lib/select/Select.js +3 -1
- package/lib/slider/Slider.js +9 -8
- package/lib/snackbar/style/index.js +1 -1
- package/lib/snackbar/style/less.js +1 -1
- package/lib/style.css +1 -1
- package/lib/switch/Switch.js +22 -19
- package/lib/switch/props.js +1 -2
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +18 -4
- package/lib/utils/elements.js +17 -1
- package/lib/utils/jest.js +21 -0
- package/package.json +10 -9
- package/types/card.d.ts +2 -0
- package/types/indexBar.d.ts +1 -1
- package/types/picker.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/es/varlet.esm.js
CHANGED
|
@@ -134,7 +134,7 @@ function kebabCase(str) {
|
|
|
134
134
|
var ret = str.replace(/([A-Z])/g, " $1").trim();
|
|
135
135
|
return ret.split(" ").join("-").toLowerCase();
|
|
136
136
|
}
|
|
137
|
-
function asyncGeneratorStep$
|
|
137
|
+
function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
|
|
138
138
|
try {
|
|
139
139
|
var info = gen[key](arg);
|
|
140
140
|
var value = info.value;
|
|
@@ -148,16 +148,16 @@ function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
148
148
|
Promise.resolve(value).then(_next, _throw);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function _asyncToGenerator$
|
|
151
|
+
function _asyncToGenerator$d(fn) {
|
|
152
152
|
return function() {
|
|
153
153
|
var self = this, args = arguments;
|
|
154
154
|
return new Promise(function(resolve, reject) {
|
|
155
155
|
var gen = fn.apply(self, args);
|
|
156
156
|
function _next(value) {
|
|
157
|
-
asyncGeneratorStep$
|
|
157
|
+
asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, "next", value);
|
|
158
158
|
}
|
|
159
159
|
function _throw(err) {
|
|
160
|
-
asyncGeneratorStep$
|
|
160
|
+
asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, "throw", err);
|
|
161
161
|
}
|
|
162
162
|
_next(void 0);
|
|
163
163
|
});
|
|
@@ -187,7 +187,7 @@ function inViewport(_x) {
|
|
|
187
187
|
return _inViewport.apply(this, arguments);
|
|
188
188
|
}
|
|
189
189
|
function _inViewport() {
|
|
190
|
-
_inViewport = _asyncToGenerator$
|
|
190
|
+
_inViewport = _asyncToGenerator$d(function* (element) {
|
|
191
191
|
yield doubleRaf();
|
|
192
192
|
var {
|
|
193
193
|
top,
|
|
@@ -278,6 +278,17 @@ var toSizeUnit = (value) => {
|
|
|
278
278
|
}
|
|
279
279
|
return toPxNum(value) + "px";
|
|
280
280
|
};
|
|
281
|
+
var multiplySizeUnit = function(value, quantity) {
|
|
282
|
+
if (quantity === void 0) {
|
|
283
|
+
quantity = 1;
|
|
284
|
+
}
|
|
285
|
+
if (value == null) {
|
|
286
|
+
return void 0;
|
|
287
|
+
}
|
|
288
|
+
var legalSize = toSizeUnit(value);
|
|
289
|
+
var unit = legalSize.match(/(vh|%|rem|px|vw)$/)[0];
|
|
290
|
+
return "" + parseFloat(legalSize) * quantity + unit;
|
|
291
|
+
};
|
|
281
292
|
function requestAnimationFrame(fn) {
|
|
282
293
|
return globalThis.requestAnimationFrame ? globalThis.requestAnimationFrame(fn) : globalThis.setTimeout(fn, 16);
|
|
283
294
|
}
|
|
@@ -335,7 +346,7 @@ function supportTouch() {
|
|
|
335
346
|
return inBrowser2 && "ontouchstart" in window;
|
|
336
347
|
}
|
|
337
348
|
var _excluded = ["collect", "clear"];
|
|
338
|
-
function asyncGeneratorStep$
|
|
349
|
+
function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
|
|
339
350
|
try {
|
|
340
351
|
var info = gen[key](arg);
|
|
341
352
|
var value = info.value;
|
|
@@ -349,16 +360,16 @@ function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
349
360
|
Promise.resolve(value).then(_next, _throw);
|
|
350
361
|
}
|
|
351
362
|
}
|
|
352
|
-
function _asyncToGenerator$
|
|
363
|
+
function _asyncToGenerator$c(fn) {
|
|
353
364
|
return function() {
|
|
354
365
|
var self = this, args = arguments;
|
|
355
366
|
return new Promise(function(resolve, reject) {
|
|
356
367
|
var gen = fn.apply(self, args);
|
|
357
368
|
function _next(value) {
|
|
358
|
-
asyncGeneratorStep$
|
|
369
|
+
asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "next", value);
|
|
359
370
|
}
|
|
360
371
|
function _throw(err) {
|
|
361
|
-
asyncGeneratorStep$
|
|
372
|
+
asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "throw", err);
|
|
362
373
|
}
|
|
363
374
|
_next(void 0);
|
|
364
375
|
});
|
|
@@ -545,7 +556,7 @@ function keyInProvides(key) {
|
|
|
545
556
|
function useValidation() {
|
|
546
557
|
var errorMessage = ref("");
|
|
547
558
|
var validate = /* @__PURE__ */ function() {
|
|
548
|
-
var _ref = _asyncToGenerator$
|
|
559
|
+
var _ref = _asyncToGenerator$c(function* (rules, value, apis) {
|
|
549
560
|
if (!isArray(rules) || !rules.length) {
|
|
550
561
|
return true;
|
|
551
562
|
}
|
|
@@ -566,7 +577,7 @@ function useValidation() {
|
|
|
566
577
|
errorMessage.value = "";
|
|
567
578
|
};
|
|
568
579
|
var validateWithTrigger = /* @__PURE__ */ function() {
|
|
569
|
-
var _ref2 = _asyncToGenerator$
|
|
580
|
+
var _ref2 = _asyncToGenerator$c(function* (validateTrigger, trigger, rules, value, apis) {
|
|
570
581
|
if (validateTrigger.includes(trigger)) {
|
|
571
582
|
(yield validate(rules, value, apis)) && (errorMessage.value = "");
|
|
572
583
|
}
|
|
@@ -1090,7 +1101,7 @@ var props$T = {
|
|
|
1090
1101
|
type: Function
|
|
1091
1102
|
}
|
|
1092
1103
|
};
|
|
1093
|
-
function asyncGeneratorStep$
|
|
1104
|
+
function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1094
1105
|
try {
|
|
1095
1106
|
var info = gen[key](arg);
|
|
1096
1107
|
var value = info.value;
|
|
@@ -1104,16 +1115,16 @@ function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1104
1115
|
Promise.resolve(value).then(_next, _throw);
|
|
1105
1116
|
}
|
|
1106
1117
|
}
|
|
1107
|
-
function _asyncToGenerator$
|
|
1118
|
+
function _asyncToGenerator$b(fn) {
|
|
1108
1119
|
return function() {
|
|
1109
1120
|
var self = this, args = arguments;
|
|
1110
1121
|
return new Promise(function(resolve, reject) {
|
|
1111
1122
|
var gen = fn.apply(self, args);
|
|
1112
1123
|
function _next(value) {
|
|
1113
|
-
asyncGeneratorStep$
|
|
1124
|
+
asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "next", value);
|
|
1114
1125
|
}
|
|
1115
1126
|
function _throw(err) {
|
|
1116
|
-
asyncGeneratorStep$
|
|
1127
|
+
asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1117
1128
|
}
|
|
1118
1129
|
_next(void 0);
|
|
1119
1130
|
});
|
|
@@ -1145,7 +1156,7 @@ var Icon = defineComponent({
|
|
|
1145
1156
|
var nextName = ref("");
|
|
1146
1157
|
var shrinking = ref(false);
|
|
1147
1158
|
var handleNameChange = /* @__PURE__ */ function() {
|
|
1148
|
-
var _ref = _asyncToGenerator$
|
|
1159
|
+
var _ref = _asyncToGenerator$b(function* (newName, oldName) {
|
|
1149
1160
|
var {
|
|
1150
1161
|
transition
|
|
1151
1162
|
} = props2;
|
|
@@ -1683,10 +1694,10 @@ function render$W(_ctx, _cache) {
|
|
|
1683
1694
|
key: 0,
|
|
1684
1695
|
class: normalizeClass(_ctx.n("circle"))
|
|
1685
1696
|
}, [createElementVNode("span", {
|
|
1686
|
-
class: normalizeClass(_ctx.n("circle-block")),
|
|
1697
|
+
class: normalizeClass(_ctx.classes(_ctx.n("circle-block"), _ctx.n("circle-block--" + _ctx.size))),
|
|
1687
1698
|
style: normalizeStyle({
|
|
1688
|
-
width: _ctx.
|
|
1689
|
-
height: _ctx.
|
|
1699
|
+
width: _ctx.multiplySizeUnit(_ctx.radius, 2),
|
|
1700
|
+
height: _ctx.multiplySizeUnit(_ctx.radius, 2),
|
|
1690
1701
|
color: _ctx.color
|
|
1691
1702
|
})
|
|
1692
1703
|
}, _hoisted_2$7, 6)], 2)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.loadingTypeDict, (nums, key) => {
|
|
@@ -1726,15 +1737,6 @@ var Loading = defineComponent({
|
|
|
1726
1737
|
rect: 8,
|
|
1727
1738
|
disappear: 3
|
|
1728
1739
|
};
|
|
1729
|
-
var sizeDict = {
|
|
1730
|
-
mini: 9,
|
|
1731
|
-
small: 12,
|
|
1732
|
-
normal: 15,
|
|
1733
|
-
large: 18
|
|
1734
|
-
};
|
|
1735
|
-
var getRadius = computed(() => {
|
|
1736
|
-
return props2.radius ? toNumber(props2.radius) : sizeDict[props2.size];
|
|
1737
|
-
});
|
|
1738
1740
|
var isShow = computed(() => {
|
|
1739
1741
|
if (!call(slots.default))
|
|
1740
1742
|
return true;
|
|
@@ -1743,8 +1745,8 @@ var Loading = defineComponent({
|
|
|
1743
1745
|
return {
|
|
1744
1746
|
n: n$Z,
|
|
1745
1747
|
classes: classes$O,
|
|
1748
|
+
multiplySizeUnit,
|
|
1746
1749
|
loadingTypeDict,
|
|
1747
|
-
getRadius,
|
|
1748
1750
|
isShow
|
|
1749
1751
|
};
|
|
1750
1752
|
}
|
|
@@ -2110,7 +2112,7 @@ var Badge = defineComponent({
|
|
|
2110
2112
|
icon: icon2
|
|
2111
2113
|
} = props2;
|
|
2112
2114
|
var positionBasic = slots.default && n$W("position") + " " + n$W("--" + position);
|
|
2113
|
-
var dotClass = dot
|
|
2115
|
+
var dotClass = dot ? n$W("dot") : null;
|
|
2114
2116
|
var positionClass = getPositionClass();
|
|
2115
2117
|
var iconClass = icon2 ? n$W("icon") : null;
|
|
2116
2118
|
return [n$W("--" + type), positionBasic, dotClass, positionClass, iconClass];
|
|
@@ -2540,6 +2542,24 @@ var props$K = {
|
|
|
2540
2542
|
height: {
|
|
2541
2543
|
type: [String, Number]
|
|
2542
2544
|
},
|
|
2545
|
+
width: {
|
|
2546
|
+
type: [String, Number]
|
|
2547
|
+
},
|
|
2548
|
+
layout: {
|
|
2549
|
+
type: String,
|
|
2550
|
+
default: "column"
|
|
2551
|
+
},
|
|
2552
|
+
floating: {
|
|
2553
|
+
type: Boolean,
|
|
2554
|
+
default: false
|
|
2555
|
+
},
|
|
2556
|
+
"onUpdate:floating": {
|
|
2557
|
+
type: Function
|
|
2558
|
+
},
|
|
2559
|
+
floatingDuration: {
|
|
2560
|
+
type: Number,
|
|
2561
|
+
default: 250
|
|
2562
|
+
},
|
|
2543
2563
|
alt: {
|
|
2544
2564
|
type: String
|
|
2545
2565
|
},
|
|
@@ -2563,28 +2583,78 @@ var props$K = {
|
|
|
2563
2583
|
type: Function
|
|
2564
2584
|
}
|
|
2565
2585
|
};
|
|
2586
|
+
function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2587
|
+
try {
|
|
2588
|
+
var info = gen[key](arg);
|
|
2589
|
+
var value = info.value;
|
|
2590
|
+
} catch (error) {
|
|
2591
|
+
reject(error);
|
|
2592
|
+
return;
|
|
2593
|
+
}
|
|
2594
|
+
if (info.done) {
|
|
2595
|
+
resolve(value);
|
|
2596
|
+
} else {
|
|
2597
|
+
Promise.resolve(value).then(_next, _throw);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
function _asyncToGenerator$a(fn) {
|
|
2601
|
+
return function() {
|
|
2602
|
+
var self = this, args = arguments;
|
|
2603
|
+
return new Promise(function(resolve, reject) {
|
|
2604
|
+
var gen = fn.apply(self, args);
|
|
2605
|
+
function _next(value) {
|
|
2606
|
+
asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "next", value);
|
|
2607
|
+
}
|
|
2608
|
+
function _throw(err) {
|
|
2609
|
+
asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "throw", err);
|
|
2610
|
+
}
|
|
2611
|
+
_next(void 0);
|
|
2612
|
+
});
|
|
2613
|
+
};
|
|
2614
|
+
}
|
|
2566
2615
|
var {
|
|
2567
2616
|
n: n$T,
|
|
2568
2617
|
classes: classes$I
|
|
2569
2618
|
} = createNamespace("card");
|
|
2619
|
+
var RIPPLE_DELAY = 500;
|
|
2570
2620
|
var _hoisted_1$g = ["src", "alt"];
|
|
2571
2621
|
function render$Q(_ctx, _cache) {
|
|
2622
|
+
var _component_var_icon = resolveComponent("var-icon");
|
|
2623
|
+
var _component_var_button = resolveComponent("var-button");
|
|
2572
2624
|
var _directive_ripple = resolveDirective("ripple");
|
|
2573
|
-
return
|
|
2574
|
-
|
|
2625
|
+
return openBlock(), createElementBlock("div", {
|
|
2626
|
+
ref: "card",
|
|
2627
|
+
class: normalizeClass(_ctx.classes(_ctx.n(), [_ctx.isRow, _ctx.n("--layout-row")])),
|
|
2575
2628
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
2576
2629
|
return _ctx.onClick && _ctx.onClick(...arguments);
|
|
2577
2630
|
})
|
|
2631
|
+
}, [withDirectives((openBlock(), createElementBlock("div", {
|
|
2632
|
+
ref: "cardFloater",
|
|
2633
|
+
class: normalizeClass(_ctx.classes(_ctx.n("floater"), [_ctx.elevation, "var-elevation--" + _ctx.elevation, "var-elevation--1"])),
|
|
2634
|
+
style: normalizeStyle({
|
|
2635
|
+
width: _ctx.floaterWidth,
|
|
2636
|
+
height: _ctx.floaterHeight,
|
|
2637
|
+
top: _ctx.floaterTop,
|
|
2638
|
+
left: _ctx.floaterLeft,
|
|
2639
|
+
overflow: _ctx.floaterOverflow,
|
|
2640
|
+
position: _ctx.floaterPosition,
|
|
2641
|
+
borderRadius: _ctx.floating ? "0px" : void 0,
|
|
2642
|
+
zIndex: _ctx.floated ? _ctx.zIndex : void 0,
|
|
2643
|
+
transition: _ctx.floated ? "background-color " + _ctx.floatingDuration + "ms, border-radius " + _ctx.floatingDuration + "ms, width " + _ctx.floatingDuration + "ms, height " + _ctx.floatingDuration + "ms, top " + _ctx.floatingDuration + "ms, left " + _ctx.floatingDuration + "ms" : void 0
|
|
2644
|
+
})
|
|
2578
2645
|
}, [renderSlot(_ctx.$slots, "image", {}, () => [_ctx.src ? (openBlock(), createElementBlock("img", {
|
|
2579
2646
|
key: 0,
|
|
2580
2647
|
class: normalizeClass(_ctx.n("image")),
|
|
2581
2648
|
style: normalizeStyle({
|
|
2582
2649
|
objectFit: _ctx.fit,
|
|
2583
|
-
height: _ctx.toSizeUnit(_ctx.height)
|
|
2650
|
+
height: _ctx.toSizeUnit(_ctx.height),
|
|
2651
|
+
width: _ctx.toSizeUnit(_ctx.width)
|
|
2584
2652
|
}),
|
|
2585
2653
|
src: _ctx.src,
|
|
2586
2654
|
alt: _ctx.alt
|
|
2587
|
-
}, null, 14, _hoisted_1$g)) : createCommentVNode("v-if", true)]),
|
|
2655
|
+
}, null, 14, _hoisted_1$g)) : createCommentVNode("v-if", true)]), createElementVNode("div", {
|
|
2656
|
+
class: normalizeClass(_ctx.n("container"))
|
|
2657
|
+
}, [renderSlot(_ctx.$slots, "title", {}, () => [_ctx.title ? (openBlock(), createElementBlock("div", {
|
|
2588
2658
|
key: 0,
|
|
2589
2659
|
class: normalizeClass(_ctx.n("title"))
|
|
2590
2660
|
}, toDisplayString(_ctx.title), 3)) : createCommentVNode("v-if", true)]), renderSlot(_ctx.$slots, "subtitle", {}, () => [_ctx.subtitle ? (openBlock(), createElementBlock("div", {
|
|
@@ -2596,9 +2666,42 @@ function render$Q(_ctx, _cache) {
|
|
|
2596
2666
|
}, toDisplayString(_ctx.description), 3)) : createCommentVNode("v-if", true)]), _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
|
2597
2667
|
key: 0,
|
|
2598
2668
|
class: normalizeClass(_ctx.n("footer"))
|
|
2599
|
-
}, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)
|
|
2600
|
-
|
|
2601
|
-
|
|
2669
|
+
}, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true), _ctx.$slots.content && !_ctx.isRow ? (openBlock(), createElementBlock("div", {
|
|
2670
|
+
key: 1,
|
|
2671
|
+
class: normalizeClass(_ctx.n("content")),
|
|
2672
|
+
style: normalizeStyle({
|
|
2673
|
+
height: _ctx.contentHeight,
|
|
2674
|
+
opacity: _ctx.opacity,
|
|
2675
|
+
transition: "opacity " + _ctx.floatingDuration * 2 + "ms"
|
|
2676
|
+
})
|
|
2677
|
+
}, [renderSlot(_ctx.$slots, "content")], 6)) : createCommentVNode("v-if", true)], 2), _ctx.showToolBar ? (openBlock(), createElementBlock("div", {
|
|
2678
|
+
key: 0,
|
|
2679
|
+
class: normalizeClass(_ctx.classes(_ctx.n("toolbar"), "var--box")),
|
|
2680
|
+
style: normalizeStyle({
|
|
2681
|
+
zIndex: _ctx.zIndex,
|
|
2682
|
+
opacity: _ctx.opacity,
|
|
2683
|
+
transition: "opacity " + _ctx.floatingDuration * 2 + "ms"
|
|
2684
|
+
})
|
|
2685
|
+
}, [renderSlot(_ctx.$slots, "toolbar-close", {}, () => [createVNode(_component_var_button, {
|
|
2686
|
+
size: "large",
|
|
2687
|
+
round: "",
|
|
2688
|
+
class: normalizeClass(_ctx.classes(_ctx.n("toolbar-close"), "var-elevation--6")),
|
|
2689
|
+
onClick: withModifiers(_ctx.close, ["stop"])
|
|
2690
|
+
}, {
|
|
2691
|
+
default: withCtx(() => [createVNode(_component_var_icon, {
|
|
2692
|
+
name: "window-close",
|
|
2693
|
+
size: "24px"
|
|
2694
|
+
})]),
|
|
2695
|
+
_: 1
|
|
2696
|
+
}, 8, ["class", "onClick"])]), renderSlot(_ctx.$slots, "toolbar-extra")], 6)) : createCommentVNode("v-if", true)], 6)), [[_directive_ripple, {
|
|
2697
|
+
disabled: !_ctx.ripple || _ctx.floater
|
|
2698
|
+
}]]), createElementVNode("div", {
|
|
2699
|
+
class: normalizeClass(_ctx.n("holder")),
|
|
2700
|
+
style: normalizeStyle({
|
|
2701
|
+
width: _ctx.holderWidth,
|
|
2702
|
+
height: _ctx.holderHeight
|
|
2703
|
+
})
|
|
2704
|
+
}, null, 6)], 2);
|
|
2602
2705
|
}
|
|
2603
2706
|
var Card = defineComponent({
|
|
2604
2707
|
render: render$Q,
|
|
@@ -2606,12 +2709,131 @@ var Card = defineComponent({
|
|
|
2606
2709
|
directives: {
|
|
2607
2710
|
Ripple
|
|
2608
2711
|
},
|
|
2712
|
+
components: {
|
|
2713
|
+
VarIcon: Icon,
|
|
2714
|
+
VarButton: Button
|
|
2715
|
+
},
|
|
2609
2716
|
props: props$K,
|
|
2610
|
-
setup() {
|
|
2717
|
+
setup(props2) {
|
|
2718
|
+
var card2 = ref(null);
|
|
2719
|
+
var cardFloater = ref(null);
|
|
2720
|
+
var holderWidth = ref("auto");
|
|
2721
|
+
var holderHeight = ref("auto");
|
|
2722
|
+
var floaterWidth = ref("100%");
|
|
2723
|
+
var floaterHeight = ref("100%");
|
|
2724
|
+
var floaterTop = ref("auto");
|
|
2725
|
+
var floaterLeft = ref("auto");
|
|
2726
|
+
var floaterPosition = ref("static");
|
|
2727
|
+
var floaterOverflow = ref("hidden");
|
|
2728
|
+
var contentHeight = ref("0px");
|
|
2729
|
+
var opacity = ref("0");
|
|
2730
|
+
var {
|
|
2731
|
+
zIndex
|
|
2732
|
+
} = useZIndex(() => props2.floating, 1);
|
|
2733
|
+
var isRow = computed(() => props2.layout === "row");
|
|
2734
|
+
var showToolBar = ref(false);
|
|
2735
|
+
var floated = ref(false);
|
|
2736
|
+
useLock(() => props2.floating, () => isRow);
|
|
2737
|
+
var dropdownFloaterTop = "auto";
|
|
2738
|
+
var dropdownFloaterLeft = "auto";
|
|
2739
|
+
var dropper = null;
|
|
2740
|
+
var floater = ref(null);
|
|
2741
|
+
var floating = /* @__PURE__ */ function() {
|
|
2742
|
+
var _ref = _asyncToGenerator$a(function* () {
|
|
2743
|
+
clearTimeout(floater.value);
|
|
2744
|
+
clearTimeout(dropper);
|
|
2745
|
+
floater.value = null;
|
|
2746
|
+
floater.value = setTimeout(/* @__PURE__ */ _asyncToGenerator$a(function* () {
|
|
2747
|
+
var {
|
|
2748
|
+
width,
|
|
2749
|
+
height,
|
|
2750
|
+
left,
|
|
2751
|
+
top
|
|
2752
|
+
} = card2.value.getBoundingClientRect();
|
|
2753
|
+
holderWidth.value = toSizeUnit(width);
|
|
2754
|
+
holderHeight.value = toSizeUnit(height);
|
|
2755
|
+
floaterWidth.value = holderWidth.value;
|
|
2756
|
+
floaterHeight.value = holderHeight.value;
|
|
2757
|
+
floaterTop.value = toSizeUnit(top);
|
|
2758
|
+
floaterLeft.value = toSizeUnit(left);
|
|
2759
|
+
floaterPosition.value = "fixed";
|
|
2760
|
+
dropdownFloaterTop = floaterTop.value;
|
|
2761
|
+
dropdownFloaterLeft = floaterLeft.value;
|
|
2762
|
+
showToolBar.value = true;
|
|
2763
|
+
yield doubleRaf();
|
|
2764
|
+
floaterTop.value = "0";
|
|
2765
|
+
floaterLeft.value = "0";
|
|
2766
|
+
floaterWidth.value = "100vw";
|
|
2767
|
+
floaterHeight.value = "100vh";
|
|
2768
|
+
contentHeight.value = "auto";
|
|
2769
|
+
opacity.value = "1";
|
|
2770
|
+
floaterOverflow.value = "auto";
|
|
2771
|
+
floated.value = true;
|
|
2772
|
+
}), props2.ripple ? RIPPLE_DELAY : 0);
|
|
2773
|
+
});
|
|
2774
|
+
return function floating2() {
|
|
2775
|
+
return _ref.apply(this, arguments);
|
|
2776
|
+
};
|
|
2777
|
+
}();
|
|
2778
|
+
var dropdown = () => {
|
|
2779
|
+
clearTimeout(dropper);
|
|
2780
|
+
clearTimeout(floater.value);
|
|
2781
|
+
floater.value = null;
|
|
2782
|
+
floaterWidth.value = holderWidth.value;
|
|
2783
|
+
floaterHeight.value = holderHeight.value;
|
|
2784
|
+
floaterTop.value = dropdownFloaterTop;
|
|
2785
|
+
floaterLeft.value = dropdownFloaterLeft;
|
|
2786
|
+
contentHeight.value = "0px";
|
|
2787
|
+
opacity.value = "0";
|
|
2788
|
+
showToolBar.value = false;
|
|
2789
|
+
dropper = setTimeout(() => {
|
|
2790
|
+
holderWidth.value = "auto";
|
|
2791
|
+
holderHeight.value = "auto";
|
|
2792
|
+
floaterWidth.value = "100%";
|
|
2793
|
+
floaterHeight.value = "100%";
|
|
2794
|
+
floaterTop.value = "auto";
|
|
2795
|
+
floaterLeft.value = "auto";
|
|
2796
|
+
dropdownFloaterTop = "auto";
|
|
2797
|
+
dropdownFloaterLeft = "auto";
|
|
2798
|
+
floaterOverflow.value = "hidden";
|
|
2799
|
+
floaterPosition.value = "static";
|
|
2800
|
+
floated.value = false;
|
|
2801
|
+
}, props2.floatingDuration);
|
|
2802
|
+
};
|
|
2803
|
+
var close = () => {
|
|
2804
|
+
call(props2["onUpdate:floating"], false);
|
|
2805
|
+
};
|
|
2806
|
+
watch(() => props2.floating, (value) => {
|
|
2807
|
+
if (isRow.value)
|
|
2808
|
+
return;
|
|
2809
|
+
nextTick(() => {
|
|
2810
|
+
value ? floating() : dropdown();
|
|
2811
|
+
});
|
|
2812
|
+
}, {
|
|
2813
|
+
immediate: true
|
|
2814
|
+
});
|
|
2611
2815
|
return {
|
|
2612
2816
|
n: n$T,
|
|
2613
2817
|
classes: classes$I,
|
|
2614
|
-
toSizeUnit
|
|
2818
|
+
toSizeUnit,
|
|
2819
|
+
card: card2,
|
|
2820
|
+
cardFloater,
|
|
2821
|
+
holderWidth,
|
|
2822
|
+
holderHeight,
|
|
2823
|
+
floater,
|
|
2824
|
+
floaterWidth,
|
|
2825
|
+
floaterHeight,
|
|
2826
|
+
floaterTop,
|
|
2827
|
+
floaterLeft,
|
|
2828
|
+
floaterPosition,
|
|
2829
|
+
floaterOverflow,
|
|
2830
|
+
contentHeight,
|
|
2831
|
+
opacity,
|
|
2832
|
+
zIndex,
|
|
2833
|
+
isRow,
|
|
2834
|
+
close,
|
|
2835
|
+
showToolBar,
|
|
2836
|
+
floated
|
|
2615
2837
|
};
|
|
2616
2838
|
}
|
|
2617
2839
|
});
|
|
@@ -3368,7 +3590,7 @@ var {
|
|
|
3368
3590
|
} = createNamespace("col");
|
|
3369
3591
|
function render$K(_ctx, _cache) {
|
|
3370
3592
|
return openBlock(), createElementBlock("div", {
|
|
3371
|
-
class: normalizeClass(_ctx.classes(_ctx.n(), "var--box", [_ctx.span, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize("xs", _ctx.xs), ..._ctx.getSize("sm", _ctx.sm), ..._ctx.getSize("md", _ctx.md), ..._ctx.getSize("lg", _ctx.lg), ..._ctx.getSize("xl", _ctx.xl))),
|
|
3593
|
+
class: normalizeClass(_ctx.classes(_ctx.n(), "var--box", [_ctx.span >= 0, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize("xs", _ctx.xs), ..._ctx.getSize("sm", _ctx.sm), ..._ctx.getSize("md", _ctx.md), ..._ctx.getSize("lg", _ctx.lg), ..._ctx.getSize("xl", _ctx.xl))),
|
|
3372
3594
|
style: normalizeStyle({
|
|
3373
3595
|
paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
|
|
3374
3596
|
paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
|
|
@@ -3400,18 +3622,18 @@ var Col = defineComponent({
|
|
|
3400
3622
|
};
|
|
3401
3623
|
var getSize = (mode, size) => {
|
|
3402
3624
|
var classes2 = [];
|
|
3403
|
-
if (
|
|
3625
|
+
if (size == null) {
|
|
3404
3626
|
return classes2;
|
|
3405
3627
|
}
|
|
3406
3628
|
if (isPlainObject(size)) {
|
|
3407
3629
|
var {
|
|
3408
|
-
|
|
3409
|
-
|
|
3630
|
+
offset: _offset,
|
|
3631
|
+
span: _span
|
|
3410
3632
|
} = size;
|
|
3411
|
-
_span && classes2.push(n$N("--span-" + mode + "-" + _span));
|
|
3633
|
+
Number(_span) >= 0 && classes2.push(n$N("--span-" + mode + "-" + _span));
|
|
3412
3634
|
_offset && classes2.push(n$N("--offset-" + mode + "-" + _offset));
|
|
3413
3635
|
} else {
|
|
3414
|
-
classes2.push(n$N("--span-" + mode + "-" + size));
|
|
3636
|
+
Number(size) >= 0 && classes2.push(n$N("--span-" + mode + "-" + size));
|
|
3415
3637
|
}
|
|
3416
3638
|
return classes2;
|
|
3417
3639
|
};
|
|
@@ -10325,7 +10547,7 @@ var props$q = {
|
|
|
10325
10547
|
default: true
|
|
10326
10548
|
},
|
|
10327
10549
|
stickyOffsetTop: {
|
|
10328
|
-
type: Number,
|
|
10550
|
+
type: [String, Number],
|
|
10329
10551
|
default: 0
|
|
10330
10552
|
},
|
|
10331
10553
|
cssMode: {
|
|
@@ -10405,7 +10627,7 @@ function render$r(_ctx, _cache) {
|
|
|
10405
10627
|
style: normalizeStyle({
|
|
10406
10628
|
color: _ctx.active === anchorName && _ctx.highlightColor ? _ctx.highlightColor : ""
|
|
10407
10629
|
}),
|
|
10408
|
-
onClick: ($event) => _ctx.anchorClick(anchorName)
|
|
10630
|
+
onClick: ($event) => _ctx.anchorClick(anchorName, true)
|
|
10409
10631
|
}, toDisplayString(anchorName), 15, _hoisted_1$a);
|
|
10410
10632
|
}), 128))], 6)], 2);
|
|
10411
10633
|
}
|
|
@@ -10426,7 +10648,7 @@ var IndexBar = defineComponent({
|
|
|
10426
10648
|
var active = ref();
|
|
10427
10649
|
var sticky2 = computed(() => props2.sticky);
|
|
10428
10650
|
var cssMode = computed(() => props2.cssMode);
|
|
10429
|
-
var stickyOffsetTop = computed(() => props2.stickyOffsetTop);
|
|
10651
|
+
var stickyOffsetTop = computed(() => toPxNum(props2.stickyOffsetTop));
|
|
10430
10652
|
var zIndex = computed(() => props2.zIndex);
|
|
10431
10653
|
var indexBarProvider = {
|
|
10432
10654
|
active,
|
|
@@ -10498,7 +10720,7 @@ var IndexBar = defineComponent({
|
|
|
10498
10720
|
};
|
|
10499
10721
|
}();
|
|
10500
10722
|
var scrollTo$1 = (index) => {
|
|
10501
|
-
requestAnimationFrame(() => anchorClick(index
|
|
10723
|
+
requestAnimationFrame(() => anchorClick(index));
|
|
10502
10724
|
};
|
|
10503
10725
|
watch(() => length.value, /* @__PURE__ */ _asyncToGenerator$5(function* () {
|
|
10504
10726
|
yield doubleRaf();
|
|
@@ -11778,6 +12000,10 @@ var props$k = _extends$2({
|
|
|
11778
12000
|
},
|
|
11779
12001
|
onCancel: {
|
|
11780
12002
|
type: Function
|
|
12003
|
+
},
|
|
12004
|
+
textFormatter: {
|
|
12005
|
+
type: Function,
|
|
12006
|
+
default: (text) => text
|
|
11781
12007
|
}
|
|
11782
12008
|
}, pickProps(props$U, ["show", "onUpdate:show", "closeOnClickOverlay", "teleport", "onOpen", "onClose", "onOpened", "onClosed", "onClickOverlay", "onRouteChange"]));
|
|
11783
12009
|
var {
|
|
@@ -11862,7 +12088,7 @@ function render$m(_ctx, _cache) {
|
|
|
11862
12088
|
key: t
|
|
11863
12089
|
}, [createElementVNode("div", {
|
|
11864
12090
|
class: normalizeClass(_ctx.n("text"))
|
|
11865
|
-
}, toDisplayString(t), 3)], 6);
|
|
12091
|
+
}, toDisplayString(_ctx.textFormatter(t, c.columnIndex)), 3)], 6);
|
|
11866
12092
|
}), 128))], 46, _hoisted_2$4)], 42, _hoisted_1$7);
|
|
11867
12093
|
}), 128)), createElementVNode("div", {
|
|
11868
12094
|
class: normalizeClass(_ctx.n("picked")),
|
|
@@ -11985,7 +12211,7 @@ var VarPicker = defineComponent({
|
|
|
11985
12211
|
change(scrollColumn);
|
|
11986
12212
|
};
|
|
11987
12213
|
var normalizeNormalColumns = (normalColumns) => {
|
|
11988
|
-
return normalColumns.map((column) => {
|
|
12214
|
+
return normalColumns.map((column, columnIndex) => {
|
|
11989
12215
|
var _normalColumn$initial;
|
|
11990
12216
|
var normalColumn = isArray(column) ? {
|
|
11991
12217
|
texts: column
|
|
@@ -11997,6 +12223,7 @@ var VarPicker = defineComponent({
|
|
|
11997
12223
|
touching: false,
|
|
11998
12224
|
translate: center.value,
|
|
11999
12225
|
index: (_normalColumn$initial = normalColumn.initialIndex) != null ? _normalColumn$initial : 0,
|
|
12226
|
+
columnIndex,
|
|
12000
12227
|
duration: 0,
|
|
12001
12228
|
momentumTime: 0,
|
|
12002
12229
|
column: normalColumn,
|
|
@@ -12009,10 +12236,10 @@ var VarPicker = defineComponent({
|
|
|
12009
12236
|
};
|
|
12010
12237
|
var normalizeCascadeColumns = (cascadeColumns) => {
|
|
12011
12238
|
var scrollColumns2 = [];
|
|
12012
|
-
createChildren(scrollColumns2, cascadeColumns, true);
|
|
12239
|
+
createChildren(scrollColumns2, cascadeColumns, 0, true);
|
|
12013
12240
|
return scrollColumns2;
|
|
12014
12241
|
};
|
|
12015
|
-
var createChildren = function(scrollColumns2, children, initial) {
|
|
12242
|
+
var createChildren = function(scrollColumns2, children, columnIndex, initial) {
|
|
12016
12243
|
if (initial === void 0) {
|
|
12017
12244
|
initial = false;
|
|
12018
12245
|
}
|
|
@@ -12026,6 +12253,7 @@ var VarPicker = defineComponent({
|
|
|
12026
12253
|
touching: false,
|
|
12027
12254
|
translate: center.value,
|
|
12028
12255
|
index,
|
|
12256
|
+
columnIndex,
|
|
12029
12257
|
duration: 0,
|
|
12030
12258
|
momentumTime: 0,
|
|
12031
12259
|
column: {
|
|
@@ -12037,12 +12265,12 @@ var VarPicker = defineComponent({
|
|
|
12037
12265
|
};
|
|
12038
12266
|
scrollColumns2.push(scrollColumn);
|
|
12039
12267
|
scrollTo2(scrollColumn, scrollColumn.index, 0, true);
|
|
12040
|
-
createChildren(scrollColumns2, scrollColumn.columns[scrollColumn.index].children, initial);
|
|
12268
|
+
createChildren(scrollColumns2, scrollColumn.columns[scrollColumn.index].children, columnIndex + 1, initial);
|
|
12041
12269
|
}
|
|
12042
12270
|
};
|
|
12043
12271
|
var rebuildChildren = (scrollColumn) => {
|
|
12044
12272
|
scrollColumns.value.splice(scrollColumns.value.indexOf(scrollColumn) + 1);
|
|
12045
|
-
createChildren(scrollColumns.value, scrollColumn.columns[scrollColumn.index].children);
|
|
12273
|
+
createChildren(scrollColumns.value, scrollColumn.columns[scrollColumn.index].children, scrollColumn.columnIndex + 1);
|
|
12046
12274
|
};
|
|
12047
12275
|
var change = (scrollColumn) => {
|
|
12048
12276
|
var {
|
|
@@ -12108,7 +12336,8 @@ var VarPicker = defineComponent({
|
|
|
12108
12336
|
} = getPicked();
|
|
12109
12337
|
prevIndexes = [...indexes];
|
|
12110
12338
|
}, {
|
|
12111
|
-
immediate: true
|
|
12339
|
+
immediate: true,
|
|
12340
|
+
deep: true
|
|
12112
12341
|
});
|
|
12113
12342
|
return {
|
|
12114
12343
|
n: n$o,
|
|
@@ -12237,7 +12466,7 @@ var props$j = {
|
|
|
12237
12466
|
default: false
|
|
12238
12467
|
},
|
|
12239
12468
|
size: {
|
|
12240
|
-
type: Number,
|
|
12469
|
+
type: [Number, String],
|
|
12241
12470
|
default: 40
|
|
12242
12471
|
},
|
|
12243
12472
|
rotate: {
|
|
@@ -12265,7 +12494,7 @@ function render$l(_ctx, _cache) {
|
|
|
12265
12494
|
}, [createElementVNode("div", mergeProps({
|
|
12266
12495
|
class: _ctx.n("linear-block"),
|
|
12267
12496
|
style: {
|
|
12268
|
-
height: _ctx.lineWidth
|
|
12497
|
+
height: _ctx.toSizeUnit(_ctx.lineWidth)
|
|
12269
12498
|
}
|
|
12270
12499
|
}, _ctx.$attrs), [_ctx.track ? (openBlock(), createElementBlock("div", {
|
|
12271
12500
|
key: 0,
|
|
@@ -12286,8 +12515,8 @@ function render$l(_ctx, _cache) {
|
|
|
12286
12515
|
key: 1,
|
|
12287
12516
|
class: normalizeClass(_ctx.n("circle")),
|
|
12288
12517
|
style: normalizeStyle({
|
|
12289
|
-
width: _ctx.size
|
|
12290
|
-
height: _ctx.size
|
|
12518
|
+
width: _ctx.toSizeUnit(_ctx.size),
|
|
12519
|
+
height: _ctx.toSizeUnit(_ctx.size)
|
|
12291
12520
|
})
|
|
12292
12521
|
}, [(openBlock(), createElementBlock("svg", {
|
|
12293
12522
|
class: normalizeClass(_ctx.n("circle-svg")),
|
|
@@ -12298,22 +12527,22 @@ function render$l(_ctx, _cache) {
|
|
|
12298
12527
|
}, [_ctx.track ? (openBlock(), createElementBlock("circle", {
|
|
12299
12528
|
key: 0,
|
|
12300
12529
|
class: normalizeClass(_ctx.n("circle-background")),
|
|
12301
|
-
cx: _ctx.size
|
|
12302
|
-
cy: _ctx.size
|
|
12530
|
+
cx: _ctx.multiplySizeUnit(_ctx.size, 0.5),
|
|
12531
|
+
cy: _ctx.multiplySizeUnit(_ctx.size, 0.5),
|
|
12303
12532
|
r: _ctx.circleProps.radius,
|
|
12304
12533
|
fill: "transparent",
|
|
12305
|
-
"stroke-width": _ctx.lineWidth,
|
|
12534
|
+
"stroke-width": _ctx.toSizeUnit(_ctx.lineWidth),
|
|
12306
12535
|
style: normalizeStyle({
|
|
12307
12536
|
strokeDasharray: _ctx.circleProps.perimeter,
|
|
12308
12537
|
stroke: _ctx.trackColor
|
|
12309
12538
|
})
|
|
12310
12539
|
}, null, 14, _hoisted_2$3)) : createCommentVNode("v-if", true), createElementVNode("circle", {
|
|
12311
12540
|
class: normalizeClass(_ctx.n("circle-certain")),
|
|
12312
|
-
cx: _ctx.size
|
|
12313
|
-
cy: _ctx.size
|
|
12541
|
+
cx: _ctx.multiplySizeUnit(_ctx.size, 0.5),
|
|
12542
|
+
cy: _ctx.multiplySizeUnit(_ctx.size, 0.5),
|
|
12314
12543
|
r: _ctx.circleProps.radius,
|
|
12315
12544
|
fill: "transparent",
|
|
12316
|
-
"stroke-width": _ctx.lineWidth,
|
|
12545
|
+
"stroke-width": _ctx.toSizeUnit(_ctx.lineWidth),
|
|
12317
12546
|
style: normalizeStyle({
|
|
12318
12547
|
strokeDasharray: _ctx.circleProps.strokeDasharray,
|
|
12319
12548
|
stroke: _ctx.color
|
|
@@ -12344,9 +12573,9 @@ var Progress = defineComponent({
|
|
|
12344
12573
|
lineWidth,
|
|
12345
12574
|
value
|
|
12346
12575
|
} = props2;
|
|
12347
|
-
var viewBox = "0 0 " + size + " " + size;
|
|
12576
|
+
var viewBox = "0 0 " + toPxNum(size) + " " + toPxNum(size);
|
|
12348
12577
|
var roundValue = toNumber(value) > 100 ? 100 : Math.round(toNumber(value));
|
|
12349
|
-
var radius = (size -
|
|
12578
|
+
var radius = (toPxNum(size) - toPxNum(lineWidth)) / 2;
|
|
12350
12579
|
var perimeter = 2 * Math.PI * radius;
|
|
12351
12580
|
var strokeDasharray = roundValue / 100 * perimeter + ", " + perimeter;
|
|
12352
12581
|
return {
|
|
@@ -12360,6 +12589,8 @@ var Progress = defineComponent({
|
|
|
12360
12589
|
return {
|
|
12361
12590
|
n: n$n,
|
|
12362
12591
|
classes: classes$i,
|
|
12592
|
+
toSizeUnit,
|
|
12593
|
+
multiplySizeUnit,
|
|
12363
12594
|
linearProps,
|
|
12364
12595
|
circleProps
|
|
12365
12596
|
};
|
|
@@ -12975,12 +13206,10 @@ var props$f = {
|
|
|
12975
13206
|
default: "star-outline"
|
|
12976
13207
|
},
|
|
12977
13208
|
size: {
|
|
12978
|
-
type: [String, Number]
|
|
12979
|
-
default: "24"
|
|
13209
|
+
type: [String, Number]
|
|
12980
13210
|
},
|
|
12981
13211
|
gap: {
|
|
12982
|
-
type: [String, Number]
|
|
12983
|
-
default: "2"
|
|
13212
|
+
type: [String, Number]
|
|
12984
13213
|
},
|
|
12985
13214
|
namespace: {
|
|
12986
13215
|
type: String
|
|
@@ -13037,13 +13266,15 @@ function render$h(_ctx, _cache) {
|
|
|
13037
13266
|
class: normalizeClass(_ctx.getClass(val)),
|
|
13038
13267
|
onClick: ($event) => _ctx.handleClick(val, $event)
|
|
13039
13268
|
}, [createVNode(_component_var_icon, {
|
|
13269
|
+
class: normalizeClass(_ctx.n("content-icon")),
|
|
13270
|
+
"var-rate-cover": "",
|
|
13040
13271
|
transition: 0,
|
|
13041
13272
|
namespace: _ctx.namespace,
|
|
13042
13273
|
name: _ctx.getIconName(val),
|
|
13043
13274
|
style: normalizeStyle({
|
|
13044
13275
|
fontSize: _ctx.toSizeUnit(_ctx.size)
|
|
13045
13276
|
})
|
|
13046
|
-
}, null, 8, ["namespace", "name", "style"])], 14, _hoisted_1$5)), [[_directive_ripple, {
|
|
13277
|
+
}, null, 8, ["class", "namespace", "name", "style"])], 14, _hoisted_1$5)), [[_directive_ripple, {
|
|
13047
13278
|
disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled || !_ctx.ripple
|
|
13048
13279
|
}]]);
|
|
13049
13280
|
}), 128))], 2), createVNode(_component_var_form_details, {
|
|
@@ -13544,6 +13775,7 @@ var Select = defineComponent({
|
|
|
13544
13775
|
return label2.value;
|
|
13545
13776
|
};
|
|
13546
13777
|
var findLabel = (modelValue) => {
|
|
13778
|
+
var _option$label$value, _option;
|
|
13547
13779
|
var option2 = options.find((_ref2) => {
|
|
13548
13780
|
var {
|
|
13549
13781
|
value
|
|
@@ -13558,7 +13790,7 @@ var Select = defineComponent({
|
|
|
13558
13790
|
return label2.value === modelValue;
|
|
13559
13791
|
});
|
|
13560
13792
|
}
|
|
13561
|
-
return option2.label.value;
|
|
13793
|
+
return (_option$label$value = (_option = option2) == null ? void 0 : _option.label.value) != null ? _option$label$value : "";
|
|
13562
13794
|
};
|
|
13563
13795
|
var computePlaceholderState = () => {
|
|
13564
13796
|
var {
|
|
@@ -13974,8 +14206,8 @@ function render$d(_ctx, _cache) {
|
|
|
13974
14206
|
}, [createElementVNode("div", {
|
|
13975
14207
|
class: normalizeClass(_ctx.classes(_ctx.n("block"), [_ctx.isDisabled, _ctx.n("--disabled")], [_ctx.errorMessage, _ctx.n("--error")])),
|
|
13976
14208
|
style: normalizeStyle({
|
|
13977
|
-
height: _ctx.thumbSize === void 0 ? _ctx.thumbSize :
|
|
13978
|
-
margin: _ctx.thumbSize === void 0 ? _ctx.thumbSize : "0 " + _ctx.
|
|
14209
|
+
height: _ctx.thumbSize === void 0 ? _ctx.thumbSize : _ctx.multiplySizeUnit(_ctx.thumbSize, 3),
|
|
14210
|
+
margin: _ctx.thumbSize === void 0 ? _ctx.thumbSize : "0 " + _ctx.multiplySizeUnit(_ctx.thumbSize, 0.5)
|
|
13979
14211
|
}),
|
|
13980
14212
|
ref: "sliderEl",
|
|
13981
14213
|
onClick: _cache[0] || (_cache[0] = function() {
|
|
@@ -13987,7 +14219,7 @@ function render$d(_ctx, _cache) {
|
|
|
13987
14219
|
class: normalizeClass(_ctx.n("track-background")),
|
|
13988
14220
|
style: normalizeStyle({
|
|
13989
14221
|
background: _ctx.trackColor,
|
|
13990
|
-
height: _ctx.trackHeight
|
|
14222
|
+
height: _ctx.multiplySizeUnit(_ctx.trackHeight)
|
|
13991
14223
|
})
|
|
13992
14224
|
}, null, 6), createElementVNode("div", {
|
|
13993
14225
|
class: normalizeClass(_ctx.n("track-fill")),
|
|
@@ -14010,8 +14242,8 @@ function render$d(_ctx, _cache) {
|
|
|
14010
14242
|
class: normalizeClass(_ctx.n("thumb-block")),
|
|
14011
14243
|
style: normalizeStyle({
|
|
14012
14244
|
background: _ctx.thumbColor,
|
|
14013
|
-
height: _ctx.thumbSize
|
|
14014
|
-
width: _ctx.thumbSize
|
|
14245
|
+
height: _ctx.multiplySizeUnit(_ctx.thumbSize),
|
|
14246
|
+
width: _ctx.multiplySizeUnit(_ctx.thumbSize)
|
|
14015
14247
|
})
|
|
14016
14248
|
}, null, 6), createElementVNode("div", {
|
|
14017
14249
|
class: normalizeClass(_ctx.classes(_ctx.n("thumb-ripple"), [_ctx.thumbsProps[item.enumValue].active, _ctx.n("thumb-ripple--active")])),
|
|
@@ -14023,8 +14255,8 @@ function render$d(_ctx, _cache) {
|
|
|
14023
14255
|
style: normalizeStyle({
|
|
14024
14256
|
background: _ctx.labelColor,
|
|
14025
14257
|
color: _ctx.labelTextColor,
|
|
14026
|
-
height: _ctx.thumbSize === void 0 ? _ctx.thumbSize :
|
|
14027
|
-
width: _ctx.thumbSize === void 0 ? _ctx.thumbSize :
|
|
14258
|
+
height: _ctx.thumbSize === void 0 ? _ctx.thumbSize : _ctx.multiplySizeUnit(_ctx.thumbSize, 2),
|
|
14259
|
+
width: _ctx.thumbSize === void 0 ? _ctx.thumbSize : _ctx.multiplySizeUnit(_ctx.thumbSize, 2)
|
|
14028
14260
|
})
|
|
14029
14261
|
}, [createElementVNode("span", null, toDisplayString(item.value), 1)], 6)])], 46, _hoisted_1$3);
|
|
14030
14262
|
}), 128))], 6), createVNode(_component_var_form_details, {
|
|
@@ -14086,7 +14318,7 @@ var Slider = defineComponent({
|
|
|
14086
14318
|
var getRippleSize = (item) => {
|
|
14087
14319
|
var size;
|
|
14088
14320
|
if (props2.thumbSize !== void 0) {
|
|
14089
|
-
size = thumbsProps[item.enumValue].active ?
|
|
14321
|
+
size = thumbsProps[item.enumValue].active ? multiplySizeUnit(props2.thumbSize, 3) : "0px";
|
|
14090
14322
|
}
|
|
14091
14323
|
return {
|
|
14092
14324
|
height: size,
|
|
@@ -14280,6 +14512,7 @@ var Slider = defineComponent({
|
|
|
14280
14512
|
errorMessage,
|
|
14281
14513
|
thumbsProps,
|
|
14282
14514
|
thumbList,
|
|
14515
|
+
multiplySizeUnit,
|
|
14283
14516
|
toNumber,
|
|
14284
14517
|
getRippleSize,
|
|
14285
14518
|
showLabel,
|
|
@@ -15135,8 +15368,7 @@ var props$6 = {
|
|
|
15135
15368
|
type: String
|
|
15136
15369
|
},
|
|
15137
15370
|
size: {
|
|
15138
|
-
type: [String, Number]
|
|
15139
|
-
default: 20
|
|
15371
|
+
type: [String, Number]
|
|
15140
15372
|
},
|
|
15141
15373
|
rules: {
|
|
15142
15374
|
type: Array
|
|
@@ -15173,16 +15405,16 @@ function render$8(_ctx, _cache) {
|
|
|
15173
15405
|
style: normalizeStyle(_ctx.styleComputed.switch)
|
|
15174
15406
|
}, [createElementVNode("div", {
|
|
15175
15407
|
style: normalizeStyle(_ctx.styleComputed.track),
|
|
15176
|
-
class: normalizeClass(_ctx.classes(_ctx.n("track"), [_ctx.modelValue === _ctx.activeValue, _ctx.n("track
|
|
15408
|
+
class: normalizeClass(_ctx.classes(_ctx.n("track"), [_ctx.modelValue === _ctx.activeValue, _ctx.n("track--active")], [_ctx.errorMessage, _ctx.n("track--error")]))
|
|
15177
15409
|
}, null, 6), withDirectives((openBlock(), createElementBlock("div", {
|
|
15178
|
-
class: normalizeClass(_ctx.n("ripple")),
|
|
15410
|
+
class: normalizeClass(_ctx.classes(_ctx.n("ripple"), [_ctx.modelValue === _ctx.activeValue, _ctx.n("ripple--active")])),
|
|
15179
15411
|
style: normalizeStyle(_ctx.styleComputed.ripple)
|
|
15180
15412
|
}, [createElementVNode("div", {
|
|
15181
15413
|
style: normalizeStyle(_ctx.styleComputed.handle),
|
|
15182
|
-
class: normalizeClass(_ctx.classes(_ctx.n("handle"), "var-elevation--2", [_ctx.modelValue === _ctx.activeValue, _ctx.n("handle
|
|
15414
|
+
class: normalizeClass(_ctx.classes(_ctx.n("handle"), "var-elevation--2", [_ctx.modelValue === _ctx.activeValue, _ctx.n("handle--active")], [_ctx.errorMessage, _ctx.n("handle--error")]))
|
|
15183
15415
|
}, [_ctx.loading ? (openBlock(), createBlock(_component_var_loading, {
|
|
15184
15416
|
key: 0,
|
|
15185
|
-
radius: _ctx.
|
|
15417
|
+
radius: _ctx.radius
|
|
15186
15418
|
}, null, 8, ["radius"])) : createCommentVNode("v-if", true)], 6)], 6)), [[_directive_ripple, {
|
|
15187
15419
|
disabled: !_ctx.ripple || _ctx.disabled || _ctx.loading || _ctx.formDisabled
|
|
15188
15420
|
}]])], 6), createVNode(_component_var_form_details, {
|
|
@@ -15222,35 +15454,38 @@ var Switch = defineComponent({
|
|
|
15222
15454
|
loadingColor,
|
|
15223
15455
|
activeValue
|
|
15224
15456
|
} = props2;
|
|
15225
|
-
var sizeNum = toNumber(size);
|
|
15226
|
-
var switchWidth = sizeNum * 2;
|
|
15227
|
-
var switchHeight = sizeNum * 1.2;
|
|
15228
15457
|
return {
|
|
15229
15458
|
handle: {
|
|
15230
|
-
width: size
|
|
15231
|
-
height: size
|
|
15459
|
+
width: multiplySizeUnit(size),
|
|
15460
|
+
height: multiplySizeUnit(size),
|
|
15232
15461
|
backgroundColor: modelValue === activeValue ? color || "" : closeColor || "",
|
|
15233
15462
|
color: loadingColor && loadingColor
|
|
15234
15463
|
},
|
|
15235
15464
|
ripple: {
|
|
15236
|
-
left: modelValue === activeValue ?
|
|
15465
|
+
left: modelValue === activeValue ? multiplySizeUnit(size, 0.5) : "-" + multiplySizeUnit(size, 0.5),
|
|
15237
15466
|
color: modelValue === activeValue ? color || "" : closeColor || "#999",
|
|
15238
|
-
width:
|
|
15239
|
-
height:
|
|
15467
|
+
width: multiplySizeUnit(size, 2),
|
|
15468
|
+
height: multiplySizeUnit(size, 2)
|
|
15240
15469
|
},
|
|
15241
15470
|
track: {
|
|
15242
|
-
height:
|
|
15243
|
-
width:
|
|
15244
|
-
borderRadius:
|
|
15471
|
+
height: multiplySizeUnit(size, 0.72),
|
|
15472
|
+
width: multiplySizeUnit(size, 1.9),
|
|
15473
|
+
borderRadius: multiplySizeUnit(size, 2 / 3),
|
|
15245
15474
|
filter: modelValue === activeValue || errorMessage != null && errorMessage.value ? "opacity(.6)" : "brightness(.6)",
|
|
15246
15475
|
backgroundColor: modelValue === activeValue ? color || "" : closeColor || ""
|
|
15247
15476
|
},
|
|
15248
15477
|
switch: {
|
|
15249
|
-
height:
|
|
15250
|
-
width:
|
|
15478
|
+
height: multiplySizeUnit(size, 1.2),
|
|
15479
|
+
width: multiplySizeUnit(size, 2)
|
|
15251
15480
|
}
|
|
15252
15481
|
};
|
|
15253
15482
|
});
|
|
15483
|
+
var radius = computed(() => {
|
|
15484
|
+
var {
|
|
15485
|
+
size = "5.333vw"
|
|
15486
|
+
} = props2;
|
|
15487
|
+
return multiplySizeUnit(size, 0.4);
|
|
15488
|
+
});
|
|
15254
15489
|
var switchActive = (event) => {
|
|
15255
15490
|
var {
|
|
15256
15491
|
onClick,
|
|
@@ -15285,7 +15520,7 @@ var Switch = defineComponent({
|
|
|
15285
15520
|
n: n$8,
|
|
15286
15521
|
classes: classes$7,
|
|
15287
15522
|
switchActive,
|
|
15288
|
-
|
|
15523
|
+
radius,
|
|
15289
15524
|
styleComputed,
|
|
15290
15525
|
errorMessage,
|
|
15291
15526
|
formDisabled: form == null ? void 0 : form.disabled,
|
|
@@ -17296,9 +17531,9 @@ var skeleton = "";
|
|
|
17296
17531
|
var SkeletonSfc = "";
|
|
17297
17532
|
var slider = "";
|
|
17298
17533
|
var SliderSfc = "";
|
|
17534
|
+
var SnackbarSfc = "";
|
|
17299
17535
|
var snackbar = "";
|
|
17300
17536
|
var coreSfc = "";
|
|
17301
|
-
var SnackbarSfc = "";
|
|
17302
17537
|
var space = "";
|
|
17303
17538
|
var step = "";
|
|
17304
17539
|
var StepSfc = "";
|