@rc-component/tree
Advanced tools
+2
-2
@@ -1,2 +0,2 @@ | ||
| import classNames from 'classnames'; | ||
| import { clsx } from 'clsx'; | ||
| import * as React from 'react'; | ||
@@ -14,3 +14,3 @@ const Indent = ({ | ||
| key: i, | ||
| className: classNames(baseClassName, { | ||
| className: clsx(baseClassName, { | ||
| [`${baseClassName}-start`]: isStart[i], | ||
@@ -17,0 +17,0 @@ [`${baseClassName}-end`]: isEnd[i] |
| function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| import classNames from 'classnames'; | ||
| import { clsx } from 'clsx'; | ||
| import CSSMotion from '@rc-component/motion'; | ||
@@ -74,3 +74,3 @@ import useLayoutEffect from "@rc-component/util/es/hooks/useLayoutEffect"; | ||
| ref: motionRef, | ||
| className: classNames(`${prefixCls}-treenode-motion`, motionClassName), | ||
| className: clsx(`${prefixCls}-treenode-motion`, motionClassName), | ||
| style: motionStyle | ||
@@ -77,0 +77,0 @@ }, motionNodes.map(treeNode => { |
+2
-2
@@ -5,3 +5,3 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| import classNames from 'classnames'; | ||
| import { clsx } from 'clsx'; | ||
| import KeyCode from "@rc-component/util/es/KeyCode"; | ||
@@ -1208,3 +1208,3 @@ import pickAttrs from "@rc-component/util/es/pickAttrs"; | ||
| }, /*#__PURE__*/React.createElement("div", { | ||
| className: classNames(prefixCls, className, rootClassName, { | ||
| className: clsx(prefixCls, className, rootClassName, { | ||
| [`${prefixCls}-show-line`]: showLine, | ||
@@ -1211,0 +1211,0 @@ [`${prefixCls}-focused`]: focused, |
+9
-9
| function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
| import React from 'react'; | ||
| import classNames from 'classnames'; | ||
| import { clsx } from 'clsx'; | ||
| import pickAttrs from "@rc-component/util/es/pickAttrs"; | ||
@@ -212,3 +212,3 @@ import { TreeContext, UnstableContext } from "./contextTypes"; | ||
| return switcherIconDom !== false ? /*#__PURE__*/React.createElement("span", { | ||
| className: classNames(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher-noop`) | ||
| className: clsx(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher-noop`) | ||
| }, switcherIconDom) : null; | ||
@@ -219,3 +219,3 @@ } | ||
| onClick: onExpand, | ||
| className: classNames(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`) | ||
| className: clsx(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`) | ||
| }, switcherIconDom) : null; | ||
@@ -233,3 +233,3 @@ }; | ||
| return /*#__PURE__*/React.createElement("span", { | ||
| className: classNames(`${context.prefixCls}-checkbox`, { | ||
| className: clsx(`${context.prefixCls}-checkbox`, { | ||
| [`${context.prefixCls}-checkbox-checked`]: checked, | ||
@@ -258,3 +258,3 @@ [`${context.prefixCls}-checkbox-indeterminate`]: !checked && halfChecked, | ||
| return /*#__PURE__*/React.createElement("span", { | ||
| className: classNames(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__${nodeState || 'docu'}`, { | ||
| className: clsx(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__${nodeState || 'docu'}`, { | ||
| [`${context.prefixCls}-icon_loading`]: loading | ||
@@ -295,3 +295,3 @@ }), | ||
| $icon = currentIcon ? /*#__PURE__*/React.createElement("span", { | ||
| className: classNames(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__customize`), | ||
| className: clsx(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__customize`), | ||
| style: styles?.itemIcon | ||
@@ -315,3 +315,3 @@ }, typeof currentIcon === 'function' ? currentIcon(props) : currentIcon) : iconNode; | ||
| title: typeof title === 'string' ? title : '', | ||
| className: classNames(wrapClass, `${wrapClass}-${nodeState || 'normal'}`, { | ||
| className: clsx(wrapClass, `${wrapClass}-${nodeState || 'normal'}`, { | ||
| [`${context.prefixCls}-node-selected`]: !isDisabled && (selected || dragNodeHighlight) | ||
@@ -325,3 +325,3 @@ }), | ||
| }, $icon, /*#__PURE__*/React.createElement("span", { | ||
| className: classNames(`${context.prefixCls}-title`, treeClassNames?.itemTitle), | ||
| className: clsx(`${context.prefixCls}-title`, treeClassNames?.itemTitle), | ||
| style: styles?.itemTitle | ||
@@ -347,3 +347,3 @@ }, titleNode), dropIndicatorNode); | ||
| "aria-expanded": isLeaf ? undefined : expanded, | ||
| className: classNames(className, `${context.prefixCls}-treenode`, treeClassNames?.item, { | ||
| className: clsx(className, `${context.prefixCls}-treenode`, treeClassNames?.item, { | ||
| [`${context.prefixCls}-treenode-disabled`]: isDisabled, | ||
@@ -350,0 +350,0 @@ [`${context.prefixCls}-treenode-switcher-${expanded ? 'open' : 'close'}`]: !isLeaf, |
+2
-3
@@ -7,7 +7,6 @@ "use strict"; | ||
| exports.default = void 0; | ||
| var _classnames = _interopRequireDefault(require("classnames")); | ||
| var _clsx = require("clsx"); | ||
| var React = _interopRequireWildcard(require("react")); | ||
| function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } | ||
| function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
| const Indent = ({ | ||
@@ -24,3 +23,3 @@ prefixCls, | ||
| key: i, | ||
| className: (0, _classnames.default)(baseClassName, { | ||
| className: (0, _clsx.clsx)(baseClassName, { | ||
| [`${baseClassName}-start`]: isStart[i], | ||
@@ -27,0 +26,0 @@ [`${baseClassName}-end`]: isEnd[i] |
@@ -7,3 +7,3 @@ "use strict"; | ||
| exports.default = void 0; | ||
| var _classnames = _interopRequireDefault(require("classnames")); | ||
| var _clsx = require("clsx"); | ||
| var _motion = _interopRequireDefault(require("@rc-component/motion")); | ||
@@ -84,3 +84,3 @@ var _useLayoutEffect = _interopRequireDefault(require("@rc-component/util/lib/hooks/useLayoutEffect")); | ||
| ref: motionRef, | ||
| className: (0, _classnames.default)(`${prefixCls}-treenode-motion`, motionClassName), | ||
| className: (0, _clsx.clsx)(`${prefixCls}-treenode-motion`, motionClassName), | ||
| style: motionStyle | ||
@@ -87,0 +87,0 @@ }, motionNodes.map(treeNode => { |
+2
-2
@@ -7,3 +7,3 @@ "use strict"; | ||
| exports.default = void 0; | ||
| var _classnames = _interopRequireDefault(require("classnames")); | ||
| var _clsx = require("clsx"); | ||
| var _KeyCode = _interopRequireDefault(require("@rc-component/util/lib/KeyCode")); | ||
@@ -1215,3 +1215,3 @@ var _pickAttrs = _interopRequireDefault(require("@rc-component/util/lib/pickAttrs")); | ||
| }, /*#__PURE__*/React.createElement("div", { | ||
| className: (0, _classnames.default)(prefixCls, className, rootClassName, { | ||
| className: (0, _clsx.clsx)(prefixCls, className, rootClassName, { | ||
| [`${prefixCls}-show-line`]: showLine, | ||
@@ -1218,0 +1218,0 @@ [`${prefixCls}-focused`]: focused, |
+9
-9
@@ -8,3 +8,3 @@ "use strict"; | ||
| var _react = _interopRequireDefault(require("react")); | ||
| var _classnames = _interopRequireDefault(require("classnames")); | ||
| var _clsx = require("clsx"); | ||
| var _pickAttrs = _interopRequireDefault(require("@rc-component/util/lib/pickAttrs")); | ||
@@ -220,3 +220,3 @@ var _contextTypes = require("./contextTypes"); | ||
| return switcherIconDom !== false ? /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher-noop`) | ||
| className: (0, _clsx.clsx)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher-noop`) | ||
| }, switcherIconDom) : null; | ||
@@ -227,3 +227,3 @@ } | ||
| onClick: onExpand, | ||
| className: (0, _classnames.default)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`) | ||
| className: (0, _clsx.clsx)(`${context.prefixCls}-switcher`, `${context.prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`) | ||
| }, switcherIconDom) : null; | ||
@@ -241,3 +241,3 @@ }; | ||
| return /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)(`${context.prefixCls}-checkbox`, { | ||
| className: (0, _clsx.clsx)(`${context.prefixCls}-checkbox`, { | ||
| [`${context.prefixCls}-checkbox-checked`]: checked, | ||
@@ -266,3 +266,3 @@ [`${context.prefixCls}-checkbox-indeterminate`]: !checked && halfChecked, | ||
| return /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__${nodeState || 'docu'}`, { | ||
| className: (0, _clsx.clsx)(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__${nodeState || 'docu'}`, { | ||
| [`${context.prefixCls}-icon_loading`]: loading | ||
@@ -303,3 +303,3 @@ }), | ||
| $icon = currentIcon ? /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__customize`), | ||
| className: (0, _clsx.clsx)(treeClassNames?.itemIcon, `${context.prefixCls}-iconEle`, `${context.prefixCls}-icon__customize`), | ||
| style: styles?.itemIcon | ||
@@ -323,3 +323,3 @@ }, typeof currentIcon === 'function' ? currentIcon(props) : currentIcon) : iconNode; | ||
| title: typeof title === 'string' ? title : '', | ||
| className: (0, _classnames.default)(wrapClass, `${wrapClass}-${nodeState || 'normal'}`, { | ||
| className: (0, _clsx.clsx)(wrapClass, `${wrapClass}-${nodeState || 'normal'}`, { | ||
| [`${context.prefixCls}-node-selected`]: !isDisabled && (selected || dragNodeHighlight) | ||
@@ -333,3 +333,3 @@ }), | ||
| }, $icon, /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)(`${context.prefixCls}-title`, treeClassNames?.itemTitle), | ||
| className: (0, _clsx.clsx)(`${context.prefixCls}-title`, treeClassNames?.itemTitle), | ||
| style: styles?.itemTitle | ||
@@ -355,3 +355,3 @@ }, titleNode), dropIndicatorNode); | ||
| "aria-expanded": isLeaf ? undefined : expanded, | ||
| className: (0, _classnames.default)(className, `${context.prefixCls}-treenode`, treeClassNames?.item, { | ||
| className: (0, _clsx.clsx)(className, `${context.prefixCls}-treenode`, treeClassNames?.item, { | ||
| [`${context.prefixCls}-treenode-disabled`]: isDisabled, | ||
@@ -358,0 +358,0 @@ [`${context.prefixCls}-treenode-switcher-${expanded ? 'open' : 'close'}`]: !isLeaf, |
+16
-18
| { | ||
| "name": "@rc-component/tree", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "tree ui component for react", | ||
@@ -48,12 +48,18 @@ "engines": { | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "*", | ||
| "react-dom": "*" | ||
| "dependencies": { | ||
| "@rc-component/motion": "^1.0.0", | ||
| "@rc-component/util": "^1.2.1", | ||
| "clsx": "^2.1.1", | ||
| "rc-virtual-list": "^3.5.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@rc-component/dialog": "^1.0.0", | ||
| "@rc-component/father-plugin": "^2.0.3", | ||
| "@rc-component/np": "^1.0.0", | ||
| "@rc-component/tooltip": "^1.0.0", | ||
| "@rc-component/trigger": "^3.0.0", | ||
| "@testing-library/jest-dom": "^6.1.5", | ||
| "@testing-library/react": "^16.1.0", | ||
| "@types/jest": "^29.5.10", | ||
| "@types/node": "^22.7.3", | ||
| "@types/jest": "^30.0.0", | ||
| "@types/node": "^24.0.10", | ||
| "@types/react": "^19.0.1", | ||
@@ -65,4 +71,2 @@ "@types/react-dom": "^19.0.1", | ||
| "eslint": "^8.55.0", | ||
| "eslint-plugin-jest": "^28.8.3", | ||
| "eslint-plugin-unicorn": "^56.0.1", | ||
| "father": "^4.4.0", | ||
@@ -73,9 +77,5 @@ "gh-pages": "^6.1.1", | ||
| "less": "^4.2.1", | ||
| "lint-staged": "^15.2.10", | ||
| "@rc-component/np": "^1.0.0", | ||
| "lint-staged": "^16.1.2", | ||
| "prettier": "^3.3.3", | ||
| "@rc-component/dialog": "^1.0.0", | ||
| "rc-test": "^7.0.15", | ||
| "@rc-component/tooltip": "^1.0.0", | ||
| "@rc-component/trigger": "^3.0.0", | ||
| "react": "^18.2.0", | ||
@@ -85,8 +85,6 @@ "react-dom": "^18.2.0", | ||
| }, | ||
| "dependencies": { | ||
| "classnames": "2.x", | ||
| "@rc-component/motion": "^1.0.0", | ||
| "@rc-component/util": "^1.2.1", | ||
| "rc-virtual-list": "^3.5.1" | ||
| "peerDependencies": { | ||
| "react": "*", | ||
| "react-dom": "*" | ||
| } | ||
| } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
26
-7.14%312608
-0.17%7563
-0.01%1
Infinity%+ Added
- Removed