@nulogy/components 7.3.1 → 8.0.0
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 +66 -54
- package/dist/main.module.js +66 -54
- 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, {
|
|
@@ -16713,6 +16713,10 @@
|
|
|
16713
16713
|
};
|
|
16714
16714
|
|
|
16715
16715
|
var sizes$1 = {
|
|
16716
|
+
small: {
|
|
16717
|
+
height: "24px",
|
|
16718
|
+
width: "28px"
|
|
16719
|
+
},
|
|
16716
16720
|
medium: {
|
|
16717
16721
|
height: "32px",
|
|
16718
16722
|
width: "37px"
|
|
@@ -43560,14 +43564,14 @@
|
|
|
43560
43564
|
closeMenu = _a.closeMenu,
|
|
43561
43565
|
subtext = _a.subtext,
|
|
43562
43566
|
themeColorObject = _a.themeColorObject,
|
|
43563
|
-
|
|
43564
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43567
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43568
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43565
43569
|
|
|
43566
43570
|
return /*#__PURE__*/React__default['default'].createElement(Nav, Object.assign({
|
|
43567
43571
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43568
43572
|
}, props), /*#__PURE__*/React__default['default'].createElement(BrandingWrap, null, /*#__PURE__*/React__default['default'].createElement(BrandingText, {
|
|
43569
43573
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43570
|
-
})), /*#__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, {
|
|
43571
43575
|
textAlign: "center",
|
|
43572
43576
|
borderTop: borderStyle,
|
|
43573
43577
|
height: "40px",
|
|
@@ -43673,16 +43677,15 @@
|
|
|
43673
43677
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43674
43678
|
closeMenu = _a$menuState.closeMenu,
|
|
43675
43679
|
subtext = _a.subtext,
|
|
43676
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43677
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43678
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43679
43680
|
environment = _a.environment,
|
|
43680
|
-
|
|
43681
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43681
43682
|
_a$breakpointLower = _a.breakpointLower,
|
|
43682
43683
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43683
43684
|
themeColorObject = _a.themeColorObject,
|
|
43684
43685
|
navBarHeight = _a.navBarHeight,
|
|
43685
|
-
|
|
43686
|
+
logo = _a.logo,
|
|
43687
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43688
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43686
43689
|
|
|
43687
43690
|
var navRef = React__default['default'].useRef(null);
|
|
43688
43691
|
React.useEffect(function () {
|
|
@@ -43694,6 +43697,7 @@
|
|
|
43694
43697
|
var _useTheme = styled.useTheme(),
|
|
43695
43698
|
breakpoints = _useTheme.breakpoints;
|
|
43696
43699
|
|
|
43700
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43697
43701
|
return /*#__PURE__*/React__default['default'].createElement(SmallHeader, Object.assign({
|
|
43698
43702
|
ref: navRef,
|
|
43699
43703
|
isOpen: isOpen,
|
|
@@ -43701,12 +43705,7 @@
|
|
|
43701
43705
|
}, props), environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
43702
43706
|
backgroundColor: "white",
|
|
43703
43707
|
height: navBarHeight
|
|
43704
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43705
|
-
logoSrc: logoSrc,
|
|
43706
|
-
brandingLinkHref: brandingLinkHref,
|
|
43707
|
-
brandingLinkTo: brandingLinkTo,
|
|
43708
|
-
subtext: subtext
|
|
43709
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43708
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43710
43709
|
justifyContent: "flex-end",
|
|
43711
43710
|
ml: "x3",
|
|
43712
43711
|
flexGrow: 1
|
|
@@ -43714,17 +43713,22 @@
|
|
|
43714
43713
|
maxWidth: "18em",
|
|
43715
43714
|
alignItems: "center",
|
|
43716
43715
|
px: "0"
|
|
43717
|
-
}, /*#__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
43718
|
onClick: toggleMenu,
|
|
43719
|
-
|
|
43719
|
+
ariaExpanded: ariaExpanded,
|
|
43720
|
+
isOpen: isOpen
|
|
43721
|
+
}) : /*#__PURE__*/React__default['default'].createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43722
|
+
onClick: toggleMenu,
|
|
43723
|
+
"aria-expanded": ariaExpanded
|
|
43720
43724
|
}), /*#__PURE__*/React__default['default'].createElement(MenuIcon, {
|
|
43721
43725
|
isOpen: isOpen
|
|
43722
|
-
})))), 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, {
|
|
43723
43727
|
themeColorObject: themeColorObject,
|
|
43724
43728
|
subtext: subtext,
|
|
43725
43729
|
menuData: menuData,
|
|
43726
43730
|
closeMenu: closeMenu,
|
|
43727
|
-
|
|
43731
|
+
showNulogyLogo: showNulogyLogo
|
|
43728
43732
|
})));
|
|
43729
43733
|
};
|
|
43730
43734
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43744,14 +43748,11 @@
|
|
|
43744
43748
|
|
|
43745
43749
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43746
43750
|
var menuData = _a.menuData,
|
|
43747
|
-
subtext = _a.subtext,
|
|
43748
43751
|
environment = _a.environment,
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
43752
|
-
|
|
43753
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43754
|
-
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"]);
|
|
43755
43756
|
|
|
43756
43757
|
var _useTranslation = useTranslation(),
|
|
43757
43758
|
t = _useTranslation.t;
|
|
@@ -43759,13 +43760,7 @@
|
|
|
43759
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, {
|
|
43760
43761
|
backgroundColor: "white",
|
|
43761
43762
|
height: NAVBAR_HEIGHT
|
|
43762
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43763
|
-
logoSrc: logoSrc,
|
|
43764
|
-
brandingLinkHref: brandingLinkHref,
|
|
43765
|
-
brandingLinkTo: brandingLinkTo,
|
|
43766
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43767
|
-
subtext: subtext
|
|
43768
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43763
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43769
43764
|
justifyContent: "space-between",
|
|
43770
43765
|
alignContent: "flex-end",
|
|
43771
43766
|
flexGrow: 1,
|
|
@@ -43782,7 +43777,7 @@
|
|
|
43782
43777
|
themeColorObject: themeColorObject,
|
|
43783
43778
|
"aria-label": t("secondary navigation"),
|
|
43784
43779
|
menuData: menuData.secondaryMenu
|
|
43785
|
-
}),
|
|
43780
|
+
}), showNulogyLogo && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43786
43781
|
pl: "x3"
|
|
43787
43782
|
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogoContainer, {
|
|
43788
43783
|
height: NAVBAR_HEIGHT,
|
|
@@ -43798,19 +43793,36 @@
|
|
|
43798
43793
|
var width = _a.width,
|
|
43799
43794
|
defaultOpen = _a.defaultOpen,
|
|
43800
43795
|
breakpointUpper = _a.breakpointUpper,
|
|
43801
|
-
|
|
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"]);
|
|
43802
43802
|
|
|
43803
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
|
+
});
|
|
43804
43811
|
|
|
43805
43812
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43806
|
-
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));
|
|
43807
43817
|
} else {
|
|
43808
|
-
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43818
|
+
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43809
43819
|
width: currentWidth,
|
|
43810
43820
|
defaultOpen: defaultOpen,
|
|
43811
43821
|
themeColorObject: themeColorObject,
|
|
43812
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43813
|
-
|
|
43822
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43823
|
+
logo: logo,
|
|
43824
|
+
showNulogyLogo: logoSrc
|
|
43825
|
+
}, props));
|
|
43814
43826
|
}
|
|
43815
43827
|
};
|
|
43816
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, {
|
|
@@ -16687,6 +16687,10 @@ BrandingText.defaultProps = {
|
|
|
16687
16687
|
};
|
|
16688
16688
|
|
|
16689
16689
|
var sizes$1 = {
|
|
16690
|
+
small: {
|
|
16691
|
+
height: "24px",
|
|
16692
|
+
width: "28px"
|
|
16693
|
+
},
|
|
16690
16694
|
medium: {
|
|
16691
16695
|
height: "32px",
|
|
16692
16696
|
width: "37px"
|
|
@@ -43534,14 +43538,14 @@ var BaseMobileMenu = function BaseMobileMenu(_a) {
|
|
|
43534
43538
|
closeMenu = _a.closeMenu,
|
|
43535
43539
|
subtext = _a.subtext,
|
|
43536
43540
|
themeColorObject = _a.themeColorObject,
|
|
43537
|
-
|
|
43538
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43541
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43542
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43539
43543
|
|
|
43540
43544
|
return /*#__PURE__*/React__default.createElement(Nav, Object.assign({
|
|
43541
43545
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43542
43546
|
}, props), /*#__PURE__*/React__default.createElement(BrandingWrap, null, /*#__PURE__*/React__default.createElement(BrandingText, {
|
|
43543
43547
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43544
|
-
})), /*#__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, {
|
|
43545
43549
|
textAlign: "center",
|
|
43546
43550
|
borderTop: borderStyle,
|
|
43547
43551
|
height: "40px",
|
|
@@ -43647,16 +43651,15 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43647
43651
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43648
43652
|
closeMenu = _a$menuState.closeMenu,
|
|
43649
43653
|
subtext = _a.subtext,
|
|
43650
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43651
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43652
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43653
43654
|
environment = _a.environment,
|
|
43654
|
-
|
|
43655
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43655
43656
|
_a$breakpointLower = _a.breakpointLower,
|
|
43656
43657
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43657
43658
|
themeColorObject = _a.themeColorObject,
|
|
43658
43659
|
navBarHeight = _a.navBarHeight,
|
|
43659
|
-
|
|
43660
|
+
logo = _a.logo,
|
|
43661
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43662
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43660
43663
|
|
|
43661
43664
|
var navRef = React__default.useRef(null);
|
|
43662
43665
|
useEffect(function () {
|
|
@@ -43668,6 +43671,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43668
43671
|
var _useTheme = useTheme(),
|
|
43669
43672
|
breakpoints = _useTheme.breakpoints;
|
|
43670
43673
|
|
|
43674
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43671
43675
|
return /*#__PURE__*/React__default.createElement(SmallHeader, Object.assign({
|
|
43672
43676
|
ref: navRef,
|
|
43673
43677
|
isOpen: isOpen,
|
|
@@ -43675,12 +43679,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43675
43679
|
}, props), environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43676
43680
|
backgroundColor: "white",
|
|
43677
43681
|
height: navBarHeight
|
|
43678
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43679
|
-
logoSrc: logoSrc,
|
|
43680
|
-
brandingLinkHref: brandingLinkHref,
|
|
43681
|
-
brandingLinkTo: brandingLinkTo,
|
|
43682
|
-
subtext: subtext
|
|
43683
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43682
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43684
43683
|
justifyContent: "flex-end",
|
|
43685
43684
|
ml: "x3",
|
|
43686
43685
|
flexGrow: 1
|
|
@@ -43688,17 +43687,22 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43688
43687
|
maxWidth: "18em",
|
|
43689
43688
|
alignItems: "center",
|
|
43690
43689
|
px: "0"
|
|
43691
|
-
}, /*#__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
43692
|
onClick: toggleMenu,
|
|
43693
|
-
|
|
43693
|
+
ariaExpanded: ariaExpanded,
|
|
43694
|
+
isOpen: isOpen
|
|
43695
|
+
}) : /*#__PURE__*/React__default.createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43696
|
+
onClick: toggleMenu,
|
|
43697
|
+
"aria-expanded": ariaExpanded
|
|
43694
43698
|
}), /*#__PURE__*/React__default.createElement(MenuIcon, {
|
|
43695
43699
|
isOpen: isOpen
|
|
43696
|
-
})))), 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, {
|
|
43697
43701
|
themeColorObject: themeColorObject,
|
|
43698
43702
|
subtext: subtext,
|
|
43699
43703
|
menuData: menuData,
|
|
43700
43704
|
closeMenu: closeMenu,
|
|
43701
|
-
|
|
43705
|
+
showNulogyLogo: showNulogyLogo
|
|
43702
43706
|
})));
|
|
43703
43707
|
};
|
|
43704
43708
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43718,14 +43722,11 @@ var themeColorObject = {
|
|
|
43718
43722
|
|
|
43719
43723
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43720
43724
|
var menuData = _a.menuData,
|
|
43721
|
-
subtext = _a.subtext,
|
|
43722
43725
|
environment = _a.environment,
|
|
43723
|
-
|
|
43724
|
-
|
|
43725
|
-
|
|
43726
|
-
|
|
43727
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43728
|
-
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"]);
|
|
43729
43730
|
|
|
43730
43731
|
var _useTranslation = useTranslation(),
|
|
43731
43732
|
t = _useTranslation.t;
|
|
@@ -43733,13 +43734,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43733
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, {
|
|
43734
43735
|
backgroundColor: "white",
|
|
43735
43736
|
height: NAVBAR_HEIGHT
|
|
43736
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43737
|
-
logoSrc: logoSrc,
|
|
43738
|
-
brandingLinkHref: brandingLinkHref,
|
|
43739
|
-
brandingLinkTo: brandingLinkTo,
|
|
43740
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43741
|
-
subtext: subtext
|
|
43742
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43737
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43743
43738
|
justifyContent: "space-between",
|
|
43744
43739
|
alignContent: "flex-end",
|
|
43745
43740
|
flexGrow: 1,
|
|
@@ -43756,7 +43751,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43756
43751
|
themeColorObject: themeColorObject,
|
|
43757
43752
|
"aria-label": t("secondary navigation"),
|
|
43758
43753
|
menuData: menuData.secondaryMenu
|
|
43759
|
-
}),
|
|
43754
|
+
}), showNulogyLogo && /*#__PURE__*/React__default.createElement(Box, {
|
|
43760
43755
|
pl: "x3"
|
|
43761
43756
|
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
43762
43757
|
height: NAVBAR_HEIGHT,
|
|
@@ -43772,19 +43767,36 @@ var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
|
43772
43767
|
var width = _a.width,
|
|
43773
43768
|
defaultOpen = _a.defaultOpen,
|
|
43774
43769
|
breakpointUpper = _a.breakpointUpper,
|
|
43775
|
-
|
|
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"]);
|
|
43776
43776
|
|
|
43777
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
|
+
});
|
|
43778
43785
|
|
|
43779
43786
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43780
|
-
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));
|
|
43781
43791
|
} else {
|
|
43782
|
-
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43792
|
+
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43783
43793
|
width: currentWidth,
|
|
43784
43794
|
defaultOpen: defaultOpen,
|
|
43785
43795
|
themeColorObject: themeColorObject,
|
|
43786
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43787
|
-
|
|
43796
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43797
|
+
logo: logo,
|
|
43798
|
+
showNulogyLogo: logoSrc
|
|
43799
|
+
}, props));
|
|
43788
43800
|
}
|
|
43789
43801
|
};
|
|
43790
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;
|