shineout 3.9.12-beta.4 → 3.9.12-beta.6

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.12-beta.4'
525
+ version: '3.9.12-beta.6'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12408,7 +12408,7 @@ var handleStyle = function handleStyle(style) {
12408
12408
  };
12409
12409
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12410
12410
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12411
- /* harmony default export */ var version = ('3.9.12-beta.4');
12411
+ /* harmony default export */ var version = ('3.9.12-beta.6');
12412
12412
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12413
12413
 
12414
12414
 
@@ -23648,7 +23648,10 @@ var progressStyle = {
23648
23648
  '$wrapperDanger &': {
23649
23649
  color: src.progressDangerFrontBackgroundColor
23650
23650
  },
23651
- lineHeight: 1
23651
+ lineHeight: 1,
23652
+ '& > svg': {
23653
+ display: 'block'
23654
+ }
23652
23655
  },
23653
23656
  circle: {
23654
23657
  position: 'relative',
@@ -63706,8 +63709,42 @@ var useSlider = function useSlider(props) {
63706
63709
  // Check if the new value would be disabled
63707
63710
  var newValue = getValueFromRate(newRate[context.dragIndex], scale, step);
63708
63711
  if (isDisabled(newValue)) {
63709
- // Stay at current position to prevent flickering
63710
- return r;
63712
+ // Binary search for the closest allowed boundary in the drag direction
63713
+ var currentRate = v;
63714
+ var lo, hi, boundaryRate;
63715
+ if (rate > currentRate) {
63716
+ // Dragging forward: find the largest non-disabled rate in [currentRate, rate]
63717
+ lo = currentRate;
63718
+ hi = rate;
63719
+ for (var i = 0; i < 20; i++) {
63720
+ var mid = (lo + hi) / 2;
63721
+ if (isDisabled(getValueFromRate(mid, scale, step))) {
63722
+ hi = mid;
63723
+ } else {
63724
+ lo = mid;
63725
+ }
63726
+ }
63727
+ boundaryRate = lo;
63728
+ } else {
63729
+ // Dragging backward: find the smallest non-disabled rate in [rate, currentRate]
63730
+ lo = rate;
63731
+ hi = currentRate;
63732
+ for (var _i = 0; _i < 20; _i++) {
63733
+ var _mid = (lo + hi) / 2;
63734
+ if (isDisabled(getValueFromRate(_mid, scale, step))) {
63735
+ lo = _mid;
63736
+ } else {
63737
+ hi = _mid;
63738
+ }
63739
+ }
63740
+ boundaryRate = hi;
63741
+ }
63742
+ var boundaryValue = getValueFromRate(boundaryRate, scale, step);
63743
+ var currentValue = getValueFromRate(v, scale, step);
63744
+ if (isDisabled(boundaryValue) || boundaryValue === currentValue) {
63745
+ return r;
63746
+ }
63747
+ newRate[context.dragIndex] = boundaryRate;
63711
63748
  }
63712
63749
  if (newRate[0] > newRate[1]) {
63713
63750
  context.dragIndex = context.dragIndex === 0 ? 1 : 0;
@@ -75574,7 +75611,7 @@ var upload_interface = __webpack_require__(8821);
75574
75611
 
75575
75612
 
75576
75613
  /* harmony default export */ var src_0 = ({
75577
- version: '3.9.12-beta.4'
75614
+ version: '3.9.12-beta.6'
75578
75615
  });
75579
75616
  }();
75580
75617
  /******/ return __webpack_exports__;