@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,33 +1,32 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
label:
|
|
10
|
-
value:
|
|
2
|
+
import { GroupBase } from "react-windowed-select";
|
|
3
|
+
import type { Props as SelectProps } from "react-select";
|
|
4
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
5
|
+
interface WindowedSelectProps extends SelectProps {
|
|
6
|
+
windowThreshold?: number;
|
|
7
|
+
}
|
|
8
|
+
interface NDSOptionType {
|
|
9
|
+
label: string;
|
|
10
|
+
value: unknown;
|
|
11
11
|
}
|
|
12
|
-
interface CustomProps<IsMulti extends boolean, Group extends GroupBase<
|
|
13
|
-
autocomplete?:
|
|
12
|
+
interface CustomProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
13
|
+
autocomplete?: SelectProps<Option, IsMulti, Group>["isSearchable"];
|
|
14
14
|
labelText?: string;
|
|
15
|
-
size?: ComponentSize;
|
|
16
15
|
requirementText?: string;
|
|
17
16
|
helpText?: ReactNode;
|
|
18
|
-
disabled?:
|
|
17
|
+
disabled?: SelectProps<Option, IsMulti, Group>["isDisabled"];
|
|
19
18
|
errorMessage?: string;
|
|
20
19
|
errorList?: string[];
|
|
21
|
-
initialIsOpen?:
|
|
22
|
-
multiselect?:
|
|
20
|
+
initialIsOpen?: SelectProps<Option, IsMulti, Group>["defaultMenuIsOpen"];
|
|
21
|
+
multiselect?: SelectProps<Option, IsMulti, Group>["isMulti"];
|
|
23
22
|
maxHeight?: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
options:
|
|
27
|
-
onChange?: (newValue:
|
|
28
|
-
|
|
29
|
-
styles?: (selectStyles: StylesConfig<NDSOption, IsMulti, Group>) => StylesConfig<NDSOption, IsMulti, Group>;
|
|
23
|
+
variant?: ComponentVariant;
|
|
24
|
+
error?: boolean;
|
|
25
|
+
options: NDSOptionType[];
|
|
26
|
+
onChange?: (newValue: unknown) => void;
|
|
27
|
+
[key: string]: any;
|
|
30
28
|
}
|
|
31
|
-
export type NDSSelectProps<IsMulti extends boolean
|
|
32
|
-
declare const
|
|
33
|
-
export
|
|
29
|
+
export type NDSSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Omit<WindowedSelectProps, "isSearchable" | "isDisabled" | "isMulti" | "defaultMenuIsOpen" | "defaultInputValue" | "options" | "onChange"> & CustomProps<Option, IsMulti, Group>;
|
|
30
|
+
declare const ReactSelect: React.ForwardRefExoticComponent<Omit<Omit<WindowedSelectProps, "isDisabled" | "isMulti" | "isSearchable" | "onChange" | "options" | "defaultMenuIsOpen" | "defaultInputValue"> & CustomProps<unknown, boolean, GroupBase<unknown>>, "ref"> & React.RefAttributes<unknown>>;
|
|
31
|
+
export declare const getOption: (options: NDSOptionType[], value: unknown) => unknown;
|
|
32
|
+
export default ReactSelect;
|
|
@@ -4,8 +4,6 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const _Select: () => React.JSX.Element;
|
|
7
|
-
export declare const WithDifferentSizes: () => React.JSX.Element;
|
|
8
|
-
export declare const WithStyledProps: () => React.JSX.Element;
|
|
9
7
|
export declare const WithABlankValue: {
|
|
10
8
|
(): React.JSX.Element;
|
|
11
9
|
story: {
|
|
@@ -104,6 +102,11 @@ export declare const WithCustomOptionComponent: {
|
|
|
104
102
|
name: string;
|
|
105
103
|
};
|
|
106
104
|
};
|
|
107
|
-
export declare const UsingRefToControlFocus:
|
|
105
|
+
export declare const UsingRefToControlFocus: {
|
|
106
|
+
(): React.JSX.Element;
|
|
107
|
+
story: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
108
111
|
export declare const WithTopMenuPlacement: () => React.JSX.Element;
|
|
109
|
-
export declare const
|
|
112
|
+
export declare const WithCustomProps: () => React.JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
8
|
-
export declare
|
|
9
|
-
export declare function SelectContainer<Option = NDSOption, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>): React.JSX.Element;
|
|
10
|
-
export declare function SelectInput<Option = NDSOption, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>): React.JSX.Element;
|
|
2
|
+
export declare const SelectControl: (props: any) => React.JSX.Element;
|
|
3
|
+
export declare const SelectMultiValue: (props: any) => React.JSX.Element;
|
|
4
|
+
export declare const SelectClearIndicator: (props: any) => React.JSX.Element;
|
|
5
|
+
export declare const SelectDropdownIndicator: (props: any) => React.JSX.Element;
|
|
6
|
+
export declare const SelectMenu: (props: any) => React.JSX.Element;
|
|
7
|
+
export declare const SelectContainer: (props: any) => React.JSX.Element;
|
|
8
|
+
export declare const SelectInput: (props: any) => React.JSX.Element;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
type StyledOptionProps = {
|
|
2
|
+
import { OptionProps } from "react-windowed-select";
|
|
3
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
4
|
+
type SelectOptionProps = {
|
|
6
5
|
isSelected: boolean;
|
|
7
6
|
isFocused: boolean;
|
|
8
|
-
|
|
7
|
+
variant: ComponentVariant;
|
|
9
8
|
};
|
|
10
|
-
export declare const StyledOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export declare function SelectOption
|
|
9
|
+
export declare const StyledOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SelectOptionProps, never>;
|
|
10
|
+
interface CustomOptionProps extends OptionProps {
|
|
11
|
+
variant?: ComponentVariant;
|
|
12
|
+
}
|
|
13
|
+
export declare function SelectOption(props: CustomOptionProps): React.JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { CSSObject } from "styled-components";
|
|
|
2
2
|
import type { GroupBase, MenuPlacement, StylesConfig } from "react-select";
|
|
3
3
|
import type { CSSProperties } from "react";
|
|
4
4
|
import type { DefaultNDSThemeType } from "../theme.type";
|
|
5
|
-
import type {
|
|
5
|
+
import type { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
6
6
|
type Placement = "top" | "bottom";
|
|
7
7
|
export declare function getControlBorderRadius({ border, isMenuOpen, menuLength, menuPlacement, theme, }: {
|
|
8
8
|
border: Placement;
|
|
@@ -19,15 +19,15 @@ export declare function getMenuBorderRadius({ border, menuPlacement, theme, }: {
|
|
|
19
19
|
radius: string | number;
|
|
20
20
|
style: CSSProperties["borderBottomStyle"];
|
|
21
21
|
};
|
|
22
|
-
type
|
|
23
|
-
[key in
|
|
22
|
+
type VariantConfig = {
|
|
23
|
+
[key in ComponentVariant]: CSSObject;
|
|
24
24
|
};
|
|
25
|
-
export declare function
|
|
26
|
-
export declare
|
|
27
|
-
isMulti: any;
|
|
25
|
+
export declare function stylesForVariant(config: VariantConfig, variant?: ComponentVariant): CSSObject;
|
|
26
|
+
export declare function showIndicatorSeparator({ hasValue, isClearable, isMulti }: {
|
|
28
27
|
hasValue: any;
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
isClearable: any;
|
|
29
|
+
isMulti: any;
|
|
30
|
+
}): any;
|
|
31
31
|
interface Args {
|
|
32
32
|
theme: DefaultNDSThemeType;
|
|
33
33
|
[key: string]: any;
|
|
@@ -3,5 +3,5 @@ type SummaryContextValue = {
|
|
|
3
3
|
breakpoint: number;
|
|
4
4
|
};
|
|
5
5
|
export declare function useSummaryContext(): SummaryContextValue;
|
|
6
|
-
export declare const SummaryContextProvider: React.FC<SummaryContextValue
|
|
6
|
+
export declare const SummaryContextProvider: React.FC<React.PropsWithChildren<SummaryContextValue>>;
|
|
7
7
|
export {};
|
|
@@ -4,5 +4,5 @@ type SummaryItemProps = Omit<FlexProps, "as"> & {
|
|
|
4
4
|
value: number | string;
|
|
5
5
|
status: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const SummaryItem: React.FC<SummaryItemProps
|
|
7
|
+
declare const SummaryItem: React.FC<React.PropsWithChildren<SummaryItemProps>>;
|
|
8
8
|
export default SummaryItem;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
export type SwitchProps = Omit<React.ComponentPropsWithRef<"button">, "value"> & {
|
|
4
4
|
value?: string;
|
|
5
5
|
selected?: boolean;
|
|
6
|
-
|
|
6
|
+
variant?: ComponentVariant;
|
|
7
7
|
};
|
|
8
8
|
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
export default Switch;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
import type { SwitchProps } from "./Switch";
|
|
4
4
|
type SwitcherProps = {
|
|
5
|
-
|
|
5
|
+
variant?: ComponentVariant;
|
|
6
6
|
children?: ReactElement<SwitchProps>[];
|
|
7
7
|
selected?: string;
|
|
8
8
|
onChange?: (value: string) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const Switcher: React.FC<SwitcherProps
|
|
10
|
+
declare const Switcher: React.FC<React.PropsWithChildren<SwitcherProps>>;
|
|
11
11
|
export default Switcher;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const WithSelectedValue: () => React.JSX.Element;
|
|
3
|
-
export declare const WithDifferentSizes: () => React.JSX.Element;
|
|
4
3
|
export declare const WithOtherInteractiveElements: () => React.JSX.Element;
|
|
5
4
|
export declare const WithContent: () => React.JSX.Element;
|
|
6
5
|
declare const _default: {
|
|
@@ -17,21 +17,5 @@ export type BaseTableProps<ColumnMetaData> = {
|
|
|
17
17
|
onMouseEnter?: any;
|
|
18
18
|
onMouseLeave?: any;
|
|
19
19
|
};
|
|
20
|
-
declare function BaseTable<ColumnMetaData>({
|
|
21
|
-
declare namespace BaseTable {
|
|
22
|
-
var propTypes: any;
|
|
23
|
-
var defaultProps: {
|
|
24
|
-
noRowsContent: string;
|
|
25
|
-
keyField: string;
|
|
26
|
-
id: any;
|
|
27
|
-
loading: boolean;
|
|
28
|
-
footerRows: any[];
|
|
29
|
-
rowHovers: boolean;
|
|
30
|
-
compact: boolean;
|
|
31
|
-
className: any;
|
|
32
|
-
stickyHeader: boolean;
|
|
33
|
-
onRowMouseEnter: () => void;
|
|
34
|
-
onRowMouseLeave: () => void;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
20
|
+
declare function BaseTable<ColumnMetaData>({ noRowsContent, keyField, loading, footerRows, rowHovers, compact, stickyHeader, onRowMouseEnter, onRowMouseLeave, columns, rows, id, className, ...props }: BaseTableProps<ColumnMetaData>): React.JSX.Element;
|
|
37
21
|
export default BaseTable;
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}): React.JSX.Element;
|
|
11
|
-
propTypes: {
|
|
12
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
14
|
-
label: PropTypes.Requireable<string>;
|
|
15
|
-
ascending: PropTypes.Requireable<boolean>;
|
|
16
|
-
active: PropTypes.Requireable<boolean>;
|
|
17
|
-
};
|
|
18
|
-
defaultProps: {
|
|
19
|
-
ariaLabel: any;
|
|
20
|
-
label: any;
|
|
21
|
-
ascending: boolean;
|
|
22
|
-
active: boolean;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
2
|
+
interface SortingColumnHeaderProps {
|
|
3
|
+
onChange?: React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
ascending?: boolean;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function SortingColumnHeader({ onChange, label, ariaLabel, ascending, active, }: SortingColumnHeaderProps): React.JSX.Element;
|
|
25
10
|
export default SortingColumnHeader;
|
|
@@ -26,14 +26,6 @@ type StatefulTableState = {
|
|
|
26
26
|
};
|
|
27
27
|
declare class StatefulTable<ColumnMetaData> extends Component<StatefulTableProps<ColumnMetaData>, StatefulTableState> {
|
|
28
28
|
static defaultProps: {
|
|
29
|
-
hasSelectableRows: boolean;
|
|
30
|
-
selectedRows: any[];
|
|
31
|
-
isHeaderSelected: boolean;
|
|
32
|
-
onRowExpansionChange: () => void;
|
|
33
|
-
selectAllAriaLabel: any;
|
|
34
|
-
deselectAllAriaLabel: any;
|
|
35
|
-
paginationCss: any;
|
|
36
|
-
paginationProps: {};
|
|
37
29
|
noRowsContent: string;
|
|
38
30
|
keyField: string;
|
|
39
31
|
id: any;
|
|
@@ -45,6 +37,14 @@ declare class StatefulTable<ColumnMetaData> extends Component<StatefulTableProps
|
|
|
45
37
|
stickyHeader: boolean;
|
|
46
38
|
onRowMouseEnter: () => void;
|
|
47
39
|
onRowMouseLeave: () => void;
|
|
40
|
+
hasSelectableRows: boolean;
|
|
41
|
+
selectedRows: any[];
|
|
42
|
+
isHeaderSelected: boolean;
|
|
43
|
+
onRowExpansionChange: () => void;
|
|
44
|
+
selectAllAriaLabel: any;
|
|
45
|
+
deselectAllAriaLabel: any;
|
|
46
|
+
paginationCss: any;
|
|
47
|
+
paginationProps: {};
|
|
48
48
|
};
|
|
49
49
|
constructor(props: any);
|
|
50
50
|
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { DefaultNDSThemeType } from "../theme.type";
|
|
2
1
|
type StyledThProps = {
|
|
3
2
|
width?: any;
|
|
4
3
|
compact?: boolean;
|
|
5
|
-
theme?: DefaultNDSThemeType;
|
|
6
4
|
sticky?: any;
|
|
7
5
|
};
|
|
8
6
|
declare const StyledTh: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, StyledThProps, never>;
|
|
@@ -1,33 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import SortingColumnHeader from "./SortingColumnHeader";
|
|
2
3
|
import { StatefulTableProps } from "./StatefulTable";
|
|
3
4
|
import { ColumnType, RowType, CellInfoType } from "./Table.types";
|
|
4
|
-
export type TableProps<ColumnMetadata> = StatefulTableProps<ColumnMetadata>;
|
|
5
|
-
export type TableColumnType<ColumnMetadata> = ColumnType<ColumnMetadata>;
|
|
5
|
+
export type TableProps<ColumnMetadata = unknown> = StatefulTableProps<ColumnMetadata>;
|
|
6
|
+
export type TableColumnType<ColumnMetadata = unknown> = ColumnType<ColumnMetadata>;
|
|
6
7
|
export type TableRowType = RowType;
|
|
7
|
-
export type TableCellInfoType<ColumnMetadata> = CellInfoType<ColumnMetadata>;
|
|
8
|
+
export type TableCellInfoType<ColumnMetadata = unknown> = CellInfoType<ColumnMetadata>;
|
|
8
9
|
declare function Table<ColumnMetadata>({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }: TableProps<ColumnMetadata>): React.JSX.Element;
|
|
9
10
|
declare namespace Table {
|
|
10
|
-
var SortingHeader:
|
|
11
|
-
({ onChange, label, ascending, active, ariaLabel }: {
|
|
12
|
-
onChange: any;
|
|
13
|
-
label: any;
|
|
14
|
-
ascending: any;
|
|
15
|
-
active: any;
|
|
16
|
-
ariaLabel: any;
|
|
17
|
-
}): React.JSX.Element;
|
|
18
|
-
propTypes: {
|
|
19
|
-
onChange: import("prop-types").Validator<(...args: any[]) => any>;
|
|
20
|
-
ariaLabel: import("prop-types").Requireable<string>;
|
|
21
|
-
label: import("prop-types").Requireable<string>;
|
|
22
|
-
ascending: import("prop-types").Requireable<boolean>;
|
|
23
|
-
active: import("prop-types").Requireable<boolean>;
|
|
24
|
-
};
|
|
25
|
-
defaultProps: {
|
|
26
|
-
ariaLabel: any;
|
|
27
|
-
label: any;
|
|
28
|
-
ascending: boolean;
|
|
29
|
-
active: boolean;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
11
|
+
var SortingHeader: typeof SortingColumnHeader;
|
|
32
12
|
}
|
|
33
13
|
export default Table;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Key } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
export type RowType = any;
|
|
4
3
|
export interface CellInfoType<ColumnMetadata> {
|
|
5
4
|
cellData: any;
|
|
@@ -24,30 +23,4 @@ export type ColumnType<ColumnMetadata> = {
|
|
|
24
23
|
key?: never | undefined;
|
|
25
24
|
});
|
|
26
25
|
export type Columns<ColumnMetadata> = ColumnType<ColumnMetadata>[];
|
|
27
|
-
export declare const columnPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
|
-
align: PropTypes.Requireable<string>;
|
|
29
|
-
label: PropTypes.Requireable<string>;
|
|
30
|
-
dataKey: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<number>>;
|
|
31
|
-
key: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<number>>;
|
|
32
|
-
cellFormatter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
-
cellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
-
headerRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
-
width: PropTypes.Requireable<string>;
|
|
36
|
-
}>>;
|
|
37
|
-
export declare const rowPropType: PropTypes.Requireable<{
|
|
38
|
-
[x: string]: NonNullable<PropTypes.ReactNodeLike>;
|
|
39
|
-
}>;
|
|
40
|
-
export declare const columnsPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
-
align: PropTypes.Requireable<string>;
|
|
42
|
-
label: PropTypes.Requireable<string>;
|
|
43
|
-
dataKey: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<number>>;
|
|
44
|
-
key: PropTypes.Requireable<PropTypes.Requireable<string> | PropTypes.Requireable<number>>;
|
|
45
|
-
cellFormatter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
-
cellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
-
headerRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
-
width: PropTypes.Requireable<string>;
|
|
49
|
-
}>[]>;
|
|
50
|
-
export declare const rowsPropType: PropTypes.Requireable<{
|
|
51
|
-
[x: string]: NonNullable<PropTypes.ReactNodeLike>;
|
|
52
|
-
}[]>;
|
|
53
26
|
export {};
|
|
@@ -3,8 +3,8 @@ type TableCellProps = {
|
|
|
3
3
|
column?: any;
|
|
4
4
|
row?: any;
|
|
5
5
|
colSpan?: number;
|
|
6
|
-
cellData?:
|
|
6
|
+
cellData?: Record<string, unknown> | React.ReactNode | boolean;
|
|
7
7
|
compact?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const TableCell: React.
|
|
9
|
+
declare const TableCell: ({ column, row, cellData, colSpan, compact }: TableCellProps) => React.JSX.Element;
|
|
10
10
|
export default TableCell;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import { RowType, Columns } from "./Table.types";
|
|
4
3
|
declare function TableFoot<ColumnMetadata>({ columns, rows, keyField, loading, compact, }: {
|
|
5
4
|
columns: Columns<ColumnMetadata>;
|
|
@@ -8,29 +7,4 @@ declare function TableFoot<ColumnMetadata>({ columns, rows, keyField, loading, c
|
|
|
8
7
|
loading?: boolean;
|
|
9
8
|
compact?: boolean;
|
|
10
9
|
}): React.JSX.Element;
|
|
11
|
-
declare namespace TableFoot {
|
|
12
|
-
var propTypes: {
|
|
13
|
-
columns: PropTypes.Validator<PropTypes.InferProps<{
|
|
14
|
-
align: PropTypes.Requireable<string>;
|
|
15
|
-
label: PropTypes.Requireable<string>;
|
|
16
|
-
dataKey: PropTypes.Requireable<PropTypes.Requireable<number> | PropTypes.Requireable<string>>;
|
|
17
|
-
key: PropTypes.Requireable<PropTypes.Requireable<number> | PropTypes.Requireable<string>>;
|
|
18
|
-
cellFormatter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
cellRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
headerRenderer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
width: PropTypes.Requireable<string>;
|
|
22
|
-
}>[]>;
|
|
23
|
-
rows: PropTypes.Validator<{
|
|
24
|
-
[x: string]: NonNullable<PropTypes.ReactNodeLike>;
|
|
25
|
-
}[]>;
|
|
26
|
-
keyField: PropTypes.Requireable<string>;
|
|
27
|
-
loading: PropTypes.Requireable<boolean>;
|
|
28
|
-
compact: PropTypes.Requireable<boolean>;
|
|
29
|
-
};
|
|
30
|
-
var defaultProps: {
|
|
31
|
-
keyField: string;
|
|
32
|
-
loading: boolean;
|
|
33
|
-
compact: boolean;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
10
|
export default TableFoot;
|
package/dist/src/Tabs/Tab.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
type TabButtonProps = React.ComponentPropsWithRef<"button"> & {
|
|
4
|
-
|
|
4
|
+
variant?: ComponentVariant;
|
|
5
5
|
selected?: boolean;
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
};
|
|
8
|
-
type TabProps = TabButtonProps & {
|
|
8
|
+
export type TabProps = TabButtonProps & {
|
|
9
9
|
label?: React.ReactNode;
|
|
10
10
|
};
|
|
11
|
-
declare const Tab: React.
|
|
11
|
+
declare const Tab: React.ForwardRefExoticComponent<Omit<TabProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
export default Tab;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TabContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box
|
|
1
|
+
declare const TabContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../Box").BoxProps, never>;
|
|
2
2
|
export default TabContainer;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type Side = "left" | "right";
|
|
2
3
|
type TabScrollIndicatorProps = {
|
|
3
|
-
onClick?:
|
|
4
|
-
side?:
|
|
4
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
side?: Side;
|
|
5
6
|
width?: string | number;
|
|
6
7
|
ariaLabelLeft?: string;
|
|
7
8
|
ariaLabelRight?: string;
|
|
8
9
|
};
|
|
9
|
-
declare const TabScrollIndicator: React.FC<TabScrollIndicatorProps
|
|
10
|
+
declare const TabScrollIndicator: React.FC<React.PropsWithChildren<TabScrollIndicatorProps>>;
|
|
10
11
|
export default TabScrollIndicator;
|
package/dist/src/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
export type TabsProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
selectedIndex?: number;
|
|
6
|
-
|
|
6
|
+
variant?: ComponentVariant;
|
|
7
7
|
defaultSelectedIndex?: number;
|
|
8
8
|
renderTabContentOnlyWhenSelected?: boolean;
|
|
9
9
|
fitted?: boolean;
|
|
@@ -14,7 +14,8 @@ export type TabsState = {
|
|
|
14
14
|
};
|
|
15
15
|
declare class Tabs extends React.Component<TabsProps, TabsState> {
|
|
16
16
|
static contextType: React.Context<{
|
|
17
|
-
|
|
17
|
+
variant: ComponentVariant;
|
|
18
|
+
children?: React.ReactNode;
|
|
18
19
|
}>;
|
|
19
20
|
constructor(props: any);
|
|
20
21
|
getSelectedIndex(): any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
import { DefaultNDSThemeType } from "../theme.type";
|
|
4
|
-
import {
|
|
4
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
5
5
|
export type StyledTextareaProps = React.ComponentPropsWithRef<"textarea"> & SpaceProps & {
|
|
6
|
-
|
|
6
|
+
variant?: ComponentVariant;
|
|
7
7
|
theme?: DefaultNDSThemeType;
|
|
8
8
|
errorMessage?: string;
|
|
9
9
|
errorList?: string[];
|
|
@@ -14,7 +14,7 @@ export type StyledTextareaProps = React.ComponentPropsWithRef<"textarea"> & Spac
|
|
|
14
14
|
declare const StyledTextarea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & {
|
|
15
15
|
ref?: React.Ref<HTMLTextAreaElement>;
|
|
16
16
|
} & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
17
|
-
|
|
17
|
+
variant?: ComponentVariant;
|
|
18
18
|
theme?: DefaultNDSThemeType;
|
|
19
19
|
errorMessage?: string;
|
|
20
20
|
errorList?: string[];
|
|
@@ -12,4 +12,3 @@ export declare const WithErrorList: () => React.JSX.Element;
|
|
|
12
12
|
export declare const WithCustomNumberOfRows: () => React.JSX.Element;
|
|
13
13
|
export declare const WithCustomId: () => React.JSX.Element;
|
|
14
14
|
export declare const UsingRefToControlFocus: () => React.JSX.Element;
|
|
15
|
-
export declare const WithDifferentSizes: () => React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
4
4
|
type TimePickerProps = SpaceProps & {
|
|
5
|
-
|
|
5
|
+
variant?: ComponentVariant;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
value?: string;
|
|
8
8
|
timeFormat?: string;
|
|
@@ -38,5 +38,5 @@ export declare const getTimeOptions: (interval: any, timeFormat: any, minTime: a
|
|
|
38
38
|
value: string;
|
|
39
39
|
label: string;
|
|
40
40
|
}[];
|
|
41
|
-
declare const TimePicker: React.FC<TimePickerProps
|
|
41
|
+
declare const TimePicker: React.FC<React.PropsWithChildren<TimePickerProps>>;
|
|
42
42
|
export default TimePicker;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
3
3
|
declare const TimePickerOption: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, React.ClassAttributes<HTMLLIElement> & React.LiHTMLAttributes<HTMLLIElement> & {
|
|
4
|
-
|
|
4
|
+
variant?: ComponentVariant;
|
|
5
5
|
isSelected: boolean;
|
|
6
6
|
isFocused: boolean;
|
|
7
7
|
isClosest: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
|
|
4
4
|
declare const TimeRange: React.ForwardRefExoticComponent<Omit<SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
5
|
-
|
|
5
|
+
variant?: ComponentVariant;
|
|
6
6
|
timeFormat?: string;
|
|
7
7
|
onRangeChange?: Function;
|
|
8
8
|
onStartTimeChange?: Function;
|
|
@@ -32,15 +32,5 @@ export declare const toastAnimationConfig: {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
export declare const Toast: {
|
|
36
|
-
({ triggered, onHide, onShow, isCloseable, children, showDuration, onHidden, zIndex, ...props }: ToastProps): React.JSX.Element;
|
|
37
|
-
defaultProps: {
|
|
38
|
-
triggered: boolean;
|
|
39
|
-
isCloseable: boolean;
|
|
40
|
-
showDuration: number;
|
|
41
|
-
onShow: () => void;
|
|
42
|
-
onHide: () => void;
|
|
43
|
-
onHidden: () => void;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
35
|
+
export declare const Toast: ({ triggered, isCloseable, showDuration, onHide, onShow, children, onHidden, zIndex, ...props }: ToastProps) => React.JSX.Element;
|
|
46
36
|
export default Toast;
|