@nulogy/components 8.17.0 → 8.17.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.
@@ -1,41 +1,19 @@
1
- import React from "react";
2
- type AsyncSelectProps = {
3
- windowThreshold?: number;
4
- isClearable?: boolean;
5
- filterOption?: (...args: any[]) => any;
6
- autocomplete?: boolean;
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
- id?: string;
16
- initialIsOpen?: boolean;
17
- menuPosition?: string;
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
- multiselect?: boolean;
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<AsyncSelectProps & React.RefAttributes<unknown>>;
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;
@@ -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: (provided: any, state: any) => any;
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.17.0",
3
+ "version": "8.17.1",
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": "^3.0.8",
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",