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

@rc-component/tour

Package Overview
Dependencies
Maintainers
5
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.8.1 to 1.9.0

1

es/Tour.d.ts

@@ -15,2 +15,3 @@ import type { ReactNode } from 'react';

onFinish?: () => void;
closeIcon?: TourStepProps["closeIcon"];
mask?: boolean | {

@@ -17,0 +18,0 @@ style?: React.CSSProperties;

10

es/Tour.js

@@ -6,3 +6,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex"];
var _excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex", "closeIcon"];
import * as React from 'react';

@@ -49,2 +49,3 @@ import Portal from '@rc-component/portal';

zIndex = _props$zIndex === void 0 ? 1001 : _props$zIndex,
closeIcon = props.closeIcon,
restProps = _objectWithoutProperties(props, _excluded);

@@ -82,4 +83,6 @@ var triggerRef = React.useRef();

stepMask = _ref.mask,
stepScrollIntoViewOptions = _ref.scrollIntoViewOptions;
stepScrollIntoViewOptions = _ref.scrollIntoViewOptions,
stepCloseIcon = _ref.closeIcon;
var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask);
var mergedCloseIcon = stepCloseIcon !== null && stepCloseIcon !== void 0 ? stepCloseIcon : closeIcon;
var mergedScrollIntoViewOptions = stepScrollIntoViewOptions !== null && stepScrollIntoViewOptions !== void 0 ? stepScrollIntoViewOptions : scrollIntoViewOptions;

@@ -133,3 +136,4 @@ var _useTarget = useTarget(target, open, gap, mergedScrollIntoViewOptions),

_onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
}
},
closeIcon: mergedCloseIcon
}, steps[mergedCurrent]));

@@ -136,0 +140,0 @@ };

@@ -14,3 +14,8 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";

onFinish = props.onFinish,
className = props.className;
className = props.className,
closeIcon = props.closeIcon;
var mergedClosable = closeIcon !== false && closeIcon !== null;
var mergedCloseIcon = closeIcon !== undefined && closeIcon !== true ? closeIcon : /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-close-x")
}, "\xD7");
return /*#__PURE__*/React.createElement("div", {

@@ -20,3 +25,3 @@ className: classNames("".concat(prefixCls, "-content"), className)

className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/React.createElement("button", {
}, mergedClosable && /*#__PURE__*/React.createElement("button", {
type: "button",

@@ -26,5 +31,3 @@ onClick: onClose,

className: "".concat(prefixCls, "-close")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-close-x")
}, "\xD7")), /*#__PURE__*/React.createElement("div", {
}, mergedCloseIcon), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-header")

@@ -31,0 +34,0 @@ }, /*#__PURE__*/React.createElement("div", {

@@ -19,2 +19,3 @@ import * as React from 'react';

scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
closeIcon?: ReactNode;
}

@@ -21,0 +22,0 @@ export interface TourStepProps extends TourStepInfo {

@@ -15,2 +15,3 @@ import type { ReactNode } from 'react';

onFinish?: () => void;
closeIcon?: TourStepProps["closeIcon"];
mask?: boolean | {

@@ -17,0 +18,0 @@ style?: React.CSSProperties;

@@ -25,3 +25,3 @@ "use strict";

var _util = require("./util");
var _excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex"];
var _excluded = ["prefixCls", "steps", "defaultCurrent", "current", "onChange", "onClose", "onFinish", "open", "mask", "arrow", "rootClassName", "placement", "renderPanel", "gap", "animated", "scrollIntoViewOptions", "zIndex", "closeIcon"];
var CENTER_PLACEHOLDER = {

@@ -57,2 +57,3 @@ left: '50%',

zIndex = _props$zIndex === void 0 ? 1001 : _props$zIndex,
closeIcon = props.closeIcon,
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);

@@ -90,4 +91,6 @@ var triggerRef = React.useRef();

stepMask = _ref.mask,
stepScrollIntoViewOptions = _ref.scrollIntoViewOptions;
stepScrollIntoViewOptions = _ref.scrollIntoViewOptions,
stepCloseIcon = _ref.closeIcon;
var mergedMask = mergedOpen && (stepMask !== null && stepMask !== void 0 ? stepMask : mask);
var mergedCloseIcon = stepCloseIcon !== null && stepCloseIcon !== void 0 ? stepCloseIcon : closeIcon;
var mergedScrollIntoViewOptions = stepScrollIntoViewOptions !== null && stepScrollIntoViewOptions !== void 0 ? stepScrollIntoViewOptions : scrollIntoViewOptions;

@@ -141,3 +144,4 @@ var _useTarget = (0, _useTarget3.default)(target, open, gap, mergedScrollIntoViewOptions),

_onFinish === null || _onFinish === void 0 ? void 0 : _onFinish();
}
},
closeIcon: mergedCloseIcon
}, steps[mergedCurrent]));

@@ -144,0 +148,0 @@ };

@@ -22,3 +22,8 @@ "use strict";

onFinish = props.onFinish,
className = props.className;
className = props.className,
closeIcon = props.closeIcon;
var mergedClosable = closeIcon !== false && closeIcon !== null;
var mergedCloseIcon = closeIcon !== undefined && closeIcon !== true ? closeIcon : /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-close-x")
}, "\xD7");
return /*#__PURE__*/React.createElement("div", {

@@ -28,3 +33,3 @@ className: (0, _classnames.default)("".concat(prefixCls, "-content"), className)

className: "".concat(prefixCls, "-inner")
}, /*#__PURE__*/React.createElement("button", {
}, mergedClosable && /*#__PURE__*/React.createElement("button", {
type: "button",

@@ -34,5 +39,3 @@ onClick: onClose,

className: "".concat(prefixCls, "-close")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-close-x")
}, "\xD7")), /*#__PURE__*/React.createElement("div", {
}, mergedCloseIcon), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-header")

@@ -39,0 +42,0 @@ }, /*#__PURE__*/React.createElement("div", {

@@ -19,2 +19,3 @@ import * as React from 'react';

scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
closeIcon?: ReactNode;
}

@@ -21,0 +22,0 @@ export interface TourStepProps extends TourStepInfo {

{
"name": "@rc-component/tour",
"version": "1.8.1",
"version": "1.9.0",
"description": "React tour Component",

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

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

| --- | --- | --- | --- |
| closeIcon | `React.ReactNode` | - | 自定义关闭按钮 |
| steps | `TourStepProps[]` | - | 引导步骤 |

@@ -129,2 +130,3 @@ | open | `boolean` | `true` | 受控打开引导(与 `current` 受控分开) |

| --- | --- | --- | --- |
| closeIcon | `React.ReactNode` | - | 自定义关闭按钮 |
| target | `() => HTMLElement` \| `HTMLElement` | - | 获取引导卡片指向的元素 |

@@ -131,0 +133,0 @@ | arrow | `boolean` \| `{ pointAtCenter: boolean}` | `true` | 是否显示箭头,包含是否指向元素中心的配置 |

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