@arco-design/mobile-react 2.30.4 → 2.30.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/CHANGELOG.md +26 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/checkbox/style/css/index.css +3 -0
- package/cjs/checkbox/style/index.less +5 -0
- package/cjs/date-picker/index.js +46 -29
- package/cjs/dialog/style/css/index.css +88 -0
- package/cjs/dialog/style/index.less +16 -4
- package/cjs/dropdown-menu/helper.d.ts +1 -6
- package/cjs/dropdown-menu/helper.js +0 -10
- package/cjs/ellipsis/components/js-ellipsis.js +14 -17
- package/cjs/ellipsis/index.d.ts +2 -2
- package/cjs/ellipsis/index.js +2 -2
- package/cjs/image-preview/index.js +1 -0
- package/cjs/index-bar/style/css/index.css +28 -5
- package/cjs/index-bar/style/index.less +10 -10
- package/cjs/pagination/arrow.js +6 -3
- package/cjs/pagination/style/css/index.css +21 -6
- package/cjs/pagination/style/index.less +9 -9
- package/cjs/picker/style/css/index.css +8 -0
- package/cjs/picker/style/index.less +2 -2
- package/cjs/progress/style/css/index.css +20 -0
- package/cjs/progress/style/index.less +5 -5
- package/cjs/radio/style/css/index.css +3 -0
- package/cjs/radio/style/index.less +5 -0
- package/cjs/search-bar/style/css/index.css +18 -0
- package/cjs/search-bar/style/index.less +5 -5
- package/cjs/show-monitor/index.d.ts +5 -0
- package/cjs/show-monitor/index.js +1 -0
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/index.d.ts +10 -0
- package/cjs/slider/index.js +1 -0
- package/cjs/slider/thumb.d.ts +6 -5
- package/cjs/slider/thumb.js +19 -20
- package/dist/index.js +86 -57
- package/dist/index.min.js +2 -2
- package/dist/style.css +152 -11
- package/dist/style.min.css +1 -1
- package/esm/checkbox/style/css/index.css +3 -0
- package/esm/checkbox/style/index.less +5 -0
- package/esm/date-picker/index.js +44 -26
- package/esm/dialog/style/css/index.css +88 -0
- package/esm/dialog/style/index.less +16 -4
- package/esm/dropdown-menu/helper.d.ts +1 -6
- package/esm/dropdown-menu/helper.js +0 -8
- package/esm/ellipsis/components/js-ellipsis.js +14 -17
- package/esm/ellipsis/index.d.ts +2 -2
- package/esm/ellipsis/index.js +2 -2
- package/esm/image-preview/index.js +1 -0
- package/esm/index-bar/style/css/index.css +28 -5
- package/esm/index-bar/style/index.less +10 -10
- package/esm/pagination/arrow.js +6 -3
- package/esm/pagination/style/css/index.css +21 -6
- package/esm/pagination/style/index.less +9 -9
- package/esm/picker/style/css/index.css +8 -0
- package/esm/picker/style/index.less +2 -2
- package/esm/progress/style/css/index.css +20 -0
- package/esm/progress/style/index.less +5 -5
- package/esm/radio/style/css/index.css +3 -0
- package/esm/radio/style/index.less +5 -0
- package/esm/search-bar/style/css/index.css +18 -0
- package/esm/search-bar/style/index.less +5 -5
- package/esm/show-monitor/index.d.ts +5 -0
- package/esm/show-monitor/index.js +1 -0
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/index.d.ts +10 -0
- package/esm/slider/index.js +1 -0
- package/esm/slider/thumb.d.ts +6 -5
- package/esm/slider/thumb.js +19 -17
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +3 -4
- package/tokens/app/arcodesign/default/index.d.ts +0 -1
- package/tokens/app/arcodesign/default/index.js +3 -4
- package/tokens/app/arcodesign/default/index.json +9 -21
- package/tokens/app/arcodesign/default/index.less +3 -4
- package/umd/checkbox/style/css/index.css +3 -0
- package/umd/checkbox/style/index.less +5 -0
- package/umd/date-picker/index.js +47 -30
- package/umd/dialog/style/css/index.css +88 -0
- package/umd/dialog/style/index.less +16 -4
- package/umd/dropdown-menu/helper.d.ts +1 -6
- package/umd/dropdown-menu/helper.js +0 -10
- package/umd/ellipsis/components/js-ellipsis.js +14 -17
- package/umd/ellipsis/index.d.ts +2 -2
- package/umd/ellipsis/index.js +2 -2
- package/umd/image-preview/index.js +1 -0
- package/umd/index-bar/style/css/index.css +28 -5
- package/umd/index-bar/style/index.less +10 -10
- package/umd/pagination/arrow.js +6 -3
- package/umd/pagination/style/css/index.css +21 -6
- package/umd/pagination/style/index.less +9 -9
- package/umd/picker/style/css/index.css +8 -0
- package/umd/picker/style/index.less +2 -2
- package/umd/progress/style/css/index.css +20 -0
- package/umd/progress/style/index.less +5 -5
- package/umd/radio/style/css/index.css +3 -0
- package/umd/radio/style/index.less +5 -0
- package/umd/search-bar/style/css/index.css +18 -0
- package/umd/search-bar/style/index.less +5 -5
- package/umd/show-monitor/index.d.ts +5 -0
- package/umd/show-monitor/index.js +1 -0
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/index.d.ts +10 -0
- package/umd/slider/index.js +1 -0
- package/umd/slider/thumb.d.ts +6 -5
- package/umd/slider/thumb.js +23 -23
@@ -16,14 +16,14 @@
|
|
16
16
|
justify-content: flex-start;
|
17
17
|
&.flex-center {
|
18
18
|
justify-content: flex-end;
|
19
|
-
.use-var(margin-right, pagination-center-field-gutter);
|
19
|
+
.use-var-with-rtl(margin-right, pagination-center-field-gutter);
|
20
20
|
}
|
21
21
|
}
|
22
22
|
&-next-field {
|
23
23
|
justify-content: flex-end;
|
24
24
|
&.flex-center {
|
25
25
|
justify-content: flex-start;
|
26
|
-
.use-var(margin-left, pagination-center-field-gutter);
|
26
|
+
.use-var-with-rtl(margin-left, pagination-center-field-gutter);
|
27
27
|
}
|
28
28
|
}
|
29
29
|
|
@@ -41,8 +41,14 @@
|
|
41
41
|
.btn-icon {
|
42
42
|
display: inline-flex;
|
43
43
|
align-items: center;
|
44
|
+
[dir="rtl"] & {
|
45
|
+
transform: scaleX(-1);
|
46
|
+
}
|
44
47
|
&.next {
|
45
48
|
transform: rotateY(180deg);
|
49
|
+
[dir="rtl"] & {
|
50
|
+
transform: none;
|
51
|
+
}
|
46
52
|
}
|
47
53
|
}
|
48
54
|
}
|
@@ -61,13 +67,7 @@
|
|
61
67
|
}
|
62
68
|
.btn-icon + .btn-text,
|
63
69
|
.btn-text + .btn-icon {
|
64
|
-
.use-var(margin-left, pagination-field-btn-icon-text-gutter);
|
65
|
-
}
|
66
|
-
.btn-icon:first-child {
|
67
|
-
.use-var(margin-left, pagination-field-btn-icon-side-margin);
|
68
|
-
}
|
69
|
-
.btn-icon:last-child {
|
70
|
-
.use-var(margin-right, pagination-field-btn-icon-side-margin);
|
70
|
+
.use-var-with-rtl(margin-left, pagination-field-btn-icon-text-gutter);
|
71
71
|
}
|
72
72
|
}
|
73
73
|
&.android &-field.button {
|
@@ -536,10 +536,18 @@
|
|
536
536
|
left: 0;
|
537
537
|
color: #165DFF ;
|
538
538
|
}
|
539
|
+
[dir="rtl"] .arco-picker-header-btn.left {
|
540
|
+
left: initial;
|
541
|
+
right: 0;
|
542
|
+
}
|
539
543
|
.arco-picker-header-btn.right {
|
540
544
|
right: 0;
|
541
545
|
color: #165DFF ;
|
542
546
|
}
|
547
|
+
[dir="rtl"] .arco-picker-header-btn.right {
|
548
|
+
right: initial;
|
549
|
+
left: 0;
|
550
|
+
}
|
543
551
|
/***************************************************
|
544
552
|
* *
|
545
553
|
* Arco Theme Style *
|
@@ -33,12 +33,12 @@
|
|
33
33
|
.use-var(padding, picker-button-padding);
|
34
34
|
|
35
35
|
&.left {
|
36
|
-
left
|
36
|
+
.set-prop-with-rtl(left, 0);
|
37
37
|
.use-var(color, picker-left-btn-color);
|
38
38
|
}
|
39
39
|
|
40
40
|
&.right {
|
41
|
-
right
|
41
|
+
.set-prop-with-rtl(right, 0);
|
42
42
|
.use-var(color, picker-right-btn-color);
|
43
43
|
}
|
44
44
|
}
|
@@ -500,6 +500,10 @@
|
|
500
500
|
left: 0;
|
501
501
|
z-index: 1001;
|
502
502
|
}
|
503
|
+
[dir="rtl"] .arco-progress.progress-fixed {
|
504
|
+
left: initial;
|
505
|
+
right: 0;
|
506
|
+
}
|
503
507
|
.arco-progress .progress-wrapper {
|
504
508
|
position: relative;
|
505
509
|
width: 100%;
|
@@ -540,6 +544,10 @@
|
|
540
544
|
-webkit-transform: translateY(-50%);
|
541
545
|
transform: translateY(-50%);
|
542
546
|
}
|
547
|
+
[dir="rtl"] .arco-progress .progress-wrapper .progress-bar .wrapper {
|
548
|
+
right: initial;
|
549
|
+
left: 0;
|
550
|
+
}
|
543
551
|
.arco-progress .progress-wrapper .filleted {
|
544
552
|
border-radius: 100PX;
|
545
553
|
}
|
@@ -548,10 +556,22 @@
|
|
548
556
|
margin-left: 0.16rem ;
|
549
557
|
color: #165DFF ;
|
550
558
|
}
|
559
|
+
[dir="rtl"] .arco-progress .progress-wrapper .text {
|
560
|
+
margin-left: initial;
|
561
|
+
margin-right: 0.16rem ;
|
562
|
+
}
|
551
563
|
.arco-progress .progress-wrapper .text-left {
|
552
564
|
margin-left: 0;
|
553
565
|
margin-right: 0.16rem ;
|
554
566
|
}
|
567
|
+
[dir="rtl"] .arco-progress .progress-wrapper .text-left {
|
568
|
+
margin-left: initial;
|
569
|
+
margin-right: 0;
|
570
|
+
}
|
571
|
+
[dir="rtl"] .arco-progress .progress-wrapper .text-left {
|
572
|
+
margin-right: initial;
|
573
|
+
margin-left: 0.16rem ;
|
574
|
+
}
|
555
575
|
.arco-progress .progress-wrapper .text-innerLeft {
|
556
576
|
position: absolute;
|
557
577
|
z-index: 1;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
&.progress-fixed {
|
6
6
|
position: fixed;
|
7
7
|
width: 100%;
|
8
|
-
left
|
8
|
+
.set-prop-with-rtl(left, 0);
|
9
9
|
z-index: @full-screen-z-index + 1;;
|
10
10
|
}
|
11
11
|
|
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
.wrapper {
|
41
41
|
position: absolute;
|
42
|
-
right
|
42
|
+
.set-prop-with-rtl(right, 0);
|
43
43
|
top: 50%;
|
44
44
|
transform: translateY(-50%);
|
45
45
|
}
|
@@ -51,13 +51,13 @@
|
|
51
51
|
|
52
52
|
.text {
|
53
53
|
.use-var(font-size, progress-text-font-size);
|
54
|
-
.use-var(margin-left, progress-text-gutter);
|
54
|
+
.use-var-with-rtl(margin-left, progress-text-gutter);
|
55
55
|
.use-var(color, progress-primary-color);
|
56
56
|
}
|
57
57
|
|
58
58
|
.text-left {
|
59
|
-
margin-left
|
60
|
-
.use-var(margin-right, progress-text-gutter);
|
59
|
+
.set-prop-with-rtl(margin-left, 0);
|
60
|
+
.use-var-with-rtl(margin-right, progress-text-gutter);
|
61
61
|
}
|
62
62
|
|
63
63
|
.text-innerLeft {
|
@@ -538,9 +538,15 @@
|
|
538
538
|
.arco-search-bar-input-left {
|
539
539
|
text-align: left;
|
540
540
|
}
|
541
|
+
[dir="rtl"] .arco-search-bar-input-left {
|
542
|
+
text-align: right;
|
543
|
+
}
|
541
544
|
.arco-search-bar-input-right {
|
542
545
|
text-align: right;
|
543
546
|
}
|
547
|
+
[dir="rtl"] .arco-search-bar-input-right {
|
548
|
+
text-align: left;
|
549
|
+
}
|
544
550
|
.arco-search-bar-input-center {
|
545
551
|
text-align: center;
|
546
552
|
}
|
@@ -570,11 +576,19 @@
|
|
570
576
|
.arco-search-bar-prefix {
|
571
577
|
margin-right: 0.18rem ;
|
572
578
|
}
|
579
|
+
[dir="rtl"] .arco-search-bar-prefix {
|
580
|
+
margin-right: initial;
|
581
|
+
margin-left: 0.18rem ;
|
582
|
+
}
|
573
583
|
.arco-search-bar-clear {
|
574
584
|
color: #c9cdd4 ;
|
575
585
|
font-size: 16PX ;
|
576
586
|
padding-left: 0.32rem ;
|
577
587
|
}
|
588
|
+
[dir="rtl"] .arco-search-bar-clear {
|
589
|
+
padding-left: initial;
|
590
|
+
padding-right: 0.32rem ;
|
591
|
+
}
|
578
592
|
.arco-search-bar-search-icon {
|
579
593
|
color: #86909c ;
|
580
594
|
font-size: 0.32rem ;
|
@@ -584,6 +598,10 @@
|
|
584
598
|
color: #165DFF ;
|
585
599
|
font-size: 0.3rem ;
|
586
600
|
}
|
601
|
+
[dir="rtl"] .arco-search-bar-cancel-btn {
|
602
|
+
margin-left: initial;
|
603
|
+
margin-right: 0.32rem ;
|
604
|
+
}
|
587
605
|
.arco-search-bar-association {
|
588
606
|
position: absolute;
|
589
607
|
left: 0;
|
@@ -34,10 +34,10 @@
|
|
34
34
|
.use-var(height, search-bar-input-height);
|
35
35
|
.use-var(caret-color, search-bar-input-caret-color);
|
36
36
|
&-left {
|
37
|
-
text-align
|
37
|
+
.set-value-with-rtl(text-align, left);
|
38
38
|
}
|
39
39
|
&-right {
|
40
|
-
text-align
|
40
|
+
.set-value-with-rtl(text-align, right);
|
41
41
|
}
|
42
42
|
&-center {
|
43
43
|
text-align: center;
|
@@ -62,13 +62,13 @@
|
|
62
62
|
}
|
63
63
|
|
64
64
|
&-prefix {
|
65
|
-
.use-var(margin-right, search-bar-prefix-margin-right);
|
65
|
+
.use-var-with-rtl(margin-right, search-bar-prefix-margin-right);
|
66
66
|
}
|
67
67
|
|
68
68
|
&-clear {
|
69
69
|
.use-var(color, search-bar-clear-icon-color);
|
70
70
|
.use-var(font-size, search-bar-clear-icon-font-size);
|
71
|
-
.use-var(padding-left, search-bar-clear-icon-padding-left);
|
71
|
+
.use-var-with-rtl(padding-left, search-bar-clear-icon-padding-left);
|
72
72
|
}
|
73
73
|
|
74
74
|
&-search-icon {
|
@@ -77,7 +77,7 @@
|
|
77
77
|
}
|
78
78
|
|
79
79
|
&-cancel-btn {
|
80
|
-
.use-var(margin-left, search-bar-cancel-btn-margin-left);
|
80
|
+
.use-var-with-rtl(margin-left, search-bar-cancel-btn-margin-left);
|
81
81
|
.use-var(color, search-bar-cancel-btn-color);
|
82
82
|
.use-var(font-size, search-bar-cancel-btn-font-size);
|
83
83
|
}
|
@@ -97,6 +97,11 @@ export interface ShowMonitorRef {
|
|
97
97
|
* @en Ignore the state of the element before and after, manually check whether the element is in the viewport, trigger the onVisibleChange callback function
|
98
98
|
*/
|
99
99
|
checkVisible: () => boolean;
|
100
|
+
/**
|
101
|
+
* 重置元素初始可见态为false,并重新对元素可见度发起检测,优先级低于disabled(通常用在对ShowMonitor内部元素变化时发起的重新监听)
|
102
|
+
* @en Reset the initial visible state of the element to false, and re-detect the visibility of the element, the priority is lower than 'disabled'(Usually used to re-listen when elements inside ShowMonitor change)
|
103
|
+
*/
|
104
|
+
flushVisibleStatus: () => void;
|
100
105
|
}
|
101
106
|
/**
|
102
107
|
* 通过滚动事件监测 children 是否进入视口或离开视口。
|
@@ -5,7 +5,7 @@ export declare type LinePosition = {
|
|
5
5
|
length: number;
|
6
6
|
start: number;
|
7
7
|
};
|
8
|
-
export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "onAfterChange" | "min" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks">>;
|
8
|
+
export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "onAfterChange" | "min" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks" | "renderThumbPopover">>;
|
9
9
|
export * from './useSliderIcon';
|
10
10
|
export * from './useSliderInit';
|
11
11
|
export * from './useSliderStyle';
|
package/umd/slider/index.d.ts
CHANGED
@@ -130,6 +130,16 @@ export interface SliderProps {
|
|
130
130
|
* @en Custom slider
|
131
131
|
*/
|
132
132
|
renderThumb?: (value: number) => ReactNode;
|
133
|
+
/**
|
134
|
+
* 自定义滑块的Popover,优先级高于formatTooltip。value表示当前滑动进度,visible表示气泡的可见性,index表示当前滑块索引,thumbEl表示当前滑块元素。
|
135
|
+
* @en Custom slider popover,priority is higher than formatTooltip. value - current sliding progress, visible - visibility of the bubble, index - current slider index, thumbEl - current slider element.
|
136
|
+
*/
|
137
|
+
renderThumbPopover?: (config: {
|
138
|
+
value: number;
|
139
|
+
visible: boolean;
|
140
|
+
index: number;
|
141
|
+
thumbEl: React.ReactNode;
|
142
|
+
}) => ReactNode;
|
133
143
|
}
|
134
144
|
export interface SliderRef {
|
135
145
|
/**
|
package/umd/slider/index.js
CHANGED
package/umd/slider/thumb.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
import
|
2
|
-
declare
|
3
|
-
className?: string
|
1
|
+
import { CSSProperties } from 'react';
|
2
|
+
declare function Thumb({ className, value, style, isTouching, idx, }: {
|
3
|
+
className?: string;
|
4
4
|
value: number;
|
5
5
|
isTouching: boolean;
|
6
|
-
style?:
|
7
|
-
|
6
|
+
style?: CSSProperties;
|
7
|
+
idx: number;
|
8
|
+
}): JSX.Element;
|
8
9
|
export default Thumb;
|
package/umd/slider/thumb.js
CHANGED
@@ -1,34 +1,33 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "
|
3
|
+
define(["exports", "react", "./popover", "./hooks", "../context-provider"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("
|
5
|
+
factory(exports, require("react"), require("./popover"), require("./hooks"), require("../context-provider"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.
|
10
|
+
factory(mod.exports, global.react, global.popover, global.hooks, global.contextProvider);
|
11
11
|
global.thumb = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _popover, _hooks, _contextProvider) {
|
14
14
|
"use strict";
|
15
15
|
|
16
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
17
|
-
|
18
16
|
_exports.__esModule = true;
|
19
17
|
_exports.default = void 0;
|
20
|
-
_extends2 = _interopRequireDefault(_extends2);
|
21
18
|
_react = _interopRequireWildcard(_react);
|
22
19
|
|
23
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
24
21
|
|
25
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
26
23
|
|
27
|
-
|
28
|
-
var className = _ref.className,
|
24
|
+
function Thumb(_ref) {
|
25
|
+
var _ref$className = _ref.className,
|
26
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
29
27
|
value = _ref.value,
|
30
28
|
style = _ref.style,
|
31
|
-
isTouching = _ref.isTouching
|
29
|
+
isTouching = _ref.isTouching,
|
30
|
+
idx = _ref.idx;
|
32
31
|
|
33
32
|
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
34
33
|
_useContext$prefixCls = _useContext.prefixCls,
|
@@ -37,7 +36,8 @@
|
|
37
36
|
var _useContext2 = (0, _react.useContext)(_hooks.SliderContext),
|
38
37
|
showTooltip = _useContext2.showTooltip,
|
39
38
|
renderThumb = _useContext2.renderThumb,
|
40
|
-
formatTooltip = _useContext2.formatTooltip
|
39
|
+
formatTooltip = _useContext2.formatTooltip,
|
40
|
+
renderThumbPopover = _useContext2.renderThumbPopover;
|
41
41
|
|
42
42
|
var isHidden = showTooltip === 'never';
|
43
43
|
var renderValue = (0, _react.useMemo)(function () {
|
@@ -48,21 +48,21 @@
|
|
48
48
|
if (showTooltip === 'always') return true;
|
49
49
|
return isTouching;
|
50
50
|
}, [showTooltip, isTouching]);
|
51
|
-
|
52
|
-
var renderWrapper = function renderWrapper(el) {
|
53
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
54
|
-
className: prefixCls + "-slider-thumb-wrapper " + className,
|
55
|
-
style: (0, _extends2.default)({}, style)
|
56
|
-
}, el);
|
57
|
-
};
|
58
|
-
|
59
51
|
var thumbEl = typeof renderThumb === 'function' ? renderThumb(value) : renderThumb;
|
60
|
-
|
61
|
-
|
52
|
+
var popoverEl = typeof renderThumbPopover === 'function' ? renderThumbPopover({
|
53
|
+
value: value,
|
54
|
+
visible: isTooltipVisible,
|
55
|
+
thumbEl: thumbEl,
|
56
|
+
index: idx
|
57
|
+
}) : /*#__PURE__*/_react.default.createElement(_popover.Popover, {
|
62
58
|
visible: isTooltipVisible,
|
63
59
|
content: renderValue
|
64
|
-
}, thumbEl)
|
65
|
-
|
60
|
+
}, thumbEl);
|
61
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
62
|
+
className: prefixCls + "-slider-thumb-wrapper " + className,
|
63
|
+
style: style
|
64
|
+
}, isHidden ? thumbEl : popoverEl);
|
65
|
+
}
|
66
66
|
|
67
67
|
var _default = Thumb;
|
68
68
|
_exports.default = _default;
|