@nulogy/components 15.2.1 → 15.2.3

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 (288) hide show
  1. package/README.md +3 -3
  2. package/dist/main.js +53108 -54055
  3. package/dist/main.module.js +8809 -9756
  4. package/dist/src/Alert/Alert.js +2 -14
  5. package/dist/src/Alert/Alert.story.d.ts +15 -19
  6. package/dist/src/Alert/Alert.story.js +25 -14
  7. package/dist/src/AppTag/components/LogoWrapper.d.ts +0 -1
  8. package/dist/src/AppTag/components/NulogyLogo.js +2 -14
  9. package/dist/src/AsyncSelect/AsyncSelect.graphql.story.js +4 -13
  10. package/dist/src/AsyncSelect/AsyncSelect.js +14 -16
  11. package/dist/src/AsyncSelect/AsyncSelectComponents.js +9 -21
  12. package/dist/src/AsyncSelect/fixtures.js +4 -13
  13. package/dist/src/Banner/Banner.js +1 -15
  14. package/dist/src/BottomSheet/BottomSheet.js +2 -15
  15. package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
  16. package/dist/src/BottomSheet/BottomSheet.parts.js +8 -22
  17. package/dist/src/BottomSheet/BottomSheet.styled.d.ts +4 -5
  18. package/dist/src/Box/Box.d.ts +12 -4
  19. package/dist/src/BrandedNavBar/DesktopMenu.js +22 -36
  20. package/dist/src/BrandedNavBar/MenuTrigger.js +4 -16
  21. package/dist/src/BrandedNavBar/MenuTriggerButton.js +8 -22
  22. package/dist/src/BrandedNavBar/MobileMenu.js +28 -35
  23. package/dist/src/BrandedNavBar/NavBar.js +7 -21
  24. package/dist/src/BrandedNavBar/NavBar.story.d.ts +4 -6
  25. package/dist/src/BrandedNavBar/NavBar.story.js +12 -4
  26. package/dist/src/BrandedNavBar/NavBarBackground.d.ts +0 -1
  27. package/dist/src/BrandedNavBar/NavBarDropdownMenu.js +14 -8
  28. package/dist/src/BrandedNavBar/SmallNavBar.js +4 -16
  29. package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +5 -2
  30. package/dist/src/BrandedNavBar/SmallNavBar.story.js +27 -6
  31. package/dist/src/BrandedNavBar/SubMenuTrigger.js +4 -16
  32. package/dist/src/BrandedNavBar/SubMenuTriggerButton.js +2 -14
  33. package/dist/src/BrandedNavBar/renderSubMenuItems.js +7 -17
  34. package/dist/src/Branding/Branding.js +2 -14
  35. package/dist/src/Branding/BrandingText.d.ts +0 -1
  36. package/dist/src/Branding/LettermarkLogo.js +2 -14
  37. package/dist/src/Branding/WordmarkLogo.js +2 -14
  38. package/dist/src/Breadcrumbs/Breadcrumbs.js +2 -14
  39. package/dist/src/Breadcrumbs/BreadcrumbsList.d.ts +0 -1
  40. package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +0 -1
  41. package/dist/src/Button/Button.js +2 -14
  42. package/dist/src/Button/CloseButton.js +1 -1
  43. package/dist/src/Button/ControlIcon.js +2 -16
  44. package/dist/src/Button/DangerButton.d.ts +0 -1
  45. package/dist/src/Button/IconicButton.js +55 -73
  46. package/dist/src/Button/PrimaryButton.d.ts +0 -1
  47. package/dist/src/Button/QuietButton.d.ts +0 -1
  48. package/dist/src/ButtonGroup/ButtonGroup.d.ts +0 -1
  49. package/dist/src/ButtonGroup/ButtonGroup.js +8 -2
  50. package/dist/src/Card/Card.js +2 -14
  51. package/dist/src/Card/Card.story.js +1 -1
  52. package/dist/src/Card/CardSet.d.ts +0 -1
  53. package/dist/src/Checkbox/Checkbox.js +20 -6
  54. package/dist/src/Checkbox/Checkbox.story.js +4 -1
  55. package/dist/src/Checkbox/CheckboxGroup.js +4 -16
  56. package/dist/src/DatePickers/DatePicker.js +2 -14
  57. package/dist/src/DatePickers/MonthPicker.js +2 -14
  58. package/dist/src/DatePickers/WeekPicker.js +10 -17
  59. package/dist/src/DatePickers/custom/weekPickerStyles.d.ts +0 -1
  60. package/dist/src/DatePickers/shared/components/BasePicker.js +9 -15
  61. package/dist/src/DatePickers/shared/components/DatePickerInput.js +2 -13
  62. package/dist/src/DatePickers/shared/styles.d.ts +0 -1
  63. package/dist/src/DatePickers/shared/types.d.ts +0 -1
  64. package/dist/src/DatePickers/stories/DatePicker.story.d.ts +7 -3
  65. package/dist/src/DatePickers/stories/DatePicker.story.js +54 -22
  66. package/dist/src/DatePickers/stories/WeekPicker.story.js +1 -1
  67. package/dist/src/DateRange/DateRange.js +36 -22
  68. package/dist/src/DateRange/DateRangeStyles.d.ts +0 -1
  69. package/dist/src/DateRange/EndTime.d.ts +3 -4
  70. package/dist/src/DateRange/StartTime.d.ts +3 -4
  71. package/dist/src/Decorations/index.js +1 -1
  72. package/dist/src/DescriptionList/DescriptionList.js +1 -13
  73. package/dist/src/DescriptionList/DescriptionList.parts.d.ts +0 -1
  74. package/dist/src/DescriptionList/DescriptionList.parts.js +156 -77
  75. package/dist/src/DescriptionList/DescriptionListContext.js +1 -15
  76. package/dist/src/DescriptionList/lib/utils.js +1 -1
  77. package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +1 -1
  78. package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +7 -8
  79. package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.js +15 -12
  80. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +1 -1
  81. package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +7 -8
  82. package/dist/src/DescriptionList/stories/DescriptionList.playground.story.js +203 -195
  83. package/dist/src/DescriptionList/stories/fixtures.d.ts +2 -2
  84. package/dist/src/Divider/Divider.d.ts +0 -1
  85. package/dist/src/DropdownMenu/DropdownItem.d.ts +0 -1
  86. package/dist/src/DropdownMenu/DropdownMenu.js +13 -17
  87. package/dist/src/DropdownMenu/DropdownMenu.story.js +2 -2
  88. package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +0 -1
  89. package/dist/src/DropdownMenu/DropdownMenuContainer.js +10 -1
  90. package/dist/src/DropdownMenu/DropdownText.d.ts +1 -2
  91. package/dist/src/FieldLabel/FieldLabel.js +2 -14
  92. package/dist/src/FieldLabel/HelpText.d.ts +1 -2
  93. package/dist/src/FieldLabel/LabelText.d.ts +0 -1
  94. package/dist/src/FieldLabel/MaybeFieldLabel.js +1 -15
  95. package/dist/src/FieldLabel/RequirementText.js +1 -1
  96. package/dist/src/Flex/Flex.d.ts +0 -1
  97. package/dist/src/Flex/Flex.story.js +3 -17
  98. package/dist/src/Form/Field.d.ts +0 -1
  99. package/dist/src/Form/Fieldset.d.ts +0 -1
  100. package/dist/src/Form/Form.js +3 -17
  101. package/dist/src/Form/FormSection.js +3 -17
  102. package/dist/src/Icon/Icon.js +9 -24
  103. package/dist/src/Icon/LoadingIcon.js +2 -14
  104. package/dist/src/Input/Input.js +3 -15
  105. package/dist/src/Input/InputField.js +4 -16
  106. package/dist/src/Input/Prefix.js +2 -16
  107. package/dist/src/Input/Suffix.js +2 -14
  108. package/dist/src/Layout/ApplicationFrame.js +2 -14
  109. package/dist/src/Layout/Header.d.ts +1 -1
  110. package/dist/src/Layout/Header.js +4 -17
  111. package/dist/src/Layout/Header.story.d.ts +10 -9
  112. package/dist/src/Layout/Header.story.js +9 -8
  113. package/dist/src/Layout/Page.js +5 -19
  114. package/dist/src/Layout/Sidebar.js +4 -18
  115. package/dist/src/Layout/Sidebar.story.d.ts +4 -1
  116. package/dist/src/Layout/Sidebar.story.js +24 -31
  117. package/dist/src/Link/Link.js +13 -21
  118. package/dist/src/List/List.d.ts +0 -1
  119. package/dist/src/Modal/Modal.story.d.ts +39 -61
  120. package/dist/src/Modal/Modal.story.js +110 -85
  121. package/dist/src/Modal/ModalCloseButton.d.ts +0 -1
  122. package/dist/src/Modal/ModalFooter.d.ts +0 -1
  123. package/dist/src/Modal/ModalHeader.d.ts +0 -1
  124. package/dist/src/NDSProvider/ComponentVariantContext.js +1 -1
  125. package/dist/src/NDSProvider/GlobalStyles.d.ts +0 -1
  126. package/dist/src/NDSProvider/ModalStyleOverride.d.ts +0 -1
  127. package/dist/src/NDSProvider/Reset.d.ts +0 -1
  128. package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +3 -1
  129. package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.js +3 -1
  130. package/dist/src/NavBarSearch/NavBarSearch.js +2 -14
  131. package/dist/src/Navigation/Navigation.js +3 -16
  132. package/dist/src/Navigation/components/AppSwitcher/NulogyAppSwitcher.js +6 -3
  133. package/dist/src/Navigation/components/AppSwitcher/parts/Item.js +1 -15
  134. package/dist/src/Navigation/components/AppSwitcher/parts/Link.js +2 -16
  135. package/dist/src/Navigation/components/AppSwitcher/parts/index.d.ts +4 -5
  136. package/dist/src/Navigation/components/DesktopNav/DesktopNav.js +2 -2
  137. package/dist/src/Navigation/components/MenuSubItem/MenuSubItem.js +4 -5
  138. package/dist/src/Navigation/components/MenuSubItem/parts/styled.d.ts +0 -1
  139. package/dist/src/Navigation/components/MenuSubItem/parts/styled.js +49 -7
  140. package/dist/src/Navigation/components/MobileNav/MobileNav.js +2 -2
  141. package/dist/src/Navigation/components/MobileNav/parts/MobileMenuItem.js +12 -21
  142. package/dist/src/Navigation/components/MobileNav/parts/styled.d.ts +1 -2
  143. package/dist/src/Navigation/components/MobileNav/parts/styled.js +35 -4
  144. package/dist/src/Navigation/components/NulogyLogo/SvgNulogyLogo.js +1 -1
  145. package/dist/src/Navigation/components/UserMenu/UserMenu.d.ts +0 -1
  146. package/dist/src/Navigation/components/UserMenu/parts/Header.js +1 -1
  147. package/dist/src/Navigation/components/UserMenu/parts/Item.js +7 -16
  148. package/dist/src/Navigation/components/UserMenu/parts/MobileItem.js +7 -16
  149. package/dist/src/Navigation/components/UserMenu/parts/styled.d.ts +0 -1
  150. package/dist/src/Navigation/components/UserMenu/parts/styled.js +43 -18
  151. package/dist/src/Navigation/components/shared/NavigationLogo.js +4 -16
  152. package/dist/src/Navigation/components/shared/NavigationLogoLink.js +2 -14
  153. package/dist/src/Navigation/components/shared/NavigationMenuContent.d.ts +0 -1
  154. package/dist/src/Navigation/components/shared/NavigationMenuItem.js +10 -24
  155. package/dist/src/Navigation/components/shared/components.d.ts +0 -1
  156. package/dist/src/Navigation/components/shared/components.js +29 -5
  157. package/dist/src/Navigation/hooks/useResponsiveMenu.d.ts +0 -1
  158. package/dist/src/Navigation/stories/Navigation.mobileVisibility.story.js +21 -9
  159. package/dist/src/Navigation/stories/fixtures/logos/CustomLogo2.js +1 -1
  160. package/dist/src/Navigation/stories/fixtures/logos/CustomLogo3.js +1 -1
  161. package/dist/src/Navigation/stories/fixtures/logos/Customlogo1.js +1 -1
  162. package/dist/src/Overlay/Overlay.d.ts +0 -1
  163. package/dist/src/Pagination/PageNumber.d.ts +0 -1
  164. package/dist/src/Pagination/Pagination.js +3 -16
  165. package/dist/src/Pagination/PaginationButton.d.ts +0 -1
  166. package/dist/src/Popper/Popper.js +29 -6
  167. package/dist/src/Primitives/index.d.ts +0 -1
  168. package/dist/src/Radio/Radio.js +11 -18
  169. package/dist/src/Radio/Radio.story.d.ts +322 -32
  170. package/dist/src/Radio/Radio.story.js +36 -22
  171. package/dist/src/Radio/RadioGroup.js +4 -16
  172. package/dist/src/RangeContainer/RangeContainer.js +6 -15
  173. package/dist/src/Select/MenuList.js +14 -19
  174. package/dist/src/Select/Select.d.ts +2 -2
  175. package/dist/src/Select/Select.js +16 -17
  176. package/dist/src/Select/Select.spec-utils.js +1 -0
  177. package/dist/src/Select/Select.story.d.ts +5 -1
  178. package/dist/src/Select/Select.story.fixture.js +8 -30
  179. package/dist/src/Select/Select.story.js +107 -31
  180. package/dist/src/Select/SelectComponents.js +7 -7
  181. package/dist/src/Select/SelectOption.js +1 -1
  182. package/dist/src/Select/customReactSelectStyles.js +152 -44
  183. package/dist/src/Select/lib.js +1 -2
  184. package/dist/src/SortingTable/SortingTable.js +6 -15
  185. package/dist/src/StatusIndicator/StatusIndicator.d.ts +0 -1
  186. package/dist/src/StatusIndicator/StatusIndicator.js +16 -1
  187. package/dist/src/Summary/Summary.js +2 -14
  188. package/dist/src/Summary/SummaryDivider.js +1 -1
  189. package/dist/src/Summary/SummaryItem.js +2 -14
  190. package/dist/src/Switcher/Switch.js +23 -19
  191. package/dist/src/Switcher/Switcher.js +4 -16
  192. package/dist/src/Table/BaseTable.js +2 -14
  193. package/dist/src/Table/StatefulTable.d.ts +1 -1
  194. package/dist/src/Table/StatefulTable.js +17 -9
  195. package/dist/src/Table/StyledTh.d.ts +0 -1
  196. package/dist/src/Table/StyledTh.js +11 -2
  197. package/dist/src/Table/Table.js +2 -14
  198. package/dist/src/Table/Table.types.d.ts +0 -1
  199. package/dist/src/Table/TableBody.js +11 -11
  200. package/dist/src/Table/TableFoot.js +5 -8
  201. package/dist/src/Table/TableHead.js +1 -4
  202. package/dist/src/Table/addExpandableControl.js +5 -2
  203. package/dist/src/Table/addSelectableControl.js +5 -2
  204. package/dist/src/Table/stories/BaseTable.story.d.ts +11 -7
  205. package/dist/src/Table/stories/BaseTable.story.js +156 -34
  206. package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +5 -2
  207. package/dist/src/Table/stories/SortingColumnHeader.story.js +20 -3
  208. package/dist/src/Table/stories/Table.story.d.ts +7 -14
  209. package/dist/src/Table/stories/Table.story.js +172 -127
  210. package/dist/src/Table/stories/TableWithCustomSorting.story.js +4 -1
  211. package/dist/src/Table/stories/TableWithFiltering.story.js +8 -2
  212. package/dist/src/Table/stories/TableWithServerSidePagination.story.js +4 -15
  213. package/dist/src/Tabs/Tab.js +11 -18
  214. package/dist/src/Tabs/TabContainer.d.ts +0 -1
  215. package/dist/src/Tabs/TabScrollIndicator.js +2 -14
  216. package/dist/src/Tabs/Tabs.js +5 -7
  217. package/dist/src/Textarea/Textarea.js +3 -15
  218. package/dist/src/TimePicker/TimePicker.js +2 -14
  219. package/dist/src/TimePicker/TimePickerDropdown.d.ts +0 -1
  220. package/dist/src/TimePicker/TimePickerInput.d.ts +0 -1
  221. package/dist/src/TimePicker/TimePickerInput.js +6 -4
  222. package/dist/src/TimeRange/TimeRange.js +20 -20
  223. package/dist/src/Toast/Toast.js +4 -16
  224. package/dist/src/ToastContainer/ToastContainer.js +4 -16
  225. package/dist/src/ToastContainer/ToastContainer.story.js +1 -1
  226. package/dist/src/ToastContainer/ToastFunction.js +7 -19
  227. package/dist/src/Toggle/Toggle.js +4 -17
  228. package/dist/src/Toggle/ToggleButton.js +2 -14
  229. package/dist/src/Tooltip/Tooltip.story.d.ts +15 -52
  230. package/dist/src/Tooltip/Tooltip.story.js +80 -72
  231. package/dist/src/Tooltip/TooltipContainer.d.ts +0 -1
  232. package/dist/src/Tooltip/TooltipContainer.js +16 -1
  233. package/dist/src/Tooltip/components/TooltipComponents.js +9 -24
  234. package/dist/src/TopBar/TopBar.styled.d.ts +14 -7
  235. package/dist/src/TopBar/components/BackLink.js +2 -14
  236. package/dist/src/TopBar/components/Menu.js +2 -15
  237. package/dist/src/TopBar/components/MenuItemLink.js +2 -14
  238. package/dist/src/TopBar/components/PageTitle.js +2 -14
  239. package/dist/src/TopBar/stories/TopBar.backButton.story.js +3 -3
  240. package/dist/src/TopBar/stories/TopBar.menu.story.js +9 -20
  241. package/dist/src/TopBar/stories/TopBar.story.js +3 -3
  242. package/dist/src/TruncatedText/TruncatedText.js +8 -16
  243. package/dist/src/TruncatedText/components/MaybeTooltip.d.ts +1 -1
  244. package/dist/src/TruncatedText/components/TruncatedTextFillWidth.js +3 -15
  245. package/dist/src/TruncatedText/components/TruncatedTextMaxCharacters.js +4 -16
  246. package/dist/src/Type/Headings.d.ts +4 -5
  247. package/dist/src/Type/Text.d.ts +0 -1
  248. package/dist/src/Validation/InlineValidation.js +2 -14
  249. package/dist/src/VerticalDivider/VerticalDivider.d.ts +0 -1
  250. package/dist/src/VisualTests/WithSpace.story.js +18 -18
  251. package/dist/src/hooks/useMediaQuery/useMediaQuery.js +1 -2
  252. package/dist/src/i18n.js +1 -1
  253. package/dist/src/locale.story.js +1 -1
  254. package/dist/src/testing/matchers/toHaveStyle.d.ts +15 -0
  255. package/dist/src/testing/matchers/toHaveStyle.js +50 -0
  256. package/dist/src/testing/matchers/toMatchDate.d.ts +1 -0
  257. package/dist/src/testing/matchers/toMatchDate.js +1 -1
  258. package/dist/src/theme/mergeThemes.util.js +7 -1
  259. package/dist/src/theme/useNDSTheme.js +9 -3
  260. package/dist/src/utils/ClickInputLabel.d.ts +0 -1
  261. package/dist/src/utils/DetectOutsideClick.d.ts +3 -0
  262. package/dist/src/utils/DetectOutsideClick.js +3 -0
  263. package/dist/src/utils/PopperArrow.js +5 -1
  264. package/dist/src/utils/ScrollIndicators.js +1 -1
  265. package/dist/src/utils/generateId.d.ts +5 -0
  266. package/dist/src/utils/generateId.js +5 -0
  267. package/dist/src/utils/index.d.ts +0 -1
  268. package/dist/src/utils/index.js +0 -1
  269. package/dist/src/utils/numberFromDimension/numberFromDimension.spec.js +1 -0
  270. package/dist/src/utils/story/code.d.ts +0 -1
  271. package/dist/src/utils/story/dashed.d.ts +2 -2
  272. package/dist/src/utils/story/placeholder.js +1 -1
  273. package/dist/src/utils/story/resizable.d.ts +2 -2
  274. package/dist/src/utils/story/resizable.js +1 -1
  275. package/dist/src/utils/story/simulatedAPIRequests.js +8 -19
  276. package/dist/src/utils/subPx.js +1 -1
  277. package/dist/src/utils/testing/useConditionalAutoClick.js +3 -3
  278. package/dist/src/utils/testing/useUrlProps.js +1 -1
  279. package/dist/src/utils/ts/FocusManager.js +1 -1
  280. package/dist/src/utils/useWindowDimension.story.d.ts +1 -1
  281. package/dist/src/utils/withMenuState.js +1 -1
  282. package/dist/vitest.config.d.ts +2 -0
  283. package/dist/vitest.config.js +11 -0
  284. package/package.json +45 -85
  285. package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +0 -1
  286. package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.js +0 -4
  287. package/dist/src/utils/withWindowDimensions.d.ts +0 -3
  288. package/dist/src/utils/withWindowDimensions.js +0 -28
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import styled from "styled-components";
13
2
  import React from "react";
14
3
  import { DropdownButton } from "../DropdownMenu";
@@ -19,9 +8,8 @@ const StyledButton = styled(DropdownButton)(({ isOpen, theme }) => ({
19
8
  backgroundColor: isOpen ? theme.colors.lightBlue : "transparent",
20
9
  color: isOpen ? theme.colors.darkBlue : theme.colors.darkGrey,
21
10
  }));
22
- const SubMenuTriggerButton = React.forwardRef((_a, ref) => {
23
- var { name, isOpen } = _a, props = __rest(_a, ["name", "isOpen"]);
24
- return (React.createElement(StyledButton, Object.assign({ isOpen: isOpen, ref: ref }, props),
11
+ const SubMenuTriggerButton = React.forwardRef(({ name, isOpen, ...props }, ref) => {
12
+ return (React.createElement(StyledButton, { isOpen: isOpen, ref: ref, ...props },
25
13
  React.createElement(Flex, { gap: "half", justifyContent: "space-between", alignItems: "center" },
26
14
  name,
27
15
  React.createElement(Icon, { icon: "rightArrow", size: "20px" }))));
@@ -2,13 +2,9 @@ import React from "react";
2
2
  import styled from "styled-components";
3
3
  import { DropdownText, DropdownLink } from "../DropdownMenu";
4
4
  import { Icon } from "../Icon";
5
- const renderSubMenuTrigger = (subMenuItem, onItemClick, SubMenuTrigger, layer, menuType) => {
6
- var _a;
7
- return (React.createElement(NoWrapLi, { key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name },
8
- React.createElement(SubMenuTrigger, { onItemClick: onItemClick, name: subMenuItem.name, menuData: subMenuItem.items, trigger: subMenuItem.trigger, layer: layer, menuType: menuType })));
9
- };
5
+ const renderSubMenuTrigger = (subMenuItem, onItemClick, SubMenuTrigger, layer, menuType) => (React.createElement(NoWrapLi, { key: subMenuItem.key ?? subMenuItem.name },
6
+ React.createElement(SubMenuTrigger, { onItemClick: onItemClick, name: subMenuItem.name, menuData: subMenuItem.items, trigger: subMenuItem.trigger, layer: layer, menuType: menuType })));
10
7
  const renderSubMenuLink = (subMenuItem, onItemClick) => {
11
- var _a;
12
8
  const linkProps = {
13
9
  onClick: onItemClick,
14
10
  href: subMenuItem.href,
@@ -16,20 +12,14 @@ const renderSubMenuLink = (subMenuItem, onItemClick) => {
16
12
  as: subMenuItem.as,
17
13
  target: subMenuItem.openInNew ? "_blank" : undefined,
18
14
  };
19
- return (React.createElement(NoWrapLi, { key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name },
20
- React.createElement(DropdownLink, Object.assign({}, linkProps),
15
+ return (React.createElement(NoWrapLi, { key: subMenuItem.key ?? subMenuItem.name },
16
+ React.createElement(DropdownLink, { ...linkProps },
21
17
  subMenuItem.name,
22
18
  subMenuItem.openInNew && React.createElement(Icon, { size: "x2", icon: "openInNew" }))));
23
19
  };
24
- const renderCustom = (subMenuItem, onItemClick, _SubMenuTrigger, layer) => {
25
- var _a;
26
- return (React.createElement(NoWrapLi, { key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name }, subMenuItem.render({ size: "medium", onItemClick, layer })));
27
- };
28
- const renderText = (subMenuItem) => {
29
- var _a;
30
- return (React.createElement(NoWrapLi, { key: (_a = subMenuItem.key) !== null && _a !== void 0 ? _a : subMenuItem.name },
31
- React.createElement(DropdownText, null, subMenuItem.name)));
32
- };
20
+ const renderCustom = (subMenuItem, onItemClick, _SubMenuTrigger, layer) => (React.createElement(NoWrapLi, { key: subMenuItem.key ?? subMenuItem.name }, subMenuItem.render({ size: "medium", onItemClick, layer })));
21
+ const renderText = (subMenuItem) => (React.createElement(NoWrapLi, { key: subMenuItem.key ?? subMenuItem.name },
22
+ React.createElement(DropdownText, null, subMenuItem.name)));
33
23
  const getRenderFunction = (subMenuItem) => {
34
24
  if (subMenuItem.items) {
35
25
  return renderSubMenuTrigger;
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import styled, { useTheme } from "styled-components";
14
3
  import { Flex } from "../Flex";
@@ -65,10 +54,9 @@ const BrandingBoxPaddings = {
65
54
  medium: "2px",
66
55
  large: "6px",
67
56
  };
68
- const Branding = (_a) => {
69
- var { logoType = "wordmark", subtext, size = "medium", alignment = "left", withLine, logoColor = "blue", className } = _a, props = __rest(_a, ["logoType", "subtext", "size", "alignment", "withLine", "logoColor", "className"]);
57
+ const Branding = ({ logoType = "wordmark", subtext, size = "medium", alignment = "left", withLine, logoColor = "blue", className, ...props }) => {
70
58
  const theme = useTheme();
71
- return (React.createElement(BrandingWrap, Object.assign({ size: size, alignment: alignment, className: className }, props),
59
+ return (React.createElement(BrandingWrap, { size: size, alignment: alignment, className: className, ...props },
72
60
  logoType === "lettermark" ? (React.createElement(LettermarkLogo, { size: size, letterFill: getLogoColor(logoColor, theme).letter })) : (React.createElement(WordmarkLogo, { size: size, letterFill: getLogoColor(logoColor, theme).letter, logoFill: getLogoColor(logoColor, theme).logo })),
73
61
  subtext && (React.createElement(Flex, { justifyContent: getAlignment(alignment), width: "100%", py: BrandingBoxPaddings[size] },
74
62
  alignment !== "left" && withLine && React.createElement(Line, { logoColor: logoColor }),
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type BrandingTextProps = {
3
2
  logoColor?: "blue" | "white";
4
3
  size?: "small" | "medium" | "large";
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  const sizes = {
14
3
  small: {
@@ -25,8 +14,7 @@ const sizes = {
25
14
  },
26
15
  };
27
16
  const getSize = (size) => sizes[size] || sizes.medium;
28
- export default function LettermarkLogo(_a) {
29
- var { size, letterFill } = _a, props = __rest(_a, ["size", "letterFill"]);
30
- return (React.createElement("svg", Object.assign({}, getSize(size), props, { viewBox: "0 0 37 32", style: { display: "block", margin: size === "large" ? null : "2px 0" } }),
17
+ export default function LettermarkLogo({ size, letterFill, ...props }) {
18
+ return (React.createElement("svg", { ...getSize(size), ...props, viewBox: "0 0 37 32", style: { display: "block", margin: size === "large" ? null : "2px 0" } },
31
19
  React.createElement("path", { fill: letterFill, d: "M30.6967273,1.13648485 L36.3810909,3.40945455 L36.3810909,23.8758788 C36.3810909,28.2705455 30.9507879,29.0424242 27.2853333,29.5602424 C29.3818182,29.0424242 30.7083636,28.4606061 30.6967273,23.8758788 L30.6967273,5.68436364 L25.0123636,3.40945455 L30.6967273,1.13648485 Z M6.82084848,28.4237576 L6.82084848,15.9204848 C6.82084848,14.6618182 7.76533333,13.238303 8.91151515,12.7476364 L14.7801212,10.2264242 L14.7801212,18.1779394 L20.4644848,21.6048485 C21.6106667,22.1866667 23.8758788,22.2002424 23.8758788,20.4664242 L23.8758788,17.0550303 L21.5990303,15.9166061 L21.5990303,1.56319402e-13 L4.26666667,6.38642424 C1.91030303,7.25333333 3.55271368e-15,9.98593939 3.55271368e-15,12.5071515 L3.55271368e-15,31.2669091 L6.82084848,28.4237576 Z" })));
32
20
  }
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  const sizes = {
14
3
  small: {
@@ -25,9 +14,8 @@ const sizes = {
25
14
  },
26
15
  };
27
16
  const getSize = (size) => sizes[size] || sizes.medium;
28
- export default function WordmarkLogo(_a) {
29
- var { size, logoFill, letterFill } = _a, props = __rest(_a, ["size", "logoFill", "letterFill"]);
30
- return (React.createElement("svg", Object.assign({}, getSize(size), props, { viewBox: "0 0 133 32", style: { display: "block", margin: size === "medium" ? "2px 0" : null } }),
17
+ export default function WordmarkLogo({ size, logoFill, letterFill, ...props }) {
18
+ return (React.createElement("svg", { ...getSize(size), ...props, viewBox: "0 0 133 32", style: { display: "block", margin: size === "medium" ? "2px 0" : null } },
31
19
  React.createElement("path", { fill: letterFill, d: "M30.6967273,1.13648485 L36.3810909,3.40945455 L36.3810909,23.8758788 C36.3810909,28.2705455 30.9507879,29.0424242 27.2853333,29.5602424 C29.3818182,29.0424242 30.7083636,28.4606061 30.6967273,23.8758788 L30.6967273,5.68436364 L25.0123636,3.40945455 L30.6967273,1.13648485 Z M6.82084848,28.4237576 L6.82084848,15.9204848 C6.82084848,14.6618182 7.76533333,13.238303 8.91151515,12.7476364 L14.7801212,10.2264242 L14.7801212,18.1779394 L20.4644848,21.6048485 C21.6106667,22.1866667 23.8758788,22.2002424 23.8758788,20.4664242 L23.8758788,17.0550303 L21.5990303,15.9166061 L21.5990303,1.56319402e-13 L4.26666667,6.38642424 C1.91030303,7.25333333 3.55271368e-15,9.98593939 3.55271368e-15,12.5071515 L3.55271368e-15,31.2669091 L6.82084848,28.4237576 Z" }),
32
20
  React.createElement("g", { transform: "translate(43.000000, 0.000000)", fill: logoFill },
33
21
  React.createElement("path", { d: "M5.14521212,24.2224981 L1.33226763e-14,24.2224981 L1.33226763e-14,9.41134654 L4.75151515,9.41134654 L4.75151515,11.8937708 C5.43733518,11.0060378 6.29475204,10.2653615 7.27272727,9.71583139 C8.16188898,9.23817548 9.15699751,8.9920662 10.166303,9.00019502 C11.7333333,9.00019502 12.9221818,9.44948795 13.7328485,10.3480738 C14.5435152,11.2466597 14.9488485,12.5615688 14.9488485,14.2928011 L14.9488485,24.2224981 L9.83078788,24.2224981 L9.83078788,15.7376496 C9.83078788,14.961892 9.67175758,14.3755486 9.35369697,13.9786193 C9.03563636,13.58169 8.56436364,13.3877506 7.93987879,13.3968011 C7.04258586,13.3968011 6.35216162,13.6980536 5.86860606,14.3005587 C5.38505051,14.9030637 5.14391919,15.7803162 5.14521212,16.9323162 L5.14521212,24.2224981 Z" }),
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React, { isValidElement } from "react";
13
2
  import { Flex } from "../Flex";
14
3
  import { Icon } from "../Icon";
@@ -21,15 +10,14 @@ const insertSeparators = (items) => {
21
10
  React.createElement(Icon, { icon: "rightArrow" })));
22
11
  }, []);
23
12
  };
24
- const Breadcrumbs = (_a) => {
25
- var { variant, as = "nav", children } = _a, props = __rest(_a, ["variant", "as", "children"]);
13
+ const Breadcrumbs = ({ variant, as = "nav", children, ...props }) => {
26
14
  const componentVariant = useComponentVariant(variant);
27
15
  const allItems = React.Children.map(children, (child, index) => {
28
16
  if (!isValidElement(child))
29
17
  return null;
30
18
  return (React.createElement(BreadcrumbsListItem, { variant: componentVariant, key: `child-${index}` }, child));
31
19
  }).filter(Boolean);
32
- return (React.createElement(Flex, Object.assign({ as: as }, props),
20
+ return (React.createElement(Flex, { as: as, ...props },
33
21
  React.createElement(BreadcrumbsList, null, insertSeparators(allItems))));
34
22
  };
35
23
  export default Breadcrumbs;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const BreadcrumbsList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, never>> & string;
3
2
  export default BreadcrumbsList;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
3
2
  export declare const BreadcrumbsListSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
4
3
  export declare const BreadcrumbsListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import styled, { useTheme } from "styled-components";
14
3
  import { space, variant } from "styled-system";
@@ -75,11 +64,10 @@ const WrapperButton = styled.button(({ fullWidth }) => ({
75
64
  },
76
65
  },
77
66
  }), space);
78
- const Button = React.forwardRef((_a, ref) => {
79
- var { children, iconSide = "right", icon, className, asLink, variant, size } = _a, props = __rest(_a, ["children", "iconSide", "icon", "className", "asLink", "variant", "size"]);
67
+ const Button = React.forwardRef(({ children, iconSide = "right", icon, className, asLink, variant, size, ...props }, ref) => {
80
68
  const { lineHeights: { smallTextCompressed }, } = useTheme();
81
69
  const componentVariant = useComponentVariant(variant);
82
- return (React.createElement(WrapperButton, Object.assign({ as: asLink ? "a" : "button", ref: ref, className: className, variant: componentVariant, size: size }, props),
70
+ return (React.createElement(WrapperButton, { as: asLink ? "a" : "button", ref: ref, className: className, variant: componentVariant, size: size, ...props },
83
71
  icon && iconSide === "left" && React.createElement(Icon, { size: `${smallTextCompressed}em`, mr: "half", icon: icon }),
84
72
  children,
85
73
  icon && iconSide === "right" && React.createElement(Icon, { size: `${smallTextCompressed}em`, ml: "half", icon: icon })));
@@ -45,7 +45,7 @@ const WrapperButton = styled.button(({ disabled, theme }) => ({
45
45
  const CloseButton = React.forwardRef((props, ref) => {
46
46
  const { t } = useTranslation();
47
47
  const theme = useTheme();
48
- return (React.createElement(WrapperButton, Object.assign({ "aria-label": t("close"), ref: ref }, props),
48
+ return (React.createElement(WrapperButton, { "aria-label": t("close"), ref: ref, ...props },
49
49
  React.createElement(Icon, { size: theme.space.x4, icon: "close", p: "half" })));
50
50
  });
51
51
  export default CloseButton;
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import styled from "styled-components";
14
3
  import { layout, space } from "styled-system";
@@ -38,9 +27,6 @@ const StyledButton = styled.button(({ toggled, disabled, theme }) => ({
38
27
  backgroundColor: theme.colors.lightGrey,
39
28
  },
40
29
  }), space, layout);
41
- const ControlIcon = React.forwardRef((_a, ref) => {
42
- var { icon, toggled, disabled, label, size = "x4", type = "button" } = _a, props = __rest(_a, ["icon", "toggled", "disabled", "label", "size", "type"]);
43
- return (React.createElement(StyledButton, Object.assign({ "aria-label": label, ref: ref, disabled: disabled, toggled: toggled, type: type }, props),
44
- React.createElement(Icon, { size: size, icon: icon })));
45
- });
30
+ const ControlIcon = React.forwardRef(({ icon, toggled, disabled, label, size = "x4", type = "button", ...props }, ref) => (React.createElement(StyledButton, { "aria-label": label, ref: ref, disabled: disabled, toggled: toggled, type: type, ...props },
31
+ React.createElement(Icon, { size: size, icon: icon }))));
46
32
  export default ControlIcon;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "./Button";
3
2
  declare const DangerButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
4
3
  export default DangerButton;
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import styled from "styled-components";
14
3
  import { space, variant } from "styled-system";
@@ -18,19 +7,16 @@ import icons from "@nulogy/icons";
18
7
  import { Icon } from "../Icon";
19
8
  import { Text } from "../Type";
20
9
  import { useComponentVariant } from "../NDSProvider/ComponentVariantContext";
21
- const IconWrapper = styled.span(({ theme, size }) => {
22
- var _a, _b;
23
- return ({
24
- display: "inline-flex",
25
- flexShrink: 0,
26
- alignItems: "center",
27
- justifyContent: "center",
28
- borderRadius: theme.radii.rounded,
29
- height: `calc(${(_a = theme.sizes[size]) !== null && _a !== void 0 ? _a : size} + ${theme.sizes.x1})`,
30
- width: `calc(${(_b = theme.sizes[size]) !== null && _b !== void 0 ? _b : size} + ${theme.sizes.x1})`,
31
- transition: ".2s",
32
- });
33
- });
10
+ const IconWrapper = styled.span(({ theme, size }) => ({
11
+ display: "inline-flex",
12
+ flexShrink: 0,
13
+ alignItems: "center",
14
+ justifyContent: "center",
15
+ borderRadius: theme.radii.rounded,
16
+ height: `calc(${theme.sizes[size] ?? size} + ${theme.sizes.x1})`,
17
+ width: `calc(${theme.sizes[size] ?? size} + ${theme.sizes.x1})`,
18
+ transition: ".2s",
19
+ }));
34
20
  const HoverText = styled.div(({ theme }) => ({
35
21
  whiteSpace: "nowrap",
36
22
  ontSize: theme.fontSizes.small,
@@ -42,61 +28,58 @@ const HoverText = styled.div(({ theme }) => ({
42
28
  padding: `${theme.space.half} ${theme.space.x1}`,
43
29
  pointerEvents: "none",
44
30
  }));
45
- const WrapperButton = styled.button(({ disabled, hoverBackgroundColor, theme }) => {
46
- var _a;
47
- return ({
48
- background: "transparent",
49
- border: "none",
50
- position: "relative",
51
- display: "inline-flex",
52
- alignItems: "center",
53
- cursor: disabled ? "default" : "pointer",
54
- [`${Text}`]: {
55
- display: "block",
56
- fontWeight: theme.fontWeights.medium,
57
- textAlign: "left",
31
+ const WrapperButton = styled.button(({ disabled, hoverBackgroundColor, theme }) => ({
32
+ background: "transparent",
33
+ border: "none",
34
+ position: "relative",
35
+ display: "inline-flex",
36
+ alignItems: "center",
37
+ cursor: disabled ? "default" : "pointer",
38
+ [`${Text}`]: {
39
+ display: "block",
40
+ fontWeight: theme.fontWeights.medium,
41
+ textAlign: "left",
42
+ },
43
+ [`${HoverText}`]: {
44
+ opacity: "0",
45
+ },
46
+ "&:hover": {
47
+ [`${IconWrapper}`]: {
48
+ backgroundColor: theme.colors[hoverBackgroundColor] ?? hoverBackgroundColor,
58
49
  },
59
50
  [`${HoverText}`]: {
60
- opacity: "0",
51
+ opacity: "1",
61
52
  },
62
- "&:hover": {
63
- [`${IconWrapper}`]: {
64
- backgroundColor: (_a = theme.colors[hoverBackgroundColor]) !== null && _a !== void 0 ? _a : hoverBackgroundColor,
65
- },
66
- [`${HoverText}`]: {
67
- opacity: "1",
68
- },
53
+ },
54
+ "&:active": {
55
+ [`${IconWrapper}`]: {
56
+ transform: "scale(0.875)",
57
+ transition: ".2s ease-in",
69
58
  },
70
- "&:active": {
59
+ },
60
+ "&:disabled": {
61
+ opacity: ".5",
62
+ "&:hover, &:active": {
71
63
  [`${IconWrapper}`]: {
72
- transform: "scale(0.875)",
73
- transition: ".2s ease-in",
64
+ background: "none",
65
+ transform: "none",
74
66
  },
75
67
  },
76
- "&:disabled": {
77
- opacity: ".5",
78
- "&:hover, &:active": {
79
- [`${IconWrapper}`]: {
80
- background: "none",
81
- transform: "none",
82
- },
83
- },
68
+ },
69
+ "&:focus": {
70
+ outline: "none",
71
+ [`${IconWrapper}`]: {
72
+ boxShadow: theme.shadows.focus,
84
73
  },
85
- "&:focus": {
86
- outline: "none",
87
- [`${IconWrapper}`]: {
88
- boxShadow: theme.shadows.focus,
89
- },
90
- [`${HoverText}`]: {
91
- opacity: "1",
92
- },
74
+ [`${HoverText}`]: {
75
+ opacity: "1",
93
76
  },
94
- paddingTop: theme.space.half,
95
- paddingBottom: theme.space.half,
96
- paddingLeft: theme.space.none,
97
- paddingRight: theme.space.none,
98
- });
99
- }, variant({
77
+ },
78
+ paddingTop: theme.space.half,
79
+ paddingBottom: theme.space.half,
80
+ paddingLeft: theme.space.none,
81
+ paddingRight: theme.space.none,
82
+ }), variant({
100
83
  variants: {
101
84
  touch: {
102
85
  fontSize: "md",
@@ -104,10 +87,9 @@ const WrapperButton = styled.button(({ disabled, hoverBackgroundColor, theme })
104
87
  },
105
88
  },
106
89
  }), space);
107
- const IconicButton = React.forwardRef((_a, forwardedRef) => {
108
- var { children, color = "darkBlue", hoverBackgroundColor = "lightBlue", icon, labelHidden, className, iconSize = "x3", fontSize, tooltip, variant } = _a, props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip", "variant"]);
90
+ const IconicButton = React.forwardRef(({ children, color = "darkBlue", hoverBackgroundColor = "lightBlue", icon, labelHidden, className, iconSize = "x3", fontSize, tooltip, variant, ...props }, forwardedRef) => {
109
91
  const componentVariant = useComponentVariant(variant);
110
- return (React.createElement(WrapperButton, Object.assign({ ref: forwardedRef, "aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined, className: className, hoverBackgroundColor: hoverBackgroundColor, variant: componentVariant }, props),
92
+ return (React.createElement(WrapperButton, { ref: forwardedRef, "aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined, className: className, hoverBackgroundColor: hoverBackgroundColor, variant: componentVariant, ...props },
111
93
  React.createElement(Manager, null,
112
94
  React.createElement(Reference, null, ({ ref }) => (React.createElement(IconWrapper, { ref: ref, size: iconSize },
113
95
  React.createElement(Icon, { size: iconSize, icon: icon, color: color })))),
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "./Button";
3
2
  declare const PrimaryButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
4
3
  export default PrimaryButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "./Button";
3
2
  declare const QuietButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
4
3
  export default QuietButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FlexProps } from "../Flex/Flex";
3
2
  type ButtonGroupProps = FlexProps & {
4
3
  children?: React.ReactNode;
@@ -24,7 +24,13 @@ const buttonSpacings = (theme) => ({
24
24
  });
25
25
  const getAlignment = (alignment) => alignments[alignment] || alignments.left;
26
26
  const getButtonSpacing = (alignment, theme) => buttonSpacings(theme)[alignment] || buttonSpacings(theme).left;
27
- const ButtonGroup = styled(Flex)(({ alignment = "left", theme }) => (Object.assign({ flexWrap: "wrap", marginBottom: `-${theme.space.x1}`, justifyContent: getAlignment(alignment), button: {
27
+ const ButtonGroup = styled(Flex)(({ alignment = "left", theme }) => ({
28
+ flexWrap: "wrap",
29
+ marginBottom: `-${theme.space.x1}`,
30
+ justifyContent: getAlignment(alignment),
31
+ button: {
28
32
  marginBottom: theme.space.x1,
29
- } }, getButtonSpacing(alignment, theme))));
33
+ },
34
+ ...getButtonSpacing(alignment, theme),
35
+ }));
30
36
  export default ButtonGroup;
@@ -1,17 +1,5 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import { Box } from "../Box";
14
- export default function Card(_a) {
15
- var { borderRadius = "medium", boxShadow = "small", py = "x2", px = "x2", position = "relative", children } = _a, props = __rest(_a, ["borderRadius", "boxShadow", "py", "px", "position", "children"]);
16
- return (React.createElement(Box, Object.assign({ border: "1px solid", borderColor: "lightGrey", borderRadius: borderRadius, boxShadow: boxShadow, py: py, px: px, position: position }, props), children));
3
+ export default function Card({ borderRadius = "medium", boxShadow = "small", py = "x2", px = "x2", position = "relative", children, ...props }) {
4
+ return (React.createElement(Box, { border: "1px solid", borderColor: "lightGrey", borderRadius: borderRadius, boxShadow: boxShadow, py: py, px: px, position: position, ...props }, children));
17
5
  }
@@ -47,7 +47,7 @@ export const AdvancedUsage = () => {
47
47
  React.createElement(TopBar.BackLink, { href: "/cycle-counts" }, "Cycle counts"),
48
48
  React.createElement(TopBar.PageTitle, null, "Cycle count #3992"),
49
49
  React.createElement(TopBar.Menu, null, menuItems.map((props) => (React.createElement(TopBar.MenuItem, { key: props.title },
50
- React.createElement(TopBar.MenuItemLink, Object.assign({}, props))))))) },
50
+ React.createElement(TopBar.MenuItemLink, { ...props })))))) },
51
51
  React.createElement(Page, { fullHeight: true },
52
52
  React.createElement(CardSet, null, [...Array(10)].map((_, i) => (React.createElement(AdvancedCard, { key: i })))))));
53
53
  };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const CardSet: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("../Box").BoxProps> & import("../Box").BoxProps, keyof import("../Flex/Flex").FlexProps> & import("../Flex/Flex").FlexProps, never>> & string;
3
2
  export default CardSet;
@@ -68,7 +68,16 @@ const VisualCheckbox = styled.div(({ indeterminate, theme }) => ({
68
68
  marginBottom: theme.space.x0_5,
69
69
  },
70
70
  // checkmark
71
- "&:before": Object.assign({ content: "''", display: "none", position: "relative", left: theme.space.half, width: theme.sizes.half, height: theme.sizes.x1, border: `solid ${theme.colors.white}` }, (indeterminate ? indeterminateStyles : checkedStyles)),
71
+ "&:before": {
72
+ content: "''",
73
+ display: "none",
74
+ position: "relative",
75
+ left: theme.space.half,
76
+ width: theme.sizes.half,
77
+ height: theme.sizes.x1,
78
+ border: `solid ${theme.colors.white}`,
79
+ ...(indeterminate ? indeterminateStyles : checkedStyles),
80
+ },
72
81
  }), addStyledProps);
73
82
  const CheckboxInput = styled.input((props) => ({
74
83
  position: "absolute",
@@ -78,19 +87,24 @@ const CheckboxInput = styled.input((props) => ({
78
87
  [`&:focus + ${VisualCheckbox}`]: {
79
88
  boxShadow: props.theme.shadows.focus,
80
89
  },
81
- [`&:checked + ${VisualCheckbox}`]: Object.assign(Object.assign({}, getCheckboxStyle(props, "checked")), { "&:before": {
90
+ [`&:checked + ${VisualCheckbox}`]: {
91
+ ...getCheckboxStyle(props, "checked"),
92
+ "&:before": {
82
93
  display: "block",
83
- } }),
84
- [`&:not(:checked) + ${VisualCheckbox}`]: Object.assign({}, getCheckboxStyle(props, "unchecked")),
94
+ },
95
+ },
96
+ [`&:not(:checked) + ${VisualCheckbox}`]: {
97
+ ...getCheckboxStyle(props, "unchecked"),
98
+ },
85
99
  }));
86
100
  const Checkbox = forwardRef((props, ref) => {
87
101
  const { variant, className, labelText, disabled, checked, required, error, indeterminate } = props;
88
102
  const componentVariant = useComponentVariant(variant);
89
103
  const spaceProps = getSubset(props, propTypes.space);
90
104
  const restProps = omitSubset(props, propTypes.space);
91
- return (React.createElement(Box, Object.assign({ className: className, px: "0" }, spaceProps),
105
+ return (React.createElement(Box, { className: className, px: "0", ...spaceProps },
92
106
  React.createElement(ClickInputLabel, { variant: componentVariant, disabled: disabled },
93
- React.createElement(CheckboxInput, Object.assign({ type: "checkbox", required: required, "aria-required": required, "aria-invalid": error, indeterminate: indeterminate, ref: ref }, restProps)),
107
+ React.createElement(CheckboxInput, { type: "checkbox", required: required, "aria-required": required, "aria-invalid": error, indeterminate: indeterminate, ref: ref, ...restProps }),
94
108
  React.createElement(VisualCheckbox, { disabled: disabled, checked: checked, indeterminate: indeterminate, "data-testid": "visual-checkbox" }),
95
109
  labelText && (React.createElement(Text, { fontSize: componentVariant === "touch" ? "md" : undefined, lineHeight: componentVariant === "touch" ? "base" : undefined, disabled: disabled, ml: "x1" }, labelText)))));
96
110
  });
@@ -4,7 +4,10 @@ class CheckboxWithState extends React.Component {
4
4
  constructor(props) {
5
5
  super(props);
6
6
  this.handleChange = (key) => {
7
- this.setState((state) => (Object.assign(Object.assign({}, state), { [key]: !state[key] })));
7
+ this.setState((state) => ({
8
+ ...state,
9
+ [key]: !state[key],
10
+ }));
8
11
  };
9
12
  this.state = { checkbox1: false, checkbox2: false };
10
13
  }
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React from "react";
13
2
  import styled from "styled-components";
14
3
  import { HelpText, RequirementText } from "../FieldLabel";
@@ -18,9 +7,8 @@ import { InlineIcon } from "../Icon";
18
7
  import { Tooltip } from "../Tooltip";
19
8
  import LabelText, { LabelContent } from "../FieldLabel/LabelText";
20
9
  import Checkbox from "./Checkbox";
21
- export default function CheckboxGroup(_a) {
22
- var { className, id, errorMessage, errorList, labelText, helpText, requirementText, hint } = _a, props = __rest(_a, ["className", "id", "errorMessage", "errorList", "labelText", "helpText", "requirementText", "hint"]);
23
- const otherProps = Object.assign(Object.assign({}, props), { errorMessage, errorList });
10
+ export default function CheckboxGroup({ className, id, errorMessage, errorList, labelText, helpText, requirementText, hint, ...props }) {
11
+ const otherProps = { ...props, errorMessage, errorList };
24
12
  return (React.createElement(Fieldset, { className: className, id: id },
25
13
  React.createElement(Legend, null,
26
14
  React.createElement(LabelContent, { "data-testid": "label-content" },
@@ -34,8 +22,8 @@ export default function CheckboxGroup(_a) {
34
22
  }
35
23
  const getCheckboxButtons = (props) => {
36
24
  const checkboxButtons = React.Children.map(props.children, (checkbox) => {
37
- const _a = checkbox.props, { value, disabled, required, onChange } = _a, checkboxProps = __rest(_a, ["value", "disabled", "required", "onChange"]);
38
- return (React.createElement(Checkbox, Object.assign({}, checkboxProps, { value: value, disabled: props.disabled || disabled, error: !!(props.errorMessage || props.errorList), required: props.required || required, name: props.name, defaultChecked: props.defaultValue ? props.defaultValue.includes(value) : undefined, checked: props.checkedValue ? props.checkedValue.includes(value) : undefined, onChange: props.onChange || onChange })));
25
+ const { value, disabled, required, onChange, ...checkboxProps } = checkbox.props;
26
+ return (React.createElement(Checkbox, { ...checkboxProps, value: value, disabled: props.disabled || disabled, error: !!(props.errorMessage || props.errorList), required: props.required || required, name: props.name, defaultChecked: props.defaultValue ? props.defaultValue.includes(value) : undefined, checked: props.checkedValue ? props.checkedValue.includes(value) : undefined, onChange: props.onChange || onChange }));
39
27
  });
40
28
  return checkboxButtons;
41
29
  };