@jiaozhiye/qm-design-react 1.7.25 → 1.7.26
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/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/style/index.css +21 -2
- package/lib/style/index.min.css +1 -1
- package/lib/tour/index.d.ts +1 -1
- package/lib/tour/src/Pause.d.ts +10 -0
- package/lib/tour/src/Tour.d.ts +9 -2
- package/lib/tour/src/TourStep/index.d.ts +2 -0
- package/lib/tour/src/util.d.ts +2 -0
- package/lib/tour/style/index.less +21 -2
- package/package.json +1 -1
package/lib/tour/index.d.ts
CHANGED
package/lib/tour/src/Tour.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { TriggerProps } from '@rc-component/trigger';
|
|
|
6
6
|
export interface TourProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {
|
|
7
7
|
steps?: TourStepInfo[];
|
|
8
8
|
open?: boolean;
|
|
9
|
+
type?: 'default' | 'primary';
|
|
9
10
|
defaultCurrent?: number;
|
|
10
11
|
current?: number;
|
|
11
12
|
onChange?: (current: number) => void;
|
|
@@ -18,6 +19,7 @@ export interface TourProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinP
|
|
|
18
19
|
arrow?: boolean | {
|
|
19
20
|
pointAtCenter: boolean;
|
|
20
21
|
};
|
|
22
|
+
control?: boolean;
|
|
21
23
|
rootClassName?: string;
|
|
22
24
|
placement?: PlacementType;
|
|
23
25
|
renderPanel?: (props: TourStepProps, current: number) => React.ReactNode;
|
|
@@ -28,5 +30,10 @@ export interface TourProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinP
|
|
|
28
30
|
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
|
|
29
31
|
zIndex?: number;
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
type TourRef = {
|
|
34
|
+
OPEN: () => void;
|
|
35
|
+
CLOSE: () => void;
|
|
36
|
+
SET_ZINDEX: (value: number) => void;
|
|
37
|
+
};
|
|
38
|
+
declare const QmTour: React.ForwardRefExoticComponent<TourProps & React.RefAttributes<TourRef>>;
|
|
39
|
+
export default QmTour;
|
|
@@ -17,6 +17,8 @@ export interface TourStepInfo {
|
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
18
|
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
|
|
19
19
|
indicatorsRender?: (current: number, total: number) => React.ReactNode;
|
|
20
|
+
zIndex?: number;
|
|
21
|
+
action?: (node: HTMLElement, current: number) => void;
|
|
20
22
|
}
|
|
21
23
|
export interface TourStepProps extends TourStepInfo {
|
|
22
24
|
prefixCls?: string;
|
package/lib/tour/src/util.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { PlacementType } from './placements';
|
|
2
3
|
export declare const isInViewPort: (element: HTMLElement) => boolean;
|
|
3
4
|
export declare const getPlacement: (targetElement?: HTMLElement | null, placement?: PlacementType, stepPlacement?: PlacementType) => string;
|
|
5
|
+
export declare const isValidNode: (node: React.ReactNode) => boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: 焦质晔
|
|
3
3
|
* @Date: 2022-01-11 18:01:20
|
|
4
4
|
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2023-07-
|
|
5
|
+
* @Last Modified time: 2023-07-26 17:22:16
|
|
6
6
|
*/
|
|
7
7
|
@import '../../style/common';
|
|
8
8
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
& &-inner {
|
|
56
56
|
box-shadow: rgba(0, 0, 0, 0.03) 0px 1px 2px 0px, rgba(0, 0, 0, 0.02) 0px 1px 6px -1px, rgba(0, 0, 0, 0.02) 0px 2px 4px 0px;
|
|
57
|
-
background-color:
|
|
57
|
+
background-color: #fff;
|
|
58
58
|
background-clip: padding-box;
|
|
59
59
|
text-decoration: none;
|
|
60
60
|
border-radius: 8px;
|
|
@@ -115,6 +115,25 @@
|
|
|
115
115
|
& &-buttons {
|
|
116
116
|
margin-inline-start: auto;
|
|
117
117
|
}
|
|
118
|
+
&-control {
|
|
119
|
+
position: fixed;
|
|
120
|
+
right: 20px;
|
|
121
|
+
bottom: 20px;
|
|
122
|
+
width: 40px;
|
|
123
|
+
height: 40px;
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
border: 2px solid #fff;
|
|
126
|
+
background: linear-gradient(to right bottom, @--primary-4, @--primary-7);
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
pointer-events: auto;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
.anticon {
|
|
133
|
+
color: #fff;
|
|
134
|
+
font-size: 20px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
118
137
|
// =======================================
|
|
119
138
|
&-mask &-placeholder-animated {
|
|
120
139
|
transition: all 0.2s ease;
|