@nulogy/components 9.0.3 → 10.0.1
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 +119 -117
- package/dist/main.module.js +119 -118
- package/dist/src/Alert/Alert.d.ts +7 -1
- package/dist/src/Alert/index.d.ts +2 -1
- package/dist/src/AsyncSelect/AsyncSelect.d.ts +3 -0
- package/dist/src/Box/Box.d.ts +9 -28
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +5 -2
- package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +6 -1
- package/dist/src/Card/CardSet.d.ts +1 -1
- package/dist/src/Divider/Divider.d.ts +1 -2
- package/dist/src/DropdownMenu/DropdownButton.d.ts +2 -1
- package/dist/src/FieldLabel/HelpText.d.ts +2 -2
- package/dist/src/Flex/Flex.d.ts +6 -2
- package/dist/src/Flex/Flex.story.d.ts +0 -12
- package/dist/src/Form/Field.d.ts +1 -2
- package/dist/src/NavBar/NavBar.d.ts +5 -1
- package/dist/src/Select/Select.d.ts +26 -38
- package/dist/src/Select/Select.spec-utils.d.ts +5 -2
- package/dist/src/Select/Select.story.d.ts +1 -1
- package/dist/src/Select/SelectOption.d.ts +6 -1
- package/dist/src/Select/customReactSelectStyles.d.ts +12 -949
- package/dist/src/StyledProps/index.d.ts +28 -7
- package/dist/src/Tabs/TabContainer.d.ts +1 -2
- package/dist/src/Tooltip/TooltipContainer.d.ts +2 -2
- package/dist/src/Type/Headings.d.ts +8 -8
- package/dist/src/Type/Text.d.ts +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/theme.d.ts +1 -1
- package/dist/src/theme.type.d.ts +22 -22
- package/package.json +3 -3
- package/dist/src/StyledProps/cursor.d.ts +0 -4
- package/dist/src/StyledProps/textOverflow.d.ts +0 -5
- package/dist/src/StyledProps/transform.d.ts +0 -4
- package/dist/src/StyledProps/transition.d.ts +0 -8
- package/dist/src/StyledProps/visibility.d.ts +0 -4
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { GroupBase } from "react-windowed-select";
|
|
3
|
+
import type { MenuPlacement, MenuPosition, Props as SelectProps } from "react-select";
|
|
2
4
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
3
|
-
|
|
4
|
-
options?: any[];
|
|
5
|
+
interface WindowedSelectProps extends SelectProps {
|
|
5
6
|
windowThreshold?: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
}
|
|
8
|
+
interface NDSOptionType {
|
|
9
|
+
label: string;
|
|
10
|
+
value: unknown;
|
|
11
|
+
}
|
|
12
|
+
interface CustomProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
13
|
+
autocomplete?: SelectProps<Option, IsMulti, Group>["isSearchable"];
|
|
12
14
|
labelText?: string;
|
|
13
|
-
helpText?: any;
|
|
14
|
-
noOptionsMessage?: Function;
|
|
15
15
|
requirementText?: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
helpText?: ReactNode;
|
|
17
|
+
disabled?: SelectProps<Option, IsMulti, Group>["isDisabled"];
|
|
18
|
+
errorMessage?: string;
|
|
19
|
+
errorList?: string[];
|
|
20
|
+
initialIsOpen?: SelectProps<Option, IsMulti, Group>["defaultMenuIsOpen"];
|
|
21
|
+
multiselect?: SelectProps<Option, IsMulti, Group>["isMulti"];
|
|
20
22
|
maxHeight?: string;
|
|
21
|
-
multiselect?: boolean;
|
|
22
|
-
name?: string;
|
|
23
|
-
onBlur?: (...args: any[]) => any;
|
|
24
|
-
onChange?: (...args: any[]) => any;
|
|
25
|
-
placeholder?: string;
|
|
26
|
-
required?: boolean;
|
|
27
|
-
value?: any;
|
|
28
|
-
defaultValue?: any;
|
|
29
|
-
className?: string;
|
|
30
|
-
classNamePrefix?: string;
|
|
31
|
-
menuIsOpen?: boolean;
|
|
32
|
-
onMenuOpen?: (...args: any[]) => any;
|
|
33
|
-
onMenuClose?: (...args: any[]) => any;
|
|
34
|
-
onInputChange?: (...args: any[]) => any;
|
|
35
|
-
components?: any;
|
|
36
|
-
closeMenuOnSelect?: boolean;
|
|
37
|
-
"aria-label"?: string;
|
|
38
23
|
size?: ComponentSize;
|
|
39
|
-
|
|
24
|
+
error?: boolean;
|
|
25
|
+
options: NDSOptionType[];
|
|
26
|
+
onChange?: (newValue: unknown) => void;
|
|
40
27
|
[key: string]: any;
|
|
41
|
-
}
|
|
28
|
+
}
|
|
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>;
|
|
42
30
|
export declare const SelectDefaultProps: {
|
|
43
31
|
autocomplete: boolean;
|
|
44
32
|
disabled: any;
|
|
@@ -53,8 +41,8 @@ export declare const SelectDefaultProps: {
|
|
|
53
41
|
id: any;
|
|
54
42
|
initialIsOpen: any;
|
|
55
43
|
maxHeight: string;
|
|
56
|
-
menuPosition:
|
|
57
|
-
menuPlacement:
|
|
44
|
+
menuPosition: MenuPosition;
|
|
45
|
+
menuPlacement: MenuPlacement;
|
|
58
46
|
multiselect: boolean;
|
|
59
47
|
name: any;
|
|
60
48
|
onBlur: any;
|
|
@@ -71,6 +59,6 @@ export declare const SelectDefaultProps: {
|
|
|
71
59
|
components: any;
|
|
72
60
|
closeMenuOnSelect: boolean;
|
|
73
61
|
};
|
|
74
|
-
declare const ReactSelect: React.ForwardRefExoticComponent<Omit<
|
|
75
|
-
export declare const getOption: (options:
|
|
62
|
+
declare const ReactSelect: React.ForwardRefExoticComponent<Omit<Omit<WindowedSelectProps, "isDisabled" | "isMulti" | "isSearchable" | "onChange" | "options" | "defaultMenuIsOpen" | "defaultInputValue"> & CustomProps<unknown, boolean, GroupBase<unknown>>, "ref"> & React.RefAttributes<unknown>>;
|
|
63
|
+
export declare const getOption: (options: NDSOptionType[], value: unknown) => unknown;
|
|
76
64
|
export default ReactSelect;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Matcher, SelectorMatcherOptions } from "@testing-library/react";
|
|
2
|
+
type QueryByText = (id: Matcher, options?: SelectorMatcherOptions) => HTMLElement;
|
|
3
|
+
export declare const openDropdown: (element: HTMLElement, i: number) => void;
|
|
4
|
+
export declare const selectOption: (optionText: string, container: HTMLElement, queryByText: QueryByText, i?: number) => void;
|
|
5
|
+
export {};
|
|
@@ -109,5 +109,5 @@ export declare const UsingRefToControlFocus: {
|
|
|
109
109
|
name: string;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
export declare const WithCustomProps: () => React.JSX.Element;
|
|
113
112
|
export declare const WithTopMenuPlacement: () => React.JSX.Element;
|
|
113
|
+
export declare const WithCustomProps: () => React.JSX.Element;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import { OptionProps } from "react-windowed-select";
|
|
3
|
+
import { GroupBase } from "react-select";
|
|
4
|
+
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
5
|
+
export declare function SelectOption<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group> & {
|
|
6
|
+
size: ComponentSize;
|
|
7
|
+
}): React.JSX.Element;
|