@varlet/ui 1.26.1-alpha.1644652196468 → 1.26.1

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/list/List.js CHANGED
@@ -89,8 +89,10 @@ export default defineComponent({
89
89
  var containerBottom = scroller === window ? window.innerHeight : scroller.getBoundingClientRect().bottom;
90
90
  var {
91
91
  bottom: detectorBottom
92
- } = detectorEl.value.getBoundingClientRect();
93
- return detectorBottom - toPxNum(props.offset) <= containerBottom;
92
+ } = detectorEl.value.getBoundingClientRect(); // The fractional part of the detectorBottom when bottoming out overflows
93
+ // https://github.com/varletjs/varlet/issues/310
94
+
95
+ return Math.floor(detectorBottom) - toPxNum(props.offset) <= containerBottom;
94
96
  }; // expose
95
97
 
96
98
 
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import { defineComponent, ref, onMounted, computed, reactive, nextTick, watch } from 'vue';
2
4
  import { useValidation } from '../utils/components';
3
5
  import { useForm } from '../form/provide';
@@ -74,11 +76,9 @@ export function render(_ctx, _cache) {
74
76
  /* STYLE */
75
77
  ), _createElementVNode("div", {
76
78
  class: _normalizeClass(["var-slider__thumb-ripple", [_ctx.thumbsProps[item.enumValue].active ? 'var-slider__thumb-ripple-active' : null]]),
77
- style: _normalizeStyle({
78
- background: _ctx.thumbColor,
79
- height: _ctx.thumbSize === undefined ? undefined : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : '0px',
80
- width: _ctx.thumbSize === undefined ? undefined : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : '0px'
81
- })
79
+ style: _normalizeStyle(_extends({
80
+ background: _ctx.thumbColor
81
+ }, _ctx.getRippleSize(item)))
82
82
  }, null, 6
83
83
  /* CLASS, STYLE */
84
84
  ), _createElementVNode("div", {
@@ -166,6 +166,19 @@ export default defineComponent({
166
166
  return list;
167
167
  });
168
168
 
169
+ var getRippleSize = item => {
170
+ var size;
171
+
172
+ if (props.thumbSize !== undefined) {
173
+ size = thumbsProps[item.enumValue].active ? 3 * toNumber(props.thumbSize) + "px" : '0px';
174
+ }
175
+
176
+ return {
177
+ height: size,
178
+ width: size
179
+ };
180
+ };
181
+
169
182
  var showLabel = type => {
170
183
  if (props.labelVisible === 'always') return true;
171
184
  if (props.labelVisible === 'never') return false;
@@ -369,6 +382,7 @@ export default defineComponent({
369
382
  thumbsProps,
370
383
  thumbList,
371
384
  toNumber,
385
+ getRippleSize,
372
386
  showLabel,
373
387
  start,
374
388
  move,
package/es/varlet.esm.js CHANGED
@@ -6,8 +6,8 @@ var context = {
6
6
  };
7
7
  reactive(context);
8
8
  var Context = reactive(context);
9
- function _extends$c() {
10
- _extends$c = Object.assign || function(target) {
9
+ function _extends$d() {
10
+ _extends$d = Object.assign || function(target) {
11
11
  for (var i = 1; i < arguments.length; i++) {
12
12
  var source = arguments[i];
13
13
  for (var key in source) {
@@ -18,7 +18,7 @@ function _extends$c() {
18
18
  }
19
19
  return target;
20
20
  };
21
- return _extends$c.apply(this, arguments);
21
+ return _extends$d.apply(this, arguments);
22
22
  }
23
23
  var ANIMATION_DURATION$1 = 250;
24
24
  function setStyles(element) {
@@ -119,7 +119,7 @@ function forbidRippleTask() {
119
119
  }
120
120
  function mounted$1(el, binding) {
121
121
  var _binding$value, _binding$value$touchm, _binding$value2;
122
- el._ripple = _extends$c({
122
+ el._ripple = _extends$d({
123
123
  tasker: null
124
124
  }, (_binding$value = binding.value) != null ? _binding$value : {}, {
125
125
  touchmoveForbid: (_binding$value$touchm = (_binding$value2 = binding.value) == null ? void 0 : _binding$value2.touchmoveForbid) != null ? _binding$value$touchm : Context.touchmoveForbid,
@@ -150,7 +150,7 @@ function unmounted(el) {
150
150
  }
151
151
  function updated$1(el, binding) {
152
152
  var _binding$value3, _binding$value$touchm2, _binding$value4;
153
- el._ripple = _extends$c({}, el._ripple, (_binding$value3 = binding.value) != null ? _binding$value3 : {}, {
153
+ el._ripple = _extends$d({}, el._ripple, (_binding$value3 = binding.value) != null ? _binding$value3 : {}, {
154
154
  touchmoveForbid: (_binding$value$touchm2 = (_binding$value4 = binding.value) == null ? void 0 : _binding$value4.touchmoveForbid) != null ? _binding$value$touchm2 : Context.touchmoveForbid,
155
155
  tasker: null
156
156
  });
@@ -476,8 +476,8 @@ function _objectWithoutPropertiesLoose(source, excluded) {
476
476
  }
477
477
  return target;
478
478
  }
479
- function _extends$b() {
480
- _extends$b = Object.assign || function(target) {
479
+ function _extends$c() {
480
+ _extends$c = Object.assign || function(target) {
481
481
  for (var i = 1; i < arguments.length; i++) {
482
482
  var source = arguments[i];
483
483
  for (var key in source) {
@@ -488,7 +488,7 @@ function _extends$b() {
488
488
  }
489
489
  return target;
490
490
  };
491
- return _extends$b.apply(this, arguments);
491
+ return _extends$c.apply(this, arguments);
492
492
  }
493
493
  function pickProps(props2, propsKey) {
494
494
  return Array.isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
@@ -517,7 +517,7 @@ function mountInstance(component, props2, eventListener) {
517
517
  }
518
518
  var Host = {
519
519
  setup() {
520
- return () => h(component, _extends$b({}, props2, eventListener));
520
+ return () => h(component, _extends$c({}, props2, eventListener));
521
521
  }
522
522
  };
523
523
  var {
@@ -605,7 +605,7 @@ function useChildren(key) {
605
605
  removeItem(childProviders, childProvider);
606
606
  };
607
607
  var bindChildren = (parentProvider) => {
608
- provide(key, _extends$b({
608
+ provide(key, _extends$c({
609
609
  collect,
610
610
  clear: clear2
611
611
  }, parentProvider));
@@ -708,8 +708,8 @@ function exposeApis(apis) {
708
708
  Object.assign(instance.proxy, apis);
709
709
  }
710
710
  }
711
- function _extends$a() {
712
- _extends$a = Object.assign || function(target) {
711
+ function _extends$b() {
712
+ _extends$b = Object.assign || function(target) {
713
713
  for (var i = 1; i < arguments.length; i++) {
714
714
  var source = arguments[i];
715
715
  for (var key in source) {
@@ -720,7 +720,7 @@ function _extends$a() {
720
720
  }
721
721
  return target;
722
722
  };
723
- return _extends$a.apply(this, arguments);
723
+ return _extends$b.apply(this, arguments);
724
724
  }
725
725
  function _isSlot$2(s) {
726
726
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
@@ -768,7 +768,7 @@ var Popup = defineComponent({
768
768
  } = props2;
769
769
  return createVNode("div", {
770
770
  "class": ["var-popup__overlay", overlayClass],
771
- "style": _extends$a({
771
+ "style": _extends$b({
772
772
  zIndex: zIndex.value - 1
773
773
  }, overlayStyle),
774
774
  "onClick": hidePopup
@@ -1131,8 +1131,8 @@ var Icon = defineComponent({
1131
1131
  Icon.install = function(app) {
1132
1132
  app.component(Icon.name, Icon);
1133
1133
  };
1134
- function _extends$9() {
1135
- _extends$9 = Object.assign || function(target) {
1134
+ function _extends$a() {
1135
+ _extends$a = Object.assign || function(target) {
1136
1136
  for (var i = 1; i < arguments.length; i++) {
1137
1137
  var source = arguments[i];
1138
1138
  for (var key in source) {
@@ -1143,9 +1143,9 @@ function _extends$9() {
1143
1143
  }
1144
1144
  return target;
1145
1145
  };
1146
- return _extends$9.apply(this, arguments);
1146
+ return _extends$a.apply(this, arguments);
1147
1147
  }
1148
- var props$Q = _extends$9({
1148
+ var props$Q = _extends$a({
1149
1149
  show: {
1150
1150
  type: Boolean,
1151
1151
  default: false
@@ -1277,8 +1277,8 @@ var zhCN = {
1277
1277
  paginationPage: "\u9875",
1278
1278
  paginationJump: "\u524D\u5F80"
1279
1279
  };
1280
- function _extends$8() {
1281
- _extends$8 = Object.assign || function(target) {
1280
+ function _extends$9() {
1281
+ _extends$9 = Object.assign || function(target) {
1282
1282
  for (var i = 1; i < arguments.length; i++) {
1283
1283
  var source = arguments[i];
1284
1284
  for (var key in source) {
@@ -1289,7 +1289,7 @@ function _extends$8() {
1289
1289
  }
1290
1290
  return target;
1291
1291
  };
1292
- return _extends$8.apply(this, arguments);
1292
+ return _extends$9.apply(this, arguments);
1293
1293
  }
1294
1294
  function useLocale() {
1295
1295
  var packs2 = {};
@@ -1310,7 +1310,7 @@ function useLocale() {
1310
1310
  console.warn("The " + lang + " does not exist. You can mount a language package using the add method");
1311
1311
  return;
1312
1312
  }
1313
- packs2[lang] = _extends$8({}, packs2[lang], pack3);
1313
+ packs2[lang] = _extends$9({}, packs2[lang], pack3);
1314
1314
  use2(lang);
1315
1315
  };
1316
1316
  return {
@@ -6624,8 +6624,8 @@ var PanelHeader = defineComponent({
6624
6624
  };
6625
6625
  }
6626
6626
  });
6627
- function _extends$7() {
6628
- _extends$7 = Object.assign || function(target) {
6627
+ function _extends$8() {
6628
+ _extends$8 = Object.assign || function(target) {
6629
6629
  for (var i = 1; i < arguments.length; i++) {
6630
6630
  var source = arguments[i];
6631
6631
  for (var key in source) {
@@ -6636,7 +6636,7 @@ function _extends$7() {
6636
6636
  }
6637
6637
  return target;
6638
6638
  };
6639
- return _extends$7.apply(this, arguments);
6639
+ return _extends$8.apply(this, arguments);
6640
6640
  }
6641
6641
  dayjs.extend(isSameOrBefore);
6642
6642
  dayjs.extend(isSameOrAfter);
@@ -6668,7 +6668,7 @@ function render$E(_ctx, _cache) {
6668
6668
  class: "var-month-picker__button",
6669
6669
  "var-month-picker-cover": "",
6670
6670
  ripple: false
6671
- }, _extends$7({}, _ctx.buttonProps(month.index)), {
6671
+ }, _extends$8({}, _ctx.buttonProps(month.index)), {
6672
6672
  onClick: ($event) => _ctx.chooseMonth(month)
6673
6673
  }), {
6674
6674
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.getMonthAbbr(month.index)), 1)]),
@@ -6950,8 +6950,8 @@ var YearPickerPanel = defineComponent({
6950
6950
  };
6951
6951
  }
6952
6952
  });
6953
- function _extends$6() {
6954
- _extends$6 = Object.assign || function(target) {
6953
+ function _extends$7() {
6954
+ _extends$7 = Object.assign || function(target) {
6955
6955
  for (var i = 1; i < arguments.length; i++) {
6956
6956
  var source = arguments[i];
6957
6957
  for (var key in source) {
@@ -6962,7 +6962,7 @@ function _extends$6() {
6962
6962
  }
6963
6963
  return target;
6964
6964
  };
6965
- return _extends$6.apply(this, arguments);
6965
+ return _extends$7.apply(this, arguments);
6966
6966
  }
6967
6967
  dayjs.extend(isSameOrBefore);
6968
6968
  dayjs.extend(isSameOrAfter);
@@ -7007,7 +7007,7 @@ function render$C(_ctx, _cache) {
7007
7007
  "var-day-picker-cover": "",
7008
7008
  round: "",
7009
7009
  ripple: false
7010
- }, _extends$6({}, _ctx.buttonProps(day)), {
7010
+ }, _extends$7({}, _ctx.buttonProps(day)), {
7011
7011
  onClick: ($event) => _ctx.chooseDay(day)
7012
7012
  }), {
7013
7013
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.filterDay(day)), 1)]),
@@ -7644,8 +7644,8 @@ var DatePicker = defineComponent({
7644
7644
  DatePicker.install = function(app) {
7645
7645
  app.component(DatePicker.name, DatePicker);
7646
7646
  };
7647
- function _extends$5() {
7648
- _extends$5 = Object.assign || function(target) {
7647
+ function _extends$6() {
7648
+ _extends$6 = Object.assign || function(target) {
7649
7649
  for (var i = 1; i < arguments.length; i++) {
7650
7650
  var source = arguments[i];
7651
7651
  for (var key in source) {
@@ -7656,12 +7656,12 @@ function _extends$5() {
7656
7656
  }
7657
7657
  return target;
7658
7658
  };
7659
- return _extends$5.apply(this, arguments);
7659
+ return _extends$6.apply(this, arguments);
7660
7660
  }
7661
7661
  function messageAlignValidator(messageAlign) {
7662
7662
  return ["left", "center", "right"].includes(messageAlign);
7663
7663
  }
7664
- var props$y = _extends$5({
7664
+ var props$y = _extends$6({
7665
7665
  show: {
7666
7666
  type: Boolean,
7667
7667
  default: false
@@ -7959,8 +7959,8 @@ var props$x = {
7959
7959
  default: false
7960
7960
  }
7961
7961
  };
7962
- function _extends$4() {
7963
- _extends$4 = Object.assign || function(target) {
7962
+ function _extends$5() {
7963
+ _extends$5 = Object.assign || function(target) {
7964
7964
  for (var i = 1; i < arguments.length; i++) {
7965
7965
  var source = arguments[i];
7966
7966
  for (var key in source) {
@@ -7971,7 +7971,7 @@ function _extends$4() {
7971
7971
  }
7972
7972
  return target;
7973
7973
  };
7974
- return _extends$4.apply(this, arguments);
7974
+ return _extends$5.apply(this, arguments);
7975
7975
  }
7976
7976
  var _hoisted_1$o = {
7977
7977
  key: 0,
@@ -8005,12 +8005,12 @@ var Divider = defineComponent({
8005
8005
  margin
8006
8006
  };
8007
8007
  if (isBool(inset) || inset === 0)
8008
- return _extends$4({}, baseStyle);
8008
+ return _extends$5({}, baseStyle);
8009
8009
  var _inset = toNumber(inset);
8010
8010
  var absInsetWithUnit = Math.abs(_inset) + (inset + "").replace(_inset + "", "");
8011
- return vertical ? _extends$4({}, baseStyle, {
8011
+ return vertical ? _extends$5({}, baseStyle, {
8012
8012
  height: "calc(80% - " + toSizeUnit(absInsetWithUnit) + ")"
8013
- }) : _extends$4({}, baseStyle, {
8013
+ }) : _extends$5({}, baseStyle, {
8014
8014
  width: "calc(100% - " + toSizeUnit(absInsetWithUnit) + ")",
8015
8015
  left: _inset > 0 ? toSizeUnit(absInsetWithUnit) : toSizeUnit(0)
8016
8016
  });
@@ -8024,7 +8024,7 @@ var Divider = defineComponent({
8024
8024
  onUpdated(() => {
8025
8025
  checkHasText();
8026
8026
  });
8027
- return _extends$4({}, toRefs(state), {
8027
+ return _extends$5({}, toRefs(state), {
8028
8028
  style,
8029
8029
  isInset
8030
8030
  });
@@ -8159,8 +8159,8 @@ function _asyncToGenerator$7(fn) {
8159
8159
  });
8160
8160
  };
8161
8161
  }
8162
- function _extends$3() {
8163
- _extends$3 = Object.assign || function(target) {
8162
+ function _extends$4() {
8163
+ _extends$4 = Object.assign || function(target) {
8164
8164
  for (var i = 1; i < arguments.length; i++) {
8165
8165
  var source = arguments[i];
8166
8166
  for (var key in source) {
@@ -8171,7 +8171,7 @@ function _extends$3() {
8171
8171
  }
8172
8172
  return target;
8173
8173
  };
8174
- return _extends$3.apply(this, arguments);
8174
+ return _extends$4.apply(this, arguments);
8175
8175
  }
8176
8176
  var BACKGROUND_IMAGE_ARG_NAME = "background-image";
8177
8177
  var LAZY_LOADING = "lazy-loading";
@@ -8241,7 +8241,7 @@ function createLazy(el, binding) {
8241
8241
  error: (_el$getAttribute2 = el.getAttribute(LAZY_ERROR)) != null ? _el$getAttribute2 : defaultLazyOptions.error,
8242
8242
  attempt: el.getAttribute(LAZY_ATTEMPT) ? Number(el.getAttribute(LAZY_ATTEMPT)) : defaultLazyOptions.attempt
8243
8243
  };
8244
- el._lazy = _extends$3({
8244
+ el._lazy = _extends$4({
8245
8245
  src: binding.value,
8246
8246
  arg: binding.arg,
8247
8247
  currentAttempt: 0,
@@ -8990,8 +8990,8 @@ var SwipeItem = defineComponent({
8990
8990
  SwipeItem.install = function(app) {
8991
8991
  app.component(SwipeItem.name, SwipeItem);
8992
8992
  };
8993
- function _extends$2() {
8994
- _extends$2 = Object.assign || function(target) {
8993
+ function _extends$3() {
8994
+ _extends$3 = Object.assign || function(target) {
8995
8995
  for (var i = 1; i < arguments.length; i++) {
8996
8996
  var source = arguments[i];
8997
8997
  for (var key in source) {
@@ -9002,9 +9002,9 @@ function _extends$2() {
9002
9002
  }
9003
9003
  return target;
9004
9004
  };
9005
- return _extends$2.apply(this, arguments);
9005
+ return _extends$3.apply(this, arguments);
9006
9006
  }
9007
- var props$t = _extends$2({
9007
+ var props$t = _extends$3({
9008
9008
  show: {
9009
9009
  type: Boolean,
9010
9010
  default: false
@@ -10356,7 +10356,7 @@ var List = defineComponent({
10356
10356
  var {
10357
10357
  bottom: detectorBottom
10358
10358
  } = detectorEl.value.getBoundingClientRect();
10359
- return detectorBottom - toPxNum(props2.offset) <= containerBottom;
10359
+ return Math.floor(detectorBottom) - toPxNum(props2.offset) <= containerBottom;
10360
10360
  };
10361
10361
  var check2 = /* @__PURE__ */ function() {
10362
10362
  var _ref = _asyncToGenerator$3(function* () {
@@ -11051,8 +11051,8 @@ var Pagination = defineComponent({
11051
11051
  Pagination.install = function(app) {
11052
11052
  app.component(Pagination.name, Pagination);
11053
11053
  };
11054
- function _extends$1() {
11055
- _extends$1 = Object.assign || function(target) {
11054
+ function _extends$2() {
11055
+ _extends$2 = Object.assign || function(target) {
11056
11056
  for (var i = 1; i < arguments.length; i++) {
11057
11057
  var source = arguments[i];
11058
11058
  for (var key in source) {
@@ -11063,9 +11063,9 @@ function _extends$1() {
11063
11063
  }
11064
11064
  return target;
11065
11065
  };
11066
- return _extends$1.apply(this, arguments);
11066
+ return _extends$2.apply(this, arguments);
11067
11067
  }
11068
- var props$k = _extends$1({
11068
+ var props$k = _extends$2({
11069
11069
  columns: {
11070
11070
  type: Array,
11071
11071
  default: () => []
@@ -13203,6 +13203,20 @@ var props$b = {
13203
13203
  type: Function
13204
13204
  }
13205
13205
  };
13206
+ function _extends$1() {
13207
+ _extends$1 = Object.assign || function(target) {
13208
+ for (var i = 1; i < arguments.length; i++) {
13209
+ var source = arguments[i];
13210
+ for (var key in source) {
13211
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
13212
+ target[key] = source[key];
13213
+ }
13214
+ }
13215
+ }
13216
+ return target;
13217
+ };
13218
+ return _extends$1.apply(this, arguments);
13219
+ }
13206
13220
  var Thumbs;
13207
13221
  (function(Thumbs2) {
13208
13222
  Thumbs2["First"] = "1";
@@ -13259,11 +13273,9 @@ function render$d(_ctx, _cache) {
13259
13273
  })
13260
13274
  }, null, 4), createElementVNode("div", {
13261
13275
  class: normalizeClass(["var-slider__thumb-ripple", [_ctx.thumbsProps[item.enumValue].active ? "var-slider__thumb-ripple-active" : null]]),
13262
- style: normalizeStyle({
13263
- background: _ctx.thumbColor,
13264
- height: _ctx.thumbSize === void 0 ? void 0 : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : "0px",
13265
- width: _ctx.thumbSize === void 0 ? void 0 : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : "0px"
13266
- })
13276
+ style: normalizeStyle(_extends$1({
13277
+ background: _ctx.thumbColor
13278
+ }, _ctx.getRippleSize(item)))
13267
13279
  }, null, 6), createElementVNode("div", {
13268
13280
  class: normalizeClass(["var-slider__thumb-label", [_ctx.showLabel(item.enumValue) ? "var-slider__thumb-label-active" : null]]),
13269
13281
  style: normalizeStyle({
@@ -13329,6 +13341,16 @@ var Slider = defineComponent({
13329
13341
  }
13330
13342
  return list2;
13331
13343
  });
13344
+ var getRippleSize = (item) => {
13345
+ var size;
13346
+ if (props2.thumbSize !== void 0) {
13347
+ size = thumbsProps[item.enumValue].active ? 3 * toNumber(props2.thumbSize) + "px" : "0px";
13348
+ }
13349
+ return {
13350
+ height: size,
13351
+ width: size
13352
+ };
13353
+ };
13332
13354
  var showLabel = (type) => {
13333
13355
  if (props2.labelVisible === "always")
13334
13356
  return true;
@@ -13517,6 +13539,7 @@ var Slider = defineComponent({
13517
13539
  thumbsProps,
13518
13540
  thumbList,
13519
13541
  toNumber,
13542
+ getRippleSize,
13520
13543
  showLabel,
13521
13544
  start,
13522
13545
  move,
package/lib/list/List.js CHANGED
@@ -104,8 +104,10 @@ var _default = (0, _vue.defineComponent)({
104
104
  var containerBottom = scroller === window ? window.innerHeight : scroller.getBoundingClientRect().bottom;
105
105
  var {
106
106
  bottom: detectorBottom
107
- } = detectorEl.value.getBoundingClientRect();
108
- return detectorBottom - (0, _elements.toPxNum)(props.offset) <= containerBottom;
107
+ } = detectorEl.value.getBoundingClientRect(); // The fractional part of the detectorBottom when bottoming out overflows
108
+ // https://github.com/varletjs/varlet/issues/310
109
+
110
+ return Math.floor(detectorBottom) - (0, _elements.toPxNum)(props.offset) <= containerBottom;
109
111
  }; // expose
110
112
 
111
113
 
@@ -20,6 +20,8 @@ var _formDetails = _interopRequireDefault(require("../form-details"));
20
20
 
21
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
22
 
23
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
+
23
25
  var Thumbs;
24
26
 
25
27
  (function (Thumbs) {
@@ -88,11 +90,9 @@ function render(_ctx, _cache) {
88
90
  /* STYLE */
89
91
  ), (0, _vue.createElementVNode)("div", {
90
92
  class: (0, _vue.normalizeClass)(["var-slider__thumb-ripple", [_ctx.thumbsProps[item.enumValue].active ? 'var-slider__thumb-ripple-active' : null]]),
91
- style: (0, _vue.normalizeStyle)({
92
- background: _ctx.thumbColor,
93
- height: _ctx.thumbSize === undefined ? undefined : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : '0px',
94
- width: _ctx.thumbSize === undefined ? undefined : _ctx.thumbsProps[item.enumValue].active ? 3 * _ctx.toNumber(_ctx.thumbSize) + "px" : '0px'
95
- })
93
+ style: (0, _vue.normalizeStyle)(_extends({
94
+ background: _ctx.thumbColor
95
+ }, _ctx.getRippleSize(item)))
96
96
  }, null, 6
97
97
  /* CLASS, STYLE */
98
98
  ), (0, _vue.createElementVNode)("div", {
@@ -181,6 +181,19 @@ var _default = (0, _vue.defineComponent)({
181
181
  return list;
182
182
  });
183
183
 
184
+ var getRippleSize = item => {
185
+ var size;
186
+
187
+ if (props.thumbSize !== undefined) {
188
+ size = thumbsProps[item.enumValue].active ? 3 * (0, _shared.toNumber)(props.thumbSize) + "px" : '0px';
189
+ }
190
+
191
+ return {
192
+ height: size,
193
+ width: size
194
+ };
195
+ };
196
+
184
197
  var showLabel = type => {
185
198
  if (props.labelVisible === 'always') return true;
186
199
  if (props.labelVisible === 'never') return false;
@@ -384,6 +397,7 @@ var _default = (0, _vue.defineComponent)({
384
397
  thumbsProps,
385
398
  thumbList,
386
399
  toNumber: _shared.toNumber,
400
+ getRippleSize,
387
401
  showLabel,
388
402
  start,
389
403
  move,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "1.26.1-alpha.1644652196468",
3
+ "version": "1.26.1",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -39,13 +39,13 @@
39
39
  },
40
40
  "gitHead": "ee9c3866bedad96c86365b0f9888a3a6bb781b1f",
41
41
  "dependencies": {
42
- "@varlet/icons": "1.26.1-alpha.1644652196468",
42
+ "@varlet/icons": "1.26.1",
43
43
  "dayjs": "^1.10.4",
44
44
  "decimal.js": "^10.2.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@varlet/cli": "1.26.1-alpha.1644652196468",
48
- "@varlet/touch-emulator": "1.26.1-alpha.1644652196468",
47
+ "@varlet/cli": "1.26.1",
48
+ "@varlet/touch-emulator": "1.26.1",
49
49
  "@vue/test-utils": "2.0.0-rc.6",
50
50
  "@vue/runtime-core": "3.2.25",
51
51
  "typescript": "^4.4.4",