@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.
@@ -1,4 +1,4 @@
1
1
  import Tour from './src/Tour';
2
2
  export type { TourProps } from './src/Tour';
3
- export type { TourStepInfo, TourStepProps } from './src/TourStep';
3
+ export type { TourStepProps } from './src/TourStep';
4
4
  export default Tour;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type PauseProps = {
3
+ prefixCls?: string;
4
+ zIndex: number;
5
+ open?: boolean;
6
+ onPause?: () => void;
7
+ onPlay?: () => void;
8
+ };
9
+ declare const Pause: React.FC<PauseProps>;
10
+ export default Pause;
@@ -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
- declare const Tour: React.FC<TourProps>;
32
- export default Tour;
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;
@@ -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-25 21:19:51
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: rgb(255, 255, 255);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiaozhiye/qm-design-react",
3
- "version": "1.7.25",
3
+ "version": "1.7.26",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",