@nulogy/components 11.0.0-beta.5 → 11.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.
Files changed (185) hide show
  1. package/dist/main.js +34732 -37203
  2. package/dist/main.module.js +34757 -37226
  3. package/dist/src/Alert/Alert.d.ts +1 -1
  4. package/dist/src/Alert/Alert.story.d.ts +1 -4
  5. package/dist/src/Alert/CloseButton.d.ts +1 -1
  6. package/dist/src/AsyncSelect/AsyncSelect.d.ts +2 -2
  7. package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +3 -3
  8. package/dist/src/AsyncSelect/fixtures.d.ts +5 -0
  9. package/dist/src/BottomSheet/BottomSheet.d.ts +23 -0
  10. package/dist/src/BottomSheet/BottomSheet.parts.d.ts +44 -0
  11. package/dist/src/BottomSheet/BottomSheet.styled.d.ts +38 -0
  12. package/dist/src/BottomSheet/BottomSheetProvider.d.ts +12 -0
  13. package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +7 -0
  14. package/dist/src/BottomSheet/stories/BottomSheet.content.story.d.ts +7 -0
  15. package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +8 -0
  16. package/dist/src/BottomSheet/stories/BottomSheet.parts.story.d.ts +6 -0
  17. package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +6 -0
  18. package/dist/src/Box/index.d.ts +1 -0
  19. package/dist/src/BrandedNavBar/MobileMenu.d.ts +2 -2
  20. package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
  21. package/dist/src/BrandedNavBar/isValidMenuItem.d.ts +1 -2
  22. package/dist/src/Branding/BrandingText.d.ts +5 -2
  23. package/dist/src/Branding/LettermarkLogo.d.ts +2 -2
  24. package/dist/src/Branding/WordmarkLogo.d.ts +3 -2
  25. package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +4 -9
  26. package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +0 -1
  27. package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +2 -2
  28. package/dist/src/Button/Button.d.ts +4 -3
  29. package/dist/src/Button/CloseButton.d.ts +3 -1
  30. package/dist/src/Button/ControlIcon.d.ts +5 -6
  31. package/dist/src/Button/DangerButton.d.ts +1 -1
  32. package/dist/src/Button/IconicButton.d.ts +2 -2
  33. package/dist/src/Button/IconicButton.story.d.ts +0 -1
  34. package/dist/src/Button/PrimaryButton.d.ts +2 -1
  35. package/dist/src/Button/QuietButton.d.ts +1 -1
  36. package/dist/src/ButtonGroup/ButtonGroup.d.ts +7 -5
  37. package/dist/src/Card/Card.d.ts +2 -3
  38. package/dist/src/Card/CardSet.d.ts +5 -3
  39. package/dist/src/Checkbox/Checkbox.d.ts +4 -3
  40. package/dist/src/Checkbox/Checkbox.story.d.ts +0 -1
  41. package/dist/src/Checkbox/CheckboxGroup.d.ts +3 -2
  42. package/dist/src/DatePicker/DatePicker.d.ts +3 -3
  43. package/dist/src/DatePicker/DatePicker.story.d.ts +0 -1
  44. package/dist/src/DatePicker/DatePickerHeader.d.ts +6 -6
  45. package/dist/src/DatePicker/DatePickerInput.d.ts +3 -3
  46. package/dist/src/DatePicker/DatePickerStyles.d.ts +4 -1
  47. package/dist/src/DateRange/DateRange.d.ts +3 -3
  48. package/dist/src/DateRange/DateRange.story.d.ts +0 -1
  49. package/dist/src/DateRange/EndTime.d.ts +3 -3
  50. package/dist/src/DateRange/StartTime.d.ts +3 -3
  51. package/dist/src/Divider/Divider.d.ts +2 -3
  52. package/dist/src/Divider/Divider.story.d.ts +4 -2
  53. package/dist/src/DropdownMenu/DropdownButton.d.ts +2 -2
  54. package/dist/src/DropdownMenu/DropdownItem.d.ts +2 -5
  55. package/dist/src/DropdownMenu/DropdownLink.d.ts +5 -7
  56. package/dist/src/DropdownMenu/DropdownMenu.d.ts +5 -5
  57. package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +0 -1
  58. package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
  59. package/dist/src/DropdownMenu/DropdownText.d.ts +7 -3
  60. package/dist/src/FieldLabel/FieldLabel.d.ts +1 -10
  61. package/dist/src/FieldLabel/HelpText.d.ts +2 -3
  62. package/dist/src/Form/Fieldset.d.ts +1 -2
  63. package/dist/src/Form/FormSection.d.ts +3 -3
  64. package/dist/src/Icon/Icon.d.ts +1 -1
  65. package/dist/src/Icon/LoadingIcon.d.ts +4 -2
  66. package/dist/src/Input/Input.d.ts +3 -4
  67. package/dist/src/Input/Input.story.d.ts +1 -1
  68. package/dist/src/Input/InputField.d.ts +8 -6
  69. package/dist/src/Input/Suffix.d.ts +4 -11
  70. package/dist/src/Layout/Header.d.ts +1 -1
  71. package/dist/src/Layout/Page.d.ts +1 -1
  72. package/dist/src/Link/Link.d.ts +11 -3
  73. package/dist/src/Link/Link.story.d.ts +0 -1
  74. package/dist/src/List/List.d.ts +3 -5
  75. package/dist/src/List/ListItem.d.ts +4 -5
  76. package/dist/src/LoadingAnimation/LoadingAnimation.d.ts +4 -4
  77. package/dist/src/Modal/Modal.d.ts +1 -1
  78. package/dist/src/Modal/ModalCloseButton.d.ts +3 -1
  79. package/dist/src/Modal/ModalContent.d.ts +1 -1
  80. package/dist/src/NDSProvider/ComponentVariantContext.d.ts +10 -0
  81. package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +10 -0
  82. package/dist/src/NDSProvider/NDSProvider.d.ts +5 -13
  83. package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +1 -1
  84. package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +1 -1
  85. package/dist/src/NDSProvider/useNDSTheme.d.ts +12 -0
  86. package/dist/src/NavBarSearch/NavBarSearch.d.ts +5 -16
  87. package/dist/src/Overlay/Overlay.d.ts +7 -6
  88. package/dist/src/Pagination/NextButton.d.ts +1 -14
  89. package/dist/src/Pagination/PageNumber.d.ts +4 -1
  90. package/dist/src/Pagination/Pagination.d.ts +5 -29
  91. package/dist/src/Pagination/PaginationButton.d.ts +4 -1
  92. package/dist/src/Pagination/PreviousButton.d.ts +1 -14
  93. package/dist/src/Popper/Popper.d.ts +2 -2
  94. package/dist/src/Radio/Radio.d.ts +3 -3
  95. package/dist/src/Radio/Radio.story.d.ts +0 -1
  96. package/dist/src/Radio/RadioGroup.d.ts +7 -17
  97. package/dist/src/RangeContainer/RangeContainer.d.ts +4 -3
  98. package/dist/src/Select/Select.d.ts +23 -24
  99. package/dist/src/Select/Select.story.d.ts +8 -4
  100. package/dist/src/Select/SelectComponents.d.ts +7 -9
  101. package/dist/src/Select/SelectOption.d.ts +9 -10
  102. package/dist/src/Select/customReactSelectStyles.d.ts +8 -8
  103. package/dist/src/Select/index.d.ts +2 -2
  104. package/dist/src/StatusIndicator/StatusIndicator.d.ts +1 -1
  105. package/dist/src/StyledProps/index.d.ts +5 -1
  106. package/dist/src/Summary/Summary.d.ts +1 -1
  107. package/dist/src/Summary/SummaryContext.d.ts +1 -1
  108. package/dist/src/Summary/SummaryItem.d.ts +1 -1
  109. package/dist/src/Switcher/Switch.d.ts +2 -2
  110. package/dist/src/Switcher/Switcher.d.ts +3 -3
  111. package/dist/src/Switcher/Switcher.story.d.ts +0 -1
  112. package/dist/src/Table/BaseTable.d.ts +1 -17
  113. package/dist/src/Table/SortingColumnHeader.d.ts +8 -23
  114. package/dist/src/Table/StatefulTable.d.ts +8 -8
  115. package/dist/src/Table/StyledTh.d.ts +0 -2
  116. package/dist/src/Table/Table.d.ts +5 -25
  117. package/dist/src/Table/Table.types.d.ts +0 -27
  118. package/dist/src/Table/TableCell.d.ts +2 -2
  119. package/dist/src/Table/TableFoot.d.ts +0 -26
  120. package/dist/src/Tabs/Tab.d.ts +4 -4
  121. package/dist/src/Tabs/TabContainer.d.ts +1 -1
  122. package/dist/src/Tabs/TabScrollIndicator.d.ts +4 -3
  123. package/dist/src/Tabs/Tabs.d.ts +4 -3
  124. package/dist/src/Tabs/Tabs.story.d.ts +0 -1
  125. package/dist/src/Textarea/StyledTextarea.d.ts +3 -3
  126. package/dist/src/Textarea/Textarea.story.d.ts +0 -1
  127. package/dist/src/TimePicker/TimePicker.d.ts +3 -3
  128. package/dist/src/TimePicker/TimePicker.story.d.ts +0 -1
  129. package/dist/src/TimePicker/TimePickerOption.d.ts +2 -2
  130. package/dist/src/TimeRange/TimeRange.d.ts +2 -2
  131. package/dist/src/Toast/Toast.d.ts +1 -11
  132. package/dist/src/ToastContainer/ToastContainer.d.ts +1 -12
  133. package/dist/src/Toggle/Toggle.d.ts +3 -3
  134. package/dist/src/Toggle/Toggle.story.d.ts +1 -1
  135. package/dist/src/Toggle/ToggleButton.d.ts +1 -1
  136. package/dist/src/Tooltip/Tooltip.d.ts +1 -1
  137. package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
  138. package/dist/src/TruncatedText/MaybeTooltip.d.ts +1 -12
  139. package/dist/src/TruncatedText/TruncatedText.d.ts +1 -24
  140. package/dist/src/TruncatedText/TruncatedTextProps.d.ts +2 -1
  141. package/dist/src/Type/Headings.d.ts +4 -8
  142. package/dist/src/Type/Text.d.ts +5 -7
  143. package/dist/src/Validation/InlineValidation.d.ts +2 -2
  144. package/dist/src/VisualTests/KitchenSink.story.d.ts +6 -0
  145. package/dist/src/index.d.ts +1 -3
  146. package/dist/src/locales.const.d.ts +9 -9
  147. package/dist/src/pages/ErrorPage.story.d.ts +8 -0
  148. package/dist/src/scripts/generateTheme.d.ts +1 -0
  149. package/dist/src/theme.d.ts +5 -3
  150. package/dist/src/theme.type.d.ts +15 -3
  151. package/dist/src/utils/ClickInputLabel.d.ts +3 -3
  152. package/dist/src/utils/DetectOutsideClick.d.ts +1 -16
  153. package/dist/src/utils/PopperArrow.d.ts +4 -3
  154. package/dist/src/utils/PreventBodyElementScrolling.d.ts +1 -15
  155. package/dist/src/utils/ScrollIndicators.d.ts +0 -6
  156. package/dist/src/utils/localized-date-fns.d.ts +1 -1
  157. package/dist/src/utils/noop.d.ts +5 -0
  158. package/dist/src/utils/story/dashed.d.ts +9 -0
  159. package/dist/src/utils/story/placeholder.d.ts +7 -0
  160. package/dist/src/utils/story/simulatedAPIRequests.d.ts +4 -0
  161. package/dist/src/utils/subPx.d.ts +9 -2
  162. package/dist/src/utils/subset.d.ts +1 -0
  163. package/dist/src/utils/ts/FocusManager.d.ts +1 -1
  164. package/dist/src/utils/useWindowDimensions.d.ts +1 -1
  165. package/package.json +18 -15
  166. package/dist/src/NDSProvider/ComponentSizeContext.d.ts +0 -9
  167. package/dist/src/NavBar/DesktopMenu.d.ts +0 -18
  168. package/dist/src/NavBar/MenuTrigger.d.ts +0 -29
  169. package/dist/src/NavBar/MobileMenu.d.ts +0 -34
  170. package/dist/src/NavBar/NavBar.d.ts +0 -66
  171. package/dist/src/NavBar/NavBar.story.d.ts +0 -77
  172. package/dist/src/NavBar/NavBarDropdownMenu.d.ts +0 -3
  173. package/dist/src/NavBar/SmallNavBar.d.ts +0 -3
  174. package/dist/src/NavBar/SubMenuTrigger.d.ts +0 -15
  175. package/dist/src/NavBar/index.d.ts +0 -1
  176. package/dist/src/NavBar/isValidMenuItem.d.ts +0 -2
  177. package/dist/src/NavBar/renderSubMenuItems.d.ts +0 -2
  178. package/dist/src/Select/MenuList.d.ts +0 -3
  179. package/dist/src/Select/Select.story.fixture.d.ts +0 -19
  180. package/dist/src/Select/lib.d.ts +0 -20
  181. package/dist/src/utils/DeprecatedComponent.d.ts +0 -2
  182. package/dist/src/utils/conditionallyRequiredProp.d.ts +0 -1
  183. package/dist/src/utils/dashed.d.ts +0 -6
  184. package/dist/src/utils/deprecatedProp.d.ts +0 -1
  185. package/dist/src/utils/story/simulatedAPIRequest.d.ts +0 -5
@@ -1,22 +1,8 @@
1
- export default PreventBodyElementScrolling;
2
- declare class PreventBodyElementScrolling extends React.Component<any, any, any> {
1
+ export default class PreventBodyElementScrolling extends React.Component<any, any, any> {
3
2
  constructor(props: any);
4
3
  constructor(props: any, context: any);
5
4
  componentDidMount(): void;
6
5
  componentWillUnmount(): void;
7
6
  render(): React.JSX.Element;
8
7
  }
9
- declare namespace PreventBodyElementScrolling {
10
- namespace propTypes {
11
- const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- const scrollableRef: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{}>>>;
13
- }
14
- namespace defaultProps {
15
- const children_1: any;
16
- export { children_1 as children };
17
- const scrollableRef_1: any;
18
- export { scrollableRef_1 as scrollableRef };
19
- }
20
- }
21
8
  import React from "react";
22
- import PropTypes from "prop-types";
@@ -13,10 +13,4 @@ declare class ScrollIndicators extends React.Component<any, any, any> {
13
13
  contentHiddenAbove(): boolean;
14
14
  render(): React.JSX.Element;
15
15
  }
16
- declare namespace ScrollIndicators {
17
- namespace propTypes {
18
- const children: PropTypes.Validator<PropTypes.ReactElementLike>;
19
- }
20
- }
21
16
  import React from "react";
22
- import PropTypes from "prop-types";
@@ -1 +1 @@
1
- export function localizedFormat(date: any, stringFormat: any, ndsLocale: any): string;
1
+ export declare function localizedFormat(date: number, dateFormat: string, ndsLocale: string): string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * No operation function that does nothing and returns nothing.
3
+ * Useful as a default callback or placeholder.
4
+ */
5
+ export declare function noop(): void;
@@ -0,0 +1,9 @@
1
+ import { StyledComponent } from "styled-components";
2
+ import { ComponentType } from "react";
3
+ import { DefaultNDSThemeType } from "../../theme.type";
4
+ /**
5
+ * A styled utility that adds a dashed border around a component
6
+ * to highlight its boundaries. To be used in Storybook exclusively.
7
+ * Do not export for production.
8
+ */
9
+ export declare const dashed: <P extends object>(component: ComponentType<P>) => StyledComponent<ComponentType<P>, DefaultNDSThemeType, {}, never>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { BoxProps } from "../../Box";
3
+ /**
4
+ * A dialognaly striped and bordered rectangle that can be used as a placeholder for content.
5
+ * To be used in Storybook exclusively. Do not export for production.
6
+ */
7
+ export declare function Placeholder(props: BoxProps): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function filterOptions(inputValue: string, options: {
2
+ value: string;
3
+ label: string;
4
+ }[], simulatedNetworkDelayMs?: number): Promise<Response>;
@@ -1,2 +1,9 @@
1
- export default subPx;
2
- declare function subPx(val1: any, val2: any): string;
1
+ type CSSUnit = string;
2
+ /**
3
+ * Subtracts two CSS measurements using calc()
4
+ * @param baseValue The starting CSS measurement
5
+ * @param subtractValue The value to subtract (defaults to '1px')
6
+ * @returns A CSS calc() expression
7
+ */
8
+ export default function subPx(baseValue: CSSUnit, subtractValue?: CSSUnit): string;
9
+ export {};
@@ -1,2 +1,3 @@
1
1
  export function getSubset(o: any, propObj: any): any;
2
2
  export function omitSubset(o: any, propObj: any): {};
3
+ export function pick(o: any, ...fields: any[]): any;
@@ -13,5 +13,5 @@ type FocusManagerProps = {
13
13
  defaultFocusedIndex: number | null;
14
14
  children: (handlers: ChildrenHandlers) => ReactNode;
15
15
  };
16
- declare const FocusManager: React.FC<FocusManagerProps>;
16
+ declare const FocusManager: React.FC<React.PropsWithChildren<FocusManagerProps>>;
17
17
  export default FocusManager;
@@ -1,4 +1,4 @@
1
- export function getWindowDimensionInfo(width: any, height: any): {
1
+ export function getWindowDimensionInfo(width: any, height: any, theme: any): {
2
2
  width: any;
3
3
  height: any;
4
4
  widthBreakpoints: {
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "11.0.0-beta.5",
3
+ "version": "11.1.0",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
+ "ci": "yarn && yarn build && yarn test && yarn run check",
10
11
  "new": "plop",
11
- "start": "concurrently \"yarn build --watch\" \"start-storybook -p 9999\"",
12
- "start:e2e": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",
12
+ "generate:theme": "npx tsx src/scripts/generateTheme.ts && prettier -w src/theme.ts",
13
+ "start": "concurrently \"yarn build --watch\" \"yarn start:storybook\"",
14
+ "start:cypress": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",
15
+ "start:storybook": "start-storybook -p 9999",
16
+ "clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
13
17
  "build": "rollup -c",
14
18
  "build:storybook": "build-storybook",
15
19
  "check": "yarn check:types && yarn check:lint && yarn check:format",
@@ -19,9 +23,9 @@
19
23
  "fix": "yarn fix:lint && yarn fix:format",
20
24
  "fix:lint": "yarn check:lint --fix",
21
25
  "fix:format": "prettier -w .",
22
- "test": "yarn test:components && yarn run test:e2e",
26
+ "test": "yarn test:components && yarn run test:cypress",
23
27
  "test:components": "jest",
24
- "test:e2e": "yarn build:storybook && yarn concurrently --success \"first\" --kill-others \"yarn http-server -p 9999 ./storybook-static\" \"yarn wait-on http://localhost:9999 && yarn cypress run\"",
28
+ "test:cypress": "yarn build:storybook && yarn concurrently --success \"first\" --kill-others \"yarn http-server -p 9999 ./storybook-static\" \"yarn wait-on http://localhost:9999 && yarn cypress run\"",
25
29
  "test:visual": "npx chromatic --project-token $CHROMATIC_TOKEN --exit-zero-on-changes"
26
30
  },
27
31
  "license": "MIT",
@@ -52,7 +56,8 @@
52
56
  "@nulogy/icons": "4",
53
57
  "react": ">=16.10.2",
54
58
  "react-dom": ">=16.10.2",
55
- "styled-components": "^5.1.0"
59
+ "styled-components": "^5.1.0",
60
+ "typescript": "4.9.5"
56
61
  },
57
62
  "devDependencies": {
58
63
  "@babel/core": "^7.0.0-0",
@@ -63,7 +68,7 @@
63
68
  "@babel/preset-env": "7.3.1",
64
69
  "@babel/preset-typescript": "^7.10.4",
65
70
  "@nulogy/eslint-config-nulogy": "^1.0.0",
66
- "@nulogy/icons": "^4.26.0",
71
+ "@nulogy/icons": "4.34.1",
67
72
  "@rollup/plugin-babel": "^5.0.0",
68
73
  "@rollup/plugin-node-resolve": "^7.1.3",
69
74
  "@semantic-release/changelog": "^6.0.2",
@@ -74,6 +79,7 @@
74
79
  "@semantic-release/release-notes-generator": "^10.0.3",
75
80
  "@storybook/addon-a11y": "^6.1.9",
76
81
  "@storybook/addon-actions": "^6.1.9",
82
+ "@storybook/addon-docs": "6.1.9",
77
83
  "@storybook/addon-knobs": "^6.1.9",
78
84
  "@storybook/addon-storysource": "^6.1.9",
79
85
  "@storybook/addon-viewport": "^7.6.6",
@@ -110,14 +116,12 @@
110
116
  "eslint-plugin-prettier": "^3.1.4",
111
117
  "http-server": "^14.0.0",
112
118
  "husky": "^4.3.0",
113
- "jest": "29.5.0",
119
+ "jest": "29.7.0",
114
120
  "jest-environment-jsdom": "^29.5.0",
115
121
  "jest-styled-components": "7",
116
122
  "jscodeshift": "^0.11.0",
117
123
  "mockdate": "^3.0.2",
118
124
  "plop": "^2.4.0",
119
- "prettier": "^3.3.2",
120
- "prop-types": "15.7.2",
121
125
  "react": "17.0.2",
122
126
  "react-color": "^2.18.1",
123
127
  "react-dom": "17.0.2",
@@ -141,13 +145,12 @@
141
145
  "dependencies": {
142
146
  "@babel/runtime": "^7.9.6",
143
147
  "@nulogy/tokens": "^5.4.0",
148
+ "@reach/dialog": "0.17.0",
144
149
  "@styled-system/prop-types": "^5.1.4",
145
150
  "@styled-system/theme-get": "^5.1.2",
146
- "@types/react-window": "^1.8.8",
147
151
  "@types/styled-system": "5.1.22",
148
152
  "body-scroll-lock": "^3.1.5",
149
153
  "core-js": "3",
150
- "create-react-context": "^0.3.0",
151
154
  "date-fns": "2.23.0",
152
155
  "debounce": "^1.2.0",
153
156
  "deep-equal": "^2.2.1",
@@ -158,18 +161,18 @@
158
161
  "react-fast-compare": "^3.2.0",
159
162
  "react-hot-toast": "^2.4.1",
160
163
  "react-i18next": "^12.3.1",
161
- "react-input-autosize": "^2.2.2",
162
164
  "react-modal": "^3.14.4",
163
165
  "react-popper": "1.3.11",
164
166
  "react-popper-2": "npm:react-popper@2.2.4",
165
167
  "react-resize-detector": "^9.1.0",
166
168
  "react-select": "^5.8.0",
167
- "react-window": "^1.8.10",
169
+ "react-windowed-select": "^5.2.0",
170
+ "smoothscroll-polyfill": "^0.4.4",
168
171
  "styled-system": "^5.1.4"
169
172
  },
170
173
  "husky": {
171
174
  "hooks": {
172
- "pre-push": "yarn run check"
175
+ "pre-push": "yarn run ci"
173
176
  }
174
177
  },
175
178
  "jest": {
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- export type ComponentSize = "medium" | "large";
3
- type ComponentSizeContextValue = {
4
- size: ComponentSize;
5
- };
6
- export declare const ComponentSizeContext: React.Context<ComponentSizeContextValue>;
7
- export declare function useComponentSize(selectedSize?: ComponentSize): ComponentSize;
8
- declare const ComponentSizeContextProvider: React.FC<ComponentSizeContextValue>;
9
- export default ComponentSizeContextProvider;
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- declare const DesktopMenu: import("styled-components").StyledComponent<{
4
- ({ menuData, themeColorObject, ...props }: {
5
- [x: string]: any;
6
- menuData: any;
7
- themeColorObject: any;
8
- }): React.JSX.Element;
9
- propTypes: {
10
- menuData: PropTypes.Requireable<PropTypes.InferProps<{}>[]>;
11
- themeColorObject: PropTypes.Requireable<PropTypes.InferProps<{}>>;
12
- };
13
- defaultProps: {
14
- menuData: any;
15
- themeColorObject: any;
16
- };
17
- }, import("styled-components").DefaultTheme, {}, never>;
18
- export default DesktopMenu;
@@ -1,29 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- export type MenuTriggerProps = {
4
- name?: string;
5
- "aria-label"?: string;
6
- color?: string;
7
- hoverColor?: string;
8
- hoverBackground?: string;
9
- menuData?: any[];
10
- };
11
- declare const MenuTrigger: {
12
- (props: any): React.JSX.Element;
13
- propTypes: {
14
- name: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
15
- "aria-label": PropTypes.Requireable<string>;
16
- menuData: PropTypes.Requireable<PropTypes.InferProps<{}>[]>;
17
- color: PropTypes.Requireable<string>;
18
- hoverColor: PropTypes.Requireable<string>;
19
- hoverBackground: PropTypes.Requireable<string>;
20
- };
21
- defaultProps: {
22
- menuData: any;
23
- "aria-label": any;
24
- color: string;
25
- hoverColor: string;
26
- hoverBackground: string;
27
- };
28
- };
29
- export default MenuTrigger;
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- declare const MobileMenu: import("styled-components").StyledComponent<{
4
- ({ menuData, closeMenu, subtext, includeSubtext, themeColorObject, ...props }: {
5
- [x: string]: any;
6
- menuData: any;
7
- closeMenu: any;
8
- subtext: any;
9
- includeSubtext: any;
10
- themeColorObject: any;
11
- }): React.JSX.Element;
12
- propTypes: {
13
- menuData: PropTypes.Requireable<PropTypes.InferProps<{
14
- primaryMenu: PropTypes.Requireable<PropTypes.InferProps<{}>[]>;
15
- secondaryMenu: PropTypes.Requireable<PropTypes.InferProps<{}>[]>;
16
- }>>;
17
- subtext: PropTypes.Requireable<string>;
18
- includeSubtext: PropTypes.Requireable<boolean>;
19
- closeMenu: PropTypes.Requireable<(...args: any[]) => any>;
20
- themeColorObject: PropTypes.Requireable<PropTypes.InferProps<{
21
- textColor: PropTypes.Requireable<string>;
22
- background: PropTypes.Requireable<string>;
23
- logoColor: PropTypes.Requireable<string>;
24
- }>>;
25
- };
26
- defaultProps: {
27
- menuData: any;
28
- subtext: any;
29
- includeSubtext: boolean;
30
- closeMenu: () => void;
31
- themeColorObject: any;
32
- };
33
- }, import("styled-components").DefaultTheme, {}, never>;
34
- export default MobileMenu;
@@ -1,66 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import { DefaultNDSThemeType } from "../theme.type";
4
- export declare const getThemeColor: (themeColor: any) => any;
5
- export declare const NavBarBackground: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box/Box").BoxProps & {
6
- gap?: import("csstype").Property.Gap<string | number>;
7
- rowGap?: import("csstype").Property.RowGap<string | number>;
8
- columnGap?: import("csstype").Property.ColumnGap<string | number>;
9
- } & {
10
- backgroundColor: string;
11
- theme?: DefaultNDSThemeType;
12
- }, never>;
13
- export declare const BrandingLink: ({ to, href, children, ...props }: {
14
- [x: string]: any;
15
- to: any;
16
- href: any;
17
- children: any;
18
- }) => React.JSX.Element;
19
- export declare const MenuDataPropTypes: {
20
- primaryMenu: PropTypes.Requireable<unknown[]>;
21
- secondaryMenu: PropTypes.Requireable<unknown[]>;
22
- search: PropTypes.Requireable<PropTypes.InferProps<{
23
- onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
24
- }>>;
25
- };
26
- export declare const MobileMenuTrigger: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
27
- hoverColor: string;
28
- hoverBackground: string;
29
- }, never>;
30
- export declare const SmallHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {
31
- isOpen: boolean;
32
- }, never>;
33
- export declare const pixelDigitsFrom: (pixelString: any) => number;
34
- export declare const MenuIcon: {
35
- ({ isOpen }: {
36
- isOpen: any;
37
- }): React.JSX.Element;
38
- propTypes: {
39
- isOpen: PropTypes.Requireable<boolean>;
40
- };
41
- defaultProps: {
42
- isOpen: boolean;
43
- };
44
- };
45
- declare const NavBar: {
46
- (props: any): React.JSX.Element;
47
- propTypes: {
48
- menuData: PropTypes.Requireable<PropTypes.InferProps<{
49
- primaryMenu: PropTypes.Requireable<unknown[]>;
50
- secondaryMenu: PropTypes.Requireable<unknown[]>;
51
- search: PropTypes.Requireable<PropTypes.InferProps<{
52
- onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
53
- }>>;
54
- }>>;
55
- className: PropTypes.Requireable<string>;
56
- breakpointUpper: PropTypes.Requireable<NonNullable<string | number>>;
57
- themeColor: PropTypes.Requireable<string>;
58
- };
59
- defaultProps: {
60
- menuData: any;
61
- className: any;
62
- breakpointUpper: string;
63
- themeColor: string;
64
- };
65
- };
66
- export default NavBar;
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const _NavBar: {
7
- (): React.JSX.Element;
8
- story: {
9
- name: string;
10
- };
11
- };
12
- export declare const WithoutSearch: {
13
- (): React.JSX.Element;
14
- story: {
15
- name: string;
16
- };
17
- };
18
- export declare const WithoutSecondaryMenu: {
19
- (): React.JSX.Element;
20
- story: {
21
- name: string;
22
- };
23
- };
24
- export declare const WithoutSearchAndSecondaryMenu: {
25
- (): React.JSX.Element;
26
- story: {
27
- name: string;
28
- };
29
- };
30
- export declare const WithoutSearchAndPrimaryMenu: {
31
- (): React.JSX.Element;
32
- story: {
33
- name: string;
34
- };
35
- };
36
- export declare const WithBrandingOnly: {
37
- (): React.JSX.Element;
38
- story: {
39
- name: string;
40
- };
41
- };
42
- export declare const WithCustomLinkComponents: {
43
- (): React.JSX.Element;
44
- story: {
45
- name: string;
46
- };
47
- };
48
- export declare const WithTextInTheMenu: {
49
- (): React.JSX.Element;
50
- story: {
51
- name: string;
52
- };
53
- };
54
- export declare const WithSubtext: {
55
- (): React.JSX.Element;
56
- story: {
57
- name: string;
58
- };
59
- };
60
- export declare const WithAlternativeBrandingLink: {
61
- (): React.JSX.Element;
62
- story: {
63
- name: string;
64
- };
65
- };
66
- export declare const WithAlternateThemeColor: {
67
- (): React.JSX.Element;
68
- story: {
69
- name: string;
70
- };
71
- };
72
- export declare const WithReactRouter: {
73
- (): React.JSX.Element;
74
- story: {
75
- name: string;
76
- };
77
- };
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const NavBarDropdownMenu: React.JSXElementConstructor<any>;
3
- export default NavBarDropdownMenu;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SmallNavBar: React.JSXElementConstructor<any>;
3
- export default SmallNavBar;
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- declare const SubMenuTrigger: {
4
- (props: any): React.JSX.Element;
5
- propTypes: {
6
- name: PropTypes.Validator<string>;
7
- menuData: PropTypes.Requireable<PropTypes.InferProps<{}>[]>;
8
- onItemClick: PropTypes.Requireable<(...args: any[]) => any>;
9
- };
10
- defaultProps: {
11
- menuData: any;
12
- onItemClick: any;
13
- };
14
- };
15
- export default SubMenuTrigger;
@@ -1 +0,0 @@
1
- export { default as NavBar } from "./NavBar";
@@ -1,2 +0,0 @@
1
- declare const isValidMenuItem: (arr: any, idx: any, componentName: any, location: any, propFullName: any) => Error;
2
- export default isValidMenuItem;
@@ -1,2 +0,0 @@
1
- declare const renderSubMenuItems: (subMenuItems: any, onItemClick: any, SubMenuTrigger: any) => any;
2
- export default renderSubMenuItems;
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare function MenuList(props: any): React.JSX.Element;
3
- export default MenuList;
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { SelectOptionProps } from "./SelectOption";
3
- import { NDSOption } from "./Select";
4
- export declare const errorList: string[];
5
- export declare const options: NDSOption[];
6
- export declare const partnerCompanyName: {
7
- value: string;
8
- label: string;
9
- }[];
10
- export declare const wrappingOptions: {
11
- value: string;
12
- label: string;
13
- }[];
14
- export declare const PCNList: {
15
- value: string;
16
- label: string;
17
- }[];
18
- export declare const getPhotos: () => Promise<any>;
19
- export declare const CustomOption: ({ children, ...props }: SelectOptionProps) => React.JSX.Element;
@@ -1,20 +0,0 @@
1
- import { Options, PropsValue } from "react-select";
2
- import { NDSOption, NDSOptionValue } from "./Select";
3
- export declare function calcOptionsLength(options: any): any;
4
- export declare function flattenGroupedChildren(children: any): any;
5
- export declare function isFocused({ props: { isFocused } }: {
6
- props: {
7
- isFocused: any;
8
- };
9
- }): boolean;
10
- export declare function getCurrentIndex(children: any): number;
11
- export declare function createGetHeight({ groupHeadingStyles, noOptionsMsgStyles, optionStyles, loadingMsgStyles }: {
12
- groupHeadingStyles: any;
13
- noOptionsMsgStyles: any;
14
- optionStyles: any;
15
- loadingMsgStyles: any;
16
- }): (child: any) => any;
17
- export declare function checkOptionsAreValid(options: Options<NDSOption>): void;
18
- export declare function getOption(options: Options<NDSOption>, value: PropsValue<NDSOptionValue>): any;
19
- export declare function getReactSelectValue(options: Options<NDSOption>, input: PropsValue<NDSOptionValue>): any;
20
- export declare function extractValue(options: Options<NDSOption> | NDSOption, isMulti: boolean): NDSOptionValue[] | NDSOptionValue;
@@ -1,2 +0,0 @@
1
- export function Deprecated(Component: any, message?: string): (props: any) => React.JSX.Element;
2
- import React from "react";
@@ -1 +0,0 @@
1
- export function conditionallyRequiredProp(propType: any, dependsOnPropName: any): (props: any, propName: any, componentName: any, ...rest: any[]) => any;
@@ -1,6 +0,0 @@
1
- /**
2
- * A styled utility that adds a dashed border around a component
3
- * to highlight its boundaries. To be used in Storybook exclusively.
4
- */
5
- declare const dashed: (component: any) => import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
6
- export default dashed;
@@ -1 +0,0 @@
1
- export function deprecatedProp(propType: any, newPropName: any): (props: any, propName: any, componentName: any, ...rest: any[]) => any;
@@ -1,5 +0,0 @@
1
- declare const simulatedAPIRequest: (inputValue: string, data: {
2
- value: string;
3
- label: string;
4
- }[], milliseconds?: number) => Promise<Response>;
5
- export default simulatedAPIRequest;