@nulogy/components 8.16.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,40 +1,19 @@
1
- import React from "react";
2
- type AsyncSelectProps = {
3
- windowThreshold?: number;
4
- filterOption?: (...args: any[]) => any;
5
- autocomplete?: boolean;
6
- disabled?: boolean;
7
- error?: boolean;
8
- errorMessage?: string;
9
- 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"];
10
7
  labelText?: string;
11
- helpText?: any;
12
- noOptionsMessage?: string;
13
8
  requirementText?: string;
14
- id?: string;
15
- initialIsOpen?: boolean;
16
- 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"];
17
15
  maxHeight?: string;
18
- multiselect?: boolean;
19
- name?: string;
20
- onBlur?: (...args: any[]) => any;
21
- onChange?: (...args: any[]) => any;
22
- placeholder?: string;
23
- required?: boolean;
24
- value?: any;
25
- defaultValue?: any;
26
- className?: string;
27
- classNamePrefix?: string;
28
- menuIsOpen?: boolean;
29
- onMenuOpen?: (...args: any[]) => any;
30
- onMenuClose?: (...args: any[]) => any;
31
- onInputChange?: (...args: any[]) => any;
32
- components?: any;
33
- closeMenuOnSelect?: boolean;
34
- "aria-label"?: string;
35
- cacheOptions?: boolean;
36
- defaultOptions?: Array<any>;
37
- loadOptions: any;
16
+ defaultValue?: AsyncProps<Option, IsMulti, Group>["defaultInputValue"];
38
17
  };
39
- 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>>>>;
40
19
  export default AsyncSelect;
@@ -21,12 +21,8 @@ export declare const WithADefaultValue: {
21
21
  name: string;
22
22
  };
23
23
  };
24
- export declare const Multiselect: {
25
- (): React.JSX.Element;
26
- story: {
27
- name: string;
28
- };
29
- };
24
+ export declare const Multiselect: () => React.JSX.Element;
25
+ export declare const WithAClearButton: () => React.JSX.Element;
30
26
  export declare const UsingRefToControlFocus: {
31
27
  (): React.JSX.Element;
32
28
  story: {
@@ -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;
@@ -36,6 +36,7 @@ export type SelectProps = {
36
36
  closeMenuOnSelect?: boolean;
37
37
  "aria-label"?: string;
38
38
  size?: ComponentSize;
39
+ isClearable?: boolean;
39
40
  [key: string]: any;
40
41
  };
41
42
  export declare const SelectDefaultProps: {
@@ -47,6 +47,7 @@ export declare const Required: {
47
47
  name: string;
48
48
  };
49
49
  };
50
+ export declare const WithAClearButton: () => React.JSX.Element;
50
51
  export declare const WithHelpText: {
51
52
  (): React.JSX.Element;
52
53
  story: {
@@ -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.16.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",
@@ -132,7 +132,7 @@
132
132
  "semantic-release": "^17.2.1",
133
133
  "source-map-loader": "^1.0.1",
134
134
  "storybook-addon-performance": "^0.17.1",
135
- "styled-components": "^5.1.0",
135
+ "styled-components": "^5.3.11",
136
136
  "svg-sprite-loader": "^6.0.11",
137
137
  "ts-jest": "^26.1.1",
138
138
  "typescript": "4.9.5",