@varlet/ui 2.11.4 → 2.11.6-alpha.1686800314469

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.
Files changed (45) hide show
  1. package/es/app-bar/AppBar.mjs +2 -2
  2. package/es/avatar/Avatar.mjs +2 -2
  3. package/es/back-top/BackTop.mjs +3 -3
  4. package/es/bottom-navigation/BottomNavigation.mjs +2 -2
  5. package/es/button/button.css +1 -1
  6. package/es/date-picker/date-picker.css +1 -1
  7. package/es/date-picker/src/day-picker-panel.mjs +2 -2
  8. package/es/date-picker/src/year-picker-panel.mjs +2 -2
  9. package/es/divider/Divider.mjs +2 -2
  10. package/es/field-decorator/FieldDecorator.mjs +3 -3
  11. package/es/index-bar/IndexBar.mjs +2 -2
  12. package/es/index.bundle.mjs +1 -1
  13. package/es/index.mjs +1 -1
  14. package/es/input/Input.mjs +2 -2
  15. package/es/link/link.css +1 -1
  16. package/es/list/List.mjs +4 -5
  17. package/es/pagination/Pagination.mjs +2 -2
  18. package/es/pull-refresh/PullRefresh.mjs +2 -2
  19. package/es/rate/Rate.mjs +13 -2
  20. package/es/rate/props.mjs +4 -0
  21. package/es/rate/rate.css +1 -1
  22. package/es/slider/Slider.mjs +2 -2
  23. package/es/snackbar/core.mjs +2 -2
  24. package/es/snackbar/style/index.mjs +1 -1
  25. package/es/step/Step.mjs +7 -38
  26. package/es/step/step.css +1 -1
  27. package/es/steps/Steps.mjs +0 -2
  28. package/es/steps/provide.mjs +0 -2
  29. package/es/sticky/Sticky.mjs +5 -6
  30. package/es/style.css +1 -1
  31. package/es/swipe/Swipe.mjs +4 -5
  32. package/es/switch/Switch.mjs +1 -4
  33. package/es/tabs/Tabs.mjs +2 -2
  34. package/es/themes/dark/button.mjs +2 -1
  35. package/es/themes/dark/index.mjs +2 -1
  36. package/es/themes/dark/link.mjs +3 -0
  37. package/es/time-picker/timePicker.css +1 -1
  38. package/es/varlet.esm.js +4324 -4337
  39. package/highlight/web-types.en-US.json +1 -1
  40. package/highlight/web-types.zh-CN.json +10 -1
  41. package/lib/style.css +1 -1
  42. package/lib/varlet.cjs.js +120 -136
  43. package/package.json +6 -6
  44. package/types/rate.d.ts +1 -0
  45. package/umd/varlet.js +5 -5
package/lib/varlet.cjs.js CHANGED
@@ -415,7 +415,7 @@ function supportTouch() {
415
415
  function padStartFlex(style) {
416
416
  return style === "start" || style === "end" ? "flex-" + style : style;
417
417
  }
418
- function useMounted(hook) {
418
+ function onSmartMounted(hook) {
419
419
  let isMounted = false;
420
420
  vue.onMounted(() => {
421
421
  hook();
@@ -477,7 +477,7 @@ function useEventListener(target, type, listener, options = {}) {
477
477
  remove(target);
478
478
  cleaned = true;
479
479
  };
480
- useMounted(() => {
480
+ onSmartMounted(() => {
481
481
  add2(target);
482
482
  });
483
483
  vue.onBeforeUnmount(() => {
@@ -500,6 +500,14 @@ function useClickOutside(target, type, listener) {
500
500
  };
501
501
  useEventListener(document, type, handler);
502
502
  }
503
+ function onSmartUnmounted(hook) {
504
+ vue.onUnmounted(() => {
505
+ hook();
506
+ });
507
+ vue.onDeactivated(() => {
508
+ hook();
509
+ });
510
+ }
503
511
  var __rest = globalThis && globalThis.__rest || function(s, e) {
504
512
  var t = {};
505
513
  for (var p in s)
@@ -598,6 +606,10 @@ function useChildren(key) {
598
606
  bindChildren
599
607
  };
600
608
  }
609
+ function onWindowResize(listener) {
610
+ useEventListener(() => window, "resize", listener, { passive: true });
611
+ useEventListener(() => window, "orientationchange", listener, { passive: true });
612
+ }
601
613
  function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
602
614
  try {
603
615
  var info = gen[key](arg);
@@ -2092,7 +2104,7 @@ var __sfc__$1f = vue.defineComponent({
2092
2104
  color: textColor
2093
2105
  };
2094
2106
  });
2095
- useMounted(computePadding);
2107
+ onSmartMounted(computePadding);
2096
2108
  vue.onUpdated(computePadding);
2097
2109
  return {
2098
2110
  n: n$1e,
@@ -2531,7 +2543,7 @@ var __sfc__$1e = vue.defineComponent({
2531
2543
  var handleClick = (e) => {
2532
2544
  call(props2.onClick, e);
2533
2545
  };
2534
- useMounted(getScale);
2546
+ onSmartMounted(getScale);
2535
2547
  vue.onUpdated(getScale);
2536
2548
  return {
2537
2549
  internalSizeValidator: internalSizeValidator$1,
@@ -3379,8 +3391,7 @@ var __sfc__$19 = vue.defineComponent({
3379
3391
  disabled.value = false;
3380
3392
  });
3381
3393
  vue.onActivated(addScrollerEventListener);
3382
- vue.onBeforeUnmount(removeScrollerEventListener);
3383
- vue.onDeactivated(removeScrollerEventListener);
3394
+ onSmartUnmounted(removeScrollerEventListener);
3384
3395
  return {
3385
3396
  disabled,
3386
3397
  show,
@@ -3749,7 +3760,7 @@ var __sfc__$17 = vue.defineComponent({
3749
3760
  immediate: true,
3750
3761
  deep: true
3751
3762
  });
3752
- useMounted(() => {
3763
+ onSmartMounted(() => {
3753
3764
  if (!slots.fab) {
3754
3765
  return;
3755
3766
  }
@@ -10109,7 +10120,7 @@ var __sfc__$R = vue.defineComponent({
10109
10120
  var chooseYear = (year) => {
10110
10121
  emit("choose-year", year);
10111
10122
  };
10112
- useMounted(() => {
10123
+ onSmartMounted(() => {
10113
10124
  var activeEl = document.querySelector("." + n$Q("item--active"));
10114
10125
  activeEl == null ? void 0 : activeEl.scrollIntoView({
10115
10126
  block: "center"
@@ -10480,7 +10491,7 @@ var __sfc__$Q = vue.defineComponent({
10480
10491
  var forwardRef = (checkType) => {
10481
10492
  headerEl.value.checkDate(checkType);
10482
10493
  };
10483
- useMounted(() => {
10494
+ onSmartMounted(() => {
10484
10495
  initDate();
10485
10496
  initHeader();
10486
10497
  });
@@ -11580,7 +11591,7 @@ var __sfc__$N = vue.defineComponent({
11580
11591
  var checkHasText = () => {
11581
11592
  state.withText = Boolean(slots.default) || Boolean(props2.description);
11582
11593
  };
11583
- useMounted(() => {
11594
+ onSmartMounted(() => {
11584
11595
  checkHasText();
11585
11596
  });
11586
11597
  vue.onUpdated(() => {
@@ -14476,9 +14487,8 @@ var __sfc__$I = vue.defineComponent({
14476
14487
  resize();
14477
14488
  }));
14478
14489
  vue.onActivated(resize);
14479
- vue.onDeactivated(stopAutoplay);
14480
- vue.onUnmounted(stopAutoplay);
14481
- useEventListener(() => window, "resize", resize);
14490
+ onSmartUnmounted(stopAutoplay);
14491
+ onWindowResize(resize);
14482
14492
  return {
14483
14493
  n: n$G,
14484
14494
  classes: classes$z,
@@ -15274,11 +15284,10 @@ var __sfc__$F = vue.defineComponent({
15274
15284
  scroller !== window && scroller.removeEventListener("scroll", handleScroll);
15275
15285
  };
15276
15286
  vue.watch(() => props2.disabled, resize);
15277
- useMounted(addScrollListener);
15278
- vue.onUnmounted(removeScrollListener);
15279
- vue.onDeactivated(removeScrollListener);
15287
+ onSmartMounted(addScrollListener);
15288
+ onSmartUnmounted(removeScrollListener);
15289
+ onWindowResize(resize);
15280
15290
  useEventListener(() => window, "scroll", handleScroll);
15281
- useEventListener(() => window, "resize", resize);
15282
15291
  return {
15283
15292
  n: n$D,
15284
15293
  classes: classes$x,
@@ -15691,7 +15700,7 @@ var __sfc__$D = vue.defineComponent({
15691
15700
  setOwnTop();
15692
15701
  });
15693
15702
  }));
15694
- useMounted(/* @__PURE__ */ _asyncToGenerator$5(function* () {
15703
+ onSmartMounted(/* @__PURE__ */ _asyncToGenerator$5(function* () {
15695
15704
  yield setScroller();
15696
15705
  addScrollerListener();
15697
15706
  }));
@@ -16004,9 +16013,9 @@ var __sfc__$C = vue.defineComponent({
16004
16013
  var handleClick = (e) => {
16005
16014
  call(props2.onClick, e);
16006
16015
  };
16007
- useMounted(resize);
16016
+ onWindowResize(resize);
16017
+ onSmartMounted(resize);
16008
16018
  vue.onUpdated(resize);
16009
- useEventListener(() => window, "resize", resize);
16010
16019
  return {
16011
16020
  placeholderTextEl,
16012
16021
  color,
@@ -16458,7 +16467,7 @@ var __sfc__$B = vue.defineComponent({
16458
16467
  resetValidation
16459
16468
  };
16460
16469
  call(bindForm, inputProvider);
16461
- useMounted(() => {
16470
+ onSmartMounted(() => {
16462
16471
  if (props2.autofocus) {
16463
16472
  focus();
16464
16473
  }
@@ -16878,15 +16887,14 @@ var __sfc__$z = vue.defineComponent({
16878
16887
  vue.watch(() => tabItem2.current.value, check2);
16879
16888
  }
16880
16889
  vue.watch(() => [props2.loading, props2.error, props2.finished], check2);
16881
- useMounted(() => {
16890
+ onSmartMounted(() => {
16882
16891
  scroller = getParentScroller(listEl.value);
16883
16892
  scroller.addEventListener("scroll", check2);
16884
16893
  if (props2.immediateCheck) {
16885
16894
  check2();
16886
16895
  }
16887
16896
  });
16888
- vue.onDeactivated(removeScrollerListener);
16889
- vue.onUnmounted(removeScrollerListener);
16897
+ onSmartUnmounted(removeScrollerListener);
16890
16898
  return {
16891
16899
  pack,
16892
16900
  listEl,
@@ -17618,10 +17626,10 @@ function __render__$v(_ctx, _cache) {
17618
17626
  [vue.createVNode(
17619
17627
  _component_var_menu,
17620
17628
  {
17629
+ placement: "cover-top",
17621
17630
  disabled: _ctx.disabled,
17622
17631
  show: _ctx.menuVisible,
17623
- "onUpdate:show": _cache[6] || (_cache[6] = ($event) => _ctx.menuVisible = $event),
17624
- "offset-x": -4
17632
+ "onUpdate:show": _cache[6] || (_cache[6] = ($event) => _ctx.menuVisible = $event)
17625
17633
  },
17626
17634
  {
17627
17635
  menu: vue.withCtx(() => [(vue.openBlock(true), vue.createElementBlock(
@@ -19109,7 +19117,7 @@ var __sfc__$s = vue.defineComponent({
19109
19117
  }, toNumber(props2.successDuration));
19110
19118
  }
19111
19119
  });
19112
- useMounted(setScroller);
19120
+ onSmartMounted(setScroller);
19113
19121
  useEventListener(freshNode, "touchmove", touchMove);
19114
19122
  return {
19115
19123
  n: n$o,
@@ -19622,6 +19630,10 @@ var props$i = {
19622
19630
  type: Boolean,
19623
19631
  default: true
19624
19632
  },
19633
+ clearable: {
19634
+ type: Boolean,
19635
+ default: false
19636
+ },
19625
19637
  rules: {
19626
19638
  type: Array
19627
19639
  },
@@ -19735,6 +19747,7 @@ var __sfc__$p = vue.defineComponent({
19735
19747
  hovering
19736
19748
  } = useHoverOverlay();
19737
19749
  var currentHoveringValue = vue.ref(-1);
19750
+ var lastScore = Number(props2.modelValue);
19738
19751
  var getStyle2 = (val) => {
19739
19752
  var {
19740
19753
  count,
@@ -19790,13 +19803,20 @@ var __sfc__$p = vue.defineComponent({
19790
19803
  };
19791
19804
  };
19792
19805
  var changeValue = (score, event) => {
19793
- if (props2.half) {
19806
+ var {
19807
+ half: half2,
19808
+ clearable
19809
+ } = props2;
19810
+ if (half2) {
19794
19811
  var {
19795
19812
  offsetWidth
19796
19813
  } = event.target;
19797
19814
  if (event.offsetX <= Math.floor(offsetWidth / 2))
19798
19815
  score -= 0.5;
19799
19816
  }
19817
+ if (lastScore === score && clearable)
19818
+ score = 0;
19819
+ lastScore = score;
19800
19820
  call(props2["onUpdate:modelValue"], score);
19801
19821
  };
19802
19822
  var validate = () => v(props2.rules, toNumber(props2.modelValue));
@@ -21634,7 +21654,7 @@ var __sfc__$e = vue.defineComponent({
21634
21654
  setProps(modelValue, toNumber(step2));
21635
21655
  });
21636
21656
  vue.watch(maxDistance, () => setProps());
21637
- useMounted(() => {
21657
+ onSmartMounted(() => {
21638
21658
  if (!stepValidator() || !valueValidator())
21639
21659
  return;
21640
21660
  maxDistance.value = sliderEl.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
@@ -21885,7 +21905,7 @@ var __sfc__$d = vue.defineComponent({
21885
21905
  clearTimeout(timer.value);
21886
21906
  updateAfterDuration();
21887
21907
  });
21888
- useMounted(() => {
21908
+ onSmartMounted(() => {
21889
21909
  if (props2.show) {
21890
21910
  call(props2.onOpen);
21891
21911
  updateAfterDuration();
@@ -22347,11 +22367,9 @@ var STEPS_BIND_STEP_KEY = Symbol("STEPS_BIND_STEP_KEY");
22347
22367
  function useStep() {
22348
22368
  var {
22349
22369
  bindChildren,
22350
- length,
22351
22370
  childProviders
22352
22371
  } = useChildren(STEPS_BIND_STEP_KEY);
22353
22372
  return {
22354
- length,
22355
22373
  step: childProviders,
22356
22374
  bindStep: bindChildren
22357
22375
  };
@@ -22393,89 +22411,76 @@ function __render__$a(_ctx, _cache) {
22393
22411
  [vue.createElementVNode(
22394
22412
  "div",
22395
22413
  {
22396
- class: vue.normalizeClass(_ctx.n(_ctx.direction + "-main")),
22397
- ref: _ctx.getRef
22414
+ class: vue.normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-tag"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-tag--active")])),
22415
+ style: vue.normalizeStyle({
22416
+ backgroundColor: _ctx.isActive || _ctx.isCurrent ? _ctx.activeColor : _ctx.inactiveColor
22417
+ }),
22418
+ onClick: _cache[0] || (_cache[0] = function() {
22419
+ return _ctx.click && _ctx.click(...arguments);
22420
+ })
22398
22421
  },
22399
- [vue.createElementVNode(
22400
- "div",
22422
+ [_ctx.isActive ? (vue.openBlock(), vue.createBlock(
22423
+ _component_var_icon,
22401
22424
  {
22402
- class: vue.normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-tag"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-tag--active")])),
22403
- style: vue.normalizeStyle({
22404
- backgroundColor: _ctx.isActive || _ctx.isCurrent ? _ctx.activeColor : _ctx.inactiveColor
22405
- }),
22406
- onClick: _cache[0] || (_cache[0] = function() {
22407
- return _ctx.click && _ctx.click(...arguments);
22408
- })
22425
+ key: 0,
22426
+ class: vue.normalizeClass(_ctx.n("icon")),
22427
+ "var-step-cover": "",
22428
+ name: _ctx.activeIcon
22409
22429
  },
22410
- [_ctx.isActive ? (vue.openBlock(), vue.createBlock(
22411
- _component_var_icon,
22412
- {
22413
- key: 0,
22414
- class: vue.normalizeClass(_ctx.n("icon")),
22415
- "var-step-cover": "",
22416
- name: _ctx.activeIcon
22417
- },
22418
- null,
22419
- 8,
22420
- ["class", "name"]
22421
- )) : _ctx.isCurrent && _ctx.currentIcon ? (vue.openBlock(), vue.createBlock(
22422
- _component_var_icon,
22423
- {
22424
- key: 1,
22425
- class: vue.normalizeClass(_ctx.n("icon")),
22426
- "var-step-cover": "",
22427
- name: _ctx.currentIcon
22428
- },
22429
- null,
22430
- 8,
22431
- ["class", "name"]
22432
- )) : _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(
22433
- _component_var_icon,
22434
- {
22435
- key: 2,
22436
- class: vue.normalizeClass(_ctx.n("icon")),
22437
- "var-step-cover": "",
22438
- name: _ctx.inactiveIcon
22439
- },
22440
- null,
22441
- 8,
22442
- ["class", "name"]
22443
- )) : (vue.openBlock(), vue.createElementBlock(
22444
- "span",
22445
- _hoisted_1$2,
22446
- vue.toDisplayString(_ctx.index + 1),
22447
- 1
22448
- /* TEXT */
22449
- ))],
22450
- 6
22451
- /* CLASS, STYLE */
22452
- ), vue.createElementVNode(
22453
- "div",
22430
+ null,
22431
+ 8,
22432
+ ["class", "name"]
22433
+ )) : _ctx.isCurrent && _ctx.currentIcon ? (vue.openBlock(), vue.createBlock(
22434
+ _component_var_icon,
22454
22435
  {
22455
- class: vue.normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-content"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-content--active")])),
22456
- onClick: _cache[1] || (_cache[1] = function() {
22457
- return _ctx.click && _ctx.click(...arguments);
22458
- })
22436
+ key: 1,
22437
+ class: vue.normalizeClass(_ctx.n("icon")),
22438
+ "var-step-cover": "",
22439
+ name: _ctx.currentIcon
22459
22440
  },
22460
- [vue.renderSlot(_ctx.$slots, "default")],
22461
- 2
22462
- /* CLASS */
22463
- )],
22441
+ null,
22442
+ 8,
22443
+ ["class", "name"]
22444
+ )) : _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(
22445
+ _component_var_icon,
22446
+ {
22447
+ key: 2,
22448
+ class: vue.normalizeClass(_ctx.n("icon")),
22449
+ "var-step-cover": "",
22450
+ name: _ctx.inactiveIcon
22451
+ },
22452
+ null,
22453
+ 8,
22454
+ ["class", "name"]
22455
+ )) : (vue.openBlock(), vue.createElementBlock(
22456
+ "span",
22457
+ _hoisted_1$2,
22458
+ vue.toDisplayString(_ctx.index + 1),
22459
+ 1
22460
+ /* TEXT */
22461
+ ))],
22462
+ 6
22463
+ /* CLASS, STYLE */
22464
+ ), vue.createElementVNode(
22465
+ "div",
22466
+ {
22467
+ class: vue.normalizeClass(_ctx.classes(_ctx.n(_ctx.direction + "-content"), [_ctx.isActive || _ctx.isCurrent, _ctx.n(_ctx.direction + "-content--active")])),
22468
+ onClick: _cache[1] || (_cache[1] = function() {
22469
+ return _ctx.click && _ctx.click(...arguments);
22470
+ })
22471
+ },
22472
+ [vue.renderSlot(_ctx.$slots, "default")],
22464
22473
  2
22465
22474
  /* CLASS */
22466
- ), !_ctx.isLastChild ? (vue.openBlock(), vue.createElementBlock(
22475
+ ), vue.createElementVNode(
22467
22476
  "div",
22468
22477
  {
22469
- key: 0,
22470
- class: vue.normalizeClass(_ctx.n(_ctx.direction + "-line")),
22471
- style: vue.normalizeStyle({
22472
- margin: _ctx.lineMargin
22473
- })
22478
+ class: vue.normalizeClass(_ctx.n(_ctx.direction + "-line"))
22474
22479
  },
22475
22480
  null,
22476
- 6
22477
- /* CLASS, STYLE */
22478
- )) : vue.createCommentVNode("v-if", true)],
22481
+ 2
22482
+ /* CLASS */
22483
+ )],
22479
22484
  2
22480
22485
  /* CLASS */
22481
22486
  )],
@@ -22490,9 +22495,6 @@ var __sfc__$b = vue.defineComponent({
22490
22495
  },
22491
22496
  props: props$a,
22492
22497
  setup() {
22493
- var main2 = vue.ref(null);
22494
- var lineMargin = vue.ref("");
22495
- var isLastChild = vue.ref(false);
22496
22498
  var {
22497
22499
  index,
22498
22500
  steps: steps2,
@@ -22500,7 +22502,6 @@ var __sfc__$b = vue.defineComponent({
22500
22502
  } = useSteps();
22501
22503
  var {
22502
22504
  active,
22503
- length,
22504
22505
  activeColor,
22505
22506
  inactiveColor,
22506
22507
  direction,
@@ -22512,33 +22513,17 @@ var __sfc__$b = vue.defineComponent({
22512
22513
  index
22513
22514
  };
22514
22515
  var click = () => clickStep(index.value);
22515
- var getRef = (el) => {
22516
- if (direction.value === "horizontal") {
22517
- main2.value = el;
22518
- }
22519
- };
22520
22516
  bindSteps(stepProvider);
22521
- vue.watch(length, (newLength) => {
22522
- isLastChild.value = newLength - 1 === index.value;
22523
- if (main2.value) {
22524
- var margin = main2.value.offsetWidth / 2 - 14;
22525
- lineMargin.value = "0 -" + margin + "px";
22526
- }
22527
- });
22528
22517
  return {
22529
22518
  n: n$b,
22530
22519
  classes: classes$8,
22531
- main: main2,
22532
22520
  index,
22533
22521
  isActive,
22534
22522
  isCurrent,
22535
22523
  direction,
22536
- lineMargin,
22537
22524
  activeColor,
22538
22525
  inactiveColor,
22539
- isLastChild,
22540
- click,
22541
- getRef
22526
+ click
22542
22527
  };
22543
22528
  }
22544
22529
  });
@@ -22595,7 +22580,6 @@ var __sfc__$a = vue.defineComponent({
22595
22580
  var inactiveColor = vue.computed(() => props2.inactiveColor);
22596
22581
  var direction = vue.computed(() => props2.direction);
22597
22582
  var {
22598
- length,
22599
22583
  bindStep
22600
22584
  } = useStep();
22601
22585
  var clickStep = (index) => {
@@ -22603,7 +22587,6 @@ var __sfc__$a = vue.defineComponent({
22603
22587
  };
22604
22588
  var stepsProvider = {
22605
22589
  active,
22606
- length,
22607
22590
  direction,
22608
22591
  activeColor,
22609
22592
  inactiveColor,
@@ -22864,10 +22847,7 @@ var __sfc__$8 = vue.defineComponent({
22864
22847
  };
22865
22848
  });
22866
22849
  var radius = vue.computed(() => {
22867
- var {
22868
- size = "5.333vw"
22869
- } = props2;
22870
- return multiplySizeUnit(size, 0.4);
22850
+ return multiplySizeUnit(props2.size || 0, 0.4);
22871
22851
  });
22872
22852
  var switchActive = (event) => {
22873
22853
  var {
@@ -23516,7 +23496,7 @@ var __sfc__$4 = vue.defineComponent({
23516
23496
  vue.watch(() => props2.active, resize);
23517
23497
  vue.watch(() => props2.scrollable, resize);
23518
23498
  vue.onActivated(resize);
23519
- useEventListener(() => window, "resize", resize);
23499
+ onWindowResize(resize);
23520
23500
  return {
23521
23501
  stickyComponent,
23522
23502
  indicatorWidth,
@@ -23700,7 +23680,8 @@ const badge$1 = {
23700
23680
  "--badge-default-color": "#555"
23701
23681
  };
23702
23682
  const button$1 = {
23703
- "--button-default-color": "#303030"
23683
+ "--button-default-color": "#303030",
23684
+ "--button-default-text-color": "#fff"
23704
23685
  };
23705
23686
  const card$1 = {
23706
23687
  "--card-background": "#303030",
@@ -23842,6 +23823,9 @@ const avatar$1 = {
23842
23823
  "--avatar-background-color": "#303030",
23843
23824
  "--avatar-border": "2px solid #1e1e1e"
23844
23825
  };
23826
+ const link$1 = {
23827
+ "--link-default-color": "#fff"
23828
+ };
23845
23829
  function _extends() {
23846
23830
  _extends = Object.assign ? Object.assign.bind() : function(target) {
23847
23831
  for (var i = 1; i < arguments.length; i++) {
@@ -23867,7 +23851,7 @@ const dark = _extends({
23867
23851
  "--color-danger": "#ef5350",
23868
23852
  "--color-disabled": "#404040",
23869
23853
  "--color-text-disabled": "#757575"
23870
- }, button$1, cell$1, card$1, timePicker$1, datePicker$1, skeleton$1, tabs$1, tab$1, popup$1, dialog$1, actionSheet$1, chip$1, badge$1, uploader$1, collapse, pullRefresh$1, switchThemes, steps, pagination$1, table$1, fieldDecorator$1, select$1, radio$1, checkbox$1, divider$1, picker$1, appBar$1, bottomNavigation$1, bottomNavigationItem$1, menu$1, result$1, breadcrumb$1, paper$1, avatar$1);
23854
+ }, button$1, cell$1, card$1, timePicker$1, datePicker$1, skeleton$1, tabs$1, tab$1, popup$1, dialog$1, actionSheet$1, chip$1, badge$1, uploader$1, collapse, pullRefresh$1, switchThemes, steps, pagination$1, table$1, fieldDecorator$1, select$1, radio$1, checkbox$1, divider$1, picker$1, appBar$1, bottomNavigation$1, bottomNavigationItem$1, menu$1, result$1, breadcrumb$1, paper$1, avatar$1, link$1);
23871
23855
  var Themes = {
23872
23856
  dark
23873
23857
  };
@@ -25534,9 +25518,9 @@ const skeleton = "";
25534
25518
  const SkeletonSfc = "";
25535
25519
  const slider = "";
25536
25520
  const SliderSfc = "";
25521
+ const SnackbarSfc = "";
25537
25522
  const snackbar = "";
25538
25523
  const coreSfc = "";
25539
- const SnackbarSfc = "";
25540
25524
  const space = "";
25541
25525
  const step = "";
25542
25526
  const StepSfc = "";
@@ -25561,7 +25545,7 @@ const TimePickerSfc = "";
25561
25545
  const TooltipSfc = "";
25562
25546
  const uploader = "";
25563
25547
  const UploaderSfc = "";
25564
- const version = "2.11.4";
25548
+ const version = "2.11.6-alpha.1686800314469";
25565
25549
  function install(app) {
25566
25550
  ActionSheet.install && app.use(ActionSheet);
25567
25551
  AppBar.install && app.use(AppBar);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.11.4",
3
+ "version": "2.11.6-alpha.1686800314469",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,9 +46,9 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/use": "2.11.4",
50
- "@varlet/shared": "2.11.4",
51
- "@varlet/icons": "2.11.4"
49
+ "@varlet/icons": "2.11.6-alpha.1686800314469",
50
+ "@varlet/shared": "2.11.6-alpha.1686800314469",
51
+ "@varlet/use": "2.11.6-alpha.1686800314469"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@vue/runtime-core": "3.3.1",
@@ -63,8 +63,8 @@
63
63
  "typescript": "^4.4.4",
64
64
  "vue": "3.3.2",
65
65
  "vue-router": "4.2.0",
66
- "@varlet/cli": "2.11.4",
67
- "@varlet/touch-emulator": "2.11.4"
66
+ "@varlet/cli": "2.11.6-alpha.1686800314469",
67
+ "@varlet/touch-emulator": "2.11.6-alpha.1686800314469"
68
68
  },
69
69
  "browserslist": [
70
70
  "Chrome >= 54",
package/types/rate.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface RateProps extends BasicAttributes {
17
17
  half?: boolean
18
18
  disabled?: boolean
19
19
  readonly?: boolean
20
+ clearable?: boolean
20
21
  ripple?: boolean
21
22
  rules?: Array<(value: any) => any>
22
23
  onChange?: ListenerProp<(value: string | number) => void>