@linzjs/lui 11.12.0 → 12.0.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 +13 -0
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.d.ts +8 -2
- package/dist/components/LuiForms/LuiComboSelect/LuiComboSelect.stories.d.ts +60 -14
- package/dist/lui.cjs.development.js +11 -5
- 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 +10 -0
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +11 -5
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiForms/LuiComboSelect/LuiComboSelect.scss +5 -0
- package/dist/scss/base.scss +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# [12.0.0](https://github.com/linz/lui/compare/v11.12.0...v12.0.0) (2022-01-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* 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)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* Adds a required "label" prop to LuiComboSelect
|
|
10
|
+
Also exposes an optional "hideLabel" prop to not render a label (labels are still available to screen readers)
|
|
11
|
+
|
|
12
|
+
* Resolves conflict with new LuiComboSelect story
|
|
13
|
+
|
|
1
14
|
# [11.12.0](https://github.com/linz/lui/compare/v11.11.0...v11.12.0) (2022-01-13)
|
|
2
15
|
|
|
3
16
|
|
|
@@ -1,6 +1,9 @@
|
|
|
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
|
+
};
|
|
4
7
|
export declare type LuiComboSelectOption = {
|
|
5
8
|
label: string;
|
|
6
9
|
value: string;
|
|
@@ -8,4 +11,7 @@ export declare type LuiComboSelectOption = {
|
|
|
8
11
|
/**
|
|
9
12
|
* A wrapper around React Select with Lui styling
|
|
10
13
|
*/
|
|
11
|
-
export declare const LuiComboSelect: React.ForwardRefExoticComponent<Partial<Props<LuiComboSelectOption, boolean, GroupBase<any>>> &
|
|
14
|
+
export declare const LuiComboSelect: React.ForwardRefExoticComponent<Partial<Props<LuiComboSelectOption, boolean, GroupBase<any>>> & {
|
|
15
|
+
label: JSX.Element | string;
|
|
16
|
+
hideLabel?: boolean | undefined;
|
|
17
|
+
} & React.RefAttributes<SelectInstance<LuiComboSelectOption, boolean, GroupBase<any>>>>;
|
|
@@ -1,19 +1,65 @@
|
|
|
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
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
3
6
|
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
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
7
|
+
export declare const blank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
8
|
+
label: string | JSX.Element;
|
|
9
|
+
hideLabel?: boolean | undefined;
|
|
10
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
11
|
+
export declare const withoutLabel: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
12
|
+
label: string | JSX.Element;
|
|
13
|
+
hideLabel?: boolean | undefined;
|
|
14
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
15
|
+
export declare const focus: 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
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
19
|
+
export declare const open: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
20
|
+
label: string | JSX.Element;
|
|
21
|
+
hideLabel?: boolean | undefined;
|
|
22
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
23
|
+
export declare const autocomplete: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
24
|
+
label: string | JSX.Element;
|
|
25
|
+
hideLabel?: boolean | undefined;
|
|
26
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
27
|
+
export declare const foundNone: 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
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
31
|
+
export declare const loadingSpinner: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
32
|
+
label: string | JSX.Element;
|
|
33
|
+
hideLabel?: boolean | undefined;
|
|
34
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
35
|
+
export declare const selected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
36
|
+
label: string | JSX.Element;
|
|
37
|
+
hideLabel?: boolean | undefined;
|
|
38
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
39
|
+
export declare const selectedOpen: 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
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
43
|
+
export declare const disabledBlank: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
44
|
+
label: string | JSX.Element;
|
|
45
|
+
hideLabel?: boolean | undefined;
|
|
46
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
47
|
+
export declare const disabledSelected: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
48
|
+
label: string | JSX.Element;
|
|
49
|
+
hideLabel?: boolean | undefined;
|
|
50
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
51
|
+
export declare const disabledWhileLoading: 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
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
55
|
+
export declare const groupedOptions: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
56
|
+
label: string | JSX.Element;
|
|
57
|
+
hideLabel?: boolean | undefined;
|
|
58
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
59
|
+
export declare const isMulti: import("@storybook/react").Story<Partial<import("react-select").Props<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>> & {
|
|
60
|
+
label: string | JSX.Element;
|
|
61
|
+
hideLabel?: boolean | undefined;
|
|
62
|
+
} & React.RefAttributes<import("react-select").SelectInstance<import("./LuiComboSelect").LuiComboSelectOption, boolean, import("react-select").GroupBase<any>>>>;
|
|
17
63
|
export declare const compareToInput: {
|
|
18
64
|
(): JSX.Element;
|
|
19
65
|
storyName: string;
|
|
@@ -18123,16 +18123,22 @@ var LuiLoadingIndicator = function LuiLoadingIndicator() {
|
|
|
18123
18123
|
};
|
|
18124
18124
|
|
|
18125
18125
|
function LuiComboSelectActual(givenProps, ref) {
|
|
18126
|
-
var
|
|
18126
|
+
var props = Object.assign({
|
|
18127
18127
|
noOptionsMessage: function noOptionsMessage(i) {
|
|
18128
18128
|
return "No options found containing '" + i.inputValue + "'";
|
|
18129
18129
|
}
|
|
18130
|
-
};
|
|
18131
|
-
var props = Object.assign({}, defaultProps, givenProps);
|
|
18130
|
+
}, givenProps);
|
|
18132
18131
|
props.components = _extends({
|
|
18133
18132
|
LoadingIndicator: LuiLoadingIndicator
|
|
18134
18133
|
}, props.components);
|
|
18135
|
-
|
|
18134
|
+
var id = useGenerateOrDefaultId(props == null ? void 0 : props.id);
|
|
18135
|
+
return React__default.createElement("label", {
|
|
18136
|
+
htmlFor: id,
|
|
18137
|
+
className: "LuiComboSelect-label"
|
|
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,
|
|
18136
18142
|
ref: ref
|
|
18137
18143
|
}, props, {
|
|
18138
18144
|
classNamePrefix: "LuiComboSelect",
|
|
@@ -18205,7 +18211,7 @@ function LuiComboSelectActual(givenProps, ref) {
|
|
|
18205
18211
|
});
|
|
18206
18212
|
}
|
|
18207
18213
|
}
|
|
18208
|
-
}));
|
|
18214
|
+
})));
|
|
18209
18215
|
}
|
|
18210
18216
|
|
|
18211
18217
|
var LuiShadow = function LuiShadow(props) {
|