@linzjs/lui 21.1.1 → 21.3.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,17 @@
|
|
|
1
|
+
# [21.3.0](https://github.com/linz/lui/compare/v21.2.0...v21.3.0) (2023-10-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **LuiFileInputBox:** Add optional prop for overriding 'upload file manually' button text ([#1028](https://github.com/linz/lui/issues/1028)) ([69e6a83](https://github.com/linz/lui/commit/69e6a836272f28ed856abef5eaeac9b98938f5b4))
|
|
7
|
+
|
|
8
|
+
# [21.2.0](https://github.com/linz/lui/compare/v21.1.1...v21.2.0) (2023-10-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **LuiFileInputBox:** Allow specifying strings for width and height props ([#1027](https://github.com/linz/lui/issues/1027)) ([f0eb7f0](https://github.com/linz/lui/commit/f0eb7f0fcbac3c1dc066c4132c76ba000b957ec4))
|
|
14
|
+
|
|
1
15
|
## [21.1.1](https://github.com/linz/lui/compare/v21.1.0...v21.1.1) (2023-10-13)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -3,17 +3,19 @@ export interface LuiFileInputBoxProps {
|
|
|
3
3
|
fileDescription: string;
|
|
4
4
|
acceptedExtensions: string[];
|
|
5
5
|
fileFormatText?: string;
|
|
6
|
+
openFileBrowserText?: string;
|
|
6
7
|
onValidFileSelected: (file: File) => void;
|
|
7
8
|
showMustSelectFileError?: boolean;
|
|
8
9
|
customFileErrorMessage?: string;
|
|
9
|
-
width?: number;
|
|
10
|
-
height?: number;
|
|
10
|
+
width?: number | string;
|
|
11
|
+
height?: number | string;
|
|
11
12
|
}
|
|
12
13
|
export declare const LuiFileInputBox: (props: LuiFileInputBoxProps) => JSX.Element;
|
|
13
14
|
export interface FileUploadInfoProps {
|
|
14
15
|
fileName: string | undefined;
|
|
15
16
|
fileDescription: string;
|
|
16
17
|
fileFormatText: string | undefined;
|
|
18
|
+
openFileBrowserText: string | undefined;
|
|
17
19
|
}
|
|
18
20
|
export declare const FileUploadInfo: (props: FileUploadInfoProps) => JSX.Element;
|
|
19
21
|
/**
|
package/dist/index.js
CHANGED
|
@@ -28329,16 +28329,21 @@ var LuiFileInputBox = function (props) {
|
|
|
28329
28329
|
"You must select a file with extension of",
|
|
28330
28330
|
' ',
|
|
28331
28331
|
extensionsAsHumanReadableList(props.acceptedExtensions),
|
|
28332
|
-
"."))))) : (React__default["default"].createElement(FileUploadInfo, { fileName: file === null || file === void 0 ? void 0 : file.name, fileFormatText: props.fileFormatText, fileDescription: props.fileDescription })))));
|
|
28332
|
+
"."))))) : (React__default["default"].createElement(FileUploadInfo, { fileName: file === null || file === void 0 ? void 0 : file.name, fileFormatText: props.fileFormatText, fileDescription: props.fileDescription, openFileBrowserText: props.openFileBrowserText })))));
|
|
28333
28333
|
};
|
|
28334
28334
|
// Only exported for chromatic
|
|
28335
28335
|
var FileUploadInfo = function (props) {
|
|
28336
|
-
var DragAndDropInstruction = function () {
|
|
28337
|
-
|
|
28338
|
-
|
|
28339
|
-
|
|
28340
|
-
|
|
28341
|
-
|
|
28336
|
+
var DragAndDropInstruction = function () {
|
|
28337
|
+
var _a;
|
|
28338
|
+
return (React__default["default"].createElement("p", { className: "LuiFileInputBox-upload-text" },
|
|
28339
|
+
"Drag and drop your ",
|
|
28340
|
+
props.fileDescription,
|
|
28341
|
+
" into the box",
|
|
28342
|
+
React__default["default"].createElement("br", null),
|
|
28343
|
+
React__default["default"].createElement("span", null,
|
|
28344
|
+
"(", (_a = props.openFileBrowserText) !== null && _a !== void 0 ? _a : 'or upload file manually',
|
|
28345
|
+
")")));
|
|
28346
|
+
};
|
|
28342
28347
|
var WaitingForFileSelection = function () { return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
28343
28348
|
React__default["default"].createElement("div", { className: 'LuiFileInputBox-upload-icon-upload' },
|
|
28344
28349
|
React__default["default"].createElement(LuiIcon, { name: "ic_publish", size: 'ns', alt: "Upload" })),
|