@deque/cauldron-react 5.6.2-canary.27396d76 → 5.6.2-canary.b103453d
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,15 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
interface NavBarProps {
|
|
3
|
+
interface NavBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
initialActiveIndex?: number;
|
|
6
5
|
className?: string;
|
|
7
6
|
collapsed?: boolean;
|
|
8
7
|
navTriggerLabel?: string;
|
|
9
8
|
propId?: string;
|
|
10
9
|
}
|
|
11
10
|
declare const NavBar: {
|
|
12
|
-
({ children, className, collapsed, navTriggerLabel, propId }: NavBarProps): JSX.Element;
|
|
11
|
+
({ children, className, collapsed, navTriggerLabel, propId, ...props }: NavBarProps): JSX.Element;
|
|
13
12
|
displayName: string;
|
|
14
13
|
propTypes: {
|
|
15
14
|
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
package/lib/index.js
CHANGED
|
@@ -1282,7 +1282,7 @@ var TopBarMenu = /** @class */ (function (_super) {
|
|
|
1282
1282
|
}(React__default.Component));
|
|
1283
1283
|
|
|
1284
1284
|
var NavBar = function (_a) {
|
|
1285
|
-
var children = _a.children, className = _a.className, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, _c = _a.navTriggerLabel, navTriggerLabel = _c === void 0 ? 'MAIN MENU' : _c, propId = _a.propId;
|
|
1285
|
+
var children = _a.children, className = _a.className, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, _c = _a.navTriggerLabel, navTriggerLabel = _c === void 0 ? 'MAIN MENU' : _c, propId = _a.propId, props = tslib.__rest(_a, ["children", "className", "collapsed", "navTriggerLabel", "propId"]);
|
|
1286
1286
|
var navRef = React.useRef(null);
|
|
1287
1287
|
var triggerRef = React.useRef(null);
|
|
1288
1288
|
var _d = tslib.__read(React.useState(false), 2), showDropdown = _d[0], setShowDropdown = _d[1];
|
|
@@ -1314,9 +1314,9 @@ var NavBar = function (_a) {
|
|
|
1314
1314
|
var handleTriggerClick = function () {
|
|
1315
1315
|
setShowDropdown(!showDropdown);
|
|
1316
1316
|
};
|
|
1317
|
-
return (React__default.createElement("nav", { className: classNames('NavBar', className, {
|
|
1317
|
+
return (React__default.createElement("nav", tslib.__assign({ className: classNames('NavBar', className, {
|
|
1318
1318
|
'NavBar--collapsed': collapsed
|
|
1319
|
-
}), ref: navRef },
|
|
1319
|
+
}), ref: navRef }, props),
|
|
1320
1320
|
collapsed && (React__default.createElement("button", { "aria-haspopup": "true", "aria-expanded": showDropdown, "aria-controls": menuId, ref: triggerRef, onClick: handleTriggerClick, className: classNames('NavBar__trigger', {
|
|
1321
1321
|
'NavBar__trigger--active': showDropdown
|
|
1322
1322
|
}) },
|
package/package.json
CHANGED