@nulogy/components 7.5.0 → 8.1.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 +58 -81
- package/dist/main.module.js +58 -81
- 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/NavBar/NavBarDropdownMenu.d.ts +2 -7
- package/dist/src/NavBar/SmallNavBar.d.ts +2 -7
- package/dist/src/Select/Select.story.d.ts +1 -0
- 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
|
|
|
@@ -23335,7 +23328,6 @@
|
|
|
23335
23328
|
required = _a.required,
|
|
23336
23329
|
requirementText = _a.requirementText,
|
|
23337
23330
|
helpText = _a.helpText,
|
|
23338
|
-
noOptionsMessage = _a.noOptionsMessage,
|
|
23339
23331
|
disabled = _a.disabled,
|
|
23340
23332
|
errorMessage = _a.errorMessage,
|
|
23341
23333
|
errorList = _a.errorList,
|
|
@@ -23344,27 +23336,16 @@
|
|
|
23344
23336
|
id = _a.id,
|
|
23345
23337
|
initialIsOpen = _a.initialIsOpen,
|
|
23346
23338
|
maxHeight = _a.maxHeight,
|
|
23347
|
-
menuPosition = _a.menuPosition,
|
|
23348
23339
|
multiselect = _a.multiselect,
|
|
23349
|
-
name = _a.name,
|
|
23350
23340
|
onChange = _a.onChange,
|
|
23351
23341
|
placeholder = _a.placeholder,
|
|
23352
23342
|
value = _a.value,
|
|
23353
23343
|
defaultValue = _a.defaultValue,
|
|
23354
|
-
className = _a.className,
|
|
23355
|
-
classNamePrefix = _a.classNamePrefix,
|
|
23356
|
-
onBlur = _a.onBlur,
|
|
23357
|
-
menuIsOpen = _a.menuIsOpen,
|
|
23358
|
-
onMenuOpen = _a.onMenuOpen,
|
|
23359
|
-
onMenuClose = _a.onMenuClose,
|
|
23360
|
-
onInputChange = _a.onInputChange,
|
|
23361
23344
|
components = _a.components,
|
|
23362
23345
|
ariaLabel = _a["aria-label"],
|
|
23363
23346
|
_a$windowThreshold = _a.windowThreshold,
|
|
23364
23347
|
windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
|
|
23365
|
-
|
|
23366
|
-
closeMenuOnSelect = _a.closeMenuOnSelect,
|
|
23367
|
-
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "windowThreshold", "filterOption", "closeMenuOnSelect"]);
|
|
23348
|
+
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
|
|
23368
23349
|
|
|
23369
23350
|
var _useTranslation = useTranslation(),
|
|
23370
23351
|
t = _useTranslation.t;
|
|
@@ -23378,14 +23359,9 @@
|
|
|
23378
23359
|
labelText: labelText,
|
|
23379
23360
|
requirementText: requirementText,
|
|
23380
23361
|
helpText: helpText
|
|
23381
|
-
}, /*#__PURE__*/React__default['default'].createElement(WindowedSelect__default['default'], {
|
|
23362
|
+
}, /*#__PURE__*/React__default['default'].createElement(WindowedSelect__default['default'], Object.assign({
|
|
23382
23363
|
ref: ref,
|
|
23383
|
-
className: className,
|
|
23384
|
-
classNamePrefix: classNamePrefix,
|
|
23385
|
-
noOptionsMessage: noOptionsMessage,
|
|
23386
23364
|
placeholder: placeholder || t("select ..."),
|
|
23387
|
-
options: options,
|
|
23388
|
-
labelText: labelText,
|
|
23389
23365
|
windowThreshold: windowThreshold,
|
|
23390
23366
|
styles: customStyles({
|
|
23391
23367
|
theme: themeContext,
|
|
@@ -23399,19 +23375,12 @@
|
|
|
23399
23375
|
"aria-invalid": error,
|
|
23400
23376
|
defaultMenuIsOpen: initialIsOpen,
|
|
23401
23377
|
inputId: id,
|
|
23402
|
-
onBlur: onBlur,
|
|
23403
23378
|
onChange: onChange && function (option) {
|
|
23404
23379
|
return onChange(extractValue(option, multiselect));
|
|
23405
23380
|
},
|
|
23406
23381
|
defaultValue: getReactSelectValue(options, defaultValue),
|
|
23407
23382
|
value: getReactSelectValue(options, value),
|
|
23408
|
-
name: name,
|
|
23409
23383
|
isMulti: multiselect,
|
|
23410
|
-
menuIsOpen: menuIsOpen,
|
|
23411
|
-
onMenuOpen: onMenuOpen,
|
|
23412
|
-
onMenuClose: onMenuClose,
|
|
23413
|
-
menuPosition: menuPosition,
|
|
23414
|
-
onInputChange: onInputChange,
|
|
23415
23384
|
theme: themeContext,
|
|
23416
23385
|
components: Object.assign({
|
|
23417
23386
|
Option: SelectOption,
|
|
@@ -23424,9 +23393,9 @@
|
|
|
23424
23393
|
Input: SelectInput
|
|
23425
23394
|
}, components),
|
|
23426
23395
|
"aria-label": ariaLabel,
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
}), /*#__PURE__*/React__default['default'].createElement(InlineValidation, {
|
|
23396
|
+
options: options,
|
|
23397
|
+
labelText: labelText
|
|
23398
|
+
}, props)), /*#__PURE__*/React__default['default'].createElement(InlineValidation, {
|
|
23430
23399
|
mt: "x1",
|
|
23431
23400
|
errorMessage: errorMessage,
|
|
23432
23401
|
errorList: errorList
|
|
@@ -43571,14 +43540,14 @@
|
|
|
43571
43540
|
closeMenu = _a.closeMenu,
|
|
43572
43541
|
subtext = _a.subtext,
|
|
43573
43542
|
themeColorObject = _a.themeColorObject,
|
|
43574
|
-
|
|
43575
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43543
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43544
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43576
43545
|
|
|
43577
43546
|
return /*#__PURE__*/React__default['default'].createElement(Nav, Object.assign({
|
|
43578
43547
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43579
43548
|
}, props), /*#__PURE__*/React__default['default'].createElement(BrandingWrap, null, /*#__PURE__*/React__default['default'].createElement(BrandingText, {
|
|
43580
43549
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43581
|
-
})), /*#__PURE__*/React__default['default'].createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)),
|
|
43550
|
+
})), /*#__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, {
|
|
43582
43551
|
textAlign: "center",
|
|
43583
43552
|
borderTop: borderStyle,
|
|
43584
43553
|
height: "40px",
|
|
@@ -43625,7 +43594,7 @@
|
|
|
43625
43594
|
color: theme.colors[color] || color,
|
|
43626
43595
|
background: "none",
|
|
43627
43596
|
border: "none",
|
|
43628
|
-
padding:
|
|
43597
|
+
padding: theme.space.x1,
|
|
43629
43598
|
marginLeft: theme.space.x1,
|
|
43630
43599
|
borderRadius: theme.radii.medium,
|
|
43631
43600
|
transition: ".2s",
|
|
@@ -43684,16 +43653,15 @@
|
|
|
43684
43653
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43685
43654
|
closeMenu = _a$menuState.closeMenu,
|
|
43686
43655
|
subtext = _a.subtext,
|
|
43687
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43688
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43689
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43690
43656
|
environment = _a.environment,
|
|
43691
|
-
|
|
43657
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43692
43658
|
_a$breakpointLower = _a.breakpointLower,
|
|
43693
43659
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43694
43660
|
themeColorObject = _a.themeColorObject,
|
|
43695
43661
|
navBarHeight = _a.navBarHeight,
|
|
43696
|
-
|
|
43662
|
+
logo = _a.logo,
|
|
43663
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43664
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43697
43665
|
|
|
43698
43666
|
var navRef = React__default['default'].useRef(null);
|
|
43699
43667
|
React.useEffect(function () {
|
|
@@ -43705,6 +43673,7 @@
|
|
|
43705
43673
|
var _useTheme = styled.useTheme(),
|
|
43706
43674
|
breakpoints = _useTheme.breakpoints;
|
|
43707
43675
|
|
|
43676
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43708
43677
|
return /*#__PURE__*/React__default['default'].createElement(SmallHeader, Object.assign({
|
|
43709
43678
|
ref: navRef,
|
|
43710
43679
|
isOpen: isOpen,
|
|
@@ -43712,12 +43681,7 @@
|
|
|
43712
43681
|
}, props), environment && /*#__PURE__*/React__default['default'].createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default['default'].createElement(NavBarBackground, {
|
|
43713
43682
|
backgroundColor: "white",
|
|
43714
43683
|
height: navBarHeight
|
|
43715
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43716
|
-
logoSrc: logoSrc,
|
|
43717
|
-
brandingLinkHref: brandingLinkHref,
|
|
43718
|
-
brandingLinkTo: brandingLinkTo,
|
|
43719
|
-
subtext: subtext
|
|
43720
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43684
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43721
43685
|
justifyContent: "flex-end",
|
|
43722
43686
|
ml: "x3",
|
|
43723
43687
|
flexGrow: 1
|
|
@@ -43725,17 +43689,22 @@
|
|
|
43725
43689
|
maxWidth: "18em",
|
|
43726
43690
|
alignItems: "center",
|
|
43727
43691
|
px: "0"
|
|
43728
|
-
}, /*#__PURE__*/React__default['default'].createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) &&
|
|
43692
|
+
}, /*#__PURE__*/React__default['default'].createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) && (renderMenuButton ? renderMenuButton({
|
|
43693
|
+
themeColorObject: themeColorObject,
|
|
43694
|
+
onClick: toggleMenu,
|
|
43695
|
+
ariaExpanded: ariaExpanded,
|
|
43696
|
+
isOpen: isOpen
|
|
43697
|
+
}) : /*#__PURE__*/React__default['default'].createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43729
43698
|
onClick: toggleMenu,
|
|
43730
|
-
"aria-expanded":
|
|
43699
|
+
"aria-expanded": ariaExpanded
|
|
43731
43700
|
}), /*#__PURE__*/React__default['default'].createElement(MenuIcon, {
|
|
43732
43701
|
isOpen: isOpen
|
|
43733
|
-
})))), isOpen && /*#__PURE__*/React__default['default'].createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default['default'].createElement(MobileMenu, {
|
|
43702
|
+
}))))), isOpen && /*#__PURE__*/React__default['default'].createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default['default'].createElement(MobileMenu, {
|
|
43734
43703
|
themeColorObject: themeColorObject,
|
|
43735
43704
|
subtext: subtext,
|
|
43736
43705
|
menuData: menuData,
|
|
43737
43706
|
closeMenu: closeMenu,
|
|
43738
|
-
|
|
43707
|
+
showNulogyLogo: showNulogyLogo
|
|
43739
43708
|
})));
|
|
43740
43709
|
};
|
|
43741
43710
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43755,14 +43724,11 @@
|
|
|
43755
43724
|
|
|
43756
43725
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43757
43726
|
var menuData = _a.menuData,
|
|
43758
|
-
subtext = _a.subtext,
|
|
43759
43727
|
environment = _a.environment,
|
|
43760
|
-
|
|
43761
|
-
|
|
43762
|
-
|
|
43763
|
-
|
|
43764
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43765
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43728
|
+
logo = _a.logo,
|
|
43729
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43730
|
+
subtext = _a.subtext,
|
|
43731
|
+
props = __rest(_a, ["menuData", "environment", "logo", "showNulogyLogo", "subtext"]);
|
|
43766
43732
|
|
|
43767
43733
|
var _useTranslation = useTranslation(),
|
|
43768
43734
|
t = _useTranslation.t;
|
|
@@ -43770,13 +43736,7 @@
|
|
|
43770
43736
|
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, {
|
|
43771
43737
|
backgroundColor: "white",
|
|
43772
43738
|
height: NAVBAR_HEIGHT
|
|
43773
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
43774
|
-
logoSrc: logoSrc,
|
|
43775
|
-
brandingLinkHref: brandingLinkHref,
|
|
43776
|
-
brandingLinkTo: brandingLinkTo,
|
|
43777
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43778
|
-
subtext: subtext
|
|
43779
|
-
}), /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43739
|
+
}, logo, /*#__PURE__*/React__default['default'].createElement(Flex, {
|
|
43780
43740
|
justifyContent: "space-between",
|
|
43781
43741
|
alignContent: "flex-end",
|
|
43782
43742
|
flexGrow: 1,
|
|
@@ -43793,7 +43753,7 @@
|
|
|
43793
43753
|
themeColorObject: themeColorObject,
|
|
43794
43754
|
"aria-label": t("secondary navigation"),
|
|
43795
43755
|
menuData: menuData.secondaryMenu
|
|
43796
|
-
}),
|
|
43756
|
+
}), showNulogyLogo && /*#__PURE__*/React__default['default'].createElement(Box, {
|
|
43797
43757
|
pl: "x3"
|
|
43798
43758
|
}, /*#__PURE__*/React__default['default'].createElement(NulogyLogoContainer, {
|
|
43799
43759
|
height: NAVBAR_HEIGHT,
|
|
@@ -43809,19 +43769,36 @@
|
|
|
43809
43769
|
var width = _a.width,
|
|
43810
43770
|
defaultOpen = _a.defaultOpen,
|
|
43811
43771
|
breakpointUpper = _a.breakpointUpper,
|
|
43812
|
-
|
|
43772
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43773
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43774
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43775
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43776
|
+
logoSrc = _a.logoSrc,
|
|
43777
|
+
props = __rest(_a, ["width", "defaultOpen", "breakpointUpper", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent", "logoSrc"]);
|
|
43813
43778
|
|
|
43814
43779
|
var currentWidth = width || typeof window !== "undefined" && window.innerWidth;
|
|
43780
|
+
var logo = /*#__PURE__*/React__default['default'].createElement(BrandLogoContainer, {
|
|
43781
|
+
logoSrc: logoSrc,
|
|
43782
|
+
brandingLinkHref: brandingLinkHref,
|
|
43783
|
+
brandingLinkTo: brandingLinkTo,
|
|
43784
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43785
|
+
subtext: props.subtext
|
|
43786
|
+
});
|
|
43815
43787
|
|
|
43816
43788
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43817
|
-
return /*#__PURE__*/React__default['default'].createElement(MediumNavBar, Object.assign({
|
|
43789
|
+
return /*#__PURE__*/React__default['default'].createElement(MediumNavBar, Object.assign({
|
|
43790
|
+
logo: logo,
|
|
43791
|
+
showNulogyLogo: logoSrc
|
|
43792
|
+
}, props));
|
|
43818
43793
|
} else {
|
|
43819
|
-
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43794
|
+
return /*#__PURE__*/React__default['default'].createElement(SmallNavBar, Object.assign({
|
|
43820
43795
|
width: currentWidth,
|
|
43821
43796
|
defaultOpen: defaultOpen,
|
|
43822
43797
|
themeColorObject: themeColorObject,
|
|
43823
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43824
|
-
|
|
43798
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43799
|
+
logo: logo,
|
|
43800
|
+
showNulogyLogo: logoSrc
|
|
43801
|
+
}, props));
|
|
43825
43802
|
}
|
|
43826
43803
|
};
|
|
43827
43804
|
|
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
|
|
|
@@ -23309,7 +23302,6 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23309
23302
|
required = _a.required,
|
|
23310
23303
|
requirementText = _a.requirementText,
|
|
23311
23304
|
helpText = _a.helpText,
|
|
23312
|
-
noOptionsMessage = _a.noOptionsMessage,
|
|
23313
23305
|
disabled = _a.disabled,
|
|
23314
23306
|
errorMessage = _a.errorMessage,
|
|
23315
23307
|
errorList = _a.errorList,
|
|
@@ -23318,27 +23310,16 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23318
23310
|
id = _a.id,
|
|
23319
23311
|
initialIsOpen = _a.initialIsOpen,
|
|
23320
23312
|
maxHeight = _a.maxHeight,
|
|
23321
|
-
menuPosition = _a.menuPosition,
|
|
23322
23313
|
multiselect = _a.multiselect,
|
|
23323
|
-
name = _a.name,
|
|
23324
23314
|
onChange = _a.onChange,
|
|
23325
23315
|
placeholder = _a.placeholder,
|
|
23326
23316
|
value = _a.value,
|
|
23327
23317
|
defaultValue = _a.defaultValue,
|
|
23328
|
-
className = _a.className,
|
|
23329
|
-
classNamePrefix = _a.classNamePrefix,
|
|
23330
|
-
onBlur = _a.onBlur,
|
|
23331
|
-
menuIsOpen = _a.menuIsOpen,
|
|
23332
|
-
onMenuOpen = _a.onMenuOpen,
|
|
23333
|
-
onMenuClose = _a.onMenuClose,
|
|
23334
|
-
onInputChange = _a.onInputChange,
|
|
23335
23318
|
components = _a.components,
|
|
23336
23319
|
ariaLabel = _a["aria-label"],
|
|
23337
23320
|
_a$windowThreshold = _a.windowThreshold,
|
|
23338
23321
|
windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
|
|
23339
|
-
|
|
23340
|
-
closeMenuOnSelect = _a.closeMenuOnSelect,
|
|
23341
|
-
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "noOptionsMessage", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "menuPosition", "multiselect", "name", "onChange", "placeholder", "value", "defaultValue", "className", "classNamePrefix", "onBlur", "menuIsOpen", "onMenuOpen", "onMenuClose", "onInputChange", "components", "aria-label", "windowThreshold", "filterOption", "closeMenuOnSelect"]);
|
|
23322
|
+
props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
|
|
23342
23323
|
|
|
23343
23324
|
var _useTranslation = useTranslation(),
|
|
23344
23325
|
t = _useTranslation.t;
|
|
@@ -23352,14 +23333,9 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23352
23333
|
labelText: labelText,
|
|
23353
23334
|
requirementText: requirementText,
|
|
23354
23335
|
helpText: helpText
|
|
23355
|
-
}, /*#__PURE__*/React__default.createElement(WindowedSelect, {
|
|
23336
|
+
}, /*#__PURE__*/React__default.createElement(WindowedSelect, Object.assign({
|
|
23356
23337
|
ref: ref,
|
|
23357
|
-
className: className,
|
|
23358
|
-
classNamePrefix: classNamePrefix,
|
|
23359
|
-
noOptionsMessage: noOptionsMessage,
|
|
23360
23338
|
placeholder: placeholder || t("select ..."),
|
|
23361
|
-
options: options,
|
|
23362
|
-
labelText: labelText,
|
|
23363
23339
|
windowThreshold: windowThreshold,
|
|
23364
23340
|
styles: customStyles({
|
|
23365
23341
|
theme: themeContext,
|
|
@@ -23373,19 +23349,12 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23373
23349
|
"aria-invalid": error,
|
|
23374
23350
|
defaultMenuIsOpen: initialIsOpen,
|
|
23375
23351
|
inputId: id,
|
|
23376
|
-
onBlur: onBlur,
|
|
23377
23352
|
onChange: onChange && function (option) {
|
|
23378
23353
|
return onChange(extractValue(option, multiselect));
|
|
23379
23354
|
},
|
|
23380
23355
|
defaultValue: getReactSelectValue(options, defaultValue),
|
|
23381
23356
|
value: getReactSelectValue(options, value),
|
|
23382
|
-
name: name,
|
|
23383
23357
|
isMulti: multiselect,
|
|
23384
|
-
menuIsOpen: menuIsOpen,
|
|
23385
|
-
onMenuOpen: onMenuOpen,
|
|
23386
|
-
onMenuClose: onMenuClose,
|
|
23387
|
-
menuPosition: menuPosition,
|
|
23388
|
-
onInputChange: onInputChange,
|
|
23389
23358
|
theme: themeContext,
|
|
23390
23359
|
components: Object.assign({
|
|
23391
23360
|
Option: SelectOption,
|
|
@@ -23398,9 +23367,9 @@ var ReactSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
23398
23367
|
Input: SelectInput
|
|
23399
23368
|
}, components),
|
|
23400
23369
|
"aria-label": ariaLabel,
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
}), /*#__PURE__*/React__default.createElement(InlineValidation, {
|
|
23370
|
+
options: options,
|
|
23371
|
+
labelText: labelText
|
|
23372
|
+
}, props)), /*#__PURE__*/React__default.createElement(InlineValidation, {
|
|
23404
23373
|
mt: "x1",
|
|
23405
23374
|
errorMessage: errorMessage,
|
|
23406
23375
|
errorList: errorList
|
|
@@ -43545,14 +43514,14 @@ var BaseMobileMenu = function BaseMobileMenu(_a) {
|
|
|
43545
43514
|
closeMenu = _a.closeMenu,
|
|
43546
43515
|
subtext = _a.subtext,
|
|
43547
43516
|
themeColorObject = _a.themeColorObject,
|
|
43548
|
-
|
|
43549
|
-
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "
|
|
43517
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43518
|
+
props = __rest(_a, ["menuData", "closeMenu", "subtext", "themeColorObject", "showNulogyLogo"]);
|
|
43550
43519
|
|
|
43551
43520
|
return /*#__PURE__*/React__default.createElement(Nav, Object.assign({
|
|
43552
43521
|
backgroundColor: themeColorObject && themeColorObject.background
|
|
43553
43522
|
}, props), /*#__PURE__*/React__default.createElement(BrandingWrap, null, /*#__PURE__*/React__default.createElement(BrandingText, {
|
|
43554
43523
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
43555
|
-
})), /*#__PURE__*/React__default.createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)),
|
|
43524
|
+
})), /*#__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, {
|
|
43556
43525
|
textAlign: "center",
|
|
43557
43526
|
borderTop: borderStyle,
|
|
43558
43527
|
height: "40px",
|
|
@@ -43599,7 +43568,7 @@ var MobileMenuTrigger = styled.button.withConfig({
|
|
|
43599
43568
|
color: theme.colors[color] || color,
|
|
43600
43569
|
background: "none",
|
|
43601
43570
|
border: "none",
|
|
43602
|
-
padding:
|
|
43571
|
+
padding: theme.space.x1,
|
|
43603
43572
|
marginLeft: theme.space.x1,
|
|
43604
43573
|
borderRadius: theme.radii.medium,
|
|
43605
43574
|
transition: ".2s",
|
|
@@ -43658,16 +43627,15 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43658
43627
|
toggleMenu = _a$menuState.toggleMenu,
|
|
43659
43628
|
closeMenu = _a$menuState.closeMenu,
|
|
43660
43629
|
subtext = _a.subtext,
|
|
43661
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43662
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43663
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
43664
43630
|
environment = _a.environment,
|
|
43665
|
-
|
|
43631
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43666
43632
|
_a$breakpointLower = _a.breakpointLower,
|
|
43667
43633
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
43668
43634
|
themeColorObject = _a.themeColorObject,
|
|
43669
43635
|
navBarHeight = _a.navBarHeight,
|
|
43670
|
-
|
|
43636
|
+
logo = _a.logo,
|
|
43637
|
+
renderMenuButton = _a.renderMenuButton,
|
|
43638
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "environment", "showNulogyLogo", "breakpointLower", "themeColorObject", "navBarHeight", "logo", "renderMenuButton"]);
|
|
43671
43639
|
|
|
43672
43640
|
var navRef = React__default.useRef(null);
|
|
43673
43641
|
useEffect(function () {
|
|
@@ -43679,6 +43647,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43679
43647
|
var _useTheme = useTheme(),
|
|
43680
43648
|
breakpoints = _useTheme.breakpoints;
|
|
43681
43649
|
|
|
43650
|
+
var ariaExpanded = isOpen ? true : null;
|
|
43682
43651
|
return /*#__PURE__*/React__default.createElement(SmallHeader, Object.assign({
|
|
43683
43652
|
ref: navRef,
|
|
43684
43653
|
isOpen: isOpen,
|
|
@@ -43686,12 +43655,7 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43686
43655
|
}, props), environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43687
43656
|
backgroundColor: "white",
|
|
43688
43657
|
height: navBarHeight
|
|
43689
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43690
|
-
logoSrc: logoSrc,
|
|
43691
|
-
brandingLinkHref: brandingLinkHref,
|
|
43692
|
-
brandingLinkTo: brandingLinkTo,
|
|
43693
|
-
subtext: subtext
|
|
43694
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43658
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43695
43659
|
justifyContent: "flex-end",
|
|
43696
43660
|
ml: "x3",
|
|
43697
43661
|
flexGrow: 1
|
|
@@ -43699,17 +43663,22 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
43699
43663
|
maxWidth: "18em",
|
|
43700
43664
|
alignItems: "center",
|
|
43701
43665
|
px: "0"
|
|
43702
|
-
}, /*#__PURE__*/React__default.createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) &&
|
|
43666
|
+
}, /*#__PURE__*/React__default.createElement(NavBarSearch, Object.assign({}, menuData.search))), (menuData.primaryMenu || menuData.secondaryMenu) && (renderMenuButton ? renderMenuButton({
|
|
43667
|
+
themeColorObject: themeColorObject,
|
|
43668
|
+
onClick: toggleMenu,
|
|
43669
|
+
ariaExpanded: ariaExpanded,
|
|
43670
|
+
isOpen: isOpen
|
|
43671
|
+
}) : /*#__PURE__*/React__default.createElement(MobileMenuTrigger, Object.assign({}, themeColorObject, {
|
|
43703
43672
|
onClick: toggleMenu,
|
|
43704
|
-
"aria-expanded":
|
|
43673
|
+
"aria-expanded": ariaExpanded
|
|
43705
43674
|
}), /*#__PURE__*/React__default.createElement(MenuIcon, {
|
|
43706
43675
|
isOpen: isOpen
|
|
43707
|
-
})))), isOpen && /*#__PURE__*/React__default.createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default.createElement(MobileMenu, {
|
|
43676
|
+
}))))), isOpen && /*#__PURE__*/React__default.createElement(PreventBodyElementScrolling, null, /*#__PURE__*/React__default.createElement(MobileMenu, {
|
|
43708
43677
|
themeColorObject: themeColorObject,
|
|
43709
43678
|
subtext: subtext,
|
|
43710
43679
|
menuData: menuData,
|
|
43711
43680
|
closeMenu: closeMenu,
|
|
43712
|
-
|
|
43681
|
+
showNulogyLogo: showNulogyLogo
|
|
43713
43682
|
})));
|
|
43714
43683
|
};
|
|
43715
43684
|
/* eslint-enable react/destructuring-assignment */
|
|
@@ -43729,14 +43698,11 @@ var themeColorObject = {
|
|
|
43729
43698
|
|
|
43730
43699
|
var MediumNavBar = function MediumNavBar(_a) {
|
|
43731
43700
|
var menuData = _a.menuData,
|
|
43732
|
-
subtext = _a.subtext,
|
|
43733
43701
|
environment = _a.environment,
|
|
43734
|
-
|
|
43735
|
-
|
|
43736
|
-
|
|
43737
|
-
|
|
43738
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43739
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43702
|
+
logo = _a.logo,
|
|
43703
|
+
showNulogyLogo = _a.showNulogyLogo,
|
|
43704
|
+
subtext = _a.subtext,
|
|
43705
|
+
props = __rest(_a, ["menuData", "environment", "logo", "showNulogyLogo", "subtext"]);
|
|
43740
43706
|
|
|
43741
43707
|
var _useTranslation = useTranslation(),
|
|
43742
43708
|
t = _useTranslation.t;
|
|
@@ -43744,13 +43710,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43744
43710
|
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, {
|
|
43745
43711
|
backgroundColor: "white",
|
|
43746
43712
|
height: NAVBAR_HEIGHT
|
|
43747
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
43748
|
-
logoSrc: logoSrc,
|
|
43749
|
-
brandingLinkHref: brandingLinkHref,
|
|
43750
|
-
brandingLinkTo: brandingLinkTo,
|
|
43751
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
43752
|
-
subtext: subtext
|
|
43753
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43713
|
+
}, logo, /*#__PURE__*/React__default.createElement(Flex, {
|
|
43754
43714
|
justifyContent: "space-between",
|
|
43755
43715
|
alignContent: "flex-end",
|
|
43756
43716
|
flexGrow: 1,
|
|
@@ -43767,7 +43727,7 @@ var MediumNavBar = function MediumNavBar(_a) {
|
|
|
43767
43727
|
themeColorObject: themeColorObject,
|
|
43768
43728
|
"aria-label": t("secondary navigation"),
|
|
43769
43729
|
menuData: menuData.secondaryMenu
|
|
43770
|
-
}),
|
|
43730
|
+
}), showNulogyLogo && /*#__PURE__*/React__default.createElement(Box, {
|
|
43771
43731
|
pl: "x3"
|
|
43772
43732
|
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
43773
43733
|
height: NAVBAR_HEIGHT,
|
|
@@ -43783,19 +43743,36 @@ var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
|
43783
43743
|
var width = _a.width,
|
|
43784
43744
|
defaultOpen = _a.defaultOpen,
|
|
43785
43745
|
breakpointUpper = _a.breakpointUpper,
|
|
43786
|
-
|
|
43746
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43747
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43748
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43749
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43750
|
+
logoSrc = _a.logoSrc,
|
|
43751
|
+
props = __rest(_a, ["width", "defaultOpen", "breakpointUpper", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent", "logoSrc"]);
|
|
43787
43752
|
|
|
43788
43753
|
var currentWidth = width || typeof window !== "undefined" && window.innerWidth;
|
|
43754
|
+
var logo = /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
43755
|
+
logoSrc: logoSrc,
|
|
43756
|
+
brandingLinkHref: brandingLinkHref,
|
|
43757
|
+
brandingLinkTo: brandingLinkTo,
|
|
43758
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43759
|
+
subtext: props.subtext
|
|
43760
|
+
});
|
|
43789
43761
|
|
|
43790
43762
|
if (currentWidth >= pixelDigitsFrom(breakpointUpper)) {
|
|
43791
|
-
return /*#__PURE__*/React__default.createElement(MediumNavBar, Object.assign({
|
|
43763
|
+
return /*#__PURE__*/React__default.createElement(MediumNavBar, Object.assign({
|
|
43764
|
+
logo: logo,
|
|
43765
|
+
showNulogyLogo: logoSrc
|
|
43766
|
+
}, props));
|
|
43792
43767
|
} else {
|
|
43793
|
-
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43768
|
+
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({
|
|
43794
43769
|
width: currentWidth,
|
|
43795
43770
|
defaultOpen: defaultOpen,
|
|
43796
43771
|
themeColorObject: themeColorObject,
|
|
43797
|
-
navBarHeight: NAVBAR_HEIGHT
|
|
43798
|
-
|
|
43772
|
+
navBarHeight: NAVBAR_HEIGHT,
|
|
43773
|
+
logo: logo,
|
|
43774
|
+
showNulogyLogo: logoSrc
|
|
43775
|
+
}, props));
|
|
43799
43776
|
}
|
|
43800
43777
|
};
|
|
43801
43778
|
|
|
@@ -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;
|