Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rc-component/tour

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rc-component/tour - npm Package Compare versions

Comparing version 1.0.0-5 to 1.0.0-6

0

es/hooks/useTarget.d.ts

@@ -0,0 +0,0 @@ import type { TourStepInfo } from '..';

@@ -0,0 +0,0 @@ import Tour from './Tour';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import type { BuildInPlacements } from 'rc-trigger';

@@ -0,0 +0,0 @@ import type { ReactNode } from 'react';

3

es/Tour.js

@@ -31,3 +31,4 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";

prefixCls = _props$prefixCls === void 0 ? 'rc-tour' : _props$prefixCls,
steps = props.steps,
_props$steps = props.steps,
steps = _props$steps === void 0 ? [] : _props$steps,
defaultCurrent = props.defaultCurrent,

@@ -34,0 +35,0 @@ current = props.current,

/// <reference types="react" />
import type { TourStepProps } from '.';
export default function DefaultPanel(props: TourStepProps): JSX.Element;

@@ -7,3 +7,3 @@ import type { ReactNode, CSSProperties } from 'react';

};
target?: HTMLElement | (() => HTMLElement);
target?: HTMLElement | (() => HTMLElement) | null | (() => null);
title: ReactNode;

@@ -17,3 +17,3 @@ description?: ReactNode;

export interface TourStepProps extends TourStepInfo {
prefixCls: string;
prefixCls?: string;
total?: number;

@@ -20,0 +20,0 @@ current?: number;

@@ -0,0 +0,0 @@ export declare function getMotionName(prefixCls: string, transitionName?: string, animationName?: string): string;

@@ -0,0 +0,0 @@ import type { TourStepInfo } from '..';

@@ -0,0 +0,0 @@ import Tour from './Tour';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import type { BuildInPlacements } from 'rc-trigger';

@@ -0,0 +0,0 @@ import type { ReactNode } from 'react';

@@ -57,3 +57,4 @@ "use strict";

prefixCls = _props$prefixCls === void 0 ? 'rc-tour' : _props$prefixCls,
steps = props.steps,
_props$steps = props.steps,
steps = _props$steps === void 0 ? [] : _props$steps,
defaultCurrent = props.defaultCurrent,

@@ -60,0 +61,0 @@ current = props.current,

/// <reference types="react" />
import type { TourStepProps } from '.';
export default function DefaultPanel(props: TourStepProps): JSX.Element;

@@ -7,3 +7,3 @@ import type { ReactNode, CSSProperties } from 'react';

};
target?: HTMLElement | (() => HTMLElement);
target?: HTMLElement | (() => HTMLElement) | null | (() => null);
title: ReactNode;

@@ -17,3 +17,3 @@ description?: ReactNode;

export interface TourStepProps extends TourStepInfo {
prefixCls: string;
prefixCls?: string;
total?: number;

@@ -20,0 +20,0 @@ current?: number;

@@ -0,0 +0,0 @@ export declare function getMotionName(prefixCls: string, transitionName?: string, animationName?: string): string;

{
"name": "@rc-component/tour",
"version": "1.0.0-5",
"version": "1.0.0-6",
"description": "React tour Component",

@@ -5,0 +5,0 @@ "keywords": [

@@ -105,3 +105,2 @@ # @rc-component/tour

We use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition [here](https://github.com/react-component/tour/blob/master/src/interface.ts).
### Tour

@@ -111,5 +110,6 @@

| --- | --- | --- | --- |
| steps | `TourStepProps[]` | - | 引导步骤 |
| open | `boolean` | - | 受控打开引导(与 `current` 受控分开) |
| current | `number` | - | 受控当前处于哪一步 |
| steps | `TourStepProps[]` | - | 引导步骤 |
| open | `boolean` | `true` | 受控打开引导(与 `current` 受控分开) |
| current | `number` | 0 | 受控当前处于哪一步 |
| defaultCurrent | `number` | 0 | 默认处于哪一步 |
| onChange | `(current: number) => void` | - | 步骤改变时的回调,`current`为改变前的步骤,`next`为改变后的步骤 |

@@ -119,4 +119,3 @@ | onClose | `(current: number) => void` | - | 关闭引导时的回调 |

| mask | `boolean` | `true` | 整体是否启用蒙层 |
| arrow | `boolean`&#124; `{ pointAtCenter: boolean}` | `true` | 整体是否显示箭头,包含是否指向元素中心的配置 |
| type | `default`&#124; `primary` | `default` | 整体类型,影响底色与文字颜色 |
| arrow | `boolean` \| `{ pointAtCenter: boolean}` | `true` | 整体是否显示箭头,包含是否指向元素中心的配置 |

@@ -127,14 +126,9 @@ ### TourStep

| --- | --- | --- | --- |
| target | `() => HTMLElement`&#124; `HTMLElement` | - | 获取引导卡片指向的元素 |
| arrow | `boolean`&#124; `{ pointAtCenter: boolean}` | `true` | 是否显示箭头,包含是否指向元素中心的配置 |
| cover | `ReactNode` | - | 展示的图片或者视频 |
| title | `ReactNode` | - | 标题 |
| description | `ReactNode` | - | 主要描述部分 |
| placement | `left`&#124; `leftTop` &#124; `leftBottom` &#124; `right`&#124; `rightTop`&#124; `rightBottom`&#124; `top`&#124; `topLeft`&#124; `topRight`&#124; `bottom` &#124; `bottomLeft`&#124; `bottomRight` | `bottom` | 引导卡片相对于目标元素的位置 |
| onClose | `Function` | - | 关闭引导时的回调函数 |
| target | `() => HTMLElement` \| `HTMLElement` | - | 获取引导卡片指向的元素 |
| arrow | `boolean` \| `{ pointAtCenter: boolean}` | `true` | 是否显示箭头,包含是否指向元素中心的配置 |
| placement | `left` \| `leftTop` \| `leftBottom` \| `right` \| `rightTop` \| `rightBottom` \| `top` \| `topLeft` \| `topRight` \| `bottom` \| `bottomLeft` \| `bottomRight` | `bottom` | 引导卡片相对于目标元素的位置 |
| onClose | `() => void` | - | 关闭引导时的回调函数 |
| mask | `boolean` | `true` | 是否启用蒙层,默认跟随 Tour 的 `mask` 属性 |
| type | `default`&#124; `primary` | `default` | 类型,影响底色与文字颜色 |
| nextButtonProps | `{ children: ReactNode; onClick: Function }` | `{ children: '下一步' }` | 下一步按钮的属性 |
| prevButtonProps | `{ children: ReactNode; onClick: Function }` | `{ children: '上一步' }` | 上一步按钮的属性 |
| renderPanel | `(props: TourStepProps, current: number) => ReactNode;` | | 渲染 popoup 弹窗方法 |
| className | `string` | - | - |
| style | `React.CSSProperties` | - | - |

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc