@linzjs/lui 11.11.0 → 12.1.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 +34 -0
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.d.ts +12 -2
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.stories.d.ts +110 -15
- package/dist/lui.cjs.development.js +46 -17
- 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 +118 -59
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +46 -17
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss +40 -23
- package/dist/scss/Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss +47 -24
- package/dist/scss/Components/LuiFormElements/LuiTextInput/LuiTextInput.scss +15 -18
- package/dist/scss/Components/LuiForms/LuiComboSelect/LuiComboSelect.scss +35 -0
- package/dist/scss/Foundation/Variables/_LuiColors.scss +2 -1
- package/dist/scss/base.scss +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
# [12.1.0](https://github.com/linz/lui/compare/v12.0.1...v12.1.0) (2022-01-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **LuiComboSelect:** Added the createable option on LuiComboSelect ([#519](https://github.com/linz/lui/issues/519)) ([3aad990](https://github.com/linz/lui/commit/3aad9908a519e466151cb68ba192b4d94e740fe1))
|
|
7
|
+
|
|
8
|
+
## [12.0.1](https://github.com/linz/lui/compare/v12.0.0...v12.0.1) (2022-01-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* 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))
|
|
14
|
+
|
|
15
|
+
# [12.0.0](https://github.com/linz/lui/compare/v11.12.0...v12.0.0) (2022-01-13)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* feat!(LuiComboSelect): Adds a required label prop to LuiComboSelect (#516) ([d8747f4](https://github.com/linz/lui/commit/d8747f46551e01d625f745fcea48cdf64691aeb5)), closes [#516](https://github.com/linz/lui/issues/516)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### BREAKING CHANGES
|
|
22
|
+
|
|
23
|
+
* Adds a required "label" prop to LuiComboSelect
|
|
24
|
+
Also exposes an optional "hideLabel" prop to not render a label (labels are still available to screen readers)
|
|
25
|
+
|
|
26
|
+
* Resolves conflict with new LuiComboSelect story
|
|
27
|
+
|
|
28
|
+
# [11.12.0](https://github.com/linz/lui/compare/v11.11.0...v11.12.0) (2022-01-13)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **LuiSelectInput:** Update dropdown icon ([#515](https://github.com/linz/lui/issues/515)) ([322bc0f](https://github.com/linz/lui/commit/322bc0faf839e4f36ed24551bf069a6c6863f3cd))
|
|
34
|
+
|
|
1
35
|
# [11.11.0](https://github.com/linz/lui/compare/v11.10.3...v11.11.0) (2022-01-12)
|
|
2
36
|
|
|
3
37
|
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GroupBase, Props, SelectInstance } from 'react-select';
|
|
3
|
-
export declare type LuiComboSelectProps<Option extends LuiComboSelectOption = LuiComboSelectOption, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Partial<Props<Option, IsMulti, Group>> & {
|
|
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
|
+
label: JSX.Element | string;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
isCreateable?: boolean;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
4
9
|
export declare type LuiComboSelectOption = {
|
|
5
10
|
label: string;
|
|
6
11
|
value: string;
|
|
@@ -8,4 +13,9 @@ export declare type LuiComboSelectOption = {
|
|
|
8
13
|
/**
|
|
9
14
|
* A wrapper around React Select with Lui styling
|
|
10
15
|
*/
|
|
11
|
-
export declare const LuiComboSelect: React.ForwardRefExoticComponent<Partial<Props<LuiComboSelectOption, boolean, GroupBase<any>>> &
|
|
16
|
+
export declare const LuiComboSelect: React.ForwardRefExoticComponent<Partial<Props<LuiComboSelectOption, boolean, GroupBase<any>>> & {
|
|
17
|
+
label: JSX.Element | string;
|
|
18
|
+
hideLabel?: boolean | undefined;
|
|
19
|
+
isCreateable?: boolean | undefined;
|
|
20
|
+
error?: string | undefined;
|
|
21
|
+
} & React.RefAttributes<SelectInstance<LuiComboSelectOption, boolean, GroupBase<any>>>>;
|
|
@@ -1,17 +1,112 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: import("@storybook/react").Meta<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> &
|
|
2
|
+
declare const _default: import("@storybook/react").Meta<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
3
|
+
label: string | JSX.Element;
|
|
4
|
+
hideLabel?: boolean | undefined;
|
|
5
|
+
isCreateable?: boolean | undefined;
|
|
6
|
+
error?: string | undefined;
|
|
7
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
3
8
|
export default _default;
|
|
4
|
-
export declare const blank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> &
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
9
|
+
export declare const blank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
10
|
+
label: string | JSX.Element;
|
|
11
|
+
hideLabel?: boolean | undefined;
|
|
12
|
+
isCreateable?: boolean | undefined;
|
|
13
|
+
error?: string | undefined;
|
|
14
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
15
|
+
export declare const withoutLabel: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
16
|
+
label: string | JSX.Element;
|
|
17
|
+
hideLabel?: boolean | undefined;
|
|
18
|
+
isCreateable?: boolean | undefined;
|
|
19
|
+
error?: string | undefined;
|
|
20
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
21
|
+
export declare const focus: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
22
|
+
label: string | JSX.Element;
|
|
23
|
+
hideLabel?: boolean | undefined;
|
|
24
|
+
isCreateable?: boolean | undefined;
|
|
25
|
+
error?: string | undefined;
|
|
26
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
27
|
+
export declare const open: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
28
|
+
label: string | JSX.Element;
|
|
29
|
+
hideLabel?: boolean | undefined;
|
|
30
|
+
isCreateable?: boolean | undefined;
|
|
31
|
+
error?: string | undefined;
|
|
32
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
33
|
+
export declare const autocomplete: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
34
|
+
label: string | JSX.Element;
|
|
35
|
+
hideLabel?: boolean | undefined;
|
|
36
|
+
isCreateable?: boolean | undefined;
|
|
37
|
+
error?: string | undefined;
|
|
38
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
39
|
+
export declare const foundNone: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
40
|
+
label: string | JSX.Element;
|
|
41
|
+
hideLabel?: boolean | undefined;
|
|
42
|
+
isCreateable?: boolean | undefined;
|
|
43
|
+
error?: string | undefined;
|
|
44
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
45
|
+
export declare const loadingSpinner: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
46
|
+
label: string | JSX.Element;
|
|
47
|
+
hideLabel?: boolean | undefined;
|
|
48
|
+
isCreateable?: boolean | undefined;
|
|
49
|
+
error?: string | undefined;
|
|
50
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
51
|
+
export declare const selected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
52
|
+
label: string | JSX.Element;
|
|
53
|
+
hideLabel?: boolean | undefined;
|
|
54
|
+
isCreateable?: boolean | undefined;
|
|
55
|
+
error?: string | undefined;
|
|
56
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
57
|
+
export declare const selectedOpen: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
58
|
+
label: string | JSX.Element;
|
|
59
|
+
hideLabel?: boolean | undefined;
|
|
60
|
+
isCreateable?: boolean | undefined;
|
|
61
|
+
error?: string | undefined;
|
|
62
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
63
|
+
export declare const disabledBlank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
64
|
+
label: string | JSX.Element;
|
|
65
|
+
hideLabel?: boolean | undefined;
|
|
66
|
+
isCreateable?: boolean | undefined;
|
|
67
|
+
error?: string | undefined;
|
|
68
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
69
|
+
export declare const disabledSelected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
70
|
+
label: string | JSX.Element;
|
|
71
|
+
hideLabel?: boolean | undefined;
|
|
72
|
+
isCreateable?: boolean | undefined;
|
|
73
|
+
error?: string | undefined;
|
|
74
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
75
|
+
export declare const disabledWhileLoading: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
76
|
+
label: string | JSX.Element;
|
|
77
|
+
hideLabel?: boolean | undefined;
|
|
78
|
+
isCreateable?: boolean | undefined;
|
|
79
|
+
error?: string | undefined;
|
|
80
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
81
|
+
export declare const groupedOptions: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
82
|
+
label: string | JSX.Element;
|
|
83
|
+
hideLabel?: boolean | undefined;
|
|
84
|
+
isCreateable?: boolean | undefined;
|
|
85
|
+
error?: string | undefined;
|
|
86
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
87
|
+
export declare const isMulti: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
88
|
+
label: string | JSX.Element;
|
|
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;
|
|
104
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
105
|
+
export declare const compareToInput: {
|
|
106
|
+
(): JSX.Element;
|
|
107
|
+
storyName: string;
|
|
108
|
+
};
|
|
109
|
+
export declare const CompareToLuiSelectInput: {
|
|
110
|
+
(): JSX.Element;
|
|
111
|
+
storyName: string;
|
|
112
|
+
};
|
|
@@ -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
|
|
@@ -1166,11 +1167,11 @@ var extensionsAsHumanReadableList = function extensionsAsHumanReadableList(exten
|
|
|
1166
1167
|
};
|
|
1167
1168
|
|
|
1168
1169
|
var LuiSelectInput = function LuiSelectInput(props) {
|
|
1169
|
-
var _props$selectProps;
|
|
1170
|
+
var _props$selectProps, _props$selectProps2;
|
|
1170
1171
|
|
|
1171
1172
|
var id = useGenerateOrDefaultId((_props$selectProps = props.selectProps) == null ? void 0 : _props$selectProps.id);
|
|
1172
1173
|
return React__default.createElement("div", {
|
|
1173
|
-
className: 'LuiSelect'
|
|
1174
|
+
className: clsx('LuiSelect', (_props$selectProps2 = props.selectProps) != null && _props$selectProps2.disabled ? 'isDisabled' : '', props.error ? 'hasError' : '')
|
|
1174
1175
|
}, React__default.createElement("label", {
|
|
1175
1176
|
htmlFor: id,
|
|
1176
1177
|
className: "LuiSelect-label"
|
|
@@ -1195,9 +1196,9 @@ var LuiSelectInput = function LuiSelectInput(props) {
|
|
|
1195
1196
|
}, selection.label);
|
|
1196
1197
|
})), React__default.createElement(LuiIcon, {
|
|
1197
1198
|
alt: 'Error',
|
|
1198
|
-
name: "
|
|
1199
|
+
name: "ic_keyboard_arrow_down",
|
|
1199
1200
|
className: "LuiSelect-chevron-icon",
|
|
1200
|
-
size: "
|
|
1201
|
+
size: "md"
|
|
1201
1202
|
})), props.error && React__default.createElement("span", {
|
|
1202
1203
|
className: "LuiSelect-error"
|
|
1203
1204
|
}, React__default.createElement(LuiIcon, {
|
|
@@ -1210,23 +1211,25 @@ var LuiSelectInput = function LuiSelectInput(props) {
|
|
|
1210
1211
|
};
|
|
1211
1212
|
|
|
1212
1213
|
var LuiTextAreaInput = function LuiTextAreaInput(props) {
|
|
1213
|
-
var _props$inputProps;
|
|
1214
|
+
var _props$inputProps, _props$inputProps2;
|
|
1214
1215
|
|
|
1215
1216
|
var id = useGenerateOrDefaultId((_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.id);
|
|
1216
1217
|
return React__default.createElement("div", {
|
|
1217
|
-
className: clsx('LuiTextAreaInput')
|
|
1218
|
+
className: clsx('LuiTextAreaInput', (_props$inputProps2 = props.inputProps) != null && _props$inputProps2.disabled ? 'isDisabled' : '', props != null && props.error ? 'hasError' : '')
|
|
1218
1219
|
}, React__default.createElement("label", {
|
|
1219
1220
|
htmlFor: id
|
|
1220
1221
|
}, props.mandatory && React__default.createElement("span", {
|
|
1221
1222
|
className: "LuiTextAreaInput-mandatory"
|
|
1222
1223
|
}, "*"), React__default.createElement("span", {
|
|
1223
1224
|
className: "LuiTextAreaInput-label"
|
|
1224
|
-
}, props.label), React__default.createElement("
|
|
1225
|
+
}, props.label), React__default.createElement("div", {
|
|
1226
|
+
className: "LuiTextAreaInput-wrapper"
|
|
1227
|
+
}, ' ', React__default.createElement("textarea", Object.assign({
|
|
1225
1228
|
id: id,
|
|
1226
1229
|
value: props.value,
|
|
1227
1230
|
onChange: props.onChange,
|
|
1228
1231
|
rows: 5
|
|
1229
|
-
}, props.inputProps))), props.error && React__default.createElement("span", {
|
|
1232
|
+
}, props.inputProps)))), props.error && React__default.createElement("span", {
|
|
1230
1233
|
className: "LuiTextAreaInput-error"
|
|
1231
1234
|
}, React__default.createElement(LuiIcon, {
|
|
1232
1235
|
alt: "error",
|
|
@@ -18123,19 +18126,22 @@ var LuiLoadingIndicator = function LuiLoadingIndicator() {
|
|
|
18123
18126
|
};
|
|
18124
18127
|
|
|
18125
18128
|
function LuiComboSelectActual(givenProps, ref) {
|
|
18126
|
-
var
|
|
18129
|
+
var props = Object.assign({
|
|
18127
18130
|
noOptionsMessage: function noOptionsMessage(i) {
|
|
18128
18131
|
return "No options found containing '" + i.inputValue + "'";
|
|
18129
18132
|
}
|
|
18130
|
-
};
|
|
18131
|
-
var props = Object.assign({}, defaultProps, givenProps);
|
|
18133
|
+
}, givenProps);
|
|
18132
18134
|
props.components = _extends({
|
|
18133
18135
|
LoadingIndicator: LuiLoadingIndicator
|
|
18134
|
-
}, props.components);
|
|
18135
|
-
|
|
18136
|
-
|
|
18136
|
+
}, props.components); // box-shadow: "-8px 0px 0 0 #cc0000";
|
|
18137
|
+
// border-radius: "4px";
|
|
18138
|
+
|
|
18139
|
+
var id = useGenerateOrDefaultId(props == null ? void 0 : props.id);
|
|
18140
|
+
|
|
18141
|
+
var selectProp = _extends({
|
|
18142
|
+
inputId: id
|
|
18137
18143
|
}, props, {
|
|
18138
|
-
classNamePrefix:
|
|
18144
|
+
classNamePrefix: 'LuiComboSelect',
|
|
18139
18145
|
theme: function theme(_theme) {
|
|
18140
18146
|
return _extends({}, _theme, {
|
|
18141
18147
|
colors: _extends({}, _theme.colors, {
|
|
@@ -18205,7 +18211,30 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18205
18211
|
});
|
|
18206
18212
|
}
|
|
18207
18213
|
}
|
|
18208
|
-
})
|
|
18214
|
+
});
|
|
18215
|
+
|
|
18216
|
+
return React__default.createElement("label", {
|
|
18217
|
+
htmlFor: id,
|
|
18218
|
+
className: clsx('LuiComboSelect-label', props.error && 'hasError')
|
|
18219
|
+
}, React__default.createElement("span", {
|
|
18220
|
+
className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '')
|
|
18221
|
+
}, props.label), props.isCreateable ? React__default.createElement(CreatableSelect, Object.assign({
|
|
18222
|
+
formatCreateLabel: function formatCreateLabel(inputValue) {
|
|
18223
|
+
return inputValue;
|
|
18224
|
+
},
|
|
18225
|
+
createOptionPosition: "first",
|
|
18226
|
+
ref: ref
|
|
18227
|
+
}, selectProp)) : React__default.createElement(Select, Object.assign({
|
|
18228
|
+
ref: ref
|
|
18229
|
+
}, selectProp)), props.error && React__default.createElement("span", {
|
|
18230
|
+
className: "LuiComboSelect-error"
|
|
18231
|
+
}, React__default.createElement(LuiIcon, {
|
|
18232
|
+
alt: 'Error',
|
|
18233
|
+
name: "ic_error",
|
|
18234
|
+
className: "LuiComboSelect-error-icon",
|
|
18235
|
+
size: "sm",
|
|
18236
|
+
status: "error"
|
|
18237
|
+
}), props.error));
|
|
18209
18238
|
}
|
|
18210
18239
|
|
|
18211
18240
|
var LuiShadow = function LuiShadow(props) {
|