@nulogy/components 11.0.0-beta.4 → 11.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 (167) hide show
  1. package/dist/main.js +34935 -37522
  2. package/dist/main.module.js +34930 -37515
  3. package/dist/src/Alert/Alert.story.d.ts +1 -4
  4. package/dist/src/Alert/CloseButton.d.ts +1 -1
  5. package/dist/src/AsyncSelect/AsyncSelect.d.ts +2 -2
  6. package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +3 -3
  7. package/dist/src/AsyncSelect/fixtures.d.ts +5 -0
  8. package/dist/src/Box/index.d.ts +1 -0
  9. package/dist/src/BrandedNavBar/MobileMenu.d.ts +2 -2
  10. package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
  11. package/dist/src/BrandedNavBar/isValidMenuItem.d.ts +1 -2
  12. package/dist/src/Branding/BrandingText.d.ts +5 -2
  13. package/dist/src/Branding/LettermarkLogo.d.ts +2 -2
  14. package/dist/src/Branding/WordmarkLogo.d.ts +3 -2
  15. package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +4 -9
  16. package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +0 -1
  17. package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +2 -2
  18. package/dist/src/Button/Button.d.ts +4 -3
  19. package/dist/src/Button/CloseButton.d.ts +3 -1
  20. package/dist/src/Button/ControlIcon.d.ts +5 -6
  21. package/dist/src/Button/DangerButton.d.ts +1 -1
  22. package/dist/src/Button/IconicButton.d.ts +2 -2
  23. package/dist/src/Button/IconicButton.story.d.ts +0 -1
  24. package/dist/src/Button/PrimaryButton.d.ts +2 -1
  25. package/dist/src/Button/QuietButton.d.ts +1 -1
  26. package/dist/src/ButtonGroup/ButtonGroup.d.ts +7 -5
  27. package/dist/src/Card/Card.d.ts +2 -3
  28. package/dist/src/Card/CardSet.d.ts +5 -3
  29. package/dist/src/Checkbox/Checkbox.d.ts +4 -3
  30. package/dist/src/Checkbox/Checkbox.story.d.ts +0 -1
  31. package/dist/src/Checkbox/CheckboxGroup.d.ts +3 -2
  32. package/dist/src/DatePicker/DatePicker.d.ts +3 -3
  33. package/dist/src/DatePicker/DatePicker.story.d.ts +0 -1
  34. package/dist/src/DatePicker/DatePickerHeader.d.ts +6 -6
  35. package/dist/src/DatePicker/DatePickerInput.d.ts +3 -3
  36. package/dist/src/DatePicker/DatePickerStyles.d.ts +4 -1
  37. package/dist/src/DateRange/DateRange.d.ts +3 -3
  38. package/dist/src/DateRange/DateRange.story.d.ts +0 -1
  39. package/dist/src/DateRange/EndTime.d.ts +3 -3
  40. package/dist/src/DateRange/StartTime.d.ts +3 -3
  41. package/dist/src/Divider/Divider.d.ts +2 -3
  42. package/dist/src/Divider/Divider.story.d.ts +4 -2
  43. package/dist/src/DropdownMenu/DropdownButton.d.ts +2 -2
  44. package/dist/src/DropdownMenu/DropdownItem.d.ts +2 -5
  45. package/dist/src/DropdownMenu/DropdownLink.d.ts +5 -7
  46. package/dist/src/DropdownMenu/DropdownMenu.d.ts +5 -5
  47. package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +0 -1
  48. package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
  49. package/dist/src/DropdownMenu/DropdownText.d.ts +7 -3
  50. package/dist/src/FieldLabel/FieldLabel.d.ts +1 -10
  51. package/dist/src/FieldLabel/HelpText.d.ts +2 -3
  52. package/dist/src/Form/Fieldset.d.ts +1 -2
  53. package/dist/src/Form/FormSection.d.ts +3 -3
  54. package/dist/src/Icon/Icon.d.ts +1 -1
  55. package/dist/src/Icon/LoadingIcon.d.ts +4 -2
  56. package/dist/src/Input/Input.d.ts +3 -4
  57. package/dist/src/Input/Input.story.d.ts +1 -1
  58. package/dist/src/Input/InputField.d.ts +8 -6
  59. package/dist/src/Input/Suffix.d.ts +4 -11
  60. package/dist/src/Layout/Header.d.ts +1 -1
  61. package/dist/src/Layout/Page.d.ts +1 -1
  62. package/dist/src/Link/Link.d.ts +2 -2
  63. package/dist/src/Link/Link.story.d.ts +0 -1
  64. package/dist/src/List/List.d.ts +3 -5
  65. package/dist/src/List/ListItem.d.ts +4 -5
  66. package/dist/src/LoadingAnimation/LoadingAnimation.d.ts +4 -4
  67. package/dist/src/Modal/Modal.d.ts +1 -1
  68. package/dist/src/Modal/ModalCloseButton.d.ts +3 -1
  69. package/dist/src/Modal/ModalContent.d.ts +1 -1
  70. package/dist/src/NDSProvider/ComponentVariantContext.d.ts +10 -0
  71. package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +10 -0
  72. package/dist/src/NDSProvider/NDSProvider.d.ts +5 -13
  73. package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +1 -1
  74. package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +1 -1
  75. package/dist/src/NDSProvider/useNDSTheme.d.ts +12 -0
  76. package/dist/src/NavBarSearch/NavBarSearch.d.ts +5 -16
  77. package/dist/src/Overlay/Overlay.d.ts +7 -6
  78. package/dist/src/Pagination/NextButton.d.ts +1 -14
  79. package/dist/src/Pagination/PageNumber.d.ts +4 -1
  80. package/dist/src/Pagination/Pagination.d.ts +5 -29
  81. package/dist/src/Pagination/PaginationButton.d.ts +4 -1
  82. package/dist/src/Pagination/PreviousButton.d.ts +1 -14
  83. package/dist/src/Popper/Popper.d.ts +2 -2
  84. package/dist/src/Radio/Radio.d.ts +3 -3
  85. package/dist/src/Radio/Radio.story.d.ts +0 -1
  86. package/dist/src/Radio/RadioGroup.d.ts +7 -17
  87. package/dist/src/RangeContainer/RangeContainer.d.ts +4 -3
  88. package/dist/src/Select/Select.d.ts +23 -24
  89. package/dist/src/Select/Select.story.d.ts +7 -4
  90. package/dist/src/Select/SelectComponents.d.ts +7 -9
  91. package/dist/src/Select/SelectOption.d.ts +9 -10
  92. package/dist/src/Select/customReactSelectStyles.d.ts +8 -8
  93. package/dist/src/Select/index.d.ts +1 -1
  94. package/dist/src/Summary/Summary.d.ts +1 -1
  95. package/dist/src/Summary/SummaryContext.d.ts +1 -1
  96. package/dist/src/Summary/SummaryItem.d.ts +1 -1
  97. package/dist/src/Switcher/Switch.d.ts +2 -2
  98. package/dist/src/Switcher/Switcher.d.ts +3 -3
  99. package/dist/src/Switcher/Switcher.story.d.ts +0 -1
  100. package/dist/src/Table/BaseTable.d.ts +1 -17
  101. package/dist/src/Table/SortingColumnHeader.d.ts +8 -23
  102. package/dist/src/Table/StatefulTable.d.ts +8 -8
  103. package/dist/src/Table/StyledTh.d.ts +0 -2
  104. package/dist/src/Table/Table.d.ts +5 -25
  105. package/dist/src/Table/Table.types.d.ts +0 -27
  106. package/dist/src/Table/TableCell.d.ts +2 -2
  107. package/dist/src/Table/TableFoot.d.ts +0 -26
  108. package/dist/src/Tabs/Tab.d.ts +4 -4
  109. package/dist/src/Tabs/TabContainer.d.ts +1 -1
  110. package/dist/src/Tabs/TabScrollIndicator.d.ts +4 -3
  111. package/dist/src/Tabs/Tabs.d.ts +4 -3
  112. package/dist/src/Tabs/Tabs.story.d.ts +0 -1
  113. package/dist/src/Textarea/StyledTextarea.d.ts +3 -3
  114. package/dist/src/Textarea/Textarea.story.d.ts +0 -1
  115. package/dist/src/TimePicker/TimePicker.d.ts +3 -3
  116. package/dist/src/TimePicker/TimePicker.story.d.ts +0 -1
  117. package/dist/src/TimePicker/TimePickerOption.d.ts +2 -2
  118. package/dist/src/TimeRange/TimeRange.d.ts +2 -2
  119. package/dist/src/Toast/Toast.d.ts +1 -11
  120. package/dist/src/ToastContainer/ToastContainer.d.ts +1 -12
  121. package/dist/src/Toggle/Toggle.d.ts +3 -3
  122. package/dist/src/Toggle/Toggle.story.d.ts +1 -1
  123. package/dist/src/Toggle/ToggleButton.d.ts +1 -1
  124. package/dist/src/Tooltip/Tooltip.d.ts +1 -1
  125. package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
  126. package/dist/src/TruncatedText/MaybeTooltip.d.ts +1 -12
  127. package/dist/src/TruncatedText/TruncatedText.d.ts +1 -24
  128. package/dist/src/TruncatedText/TruncatedTextProps.d.ts +2 -1
  129. package/dist/src/Type/Headings.d.ts +4 -8
  130. package/dist/src/Type/Text.d.ts +5 -7
  131. package/dist/src/Validation/InlineValidation.d.ts +2 -2
  132. package/dist/src/VisualTests/KitchenSink.story.d.ts +6 -0
  133. package/dist/src/index.d.ts +1 -3
  134. package/dist/src/locales.const.d.ts +9 -9
  135. package/dist/src/pages/ErrorPage.story.d.ts +8 -0
  136. package/dist/src/scripts/generateTheme.d.ts +1 -0
  137. package/dist/src/theme.d.ts +5 -3
  138. package/dist/src/theme.type.d.ts +15 -3
  139. package/dist/src/utils/ClickInputLabel.d.ts +3 -3
  140. package/dist/src/utils/DetectOutsideClick.d.ts +1 -16
  141. package/dist/src/utils/PopperArrow.d.ts +4 -3
  142. package/dist/src/utils/PreventBodyElementScrolling.d.ts +1 -15
  143. package/dist/src/utils/ScrollIndicators.d.ts +0 -6
  144. package/dist/src/utils/dashed.d.ts +4 -1
  145. package/dist/src/utils/localized-date-fns.d.ts +1 -1
  146. package/dist/src/utils/story/simulatedAPIRequests.d.ts +4 -0
  147. package/dist/src/utils/subPx.d.ts +9 -2
  148. package/dist/src/utils/subset.d.ts +1 -0
  149. package/dist/src/utils/ts/FocusManager.d.ts +1 -1
  150. package/dist/src/utils/useWindowDimensions.d.ts +1 -1
  151. package/package.json +17 -14
  152. package/dist/src/NDSProvider/ComponentSizeContext.d.ts +0 -9
  153. package/dist/src/NavBar/DesktopMenu.d.ts +0 -18
  154. package/dist/src/NavBar/MenuTrigger.d.ts +0 -29
  155. package/dist/src/NavBar/MobileMenu.d.ts +0 -34
  156. package/dist/src/NavBar/NavBar.d.ts +0 -66
  157. package/dist/src/NavBar/NavBar.story.d.ts +0 -77
  158. package/dist/src/NavBar/NavBarDropdownMenu.d.ts +0 -3
  159. package/dist/src/NavBar/SmallNavBar.d.ts +0 -3
  160. package/dist/src/NavBar/SubMenuTrigger.d.ts +0 -15
  161. package/dist/src/NavBar/index.d.ts +0 -1
  162. package/dist/src/NavBar/isValidMenuItem.d.ts +0 -2
  163. package/dist/src/NavBar/renderSubMenuItems.d.ts +0 -2
  164. package/dist/src/Select/MenuList.d.ts +0 -3
  165. package/dist/src/Select/Select.story.fixture.d.ts +0 -19
  166. package/dist/src/Select/lib.d.ts +0 -20
  167. package/dist/src/utils/story/simulatedAPIRequest.d.ts +0 -5
@@ -6,16 +6,5 @@ type ToastContainerProps = {
6
6
  maxVisibleToasts?: number;
7
7
  toastOptions?: ToastOptions;
8
8
  } & Omit<ToasterProps, "gutter" | "toastOptions">;
9
- declare const ToastContainer: {
10
- ({ gap, maxVisibleToasts, toastOptions, ...props }: ToastContainerProps): React.JSX.Element;
11
- defaultProps: {
12
- position: string;
13
- reverseOrder: boolean;
14
- containerClassName: string;
15
- toastOptions: {
16
- duration: number;
17
- };
18
- maxVisibleToasts: number;
19
- };
20
- };
9
+ declare const ToastContainer: ({ gap, position, reverseOrder, containerClassName, toastOptions, maxVisibleToasts, ...props }: ToastContainerProps) => React.JSX.Element;
21
10
  export default ToastContainer;
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
- import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
3
+ import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
4
4
  import { DefaultNDSThemeType } from "../theme.type";
5
5
  declare const ToggleComponent: React.ForwardRefExoticComponent<SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
6
6
  onChange?: (...args: any[]) => any;
7
- size?: ComponentSize;
7
+ variant?: ComponentVariant;
8
8
  toggled?: boolean;
9
9
  disabled?: boolean;
10
10
  onText?: string;
@@ -12,7 +12,7 @@ declare const ToggleComponent: React.ForwardRefExoticComponent<SpaceProps<Requir
12
12
  id?: string;
13
13
  className?: string;
14
14
  required?: boolean;
15
- helpText?: any;
15
+ helpText?: string;
16
16
  labelText?: string;
17
17
  requirementText?: string;
18
18
  error?: boolean;
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- export declare const WithDifferentSizes: () => React.JSX.Element;
3
2
  declare const _default: {
4
3
  title: string;
5
4
  };
@@ -41,6 +40,7 @@ export declare const WithLongText: {
41
40
  name: string;
42
41
  };
43
42
  };
43
+ export declare const WithContraintWidth: () => React.JSX.Element;
44
44
  export declare const ControlledToggle: () => React.JSX.Element;
45
45
  export declare const UsingRefToControlFocus: {
46
46
  (): React.JSX.Element;
@@ -7,5 +7,5 @@ type ToggleButtonProps = React.ComponentPropsWithRef<"input"> & {
7
7
  name?: string;
8
8
  theme?: DefaultNDSThemeType;
9
9
  };
10
- declare const ToggleButton: React.FC<ToggleButtonProps>;
10
+ declare const ToggleButton: React.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React.RefAttributes<React.Ref<HTMLInputElement>>>;
11
11
  export default ToggleButton;
@@ -9,5 +9,5 @@ export type TooltipProps = {
9
9
  maxWidth?: string;
10
10
  children?: React.ReactNode;
11
11
  };
12
- declare const Tooltip: React.FC<TooltipProps>;
12
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<React.Ref<unknown>>>;
13
13
  export default Tooltip;
@@ -1,6 +1,6 @@
1
1
  import { PositionProps } from "styled-system";
2
2
  import { DefaultNDSThemeType } from "../theme.type";
3
- declare const TooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box/Box").BoxProps & PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
3
+ declare const TooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box").BoxProps & PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
4
4
  theme?: DefaultNDSThemeType;
5
5
  dataPlacement?: "top" | "bottom" | "left" | "right";
6
6
  open?: boolean;
@@ -1,18 +1,7 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import { TooltipProps } from "../Tooltip/Tooltip";
4
3
  type MaybeTooltipProps = TooltipProps & {
5
4
  showTooltip?: boolean;
6
5
  };
7
- declare const MaybeTooltip: {
8
- ({ children, showTooltip, ...props }: MaybeTooltipProps): React.JSX.Element;
9
- propTypes: {
10
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- showTooltip: PropTypes.Requireable<boolean>;
12
- };
13
- defaultProps: {
14
- children: string;
15
- showTooltip: boolean;
16
- };
17
- };
6
+ declare const MaybeTooltip: ({ children, showTooltip, ...props }: MaybeTooltipProps) => React.JSX.Element;
18
7
  export default MaybeTooltip;
@@ -1,27 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import { TruncatedTextProps } from "./TruncatedTextProps";
4
- declare const TruncatedText: {
5
- ({ fullWidth, children, ...props }: TruncatedTextProps): React.JSX.Element;
6
- propTypes: {
7
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
8
- indicator: PropTypes.Requireable<string>;
9
- element: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- maxCharacters: PropTypes.Requireable<number>;
11
- showTooltip: PropTypes.Requireable<boolean>;
12
- fullWidth: PropTypes.Requireable<boolean>;
13
- "data-testid": PropTypes.Requireable<string>;
14
- tooltipProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
15
- };
16
- defaultProps: {
17
- children: any;
18
- indicator: string;
19
- element: React.JSX.Element;
20
- maxCharacters: number;
21
- fullWidth: boolean;
22
- showTooltip: boolean;
23
- "data-testid": string;
24
- tooltipProps: any;
25
- };
26
- };
3
+ declare const TruncatedText: ({ indicator, element, maxCharacters, fullWidth, showTooltip, "data-testid": dataTestId, children, ...props }: TruncatedTextProps) => React.JSX.Element;
27
4
  export default TruncatedText;
@@ -1,9 +1,10 @@
1
+ import { ReactElement } from "react";
1
2
  import { TooltipProps } from "../Tooltip/Tooltip";
2
3
  import { TextProps } from "../Type";
3
4
  export interface TruncatedTextProps extends TextProps {
4
5
  children?: string;
5
6
  indicator?: string;
6
- element?: any;
7
+ element?: ReactElement;
7
8
  maxCharacters?: number;
8
9
  showTooltip?: boolean;
9
10
  fullWidth?: boolean;
@@ -1,40 +1,36 @@
1
1
  export declare const Heading1: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
2
+ variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
2
3
  inline?: boolean;
3
4
  disabled?: boolean;
4
5
  textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
5
6
  fontSize?: string;
6
7
  } & import("../StyledProps").StyledProps & {
7
- theme?: import("..").DefaultNDSThemeType;
8
- } & {
9
8
  as: string;
10
9
  }, "as">;
11
10
  export declare const Heading2: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
11
+ variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
12
12
  inline?: boolean;
13
13
  disabled?: boolean;
14
14
  textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
15
15
  fontSize?: string;
16
16
  } & import("../StyledProps").StyledProps & {
17
- theme?: import("..").DefaultNDSThemeType;
18
- } & {
19
17
  as: string;
20
18
  }, "as">;
21
19
  export declare const Heading3: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
20
+ variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
22
21
  inline?: boolean;
23
22
  disabled?: boolean;
24
23
  textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
25
24
  fontSize?: string;
26
25
  } & import("../StyledProps").StyledProps & {
27
- theme?: import("..").DefaultNDSThemeType;
28
- } & {
29
26
  as: string;
30
27
  }, "as">;
31
28
  export declare const Heading4: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
29
+ variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
32
30
  inline?: boolean;
33
31
  disabled?: boolean;
34
32
  textTransform?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "none" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase";
35
33
  fontSize?: string;
36
34
  } & import("../StyledProps").StyledProps & {
37
- theme?: import("..").DefaultNDSThemeType;
38
- } & {
39
35
  as: string;
40
36
  }, "as">;
@@ -1,19 +1,17 @@
1
- import type { DefaultNDSThemeType } from "../theme.type";
1
+ import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
2
2
  import { StyledProps } from "../StyledProps";
3
3
  export type TextProps = React.HTMLAttributes<HTMLParagraphElement> & {
4
+ variant?: ComponentVariant;
4
5
  inline?: boolean;
5
6
  disabled?: boolean;
6
7
  textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
7
8
  fontSize?: string;
8
- } & StyledProps & {
9
- theme?: DefaultNDSThemeType;
10
- };
9
+ } & StyledProps;
11
10
  declare const Text: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("react").HTMLAttributes<HTMLParagraphElement> & {
11
+ variant?: ComponentVariant;
12
12
  inline?: boolean;
13
13
  disabled?: boolean;
14
14
  textTransform?: "none" | "inherit" | "initial" | "-moz-initial" | "revert" | "unset" | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "uppercase" | undefined;
15
15
  fontSize?: string;
16
- } & StyledProps & {
17
- theme?: DefaultNDSThemeType;
18
- }, never>;
16
+ } & StyledProps, never>;
19
17
  export default Text;
@@ -6,5 +6,5 @@ type InlineValidationProps = SpaceProps & {
6
6
  errorList?: string[];
7
7
  children?: React.ReactNode;
8
8
  };
9
- declare const InlineValidation: React.FC<InlineValidationProps>;
10
- export default InlineValidation;
9
+ export default function InlineValidation({ className, errorMessage, errorList, children, ...boxProps }: InlineValidationProps): React.JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare const KitchenSink: () => React.JSX.Element;
3
+ declare const _default: {
4
+ title: string;
5
+ };
6
+ export default _default;
@@ -26,13 +26,12 @@ export { List, ListItem } from "./List";
26
26
  export { LoadingAnimation } from "./LoadingAnimation";
27
27
  export { ALL_NDS_LOCALES } from "./locales.const";
28
28
  export { Modal } from "./Modal";
29
- export { NavBar } from "./NavBar";
30
29
  export { NDSProvider } from "./NDSProvider";
31
30
  export { Overlay } from "./Overlay";
32
31
  export { Pagination } from "./Pagination";
33
32
  export { Radio, RadioGroup } from "./Radio";
34
33
  export { RangeContainer } from "./RangeContainer";
35
- export { Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, type NDSOption, type NDSOptionValue, } from "./Select";
34
+ export { Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, } from "./Select";
36
35
  export { SortingTable } from "./SortingTable";
37
36
  export { StatusIndicator, StatusIndicatorValues } from "./StatusIndicator";
38
37
  export type { StatusIndicatorType } from "./StatusIndicator";
@@ -44,7 +43,6 @@ export { Table } from "./Table";
44
43
  export type { TableCellInfoType, TableColumnType, TableProps, TableRowType } from "./Table";
45
44
  export { Tab, Tabs } from "./Tabs";
46
45
  export { Textarea } from "./Textarea";
47
- export { default as theme } from "./theme";
48
46
  export type { ThemeType, DefaultNDSThemeType } from "./theme.type";
49
47
  export { TimePicker } from "./TimePicker";
50
48
  export { TimeRange } from "./TimeRange";
@@ -1,13 +1,13 @@
1
1
  export declare const NDS_TO_DATE_FN_LOCALES_MAP: {
2
- de_DE: Locale;
3
- en_US: Locale;
4
- es_MX: Locale;
5
- fr_FR: Locale;
6
- nl_NL: Locale;
7
- pl_PL: Locale;
8
- pt_BR: Locale;
9
- ro_RO: Locale;
10
- zh_CN: Locale;
2
+ readonly de_DE: Locale;
3
+ readonly en_US: Locale;
4
+ readonly es_MX: Locale;
5
+ readonly fr_FR: Locale;
6
+ readonly nl_NL: Locale;
7
+ readonly pl_PL: Locale;
8
+ readonly pt_BR: Locale;
9
+ readonly ro_RO: Locale;
10
+ readonly zh_CN: Locale;
11
11
  };
12
12
  export declare const ALL_NDS_LOCALES: {
13
13
  label: string;
@@ -3,6 +3,14 @@ declare const _default: {
3
3
  title: string;
4
4
  };
5
5
  export default _default;
6
+ export declare const Static: {
7
+ (): React.JSX.Element;
8
+ parameters: {
9
+ chromatic: {
10
+ disable: boolean;
11
+ };
12
+ };
13
+ };
6
14
  export declare const Base: () => React.JSX.Element;
7
15
  export declare const WithALink: {
8
16
  (): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,5 @@
1
- import type { DefaultNDSThemeType } from "./theme.type";
2
- declare const Theme: DefaultNDSThemeType;
3
- export default Theme;
1
+ import { DefaultNDSThemeType } from "./theme.type";
2
+ type ThemeKey = "desktop" | "tablet" | "phone";
3
+ export declare const themes: Record<ThemeKey, DefaultNDSThemeType>;
4
+ export declare const desktop: DefaultNDSThemeType, tablet: DefaultNDSThemeType, phone: DefaultNDSThemeType;
5
+ export {};
@@ -1,3 +1,4 @@
1
+ import { RecursivePartial } from "./utils/ts/recursivePartial";
1
2
  interface Colors {
2
3
  black: string;
3
4
  blackBlue: string;
@@ -37,9 +38,12 @@ interface FontSizes {
37
38
  }
38
39
  interface LineHeights {
39
40
  base: string;
41
+ baseRelaxed: string;
40
42
  smallTextBase: string;
43
+ smallRelaxed: string;
41
44
  smallTextCompressed: string;
42
45
  smallerText: string;
46
+ smallerRelaxed: string;
43
47
  heading1: string;
44
48
  heading2: string;
45
49
  heading3: string;
@@ -57,12 +61,21 @@ interface FontWeights {
57
61
  interface Space {
58
62
  none: string;
59
63
  half: string;
64
+ x0: string;
65
+ x0_25: string;
66
+ x0_5: string;
67
+ x0_75: string;
60
68
  x1: string;
69
+ x1_25: string;
70
+ x1_5: string;
71
+ x1_75: string;
61
72
  x2: string;
73
+ x2_5: string;
62
74
  x3: string;
63
75
  x4: string;
64
76
  x5: string;
65
77
  x6: string;
78
+ x7: string;
66
79
  x8: string;
67
80
  }
68
81
  interface Fonts {
@@ -81,7 +94,9 @@ interface Shadows {
81
94
  interface Radii {
82
95
  small: string;
83
96
  medium: string;
97
+ large: string;
84
98
  circle: string;
99
+ rounded: string;
85
100
  }
86
101
  export interface Breakpoints {
87
102
  extraSmall: string;
@@ -116,8 +131,5 @@ export interface DefaultNDSThemeType {
116
131
  breakpoints: Breakpoints;
117
132
  zIndices: ZIndices;
118
133
  }
119
- type RecursivePartial<T> = {
120
- [P in keyof T]?: RecursivePartial<T[P]>;
121
- };
122
134
  export type ThemeType = RecursivePartial<DefaultNDSThemeType>;
123
135
  export {};
@@ -1,6 +1,6 @@
1
- import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
1
+ import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
2
2
  declare const ClickInputLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {
3
- size: ComponentSize;
4
- disabled: boolean;
3
+ variant?: ComponentVariant;
4
+ disabled?: boolean;
5
5
  }, never>;
6
6
  export default ClickInputLabel;
@@ -1,23 +1,8 @@
1
- export default DetectOutsideClick;
2
- declare class DetectOutsideClick extends React.Component<any, any, any> {
1
+ export default class DetectOutsideClick extends React.Component<any, any, any> {
3
2
  constructor(props: any);
4
3
  handleOutsideClick(e: any): void;
5
4
  componentDidMount(): void;
6
5
  componentWillUnmount(): void;
7
6
  render(): React.JSX.Element;
8
7
  }
9
- declare namespace DetectOutsideClick {
10
- namespace propTypes {
11
- const onClick: PropTypes.Validator<(...args: any[]) => any>;
12
- const clickRef: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{}>>>;
13
- const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
- }
15
- namespace defaultProps {
16
- const clickRef_1: any;
17
- export { clickRef_1 as clickRef };
18
- const children_1: any;
19
- export { children_1 as children };
20
- }
21
- }
22
8
  import React from "react";
23
- import PropTypes from "prop-types";
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { PopperArrowProps as ReactPopperArrowProps } from "react-popper";
3
- type PopperArrowProps = ReactPopperArrowProps & {
3
+ declare const PopperArrow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ReactPopperArrowProps & {
4
4
  placement?: string;
5
5
  borderColor?: string;
6
6
  backgroundColor?: string;
7
- };
8
- declare const PopperArrow: React.FC<PopperArrowProps>;
7
+ } & {
8
+ children?: import("react").ReactNode;
9
+ }, never>;
9
10
  export default PopperArrow;
@@ -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,6 +1,9 @@
1
+ import { StyledComponent } from "styled-components";
2
+ import { ComponentType } from "react";
3
+ import { DefaultNDSThemeType } from "../theme.type";
1
4
  /**
2
5
  * A styled utility that adds a dashed border around a component
3
6
  * to highlight its boundaries. To be used in Storybook exclusively.
4
7
  */
5
- declare const dashed: (component: any) => import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
8
+ declare const dashed: <P extends object>(component: ComponentType<P>) => StyledComponent<ComponentType<P>, DefaultNDSThemeType, {}, never>;
6
9
  export default dashed;
@@ -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,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.4",
3
+ "version": "11.0.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,13 +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
- "prop-types": "15.7.2",
120
125
  "react": "17.0.2",
121
126
  "react-color": "^2.18.1",
122
127
  "react-dom": "17.0.2",
@@ -142,11 +147,9 @@
142
147
  "@nulogy/tokens": "^5.4.0",
143
148
  "@styled-system/prop-types": "^5.1.4",
144
149
  "@styled-system/theme-get": "^5.1.2",
145
- "@types/react-window": "^1.8.8",
146
150
  "@types/styled-system": "5.1.22",
147
151
  "body-scroll-lock": "^3.1.5",
148
152
  "core-js": "3",
149
- "create-react-context": "^0.3.0",
150
153
  "date-fns": "2.23.0",
151
154
  "debounce": "^1.2.0",
152
155
  "deep-equal": "^2.2.1",
@@ -157,18 +160,18 @@
157
160
  "react-fast-compare": "^3.2.0",
158
161
  "react-hot-toast": "^2.4.1",
159
162
  "react-i18next": "^12.3.1",
160
- "react-input-autosize": "^2.2.2",
161
163
  "react-modal": "^3.14.4",
162
164
  "react-popper": "1.3.11",
163
165
  "react-popper-2": "npm:react-popper@2.2.4",
164
166
  "react-resize-detector": "^9.1.0",
165
167
  "react-select": "^5.8.0",
166
- "react-window": "^1.8.10",
168
+ "react-windowed-select": "^5.2.0",
169
+ "smoothscroll-polyfill": "^0.4.4",
167
170
  "styled-system": "^5.1.4"
168
171
  },
169
172
  "husky": {
170
173
  "hooks": {
171
- "pre-push": "yarn run check"
174
+ "pre-push": "yarn run ci"
172
175
  }
173
176
  },
174
177
  "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;