@linzjs/lui 12.0.0 → 12.1.2
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 +28 -0
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.d.ts +4 -4
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.stories.d.ts +1 -1
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.d.ts +4 -0
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.stories.d.ts +42 -0
- package/dist/lui.cjs.development.js +54 -35
- package/dist/lui.cjs.development.js.map +1 -1
- package/dist/lui.cjs.production.min.js +1 -1
- package/dist/lui.cjs.production.min.js.map +1 -1
- package/dist/lui.css +112 -60
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +54 -35
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.scss +5 -1
- package/dist/scss/Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss +39 -22
- package/dist/scss/Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss +47 -24
- package/dist/scss/Components/LuiFormElements/LuiTextInput/LuiTextInput.scss +17 -19
- package/dist/scss/Components/LuiForms/LuiComboSelect/LuiComboSelect.scss +31 -1
- package/dist/scss/Foundation/Variables/_LuiColors.scss +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [12.1.2](https://github.com/linz/lui/compare/v12.1.1...v12.1.2) (2022-01-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* FileInputBox not updating on error ([#498](https://github.com/linz/lui/issues/498)) ([7efa723](https://github.com/linz/lui/commit/7efa723f42cc15ceacb5f432d3d048f4447553f2))
|
|
7
|
+
|
|
8
|
+
## [12.1.1](https://github.com/linz/lui/compare/v12.1.0...v12.1.1) (2022-01-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Fix for importing svg path breaking downstream projects ([#523](https://github.com/linz/lui/issues/523)) ([6c1e84c](https://github.com/linz/lui/commit/6c1e84c2e28561ee56a442f7adb567de45e81206))
|
|
14
|
+
|
|
15
|
+
# [12.1.0](https://github.com/linz/lui/compare/v12.0.1...v12.1.0) (2022-01-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **LuiComboSelect:** Added the createable option on LuiComboSelect ([#519](https://github.com/linz/lui/issues/519)) ([3aad990](https://github.com/linz/lui/commit/3aad9908a519e466151cb68ba192b4d94e740fe1))
|
|
21
|
+
|
|
22
|
+
## [12.0.1](https://github.com/linz/lui/compare/v12.0.0...v12.0.1) (2022-01-14)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* replaced colours with variables, fixed error classes not appeari… ([#518](https://github.com/linz/lui/issues/518)) ([e1651fa](https://github.com/linz/lui/commit/e1651fa5d5c0f244b36ac79a4b78d32c83c42949))
|
|
28
|
+
|
|
1
29
|
# [12.0.0](https://github.com/linz/lui/compare/v11.12.0...v12.0.0) (2022-01-13)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface LuiFileInputBoxProps {
|
|
2
2
|
fileDescription: string;
|
|
3
3
|
acceptedExtensions: string[];
|
|
4
4
|
fileFormatText?: string;
|
|
@@ -8,7 +8,7 @@ export interface Props {
|
|
|
8
8
|
width?: number;
|
|
9
9
|
height?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare const LuiFileInputBox: (props:
|
|
11
|
+
export declare const LuiFileInputBox: (props: LuiFileInputBoxProps) => JSX.Element;
|
|
12
12
|
export interface FileUploadInfoProps {
|
|
13
13
|
fileName: string | undefined;
|
|
14
14
|
fileDescription: string;
|
|
@@ -18,8 +18,8 @@ export declare const FileUploadInfo: (props: FileUploadInfoProps) => JSX.Element
|
|
|
18
18
|
/**
|
|
19
19
|
* Get the extension from a filename in upper-case.
|
|
20
20
|
*
|
|
21
|
-
* @param fileName File-name to get extension from
|
|
22
|
-
* @return fileName extension in upper-case if found else empty string
|
|
21
|
+
* @param fileName File-name to get extension from
|
|
22
|
+
* @return fileName extension in upper-case if found else empty string
|
|
23
23
|
*/
|
|
24
24
|
export declare const getFileNameExtension: (fileName: string) => string;
|
|
25
25
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentStory } from '@storybook/react';
|
|
2
2
|
import { FileUploadInfo, LuiFileInputBox } from './LuiFileInputBox';
|
|
3
|
-
declare const _default: import("@storybook/react").Meta<import("./LuiFileInputBox").
|
|
3
|
+
declare const _default: import("@storybook/react").Meta<import("./LuiFileInputBox").LuiFileInputBoxProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const LuiFileInputWithExtensionFilterDefaultSize: ComponentStory<typeof LuiFileInputBox>;
|
|
6
6
|
export declare const LuiFileInputWithExtensionFilterLargeWithExistingError: ComponentStory<typeof LuiFileInputBox>;
|
|
@@ -3,6 +3,8 @@ import { GroupBase, Props, SelectInstance } from 'react-select';
|
|
|
3
3
|
export declare type LuiComboSelectProps<Option extends LuiComboSelectOption = LuiComboSelectOption, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Partial<Props<Option, IsMulti, Group>> & {
|
|
4
4
|
label: JSX.Element | string;
|
|
5
5
|
hideLabel?: boolean;
|
|
6
|
+
isCreateable?: boolean;
|
|
7
|
+
error?: string;
|
|
6
8
|
};
|
|
7
9
|
export declare type LuiComboSelectOption = {
|
|
8
10
|
label: string;
|
|
@@ -14,4 +16,6 @@ export declare type LuiComboSelectOption = {
|
|
|
14
16
|
export declare const LuiComboSelect: React.ForwardRefExoticComponent<Partial<Props<LuiComboSelectOption, boolean, GroupBase<any>>> & {
|
|
15
17
|
label: JSX.Element | string;
|
|
16
18
|
hideLabel?: boolean | undefined;
|
|
19
|
+
isCreateable?: boolean | undefined;
|
|
20
|
+
error?: string | undefined;
|
|
17
21
|
} & React.RefAttributes<SelectInstance<LuiComboSelectOption, boolean, GroupBase<any>>>>;
|
|
@@ -2,63 +2,105 @@ import React from 'react';
|
|
|
2
2
|
declare const _default: import("@storybook/react").Meta<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
3
3
|
label: string | JSX.Element;
|
|
4
4
|
hideLabel?: boolean | undefined;
|
|
5
|
+
isCreateable?: boolean | undefined;
|
|
6
|
+
error?: string | undefined;
|
|
5
7
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
6
8
|
export default _default;
|
|
7
9
|
export declare const blank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
8
10
|
label: string | JSX.Element;
|
|
9
11
|
hideLabel?: boolean | undefined;
|
|
12
|
+
isCreateable?: boolean | undefined;
|
|
13
|
+
error?: string | undefined;
|
|
10
14
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
11
15
|
export declare const withoutLabel: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
12
16
|
label: string | JSX.Element;
|
|
13
17
|
hideLabel?: boolean | undefined;
|
|
18
|
+
isCreateable?: boolean | undefined;
|
|
19
|
+
error?: string | undefined;
|
|
14
20
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
15
21
|
export declare const focus: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
16
22
|
label: string | JSX.Element;
|
|
17
23
|
hideLabel?: boolean | undefined;
|
|
24
|
+
isCreateable?: boolean | undefined;
|
|
25
|
+
error?: string | undefined;
|
|
18
26
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
19
27
|
export declare const open: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
20
28
|
label: string | JSX.Element;
|
|
21
29
|
hideLabel?: boolean | undefined;
|
|
30
|
+
isCreateable?: boolean | undefined;
|
|
31
|
+
error?: string | undefined;
|
|
22
32
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
23
33
|
export declare const autocomplete: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
24
34
|
label: string | JSX.Element;
|
|
25
35
|
hideLabel?: boolean | undefined;
|
|
36
|
+
isCreateable?: boolean | undefined;
|
|
37
|
+
error?: string | undefined;
|
|
26
38
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
27
39
|
export declare const foundNone: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
28
40
|
label: string | JSX.Element;
|
|
29
41
|
hideLabel?: boolean | undefined;
|
|
42
|
+
isCreateable?: boolean | undefined;
|
|
43
|
+
error?: string | undefined;
|
|
30
44
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
31
45
|
export declare const loadingSpinner: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
32
46
|
label: string | JSX.Element;
|
|
33
47
|
hideLabel?: boolean | undefined;
|
|
48
|
+
isCreateable?: boolean | undefined;
|
|
49
|
+
error?: string | undefined;
|
|
34
50
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
35
51
|
export declare const selected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
36
52
|
label: string | JSX.Element;
|
|
37
53
|
hideLabel?: boolean | undefined;
|
|
54
|
+
isCreateable?: boolean | undefined;
|
|
55
|
+
error?: string | undefined;
|
|
38
56
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
39
57
|
export declare const selectedOpen: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
40
58
|
label: string | JSX.Element;
|
|
41
59
|
hideLabel?: boolean | undefined;
|
|
60
|
+
isCreateable?: boolean | undefined;
|
|
61
|
+
error?: string | undefined;
|
|
42
62
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
43
63
|
export declare const disabledBlank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
44
64
|
label: string | JSX.Element;
|
|
45
65
|
hideLabel?: boolean | undefined;
|
|
66
|
+
isCreateable?: boolean | undefined;
|
|
67
|
+
error?: string | undefined;
|
|
46
68
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
47
69
|
export declare const disabledSelected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
48
70
|
label: string | JSX.Element;
|
|
49
71
|
hideLabel?: boolean | undefined;
|
|
72
|
+
isCreateable?: boolean | undefined;
|
|
73
|
+
error?: string | undefined;
|
|
50
74
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
51
75
|
export declare const disabledWhileLoading: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
52
76
|
label: string | JSX.Element;
|
|
53
77
|
hideLabel?: boolean | undefined;
|
|
78
|
+
isCreateable?: boolean | undefined;
|
|
79
|
+
error?: string | undefined;
|
|
54
80
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
55
81
|
export declare const groupedOptions: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
56
82
|
label: string | JSX.Element;
|
|
57
83
|
hideLabel?: boolean | undefined;
|
|
84
|
+
isCreateable?: boolean | undefined;
|
|
85
|
+
error?: string | undefined;
|
|
58
86
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
59
87
|
export declare const isMulti: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
60
88
|
label: string | JSX.Element;
|
|
61
89
|
hideLabel?: boolean | undefined;
|
|
90
|
+
isCreateable?: boolean | undefined;
|
|
91
|
+
error?: string | undefined;
|
|
92
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
93
|
+
export declare const createable: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
94
|
+
label: string | JSX.Element;
|
|
95
|
+
hideLabel?: boolean | undefined;
|
|
96
|
+
isCreateable?: boolean | undefined;
|
|
97
|
+
error?: string | undefined;
|
|
98
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
99
|
+
export declare const error: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
100
|
+
label: string | JSX.Element;
|
|
101
|
+
hideLabel?: boolean | undefined;
|
|
102
|
+
isCreateable?: boolean | undefined;
|
|
103
|
+
error?: string | undefined;
|
|
62
104
|
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
63
105
|
export declare const compareToInput: {
|
|
64
106
|
(): JSX.Element;
|
|
@@ -14,6 +14,7 @@ var uuid = require('uuid');
|
|
|
14
14
|
var camelcase = _interopDefault(require('camelcase'));
|
|
15
15
|
var Select = _interopDefault(require('react-select'));
|
|
16
16
|
var Lottie = _interopDefault(require('lottie-react'));
|
|
17
|
+
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
|
17
18
|
var Modal = _interopDefault(require('react-modal'));
|
|
18
19
|
var reactQuery = require('react-query');
|
|
19
20
|
var tippy = _interopDefault(require('tippy.js'));
|
|
@@ -977,7 +978,7 @@ var LuiTextInput = function LuiTextInput(props) {
|
|
|
977
978
|
|
|
978
979
|
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
979
980
|
return React__default.createElement("div", {
|
|
980
|
-
className: clsx('LuiTextInput', props.error
|
|
981
|
+
className: clsx('LuiTextInput', props.error && 'hasError')
|
|
981
982
|
}, React__default.createElement("label", {
|
|
982
983
|
className: 'LuiTextInput-label',
|
|
983
984
|
htmlFor: id
|
|
@@ -1065,20 +1066,6 @@ var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
|
1065
1066
|
}
|
|
1066
1067
|
};
|
|
1067
1068
|
|
|
1068
|
-
var FileFormatErrorDetails = function FileFormatErrorDetails() {
|
|
1069
|
-
return React__default.createElement("div", {
|
|
1070
|
-
className: "LuiFileInputBox-upload-container"
|
|
1071
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1072
|
-
className: 'LuiFileInputBox-upload-icon-error'
|
|
1073
|
-
}, React__default.createElement(LuiIcon, {
|
|
1074
|
-
name: "ic_error_outline",
|
|
1075
|
-
size: 'ns',
|
|
1076
|
-
alt: "Error"
|
|
1077
|
-
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
1078
|
-
className: "LuiFileInputBox-upload-text"
|
|
1079
|
-
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
1069
|
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
1083
1070
|
return React__default.createElement("div", {
|
|
1084
1071
|
className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
|
|
@@ -1095,7 +1082,17 @@ var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
|
1095
1082
|
return "." + extension;
|
|
1096
1083
|
}).join(','),
|
|
1097
1084
|
onChange: onChange
|
|
1098
|
-
}), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement(
|
|
1085
|
+
}), React__default.createElement(React__default.Fragment, null, hasError ? React__default.createElement("div", {
|
|
1086
|
+
className: "LuiFileInputBox-upload-container"
|
|
1087
|
+
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1088
|
+
className: 'LuiFileInputBox-upload-icon-error'
|
|
1089
|
+
}, React__default.createElement(LuiIcon, {
|
|
1090
|
+
name: "ic_error_outline",
|
|
1091
|
+
size: 'ns',
|
|
1092
|
+
alt: "Error"
|
|
1093
|
+
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
1094
|
+
className: "LuiFileInputBox-upload-text"
|
|
1095
|
+
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), "."))) : React__default.createElement(FileUploadInfo, {
|
|
1099
1096
|
fileName: file == null ? void 0 : file.name,
|
|
1100
1097
|
fileFormatText: props.fileFormatText,
|
|
1101
1098
|
fileDescription: props.fileDescription
|
|
@@ -1140,8 +1137,8 @@ var FileUploadInfo = function FileUploadInfo(props) {
|
|
|
1140
1137
|
/**
|
|
1141
1138
|
* Get the extension from a filename in upper-case.
|
|
1142
1139
|
*
|
|
1143
|
-
* @param fileName File-name to get extension from
|
|
1144
|
-
* @return fileName extension in upper-case if found else empty string
|
|
1140
|
+
* @param fileName File-name to get extension from
|
|
1141
|
+
* @return fileName extension in upper-case if found else empty string
|
|
1145
1142
|
*/
|
|
1146
1143
|
|
|
1147
1144
|
var getFileNameExtension = function getFileNameExtension(fileName) {
|
|
@@ -1166,11 +1163,11 @@ var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(exten
|
|
|
1166
1163
|
};
|
|
1167
1164
|
|
|
1168
1165
|
var LuiSelectInput = function LuiSelectInput(props) {
|
|
1169
|
-
var _props$selectProps;
|
|
1166
|
+
var _props$selectProps, _props$selectProps2;
|
|
1170
1167
|
|
|
1171
1168
|
var id = useGenerateOrDefaultId((_props$selectProps = props.selectProps) == null ? void 0 : _props$selectProps.id);
|
|
1172
1169
|
return React__default.createElement("div", {
|
|
1173
|
-
className: 'LuiSelect'
|
|
1170
|
+
className: clsx('LuiSelect', (_props$selectProps2 = props.selectProps) != null && _props$selectProps2.disabled ? 'isDisabled' : '', props.error ? 'hasError' : '')
|
|
1174
1171
|
}, React__default.createElement("label", {
|
|
1175
1172
|
htmlFor: id,
|
|
1176
1173
|
className: "LuiSelect-label"
|
|
@@ -1210,23 +1207,25 @@ var LuiSelectInput = function LuiSelectInput(props) {
|
|
|
1210
1207
|
};
|
|
1211
1208
|
|
|
1212
1209
|
var LuiTextAreaInput = function LuiTextAreaInput(props) {
|
|
1213
|
-
var _props$inputProps;
|
|
1210
|
+
var _props$inputProps, _props$inputProps2;
|
|
1214
1211
|
|
|
1215
1212
|
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1216
1213
|
return React__default.createElement("div", {
|
|
1217
|
-
className: clsx('LuiTextAreaInput')
|
|
1214
|
+
className: clsx('LuiTextAreaInput', (_props$inputProps2 = props.inputProps) != null && _props$inputProps2.disabled ? 'isDisabled' : '', props != null && props.error ? 'hasError' : '')
|
|
1218
1215
|
}, React__default.createElement("label", {
|
|
1219
1216
|
htmlFor: id
|
|
1220
1217
|
}, props.mandatory && React__default.createElement("span", {
|
|
1221
1218
|
className: "LuiTextAreaInput-mandatory"
|
|
1222
1219
|
}, "*"), React__default.createElement("span", {
|
|
1223
1220
|
className: "LuiTextAreaInput-label"
|
|
1224
|
-
}, props.label), React__default.createElement("
|
|
1221
|
+
}, props.label), React__default.createElement("div", {
|
|
1222
|
+
className: "LuiTextAreaInput-wrapper"
|
|
1223
|
+
}, ' ', React__default.createElement("textarea", Object.assign({
|
|
1225
1224
|
id: id,
|
|
1226
1225
|
value: props.value,
|
|
1227
1226
|
onChange: props.onChange,
|
|
1228
1227
|
rows: 5
|
|
1229
|
-
}, props.inputProps))), props.error && React__default.createElement("span", {
|
|
1228
|
+
}, props.inputProps)))), props.error && React__default.createElement("span", {
|
|
1230
1229
|
className: "LuiTextAreaInput-error"
|
|
1231
1230
|
}, React__default.createElement(LuiIcon, {
|
|
1232
1231
|
alt: "error",
|
|
@@ -18130,18 +18129,15 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18130
18129
|
}, givenProps);
|
|
18131
18130
|
props.components = _extends({
|
|
18132
18131
|
LoadingIndicator: LuiLoadingIndicator
|
|
18133
|
-
}, props.components);
|
|
18132
|
+
}, props.components); // box-shadow: "-8px 0px 0 0 #cc0000";
|
|
18133
|
+
// border-radius: "4px";
|
|
18134
|
+
|
|
18134
18135
|
var id = useGenerateOrDefaultId(props == null ? void 0 : props.id);
|
|
18135
|
-
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
}, React__default.createElement("span", {
|
|
18139
|
-
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
18140
|
-
}, props.label), React__default.createElement(Select, Object.assign({
|
|
18141
|
-
inputId: id,
|
|
18142
|
-
ref: ref
|
|
18136
|
+
|
|
18137
|
+
var selectProp = _extends({
|
|
18138
|
+
inputId: id
|
|
18143
18139
|
}, props, {
|
|
18144
|
-
classNamePrefix:
|
|
18140
|
+
classNamePrefix: 'LuiComboSelect',
|
|
18145
18141
|
theme: function theme(_theme) {
|
|
18146
18142
|
return _extends({}, _theme, {
|
|
18147
18143
|
colors: _extends({}, _theme.colors, {
|
|
@@ -18211,7 +18207,30 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18211
18207
|
});
|
|
18212
18208
|
}
|
|
18213
18209
|
}
|
|
18214
|
-
})
|
|
18210
|
+
});
|
|
18211
|
+
|
|
18212
|
+
return React__default.createElement("label", {
|
|
18213
|
+
htmlFor: id,
|
|
18214
|
+
className: clsx('LuiComboSelect-label', props.error && 'hasError')
|
|
18215
|
+
}, React__default.createElement("span", {
|
|
18216
|
+
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
18217
|
+
}, props.label), props.isCreateable ? React__default.createElement(CreatableSelect, Object.assign({
|
|
18218
|
+
formatCreateLabel: function formatCreateLabel(inputValue) {
|
|
18219
|
+
return inputValue;
|
|
18220
|
+
},
|
|
18221
|
+
createOptionPosition: "first",
|
|
18222
|
+
ref: ref
|
|
18223
|
+
}, selectProp)) : React__default.createElement(Select, Object.assign({
|
|
18224
|
+
ref: ref
|
|
18225
|
+
}, selectProp)), props.error && React__default.createElement("span", {
|
|
18226
|
+
className: "LuiComboSelect-error"
|
|
18227
|
+
}, React__default.createElement(LuiIcon, {
|
|
18228
|
+
alt: 'Error',
|
|
18229
|
+
name: "ic_error",
|
|
18230
|
+
className: "LuiComboSelect-error-icon",
|
|
18231
|
+
size: "sm",
|
|
18232
|
+
status: "error"
|
|
18233
|
+
}), props.error));
|
|
18215
18234
|
}
|
|
18216
18235
|
|
|
18217
18236
|
var LuiShadow = function LuiShadow(props) {
|