@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.
- package/dist/main.js +34935 -37522
- package/dist/main.module.js +34930 -37515
- package/dist/src/Alert/Alert.story.d.ts +1 -4
- package/dist/src/Alert/CloseButton.d.ts +1 -1
- package/dist/src/AsyncSelect/AsyncSelect.d.ts +2 -2
- package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +3 -3
- package/dist/src/AsyncSelect/fixtures.d.ts +5 -0
- package/dist/src/Box/index.d.ts +1 -0
- package/dist/src/BrandedNavBar/MobileMenu.d.ts +2 -2
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +1 -1
- package/dist/src/BrandedNavBar/isValidMenuItem.d.ts +1 -2
- package/dist/src/Branding/BrandingText.d.ts +5 -2
- package/dist/src/Branding/LettermarkLogo.d.ts +2 -2
- package/dist/src/Branding/WordmarkLogo.d.ts +3 -2
- package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +4 -9
- package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +0 -1
- package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +2 -2
- package/dist/src/Button/Button.d.ts +4 -3
- package/dist/src/Button/CloseButton.d.ts +3 -1
- package/dist/src/Button/ControlIcon.d.ts +5 -6
- package/dist/src/Button/DangerButton.d.ts +1 -1
- package/dist/src/Button/IconicButton.d.ts +2 -2
- package/dist/src/Button/IconicButton.story.d.ts +0 -1
- package/dist/src/Button/PrimaryButton.d.ts +2 -1
- package/dist/src/Button/QuietButton.d.ts +1 -1
- package/dist/src/ButtonGroup/ButtonGroup.d.ts +7 -5
- package/dist/src/Card/Card.d.ts +2 -3
- package/dist/src/Card/CardSet.d.ts +5 -3
- package/dist/src/Checkbox/Checkbox.d.ts +4 -3
- package/dist/src/Checkbox/Checkbox.story.d.ts +0 -1
- package/dist/src/Checkbox/CheckboxGroup.d.ts +3 -2
- package/dist/src/DatePicker/DatePicker.d.ts +3 -3
- package/dist/src/DatePicker/DatePicker.story.d.ts +0 -1
- package/dist/src/DatePicker/DatePickerHeader.d.ts +6 -6
- package/dist/src/DatePicker/DatePickerInput.d.ts +3 -3
- package/dist/src/DatePicker/DatePickerStyles.d.ts +4 -1
- package/dist/src/DateRange/DateRange.d.ts +3 -3
- package/dist/src/DateRange/DateRange.story.d.ts +0 -1
- package/dist/src/DateRange/EndTime.d.ts +3 -3
- package/dist/src/DateRange/StartTime.d.ts +3 -3
- package/dist/src/Divider/Divider.d.ts +2 -3
- package/dist/src/Divider/Divider.story.d.ts +4 -2
- package/dist/src/DropdownMenu/DropdownButton.d.ts +2 -2
- package/dist/src/DropdownMenu/DropdownItem.d.ts +2 -5
- package/dist/src/DropdownMenu/DropdownLink.d.ts +5 -7
- package/dist/src/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +0 -1
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
- package/dist/src/DropdownMenu/DropdownText.d.ts +7 -3
- package/dist/src/FieldLabel/FieldLabel.d.ts +1 -10
- package/dist/src/FieldLabel/HelpText.d.ts +2 -3
- package/dist/src/Form/Fieldset.d.ts +1 -2
- package/dist/src/Form/FormSection.d.ts +3 -3
- package/dist/src/Icon/Icon.d.ts +1 -1
- package/dist/src/Icon/LoadingIcon.d.ts +4 -2
- package/dist/src/Input/Input.d.ts +3 -4
- package/dist/src/Input/Input.story.d.ts +1 -1
- package/dist/src/Input/InputField.d.ts +8 -6
- package/dist/src/Input/Suffix.d.ts +4 -11
- package/dist/src/Layout/Header.d.ts +1 -1
- package/dist/src/Layout/Page.d.ts +1 -1
- package/dist/src/Link/Link.d.ts +2 -2
- package/dist/src/Link/Link.story.d.ts +0 -1
- package/dist/src/List/List.d.ts +3 -5
- package/dist/src/List/ListItem.d.ts +4 -5
- package/dist/src/LoadingAnimation/LoadingAnimation.d.ts +4 -4
- package/dist/src/Modal/Modal.d.ts +1 -1
- package/dist/src/Modal/ModalCloseButton.d.ts +3 -1
- package/dist/src/Modal/ModalContent.d.ts +1 -1
- package/dist/src/NDSProvider/ComponentVariantContext.d.ts +10 -0
- package/dist/src/NDSProvider/GlobalStylesComposer.d.ts +10 -0
- package/dist/src/NDSProvider/NDSProvider.d.ts +5 -13
- package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +1 -1
- package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +1 -1
- package/dist/src/NDSProvider/useNDSTheme.d.ts +12 -0
- package/dist/src/NavBarSearch/NavBarSearch.d.ts +5 -16
- package/dist/src/Overlay/Overlay.d.ts +7 -6
- package/dist/src/Pagination/NextButton.d.ts +1 -14
- package/dist/src/Pagination/PageNumber.d.ts +4 -1
- package/dist/src/Pagination/Pagination.d.ts +5 -29
- package/dist/src/Pagination/PaginationButton.d.ts +4 -1
- package/dist/src/Pagination/PreviousButton.d.ts +1 -14
- package/dist/src/Popper/Popper.d.ts +2 -2
- package/dist/src/Radio/Radio.d.ts +3 -3
- package/dist/src/Radio/Radio.story.d.ts +0 -1
- package/dist/src/Radio/RadioGroup.d.ts +7 -17
- package/dist/src/RangeContainer/RangeContainer.d.ts +4 -3
- package/dist/src/Select/Select.d.ts +23 -24
- package/dist/src/Select/Select.story.d.ts +7 -4
- package/dist/src/Select/SelectComponents.d.ts +7 -9
- package/dist/src/Select/SelectOption.d.ts +9 -10
- package/dist/src/Select/customReactSelectStyles.d.ts +8 -8
- package/dist/src/Select/index.d.ts +1 -1
- package/dist/src/Summary/Summary.d.ts +1 -1
- package/dist/src/Summary/SummaryContext.d.ts +1 -1
- package/dist/src/Summary/SummaryItem.d.ts +1 -1
- package/dist/src/Switcher/Switch.d.ts +2 -2
- package/dist/src/Switcher/Switcher.d.ts +3 -3
- package/dist/src/Switcher/Switcher.story.d.ts +0 -1
- package/dist/src/Table/BaseTable.d.ts +1 -17
- package/dist/src/Table/SortingColumnHeader.d.ts +8 -23
- package/dist/src/Table/StatefulTable.d.ts +8 -8
- package/dist/src/Table/StyledTh.d.ts +0 -2
- package/dist/src/Table/Table.d.ts +5 -25
- package/dist/src/Table/Table.types.d.ts +0 -27
- package/dist/src/Table/TableCell.d.ts +2 -2
- package/dist/src/Table/TableFoot.d.ts +0 -26
- package/dist/src/Tabs/Tab.d.ts +4 -4
- package/dist/src/Tabs/TabContainer.d.ts +1 -1
- package/dist/src/Tabs/TabScrollIndicator.d.ts +4 -3
- package/dist/src/Tabs/Tabs.d.ts +4 -3
- package/dist/src/Tabs/Tabs.story.d.ts +0 -1
- package/dist/src/Textarea/StyledTextarea.d.ts +3 -3
- package/dist/src/Textarea/Textarea.story.d.ts +0 -1
- package/dist/src/TimePicker/TimePicker.d.ts +3 -3
- package/dist/src/TimePicker/TimePicker.story.d.ts +0 -1
- package/dist/src/TimePicker/TimePickerOption.d.ts +2 -2
- package/dist/src/TimeRange/TimeRange.d.ts +2 -2
- package/dist/src/Toast/Toast.d.ts +1 -11
- package/dist/src/ToastContainer/ToastContainer.d.ts +1 -12
- package/dist/src/Toggle/Toggle.d.ts +3 -3
- package/dist/src/Toggle/Toggle.story.d.ts +1 -1
- package/dist/src/Toggle/ToggleButton.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/Tooltip/TooltipContainer.d.ts +1 -1
- package/dist/src/TruncatedText/MaybeTooltip.d.ts +1 -12
- package/dist/src/TruncatedText/TruncatedText.d.ts +1 -24
- package/dist/src/TruncatedText/TruncatedTextProps.d.ts +2 -1
- package/dist/src/Type/Headings.d.ts +4 -8
- package/dist/src/Type/Text.d.ts +5 -7
- package/dist/src/Validation/InlineValidation.d.ts +2 -2
- package/dist/src/VisualTests/KitchenSink.story.d.ts +6 -0
- package/dist/src/index.d.ts +1 -3
- package/dist/src/locales.const.d.ts +9 -9
- package/dist/src/pages/ErrorPage.story.d.ts +8 -0
- package/dist/src/scripts/generateTheme.d.ts +1 -0
- package/dist/src/theme.d.ts +5 -3
- package/dist/src/theme.type.d.ts +15 -3
- package/dist/src/utils/ClickInputLabel.d.ts +3 -3
- package/dist/src/utils/DetectOutsideClick.d.ts +1 -16
- package/dist/src/utils/PopperArrow.d.ts +4 -3
- package/dist/src/utils/PreventBodyElementScrolling.d.ts +1 -15
- package/dist/src/utils/ScrollIndicators.d.ts +0 -6
- package/dist/src/utils/dashed.d.ts +4 -1
- package/dist/src/utils/localized-date-fns.d.ts +1 -1
- package/dist/src/utils/story/simulatedAPIRequests.d.ts +4 -0
- package/dist/src/utils/subPx.d.ts +9 -2
- package/dist/src/utils/subset.d.ts +1 -0
- package/dist/src/utils/ts/FocusManager.d.ts +1 -1
- package/dist/src/utils/useWindowDimensions.d.ts +1 -1
- package/package.json +17 -14
- package/dist/src/NDSProvider/ComponentSizeContext.d.ts +0 -9
- package/dist/src/NavBar/DesktopMenu.d.ts +0 -18
- package/dist/src/NavBar/MenuTrigger.d.ts +0 -29
- package/dist/src/NavBar/MobileMenu.d.ts +0 -34
- package/dist/src/NavBar/NavBar.d.ts +0 -66
- package/dist/src/NavBar/NavBar.story.d.ts +0 -77
- package/dist/src/NavBar/NavBarDropdownMenu.d.ts +0 -3
- package/dist/src/NavBar/SmallNavBar.d.ts +0 -3
- package/dist/src/NavBar/SubMenuTrigger.d.ts +0 -15
- package/dist/src/NavBar/index.d.ts +0 -1
- package/dist/src/NavBar/isValidMenuItem.d.ts +0 -2
- package/dist/src/NavBar/renderSubMenuItems.d.ts +0 -2
- package/dist/src/Select/MenuList.d.ts +0 -3
- package/dist/src/Select/Select.story.fixture.d.ts +0 -19
- package/dist/src/Select/lib.d.ts +0 -20
- package/dist/src/utils/story/simulatedAPIRequest.d.ts +0 -5
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldLabelProps } from "./FieldLabel.type";
|
|
3
|
-
|
|
4
|
-
({ labelText, requirementText, helpText, hint, children, ...props }: FieldLabelProps): React.JSX.Element;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
children: any;
|
|
7
|
-
requirementText: any;
|
|
8
|
-
helpText: any;
|
|
9
|
-
id: any;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export default FieldLabel;
|
|
3
|
+
export default function FieldLabel({ labelText, requirementText, helpText, hint, children, ...props }: FieldLabelProps): React.JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
declare const HelpText: 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
|
-
} & import("..").StyledProps
|
|
7
|
-
theme?: import("..").DefaultNDSThemeType;
|
|
8
|
-
}, never>;
|
|
7
|
+
} & import("..").StyledProps, never>;
|
|
9
8
|
export default HelpText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
interface BaseFormSectionProps extends React.ComponentPropsWithRef<"fieldset"> {
|
|
3
3
|
title?: string;
|
|
4
|
-
}
|
|
5
|
-
declare const FormSection: import("styled-components").StyledComponent<React.
|
|
4
|
+
}
|
|
5
|
+
declare const FormSection: import("styled-components").StyledComponent<({ title, children, ...props }: BaseFormSectionProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
6
6
|
export default FormSection;
|
package/dist/src/Icon/Icon.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ interface IconProps extends SpaceProps {
|
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
11
|
}
|
|
12
12
|
declare const Icon: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>, import("styled-components").DefaultTheme, IconProps, never>;
|
|
13
|
-
export declare
|
|
13
|
+
export declare function InlineIcon(props: IconProps): React.JSX.Element;
|
|
14
14
|
export default Icon;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface LoadingIconProps extends React.ComponentPropsWithRef<"svg"> {
|
|
3
|
+
size?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const LoadingIcon: React.ForwardRefExoticComponent<Omit<LoadingIconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
4
6
|
export default LoadingIcon;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SpaceProps } from "styled-system";
|
|
2
|
+
import { LayoutProps, SpaceProps } from "styled-system";
|
|
3
3
|
import { InputFieldProps } from "./InputField";
|
|
4
|
-
|
|
4
|
+
interface InputProps extends InputFieldProps, SpaceProps, LayoutProps {
|
|
5
5
|
errorMessage?: string;
|
|
6
|
-
helpText?: React.ReactNode;
|
|
7
6
|
errorList?: string[];
|
|
8
7
|
className?: string;
|
|
9
|
-
}
|
|
8
|
+
}
|
|
10
9
|
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
10
|
export default Input;
|
|
@@ -10,7 +10,6 @@ export declare const WithAllProps: {
|
|
|
10
10
|
name: string;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
export declare const WithDifferentSizes: () => React.JSX.Element;
|
|
14
13
|
export declare const SetToDisabled: {
|
|
15
14
|
(): React.JSX.Element;
|
|
16
15
|
story: {
|
|
@@ -47,6 +46,7 @@ export declare const WithAAffixPrefixAndSuffix: {
|
|
|
47
46
|
name: string;
|
|
48
47
|
};
|
|
49
48
|
};
|
|
49
|
+
export declare const WithAnIcon: () => React.JSX.Element;
|
|
50
50
|
export declare const UsingRefToControlFocus: {
|
|
51
51
|
(): React.JSX.Element;
|
|
52
52
|
story: {
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size">;
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
|
+
type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size" | "height" | "width">;
|
|
4
4
|
export interface InputFieldProps extends NativeInputProps {
|
|
5
5
|
htmlSize?: number;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
variant?: ComponentVariant;
|
|
7
|
+
iconRight?: string;
|
|
8
|
+
iconLeft?: string;
|
|
9
|
+
iconRightSize?: string;
|
|
10
|
+
iconLeftSize?: string;
|
|
8
11
|
error?: boolean;
|
|
9
12
|
labelText?: string;
|
|
10
13
|
requirementText?: string;
|
|
11
|
-
helpText?:
|
|
14
|
+
helpText?: React.ReactNode;
|
|
12
15
|
suffix?: string;
|
|
13
16
|
prefix?: string;
|
|
14
17
|
suffixWidth?: string;
|
|
15
18
|
prefixWidth?: string;
|
|
16
19
|
suffixAlignment?: "left" | "right";
|
|
17
20
|
prefixAlignment?: "left" | "right";
|
|
18
|
-
iconSize?: string;
|
|
19
21
|
inputWidth?: string;
|
|
20
22
|
}
|
|
21
23
|
export declare const InputField: React.ForwardRefExoticComponent<Omit<InputFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextProps } from "../Type/Text";
|
|
3
|
-
|
|
3
|
+
interface SuffixProps extends TextProps {
|
|
4
4
|
suffix?: string;
|
|
5
5
|
suffixWidth?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
defaultProps: {
|
|
10
|
-
suffix: any;
|
|
11
|
-
children: any;
|
|
12
|
-
suffixWidth: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default Suffix;
|
|
6
|
+
}
|
|
7
|
+
export default function Suffix({ suffix, suffixWidth, ...props }: SuffixProps): React.JSX.Element;
|
|
8
|
+
export {};
|
package/dist/src/Link/Link.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyledProps } from "../StyledProps";
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
4
4
|
export type LinkProps = React.ComponentPropsWithRef<"a"> & Partial<StyledProps> & {
|
|
5
5
|
underline?: boolean;
|
|
6
6
|
hover?: string;
|
|
7
|
-
|
|
7
|
+
variant?: ComponentVariant;
|
|
8
8
|
to?: string;
|
|
9
9
|
as?: React.ElementType | string;
|
|
10
10
|
};
|
|
@@ -28,7 +28,6 @@ export declare const WithADifferentColor: {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
export declare const WithADifferentFontSize: () => React.JSX.Element;
|
|
31
|
-
export declare const WithDifferentSizes: () => React.JSX.Element;
|
|
32
31
|
export declare const AsAButton: {
|
|
33
32
|
(): React.JSX.Element;
|
|
34
33
|
story: {
|
package/dist/src/List/List.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DefaultNDSThemeType } from "../theme.type";
|
|
3
2
|
import { StyledProps } from "../StyledProps";
|
|
4
|
-
|
|
5
|
-
theme?: DefaultNDSThemeType;
|
|
3
|
+
interface Props extends React.ComponentPropsWithRef<"ul">, StyledProps {
|
|
6
4
|
className?: string;
|
|
7
5
|
compact?: boolean;
|
|
8
6
|
leftAlign?: boolean;
|
|
9
7
|
listStyle?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const List:
|
|
8
|
+
}
|
|
9
|
+
declare const List: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, Props, never>;
|
|
12
10
|
export default List;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { SpaceProps, ColorProps, TypographyProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare const ListItem: React.FC<ListItemProps>;
|
|
3
|
+
declare const ListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
4
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
5
|
+
} & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>, never>;
|
|
7
6
|
export default ListItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
interface Props extends React.ComponentPropsWithRef<"svg"> {
|
|
3
3
|
inactive?: boolean;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export
|
|
4
|
+
}
|
|
5
|
+
export default function LoadingAnimation({ inactive }: Props): React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -19,7 +19,7 @@ type ModalProps = {
|
|
|
19
19
|
footerContent?: React.ReactNode;
|
|
20
20
|
parentSelector?: (...args: any) => HTMLElement;
|
|
21
21
|
};
|
|
22
|
-
declare const Modal: React.FC<ModalProps
|
|
22
|
+
declare const Modal: React.FC<React.PropsWithChildren<ModalProps>> & {
|
|
23
23
|
setAppElement: (element: string | HTMLElement) => void;
|
|
24
24
|
};
|
|
25
25
|
export default Modal;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const ModalCloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const ModalCloseButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
+
ref?: import("react").Ref<HTMLButtonElement>;
|
|
4
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
5
|
export default ModalCloseButton;
|
|
@@ -4,5 +4,5 @@ type ModalContentProps = React.ComponentPropsWithRef<"div"> & {
|
|
|
4
4
|
hasFooter?: any;
|
|
5
5
|
theme?: DefaultNDSThemeType;
|
|
6
6
|
};
|
|
7
|
-
declare const ModalContent: React.FC<ModalContentProps
|
|
7
|
+
declare const ModalContent: React.FC<React.PropsWithChildren<ModalContentProps>>;
|
|
8
8
|
export default ModalContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ComponentVariant = "touch" | "desktop";
|
|
3
|
+
type ComponentVariantContextValue = {
|
|
4
|
+
variant: ComponentVariant;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export default function ComponentVariantContextProvider({ variant, children }: ComponentVariantContextValue): React.JSX.Element;
|
|
8
|
+
export declare const ComponentVariantContext: React.Context<ComponentVariantContextValue>;
|
|
9
|
+
export declare function useComponentVariant(selectedVariant?: ComponentVariant): ComponentVariant;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DefaultNDSThemeType } from "../theme.type";
|
|
3
|
+
type GlobalStylesComposerProps = {
|
|
4
|
+
theme?: DefaultNDSThemeType;
|
|
5
|
+
locale?: string;
|
|
6
|
+
disableGlobalStyles?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export default function GlobalStylesComposer({ theme, locale, disableGlobalStyles, children, }: GlobalStylesComposerProps): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ThemeType
|
|
3
|
-
import {
|
|
4
|
-
export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>) => {
|
|
5
|
-
map: (fn: any) => unknown[];
|
|
6
|
-
extraSmall: string;
|
|
7
|
-
small: string;
|
|
8
|
-
medium: string;
|
|
9
|
-
large: string;
|
|
10
|
-
extraLarge: string;
|
|
11
|
-
};
|
|
2
|
+
import { ThemeType } from "../theme.type";
|
|
3
|
+
import { ComponentVariant } from "./ComponentVariantContext";
|
|
12
4
|
type NDSProviderProps = {
|
|
13
5
|
theme?: ThemeType;
|
|
14
6
|
locale?: string;
|
|
15
7
|
disableGlobalStyles?: boolean;
|
|
16
|
-
children?:
|
|
17
|
-
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
variant?: ComponentVariant;
|
|
18
10
|
};
|
|
19
|
-
declare
|
|
11
|
+
declare function NDSProvider({ theme: customTheme, children, disableGlobalStyles, locale, variant, }: NDSProviderProps): React.JSX.Element;
|
|
20
12
|
export default NDSProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const mountWithNDSProvider: (component: any, locale?: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const renderWithNDSProvider: (component: any, locale?: string) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ThemeType, DefaultNDSThemeType, Breakpoints } from "../theme.type";
|
|
2
|
+
import { ComponentVariant } from "./ComponentVariantContext";
|
|
3
|
+
export declare const buildBreakPoints: (breakpointsConfig: Readonly<Breakpoints>) => {
|
|
4
|
+
map: <T>(fn: (value: string) => T) => T[];
|
|
5
|
+
extraSmall: string;
|
|
6
|
+
small: string;
|
|
7
|
+
medium: string;
|
|
8
|
+
large: string;
|
|
9
|
+
extraLarge: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const getThemeByVariant: (variant: ComponentVariant, isTabletSize: boolean) => DefaultNDSThemeType;
|
|
12
|
+
export declare function useNDSTheme(variant?: ComponentVariant, customTheme?: ThemeType): DefaultNDSThemeType;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
export default NavBarSearch;
|
|
2
|
-
declare const NavBarSearch: import("styled-components").StyledComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}): React.JSX.Element;
|
|
8
|
-
propTypes: {
|
|
9
|
-
name: PropTypes.Requireable<string>;
|
|
10
|
-
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
};
|
|
12
|
-
defaultProps: {
|
|
13
|
-
name: string;
|
|
14
|
-
onSubmit: () => void;
|
|
15
|
-
};
|
|
16
|
-
}, import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
declare const NavBarSearch: import("styled-components").StyledComponent<({ name, onSubmit, ...props }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
name?: string;
|
|
5
|
+
onSubmit: any;
|
|
6
|
+
}) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
17
7
|
import React from "react";
|
|
18
|
-
import PropTypes from "prop-types";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FlexProps } from "../Flex/Flex";
|
|
3
|
-
|
|
4
|
-
type OverlayProps = FlexProps & {
|
|
2
|
+
interface Props extends FlexProps {
|
|
5
3
|
dark?: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
}
|
|
5
|
+
declare const Overlay: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../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
|
+
} & Props, never>;
|
|
9
10
|
export default Overlay;
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
type NextButtonProps = {
|
|
4
3
|
disabled: boolean;
|
|
5
4
|
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
5
|
label: ReactNode;
|
|
7
6
|
ariaLabel: string;
|
|
8
7
|
};
|
|
9
|
-
declare const NextButton: {
|
|
10
|
-
({ disabled, onClick, label, ariaLabel }: NextButtonProps): React.JSX.Element;
|
|
11
|
-
propTypes: {
|
|
12
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
13
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
-
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
16
|
-
};
|
|
17
|
-
defaultProps: {
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
onClick: any;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
8
|
+
declare const NextButton: ({ disabled, onClick, label, ariaLabel }: NextButtonProps) => React.JSX.Element;
|
|
22
9
|
export default NextButton;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
type PageNumberProps = {
|
|
2
2
|
currentPage: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const PageNumber: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme,
|
|
4
|
+
declare const PageNumber: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
currentPage?: boolean;
|
|
7
|
+
} & PageNumberProps, never>;
|
|
5
8
|
export default PageNumber;
|
|
@@ -1,43 +1,19 @@
|
|
|
1
1
|
import React, { ReactNode, RefObject } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import { FlexProps } from "../Flex/Flex";
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const SEPARATOR: "...";
|
|
4
|
+
export declare const getPageItemsToDisplay: (totalPages: number, currentPage: number) => Array<typeof SEPARATOR | number>;
|
|
5
|
+
interface PaginationProps extends FlexProps {
|
|
6
6
|
currentPage: number;
|
|
7
7
|
totalPages: number;
|
|
8
8
|
onNext?: () => void;
|
|
9
9
|
onPrevious?: () => void;
|
|
10
|
-
onSelectPage?: (page:
|
|
10
|
+
onSelectPage?: (page: number) => void;
|
|
11
11
|
nextLabel?: ReactNode;
|
|
12
12
|
nextAriaLabel?: string;
|
|
13
13
|
previousLabel?: ReactNode;
|
|
14
14
|
previousAriaLabel?: string;
|
|
15
15
|
scrollToTopAfterPagination?: boolean;
|
|
16
16
|
scrollTargetRef?: RefObject<HTMLElement>;
|
|
17
|
-
};
|
|
18
|
-
declare function Pagination({ currentPage, totalPages, onNext, onPrevious, onSelectPage, nextAriaLabel, nextLabel, previousAriaLabel, previousLabel, scrollToTopAfterPagination, scrollTargetRef, "aria-label": ariaLabel, ...restProps }: PaginationProps): React.JSX.Element;
|
|
19
|
-
declare namespace Pagination {
|
|
20
|
-
var propTypes: {
|
|
21
|
-
currentPage: PropTypes.Validator<number>;
|
|
22
|
-
totalPages: PropTypes.Validator<number>;
|
|
23
|
-
onNext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
-
onPrevious: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
onSelectPage: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
-
nextLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
27
|
-
nextAriaLabel: PropTypes.Requireable<string>;
|
|
28
|
-
previousLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
29
|
-
previousAriaLabel: PropTypes.Requireable<string>;
|
|
30
|
-
"aria-label": PropTypes.Requireable<string>;
|
|
31
|
-
};
|
|
32
|
-
var defaultProps: {
|
|
33
|
-
onNext: any;
|
|
34
|
-
onPrevious: any;
|
|
35
|
-
onSelectPage: any;
|
|
36
|
-
nextLabel: any;
|
|
37
|
-
nextAriaLabel: any;
|
|
38
|
-
previousLabel: any;
|
|
39
|
-
previousAriaLabel: any;
|
|
40
|
-
"aria-label": any;
|
|
41
|
-
};
|
|
42
17
|
}
|
|
18
|
+
declare function Pagination({ onNext, onPrevious, onSelectPage, currentPage, totalPages, nextAriaLabel, nextLabel, previousAriaLabel, previousLabel, scrollToTopAfterPagination, scrollTargetRef, "aria-label": ariaLabel, ...restProps }: PaginationProps): React.JSX.Element;
|
|
43
19
|
export default Pagination;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
declare const PaginationButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
1
|
+
declare const PaginationButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
currentPage?: boolean;
|
|
4
|
+
}, never>;
|
|
2
5
|
export default PaginationButton;
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
type PreviousButtonProps = {
|
|
4
3
|
disabled: boolean;
|
|
5
4
|
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
5
|
label: ReactNode;
|
|
7
6
|
ariaLabel: string;
|
|
8
7
|
};
|
|
9
|
-
declare const PreviousButton: {
|
|
10
|
-
({ disabled, onClick, label, ariaLabel }: PreviousButtonProps): React.JSX.Element;
|
|
11
|
-
propTypes: {
|
|
12
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
13
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
-
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
16
|
-
};
|
|
17
|
-
defaultProps: {
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
onClick: any;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
8
|
+
declare const PreviousButton: ({ disabled, onClick, label, ariaLabel }: PreviousButtonProps) => React.JSX.Element;
|
|
22
9
|
export default PreviousButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type PopperProps = {
|
|
3
|
-
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
popperPlacement?: string;
|
|
5
5
|
defaultOpen?: boolean;
|
|
6
6
|
showDelay?: string | number;
|
|
@@ -16,5 +16,5 @@ type PopperProps = {
|
|
|
16
16
|
openAriaLabel?: string;
|
|
17
17
|
closeAriaLabel?: string;
|
|
18
18
|
};
|
|
19
|
-
declare const Popper: React.
|
|
19
|
+
declare const Popper: React.ForwardRefExoticComponent<PopperProps & React.RefAttributes<React.Ref<unknown>>>;
|
|
20
20
|
export default Popper;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
4
4
|
type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size">;
|
|
5
5
|
type RadioProps = NativeInputProps & SpaceProps & {
|
|
6
6
|
htmlSize?: number;
|
|
7
|
-
|
|
7
|
+
variant?: ComponentVariant;
|
|
8
8
|
labelText?: ReactNode;
|
|
9
9
|
checked?: boolean;
|
|
10
10
|
defaultChecked?: boolean;
|
|
11
11
|
error?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare const Radio: React.
|
|
13
|
+
declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
14
14
|
export default Radio;
|
|
@@ -8,23 +8,13 @@ interface RadioGroupProps {
|
|
|
8
8
|
helpText?: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
requirementText?: string;
|
|
11
|
-
children?:
|
|
11
|
+
children?: React.ReactNode;
|
|
12
12
|
name?: string;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
checkedValue?: string;
|
|
16
|
+
default?: boolean;
|
|
17
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
18
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
defaultProps: {
|
|
18
|
-
errorMessage: any;
|
|
19
|
-
errorList: any;
|
|
20
|
-
defaultValue: any;
|
|
21
|
-
checkedValue: any;
|
|
22
|
-
onChange: any;
|
|
23
|
-
className: any;
|
|
24
|
-
id: any;
|
|
25
|
-
helpText: any;
|
|
26
|
-
requirementText: any;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default RadioGroup;
|
|
19
|
+
export default function RadioGroup({ className, id, errorMessage, errorList, labelText, helpText, requirementText, ...props }: RadioGroupProps): React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
type RangeContainerProps = {
|
|
4
4
|
labelProps?: any;
|
|
5
5
|
startComponent?: React.ReactNode;
|
|
6
6
|
endComponent?: React.ReactNode;
|
|
7
|
-
|
|
7
|
+
variant?: ComponentVariant;
|
|
8
8
|
errorMessages?: (string | undefined)[];
|
|
9
|
+
children?: React.ReactNode;
|
|
9
10
|
};
|
|
10
|
-
declare const RangeContainer: React.
|
|
11
|
+
declare const RangeContainer: ({ startComponent, endComponent, errorMessages, labelProps, variant, ...props }: RangeContainerProps) => React.JSX.Element;
|
|
11
12
|
export default RangeContainer;
|