@varlet/ui 3.19.1 → 3.19.2
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/field-decorator/FieldDecorator.mjs +32 -17
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +2921 -2913
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +28 -15
- package/package.json +7 -7
- package/umd/varlet.js +6 -6
package/lib/varlet.cjs.js
CHANGED
|
@@ -3404,9 +3404,10 @@ var __sfc__$99 = (0, vue.defineComponent)({
|
|
|
3404
3404
|
const isFloating = (0, vue.computed)(() => props2.hint && (!isEmpty(props2.value) || props2.isFocusing));
|
|
3405
3405
|
const { popup, bindPopup } = usePopup();
|
|
3406
3406
|
const { bindSwipeResizeDispatcher } = useSwipeResizeDispatcher();
|
|
3407
|
+
let transitionVersion = 0;
|
|
3407
3408
|
const color = (0, vue.computed)(() => !props2.isError ? props2.isFocusing ? props2.focusColor : props2.blurColor : void 0);
|
|
3408
|
-
onWindowResize(resize);
|
|
3409
|
-
useResizeObserver(middleEl, resize);
|
|
3409
|
+
onWindowResize(() => resize(true));
|
|
3410
|
+
useResizeObserver(middleEl, () => resize(true));
|
|
3410
3411
|
onSmartMounted(() => {
|
|
3411
3412
|
resize();
|
|
3412
3413
|
(0, vue.nextTick)().then(() => {
|
|
@@ -3416,12 +3417,12 @@ var __sfc__$99 = (0, vue.defineComponent)({
|
|
|
3416
3417
|
(0, vue.onUpdated)(resize);
|
|
3417
3418
|
call(bindPopup, null);
|
|
3418
3419
|
call(bindSwipeResizeDispatcher, { onResize() {
|
|
3419
|
-
(0, vue.nextTick)().then(resize);
|
|
3420
|
+
(0, vue.nextTick)().then(() => resize(true));
|
|
3420
3421
|
} });
|
|
3421
3422
|
if (popup) (0, vue.watch)(() => popup.show.value, (show) => __async$24(null, null, function* () {
|
|
3422
3423
|
if (show) {
|
|
3423
3424
|
yield doubleRaf();
|
|
3424
|
-
resize();
|
|
3425
|
+
resize(true);
|
|
3425
3426
|
}
|
|
3426
3427
|
}));
|
|
3427
3428
|
function computePlaceholderState() {
|
|
@@ -3435,16 +3436,28 @@ var __sfc__$99 = (0, vue.defineComponent)({
|
|
|
3435
3436
|
function handleClick(e) {
|
|
3436
3437
|
call(props2.onClick, e);
|
|
3437
3438
|
}
|
|
3438
|
-
function resize() {
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3447
|
-
|
|
3439
|
+
function resize(disableTransition = false) {
|
|
3440
|
+
return __async$24(this, null, function* () {
|
|
3441
|
+
if (!middleEl.value) return;
|
|
3442
|
+
if (disableTransition) {
|
|
3443
|
+
transitionVersion++;
|
|
3444
|
+
transitionDisabled.value = true;
|
|
3445
|
+
}
|
|
3446
|
+
const currentTransitionVersion = transitionVersion;
|
|
3447
|
+
middleOffsetLeft.value = `${middleEl.value.offsetLeft}px`;
|
|
3448
|
+
middleOffsetWidth.value = `${middleEl.value.offsetWidth}px`;
|
|
3449
|
+
middleOffsetHeight.value = `${middleEl.value.offsetHeight}px`;
|
|
3450
|
+
if (props2.variant === "outlined" && placeholderTextEl.value) {
|
|
3451
|
+
const placeholderTextStyle = getStyle$1(placeholderTextEl.value);
|
|
3452
|
+
const placeholderSpace = `var(--field-decorator-outlined-${props2.size}-placeholder-space)`;
|
|
3453
|
+
legendWidth.value = `calc(${placeholderTextStyle.width} * 0.75 + ${placeholderSpace} * 2)`;
|
|
3454
|
+
}
|
|
3455
|
+
if (disableTransition) {
|
|
3456
|
+
yield (0, vue.nextTick)();
|
|
3457
|
+
yield raf();
|
|
3458
|
+
if (currentTransitionVersion === transitionVersion) transitionDisabled.value = false;
|
|
3459
|
+
}
|
|
3460
|
+
});
|
|
3448
3461
|
}
|
|
3449
3462
|
return {
|
|
3450
3463
|
placeholderTextEl,
|
|
@@ -32702,7 +32715,7 @@ var _WatermarkComponent = stdin_default$107;
|
|
|
32702
32715
|
var stdin_default$101 = stdin_default$107;
|
|
32703
32716
|
//#endregion
|
|
32704
32717
|
//#region es/index.bundle.mjs
|
|
32705
|
-
var version = "3.19.
|
|
32718
|
+
var version = "3.19.2";
|
|
32706
32719
|
function install(app) {
|
|
32707
32720
|
stdin_default.install && app.use(stdin_default);
|
|
32708
32721
|
stdin_default$1.install && app.use(stdin_default$1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.2",
|
|
4
4
|
"description": "A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Vue3",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@popperjs/core": "^2.11.6",
|
|
45
45
|
"dayjs": "^1.10.4",
|
|
46
46
|
"decimal.js": "^10.2.1",
|
|
47
|
-
"@varlet/
|
|
48
|
-
"@varlet/
|
|
49
|
-
"@varlet/
|
|
47
|
+
"@varlet/icons": "3.19.2",
|
|
48
|
+
"@varlet/shared": "3.19.2",
|
|
49
|
+
"@varlet/use": "3.19.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.19.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"vue": "3.5.21",
|
|
63
63
|
"vue-router": "4.5.1",
|
|
64
64
|
"zod": "^3.23.8",
|
|
65
|
-
"@varlet/ui": "3.19.
|
|
66
|
-
"@varlet/cli": "3.19.
|
|
67
|
-
"@varlet/touch-emulator": "3.19.
|
|
65
|
+
"@varlet/ui": "3.19.2",
|
|
66
|
+
"@varlet/cli": "3.19.2",
|
|
67
|
+
"@varlet/touch-emulator": "3.19.2"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"vue": "^3.2.0"
|