@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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.19.1",
4
+ "version": "3.19.2",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.19.1",
4
+ "version": "3.19.2",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
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
- if (!middleEl.value) return;
3440
- middleOffsetLeft.value = `${middleEl.value.offsetLeft}px`;
3441
- middleOffsetWidth.value = `${middleEl.value.offsetWidth}px`;
3442
- middleOffsetHeight.value = `${middleEl.value.offsetHeight}px`;
3443
- if (props2.variant === "outlined" && placeholderTextEl.value) {
3444
- const placeholderTextStyle = getStyle$1(placeholderTextEl.value);
3445
- const placeholderSpace = `var(--field-decorator-outlined-${props2.size}-placeholder-space)`;
3446
- legendWidth.value = `calc(${placeholderTextStyle.width} * 0.75 + ${placeholderSpace} * 2)`;
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.1";
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.1",
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/shared": "3.19.1",
48
- "@varlet/use": "3.19.1",
49
- "@varlet/icons": "3.19.1"
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.1",
66
- "@varlet/cli": "3.19.1",
67
- "@varlet/touch-emulator": "3.19.1"
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"