@nulogy/components 8.17.0 → 8.18.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 +4234 -4026
- package/dist/main.module.js +4240 -4026
- package/dist/src/AsyncSelect/AsyncSelect.d.ts +14 -36
- package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +10 -0
- package/dist/src/Pagination/NextButton.d.ts +9 -10
- package/dist/src/Pagination/PageNumber.d.ts +4 -1
- package/dist/src/Pagination/Pagination.d.ts +42 -3
- package/dist/src/Pagination/Pagination.story.d.ts +1 -0
- package/dist/src/Pagination/PreviousButton.d.ts +9 -5
- package/dist/src/Select/customReactSelectStyles.d.ts +11 -24
- package/package.json +2 -2
|
@@ -1,41 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
autocomplete?:
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
error?: boolean;
|
|
9
|
-
errorMessage?: string;
|
|
10
|
-
errorList?: string[];
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import Select from "react-select/base";
|
|
3
|
+
import { AsyncProps } from "react-select/async";
|
|
4
|
+
import { GroupBase } from "react-select";
|
|
5
|
+
type AsyncCustomProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
|
|
6
|
+
autocomplete?: AsyncProps<Option, IsMulti, Group>["isSearchable"];
|
|
11
7
|
labelText?: string;
|
|
12
|
-
helpText?: any;
|
|
13
|
-
noOptionsMessage?: string;
|
|
14
8
|
requirementText?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
helpText?: ReactNode;
|
|
10
|
+
disabled?: AsyncProps<Option, IsMulti, Group>["isDisabled"];
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
errorList?: string[];
|
|
13
|
+
initialIsOpen?: AsyncProps<Option, IsMulti, Group>["defaultMenuIsOpen"];
|
|
14
|
+
multiselect?: AsyncProps<Option, IsMulti, Group>["isMulti"];
|
|
18
15
|
maxHeight?: string;
|
|
19
|
-
|
|
20
|
-
name?: string;
|
|
21
|
-
onBlur?: (...args: any[]) => any;
|
|
22
|
-
onChange?: (...args: any[]) => any;
|
|
23
|
-
placeholder?: string;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
value?: any;
|
|
26
|
-
defaultValue?: any;
|
|
27
|
-
className?: string;
|
|
28
|
-
classNamePrefix?: string;
|
|
29
|
-
menuIsOpen?: boolean;
|
|
30
|
-
onMenuOpen?: (...args: any[]) => any;
|
|
31
|
-
onMenuClose?: (...args: any[]) => any;
|
|
32
|
-
onInputChange?: (...args: any[]) => any;
|
|
33
|
-
components?: any;
|
|
34
|
-
closeMenuOnSelect?: boolean;
|
|
35
|
-
"aria-label"?: string;
|
|
36
|
-
cacheOptions?: boolean;
|
|
37
|
-
defaultOptions?: Array<any>;
|
|
38
|
-
loadOptions: any;
|
|
16
|
+
defaultValue?: AsyncProps<Option, IsMulti, Group>["defaultInputValue"];
|
|
39
17
|
};
|
|
40
|
-
declare const AsyncSelect: React.ForwardRefExoticComponent<
|
|
18
|
+
declare const AsyncSelect: React.ForwardRefExoticComponent<Omit<AsyncProps<unknown, boolean, GroupBase<unknown>>, "isDisabled" | "isMulti" | "isSearchable" | "defaultMenuIsOpen" | "defaultInputValue"> & AsyncCustomProps<unknown, boolean, GroupBase<unknown>> & React.RefAttributes<Select<unknown, boolean, GroupBase<unknown>>>>;
|
|
41
19
|
export default AsyncSelect;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClearIndicatorProps, ContainerProps, ControlProps, DropdownIndicatorProps, InputProps, MenuProps, MultiValueProps } from "react-select";
|
|
3
|
+
import { GroupBase } from "react-select";
|
|
4
|
+
export declare const SelectControl: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ControlProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
5
|
+
export declare const SelectMultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
6
|
+
export declare const SelectClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
7
|
+
export declare const SelectDropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
8
|
+
export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
9
|
+
export declare const SelectInput: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
10
|
+
export declare const SelectMenu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
+
type NextButtonProps = {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
};
|
|
3
9
|
declare const NextButton: {
|
|
4
|
-
({ disabled, onClick, label,
|
|
5
|
-
disabled: any;
|
|
6
|
-
onClick: any;
|
|
7
|
-
label: any;
|
|
8
|
-
"aria-label": any;
|
|
9
|
-
}): React.JSX.Element;
|
|
10
|
+
({ disabled, onClick, label, ariaLabel }: NextButtonProps): React.JSX.Element;
|
|
10
11
|
propTypes: {
|
|
11
12
|
disabled: PropTypes.Requireable<boolean>;
|
|
12
13
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
14
|
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
|
-
|
|
15
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
15
16
|
};
|
|
16
17
|
defaultProps: {
|
|
17
18
|
disabled: boolean;
|
|
18
19
|
onClick: any;
|
|
19
|
-
label: any;
|
|
20
|
-
"aria-label": any;
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
export default NextButton;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
type PageNumberProps = {
|
|
2
|
+
currentPage: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const PageNumber: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, PageNumberProps, never>;
|
|
2
5
|
export default PageNumber;
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React, { ReactNode, RefObject } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FlexProps } from "../Flex/Flex";
|
|
4
|
+
export declare const getPageItemsToDisplay: (totalPages: number, currentPage: number) => (string | number)[];
|
|
5
|
+
type PaginationProps = FlexProps & {
|
|
6
|
+
currentPage: number;
|
|
7
|
+
totalPages: number;
|
|
8
|
+
onNext?: () => void;
|
|
9
|
+
onPrevious?: () => void;
|
|
10
|
+
onSelectPage?: (page: string | number) => void;
|
|
11
|
+
nextLabel?: ReactNode;
|
|
12
|
+
nextAriaLabel?: string;
|
|
13
|
+
previousLabel?: ReactNode;
|
|
14
|
+
previousAriaLabel?: string;
|
|
15
|
+
scrollToTopAfterPagination?: boolean;
|
|
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
|
+
}
|
|
4
43
|
export default Pagination;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
+
type PreviousButtonProps = {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
};
|
|
3
9
|
declare const PreviousButton: {
|
|
4
|
-
({ disabled, onClick, label,
|
|
10
|
+
({ disabled, onClick, label, ariaLabel }: PreviousButtonProps): React.JSX.Element;
|
|
5
11
|
propTypes: {
|
|
6
12
|
disabled: PropTypes.Requireable<boolean>;
|
|
7
13
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
14
|
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
-
|
|
15
|
+
ariaLabel: PropTypes.Requireable<string>;
|
|
10
16
|
};
|
|
11
17
|
defaultProps: {
|
|
12
18
|
disabled: boolean;
|
|
13
19
|
onClick: any;
|
|
14
|
-
label: any;
|
|
15
|
-
"aria-label": any;
|
|
16
20
|
};
|
|
17
21
|
};
|
|
18
22
|
export default PreviousButton;
|
|
@@ -37,31 +37,10 @@ declare const customStyles: ({ theme, error, maxHeight, windowed, size, hasDefau
|
|
|
37
37
|
option: () => {
|
|
38
38
|
height: number;
|
|
39
39
|
};
|
|
40
|
-
control: (provided: any, state: any) =>
|
|
41
|
-
display: string;
|
|
42
|
-
minHeight: string;
|
|
43
|
-
paddingLeft: string;
|
|
44
|
-
position: string;
|
|
45
|
-
width: string;
|
|
46
|
-
fontSize: string;
|
|
47
|
-
lineHeight: string;
|
|
48
|
-
color: string;
|
|
49
|
-
background: string;
|
|
50
|
-
border: string;
|
|
51
|
-
borderColor: any;
|
|
52
|
-
boxSizing: string;
|
|
53
|
-
boxShadow: any;
|
|
54
|
-
borderRadius: string;
|
|
55
|
-
borderBottomLeftRadius: string | number;
|
|
56
|
-
borderBottomRightRadius: string | number;
|
|
57
|
-
borderTopRightRadius: string | number;
|
|
58
|
-
borderTopLeftRadius: string | number;
|
|
59
|
-
"&:hover, &:focus": {
|
|
60
|
-
borderColor: any;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
40
|
+
control: (provided: any, state: any) => any;
|
|
63
41
|
dropdownIndicator: (provided: any, state: any) => any;
|
|
64
42
|
indicatorsContainer: (provided: any) => any;
|
|
43
|
+
singleValue: (provided: any) => any;
|
|
65
44
|
input: () => {};
|
|
66
45
|
valueContainer: (provided: any, state: any) => any;
|
|
67
46
|
menu: (provided: any, state: any) => any;
|
|
@@ -981,6 +960,14 @@ declare const customStyles: ({ theme, error, maxHeight, windowed, size, hasDefau
|
|
|
981
960
|
multiValueRemove: (provided: any) => any;
|
|
982
961
|
noOptionsMessage: (provided: any) => any;
|
|
983
962
|
indicatorSeparator: (provided: any, state: any) => any;
|
|
984
|
-
placeholder: (
|
|
963
|
+
placeholder: (state: any) => {
|
|
964
|
+
label: string;
|
|
965
|
+
marginLeft: number;
|
|
966
|
+
marginRight: number;
|
|
967
|
+
position: string;
|
|
968
|
+
top: string;
|
|
969
|
+
transform: string;
|
|
970
|
+
color: string;
|
|
971
|
+
};
|
|
985
972
|
};
|
|
986
973
|
export default customStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"react-color": "^2.18.1",
|
|
123
123
|
"react-dom": "17.0.2",
|
|
124
124
|
"react-router-dom": "^5.2.0",
|
|
125
|
-
"react-select": "^
|
|
125
|
+
"react-select": "^5.8.0",
|
|
126
126
|
"react-test-renderer": "^16.10",
|
|
127
127
|
"rollup": "^2.7.3",
|
|
128
128
|
"rollup-plugin-babel": "^4.4.0",
|