@varlet/ui 3.2.3 → 3.2.4

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.2.3",
4
+ "version": "3.2.4",
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.2.3",
4
+ "version": "3.2.4",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
package/lib/varlet.cjs.js CHANGED
@@ -3131,8 +3131,7 @@ const __sfc__$1i = vue.defineComponent({
3131
3131
  return {
3132
3132
  rootStyles,
3133
3133
  n: n$1h,
3134
- classes: classes$13,
3135
- toSizeUnit
3134
+ classes: classes$13
3136
3135
  };
3137
3136
  }
3138
3137
  });
@@ -10232,16 +10231,11 @@ const __sfc__$V = vue.defineComponent({
10232
10231
  right: false
10233
10232
  });
10234
10233
  const yearList = vue.computed(() => {
10235
- const list = [];
10236
- if (!props2.preview)
10237
- return list;
10238
- let startYear = Math.floor(toNumber(props2.preview) / 100 + page.value) * 100;
10239
- startYear = startYear < 0 ? 0 : startYear;
10240
- const yearRange = [startYear, startYear + 100];
10241
- for (let i = yearRange[0]; i < yearRange[1]; i++) {
10242
- list.push(i);
10234
+ if (!props2.preview) {
10235
+ return [];
10243
10236
  }
10244
- return list;
10237
+ const startYear = Math.floor(toNumber(props2.preview) / 100 + page.value) * 100;
10238
+ return Array.from(Array(100), (_v, k) => Math.max(0, startYear) + k);
10245
10239
  });
10246
10240
  const shouldChoose = (val) => {
10247
10241
  const {
@@ -10265,12 +10259,8 @@ const __sfc__$V = vue.defineComponent({
10265
10259
  const {
10266
10260
  componentProps: { min: min2, max: max2 }
10267
10261
  } = props2;
10268
- let isBeforeMax = true;
10269
- let isAfterMin = true;
10270
- if (max2)
10271
- isBeforeMax = dayjs(year).isSameOrBefore(dayjs(max2), "year");
10272
- if (min2)
10273
- isAfterMin = dayjs(year).isSameOrAfter(dayjs(min2), "year");
10262
+ const isBeforeMax = max2 ? dayjs(year).isSameOrBefore(dayjs(max2), "year") : true;
10263
+ const isAfterMin = min2 ? dayjs(year).isSameOrAfter(dayjs(min2), "year") : true;
10274
10264
  return isBeforeMax && isAfterMin;
10275
10265
  };
10276
10266
  const buttonProps = (year) => {
@@ -10341,9 +10331,10 @@ const __sfc__$V = vue.defineComponent({
10341
10331
  });
10342
10332
  };
10343
10333
  const checkDate = (checkType) => {
10344
- reverse.value = checkType === "prev";
10345
- panelKey.value += checkType === "prev" ? -1 : 1;
10346
- page.value += checkType === "prev" ? -1 : 1;
10334
+ const isPrevType = checkType === "prev";
10335
+ reverse.value = isPrevType;
10336
+ panelKey.value += isPrevType ? -1 : 1;
10337
+ page.value += isPrevType ? -1 : 1;
10347
10338
  };
10348
10339
  const forwardRef = (checkType) => {
10349
10340
  headerEl.value.checkDate(checkType);
@@ -11817,7 +11808,8 @@ function __render__$Q(_ctx, _cache) {
11817
11808
  [_ctx.hairline, _ctx.n("--hairline")]
11818
11809
  )
11819
11810
  ),
11820
- style: vue.normalizeStyle(_ctx.style)
11811
+ style: vue.normalizeStyle(_ctx.style),
11812
+ role: "separator"
11821
11813
  },
11822
11814
  [
11823
11815
  !_ctx.vertical ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
@@ -13473,7 +13465,7 @@ function usePopover(options) {
13473
13465
  const show = useVModel(options, "show", {
13474
13466
  passive: true,
13475
13467
  defaultValue: false,
13476
- emit(event, value) {
13468
+ emit(_event, value) {
13477
13469
  if (value) {
13478
13470
  call(options.onOpen);
13479
13471
  } else {
@@ -13719,8 +13711,7 @@ function usePopover(options) {
13719
13711
  popoverInstance.setOptions(getPopperOptions());
13720
13712
  };
13721
13713
  const open = () => {
13722
- const { disabled } = options;
13723
- if (disabled) {
13714
+ if (options.disabled) {
13724
13715
  return;
13725
13716
  }
13726
13717
  show.value = true;
@@ -26989,12 +26980,10 @@ const __sfc__$3 = vue.defineComponent({
26989
26980
  required: true
26990
26981
  },
26991
26982
  useSeconds: {
26992
- type: Boolean,
26993
- default: false
26983
+ type: Boolean
26994
26984
  },
26995
26985
  preventNextUpdate: {
26996
- type: Boolean,
26997
- default: false
26986
+ type: Boolean
26998
26987
  },
26999
26988
  type: {
27000
26989
  type: String,
@@ -27186,7 +27175,7 @@ const __sfc__$3 = vue.defineComponent({
27186
27175
  }
27187
27176
  disable24HourIndex.value = disableHour.value.map((hour) => hours24.findIndex((hour24) => hour === hour24)).filter((hour) => hour >= 0);
27188
27177
  },
27189
- { immediate: true }
27178
+ { immediate: true, deep: true }
27190
27179
  );
27191
27180
  return {
27192
27181
  n: n$3,
@@ -28499,7 +28488,7 @@ withInstall(stdin_default$1);
28499
28488
  withPropsDefaultsSetter(stdin_default$1, props);
28500
28489
  const _WatermarkComponent = stdin_default$1;
28501
28490
  var stdin_default = stdin_default$1;
28502
- const version = "3.2.3";
28491
+ const version = "3.2.4";
28503
28492
  function install(app) {
28504
28493
  stdin_default$5E.install && app.use(stdin_default$5E);
28505
28494
  stdin_default$5C.install && app.use(stdin_default$5C);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
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.2.3",
52
- "@varlet/shared": "3.2.3",
53
- "@varlet/use": "3.2.3"
51
+ "@varlet/icons": "3.2.4",
52
+ "@varlet/shared": "3.2.4",
53
+ "@varlet/use": "3.2.4"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.4.21",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/cli": "3.2.3",
70
- "@varlet/ui": "3.2.3",
71
- "@varlet/touch-emulator": "3.2.3"
69
+ "@varlet/cli": "3.2.4",
70
+ "@varlet/ui": "3.2.4",
71
+ "@varlet/touch-emulator": "3.2.4"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",