@stenajs-webui/select 17.6.0 → 17.9.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v17.7.0 (Fri Jul 01 2022)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Build packages with vite [#475](https://github.com/StenaIT/stenajs-webui/pull/475) ([@lindskogen](https://github.com/lindskogen))
6
+
7
+ #### Authors: 1
8
+
9
+ - Johan Lindskogen ([@lindskogen](https://github.com/lindskogen))
10
+
11
+ ---
12
+
1
13
  # v17.6.0 (Fri Jul 01 2022)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -1,75 +1,75 @@
1
- import { Property } from "csstype";
2
- export interface SelectTheme {
3
- arrowColor: {
4
- focused: {
5
- standard: string;
6
- hover: string;
7
- };
8
- closed: {
9
- standard: string;
10
- hover: string;
11
- };
12
- };
13
- clearButtonColor: {
14
- standard: string;
15
- hover: string;
16
- };
17
- input: {
18
- backgroundColor: string;
19
- border: string;
20
- borderColor: string;
21
- borderColorFocused: string;
22
- borderRadius: string;
23
- disabledBackgroundColor: string;
24
- warningBackgroundColor: string;
25
- errorBackgroundColor: string;
26
- successBackgroundColor: string;
27
- warningBorderColor: string;
28
- errorBorderColor: string;
29
- successBorderColor: string;
30
- boxShadowFocused: string;
31
- fontFamily: string;
32
- fontSize: string;
33
- height?: string;
34
- minHeight?: string;
35
- placeholderColor: string;
36
- textColor: string;
37
- };
38
- loadingIndicator: {
39
- textColor: string;
40
- };
41
- menu: {
42
- disabledTextColor: string;
43
- disabledBackgroundColor: string;
44
- textColor: string;
45
- backgroundColor: string;
46
- hoverTextColor: string;
47
- hoverBackgroundColor: string;
48
- activeTextColor: string;
49
- activeBackgroundColor: string;
50
- minWidth?: string;
51
- selectedItemTextColor: string;
52
- selectedItemBackgroundColor: string;
53
- selectedItemHoverTextColor: string;
54
- selectedItemIconColor: string;
55
- selectedItemHoverIconColor: string;
56
- selectedItemHoverBackgroundColor: string;
57
- selectedItemActiveTextColor: string;
58
- selectedItemActiveBackgroundColor: string;
59
- zIndex: number;
60
- width?: string;
61
- whiteSpace?: Property.WhiteSpace;
62
- };
63
- menuPortal: {
64
- zIndex: number;
65
- };
66
- multiSelect: {
67
- backgroundColor: string;
68
- textColor: string;
69
- removeButtonBackgroundColor: string;
70
- removeButtonTextColor: string;
71
- removeButtonHoverBackgroundColor: string;
72
- removeButtonHoverTextColor: string;
73
- };
74
- }
75
- export declare const defaultSelectTheme: SelectTheme;
1
+ import { Property } from "csstype";
2
+ export interface SelectTheme {
3
+ arrowColor: {
4
+ focused: {
5
+ standard: string;
6
+ hover: string;
7
+ };
8
+ closed: {
9
+ standard: string;
10
+ hover: string;
11
+ };
12
+ };
13
+ clearButtonColor: {
14
+ standard: string;
15
+ hover: string;
16
+ };
17
+ input: {
18
+ backgroundColor: string;
19
+ border: string;
20
+ borderColor: string;
21
+ borderColorFocused: string;
22
+ borderRadius: string;
23
+ disabledBackgroundColor: string;
24
+ warningBackgroundColor: string;
25
+ errorBackgroundColor: string;
26
+ successBackgroundColor: string;
27
+ warningBorderColor: string;
28
+ errorBorderColor: string;
29
+ successBorderColor: string;
30
+ boxShadowFocused: string;
31
+ fontFamily: string;
32
+ fontSize: string;
33
+ height?: string;
34
+ minHeight?: string;
35
+ placeholderColor: string;
36
+ textColor: string;
37
+ };
38
+ loadingIndicator: {
39
+ textColor: string;
40
+ };
41
+ menu: {
42
+ disabledTextColor: string;
43
+ disabledBackgroundColor: string;
44
+ textColor: string;
45
+ backgroundColor: string;
46
+ hoverTextColor: string;
47
+ hoverBackgroundColor: string;
48
+ activeTextColor: string;
49
+ activeBackgroundColor: string;
50
+ minWidth?: string;
51
+ selectedItemTextColor: string;
52
+ selectedItemBackgroundColor: string;
53
+ selectedItemHoverTextColor: string;
54
+ selectedItemIconColor: string;
55
+ selectedItemHoverIconColor: string;
56
+ selectedItemHoverBackgroundColor: string;
57
+ selectedItemActiveTextColor: string;
58
+ selectedItemActiveBackgroundColor: string;
59
+ zIndex: number;
60
+ width?: string;
61
+ whiteSpace?: Property.WhiteSpace;
62
+ };
63
+ menuPortal: {
64
+ zIndex: number;
65
+ };
66
+ multiSelect: {
67
+ backgroundColor: string;
68
+ textColor: string;
69
+ removeButtonBackgroundColor: string;
70
+ removeButtonTextColor: string;
71
+ removeButtonHoverBackgroundColor: string;
72
+ removeButtonHoverTextColor: string;
73
+ };
74
+ }
75
+ export declare const defaultSelectTheme: SelectTheme;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { AsyncProps } from "react-select/async";
3
- import { SelectVariant } from "../../util/StylesBuilder";
4
- import { GroupBase } from "react-select/dist/declarations/src/types";
5
- export interface AsyncMultiSelectProps<T = {
6
- label: string;
7
- value: string;
8
- }> extends AsyncProps<T, true, GroupBase<T>> {
9
- variant?: SelectVariant;
10
- isMulti?: true;
11
- }
12
- export declare const AsyncMultiSelect: <T extends {}>({ variant, styles, isMulti, ...selectProps }: AsyncMultiSelectProps<T>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { AsyncProps } from "react-select/async";
3
+ import { SelectVariant } from "../../util/StylesBuilder";
4
+ import { GroupBase } from "react-select/dist/declarations/src/types";
5
+ export interface AsyncMultiSelectProps<T = {
6
+ label: string;
7
+ value: string;
8
+ }> extends AsyncProps<T, true, GroupBase<T>> {
9
+ variant?: SelectVariant;
10
+ isMulti?: true;
11
+ }
12
+ export declare const AsyncMultiSelect: <T extends {}>({ variant, styles, isMulti, ...selectProps }: AsyncMultiSelectProps<T>) => JSX.Element;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
2
- import { AsyncProps } from "react-select/async";
3
- import { SelectVariant } from "../../util/StylesBuilder";
4
- import { GroupBase } from "react-select/dist/declarations/src/types";
5
- export interface AsyncSelectProps<T = {
6
- label: string;
7
- value: string;
8
- }> extends AsyncProps<T, false, GroupBase<T>> {
9
- variant?: SelectVariant;
10
- isMulti?: false;
11
- }
12
- export declare const AsyncSelect: <T extends {}>({ variant, styles, isMulti, ...selectProps }: AsyncSelectProps<T>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { AsyncProps } from "react-select/async";
3
+ import { SelectVariant } from "../../util/StylesBuilder";
4
+ import { GroupBase } from "react-select/dist/declarations/src/types";
5
+ export interface AsyncSelectProps<T = {
6
+ label: string;
7
+ value: string;
8
+ }> extends AsyncProps<T, false, GroupBase<T>> {
9
+ variant?: SelectVariant;
10
+ isMulti?: false;
11
+ }
12
+ export declare const AsyncSelect: <T extends {}>({ variant, styles, isMulti, ...selectProps }: AsyncSelectProps<T>) => JSX.Element;
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
2
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
- import { MultiSelectProps } from "../MultiSelect";
4
- import { ChipRowItem } from "./ChipRow";
5
- export interface ChipMultiSelectOption extends ChipRowItem {
6
- }
7
- /**
8
- * @deprecated renamed to ChipMultiSelectOption
9
- */
10
- export declare type ChipMultiSelectValue = ChipMultiSelectOption;
11
- export interface ChipMultiSelectProps<TOption> extends Omit<MultiSelectProps<TOption>, "value" | "onChange" | "isLoading">, ValueAndOnValueChangeProps<Array<TOption>> {
12
- loading?: boolean;
13
- inputValue?: string;
14
- onInputChange?: (inputValue: string) => void;
15
- noneSelectedLabel?: string;
16
- }
17
- declare function _ChipMultiSelect<TOption extends ChipMultiSelectOption>({ value, onValueChange, placeholder, loading, inputValue, onInputChange, noneSelectedLabel, ...selectProps }: ChipMultiSelectProps<TOption>): JSX.Element;
18
- export declare const ChipMultiSelect: typeof _ChipMultiSelect;
19
- export {};
1
+ /// <reference types="react" />
2
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
+ import { MultiSelectProps } from "../MultiSelect";
4
+ import { ChipRowItem } from "./ChipRow";
5
+ export interface ChipMultiSelectOption extends ChipRowItem {
6
+ }
7
+ /**
8
+ * @deprecated renamed to ChipMultiSelectOption
9
+ */
10
+ export declare type ChipMultiSelectValue = ChipMultiSelectOption;
11
+ export interface ChipMultiSelectProps<TOption> extends Omit<MultiSelectProps<TOption>, "value" | "onChange" | "isLoading">, ValueAndOnValueChangeProps<Array<TOption>> {
12
+ loading?: boolean;
13
+ inputValue?: string;
14
+ onInputChange?: (inputValue: string) => void;
15
+ noneSelectedLabel?: string;
16
+ }
17
+ declare function _ChipMultiSelect<TOption extends ChipMultiSelectOption>({ value, onValueChange, placeholder, loading, inputValue, onInputChange, noneSelectedLabel, ...selectProps }: ChipMultiSelectProps<TOption>): JSX.Element;
18
+ export declare const ChipMultiSelect: typeof _ChipMultiSelect;
19
+ export {};
@@ -1,10 +1,10 @@
1
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
- import { PropsWithChildren } from "react";
3
- export interface ChipRowItem {
4
- label: string;
5
- value: string;
6
- }
7
- export interface ChipRowProps<TValue> extends ValueAndOnValueChangeProps<TValue> {
8
- noneSelectedLabel?: string;
9
- }
10
- export declare function ChipRow<TValue extends ChipRowItem>({ value, onValueChange, noneSelectedLabel, children, }: PropsWithChildren<ChipRowProps<Array<TValue>>>): JSX.Element;
1
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
+ import { PropsWithChildren } from "react";
3
+ export interface ChipRowItem {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export interface ChipRowProps<TValue> extends ValueAndOnValueChangeProps<TValue> {
8
+ noneSelectedLabel?: string;
9
+ }
10
+ export declare function ChipRow<TValue extends ChipRowItem>({ value, onValueChange, noneSelectedLabel, children, }: PropsWithChildren<ChipRowProps<Array<TValue>>>): JSX.Element;
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
2
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
- import { GroupedMultiSelectProps } from "../GroupedMultiSelect";
4
- import { DropdownOption } from "../GroupedMultiSelectTypes";
5
- export interface GroupedChipMultiSelectValue<TData> extends DropdownOption<TData> {
6
- }
7
- export interface GroupedChipMultiSelectProps<TData> extends Omit<GroupedMultiSelectProps<TData>, "onChange" | "value">, ValueAndOnValueChangeProps<Array<DropdownOption<TData>>> {
8
- loading?: boolean;
9
- inputValue?: string;
10
- onInputChange?: (inputValue: string) => void;
11
- noneSelectedLabel?: string;
12
- }
13
- declare function _GroupedChipMultiSelect<TData>({ value, onValueChange, placeholder, loading, inputValue, onInputChange, noneSelectedLabel, ...selectProps }: GroupedChipMultiSelectProps<TData>): JSX.Element;
14
- export declare const GroupedChipMultiSelect: typeof _GroupedChipMultiSelect;
15
- export {};
1
+ /// <reference types="react" />
2
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
+ import { GroupedMultiSelectProps } from "../GroupedMultiSelect";
4
+ import { DropdownOption } from "../GroupedMultiSelectTypes";
5
+ export interface GroupedChipMultiSelectValue<TData> extends DropdownOption<TData> {
6
+ }
7
+ export interface GroupedChipMultiSelectProps<TData> extends Omit<GroupedMultiSelectProps<TData>, "onChange" | "value">, ValueAndOnValueChangeProps<Array<DropdownOption<TData>>> {
8
+ loading?: boolean;
9
+ inputValue?: string;
10
+ onInputChange?: (inputValue: string) => void;
11
+ noneSelectedLabel?: string;
12
+ }
13
+ declare function _GroupedChipMultiSelect<TData>({ value, onValueChange, placeholder, loading, inputValue, onInputChange, noneSelectedLabel, ...selectProps }: GroupedChipMultiSelectProps<TData>): JSX.Element;
14
+ export declare const GroupedChipMultiSelect: typeof _GroupedChipMultiSelect;
15
+ export {};
@@ -1,25 +1,25 @@
1
- import * as React from "react";
2
- import { ActionMeta, OnChangeValue, Options } from "react-select";
3
- import { GroupedOptionsType, InternalDropdownOption } from "../../util/multiDropdownUtils";
4
- import { DropdownOption } from "./GroupedMultiSelectTypes";
5
- import { MultiSelectComponentsConfig, MultiSelectProps } from "./MultiSelect";
6
- export declare type OnChange<TData> = (value: OnChangeValue<DropdownOption<TData>, true>, action: ActionMeta<any>) => void;
7
- export interface GroupedMultiSelectProps<TData> extends Omit<MultiSelectProps<InternalDropdownOption<TData>>, "options" | "onChange" | "value" | "components"> {
8
- /**
9
- * Same as Select prop `component` but without MultiValue and Option since they can not be modified
10
- */
11
- components?: Omit<MultiSelectComponentsConfig<InternalDropdownOption<TData>>, "MultiValue" | "Option">;
12
- /**
13
- * Same as Select prop `options` but only with GroupOptionsType
14
- */
15
- options?: GroupedOptionsType<DropdownOption<TData>>;
16
- /**
17
- * Same as Select prop `onChange` but only with GroupOptionsType
18
- */
19
- onChange?: OnChange<TData>;
20
- /**
21
- * Same as Select prop `value` but only with GroupOptionsType
22
- */
23
- value?: Options<DropdownOption<TData>> | undefined;
24
- }
25
- export declare const GroupedMultiSelect: <TData extends {}>({ onChange, options, value, variant, formatGroupLabel, formatOptionLabel, ...selectProps }: GroupedMultiSelectProps<TData>) => React.ReactElement<GroupedMultiSelectProps<TData>, string | React.JSXElementConstructor<any>>;
1
+ import * as React from "react";
2
+ import { ActionMeta, OnChangeValue, Options } from "react-select";
3
+ import { GroupedOptionsType, InternalDropdownOption } from "../../util/multiDropdownUtils";
4
+ import { DropdownOption } from "./GroupedMultiSelectTypes";
5
+ import { MultiSelectComponentsConfig, MultiSelectProps } from "./MultiSelect";
6
+ export declare type OnChange<TData> = (value: OnChangeValue<DropdownOption<TData>, true>, action: ActionMeta<any>) => void;
7
+ export interface GroupedMultiSelectProps<TData> extends Omit<MultiSelectProps<InternalDropdownOption<TData>>, "options" | "onChange" | "value" | "components"> {
8
+ /**
9
+ * Same as Select prop `component` but without MultiValue and Option since they can not be modified
10
+ */
11
+ components?: Omit<MultiSelectComponentsConfig<InternalDropdownOption<TData>>, "MultiValue" | "Option">;
12
+ /**
13
+ * Same as Select prop `options` but only with GroupOptionsType
14
+ */
15
+ options?: GroupedOptionsType<DropdownOption<TData>>;
16
+ /**
17
+ * Same as Select prop `onChange` but only with GroupOptionsType
18
+ */
19
+ onChange?: OnChange<TData>;
20
+ /**
21
+ * Same as Select prop `value` but only with GroupOptionsType
22
+ */
23
+ value?: Options<DropdownOption<TData>> | undefined;
24
+ }
25
+ export declare const GroupedMultiSelect: <TData extends {}>({ onChange, options, value, variant, formatGroupLabel, formatOptionLabel, ...selectProps }: GroupedMultiSelectProps<TData>) => React.ReactElement<GroupedMultiSelectProps<TData>, string | React.JSXElementConstructor<any>>;
@@ -1,5 +1,5 @@
1
- export interface DropdownOption<TData> {
2
- data: TData;
3
- label: string;
4
- value: string;
5
- }
1
+ export interface DropdownOption<TData> {
2
+ data: TData;
3
+ label: string;
4
+ value: string;
5
+ }
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { Props, SelectComponentsConfig } from "react-select";
3
- import { SelectVariant } from "../../util/StylesBuilder";
4
- import { GroupBase } from "react-select/dist/declarations/src/types";
5
- export interface MultiSelectProps<TOption = {
6
- label: string;
7
- value: string;
8
- }> extends Props<TOption, true> {
9
- variant?: SelectVariant;
10
- isMulti?: true;
11
- }
12
- export declare type MultiSelectComponentsConfig<TOption> = SelectComponentsConfig<TOption, true, GroupBase<TOption>>;
13
- export declare const MultiSelect: <TOption extends {}>({ variant, styles, isMulti, ...selectProps }: MultiSelectProps<TOption>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Props, SelectComponentsConfig } from "react-select";
3
+ import { SelectVariant } from "../../util/StylesBuilder";
4
+ import { GroupBase } from "react-select/dist/declarations/src/types";
5
+ export interface MultiSelectProps<TOption = {
6
+ label: string;
7
+ value: string;
8
+ }> extends Props<TOption, true> {
9
+ variant?: SelectVariant;
10
+ isMulti?: true;
11
+ }
12
+ export declare type MultiSelectComponentsConfig<TOption> = SelectComponentsConfig<TOption, true, GroupBase<TOption>>;
13
+ export declare const MultiSelect: <TOption extends {}>({ variant, styles, isMulti, ...selectProps }: MultiSelectProps<TOption>) => JSX.Element;
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import { Props } from "react-select";
3
- import { SelectVariant } from "../../util/StylesBuilder";
4
- export interface SelectProps<T = {
5
- label: string;
6
- value: string;
7
- }> extends Props<T, false> {
8
- variant?: SelectVariant;
9
- isMulti?: false;
10
- }
11
- export declare const Select: <T extends {}>({ variant, styles, isMulti, ...selectProps }: SelectProps<T>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Props } from "react-select";
3
+ import { SelectVariant } from "../../util/StylesBuilder";
4
+ export interface SelectProps<T = {
5
+ label: string;
6
+ value: string;
7
+ }> extends Props<T, false> {
8
+ variant?: SelectVariant;
9
+ isMulti?: false;
10
+ }
11
+ export declare const Select: <T extends {}>({ variant, styles, isMulti, ...selectProps }: SelectProps<T>) => JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * from "./components/ui/AsyncMultiSelect";
2
- export * from "./components/ui/AsyncSelect";
3
- export * from "./components/ui/MultiSelect";
4
- export * from "./components/ui/Select";
5
- export * from "./components/ui/GroupedMultiSelect";
6
- export * from "./components/ui/ChipMultiSelect/ChipMultiSelect";
7
- export * from "./components/ui/ChipMultiSelect/GroupedChipMultiSelect";
8
- export * from "./SelectTheme";
9
- export * from "./util/StylesBuilder";
10
- export { DropdownOption } from "./components/ui/GroupedMultiSelectTypes";
1
+ export * from "./components/ui/AsyncMultiSelect";
2
+ export * from "./components/ui/AsyncSelect";
3
+ export * from "./components/ui/MultiSelect";
4
+ export * from "./components/ui/Select";
5
+ export * from "./components/ui/GroupedMultiSelect";
6
+ export * from "./components/ui/ChipMultiSelect/ChipMultiSelect";
7
+ export * from "./components/ui/ChipMultiSelect/GroupedChipMultiSelect";
8
+ export * from "./SelectTheme";
9
+ export * from "./util/StylesBuilder";
10
+ export type { DropdownOption } from "./components/ui/GroupedMultiSelectTypes";