@uxf/ui 11.122.1 → 11.122.3

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.
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.FileInput = void 0;
38
38
  const use_input_focus_1 = require("@uxf/core-react/hooks/use-input-focus");
39
+ const translations_1 = require("@uxf/core-react/translations");
39
40
  const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
40
41
  const classes_1 = require("@uxf/core/constants/classes");
41
42
  const cx_1 = require("@uxf/core/utils/cx");
@@ -49,6 +50,7 @@ const form_component_1 = require("../form-component");
49
50
  // eslint-disable-next-line complexity
50
51
  exports.FileInput = (0, react_1.forwardRef)((props, ref) => {
51
52
  var _a, _b, _c, _d;
53
+ const t = (0, translations_1.useUxfTranslation)();
52
54
  const context = (0, react_1.useContext)(context_1.UiContext);
53
55
  const [isUploading, setIsUploading] = (0, react_1.useState)(false);
54
56
  const generatedId = (0, react_1.useId)();
@@ -74,7 +76,7 @@ exports.FileInput = (0, react_1.forwardRef)((props, ref) => {
74
76
  react_1.default.createElement(react_1.default.Fragment, null,
75
77
  react_1.default.createElement(_file_input_base_1._FileInputBase, { accept: props.accept, "aria-describedby": errorId, "aria-invalid": props.isInvalid, className: "uxf-file-input__input", form: props.form, id: id, isDisabled: props.isDisabled || isUploading, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, maxFileSize: props.maxFileSize, name: props.name, onBlur: input.onBlur, onChange: onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile: onUploadFile, ref: (0, compose_refs_1.composeRefs)(ref, innerRef), value: props.value }),
76
78
  react_1.default.createElement("label", { className: (0, cx_1.cx)("uxf-input", "uxf-file-input__label", input.focused && classes_1.CLASSES.IS_FOCUSED, (props.isDisabled || props.isReadOnly) && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, isUploading && classes_1.CLASSES.IS_LOADING, isUploading && "uxf-file-input__label--has-right-addon", `uxf-input--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-input--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`), htmlFor: id },
77
- react_1.default.createElement("div", { className: "uxf-input__left-addon uxf-file-input__label__button" }, !isUploading ? (((_d = props.uploadButtonLabel) !== null && _d !== void 0 ? _d : "Vyberte soubor")) : (react_1.default.createElement(loader_1.Loader, { className: "uxf-file-input__label__loader", size: "sm" }))),
79
+ react_1.default.createElement("div", { className: "uxf-input__left-addon uxf-file-input__label__button" }, !isUploading ? (((_d = props.uploadButtonLabel) !== null && _d !== void 0 ? _d : t("uxf-ui-file-input:upload-button-label"))) : (react_1.default.createElement(loader_1.Loader, { className: "uxf-file-input__label__loader", size: "sm" }))),
78
80
  react_1.default.createElement("div", { className: "uxf-file-input__label__wrapper" },
79
81
  (context === null || context === void 0 ? void 0 : context.domain) && props.value ? (react_1.default.createElement("a", { className: "uxf-file-input__label__wrapper__file-name-link", href: (0, get_file_url_1.getFileUrl)(context.domain, props.value), rel: "noreferrer noopenner", target: "_blank" }, fileName)) : (react_1.default.createElement("span", { className: "uxf-file-input__label__wrapper__file-name" }, fileName)),
80
82
  props.value && !props.isDisabled && !props.isReadOnly && props.isClearable && (react_1.default.createElement(input_1.Input.RemoveButton, { onChange: onChange })))))));
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ "uxf-ui-file-input": {
3
+ "upload-button-label": {
4
+ cs: string;
5
+ en: string;
6
+ sk: string;
7
+ de: string;
8
+ };
9
+ };
10
+ };
11
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-ui-file-input": {
5
+ "upload-button-label": {
6
+ cs: "Vyberte soubor",
7
+ en: "Upload file",
8
+ sk: "Nahrať súbor",
9
+ de: "Datei hochladen",
10
+ },
11
+ },
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/ui",
3
- "version": "11.122.1",
3
+ "version": "11.122.3",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,9 +24,9 @@
24
24
  "@floating-ui/react": "^0.27.17",
25
25
  "@headlessui/react": "1.7.19",
26
26
  "@uxf/core": "11.114.0",
27
- "@uxf/core-react": "11.120.0",
28
- "@uxf/datepicker": "11.120.0",
29
- "@uxf/localize": "11.120.0",
27
+ "@uxf/core-react": "11.122.2",
28
+ "@uxf/datepicker": "11.122.2",
29
+ "@uxf/localize": "11.122.2",
30
30
  "@uxf/styles": "11.114.0",
31
31
  "dayjs": "^1.11.19",
32
32
  "react": ">= 18.2.0",
@@ -40,9 +40,9 @@
40
40
  "@types/react": "18.3.27",
41
41
  "@types/react-dom": "18.3.7",
42
42
  "@uxf/core": "11.114.0",
43
- "@uxf/core-react": "11.120.0",
44
- "@uxf/datepicker": "11.120.0",
45
- "@uxf/localize": "11.120.0",
43
+ "@uxf/core-react": "11.122.2",
44
+ "@uxf/datepicker": "11.122.2",
45
+ "@uxf/localize": "11.122.2",
46
46
  "@uxf/styles": "11.114.0",
47
47
  "dayjs": "^1.11.19",
48
48
  "react-dropzone": "^14.4.0"
@@ -30,6 +30,9 @@
30
30
  "dateTab": "Datum",
31
31
  "timeTab": "Čas"
32
32
  },
33
+ "uxf-ui-file-input": {
34
+ "upload-button-label": "Vyberte soubor"
35
+ },
33
36
  "uxf-ui-image-gallery": {
34
37
  "close-button": "Zavřít"
35
38
  },
@@ -30,6 +30,9 @@
30
30
  "dateTab": "Datum",
31
31
  "timeTab": "Zeit"
32
32
  },
33
+ "uxf-ui-file-input": {
34
+ "upload-button-label": "Datei hochladen"
35
+ },
33
36
  "uxf-ui-image-gallery": {
34
37
  "close-button": "Schließen"
35
38
  },
@@ -30,6 +30,9 @@
30
30
  "dateTab": "Date",
31
31
  "timeTab": "Time"
32
32
  },
33
+ "uxf-ui-file-input": {
34
+ "upload-button-label": "Upload file"
35
+ },
33
36
  "uxf-ui-image-gallery": {
34
37
  "close-button": "Close"
35
38
  },
@@ -30,6 +30,9 @@
30
30
  "dateTab": "Dátum",
31
31
  "timeTab": "Čas"
32
32
  },
33
+ "uxf-ui-file-input": {
34
+ "upload-button-label": "Nahrať súbor"
35
+ },
33
36
  "uxf-ui-image-gallery": {
34
37
  "close-button": "Zatvoriť"
35
38
  },
@@ -97,6 +97,14 @@ declare const _default: {
97
97
  de: string;
98
98
  };
99
99
  };
100
+ "uxf-ui-file-input": {
101
+ "upload-button-label": {
102
+ cs: string;
103
+ en: string;
104
+ sk: string;
105
+ de: string;
106
+ };
107
+ };
100
108
  "uxf-ui-datetime-picker": {
101
109
  readonly dateTab: {
102
110
  readonly cs: "Datum";
@@ -8,13 +8,14 @@ const translations_2 = __importDefault(require("@uxf/ui/combobox/translations"))
8
8
  const translations_3 = __importDefault(require("@uxf/ui/date-picker/translations"));
9
9
  const translations_4 = __importDefault(require("@uxf/ui/date-range-picker/translations"));
10
10
  const translations_5 = __importDefault(require("@uxf/ui/datetime-picker/translations"));
11
- const translations_6 = __importDefault(require("@uxf/ui/image-gallery/translations"));
12
- const translations_7 = __importDefault(require("@uxf/ui/layout/translations"));
13
- const translations_8 = __importDefault(require("@uxf/ui/lightbox/translations"));
14
- const translations_9 = __importDefault(require("@uxf/ui/multi-combobox/translations"));
15
- const translations_10 = __importDefault(require("@uxf/ui/multi-select/translations"));
16
- const translations_11 = __importDefault(require("@uxf/ui/select/translations"));
17
- const translations_12 = __importDefault(require("@uxf/ui/time-picker/translations"));
11
+ const translations_6 = __importDefault(require("@uxf/ui/file-input/translations"));
12
+ const translations_7 = __importDefault(require("@uxf/ui/image-gallery/translations"));
13
+ const translations_8 = __importDefault(require("@uxf/ui/layout/translations"));
14
+ const translations_9 = __importDefault(require("@uxf/ui/lightbox/translations"));
15
+ const translations_10 = __importDefault(require("@uxf/ui/multi-combobox/translations"));
16
+ const translations_11 = __importDefault(require("@uxf/ui/multi-select/translations"));
17
+ const translations_12 = __importDefault(require("@uxf/ui/select/translations"));
18
+ const translations_13 = __importDefault(require("@uxf/ui/time-picker/translations"));
18
19
  exports.default = {
19
20
  ...translations_1.default,
20
21
  ...translations_2.default,
@@ -28,4 +29,5 @@ exports.default = {
28
29
  ...translations_10.default,
29
30
  ...translations_11.default,
30
31
  ...translations_12.default,
32
+ ...translations_13.default,
31
33
  };