@clayui/core
Advanced tools
@@ -137,5 +137,6 @@ "use strict"; | ||
| }), /*#__PURE__*/_react.default.createElement("div", _extends({}, itemStackProps, nodeProps, focusWithinProps, { | ||
| "aria-controls": isExpand ? item.key : undefined, | ||
| "aria-expanded": group ? expandedKeys.has(item.key) : undefined, | ||
| "aria-labelledby": labelId, | ||
| "aria-owns": ariaOwns, | ||
| "aria-owns": isExpand ? ariaOwns : undefined, | ||
| className: (0, _classnames.default)('treeview-link', itemStackProps.className, nodeProps.className, { | ||
@@ -185,5 +186,7 @@ active: selectionMode === 'single' && selection.selectedKeys.has(item.key) || itemStackProps.active || nodeProps.active, | ||
| } | ||
| selection.toggleSelection(item.key); | ||
| if (onSelect) { | ||
| onSelect((0, _Collection.removeItemInternalProps)(item)); | ||
| if (selectionMode === 'single') { | ||
| selection.toggleSelection(item.key); | ||
| if (onSelect) { | ||
| onSelect((0, _Collection.removeItemInternalProps)(item)); | ||
| } | ||
| } | ||
@@ -359,3 +362,2 @@ if (group && itemStackProps.expandOnClick !== false) { | ||
| loading: loading, | ||
| onLoadMore: !group ? loadMore : undefined, | ||
| tabIndex: focusWithinProps.tabIndex | ||
@@ -397,7 +399,5 @@ }, children))), /*#__PURE__*/_react.default.createElement(ItemIndicator, { | ||
| expandable = false, | ||
| expanderDisabled, | ||
| isNonDraggrable, | ||
| labelId, | ||
| loading = false, | ||
| onLoadMore, | ||
| tabIndex, | ||
@@ -413,31 +413,13 @@ ...otherProps | ||
| open, | ||
| selection, | ||
| toggle | ||
| selection | ||
| } = (0, _context.useTreeViewContext)(); | ||
| const item = (0, _useItem.useItem)(); | ||
| const childrenCount = _react.default.Children.count(children); | ||
| return /*#__PURE__*/_react.default.createElement(_layout.default.ContentRow, otherProps, expandable && !loading && /*#__PURE__*/_react.default.createElement(_layout.default.ContentCol, null, /*#__PURE__*/_react.default.createElement(_button.default, { | ||
| "aria-controls": `${item.key}`, | ||
| "aria-expanded": expandedKeys.has(item.key), | ||
| return /*#__PURE__*/_react.default.createElement(_layout.default.ContentRow, otherProps, expandable && !loading && /*#__PURE__*/_react.default.createElement(_layout.default.ContentCol, null, /*#__PURE__*/_react.default.createElement("span", { | ||
| className: (0, _classnames.default)('component-expander', expanderClassName, { | ||
| collapsed: expandedKeys.has(item.key) | ||
| }), | ||
| disabled: typeof expanderDisabled === 'undefined' ? disabled : expanderDisabled, | ||
| displayType: null, | ||
| monospaced: true, | ||
| onClick: event => { | ||
| event.stopPropagation(); | ||
| if (onLoadMore) { | ||
| onLoadMore(); | ||
| } else { | ||
| toggle(item.key); | ||
| } | ||
| }, | ||
| tabIndex: -1 | ||
| }, /*#__PURE__*/_react.default.createElement("span", { | ||
| className: "c-inner", | ||
| tabIndex: -2 | ||
| }) | ||
| }, /*#__PURE__*/_react.default.createElement(Expander, { | ||
| expanderIcons: expanderIcons | ||
| })))), loading && /*#__PURE__*/_react.default.createElement(_layout.default.ContentCol, { | ||
| }))), loading && /*#__PURE__*/_react.default.createElement(_layout.default.ContentCol, { | ||
| className: "btn-monospaced" | ||
@@ -506,4 +488,3 @@ }, /*#__PURE__*/_react.default.createElement(_loadingIndicator.default, { | ||
| content = /*#__PURE__*/_react.default.cloneElement(child, { | ||
| ...child?.props, | ||
| id: child?.props?.id || labelId | ||
| ...child?.props | ||
| }); | ||
@@ -510,0 +491,0 @@ } |
@@ -129,5 +129,6 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } | ||
| }), /*#__PURE__*/React.createElement("div", _extends({}, itemStackProps, nodeProps, focusWithinProps, { | ||
| "aria-controls": isExpand ? item.key : undefined, | ||
| "aria-expanded": group ? expandedKeys.has(item.key) : undefined, | ||
| "aria-labelledby": labelId, | ||
| "aria-owns": ariaOwns, | ||
| "aria-owns": isExpand ? ariaOwns : undefined, | ||
| className: classNames('treeview-link', itemStackProps.className, nodeProps.className, { | ||
@@ -177,5 +178,7 @@ active: selectionMode === 'single' && selection.selectedKeys.has(item.key) || itemStackProps.active || nodeProps.active, | ||
| } | ||
| selection.toggleSelection(item.key); | ||
| if (onSelect) { | ||
| onSelect(removeItemInternalProps(item)); | ||
| if (selectionMode === 'single') { | ||
| selection.toggleSelection(item.key); | ||
| if (onSelect) { | ||
| onSelect(removeItemInternalProps(item)); | ||
| } | ||
| } | ||
@@ -351,3 +354,2 @@ if (group && itemStackProps.expandOnClick !== false) { | ||
| loading: loading, | ||
| onLoadMore: !group ? loadMore : undefined, | ||
| tabIndex: focusWithinProps.tabIndex | ||
@@ -389,7 +391,5 @@ }, children))), /*#__PURE__*/React.createElement(ItemIndicator, { | ||
| expandable = false, | ||
| expanderDisabled, | ||
| isNonDraggrable, | ||
| labelId, | ||
| loading = false, | ||
| onLoadMore, | ||
| tabIndex, | ||
@@ -405,31 +405,13 @@ ...otherProps | ||
| open, | ||
| selection, | ||
| toggle | ||
| selection | ||
| } = useTreeViewContext(); | ||
| const item = useItem(); | ||
| const childrenCount = React.Children.count(children); | ||
| return /*#__PURE__*/React.createElement(Layout.ContentRow, otherProps, expandable && !loading && /*#__PURE__*/React.createElement(Layout.ContentCol, null, /*#__PURE__*/React.createElement(Button, { | ||
| "aria-controls": `${item.key}`, | ||
| "aria-expanded": expandedKeys.has(item.key), | ||
| return /*#__PURE__*/React.createElement(Layout.ContentRow, otherProps, expandable && !loading && /*#__PURE__*/React.createElement(Layout.ContentCol, null, /*#__PURE__*/React.createElement("span", { | ||
| className: classNames('component-expander', expanderClassName, { | ||
| collapsed: expandedKeys.has(item.key) | ||
| }), | ||
| disabled: typeof expanderDisabled === 'undefined' ? disabled : expanderDisabled, | ||
| displayType: null, | ||
| monospaced: true, | ||
| onClick: event => { | ||
| event.stopPropagation(); | ||
| if (onLoadMore) { | ||
| onLoadMore(); | ||
| } else { | ||
| toggle(item.key); | ||
| } | ||
| }, | ||
| tabIndex: -1 | ||
| }, /*#__PURE__*/React.createElement("span", { | ||
| className: "c-inner", | ||
| tabIndex: -2 | ||
| }) | ||
| }, /*#__PURE__*/React.createElement(Expander, { | ||
| expanderIcons: expanderIcons | ||
| })))), loading && /*#__PURE__*/React.createElement(Layout.ContentCol, { | ||
| }))), loading && /*#__PURE__*/React.createElement(Layout.ContentCol, { | ||
| className: "btn-monospaced" | ||
@@ -498,4 +480,3 @@ }, /*#__PURE__*/React.createElement(ClayLoadingIndicator, { | ||
| content = /*#__PURE__*/React.cloneElement(child, { | ||
| ...child?.props, | ||
| id: child?.props?.id || labelId | ||
| ...child?.props | ||
| }); | ||
@@ -502,0 +483,0 @@ } |
@@ -111,3 +111,3 @@ /** | ||
| } | ||
| export declare function ItemStack({ actions, children, disabled, expandable, expanderDisabled, isNonDraggrable, labelId, loading, onLoadMore, tabIndex, ...otherProps }: ITreeViewItemStackProps): React.JSX.Element; | ||
| export declare function ItemStack({ actions, children, disabled, expandable, isNonDraggrable, labelId, loading, tabIndex, ...otherProps }: ITreeViewItemStackProps): React.JSX.Element; | ||
| export declare namespace ItemStack { | ||
@@ -114,0 +114,0 @@ var displayName: string; |
+2
-2
| { | ||
| "name": "@clayui/core", | ||
| "version": "3.156.0", | ||
| "version": "3.156.6", | ||
| "description": "Clay UI components in React", | ||
@@ -63,3 +63,3 @@ "license": "BSD-3-Clause", | ||
| ], | ||
| "gitHead": "55d9470c2c3c9253c7ba7f8dd8bd36fdef0ffe49" | ||
| "gitHead": "59aa77ced50a27ffa7e503146d95bb66ebdd5de7" | ||
| } |
Network access
Supply chain riskThis module accesses the network.
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
Network access
Supply chain riskThis module accesses the network.
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
590010
-0.17%16787
-0.23%