@nulogy/components 15.4.0 → 16.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.
Files changed (141) hide show
  1. package/dist/main.js +1016 -1905
  2. package/dist/main.js.map +1 -1
  3. package/dist/main.module.js +804 -1692
  4. package/dist/main.module.js.map +1 -1
  5. package/dist/src/Alert/Alert.js +1 -1
  6. package/dist/src/AppTag/AppTag.js +1 -1
  7. package/dist/src/AppTag/components/LogoWrapper.js +1 -1
  8. package/dist/src/BottomSheet/BottomSheet.styled.js +2 -2
  9. package/dist/src/Box/Box.js +1 -1
  10. package/dist/src/Box/Box.story.js +1 -1
  11. package/dist/src/BrandedNavBar/DesktopMenu.js +1 -1
  12. package/dist/src/BrandedNavBar/MenuTrigger.js +1 -3
  13. package/dist/src/BrandedNavBar/MenuTriggerButton.js +1 -1
  14. package/dist/src/BrandedNavBar/MobileMenu.d.ts +1 -1
  15. package/dist/src/BrandedNavBar/MobileMenu.js +1 -3
  16. package/dist/src/BrandedNavBar/NavBar.js +1 -1
  17. package/dist/src/BrandedNavBar/NavBar.story.js +1 -1
  18. package/dist/src/BrandedNavBar/NavBarBackground.js +1 -1
  19. package/dist/src/BrandedNavBar/NavBarDropdownMenu.js +26 -23
  20. package/dist/src/BrandedNavBar/SmallNavBar.js +1 -3
  21. package/dist/src/BrandedNavBar/SmallNavBar.story.js +1 -1
  22. package/dist/src/BrandedNavBar/SubMenuTrigger.js +1 -1
  23. package/dist/src/BrandedNavBar/SubMenuTriggerButton.js +1 -1
  24. package/dist/src/BrandedNavBar/renderSubMenuItems.js +1 -1
  25. package/dist/src/Branding/Branding.js +1 -1
  26. package/dist/src/Branding/BrandingText.js +1 -1
  27. package/dist/src/Breadcrumbs/BreadcrumbsList.js +1 -1
  28. package/dist/src/Breadcrumbs/BreadcrumbsListItem.js +1 -1
  29. package/dist/src/Button/Button.js +1 -1
  30. package/dist/src/Button/CloseButton.js +1 -1
  31. package/dist/src/Button/ControlIcon.js +1 -1
  32. package/dist/src/Button/DangerButton.js +1 -1
  33. package/dist/src/Button/IconicButton.js +1 -1
  34. package/dist/src/Button/PrimaryButton.js +1 -1
  35. package/dist/src/Button/QuietButton.js +1 -1
  36. package/dist/src/ButtonGroup/ButtonGroup.js +1 -1
  37. package/dist/src/Card/CardSet.js +1 -1
  38. package/dist/src/Checkbox/Checkbox.js +1 -1
  39. package/dist/src/Checkbox/CheckboxGroup.js +1 -1
  40. package/dist/src/DateRange/EndTime.js +1 -1
  41. package/dist/src/DateRange/StartTime.js +1 -1
  42. package/dist/src/Decorations/index.js +1 -1
  43. package/dist/src/DescriptionList/DescriptionList.parts.js +1 -1
  44. package/dist/src/DescriptionList/stories/fixtures.js +1 -1
  45. package/dist/src/Divider/Divider.js +1 -1
  46. package/dist/src/DropdownMenu/DropdownButton.js +1 -1
  47. package/dist/src/DropdownMenu/DropdownItem.js +1 -1
  48. package/dist/src/DropdownMenu/DropdownLink.js +1 -1
  49. package/dist/src/DropdownMenu/DropdownMenu.story.js +8 -4
  50. package/dist/src/DropdownMenu/DropdownMenuContainer.js +1 -1
  51. package/dist/src/DropdownMenu/DropdownText.js +1 -1
  52. package/dist/src/FieldLabel/HelpText.js +1 -1
  53. package/dist/src/FieldLabel/Label.js +1 -1
  54. package/dist/src/FieldLabel/LabelText.js +1 -1
  55. package/dist/src/Flex/Flex.js +1 -1
  56. package/dist/src/Flex/Flex.story.js +1 -1
  57. package/dist/src/Form/Field.js +1 -1
  58. package/dist/src/Form/Fieldset.js +1 -1
  59. package/dist/src/Form/Form.js +1 -1
  60. package/dist/src/Form/FormSection.js +1 -1
  61. package/dist/src/Icon/Icon.js +1 -1
  62. package/dist/src/Input/InputField.js +1 -1
  63. package/dist/src/Link/Link.js +1 -1
  64. package/dist/src/List/List.js +1 -1
  65. package/dist/src/List/ListItem.js +1 -1
  66. package/dist/src/MiniTooltip/index.js +1 -1
  67. package/dist/src/Modal/Modal.js +1 -1
  68. package/dist/src/Modal/ModalCloseButton.js +1 -1
  69. package/dist/src/Modal/ModalContent.js +1 -1
  70. package/dist/src/Modal/ModalFooter.js +1 -1
  71. package/dist/src/Modal/ModalHeader.js +1 -1
  72. package/dist/src/NDSProvider/GlobalStyles.js +1 -1
  73. package/dist/src/NavBarSearch/NavBarSearch.js +1 -1
  74. package/dist/src/Navigation/components/AppSwitcher/parts/index.js +1 -1
  75. package/dist/src/Navigation/components/DesktopNav/parts/MoreMenuItem.js +1 -1
  76. package/dist/src/Navigation/components/MenuSubItem/parts/styled.js +1 -1
  77. package/dist/src/Navigation/components/MobileNav/parts/styled.js +1 -1
  78. package/dist/src/Navigation/components/UserMenu/UserMenu.js +1 -1
  79. package/dist/src/Navigation/components/UserMenu/parts/Header.js +1 -1
  80. package/dist/src/Navigation/components/UserMenu/parts/styled.js +1 -1
  81. package/dist/src/Navigation/components/shared/NavigationLogo.js +1 -1
  82. package/dist/src/Navigation/components/shared/NavigationLogoLink.js +1 -1
  83. package/dist/src/Navigation/components/shared/NavigationMenuContent.js +1 -1
  84. package/dist/src/Navigation/components/shared/NavigationMenuItem.js +6 -2
  85. package/dist/src/Navigation/components/shared/components.js +1 -1
  86. package/dist/src/Overlay/Overlay.js +1 -1
  87. package/dist/src/Pagination/PageNumber.js +1 -1
  88. package/dist/src/Pagination/PaginationButton.js +1 -1
  89. package/dist/src/Popper/Popper.js +0 -1
  90. package/dist/src/Primitives/index.js +1 -1
  91. package/dist/src/Radio/Radio.js +1 -1
  92. package/dist/src/RangeContainer/RangeContainer.js +1 -3
  93. package/dist/src/Select/Select.story.fixture.js +1 -1
  94. package/dist/src/Select/SelectOption.js +1 -1
  95. package/dist/src/StatusIndicator/StatusIndicator.js +1 -1
  96. package/dist/src/Summary/Summary.js +1 -1
  97. package/dist/src/Summary/SummaryDivider.js +1 -1
  98. package/dist/src/Summary/SummaryItem.js +1 -1
  99. package/dist/src/Switcher/Switch.js +1 -1
  100. package/dist/src/Table/BaseTable.js +1 -1
  101. package/dist/src/Table/StyledTh.js +1 -1
  102. package/dist/src/Table/TableBody.js +1 -1
  103. package/dist/src/Table/TableCell.js +1 -1
  104. package/dist/src/Table/TableFoot.js +1 -1
  105. package/dist/src/Table/TableHead.js +1 -1
  106. package/dist/src/Tabs/Tab.js +1 -1
  107. package/dist/src/Tabs/TabContainer.js +1 -1
  108. package/dist/src/Tabs/TabScrollIndicator.js +1 -1
  109. package/dist/src/Tabs/TabScrollIndicators.js +1 -1
  110. package/dist/src/Tabs/Tabs.story.d.ts +0 -1
  111. package/dist/src/Tabs/Tabs.story.js +0 -5
  112. package/dist/src/Textarea/StyledTextarea.js +1 -1
  113. package/dist/src/TimePicker/TimePickerDropdown.js +1 -1
  114. package/dist/src/TimePicker/TimePickerInput.js +1 -1
  115. package/dist/src/TimePicker/TimePickerOption.js +1 -1
  116. package/dist/src/TimeRange/TimeRange.d.ts +7 -3
  117. package/dist/src/TimeRange/TimeRange.js +2 -2
  118. package/dist/src/Toast/Toast.js +1 -3
  119. package/dist/src/Toast/Toast.story.js +0 -2
  120. package/dist/src/Toggle/Toggle.js +0 -2
  121. package/dist/src/Toggle/ToggleButton.js +1 -1
  122. package/dist/src/Tooltip/TooltipContainer.js +1 -1
  123. package/dist/src/Tooltip/components/TooltipComponents.js +1 -1
  124. package/dist/src/TopBar/TopBar.styled.js +1 -1
  125. package/dist/src/Type/Headings.js +1 -1
  126. package/dist/src/Type/Text.js +1 -1
  127. package/dist/src/Validation/InlineValidation.js +1 -1
  128. package/dist/src/VerticalDivider/VerticalDivider.js +1 -1
  129. package/dist/src/i18n.js +0 -2
  130. package/dist/src/utils/ClickInputLabel.js +1 -1
  131. package/dist/src/utils/PopperArrow.js +4 -4
  132. package/dist/src/utils/ScrollIndicators.js +1 -1
  133. package/dist/src/utils/noop.js +1 -3
  134. package/dist/src/utils/story/code.js +1 -1
  135. package/dist/src/utils/story/dashed.js +1 -1
  136. package/dist/src/utils/story/placeholder.js +1 -1
  137. package/dist/src/utils/story/resizable.js +1 -1
  138. package/dist/src/utils/ts/FocusManager.d.ts +2 -2
  139. package/dist/src/utils/useScrollLock.js +0 -1
  140. package/dist/vite.config.js +11 -1
  141. package/package.json +20 -7
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { useComponentVariant } from "../NDSProvider/ComponentVariantContext";
4
4
  import { Box } from "../Box";
5
5
  import { Icon } from "../Icon";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { Text } from "../Type";
4
4
  import { APP_ABBREVIATIONS, APP_DISPLAY_NAMES } from "../types/NulogyApp";
5
5
  import { MiniTooltip } from "../MiniTooltip";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { appTagColors } from "../constants";
3
3
  export const LogoWrapper = styled.span(({ theme, $type }) => {
4
4
  const color = theme.colors[appTagColors[$type].primary];
@@ -1,7 +1,7 @@
1
1
  import { DialogContent as ReachDialogContent, DialogOverlay as ReachDialogOverlay, } from "@reach/dialog";
2
2
  import { motion } from "framer-motion";
3
3
  import { transparentize } from "polished";
4
- import styled from "styled-components";
4
+ import { styled } from "styled-components";
5
5
  import { compose, height, layout, maxHeight, maxWidth, space, width } from "styled-system";
6
6
  import { Heading2, Text } from "../Type";
7
7
  import { excludeStyledProps } from "../StyledProps";
@@ -44,7 +44,7 @@ const Sheet = styled(motion(ReachDialogContent)).withConfig({
44
44
  background: "white",
45
45
  boxShadow: theme.shadows.large,
46
46
  }), compose(...styleFns));
47
- const ContentContainer = styled.div((_) => ({
47
+ const ContentContainer = styled.div(() => ({
48
48
  overflowY: "auto",
49
49
  flex: 1,
50
50
  WebkitOverflowScrolling: "touch",
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { motion } from "framer-motion";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const Box = styled.div(addStyledProps);
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { Button } from "../Button";
4
4
  import { Box, Flex } from "../index";
5
5
  import { AnimatedBox } from "./Box";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { Icon } from "../Icon";
4
4
  import MenuTrigger from "./MenuTrigger";
5
5
  const getSharedStyles = (color, theme) => {
@@ -17,9 +17,7 @@ const MenuTrigger = ({ menuData, name, color, hoverColor, hoverBackground, "aria
17
17
  name,
18
18
  "aria-label": ariaLabel,
19
19
  };
20
- return (
21
- // @ts-ignore
22
- React.createElement(NavBarDropdownMenu, { ...props, placement: "bottom-start", modifiers: {
20
+ return (React.createElement(NavBarDropdownMenu, { ...props, placement: "bottom-start", modifiers: {
23
21
  flip: { behavior: ["bottom"] },
24
22
  setPopperWidth: {
25
23
  enabled: true,
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { themeGet } from "@styled-system/theme-get";
4
4
  import { Icon } from "../Icon";
5
5
  const StyledButton = styled.button(({ color = "white", hoverColor = "lightBlue", hoverBackground = "black", theme }) => ({
@@ -11,7 +11,7 @@ type MenuData = {
11
11
  type BaseMobileMenuProps = {
12
12
  menuData: MenuData;
13
13
  subtext?: string;
14
- closeMenu?: Function;
14
+ closeMenu?: React.MouseEventHandler<HTMLElement>;
15
15
  themeColorObject?: ThemeColorObject;
16
16
  showNulogyLogo?: boolean;
17
17
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { display } from "styled-system";
4
4
  import { Text } from "../Type";
5
5
  import { Flex } from "../Flex";
@@ -16,7 +16,6 @@ const BrandingWrap = styled.div(({ theme }) => ({
16
16
  color: theme.colors.white,
17
17
  marginBottom: theme.space.x1,
18
18
  }));
19
- // eslint-disable-next-line no-mixed-operators
20
19
  const getPaddingLeft = (layer) => `${24 * layer + 24}px`;
21
20
  const getSharedStyles = (theme) => ({
22
21
  display: "flex",
@@ -67,7 +66,6 @@ const renderMenuLink = (menuItem, linkOnClick, themeColorObject, layer) => {
67
66
  href: menuItem.href,
68
67
  as: menuItem.as,
69
68
  to: menuItem.to,
70
- // eslint-disable-next-line no-mixed-operators
71
69
  pl: layer === 0 ? getPaddingLeft(layer) : `${24 * layer + 20}px`,
72
70
  mb: "x1",
73
71
  target: menuItem.openInNew ? "_blank" : undefined,
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import ReactResizeDetector from "react-resize-detector";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { useTheme } from "styled-components";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { BrowserRouter, Link as ReactRouterLink } from "react-router-dom";
4
4
  import { Heading1 } from "../Type";
5
5
  import { Icon } from "../Icon";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Flex } from "../Flex";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const NavBarBackground = styled(Flex)(({ theme }) => ({
@@ -4,7 +4,6 @@ import { DetectOutsideClick, withMenuState, PopperArrow } from "../utils";
4
4
  import DropdownMenuContainer from "../DropdownMenu/DropdownMenuContainer";
5
5
  class StatelessNavBarDropdownMenuClass extends React.Component {
6
6
  }
7
- /* eslint-disable react/destructuring-assignment */
8
7
  class StatelessNavBarDropdownMenu extends StatelessNavBarDropdownMenuClass {
9
8
  constructor(props) {
10
9
  super(props);
@@ -60,29 +59,33 @@ class StatelessNavBarDropdownMenu extends StatelessNavBarDropdownMenuClass {
60
59
  this.setTriggerRef(node);
61
60
  },
62
61
  })),
63
- isOpen && (React.createElement(Popper, { placement: placement, modifiers: modifiers }, (popperProps) => (React.createElement(React.Fragment, null,
64
- React.createElement(DropdownMenuContainer, { ...popperProps, placement: placement, showArrow: showArrow, ...this.menuEventHandlers(), ref: (node) => {
65
- if (typeof popperProps.ref === "function") {
66
- popperProps.ref(node);
67
- }
68
- this.setMenuRef(node);
69
- }, onMouseDown: (e) => {
70
- e.preventDefault();
71
- e.target.focus();
72
- }, ...dropdownMenuContainerEventHandlers({
73
- openMenu,
74
- closeMenu,
75
- }) },
76
- React.createElement(PopperArrow, { ...popperProps.arrowProps, placement: placement, ref: popperProps.arrowProps.ref, backgroundColor: "white", borderColor: "white" }),
77
- React.createElement(DetectOutsideClick, { onClick: this.handleOutsideClick, clickRef: [this.menuRef, this.triggerRef] }),
78
- childrenFnc({
79
- closeMenu,
80
- openMenu,
81
- }))))))));
62
+ isOpen && (React.createElement(Popper, { placement: placement, modifiers: modifiers }, (popperProps) => {
63
+ const { ref: popperRef, style, placement: popperPlacement } = popperProps;
64
+ return (React.createElement(React.Fragment, null,
65
+ React.createElement(DropdownMenuContainer, { dataPlacement: popperPlacement, style: style, placement: placement, showArrow: showArrow, ...this.menuEventHandlers(), ...{
66
+ ref: (node) => {
67
+ if (typeof popperRef === "function") {
68
+ popperRef(node);
69
+ }
70
+ this.setMenuRef(node);
71
+ },
72
+ }, onMouseDown: (e) => {
73
+ e.preventDefault();
74
+ e.target.focus();
75
+ }, ...dropdownMenuContainerEventHandlers({
76
+ openMenu,
77
+ closeMenu,
78
+ }) },
79
+ React.createElement(PopperArrow, { ...popperProps.arrowProps, placement: placement, ref: popperProps.arrowProps.ref, backgroundColor: "white", borderColor: "white" }),
80
+ React.createElement(DetectOutsideClick, { onClick: this.handleOutsideClick, clickRef: [this.menuRef, this.triggerRef] }),
81
+ childrenFnc({
82
+ closeMenu,
83
+ openMenu,
84
+ }))));
85
+ }))));
82
86
  }
83
87
  }
84
- /* eslint-enable react/destructuring-assignment */
85
- // @ts-ignore
88
+ // @ts-expect-error - defaultProps is not recognized on functional components in newer React types
86
89
  StatelessNavBarDropdownMenu.defaultProps = {
87
90
  showArrow: true,
88
91
  placement: "bottom-start",
@@ -91,7 +94,7 @@ StatelessNavBarDropdownMenu.defaultProps = {
91
94
  dropdownMenuContainerEventHandlers: () => { },
92
95
  };
93
96
  const NavBarDropdownMenu = withMenuState(StatelessNavBarDropdownMenu);
94
- // @ts-ignore
97
+ // @ts-expect-error - defaultProps is not recognized on functional components in newer React types
95
98
  NavBarDropdownMenu.defaultProps = {
96
99
  showDelay: "0",
97
100
  hideDelay: "100",
@@ -1,4 +1,4 @@
1
- import styled, { useTheme } from "styled-components";
1
+ import { styled, useTheme } from "styled-components";
2
2
  import { useTranslation } from "react-i18next";
3
3
  import React, { useEffect } from "react";
4
4
  import { Icon } from "../Icon";
@@ -47,7 +47,6 @@ const MenuIcon = ({ isOpen }) => {
47
47
  const title = isOpen ? t("close menu") : t("open menu");
48
48
  return React.createElement(Icon, { icon: icon, title: title });
49
49
  };
50
- /* eslint-disable react/destructuring-assignment */
51
50
  const SmallNavBarNoState = ({ menuData, menuState: { isOpen, toggleMenu, closeMenu }, subtext, environment, showNulogyLogo, breakpointLower = "small", themeColorObject, navBarHeight, logo, renderMenuButton, ...props }) => {
52
51
  const navRef = React.useRef(null);
53
52
  useEffect(() => {
@@ -74,7 +73,6 @@ const SmallNavBarNoState = ({ menuData, menuState: { isOpen, toggleMenu, closeMe
74
73
  React.createElement(MenuIcon, { isOpen: isOpen })))))),
75
74
  isOpen && (React.createElement(MobileMenu, { themeColorObject: themeColorObject, subtext: subtext, menuData: menuData, closeMenu: closeMenu, showNulogyLogo: showNulogyLogo }))));
76
75
  };
77
- /* eslint-enable react/destructuring-assignment */
78
76
  const SmallNavBar = withMenuState(SmallNavBarNoState);
79
77
  /** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
80
78
  export default SmallNavBar;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { Branding } from "../Branding";
4
4
  import { Button } from "../index";
5
5
  import { Link } from "../Link";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  import NavBarDropdownMenu from "./NavBarDropdownMenu";
5
5
  import renderSubMenuItems from "./renderSubMenuItems";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import React from "react";
3
3
  import { DropdownButton } from "../DropdownMenu";
4
4
  import { Icon } from "../Icon";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { DropdownText, DropdownLink } from "../DropdownMenu";
4
4
  import { Icon } from "../Icon";
5
5
  const renderSubMenuTrigger = (subMenuItem, onItemClick, SubMenuTrigger, layer, menuType) => (React.createElement(NoWrapLi, { key: subMenuItem.key ?? subMenuItem.name },
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { Flex } from "../Flex";
4
4
  import BrandingText from "./BrandingText";
5
5
  import LettermarkLogo from "./LettermarkLogo";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  const logoColors = {
3
3
  white: "#FFFFFF",
4
4
  blue: "#0E77D2",
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  const BreadcrumbsList = styled.ol(() => ({
3
3
  margin: 0,
4
4
  padding: 0,
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { space, color, flexbox, layout } from "styled-system";
3
3
  export const BreadcrumbsListSeparator = styled.li(({ theme }) => ({
4
4
  margin: 0,
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { space, variant } from "styled-system";
4
4
  import { Icon } from "../Icon";
5
5
  import { useComponentVariant, } from "../NDSProvider/ComponentVariantContext";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import { Icon } from "../Icon";
5
5
  const WrapperButton = styled.button(({ disabled, theme }) => ({
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { layout, space } from "styled-system";
4
4
  import { Icon } from "../Icon";
5
5
  const getIconColorByState = ({ toggled, disabled, theme }) => {
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { darken } from "polished";
3
3
  import Button from "./Button";
4
4
  const DangerButton = styled(Button)(({ disabled, theme }) => ({
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { space, variant } from "styled-system";
4
4
  import { Manager, Reference, Popper } from "react-popper-2";
5
5
  import { transparentize } from "polished";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { darken } from "polished";
3
3
  import Button from "./Button";
4
4
  const PrimaryButton = styled(Button)(({ disabled, theme }) => ({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import Button from "./Button";
3
3
  const QuietButton = styled(Button)(({ theme }) => ({
4
4
  color: theme.colors.blue,
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Flex } from "../Flex";
3
3
  const alignments = {
4
4
  left: "flex-start",
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { addStyledProps } from "../StyledProps";
3
3
  import { Flex } from "../Flex";
4
4
  const CardSet = styled(Flex)(({ theme }) => ({
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import propTypes from "@styled-system/prop-types";
4
4
  import { Box } from "../Box";
5
5
  import { Text } from "../Type";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { HelpText, RequirementText } from "../FieldLabel";
4
4
  import { InlineValidation } from "../Validation";
5
5
  import { Fieldset } from "../Form";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { TimePicker } from "../TimePicker";
3
3
  const EndTime = styled(TimePicker)(({ theme }) => ({
4
4
  marginRight: theme.space.x1,
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { TimePicker } from "../TimePicker";
3
3
  const StartTime = styled(TimePicker)(({ theme }) => ({
4
4
  marginLeft: theme.space.x1,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { useTheme } from "styled-components";
3
- import styled from "styled-components";
3
+ import { styled } from "styled-components";
4
4
  import { Box } from "../Box";
5
5
  const RightAngleTriangle = styled(Box) `
6
6
  position: absolute;
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { useDescriptionListContext } from "./DescriptionListContext";
3
3
  const gapConfig = {
4
4
  compact: "x0_75",
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { transparentize } from "polished";
4
4
  import { Box } from "../../Box";
5
5
  import { Flex } from "../../Flex";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { addStyledProps } from "../StyledProps";
3
3
  const Divider = styled.hr(({ theme, color, secondary }) => ({
4
4
  border: "none",
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { variant } from "styled-system";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const DropdownButton = styled.button(({ disabled = false, hoverColor = "darkBlue", bgHoverColor = "lightBlue", theme }) => ({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { variant } from "../StyledProps";
3
3
  const DropdownItem = styled.div(({ theme, color = "darkGrey", hoverColor = "darkBlue", bgHoverColor = "lightBlue" }) => ({
4
4
  "*": {
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { variant } from "styled-system";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const DropdownLink = styled.a.withConfig({
@@ -69,10 +69,14 @@ export const SetToDisabled = () => (React.createElement(DropdownMenu, { disabled
69
69
  SetToDisabled.story = {
70
70
  name: "Set to disabled",
71
71
  };
72
- export const WithConditionallyRenderedMenuItems = () => (React.createElement(DropdownMenu, null,
73
- React.createElement(DropdownButton, { onClick: () => { } }, "Item A"),
74
- false && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item B"),
75
- true && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item C")));
72
+ export const WithConditionallyRenderedMenuItems = () => {
73
+ const showItemB = false;
74
+ const showItemC = true;
75
+ return (React.createElement(DropdownMenu, null,
76
+ React.createElement(DropdownButton, { onClick: () => { } }, "Item A"),
77
+ showItemB && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item B"),
78
+ showItemC && React.createElement(DropdownButton, { onClick: () => { } }, "Conditional Item C")));
79
+ };
76
80
  export const WithRenderProps = () => (React.createElement(DropdownMenu, null, ({ closeMenu, openMenu }) => (React.createElement(React.Fragment, null,
77
81
  React.createElement(DropdownButton, { onClick: (e) => closeMenu(e) }, "Close menu"),
78
82
  React.createElement(DropdownButton, { onClick: (e) => openMenu(e) }, "Open menu")))));
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { color } from "styled-system";
3
3
  import { Box } from "../Box";
4
4
  const getMenuMargin = (placement, showArrow) => {
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Text } from "../Type";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const DropdownText = styled(Text)(({ theme }) => ({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Text } from "../Type";
3
3
  import { Link } from "../Link";
4
4
  const HelpText = styled(Text)(({ theme }) => ({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { space, color, display } from "styled-system";
3
3
  const Label = styled.label(({ color = "black", disabled }) => ({
4
4
  color: color,
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  export const LabelContent = styled.span(({ theme }) => ({
3
3
  display: "flex",
4
4
  flexWrap: "wrap",
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Box } from "../Box";
3
3
  import { gap } from "../StyledProps";
4
4
  const Flex = styled(Box)({
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Box, Flex as NDSFlex } from "../index";
3
- import styled from "styled-components";
3
+ import { styled } from "styled-components";
4
4
  const Flex = ({ children, ...props }) => (React.createElement(NDSFlex, { padding: "x3", bg: "whiteGrey", minHeight: "400px", style: {
5
5
  boxSizing: "content-box",
6
6
  }, ...props }, children));
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { Box } from "../Box";
3
3
  import { addStyledProps } from "../StyledProps";
4
4
  const Field = styled(Box)({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { space } from "styled-system";
3
3
  const Fieldset = styled.fieldset({
4
4
  padding: 0,
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { space } from "styled-system";
4
4
  import { Heading2 } from "../Type";
5
5
  import { Alert } from "../Alert";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "styled-components";
3
3
  import { Heading3 } from "../Type";
4
4
  import Field from "./Field";
5
5
  import Fieldset from "./Fieldset";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { position, space } from "styled-system";
4
4
  import icons from "@nulogy/icons";
5
5
  import LoadingIcon from "./LoadingIcon";
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from "react";
2
- import styled, { useTheme } from "styled-components";
2
+ import { styled, useTheme } from "styled-components";
3
3
  import { space, variant } from "styled-system";
4
4
  import { Box } from "../Box";
5
5
  import { MaybeFieldLabel } from "../FieldLabel";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { darken } from "polished";
3
3
  import { themeGet } from "@styled-system/theme-get";
4
4
  import React from "react";
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { addStyledProps } from "../StyledProps";
3
3
  import ListItem from "./ListItem";
4
4
  const List = styled.ul(({ compact = false, leftAlign = false, color = "currentColor", theme, listStyle }) => ({
@@ -1,4 +1,4 @@
1
- import styled from "styled-components";
1
+ import { styled } from "styled-components";
2
2
  import { space, color, typography } from "styled-system";
3
3
  const ListItem = styled.li(({ theme }) => ({
4
4
  color: "currentcolor",
@@ -1,5 +1,5 @@
1
1
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2
- import styled, { keyframes } from "styled-components";
2
+ import { styled, keyframes } from "styled-components";
3
3
  import { transparentize } from "polished";
4
4
  import React from "react";
5
5
  export function MiniTooltip({ children, content, sideOffset = 4, hideTooltip = false, delayDuration = 700, }) {
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from "react";
2
- import styled, { ThemeContext, useTheme } from "styled-components";
2
+ import { styled, ThemeContext, useTheme } from "styled-components";
3
3
  import ReactModal from "react-modal";
4
4
  import { transparentize } from "polished";
5
5
  import { Heading2 } from "../Type";