@linzjs/lui 21.2.0 → 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,10 @@
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
+
1
8
  # [21.2.0](https://github.com/linz/lui/compare/v21.1.1...v21.2.0) (2023-10-20)
2
9
 
3
10
 
@@ -3,6 +3,7 @@ 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;
@@ -14,6 +15,7 @@ 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 () { return (React__default["default"].createElement("p", { className: "LuiFileInputBox-upload-text" },
28337
- "Drag and drop your ",
28338
- props.fileDescription,
28339
- " into the box",
28340
- React__default["default"].createElement("br", null),
28341
- React__default["default"].createElement("span", null, "(or upload file manually)"))); };
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" })),