@varlet/ui 3.7.1 → 3.7.2-alpha.1733245375527
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/action-sheet/style/index.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/Menu.mjs +11 -17
- package/es/menu/props.mjs +1 -1
- package/es/menu/usePopover.mjs +59 -36
- package/es/menu-select/MenuSelect.mjs +6 -1
- package/es/style.css +1 -1
- package/es/switch/switch.css +1 -1
- package/es/themes/dark/switch.mjs +14 -1
- package/es/themes/md3-dark/switch.mjs +14 -1
- package/es/themes/md3-light/switch.mjs +14 -1
- package/es/tooltip/Tooltip.mjs +11 -17
- package/es/tooltip/props.mjs +1 -1
- package/es/varlet.esm.js +4391 -4347
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +130 -75
- package/package.json +7 -7
- package/types/menu.d.ts +3 -1
- package/types/menuSelect.d.ts +3 -1
- package/types/styleVars.d.ts +13 -0
- package/types/tooltip.d.ts +3 -1
- package/umd/varlet.js +8 -8
package/lib/varlet.cjs.js
CHANGED
|
@@ -4133,7 +4133,7 @@ const props$1c = {
|
|
|
4133
4133
|
type: String,
|
|
4134
4134
|
default: "click"
|
|
4135
4135
|
},
|
|
4136
|
-
reference: String,
|
|
4136
|
+
reference: [String, Object],
|
|
4137
4137
|
placement: {
|
|
4138
4138
|
type: String,
|
|
4139
4139
|
default: "cover-top-start"
|
|
@@ -5483,7 +5483,7 @@ var __async$h = (__this, __arguments, generator) => {
|
|
|
5483
5483
|
function usePopover(options) {
|
|
5484
5484
|
const host = vue.ref(null);
|
|
5485
5485
|
const popover = vue.ref(null);
|
|
5486
|
-
const
|
|
5486
|
+
const referenceSize = vue.ref({ width: 0, height: 0 });
|
|
5487
5487
|
const show = useVModel(options, "show", {
|
|
5488
5488
|
passive: true,
|
|
5489
5489
|
defaultValue: false,
|
|
@@ -5498,10 +5498,10 @@ function usePopover(options) {
|
|
|
5498
5498
|
const { zIndex } = useZIndex(() => show.value, 1);
|
|
5499
5499
|
useStack(() => show.value, zIndex);
|
|
5500
5500
|
let popoverInstance = null;
|
|
5501
|
+
let reference2;
|
|
5501
5502
|
let enterPopover = false;
|
|
5502
5503
|
let enterHost = false;
|
|
5503
5504
|
useEventListener(() => window, "keydown", handleKeydown);
|
|
5504
|
-
useClickOutside(getReference, "click", handleClickOutside);
|
|
5505
5505
|
onWindowResize(resize);
|
|
5506
5506
|
vue.watch(() => [options.offsetX, options.offsetY, options.placement, options.strategy], resize);
|
|
5507
5507
|
vue.watch(() => options.disabled, close);
|
|
@@ -5513,19 +5513,31 @@ function usePopover(options) {
|
|
|
5513
5513
|
}
|
|
5514
5514
|
}
|
|
5515
5515
|
);
|
|
5516
|
-
vue.onMounted(
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5516
|
+
vue.onMounted(createPopperInstance);
|
|
5517
|
+
vue.onUnmounted(destroyPopperInstance);
|
|
5518
|
+
function createPopperInstance() {
|
|
5519
|
+
const reference22 = getReference();
|
|
5520
|
+
popoverInstance = createPopper(reference22, popover.value, getPopperOptions());
|
|
5521
|
+
reference22.addEventListener("mouseenter", handleHostMouseenter);
|
|
5522
|
+
reference22.addEventListener("mouseleave", handleHostMouseleave);
|
|
5523
|
+
reference22.addEventListener("click", handleReferenceClick);
|
|
5524
|
+
document.addEventListener("click", handleClickOutside);
|
|
5525
|
+
}
|
|
5526
|
+
function destroyPopperInstance() {
|
|
5527
|
+
const reference22 = getReference();
|
|
5521
5528
|
popoverInstance.destroy();
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5529
|
+
reference22.removeEventListener("mouseenter", handleHostMouseenter);
|
|
5530
|
+
reference22.removeEventListener("mouseleave", handleHostMouseleave);
|
|
5531
|
+
reference22.removeEventListener("click", handleReferenceClick);
|
|
5532
|
+
document.removeEventListener("click", handleClickOutside);
|
|
5533
|
+
}
|
|
5534
|
+
function computeReferenceSize() {
|
|
5535
|
+
const reference22 = getReference();
|
|
5536
|
+
if (!reference22) {
|
|
5525
5537
|
return;
|
|
5526
5538
|
}
|
|
5527
|
-
const { width, height } = getStyle$1(
|
|
5528
|
-
|
|
5539
|
+
const { width, height } = getStyle$1(reference22);
|
|
5540
|
+
referenceSize.value = {
|
|
5529
5541
|
width: toPxNum(width),
|
|
5530
5542
|
height: toPxNum(height)
|
|
5531
5543
|
};
|
|
@@ -5601,7 +5613,7 @@ function usePopover(options) {
|
|
|
5601
5613
|
close();
|
|
5602
5614
|
});
|
|
5603
5615
|
}
|
|
5604
|
-
function
|
|
5616
|
+
function handleReferenceClick() {
|
|
5605
5617
|
if (options.trigger !== "click") {
|
|
5606
5618
|
return;
|
|
5607
5619
|
}
|
|
@@ -5611,15 +5623,18 @@ function usePopover(options) {
|
|
|
5611
5623
|
}
|
|
5612
5624
|
open();
|
|
5613
5625
|
}
|
|
5614
|
-
function handlePopoverClose() {
|
|
5615
|
-
close();
|
|
5616
|
-
}
|
|
5617
5626
|
function handleClickOutside(e) {
|
|
5618
|
-
|
|
5619
|
-
|
|
5627
|
+
const reference22 = getReference();
|
|
5628
|
+
if (reference22 && !reference22.contains(e.target)) {
|
|
5629
|
+
if (options.trigger !== "click") {
|
|
5630
|
+
return;
|
|
5631
|
+
}
|
|
5632
|
+
handlePopoverClose();
|
|
5633
|
+
call(options.onClickOutside, e);
|
|
5620
5634
|
}
|
|
5621
|
-
|
|
5622
|
-
|
|
5635
|
+
}
|
|
5636
|
+
function handlePopoverClose() {
|
|
5637
|
+
close();
|
|
5623
5638
|
}
|
|
5624
5639
|
function handleClosed() {
|
|
5625
5640
|
resize();
|
|
@@ -5627,7 +5642,7 @@ function usePopover(options) {
|
|
|
5627
5642
|
}
|
|
5628
5643
|
function getPosition() {
|
|
5629
5644
|
const { offsetX, offsetY, placement } = options;
|
|
5630
|
-
|
|
5645
|
+
computeReferenceSize();
|
|
5631
5646
|
const offset2 = {
|
|
5632
5647
|
x: toPxNum(offsetX),
|
|
5633
5648
|
y: toPxNum(offsetY)
|
|
@@ -5637,49 +5652,49 @@ function usePopover(options) {
|
|
|
5637
5652
|
return {
|
|
5638
5653
|
placement: "bottom",
|
|
5639
5654
|
skidding: offset2.x,
|
|
5640
|
-
distance: offset2.y -
|
|
5655
|
+
distance: offset2.y - referenceSize.value.height
|
|
5641
5656
|
};
|
|
5642
5657
|
case "cover-top-start":
|
|
5643
5658
|
return {
|
|
5644
5659
|
placement: "bottom-start",
|
|
5645
5660
|
skidding: offset2.x,
|
|
5646
|
-
distance: offset2.y -
|
|
5661
|
+
distance: offset2.y - referenceSize.value.height
|
|
5647
5662
|
};
|
|
5648
5663
|
case "cover-top-end":
|
|
5649
5664
|
return {
|
|
5650
5665
|
placement: "bottom-end",
|
|
5651
5666
|
skidding: offset2.x,
|
|
5652
|
-
distance: offset2.y -
|
|
5667
|
+
distance: offset2.y - referenceSize.value.height
|
|
5653
5668
|
};
|
|
5654
5669
|
case "cover-bottom":
|
|
5655
5670
|
return {
|
|
5656
5671
|
placement: "top",
|
|
5657
5672
|
skidding: offset2.x,
|
|
5658
|
-
distance: -offset2.y -
|
|
5673
|
+
distance: -offset2.y - referenceSize.value.height
|
|
5659
5674
|
};
|
|
5660
5675
|
case "cover-bottom-start":
|
|
5661
5676
|
return {
|
|
5662
5677
|
placement: "top-start",
|
|
5663
5678
|
skidding: offset2.x,
|
|
5664
|
-
distance: -offset2.y -
|
|
5679
|
+
distance: -offset2.y - referenceSize.value.height
|
|
5665
5680
|
};
|
|
5666
5681
|
case "cover-bottom-end":
|
|
5667
5682
|
return {
|
|
5668
5683
|
placement: "top-end",
|
|
5669
5684
|
skidding: offset2.x,
|
|
5670
|
-
distance: -offset2.y -
|
|
5685
|
+
distance: -offset2.y - referenceSize.value.height
|
|
5671
5686
|
};
|
|
5672
5687
|
case "cover-left":
|
|
5673
5688
|
return {
|
|
5674
5689
|
placement: "right",
|
|
5675
5690
|
skidding: offset2.y,
|
|
5676
|
-
distance: offset2.x -
|
|
5691
|
+
distance: offset2.x - referenceSize.value.width
|
|
5677
5692
|
};
|
|
5678
5693
|
case "cover-right":
|
|
5679
5694
|
return {
|
|
5680
5695
|
placement: "left",
|
|
5681
5696
|
skidding: offset2.y,
|
|
5682
|
-
distance: -offset2.x -
|
|
5697
|
+
distance: -offset2.x - referenceSize.value.width
|
|
5683
5698
|
};
|
|
5684
5699
|
case "left":
|
|
5685
5700
|
case "left-start":
|
|
@@ -5749,7 +5764,17 @@ function usePopover(options) {
|
|
|
5749
5764
|
};
|
|
5750
5765
|
}
|
|
5751
5766
|
function getReference() {
|
|
5752
|
-
|
|
5767
|
+
var _a, _b;
|
|
5768
|
+
const targetReference = (_a = reference2 != null ? reference2 : options.reference) != null ? _a : host.value;
|
|
5769
|
+
if (isString(targetReference)) {
|
|
5770
|
+
return (_b = host.value) == null ? void 0 : _b.querySelector(targetReference);
|
|
5771
|
+
}
|
|
5772
|
+
return targetReference;
|
|
5773
|
+
}
|
|
5774
|
+
function setReference(newReference) {
|
|
5775
|
+
destroyPopperInstance();
|
|
5776
|
+
reference2 = newReference;
|
|
5777
|
+
createPopperInstance();
|
|
5753
5778
|
}
|
|
5754
5779
|
function handleKeydown(event) {
|
|
5755
5780
|
const { closeOnKeyEscape = false } = options;
|
|
@@ -5777,14 +5802,12 @@ function usePopover(options) {
|
|
|
5777
5802
|
popover,
|
|
5778
5803
|
zIndex,
|
|
5779
5804
|
host,
|
|
5780
|
-
|
|
5781
|
-
handleHostClick,
|
|
5782
|
-
handleHostMouseenter,
|
|
5783
|
-
handleHostMouseleave,
|
|
5805
|
+
referenceSize,
|
|
5784
5806
|
handlePopoverClose,
|
|
5785
5807
|
handlePopoverMouseenter,
|
|
5786
5808
|
handlePopoverMouseleave,
|
|
5787
5809
|
handleClosed,
|
|
5810
|
+
setReference,
|
|
5788
5811
|
resize,
|
|
5789
5812
|
open,
|
|
5790
5813
|
close
|
|
@@ -5796,10 +5819,7 @@ function __render__$1i(_ctx, _cache) {
|
|
|
5796
5819
|
"div",
|
|
5797
5820
|
{
|
|
5798
5821
|
ref: "host",
|
|
5799
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box")))
|
|
5800
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleHostClick && _ctx.handleHostClick(...args)),
|
|
5801
|
-
onMouseenter: _cache[4] || (_cache[4] = (...args) => _ctx.handleHostMouseenter && _ctx.handleHostMouseenter(...args)),
|
|
5802
|
-
onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleHostMouseleave && _ctx.handleHostMouseleave(...args))
|
|
5822
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box")))
|
|
5803
5823
|
},
|
|
5804
5824
|
[
|
|
5805
5825
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
@@ -5820,7 +5840,7 @@ function __render__$1i(_ctx, _cache) {
|
|
|
5820
5840
|
ref: "popover",
|
|
5821
5841
|
style: vue.normalizeStyle({
|
|
5822
5842
|
zIndex: _ctx.zIndex,
|
|
5823
|
-
width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.
|
|
5843
|
+
width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.referenceSize.width)) : void 0
|
|
5824
5844
|
}),
|
|
5825
5845
|
class: vue.normalizeClass(
|
|
5826
5846
|
_ctx.classes(
|
|
@@ -5850,8 +5870,8 @@ function __render__$1i(_ctx, _cache) {
|
|
|
5850
5870
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
5851
5871
|
], 8, ["to", "disabled"]))
|
|
5852
5872
|
],
|
|
5853
|
-
|
|
5854
|
-
/* CLASS
|
|
5873
|
+
2
|
|
5874
|
+
/* CLASS */
|
|
5855
5875
|
);
|
|
5856
5876
|
}
|
|
5857
5877
|
const __sfc__$1l = vue.defineComponent({
|
|
@@ -5862,12 +5882,9 @@ const __sfc__$1l = vue.defineComponent({
|
|
|
5862
5882
|
const {
|
|
5863
5883
|
popover,
|
|
5864
5884
|
host,
|
|
5865
|
-
|
|
5885
|
+
referenceSize,
|
|
5866
5886
|
show,
|
|
5867
5887
|
zIndex,
|
|
5868
|
-
handleHostClick,
|
|
5869
|
-
handleHostMouseenter,
|
|
5870
|
-
handleHostMouseleave,
|
|
5871
5888
|
handlePopoverMouseenter,
|
|
5872
5889
|
handlePopoverMouseleave,
|
|
5873
5890
|
handlePopoverClose,
|
|
@@ -5877,12 +5894,14 @@ const __sfc__$1l = vue.defineComponent({
|
|
|
5877
5894
|
// expose
|
|
5878
5895
|
close,
|
|
5879
5896
|
// expose
|
|
5880
|
-
resize
|
|
5897
|
+
resize,
|
|
5898
|
+
// expose
|
|
5899
|
+
setReference
|
|
5881
5900
|
} = usePopover(props2);
|
|
5882
5901
|
return {
|
|
5883
5902
|
popover,
|
|
5884
5903
|
host,
|
|
5885
|
-
|
|
5904
|
+
referenceSize,
|
|
5886
5905
|
show,
|
|
5887
5906
|
zIndex,
|
|
5888
5907
|
teleportDisabled,
|
|
@@ -5890,16 +5909,14 @@ const __sfc__$1l = vue.defineComponent({
|
|
|
5890
5909
|
toSizeUnit,
|
|
5891
5910
|
n: n$1k,
|
|
5892
5911
|
classes: classes$13,
|
|
5893
|
-
handleHostClick,
|
|
5894
|
-
handleHostMouseenter,
|
|
5895
|
-
handleHostMouseleave,
|
|
5896
5912
|
handlePopoverMouseenter,
|
|
5897
5913
|
handlePopoverMouseleave,
|
|
5898
5914
|
handlePopoverClose,
|
|
5899
5915
|
handleClosed,
|
|
5900
5916
|
resize,
|
|
5901
5917
|
open,
|
|
5902
|
-
close
|
|
5918
|
+
close,
|
|
5919
|
+
setReference
|
|
5903
5920
|
};
|
|
5904
5921
|
}
|
|
5905
5922
|
});
|
|
@@ -6661,6 +6678,10 @@ const __sfc__$1i = vue.defineComponent({
|
|
|
6661
6678
|
var _a;
|
|
6662
6679
|
(_a = menu.value) == null ? void 0 : _a.resize();
|
|
6663
6680
|
}
|
|
6681
|
+
function setReference(reference2) {
|
|
6682
|
+
var _a;
|
|
6683
|
+
(_a = menu.value) == null ? void 0 : _a.setReference(reference2);
|
|
6684
|
+
}
|
|
6664
6685
|
return {
|
|
6665
6686
|
show,
|
|
6666
6687
|
menu,
|
|
@@ -6670,7 +6691,8 @@ const __sfc__$1i = vue.defineComponent({
|
|
|
6670
6691
|
formatElevation,
|
|
6671
6692
|
open,
|
|
6672
6693
|
close,
|
|
6673
|
-
resize
|
|
6694
|
+
resize,
|
|
6695
|
+
setReference
|
|
6674
6696
|
};
|
|
6675
6697
|
}
|
|
6676
6698
|
});
|
|
@@ -16172,7 +16194,7 @@ const props$H = {
|
|
|
16172
16194
|
type: String,
|
|
16173
16195
|
default: "hover"
|
|
16174
16196
|
},
|
|
16175
|
-
reference: String,
|
|
16197
|
+
reference: [String, Object],
|
|
16176
16198
|
placement: {
|
|
16177
16199
|
type: String,
|
|
16178
16200
|
default: "bottom"
|
|
@@ -16212,10 +16234,7 @@ function __render__$J(_ctx, _cache) {
|
|
|
16212
16234
|
"div",
|
|
16213
16235
|
{
|
|
16214
16236
|
ref: "host",
|
|
16215
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box")))
|
|
16216
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleHostClick && _ctx.handleHostClick(...args)),
|
|
16217
|
-
onMouseenter: _cache[4] || (_cache[4] = (...args) => _ctx.handleHostMouseenter && _ctx.handleHostMouseenter(...args)),
|
|
16218
|
-
onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.handleHostMouseleave && _ctx.handleHostMouseleave(...args))
|
|
16237
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box")))
|
|
16219
16238
|
},
|
|
16220
16239
|
[
|
|
16221
16240
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
@@ -16248,7 +16267,7 @@ function __render__$J(_ctx, _cache) {
|
|
|
16248
16267
|
style: vue.normalizeStyle({
|
|
16249
16268
|
background: _ctx.color,
|
|
16250
16269
|
color: _ctx.textColor,
|
|
16251
|
-
width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.
|
|
16270
|
+
width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.referenceSize.width)) : void 0
|
|
16252
16271
|
}),
|
|
16253
16272
|
class: vue.normalizeClass(_ctx.classes(_ctx.n("content-container"), _ctx.n(`--${_ctx.type}`))),
|
|
16254
16273
|
role: "tooltip"
|
|
@@ -16277,8 +16296,8 @@ function __render__$J(_ctx, _cache) {
|
|
|
16277
16296
|
}, 8, ["name", "onAfterEnter", "onAfterLeave"])
|
|
16278
16297
|
], 8, ["to", "disabled"]))
|
|
16279
16298
|
],
|
|
16280
|
-
|
|
16281
|
-
/* CLASS
|
|
16299
|
+
2
|
|
16300
|
+
/* CLASS */
|
|
16282
16301
|
);
|
|
16283
16302
|
}
|
|
16284
16303
|
const __sfc__$M = vue.defineComponent({
|
|
@@ -16289,12 +16308,9 @@ const __sfc__$M = vue.defineComponent({
|
|
|
16289
16308
|
const {
|
|
16290
16309
|
popover,
|
|
16291
16310
|
host,
|
|
16292
|
-
|
|
16311
|
+
referenceSize,
|
|
16293
16312
|
show,
|
|
16294
16313
|
zIndex,
|
|
16295
|
-
handleHostClick,
|
|
16296
|
-
handleHostMouseenter,
|
|
16297
|
-
handleHostMouseleave,
|
|
16298
16314
|
handlePopoverMouseenter,
|
|
16299
16315
|
handlePopoverMouseleave,
|
|
16300
16316
|
handlePopoverClose,
|
|
@@ -16304,28 +16320,28 @@ const __sfc__$M = vue.defineComponent({
|
|
|
16304
16320
|
// expose
|
|
16305
16321
|
close,
|
|
16306
16322
|
// expose
|
|
16307
|
-
resize
|
|
16323
|
+
resize,
|
|
16324
|
+
// expose
|
|
16325
|
+
setReference
|
|
16308
16326
|
} = usePopover(props2);
|
|
16309
16327
|
return {
|
|
16310
16328
|
popover,
|
|
16311
16329
|
host,
|
|
16312
|
-
|
|
16330
|
+
referenceSize,
|
|
16313
16331
|
show,
|
|
16314
16332
|
zIndex,
|
|
16315
16333
|
teleportDisabled,
|
|
16316
16334
|
toSizeUnit,
|
|
16317
16335
|
n: n$L,
|
|
16318
16336
|
classes: classes$B,
|
|
16319
|
-
handleHostClick,
|
|
16320
16337
|
handlePopoverClose,
|
|
16321
|
-
handleHostMouseenter,
|
|
16322
|
-
handleHostMouseleave,
|
|
16323
16338
|
handlePopoverMouseenter,
|
|
16324
16339
|
handlePopoverMouseleave,
|
|
16325
16340
|
handleClosed,
|
|
16326
16341
|
resize,
|
|
16327
16342
|
open,
|
|
16328
|
-
close
|
|
16343
|
+
close,
|
|
16344
|
+
setReference
|
|
16329
16345
|
};
|
|
16330
16346
|
}
|
|
16331
16347
|
});
|
|
@@ -25724,7 +25740,20 @@ var stdin_default$2U = {
|
|
|
25724
25740
|
"--switch-variant-handle-background": "rgb(255, 255, 255, .7)",
|
|
25725
25741
|
"--switch-variant-handle-color": "var(--color-primary)",
|
|
25726
25742
|
"--switch-variant-handle-active-color": "var(--color-primary)",
|
|
25727
|
-
"--switch-variant-handle-active-background": "var(--color-on-primary)"
|
|
25743
|
+
"--switch-variant-handle-active-background": "var(--color-on-primary)",
|
|
25744
|
+
"--switch-width": "40px",
|
|
25745
|
+
"--switch-height": "24px",
|
|
25746
|
+
"--switch-track-width": "38px",
|
|
25747
|
+
"--switch-track-height": "14.4px",
|
|
25748
|
+
"--switch-track-border-radius": "calc(20px * 2 / 3)",
|
|
25749
|
+
"--switch-handle-width": "20px",
|
|
25750
|
+
"--switch-handle-height": "20px",
|
|
25751
|
+
"--switch-ripple-size": "40px",
|
|
25752
|
+
"--switch-ripple-left": "-10px",
|
|
25753
|
+
"--switch-ripple-active-left": "10px",
|
|
25754
|
+
"--switch-loading-size": "16px",
|
|
25755
|
+
"--switch-variant-ripple-left": "-4px",
|
|
25756
|
+
"--switch-variant-ripple-active-left": "16px"
|
|
25728
25757
|
};
|
|
25729
25758
|
var stdin_default$2T = {
|
|
25730
25759
|
"--tab-inactive-color": "rgba(255, 255, 255, .65)",
|
|
@@ -26957,7 +26986,20 @@ var stdin_default$1A = {
|
|
|
26957
26986
|
"--switch-variant-handle-color": "var(--color-on-primary)",
|
|
26958
26987
|
"--switch-variant-handle-active-color": "var(--color-primary)",
|
|
26959
26988
|
"--switch-variant-handle-background": "#79747E",
|
|
26960
|
-
"--switch-variant-handle-active-background": "var(--color-on-primary)"
|
|
26989
|
+
"--switch-variant-handle-active-background": "var(--color-on-primary)",
|
|
26990
|
+
"--switch-width": "40px",
|
|
26991
|
+
"--switch-height": "24px",
|
|
26992
|
+
"--switch-track-width": "38px",
|
|
26993
|
+
"--switch-track-height": "14.4px",
|
|
26994
|
+
"--switch-track-border-radius": "calc(20px * 2 / 3)",
|
|
26995
|
+
"--switch-handle-width": "20px",
|
|
26996
|
+
"--switch-handle-height": "20px",
|
|
26997
|
+
"--switch-ripple-size": "40px",
|
|
26998
|
+
"--switch-ripple-left": "-10px",
|
|
26999
|
+
"--switch-ripple-active-left": "10px",
|
|
27000
|
+
"--switch-loading-size": "16px",
|
|
27001
|
+
"--switch-variant-ripple-left": "-4px",
|
|
27002
|
+
"--switch-variant-ripple-active-left": "16px"
|
|
26961
27003
|
};
|
|
26962
27004
|
var stdin_default$1z = {
|
|
26963
27005
|
"--rate-color": "var(--color-on-surface-variant)",
|
|
@@ -27936,7 +27978,20 @@ var stdin_default$u = {
|
|
|
27936
27978
|
"--switch-variant-handle-color": "var(--color-on-primary)",
|
|
27937
27979
|
"--switch-variant-handle-active-color": "var(--color-primary)",
|
|
27938
27980
|
"--switch-variant-handle-background": "#938F99",
|
|
27939
|
-
"--switch-variant-handle-active-background": "var(--color-on-primary)"
|
|
27981
|
+
"--switch-variant-handle-active-background": "var(--color-on-primary)",
|
|
27982
|
+
"--switch-width": "40px",
|
|
27983
|
+
"--switch-height": "24px",
|
|
27984
|
+
"--switch-track-width": "38px",
|
|
27985
|
+
"--switch-track-height": "14.4px",
|
|
27986
|
+
"--switch-track-border-radius": "calc(20px * 2 / 3)",
|
|
27987
|
+
"--switch-handle-width": "20px",
|
|
27988
|
+
"--switch-handle-height": "20px",
|
|
27989
|
+
"--switch-ripple-size": "40px",
|
|
27990
|
+
"--switch-ripple-left": "-10px",
|
|
27991
|
+
"--switch-ripple-active-left": "10px",
|
|
27992
|
+
"--switch-loading-size": "16px",
|
|
27993
|
+
"--switch-variant-ripple-left": "-4px",
|
|
27994
|
+
"--switch-variant-ripple-active-left": "16px"
|
|
27940
27995
|
};
|
|
27941
27996
|
var stdin_default$t = {
|
|
27942
27997
|
"--slider-thumb-size": "16px",
|
|
@@ -30016,7 +30071,7 @@ withInstall(stdin_default$1);
|
|
|
30016
30071
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
30017
30072
|
const _WatermarkComponent = stdin_default$1;
|
|
30018
30073
|
var stdin_default = stdin_default$1;
|
|
30019
|
-
const version = "3.7.
|
|
30074
|
+
const version = "3.7.2-alpha.1733245375527";
|
|
30020
30075
|
function install(app) {
|
|
30021
30076
|
stdin_default$5W.install && app.use(stdin_default$5W);
|
|
30022
30077
|
stdin_default$5U.install && app.use(stdin_default$5U);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2-alpha.1733245375527",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/icons": "3.7.
|
|
52
|
-
"@varlet/use": "3.7.
|
|
53
|
-
"@varlet/shared": "3.7.
|
|
51
|
+
"@varlet/icons": "3.7.2-alpha.1733245375527",
|
|
52
|
+
"@varlet/use": "3.7.2-alpha.1733245375527",
|
|
53
|
+
"@varlet/shared": "3.7.2-alpha.1733245375527"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^18.7.18",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"vue": "3.4.21",
|
|
67
67
|
"vue-router": "4.2.0",
|
|
68
68
|
"zod": "^3.23.8",
|
|
69
|
-
"@varlet/cli": "3.7.
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/cli": "3.7.2-alpha.1733245375527",
|
|
70
|
+
"@varlet/touch-emulator": "3.7.2-alpha.1733245375527",
|
|
71
|
+
"@varlet/ui": "3.7.2-alpha.1733245375527"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/menu.d.ts
CHANGED
|
@@ -22,11 +22,13 @@ export type MenuTrigger = 'click' | 'hover' | 'manual'
|
|
|
22
22
|
|
|
23
23
|
export type MenuStrategy = PositioningStrategy
|
|
24
24
|
|
|
25
|
+
export type MenuReference = string | HTMLElement
|
|
26
|
+
|
|
25
27
|
export interface MenuProps extends BasicAttributes {
|
|
26
28
|
show?: boolean
|
|
27
29
|
disabled?: boolean
|
|
28
30
|
trigger?: MenuTrigger
|
|
29
|
-
reference?:
|
|
31
|
+
reference?: MenuReference
|
|
30
32
|
placement?: MenuPlacement
|
|
31
33
|
strategy?: MenuStrategy
|
|
32
34
|
offsetX?: string | number
|
package/types/menuSelect.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export type MenuSelectStrategy = PositioningStrategy
|
|
|
24
24
|
|
|
25
25
|
export type MenuSelectSize = 'normal' | 'mini' | 'small' | 'large'
|
|
26
26
|
|
|
27
|
+
export type MenuSelectReference = string | HTMLElement
|
|
28
|
+
|
|
27
29
|
export type MenuSelectOptionLabelRender = (option: MenuSelectOption, checked: boolean) => VNodeChild
|
|
28
30
|
|
|
29
31
|
export interface MenuSelectOption {
|
|
@@ -42,7 +44,7 @@ export interface MenuSelectProps extends BasicAttributes {
|
|
|
42
44
|
show?: boolean
|
|
43
45
|
disabled?: boolean
|
|
44
46
|
trigger?: MenuSelectTrigger
|
|
45
|
-
reference?:
|
|
47
|
+
reference?: MenuSelectReference
|
|
46
48
|
placement?: MenuSelectPlacement
|
|
47
49
|
strategy?: MenuSelectStrategy
|
|
48
50
|
offsetX?: string | number
|
package/types/styleVars.d.ts
CHANGED
|
@@ -668,6 +668,19 @@ interface BaseStyleVars {
|
|
|
668
668
|
'--switch-variant-handle-active-color'?: string
|
|
669
669
|
'--switch-variant-handle-background'?: string
|
|
670
670
|
'--switch-variant-handle-active-background'?: string
|
|
671
|
+
'--switch-width'?: string
|
|
672
|
+
'--switch-height'?: string
|
|
673
|
+
'--switch-track-width'?: string
|
|
674
|
+
'--switch-track-height'?: string
|
|
675
|
+
'--switch-track-border-radius'?: string
|
|
676
|
+
'--switch-handle-width'?: string
|
|
677
|
+
'--switch-handle-height'?: string
|
|
678
|
+
'--switch-ripple-size'?: string
|
|
679
|
+
'--switch-ripple-left'?: string
|
|
680
|
+
'--switch-ripple-active-left'?: string
|
|
681
|
+
'--switch-loading-size'?: string
|
|
682
|
+
'--switch-variant-ripple-left'?: string
|
|
683
|
+
'--switch-variant-ripple-active-left'?: string
|
|
671
684
|
'--table-background'?: string
|
|
672
685
|
'--table-border-radius'?: string
|
|
673
686
|
'--table-thead-border-bottom'?: string
|
package/types/tooltip.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export type TooltipPlacement = TooltipNeededPopperPlacement
|
|
|
11
11
|
|
|
12
12
|
export type TooltipTrigger = 'click' | 'hover' | 'manual'
|
|
13
13
|
|
|
14
|
+
export type TooltipReference = string | HTMLElement
|
|
15
|
+
|
|
14
16
|
export type TooltipType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger'
|
|
15
17
|
|
|
16
18
|
export type TooltipStrategy = PositioningStrategy
|
|
@@ -23,7 +25,7 @@ export interface TooltipProps extends BasicAttributes {
|
|
|
23
25
|
textColor?: string
|
|
24
26
|
type?: TooltipType
|
|
25
27
|
trigger?: TooltipTrigger
|
|
26
|
-
reference?:
|
|
28
|
+
reference?: TooltipReference
|
|
27
29
|
placement?: TooltipPlacement
|
|
28
30
|
strategy?: TooltipStrategy
|
|
29
31
|
offsetX?: string | number
|