@nulogy/components 7.4.0 → 8.0.1
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.
- package/dist/main.js +63 -55
- package/dist/main.module.js +63 -55
- package/dist/src/BrandedNavBar/MobileMenu.d.ts +3 -3
- package/dist/src/BrandedNavBar/NavBarDropdownMenu.d.ts +18 -7
- package/dist/src/BrandedNavBar/SmallNavBar.d.ts +27 -15
- package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +21 -0
- package/dist/src/BrandedNavBar/index.d.ts +1 -1
- package/dist/src/Button/IconicButton.d.ts +1 -0
- package/dist/src/Button/IconicButton.story.d.ts +2 -0
- package/dist/src/NavBar/NavBarDropdownMenu.d.ts +2 -7
- package/dist/src/NavBar/SmallNavBar.d.ts +2 -7
- package/dist/src/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/withMenuState.d.ts +5 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -12512,26 +12512,19 @@
|
|
|
12512
12512
|
return MenuState;
|
|
12513
12513
|
}(MenuStateInt);
|
|
12514
12514
|
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
var showDelay = _a.showDelay,
|
|
12518
|
-
hideDelay = _a.hideDelay,
|
|
12519
|
-
defaultOpen = _a.defaultOpen,
|
|
12520
|
-
props = __rest(_a, ["showDelay", "hideDelay", "defaultOpen"]);
|
|
12521
|
-
|
|
12515
|
+
function withMenuState(MenuComponent) {
|
|
12516
|
+
return function (props) {
|
|
12522
12517
|
return /*#__PURE__*/React__default['default'].createElement(MenuState, {
|
|
12523
|
-
showDelay: showDelay,
|
|
12524
|
-
hideDelay: hideDelay,
|
|
12525
|
-
defaultOpen: defaultOpen
|
|
12518
|
+
showDelay: props.showDelay,
|
|
12519
|
+
hideDelay: props.hideDelay,
|
|
12520
|
+
defaultOpen: props.defaultOpen
|
|
12526
12521
|
}, function (menuComponentProps) {
|
|
12527
12522
|
return /*#__PURE__*/React__default['default'].createElement(MenuComponent, Object.assign({
|
|
12528
12523
|
menuState: menuComponentProps
|
|
12529
12524
|
}, props));
|
|
12530
12525
|
});
|
|
12531
12526
|
};
|
|
12532
|
-
|
|
12533
|
-
return MenuComponentWithState;
|
|
12534
|
-
};
|
|
12527
|
+
}
|
|
12535
12528
|
|
|
12536
12529
|
function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
12537
12530
|
|
|
@@ -16153,7 +16146,11 @@
|
|
|
16153
16146
|
var _hover, _active, _hoverActive, _focus, _ref3;
|
|
16154
16147
|
|
|
16155
16148
|
var disabled = _ref2.disabled,
|
|
16149
|
+
hoverBackgroundColor = _ref2.hoverBackgroundColor,
|
|
16156
16150
|
theme = _ref2.theme;
|
|
16151
|
+
|
|
16152
|
+
var _a;
|
|
16153
|
+
|
|
16157
16154
|
return _ref3 = {
|
|
16158
16155
|
background: "transparent",
|
|
16159
16156
|
border: "none",
|
|
@@ -16172,7 +16169,7 @@
|
|
|
16172
16169
|
}, _ref3["" + HoverText] = {
|
|
16173
16170
|
opacity: "0"
|
|
16174
16171
|
}, _ref3["&:hover"] = (_hover = {}, _hover["" + Icon] = {
|
|
16175
|
-
backgroundColor: theme.colors
|
|
16172
|
+
backgroundColor: (_a = theme.colors[hoverBackgroundColor]) !== null && _a !== void 0 ? _a : hoverBackgroundColor
|
|
16176
16173
|
}, _hover["" + HoverText] = {
|
|
16177
16174
|
opacity: "1"
|
|
16178
16175
|
}, _hover), _ref3["&:active"] = (_active = {}, _active["" + Icon] = {
|
|
@@ -16196,18 +16193,21 @@
|
|
|
16196
16193
|
var children = _a.children,
|
|
16197
16194
|
_a$color = _a.color,
|
|
16198
16195
|
color = _a$color === void 0 ? "darkBlue" : _a$color,
|
|
16196
|
+
_a$hoverBackgroundCol = _a.hoverBackgroundColor,
|
|
16197
|
+
hoverBackgroundColor = _a$hoverBackgroundCol === void 0 ? "lightBlue" : _a$hoverBackgroundCol,
|
|
16199
16198
|
icon = _a.icon,
|
|
16200
16199
|
labelHidden = _a.labelHidden,
|
|
16201
16200
|
className = _a.className,
|
|
16202
16201
|
iconSize = _a.iconSize,
|
|
16203
16202
|
fontSize = _a.fontSize,
|
|
16204
16203
|
tooltip = _a.tooltip,
|
|
16205
|
-
props = __rest(_a, ["children", "color", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
|
|
16204
|
+
props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
|
|
16206
16205
|
|
|
16207
16206
|
return /*#__PURE__*/React__default['default'].createElement(WrapperButton$1, Object.assign({
|
|
16208
16207
|
ref: forwardedRef,
|
|
16209
16208
|
"aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined,
|
|
16210
|
-
className: className
|
|
16209
|
+
className: className,
|
|
16210
|
+
hoverBackgroundColor: hoverBackgroundColor
|
|
16211
16211
|
}, props), /*#__PURE__*/React__default['default'].createElement(Manager$2, null, /*#__PURE__*/React__default['default'].createElement(Reference$2, null, function (_ref4) {
|
|
16212
16212
|
var ref = _ref4.ref;
|
|
16213
16213
|
return /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
@@ -43564,14 +43564,14 @@
|
|
|
43564
43564
|
closeMenu = _a.closeMenu,
|
|
43565
43565
|
subtext = _a.subtext,
|
|
43566
43566
|
themeColorObject = _a.themeColorObject,
|
|
43567
|
-
|
|
43568
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43567
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43568
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43569
43569
|
|
|
43570
43570
|
return /*#__PURE__*/React__default['default'].createElement(Nav, Object.assign({
|
|
43571
43571
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43572
43572
|
}, props), /*#__PURE__*/React__default['default'].createElement(BrandingWrap, null, /*#__PURE__*/React__default['default'].createElement(BrandingText, {
|
|
43573
43573
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43574
|
-
})), /*#__PURE__*/React__default['default'].createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)),
|
|
43574
|
+
})), /*#__PURE__*/React__default['default'].createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)), showNulogyLogo && /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43575
43575
|
textAlign: "center",
|
|
43576
43576
|
borderTop: borderStyle,
|
|
43577
43577
|
height: "40px",
|
|
@@ -43618,7 +43618,7 @@
|
|
|
43618
43618
|
color: theme.colors[color] || color,
|
|
43619
43619
|
background: "none",
|
|
43620
43620
|
border: "none",
|
|
43621
|
-
padding:
|
|
43621
|
+
padding: theme.space.x1,
|
|
43622
43622
|
marginLeft: theme.space.x1,
|
|
43623
43623
|
borderRadius: theme.radii.medium,
|
|
43624
43624
|
transition: ".2s",
|
|
@@ -43677,16 +43677,15 @@
|
|
|
43677
43677
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43678
43678
|
closeMenu = _a$menuState.closeMenu,
|
|
43679
43679
|
subtext = _a.subtext,
|
|
43680
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43681
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43682
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43683
43680
|
environment = _a.environment,
|
|
43684
|
-
|
|
43681
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43685
43682
|
_a$breakpointLower = _a.breakpointLower,
|
|
43686
43683
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43687
43684
|
themeColorObject = _a.themeColorObject,
|
|
43688
43685
|
navBarHeight = _a.navBarHeight,
|
|
43689
|
-
|
|
43686
|
+
logo = _a.logo,
|
|
43687
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43688
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43690
43689
|
|
|
43691
43690
|
var navRef = React__default['default'].useRef(null);
|
|
43692
43691
|
React.useEffect(function () {
|
|
@@ -43698,6 +43697,7 @@
|
|
|
43698
43697
|
var _useTheme = styled.useTheme(),
|
|
43699
43698
|
breakpoints = _useTheme.breakpoints;
|
|
43700
43699
|
|
|
43700
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43701
43701
|
return /*#__PURE__*/React__default['default'].createElement(SmallHeader, Object.assign({
|
|
43702
43702
|
ref: navRef,
|
|
43703
43703
|
isOpen: isOpen,
|
|
@@ -43705,12 +43705,7 @@
|
|
|
43705
43705
|
}, props), environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
43706
43706
|
backgroundColor: "white",
|
|
43707
43707
|
height: navBarHeight
|
|
43708
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43709
|
-
logoSrc: logoSrc,
|
|
43710
|
-
brandingLinkHref: brandingLinkHref,
|
|
43711
|
-
brandingLinkTo: brandingLinkTo,
|
|
43712
|
-
subtext: subtext
|
|
43713
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43708
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43714
43709
|
justifyContent: "flex-end",
|
|
43715
43710
|
ml: "x3",
|
|
43716
43711
|
flexGrow: 1
|
|
@@ -43718,17 +43713,22 @@
|
|
|
43718
43713
|
maxWidth: "18em",
|
|
43719
43714
|
alignItems: "center",
|
|
43720
43715
|
px: "0"
|
|
43721
|
-
}, /*#__PURE__*/React__default['default'].createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) &&
|
|
43716
|
+
}, /*#__PURE__*/React__default['default'].createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) && (renderMenuButton ? renderMenuButton({
|
|
43717
|
+
themeColorObject: themeColorObject,
|
|
43718
|
+
onClick: toggleMenu,
|
|
43719
|
+
ariaExpanded: ariaExpanded,
|
|
43720
|
+
isOpen: isOpen
|
|
43721
|
+
}) : /*#__PURE__*/React__default['default'].createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43722
43722
|
onClick: toggleMenu,
|
|
43723
|
-
"aria-expanded":
|
|
43723
|
+
"aria-expanded": ariaExpanded
|
|
43724
43724
|
}), /*#__PURE__*/React__default['default'].createElement(MenuIcon, {
|
|
43725
43725
|
isOpen: isOpen
|
|
43726
|
-
})))), isOpen && /*#__PURE__*/React__default['default'].createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default['default'].createElement(MobileMenu, {
|
|
43726
|
+
}))))), isOpen && /*#__PURE__*/React__default['default'].createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default['default'].createElement(MobileMenu, {
|
|
43727
43727
|
themeColorObject: themeColorObject,
|
|
43728
43728
|
subtext: subtext,
|
|
43729
43729
|
menuData: menuData,
|
|
43730
43730
|
closeMenu: closeMenu,
|
|
43731
|
-
|
|
43731
|
+
showNulogyLogo: showNulogyLogo
|
|
43732
43732
|
})));
|
|
43733
43733
|
};
|
|
43734
43734
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43748,14 +43748,11 @@
|
|
|
43748
43748
|
|
|
43749
43749
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43750
43750
|
var menuData = _a.menuData,
|
|
43751
|
-
subtext = _a.subtext,
|
|
43752
43751
|
environment = _a.environment,
|
|
43753
|
-
|
|
43754
|
-
|
|
43755
|
-
|
|
43756
|
-
|
|
43757
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43758
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43752
|
+
logo = _a.logo,
|
|
43753
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43754
|
+
subtext = _a.subtext,
|
|
43755
|
+
props = __rest(_a, ["menuData", "environment", "logo", "showNulogyLogo", "subtext"]);
|
|
43759
43756
|
|
|
43760
43757
|
var _useTranslation = useTranslation(),
|
|
43761
43758
|
t = _useTranslation.t;
|
|
@@ -43763,13 +43760,7 @@
|
|
|
43763
43760
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement("header", Object.assign({}, props), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
43764
43761
|
backgroundColor: "white",
|
|
43765
43762
|
height: NAVBAR_HEIGHT
|
|
43766
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43767
|
-
logoSrc: logoSrc,
|
|
43768
|
-
brandingLinkHref: brandingLinkHref,
|
|
43769
|
-
brandingLinkTo: brandingLinkTo,
|
|
43770
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43771
|
-
subtext: subtext
|
|
43772
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43763
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43773
43764
|
justifyContent: "space-between",
|
|
43774
43765
|
alignContent: "flex-end",
|
|
43775
43766
|
flexGrow: 1,
|
|
@@ -43786,7 +43777,7 @@
|
|
|
43786
43777
|
themeColorObject: themeColorObject,
|
|
43787
43778
|
"aria-label": t("secondary navigation"),
|
|
43788
43779
|
menuData: menuData.secondaryMenu
|
|
43789
|
-
}),
|
|
43780
|
+
}), showNulogyLogo && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43790
43781
|
pl: "x3"
|
|
43791
43782
|
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogoContainer, {
|
|
43792
43783
|
height: NAVBAR_HEIGHT,
|
|
@@ -43802,19 +43793,36 @@
|
|
|
43802
43793
|
var width = _a.width,
|
|
43803
43794
|
defaultOpen = _a.defaultOpen,
|
|
43804
43795
|
breakpointUpper = _a.breakpointUpper,
|
|
43805
|
-
|
|
43796
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43797
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43798
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43799
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43800
|
+
logoSrc = _a.logoSrc,
|
|
43801
|
+
props = __rest(_a, ["width", "defaultOpen", "breakpointUpper", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent", "logoSrc"]);
|
|
43806
43802
|
|
|
43807
43803
|
var currentWidth = width || typeof window !== "undefined" && window.innerWidth;
|
|
43804
|
+
var logo = /*#__PURE__*/React__default['default'].createElement(BrandLogoContainer, {
|
|
43805
|
+
logoSrc: logoSrc,
|
|
43806
|
+
brandingLinkHref: brandingLinkHref,
|
|
43807
|
+
brandingLinkTo: brandingLinkTo,
|
|
43808
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43809
|
+
subtext: props.subtext
|
|
43810
|
+
});
|
|
43808
43811
|
|
|
43809
43812
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43810
|
-
return /*#__PURE__*/React__default['default'].createElement(MediumNavBar, Object.assign({
|
|
43813
|
+
return /*#__PURE__*/React__default['default'].createElement(MediumNavBar, Object.assign({
|
|
43814
|
+
logo: logo,
|
|
43815
|
+
showNulogyLogo: logoSrc
|
|
43816
|
+
}, props));
|
|
43811
43817
|
} else {
|
|
43812
|
-
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43818
|
+
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43813
43819
|
width: currentWidth,
|
|
43814
43820
|
defaultOpen: defaultOpen,
|
|
43815
43821
|
themeColorObject: themeColorObject,
|
|
43816
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43817
|
-
|
|
43822
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43823
|
+
logo: logo,
|
|
43824
|
+
showNulogyLogo: logoSrc
|
|
43825
|
+
}, props));
|
|
43818
43826
|
}
|
|
43819
43827
|
};
|
|
43820
43828
|
|
package/dist/main.module.js
CHANGED
|
@@ -12486,26 +12486,19 @@ var MenuState = /*#__PURE__*/function (_MenuStateInt) {
|
|
|
12486
12486
|
return MenuState;
|
|
12487
12487
|
}(MenuStateInt);
|
|
12488
12488
|
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
var showDelay = _a.showDelay,
|
|
12492
|
-
hideDelay = _a.hideDelay,
|
|
12493
|
-
defaultOpen = _a.defaultOpen,
|
|
12494
|
-
props = __rest(_a, ["showDelay", "hideDelay", "defaultOpen"]);
|
|
12495
|
-
|
|
12489
|
+
function withMenuState(MenuComponent) {
|
|
12490
|
+
return function (props) {
|
|
12496
12491
|
return /*#__PURE__*/React__default.createElement(MenuState, {
|
|
12497
|
-
showDelay: showDelay,
|
|
12498
|
-
hideDelay: hideDelay,
|
|
12499
|
-
defaultOpen: defaultOpen
|
|
12492
|
+
showDelay: props.showDelay,
|
|
12493
|
+
hideDelay: props.hideDelay,
|
|
12494
|
+
defaultOpen: props.defaultOpen
|
|
12500
12495
|
}, function (menuComponentProps) {
|
|
12501
12496
|
return /*#__PURE__*/React__default.createElement(MenuComponent, Object.assign({
|
|
12502
12497
|
menuState: menuComponentProps
|
|
12503
12498
|
}, props));
|
|
12504
12499
|
});
|
|
12505
12500
|
};
|
|
12506
|
-
|
|
12507
|
-
return MenuComponentWithState;
|
|
12508
|
-
};
|
|
12501
|
+
}
|
|
12509
12502
|
|
|
12510
12503
|
function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
12511
12504
|
|
|
@@ -16127,7 +16120,11 @@ var WrapperButton$1 = styled.button.withConfig({
|
|
|
16127
16120
|
var _hover, _active, _hoverActive, _focus, _ref3;
|
|
16128
16121
|
|
|
16129
16122
|
var disabled = _ref2.disabled,
|
|
16123
|
+
hoverBackgroundColor = _ref2.hoverBackgroundColor,
|
|
16130
16124
|
theme = _ref2.theme;
|
|
16125
|
+
|
|
16126
|
+
var _a;
|
|
16127
|
+
|
|
16131
16128
|
return _ref3 = {
|
|
16132
16129
|
background: "transparent",
|
|
16133
16130
|
border: "none",
|
|
@@ -16146,7 +16143,7 @@ var WrapperButton$1 = styled.button.withConfig({
|
|
|
16146
16143
|
}, _ref3["" + HoverText] = {
|
|
16147
16144
|
opacity: "0"
|
|
16148
16145
|
}, _ref3["&:hover"] = (_hover = {}, _hover["" + Icon] = {
|
|
16149
|
-
backgroundColor: theme.colors
|
|
16146
|
+
backgroundColor: (_a = theme.colors[hoverBackgroundColor]) !== null && _a !== void 0 ? _a : hoverBackgroundColor
|
|
16150
16147
|
}, _hover["" + HoverText] = {
|
|
16151
16148
|
opacity: "1"
|
|
16152
16149
|
}, _hover), _ref3["&:active"] = (_active = {}, _active["" + Icon] = {
|
|
@@ -16170,18 +16167,21 @@ var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwarde
|
|
|
16170
16167
|
var children = _a.children,
|
|
16171
16168
|
_a$color = _a.color,
|
|
16172
16169
|
color = _a$color === void 0 ? "darkBlue" : _a$color,
|
|
16170
|
+
_a$hoverBackgroundCol = _a.hoverBackgroundColor,
|
|
16171
|
+
hoverBackgroundColor = _a$hoverBackgroundCol === void 0 ? "lightBlue" : _a$hoverBackgroundCol,
|
|
16173
16172
|
icon = _a.icon,
|
|
16174
16173
|
labelHidden = _a.labelHidden,
|
|
16175
16174
|
className = _a.className,
|
|
16176
16175
|
iconSize = _a.iconSize,
|
|
16177
16176
|
fontSize = _a.fontSize,
|
|
16178
16177
|
tooltip = _a.tooltip,
|
|
16179
|
-
props = __rest(_a, ["children", "color", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
|
|
16178
|
+
props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
|
|
16180
16179
|
|
|
16181
16180
|
return /*#__PURE__*/React__default.createElement(WrapperButton$1, Object.assign({
|
|
16182
16181
|
ref: forwardedRef,
|
|
16183
16182
|
"aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined,
|
|
16184
|
-
className: className
|
|
16183
|
+
className: className,
|
|
16184
|
+
hoverBackgroundColor: hoverBackgroundColor
|
|
16185
16185
|
}, props), /*#__PURE__*/React__default.createElement(Manager$2, null, /*#__PURE__*/React__default.createElement(Reference$2, null, function (_ref4) {
|
|
16186
16186
|
var ref = _ref4.ref;
|
|
16187
16187
|
return /*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -43538,14 +43538,14 @@ var BaseMobileMenu = function BaseMobileMenu(_a) {
|
|
|
43538
43538
|
closeMenu = _a.closeMenu,
|
|
43539
43539
|
subtext = _a.subtext,
|
|
43540
43540
|
themeColorObject = _a.themeColorObject,
|
|
43541
|
-
|
|
43542
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43541
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43542
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43543
43543
|
|
|
43544
43544
|
return /*#__PURE__*/React__default.createElement(Nav, Object.assign({
|
|
43545
43545
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43546
43546
|
}, props), /*#__PURE__*/React__default.createElement(BrandingWrap, null, /*#__PURE__*/React__default.createElement(BrandingText, {
|
|
43547
43547
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43548
|
-
})), /*#__PURE__*/React__default.createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)),
|
|
43548
|
+
})), /*#__PURE__*/React__default.createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)), showNulogyLogo && /*#__PURE__*/React__default.createElement(Flex, {
|
|
43549
43549
|
textAlign: "center",
|
|
43550
43550
|
borderTop: borderStyle,
|
|
43551
43551
|
height: "40px",
|
|
@@ -43592,7 +43592,7 @@ var MobileMenuTrigger = styled.button.withConfig({
|
|
|
43592
43592
|
color: theme.colors[color] || color,
|
|
43593
43593
|
background: "none",
|
|
43594
43594
|
border: "none",
|
|
43595
|
-
padding:
|
|
43595
|
+
padding: theme.space.x1,
|
|
43596
43596
|
marginLeft: theme.space.x1,
|
|
43597
43597
|
borderRadius: theme.radii.medium,
|
|
43598
43598
|
transition: ".2s",
|
|
@@ -43651,16 +43651,15 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43651
43651
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43652
43652
|
closeMenu = _a$menuState.closeMenu,
|
|
43653
43653
|
subtext = _a.subtext,
|
|
43654
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43655
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43656
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43657
43654
|
environment = _a.environment,
|
|
43658
|
-
|
|
43655
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43659
43656
|
_a$breakpointLower = _a.breakpointLower,
|
|
43660
43657
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43661
43658
|
themeColorObject = _a.themeColorObject,
|
|
43662
43659
|
navBarHeight = _a.navBarHeight,
|
|
43663
|
-
|
|
43660
|
+
logo = _a.logo,
|
|
43661
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43662
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43664
43663
|
|
|
43665
43664
|
var navRef = React__default.useRef(null);
|
|
43666
43665
|
useEffect(function () {
|
|
@@ -43672,6 +43671,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43672
43671
|
var _useTheme = useTheme(),
|
|
43673
43672
|
breakpoints = _useTheme.breakpoints;
|
|
43674
43673
|
|
|
43674
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43675
43675
|
return /*#__PURE__*/React__default.createElement(SmallHeader, Object.assign({
|
|
43676
43676
|
ref: navRef,
|
|
43677
43677
|
isOpen: isOpen,
|
|
@@ -43679,12 +43679,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43679
43679
|
}, props), environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43680
43680
|
backgroundColor: "white",
|
|
43681
43681
|
height: navBarHeight
|
|
43682
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43683
|
-
logoSrc: logoSrc,
|
|
43684
|
-
brandingLinkHref: brandingLinkHref,
|
|
43685
|
-
brandingLinkTo: brandingLinkTo,
|
|
43686
|
-
subtext: subtext
|
|
43687
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43682
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43688
43683
|
justifyContent: "flex-end",
|
|
43689
43684
|
ml: "x3",
|
|
43690
43685
|
flexGrow: 1
|
|
@@ -43692,17 +43687,22 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43692
43687
|
maxWidth: "18em",
|
|
43693
43688
|
alignItems: "center",
|
|
43694
43689
|
px: "0"
|
|
43695
|
-
}, /*#__PURE__*/React__default.createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) &&
|
|
43690
|
+
}, /*#__PURE__*/React__default.createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) && (renderMenuButton ? renderMenuButton({
|
|
43691
|
+
themeColorObject: themeColorObject,
|
|
43692
|
+
onClick: toggleMenu,
|
|
43693
|
+
ariaExpanded: ariaExpanded,
|
|
43694
|
+
isOpen: isOpen
|
|
43695
|
+
}) : /*#__PURE__*/React__default.createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43696
43696
|
onClick: toggleMenu,
|
|
43697
|
-
"aria-expanded":
|
|
43697
|
+
"aria-expanded": ariaExpanded
|
|
43698
43698
|
}), /*#__PURE__*/React__default.createElement(MenuIcon, {
|
|
43699
43699
|
isOpen: isOpen
|
|
43700
|
-
})))), isOpen && /*#__PURE__*/React__default.createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default.createElement(MobileMenu, {
|
|
43700
|
+
}))))), isOpen && /*#__PURE__*/React__default.createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default.createElement(MobileMenu, {
|
|
43701
43701
|
themeColorObject: themeColorObject,
|
|
43702
43702
|
subtext: subtext,
|
|
43703
43703
|
menuData: menuData,
|
|
43704
43704
|
closeMenu: closeMenu,
|
|
43705
|
-
|
|
43705
|
+
showNulogyLogo: showNulogyLogo
|
|
43706
43706
|
})));
|
|
43707
43707
|
};
|
|
43708
43708
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43722,14 +43722,11 @@ var themeColorObject = {
|
|
|
43722
43722
|
|
|
43723
43723
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43724
43724
|
var menuData = _a.menuData,
|
|
43725
|
-
subtext = _a.subtext,
|
|
43726
43725
|
environment = _a.environment,
|
|
43727
|
-
|
|
43728
|
-
|
|
43729
|
-
|
|
43730
|
-
|
|
43731
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43732
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43726
|
+
logo = _a.logo,
|
|
43727
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43728
|
+
subtext = _a.subtext,
|
|
43729
|
+
props = __rest(_a, ["menuData", "environment", "logo", "showNulogyLogo", "subtext"]);
|
|
43733
43730
|
|
|
43734
43731
|
var _useTranslation = useTranslation(),
|
|
43735
43732
|
t = _useTranslation.t;
|
|
@@ -43737,13 +43734,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43737
43734
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement("header", Object.assign({}, props), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43738
43735
|
backgroundColor: "white",
|
|
43739
43736
|
height: NAVBAR_HEIGHT
|
|
43740
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43741
|
-
logoSrc: logoSrc,
|
|
43742
|
-
brandingLinkHref: brandingLinkHref,
|
|
43743
|
-
brandingLinkTo: brandingLinkTo,
|
|
43744
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43745
|
-
subtext: subtext
|
|
43746
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43737
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43747
43738
|
justifyContent: "space-between",
|
|
43748
43739
|
alignContent: "flex-end",
|
|
43749
43740
|
flexGrow: 1,
|
|
@@ -43760,7 +43751,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43760
43751
|
themeColorObject: themeColorObject,
|
|
43761
43752
|
"aria-label": t("secondary navigation"),
|
|
43762
43753
|
menuData: menuData.secondaryMenu
|
|
43763
|
-
}),
|
|
43754
|
+
}), showNulogyLogo && /*#__PURE__*/React__default.createElement(Box, {
|
|
43764
43755
|
pl: "x3"
|
|
43765
43756
|
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
43766
43757
|
height: NAVBAR_HEIGHT,
|
|
@@ -43776,19 +43767,36 @@ var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
|
43776
43767
|
var width = _a.width,
|
|
43777
43768
|
defaultOpen = _a.defaultOpen,
|
|
43778
43769
|
breakpointUpper = _a.breakpointUpper,
|
|
43779
|
-
|
|
43770
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43771
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43772
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43773
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43774
|
+
logoSrc = _a.logoSrc,
|
|
43775
|
+
props = __rest(_a, ["width", "defaultOpen", "breakpointUpper", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent", "logoSrc"]);
|
|
43780
43776
|
|
|
43781
43777
|
var currentWidth = width || typeof window !== "undefined" && window.innerWidth;
|
|
43778
|
+
var logo = /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
43779
|
+
logoSrc: logoSrc,
|
|
43780
|
+
brandingLinkHref: brandingLinkHref,
|
|
43781
|
+
brandingLinkTo: brandingLinkTo,
|
|
43782
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43783
|
+
subtext: props.subtext
|
|
43784
|
+
});
|
|
43782
43785
|
|
|
43783
43786
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43784
|
-
return /*#__PURE__*/React__default.createElement(MediumNavBar, Object.assign({
|
|
43787
|
+
return /*#__PURE__*/React__default.createElement(MediumNavBar, Object.assign({
|
|
43788
|
+
logo: logo,
|
|
43789
|
+
showNulogyLogo: logoSrc
|
|
43790
|
+
}, props));
|
|
43785
43791
|
} else {
|
|
43786
|
-
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43792
|
+
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43787
43793
|
width: currentWidth,
|
|
43788
43794
|
defaultOpen: defaultOpen,
|
|
43789
43795
|
themeColorObject: themeColorObject,
|
|
43790
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43791
|
-
|
|
43796
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43797
|
+
logo: logo,
|
|
43798
|
+
showNulogyLogo: logoSrc
|
|
43799
|
+
}, props));
|
|
43792
43800
|
}
|
|
43793
43801
|
};
|
|
43794
43802
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
declare type ThemeColorObject = {
|
|
3
3
|
textColor?: string;
|
|
4
4
|
background?: string;
|
|
@@ -13,7 +13,7 @@ declare type BaseMobileMenuProps = {
|
|
|
13
13
|
subtext?: string;
|
|
14
14
|
closeMenu?: Function;
|
|
15
15
|
themeColorObject?: ThemeColorObject;
|
|
16
|
-
|
|
16
|
+
showNulogyLogo?: boolean;
|
|
17
17
|
};
|
|
18
|
-
declare const MobileMenu: import("styled-components").StyledComponent<
|
|
18
|
+
declare const MobileMenu: import("styled-components").StyledComponent<React.FC<BaseMobileMenuProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
19
19
|
export default MobileMenu;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type MenuState = {
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
openMenu?: Function;
|
|
5
|
+
closeMenu?: Function;
|
|
6
|
+
toggleMenu?: Function;
|
|
7
|
+
};
|
|
8
|
+
declare type NavBarDropdownMenuProps = {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
trigger?: Function;
|
|
11
|
+
menuState?: MenuState;
|
|
12
|
+
showArrow?: boolean;
|
|
13
|
+
placement?: "bottom-start" | "right-start";
|
|
14
|
+
modifiers?: any;
|
|
15
|
+
triggerTogglesMenuState?: boolean;
|
|
16
|
+
dropdownMenuContainerEventHandlers?: Function;
|
|
17
|
+
};
|
|
18
|
+
declare const NavBarDropdownMenu: React.JSXElementConstructor<NavBarDropdownMenuProps & import("../utils").WithMenuStateProps>;
|
|
8
19
|
export default NavBarDropdownMenu;
|
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import { WithMenuStateProps } from "../utils";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WithMenuStateProps, AcceptsMenuStateProps } from "../utils";
|
|
3
|
+
export declare type RenderMenuButtonProps = {
|
|
4
|
+
themeColorObject: any;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
ariaExpanded: true | null;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare type SmallNavBarNoStateProps = {
|
|
6
10
|
menuData?: any;
|
|
7
11
|
subtext?: string;
|
|
8
|
-
brandingLinkHref?: string;
|
|
9
|
-
brandingLinkTo?: string;
|
|
10
12
|
breakpointLower?: number | string;
|
|
11
13
|
width?: number;
|
|
12
14
|
themeColor?: "blue" | "white";
|
|
13
|
-
themeColorObject
|
|
15
|
+
themeColorObject?: any;
|
|
14
16
|
environment?: "development" | "training";
|
|
15
17
|
navBarHeight: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
logo?: React.ReactElement;
|
|
19
|
+
showNulogyLogo?: boolean;
|
|
20
|
+
renderMenuButton?: (props: RenderMenuButtonProps) => React.ReactElement;
|
|
21
|
+
} & AcceptsMenuStateProps;
|
|
22
|
+
declare const SmallNavBar: React.JSXElementConstructor<{
|
|
23
|
+
menuData?: any;
|
|
24
|
+
subtext?: string;
|
|
25
|
+
breakpointLower?: number | string;
|
|
26
|
+
width?: number;
|
|
27
|
+
themeColor?: "blue" | "white";
|
|
28
|
+
themeColorObject?: any;
|
|
29
|
+
environment?: "development" | "training";
|
|
30
|
+
navBarHeight: string;
|
|
31
|
+
logo?: React.ReactElement;
|
|
32
|
+
showNulogyLogo?: boolean;
|
|
33
|
+
renderMenuButton?: (props: RenderMenuButtonProps) => React.ReactElement;
|
|
34
|
+
} & AcceptsMenuStateProps & WithMenuStateProps>;
|
|
23
35
|
export declare type SmallNavBarProps = SmallNavBarNoStateProps & WithMenuStateProps;
|
|
24
36
|
export default SmallNavBar;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
viewport: {
|
|
6
|
+
defaultViewport: string;
|
|
7
|
+
};
|
|
8
|
+
chromatic: {
|
|
9
|
+
viewports: number[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const _SmallNavBar: () => JSX.Element;
|
|
15
|
+
export declare const SmallNavBarOpen: () => JSX.Element;
|
|
16
|
+
export declare const WithALogo: () => JSX.Element;
|
|
17
|
+
export declare const WithALogoOpen: () => JSX.Element;
|
|
18
|
+
export declare const WithABrandLogoContainerLogo: () => JSX.Element;
|
|
19
|
+
export declare const WithANulogyLogoAndAppName: () => JSX.Element;
|
|
20
|
+
export declare const WithEnvironmentBanner: () => JSX.Element;
|
|
21
|
+
export declare const WithCustomMenuButton: () => JSX.Element;
|
|
@@ -10,4 +10,4 @@ export type { BrandLogoContainerProps } from "./BrandLogoContainer";
|
|
|
10
10
|
export { default as DesktopMenu } from "./DesktopMenu";
|
|
11
11
|
export type { DesktopMenuProps } from "./DesktopMenu";
|
|
12
12
|
export { default as SmallNavBar } from "./SmallNavBar";
|
|
13
|
-
export type { SmallNavBarProps } from "./SmallNavBar";
|
|
13
|
+
export type { SmallNavBarProps, RenderMenuButtonProps } from "./SmallNavBar";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const NavBarDropdownMenu: (
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
showDelay: any;
|
|
5
|
-
hideDelay: any;
|
|
6
|
-
defaultOpen: any;
|
|
7
|
-
}) => JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const NavBarDropdownMenu: React.JSXElementConstructor<import("../utils").WithMenuStateProps>;
|
|
8
3
|
export default NavBarDropdownMenu;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const SmallNavBar: (
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
showDelay: any;
|
|
5
|
-
hideDelay: any;
|
|
6
|
-
defaultOpen: any;
|
|
7
|
-
}) => JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const SmallNavBar: React.JSXElementConstructor<import("../utils").WithMenuStateProps>;
|
|
8
3
|
export default SmallNavBar;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export { ALL_NDS_LOCALES } from "./locales.const";
|
|
|
43
43
|
export { TruncatedText } from "./TruncatedText";
|
|
44
44
|
export { Toast } from "./Toast";
|
|
45
45
|
export { BrandedNavBar, MenuTrigger, EnvironmentBanner, NavBarBackground, BrandLogoContainer, DesktopMenu, SmallNavBar, } from "./BrandedNavBar";
|
|
46
|
-
export type { MenuTriggerProps, EnvironmentBannerProps, NavBarBackgroundProps, BrandLogoContainerProps, DesktopMenuProps, SmallNavBarProps, } from "./BrandedNavBar";
|
|
46
|
+
export type { MenuTriggerProps, EnvironmentBannerProps, NavBarBackgroundProps, BrandLogoContainerProps, DesktopMenuProps, SmallNavBarProps, RenderMenuButtonProps, } from "./BrandedNavBar";
|
|
47
47
|
export { AsyncSelect } from "./AsyncSelect";
|
|
48
48
|
export { ApplicationFrame, Page, Sidebar } from "./Layout";
|
|
49
49
|
export { useWindowDimensions } from "./utils";
|
|
@@ -7,6 +7,6 @@ export { default as DetectOutsideClick } from "./DetectOutsideClick";
|
|
|
7
7
|
export { default as PopperArrow } from "./PopperArrow";
|
|
8
8
|
export { default as ScrollIndicators } from "./ScrollIndicators";
|
|
9
9
|
export { default as withMenuState } from "./withMenuState";
|
|
10
|
-
export type { WithMenuStateProps } from "./withMenuState";
|
|
10
|
+
export type { WithMenuStateProps, AcceptsMenuStateProps } from "./withMenuState";
|
|
11
11
|
export { default as PreventBodyElementScrolling } from "./PreventBodyElementScrolling";
|
|
12
12
|
export { default as useWindowDimensions } from "./useWindowDimensions";
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare type WithMenuStateProps = {
|
|
3
3
|
children?: any;
|
|
4
4
|
showDelay?: string | number;
|
|
5
5
|
hideDelay?: string | number;
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
defaultOpen: any;
|
|
13
|
-
}) => JSX.Element;
|
|
8
|
+
export declare type AcceptsMenuStateProps = {
|
|
9
|
+
menuState?: any;
|
|
10
|
+
};
|
|
11
|
+
declare function withMenuState<P extends AcceptsMenuStateProps>(MenuComponent: React.JSXElementConstructor<P>): React.JSXElementConstructor<P & WithMenuStateProps>;
|
|
14
12
|
export default withMenuState;
|