@linzjs/lui 12.1.0 → 12.1.4
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/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.stories.d.ts +4 -0
- package/dist/components/LuiTooltip/LuiTooltip.stories.d.ts +0 -1
- package/dist/lui.cjs.development.js +13 -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 +10 -3
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +13 -17
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.scss +5 -1
- package/dist/scss/Components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.scss +3 -2
- package/dist/scss/Components/LuiFormElements/LuiTextInput/LuiTextInput.scss +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [12.1.4](https://github.com/linz/lui/compare/v12.1.3...v12.1.4) (2022-01-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **LuiTextAreaInput:** Fixed Error Styling for when the component ([#528](https://github.com/linz/lui/issues/528)) ([b790b7e](https://github.com/linz/lui/commit/b790b7e60d9bde93de6000476e84f82c7a4d2e08))
|
|
7
|
+
|
|
8
|
+
## [12.1.3](https://github.com/linz/lui/compare/v12.1.2...v12.1.3) (2022-01-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* LuiTextInput mandatory star style ([#526](https://github.com/linz/lui/issues/526)) ([7cabbd0](https://github.com/linz/lui/commit/7cabbd0537b194d2a8884ea601da8918a10d7111))
|
|
14
|
+
|
|
15
|
+
## [12.1.2](https://github.com/linz/lui/compare/v12.1.1...v12.1.2) (2022-01-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* FileInputBox not updating on error ([#498](https://github.com/linz/lui/issues/498)) ([7efa723](https://github.com/linz/lui/commit/7efa723f42cc15ceacb5f432d3d048f4447553f2))
|
|
21
|
+
|
|
22
|
+
## [12.1.1](https://github.com/linz/lui/compare/v12.1.0...v12.1.1) (2022-01-17)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* Fix for importing svg path breaking downstream projects ([#523](https://github.com/linz/lui/issues/523)) ([6c1e84c](https://github.com/linz/lui/commit/6c1e84c2e28561ee56a442f7adb567de45e81206))
|
|
28
|
+
|
|
1
29
|
# [12.1.0](https://github.com/linz/lui/compare/v12.0.1...v12.1.0) (2022-01-17)
|
|
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>;
|
|
@@ -1066,20 +1066,6 @@ var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
};
|
|
1068
1068
|
|
|
1069
|
-
var FileFormatErrorDetails = function FileFormatErrorDetails() {
|
|
1070
|
-
return React__default.createElement("div", {
|
|
1071
|
-
className: "LuiFileInputBox-upload-container"
|
|
1072
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
1073
|
-
className: 'LuiFileInputBox-upload-icon-error'
|
|
1074
|
-
}, React__default.createElement(LuiIcon, {
|
|
1075
|
-
name: "ic_error_outline",
|
|
1076
|
-
size: 'ns',
|
|
1077
|
-
alt: "Error"
|
|
1078
|
-
})), props.customFileErrorMessage ? React__default.createElement("p", null, props.customFileErrorMessage) : React__default.createElement("p", {
|
|
1079
|
-
className: "LuiFileInputBox-upload-text"
|
|
1080
|
-
}, "You must select a file with extension of", ' ', extensionsAsHumanReadableList(props.acceptedExtensions), ".")));
|
|
1081
|
-
};
|
|
1082
|
-
|
|
1083
1069
|
var hasError = hasFileFormatError || props.showMustSelectFileError === true;
|
|
1084
1070
|
return React__default.createElement("div", {
|
|
1085
1071
|
className: clsx('LuiFileInputBox-upload', hasError && 'LuiFileInputBox-upload-error'),
|
|
@@ -1096,7 +1082,17 @@ var LuiFileInputBox = function LuiFileInputBox(props) {
|
|
|
1096
1082
|
return "." + extension;
|
|
1097
1083
|
}).join(','),
|
|
1098
1084
|
onChange: onChange
|
|
1099
|
-
}), 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, {
|
|
1100
1096
|
fileName: file == null ? void 0 : file.name,
|
|
1101
1097
|
fileFormatText: props.fileFormatText,
|
|
1102
1098
|
fileDescription: props.fileDescription
|
|
@@ -1141,8 +1137,8 @@ var FileUploadInfo = function FileUploadInfo(props) {
|
|
|
1141
1137
|
/**
|
|
1142
1138
|
* Get the extension from a filename in upper-case.
|
|
1143
1139
|
*
|
|
1144
|
-
* @param fileName File-name to get extension from
|
|
1145
|
-
* @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
|
|
1146
1142
|
*/
|
|
1147
1143
|
|
|
1148
1144
|
var getFileNameExtension = function getFileNameExtension(fileName) {
|