@uxf/ui 11.72.3 → 11.74.1

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.
Files changed (46) hide show
  1. package/README.md +3 -1
  2. package/chip/chip.js +3 -1
  3. package/chip/translations.d.ts +11 -0
  4. package/chip/translations.js +12 -0
  5. package/combobox/combobox.js +4 -2
  6. package/combobox/translations.d.ts +17 -0
  7. package/combobox/translations.js +18 -0
  8. package/date-picker/date-picker-decade.js +5 -3
  9. package/date-picker/date-picker-month.js +5 -3
  10. package/date-picker/date-picker-year.js +5 -3
  11. package/date-picker/translations.d.ts +53 -0
  12. package/date-picker/translations.js +54 -0
  13. package/date-range-picker/date-range-picker-decade.js +5 -3
  14. package/date-range-picker/date-range-picker-month.js +6 -4
  15. package/date-range-picker/date-range-picker-year.js +5 -3
  16. package/date-range-picker/translations.d.ts +53 -0
  17. package/date-range-picker/translations.js +54 -0
  18. package/datetime-picker/datetime-picker.js +4 -2
  19. package/datetime-picker/translations.d.ts +17 -0
  20. package/datetime-picker/translations.js +18 -0
  21. package/image-gallery/components/close-button.js +3 -1
  22. package/image-gallery/translations.d.ts +11 -0
  23. package/image-gallery/translations.js +12 -0
  24. package/layout/layout.js +3 -1
  25. package/layout/translations.d.ts +11 -0
  26. package/layout/translations.js +12 -0
  27. package/lightbox/components/lightbox-close-button.js +3 -1
  28. package/lightbox/components/lightbox-next-button.js +3 -1
  29. package/lightbox/components/lightbox-prev-button.js +3 -1
  30. package/lightbox/translations.d.ts +23 -0
  31. package/lightbox/translations.js +24 -0
  32. package/multi-combobox/multi-combobox.js +6 -4
  33. package/multi-combobox/translations.d.ts +29 -0
  34. package/multi-combobox/translations.js +30 -0
  35. package/multi-select/multi-select.js +4 -2
  36. package/multi-select/translations.d.ts +17 -0
  37. package/multi-select/translations.js +18 -0
  38. package/package.json +2 -2
  39. package/select/select.js +3 -1
  40. package/select/translations.d.ts +11 -0
  41. package/select/translations.js +12 -0
  42. package/time-picker/time-picker.js +7 -5
  43. package/time-picker/translations.d.ts +17 -0
  44. package/time-picker/translations.js +18 -0
  45. package/translations/translations.d.ts +237 -0
  46. package/translations/translations.js +31 -0
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # @uxf/ui
2
2
 
3
+ > **Note:** This package contains translations. For proper functionality, you must use the `TranslationsProvider` from `@uxf/core-react/translations`. See the [core-react documentation](https://fe.uxf.dev/docs/core-react) for more information.
4
+
3
5
  ## [Documentation](https://ui.uxf.dev)
4
6
 
5
7
  ## How to install
6
8
 
7
9
  ```bash
8
10
  yarn add @uxf/ui
9
- ```
11
+ ```
package/chip/chip.js CHANGED
@@ -26,10 +26,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.Chip = void 0;
28
28
  const use_anchor_props_1 = require("@uxf/core-react/clickable/use-anchor-props");
29
+ const translations_1 = require("@uxf/core-react/translations");
29
30
  const cx_1 = require("@uxf/core/utils/cx");
30
31
  const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
31
32
  const react_1 = __importStar(require("react"));
32
33
  const CloseButton = (props) => {
34
+ const t = (0, translations_1.useUxfTranslation)();
33
35
  const onClose = (e) => {
34
36
  var _a;
35
37
  e.preventDefault();
@@ -37,7 +39,7 @@ const CloseButton = (props) => {
37
39
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
38
40
  };
39
41
  return (react_1.default.createElement("button", { className: "uxf-chip__button", onClick: onClose, tabIndex: props.suppressFocus ? -1 : undefined, type: "button" },
40
- react_1.default.createElement("span", { className: "uxf-chip__button-label" }, "Odebrat polo\u017Eku"),
42
+ react_1.default.createElement("span", { className: "uxf-chip__button-label" }, t("uxf-ui-chip:remove-item")),
41
43
  react_1.default.createElement("svg", { className: "uxf-chip__button-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 8 8" },
42
44
  react_1.default.createElement("path", { d: "M1 1l6 6m0-6L1 7", strokeLinecap: "round", strokeWidth: "1.5" }))));
43
45
  };
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ "uxf-ui-chip": {
3
+ "remove-item": {
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-chip": {
5
+ "remove-item": {
6
+ cs: "Odebrat položku",
7
+ en: "Remove item",
8
+ sk: "Odstrániť položku",
9
+ de: "Element entfernen",
10
+ },
11
+ },
12
+ };
@@ -30,6 +30,7 @@ const react_2 = require("@headlessui/react");
30
30
  const show_1 = require("@uxf/core-react/components/show");
31
31
  const use_input_focus_1 = require("@uxf/core-react/hooks/use-input-focus");
32
32
  const use_on_unmount_1 = require("@uxf/core-react/hooks/use-on-unmount");
33
+ const translations_1 = require("@uxf/core-react/translations");
33
34
  const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
34
35
  const classes_1 = require("@uxf/core/constants/classes");
35
36
  const empty_array_1 = require("@uxf/core/constants/empty-array");
@@ -61,15 +62,16 @@ Options.displayName = "UxfUiComboboxOptions";
61
62
  // eslint-disable-next-line complexity
62
63
  function Combobox(props) {
63
64
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
65
+ const t = (0, translations_1.useUxfTranslation)();
64
66
  const isAsync = (0, is_not_nil_1.isNotNil)(props.loadOptions);
65
67
  const [query, setQuery] = (0, react_3.useState)("");
66
68
  const asyncOptions = (0, use_async_loading_1.useAsyncLoading)(query, (_a = props.options) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY, props.loadOptions);
67
69
  const options = isAsync ? asyncOptions : ((_b = props.options) !== null && _b !== void 0 ? _b : empty_array_1.EMPTY_ARRAY);
68
70
  const filteredData = (0, is_empty_1.isEmpty)(query) || isAsync ? options : options.filter((item) => (0, slugify_1.slugify)(item.label).includes((0, slugify_1.slugify)(query)));
69
71
  const emptyMessage = (0, is_empty_1.isEmpty)(query)
70
- ? ((_c = props.noQueryMessage) !== null && _c !== void 0 ? _c : "Pro zobrazení možností začněte psát")
72
+ ? ((_c = props.noQueryMessage) !== null && _c !== void 0 ? _c : t("uxf-ui-combobox:no-query-message"))
71
73
  : (0, is_empty_1.isEmpty)(options)
72
- ? ((_d = props.noOptionsMessage) !== null && _d !== void 0 ? _d : "Nabídka neosahuje žádné položky")
74
+ ? ((_d = props.noOptionsMessage) !== null && _d !== void 0 ? _d : t("uxf-ui-combobox:no-options-message"))
73
75
  : ((_e = props.notFoundMessage) !== null && _e !== void 0 ? _e : "Nic nenalezeno");
74
76
  const clearQuery = () => setQuery("");
75
77
  const onChange = (v) => props.onChange(v);
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ "uxf-ui-combobox": {
3
+ "no-query-message": {
4
+ cs: string;
5
+ en: string;
6
+ sk: string;
7
+ de: string;
8
+ };
9
+ "no-options-message": {
10
+ cs: string;
11
+ en: string;
12
+ sk: string;
13
+ de: string;
14
+ };
15
+ };
16
+ };
17
+ export default _default;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-ui-combobox": {
5
+ "no-query-message": {
6
+ cs: "Pro zobrazení možností začněte psát",
7
+ en: "Start typing to see options",
8
+ sk: "Pre zobrazenie možností začnite písať",
9
+ de: "Beginnen Sie zu tippen, um Optionen zu sehen",
10
+ },
11
+ "no-options-message": {
12
+ cs: "Nabídka neosahuje žádné položky",
13
+ en: "No items found",
14
+ sk: "Ponuka neobsahuje žiadne položky",
15
+ de: "Keine Elemente gefunden",
16
+ },
17
+ },
18
+ };
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DatePickerDecade = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const classes_1 = require("@uxf/core/constants/classes");
31
32
  const cx_1 = require("@uxf/core/utils/cx");
32
33
  const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
@@ -37,6 +38,7 @@ const react_1 = __importStar(require("react"));
37
38
  const calendar_1 = require("../calendar");
38
39
  exports.DatePickerDecade = (0, react_1.memo)((props) => {
39
40
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
+ const t = (0, translations_1.useUxfTranslation)();
40
42
  const { onYearSelect } = props;
41
43
  const { canGoToYear, goToNextYear, goToPrevYear, activeMonths, firstDayOfWeek, selectedDate } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
42
44
  const currentYear = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.year) !== null && _b !== void 0 ? _b : new Date().getFullYear();
@@ -73,13 +75,13 @@ exports.DatePickerDecade = (0, react_1.memo)((props) => {
73
75
  react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
74
76
  children: monthLabel,
75
77
  onClick: handleSetMonthViewMode,
76
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : "Vybrat měsíc",
78
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-picker:select-month"),
77
79
  }, nextButtonProps: {
78
80
  onClick: handleGoToNextDecadeClick,
79
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextDecade) !== null && _h !== void 0 ? _h : "Vpřed",
81
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextDecade) !== null && _h !== void 0 ? _h : t("uxf-ui-date-picker:next-decade"),
80
82
  }, prevButtonProps: {
81
83
  onClick: handleGoToPrevDecadeClick,
82
- title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevDecade) !== null && _k !== void 0 ? _k : "Zpět",
84
+ title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevDecade) !== null && _k !== void 0 ? _k : t("uxf-ui-date-picker:prev-decade"),
83
85
  }, yearButtonProps: {
84
86
  children: currentYear,
85
87
  isDisabled: true,
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DatePickerMonth = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
31
32
  const use_month_1 = require("@uxf/datepicker/hooks/use-month");
32
33
  const dayjs_1 = __importDefault(require("dayjs"));
@@ -34,6 +35,7 @@ const react_1 = __importStar(require("react"));
34
35
  const calendar_1 = require("../calendar");
35
36
  exports.DatePickerMonth = (0, react_1.memo)((props) => {
36
37
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
38
+ const t = (0, translations_1.useUxfTranslation)();
37
39
  const { setViewMode } = props;
38
40
  const datePickerProps = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
39
41
  const onMonthChange = props.onMonthChange;
@@ -66,15 +68,15 @@ exports.DatePickerMonth = (0, react_1.memo)((props) => {
66
68
  react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
67
69
  children: monthLabel,
68
70
  onClick: handleMonthClick,
69
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : "Vybrat měsíc",
71
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-picker:select-month"),
70
72
  }, nextButtonProps: {
71
73
  isDisabled: !canGoToNextMonth,
72
74
  onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
73
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextMonth) !== null && _h !== void 0 ? _h : "Nadcházející měsíc",
75
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextMonth) !== null && _h !== void 0 ? _h : t("uxf-ui-date-picker:next-month"),
74
76
  }, prevButtonProps: {
75
77
  isDisabled: !canGoToPrevMonth,
76
78
  onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
77
- title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevMonth) !== null && _k !== void 0 ? _k : "Předchozí měsíc",
79
+ title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevMonth) !== null && _k !== void 0 ? _k : t("uxf-ui-date-picker:prev-month"),
78
80
  }, yearButtonProps: {
79
81
  children: currentYear,
80
82
  onClick: handleSetYearViewModeClick,
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DatePickerYear = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const classes_1 = require("@uxf/core/constants/classes");
31
32
  const cx_1 = require("@uxf/core/utils/cx");
32
33
  const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
@@ -37,6 +38,7 @@ const react_1 = __importStar(require("react"));
37
38
  const calendar_1 = require("../calendar");
38
39
  exports.DatePickerYear = (0, react_1.memo)((props) => {
39
40
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
+ const t = (0, translations_1.useUxfTranslation)();
40
42
  const { canGoToNextYear, canGoToPrevYear, goToNextYear, goToPrevYear, canGoToMonth, activeMonths, firstDayOfWeek, selectedDate, } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
41
43
  const currentMonth = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.month) !== null && _b !== void 0 ? _b : new Date().getMonth();
42
44
  const currentYear = (_d = (_c = activeMonths.at(0)) === null || _c === void 0 ? void 0 : _c.year) !== null && _d !== void 0 ? _d : new Date().getFullYear();
@@ -77,15 +79,15 @@ exports.DatePickerYear = (0, react_1.memo)((props) => {
77
79
  }, nextButtonProps: {
78
80
  isDisabled: !canGoToNextYear,
79
81
  onClick: canGoToNextYear ? handleGoToNextYear : undefined,
80
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.nextYear) !== null && _f !== void 0 ? _f : "Nadcházející rok",
82
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.nextYear) !== null && _f !== void 0 ? _f : t("uxf-ui-date-picker:next-year"),
81
83
  }, prevButtonProps: {
82
84
  isDisabled: !canGoToPrevYear,
83
85
  onClick: canGoToPrevYear ? handleGoToPrevYear : undefined,
84
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.prevYear) !== null && _h !== void 0 ? _h : "Předchozí rok",
86
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.prevYear) !== null && _h !== void 0 ? _h : t("uxf-ui-date-picker:prev-year"),
85
87
  }, yearButtonProps: {
86
88
  children: yearLabel,
87
89
  onClick: handleYearClick,
88
- title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.selectYear) !== null && _k !== void 0 ? _k : "Vybrat rok",
90
+ title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.selectYear) !== null && _k !== void 0 ? _k : t("uxf-ui-date-picker:select-year"),
89
91
  } }),
90
92
  react_1.default.createElement("div", { className: "uxf-calendar__year" }, months.map((month, index) => (react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-calendar__cell uxf-calendar__cell-month", !canGoToMonth(month.date) && classes_1.CLASSES.IS_DISABLED, (0, dayjs_1.default)(month.date).month() === (0, dayjs_1.default)(selectedDate).month() &&
91
93
  (0, dayjs_1.default)(month.date).year() === (0, dayjs_1.default)(selectedDate).year() &&
@@ -0,0 +1,53 @@
1
+ declare const _default: {
2
+ readonly "uxf-ui-date-picker": {
3
+ readonly "prev-year": {
4
+ readonly cs: "Předchozí rok";
5
+ readonly en: "Previous year";
6
+ readonly sk: "Predchádzajúci rok";
7
+ readonly de: "Vorheriges Jahr";
8
+ };
9
+ readonly "next-year": {
10
+ readonly cs: "Nadcházející rok";
11
+ readonly en: "Next year";
12
+ readonly sk: "Nasledujúci rok";
13
+ readonly de: "Nächstes Jahr";
14
+ };
15
+ readonly "select-year": {
16
+ readonly cs: "Vybrat rok";
17
+ readonly en: "Select year";
18
+ readonly sk: "Vybrať rok";
19
+ readonly de: "Jahr auswählen";
20
+ };
21
+ readonly "select-month": {
22
+ readonly cs: "Vybrat měsíc";
23
+ readonly en: "Select month";
24
+ readonly sk: "Vybrať mesiac";
25
+ readonly de: "Monat auswählen";
26
+ };
27
+ readonly "next-month": {
28
+ readonly cs: "Nadcházející měsíc";
29
+ readonly en: "Next month";
30
+ readonly sk: "Nasledujúci mesiac";
31
+ readonly de: "Nächster Monat";
32
+ };
33
+ readonly "prev-month": {
34
+ readonly cs: "Předchozí měsíc";
35
+ readonly en: "Previous month";
36
+ readonly sk: "Predchádzajúci mesiac";
37
+ readonly de: "Vorheriger Monat";
38
+ };
39
+ readonly "next-decade": {
40
+ readonly cs: "Vpřed";
41
+ readonly en: "Forward";
42
+ readonly sk: "Vpred";
43
+ readonly de: "Vorwärts";
44
+ };
45
+ readonly "prev-decade": {
46
+ readonly cs: "Zpět";
47
+ readonly en: "Back";
48
+ readonly sk: "Späť";
49
+ readonly de: "Zurück";
50
+ };
51
+ };
52
+ };
53
+ export default _default;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-ui-date-picker": {
5
+ "prev-year": {
6
+ cs: "Předchozí rok",
7
+ en: "Previous year",
8
+ sk: "Predchádzajúci rok",
9
+ de: "Vorheriges Jahr",
10
+ },
11
+ "next-year": {
12
+ cs: "Nadcházející rok",
13
+ en: "Next year",
14
+ sk: "Nasledujúci rok",
15
+ de: "Nächstes Jahr",
16
+ },
17
+ "select-year": {
18
+ cs: "Vybrat rok",
19
+ en: "Select year",
20
+ sk: "Vybrať rok",
21
+ de: "Jahr auswählen",
22
+ },
23
+ "select-month": {
24
+ cs: "Vybrat měsíc",
25
+ en: "Select month",
26
+ sk: "Vybrať mesiac",
27
+ de: "Monat auswählen",
28
+ },
29
+ "next-month": {
30
+ cs: "Nadcházející měsíc",
31
+ en: "Next month",
32
+ sk: "Nasledujúci mesiac",
33
+ de: "Nächster Monat",
34
+ },
35
+ "prev-month": {
36
+ cs: "Předchozí měsíc",
37
+ en: "Previous month",
38
+ sk: "Predchádzajúci mesiac",
39
+ de: "Vorheriger Monat",
40
+ },
41
+ "next-decade": {
42
+ cs: "Vpřed",
43
+ en: "Forward",
44
+ sk: "Vpred",
45
+ de: "Vorwärts",
46
+ },
47
+ "prev-decade": {
48
+ cs: "Zpět",
49
+ en: "Back",
50
+ sk: "Späť",
51
+ de: "Zurück",
52
+ },
53
+ },
54
+ };
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DateRangePickerDecade = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const classes_1 = require("@uxf/core/constants/classes");
31
32
  const cx_1 = require("@uxf/core/utils/cx");
32
33
  const date_range_picker_context_1 = require("@uxf/datepicker/contexts/date-range-picker-context");
@@ -38,6 +39,7 @@ const react_1 = __importStar(require("react"));
38
39
  const calendar_1 = require("../calendar");
39
40
  exports.DateRangePickerDecade = (0, react_1.memo)((props) => {
40
41
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
+ const t = (0, translations_1.useUxfTranslation)();
41
43
  const { canGoToYear, goToNextYear, goToPrevYear, activeMonths, firstDayOfWeek } = (0, react_1.useContext)(date_range_picker_context_1.DateRangePickerContext);
42
44
  const currentYear = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.year) !== null && _b !== void 0 ? _b : new Date().getFullYear();
43
45
  const currentMonth = (_d = (_c = activeMonths.at(0)) === null || _c === void 0 ? void 0 : _c.month) !== null && _d !== void 0 ? _d : new Date().getMonth();
@@ -77,13 +79,13 @@ exports.DateRangePickerDecade = (0, react_1.memo)((props) => {
77
79
  react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
78
80
  children: monthLabel,
79
81
  onClick: handleSetMonthViewMode,
80
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : "Vybrat měsíc",
82
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-range-picker:select-month"),
81
83
  }, nextButtonProps: {
82
84
  onClick: handleGoToNextDecadeClick,
83
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextDecade) !== null && _h !== void 0 ? _h : "Vpřed",
85
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextDecade) !== null && _h !== void 0 ? _h : t("uxf-ui-date-range-picker:next-decade"),
84
86
  }, prevButtonProps: {
85
87
  onClick: handleGoToPrevDecadeClick,
86
- title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevDecade) !== null && _k !== void 0 ? _k : "Zpět",
88
+ title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevDecade) !== null && _k !== void 0 ? _k : t("uxf-ui-date-range-picker:prev-decade"),
87
89
  }, yearButtonProps: {
88
90
  children: yearLabel,
89
91
  isDisabled: true,
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DateRangePickerMonth = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const date_range_picker_context_1 = require("@uxf/datepicker/contexts/date-range-picker-context");
31
32
  const use_month_1 = require("@uxf/datepicker/hooks/use-month");
32
33
  const use_year_1 = require("@uxf/datepicker/hooks/use-year");
@@ -35,6 +36,7 @@ const react_1 = __importStar(require("react"));
35
36
  const calendar_1 = require("../calendar");
36
37
  exports.DateRangePickerMonth = (0, react_1.memo)((props) => {
37
38
  var _a, _b, _c, _d, _e, _f, _g, _h;
39
+ const t = (0, translations_1.useUxfTranslation)();
38
40
  const dateRangePickerProps = (0, react_1.useContext)(date_range_picker_context_1.DateRangePickerContext);
39
41
  const { canGoToNextMonth, canGoToPrevMonth, firstDayOfWeek, goToNextMonthsByOneMonth, goToPrevMonthsByOneMonth } = dateRangePickerProps;
40
42
  const { monthLabel } = (0, use_month_1.useMonth)({
@@ -63,19 +65,19 @@ exports.DateRangePickerMonth = (0, react_1.memo)((props) => {
63
65
  react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
64
66
  children: monthLabel,
65
67
  onClick: handleMonthClick,
66
- title: (_b = (_a = props.customButtonTitles) === null || _a === void 0 ? void 0 : _a.selectMonth) !== null && _b !== void 0 ? _b : "Vybrat měsíc",
68
+ title: (_b = (_a = props.customButtonTitles) === null || _a === void 0 ? void 0 : _a.selectMonth) !== null && _b !== void 0 ? _b : t("uxf-ui-date-range-picker:select-month"),
67
69
  }, nextButtonProps: {
68
70
  isDisabled: !canGoToNextMonth,
69
71
  onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
70
- title: (_d = (_c = props.customButtonTitles) === null || _c === void 0 ? void 0 : _c.nextMonth) !== null && _d !== void 0 ? _d : "Nadcházející měsíc",
72
+ title: (_d = (_c = props.customButtonTitles) === null || _c === void 0 ? void 0 : _c.nextMonth) !== null && _d !== void 0 ? _d : t("uxf-ui-date-range-picker:next-month"),
71
73
  }, prevButtonProps: {
72
74
  isDisabled: !canGoToPrevMonth,
73
75
  onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
74
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.prevMonth) !== null && _f !== void 0 ? _f : "Předchozí měsíc",
76
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.prevMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-range-picker:prev-month"),
75
77
  }, yearButtonProps: {
76
78
  children: yearLabel,
77
79
  onClick: handleSetYearViewModeClick,
78
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.selectYear) !== null && _h !== void 0 ? _h : "Vybrat rok",
80
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.selectYear) !== null && _h !== void 0 ? _h : t("uxf-ui-date-range-picker:select-year"),
79
81
  } }),
80
82
  react_1.default.createElement(calendar_1.Calendar, { datePickerProps: dateRangePickerProps, month: props.month, year: props.year })));
81
83
  });
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.DateRangePickerYear = void 0;
30
+ const translations_1 = require("@uxf/core-react/translations");
30
31
  const classes_1 = require("@uxf/core/constants/classes");
31
32
  const cx_1 = require("@uxf/core/utils/cx");
32
33
  const date_range_picker_context_1 = require("@uxf/datepicker/contexts/date-range-picker-context");
@@ -37,6 +38,7 @@ const react_1 = __importStar(require("react"));
37
38
  const calendar_1 = require("../calendar");
38
39
  exports.DateRangePickerYear = (0, react_1.memo)((props) => {
39
40
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
+ const t = (0, translations_1.useUxfTranslation)();
40
42
  const { canGoToNextYear, canGoToPrevYear, goToNextYear, goToPrevYear, canGoToMonth, activeMonths, firstDayOfWeek } = (0, react_1.useContext)(date_range_picker_context_1.DateRangePickerContext);
41
43
  const currentMonth = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.month) !== null && _b !== void 0 ? _b : new Date().getMonth();
42
44
  const currentYear = (_d = (_c = activeMonths.at(0)) === null || _c === void 0 ? void 0 : _c.year) !== null && _d !== void 0 ? _d : new Date().getFullYear();
@@ -76,15 +78,15 @@ exports.DateRangePickerYear = (0, react_1.memo)((props) => {
76
78
  }, nextButtonProps: {
77
79
  isDisabled: !canGoToNextYear,
78
80
  onClick: canGoToNextYear ? handleGoToNextYear : undefined,
79
- title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.nextYear) !== null && _f !== void 0 ? _f : "Nadcházející rok",
81
+ title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.nextYear) !== null && _f !== void 0 ? _f : t("uxf-ui-date-range-picker:next-year"),
80
82
  }, prevButtonProps: {
81
83
  isDisabled: !canGoToPrevYear,
82
84
  onClick: canGoToPrevYear ? handleGoToPrevYear : undefined,
83
- title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.prevYear) !== null && _h !== void 0 ? _h : "Předchozí rok",
85
+ title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.prevYear) !== null && _h !== void 0 ? _h : t("uxf-ui-date-range-picker:prev-year"),
84
86
  }, yearButtonProps: {
85
87
  children: yearLabel,
86
88
  onClick: handleYearClick,
87
- title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.selectYear) !== null && _k !== void 0 ? _k : "Vybrat rok",
89
+ title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.selectYear) !== null && _k !== void 0 ? _k : t("uxf-ui-date-range-picker:select-year"),
88
90
  } }),
89
91
  react_1.default.createElement("div", { className: "uxf-calendar__year" }, months.map((month, index) => (react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-calendar__cell uxf-calendar__cell-month", !canGoToMonth(month.date) && classes_1.CLASSES.IS_DISABLED, (0, dayjs_1.default)(month.date).month() === currentMonth && "uxf-calendar__cell-month--current"), key: month.monthLabel + index, onClick: handleMonthClick(month.date), type: "button" }, month.monthLabel))))));
90
92
  });
@@ -0,0 +1,53 @@
1
+ declare const _default: {
2
+ readonly "uxf-ui-date-range-picker": {
3
+ readonly "prev-year": {
4
+ readonly cs: "Předchozí rok";
5
+ readonly en: "Previous year";
6
+ readonly sk: "Predchádzajúci rok";
7
+ readonly de: "Vorheriges Jahr";
8
+ };
9
+ readonly "next-year": {
10
+ readonly cs: "Nadcházející rok";
11
+ readonly en: "Next year";
12
+ readonly sk: "Nasledujúci rok";
13
+ readonly de: "Nächstes Jahr";
14
+ };
15
+ readonly "select-year": {
16
+ readonly cs: "Vybrat rok";
17
+ readonly en: "Select year";
18
+ readonly sk: "Vybrať rok";
19
+ readonly de: "Jahr auswählen";
20
+ };
21
+ readonly "select-month": {
22
+ readonly cs: "Vybrat měsíc";
23
+ readonly en: "Select month";
24
+ readonly sk: "Vybrať mesiac";
25
+ readonly de: "Monat auswählen";
26
+ };
27
+ readonly "next-month": {
28
+ readonly cs: "Nadcházející měsíc";
29
+ readonly en: "Next month";
30
+ readonly sk: "Nasledujúci mesiac";
31
+ readonly de: "Nächster Monat";
32
+ };
33
+ readonly "prev-month": {
34
+ readonly cs: "Předchozí měsíc";
35
+ readonly en: "Previous month";
36
+ readonly sk: "Predchádzajúci mesiac";
37
+ readonly de: "Vorheriger Monat";
38
+ };
39
+ readonly "next-decade": {
40
+ readonly cs: "Vpřed";
41
+ readonly en: "Forward";
42
+ readonly sk: "Vpred";
43
+ readonly de: "Vorwärts";
44
+ };
45
+ readonly "prev-decade": {
46
+ readonly cs: "Zpět";
47
+ readonly en: "Back";
48
+ readonly sk: "Späť";
49
+ readonly de: "Zurück";
50
+ };
51
+ };
52
+ };
53
+ export default _default;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-ui-date-range-picker": {
5
+ "prev-year": {
6
+ cs: "Předchozí rok",
7
+ en: "Previous year",
8
+ sk: "Predchádzajúci rok",
9
+ de: "Vorheriges Jahr",
10
+ },
11
+ "next-year": {
12
+ cs: "Nadcházející rok",
13
+ en: "Next year",
14
+ sk: "Nasledujúci rok",
15
+ de: "Nächstes Jahr",
16
+ },
17
+ "select-year": {
18
+ cs: "Vybrat rok",
19
+ en: "Select year",
20
+ sk: "Vybrať rok",
21
+ de: "Jahr auswählen",
22
+ },
23
+ "select-month": {
24
+ cs: "Vybrat měsíc",
25
+ en: "Select month",
26
+ sk: "Vybrať mesiac",
27
+ de: "Monat auswählen",
28
+ },
29
+ "next-month": {
30
+ cs: "Nadcházející měsíc",
31
+ en: "Next month",
32
+ sk: "Nasledujúci mesiac",
33
+ de: "Nächster Monat",
34
+ },
35
+ "prev-month": {
36
+ cs: "Předchozí měsíc",
37
+ en: "Previous month",
38
+ sk: "Predchádzajúci mesiac",
39
+ de: "Vorheriger Monat",
40
+ },
41
+ "next-decade": {
42
+ cs: "Vpřed",
43
+ en: "Forward",
44
+ sk: "Vpred",
45
+ de: "Vorwärts",
46
+ },
47
+ "prev-decade": {
48
+ cs: "Zpět",
49
+ en: "Back",
50
+ sk: "Späť",
51
+ de: "Zurück",
52
+ },
53
+ },
54
+ };
@@ -29,6 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.DatetimePicker = exports.OUTPUT_DATETIME_FORMAT = void 0;
31
31
  exports.getStrictParsedDatetime = getStrictParsedDatetime;
32
+ const translations_1 = require("@uxf/core-react/translations");
32
33
  const classes_1 = require("@uxf/core/constants/classes");
33
34
  const cx_1 = require("@uxf/core/utils/cx");
34
35
  const dayjs_1 = __importStar(require("dayjs"));
@@ -60,6 +61,7 @@ function getSelectedTime(value) {
60
61
  return null;
61
62
  }
62
63
  const DatetimePicker = (props) => {
64
+ const t = (0, translations_1.useUxfTranslation)();
63
65
  const onChange = props.onChange;
64
66
  const [selectedTab, setSelectedTab] = (0, react_1.useState)("date");
65
67
  const [tmpDate, setTmpDate] = (0, react_1.useState)(props.value ? (0, dayjs_1.default)(props.value) : null);
@@ -84,8 +86,8 @@ const DatetimePicker = (props) => {
84
86
  const selectedTime = getSelectedTime(props.value);
85
87
  return (react_1.default.createElement("div", { className: "uxf-tabs uxf-tabs--variant-segmented uxf-tabs--horizontal" },
86
88
  react_1.default.createElement("div", { className: "uxf-tabs__button-list uxf-tabs__button-list--variant-segmented uxf-tabs__button-list--horizontal uxf-datetime-picker__tabs" },
87
- react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-tabs__button uxf-tabs__button--variant-segmented uxf-tabs__button--horizontal uxf-datetime-picker__tab", selectedTab === "date" && classes_1.CLASSES.IS_ACTIVE), onClick: () => setSelectedTab("date") }, "Datum"),
88
- react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-tabs__button uxf-tabs__button--variant-segmented uxf-tabs__button--horizontal uxf-datetime-picker__tab", selectedTab === "time" && classes_1.CLASSES.IS_ACTIVE), onClick: () => setSelectedTab("time") }, "\u010Cas")),
89
+ react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-tabs__button uxf-tabs__button--variant-segmented uxf-tabs__button--horizontal uxf-datetime-picker__tab", selectedTab === "date" && classes_1.CLASSES.IS_ACTIVE), onClick: () => setSelectedTab("date") }, t("uxf-ui-datetime-picker:dateTab")),
90
+ react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-tabs__button uxf-tabs__button--variant-segmented uxf-tabs__button--horizontal uxf-datetime-picker__tab", selectedTab === "time" && classes_1.CLASSES.IS_ACTIVE), onClick: () => setSelectedTab("time") }, t("uxf-ui-datetime-picker:timeTab"))),
89
91
  react_1.default.createElement("div", { className: "uxf-tabs__panels" },
90
92
  selectedTab === "date" && (react_1.default.createElement("div", { className: "uxf-tabs__panel" },
91
93
  react_1.default.createElement(date_picker_1.DatePicker, { bottomContent: props.bottomContent, maxDate: props.maxDate, minDate: props.minDate, onChange: onDatePickerChange, onMonthChange: props.onMonthChange, preventScroll: true, selectedDate: selectedDate, unavailableDates: props.unavailableDates }))),
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ readonly "uxf-ui-datetime-picker": {
3
+ readonly dateTab: {
4
+ readonly cs: "Datum";
5
+ readonly en: "Date";
6
+ readonly sk: "Dátum";
7
+ readonly de: "Datum";
8
+ };
9
+ readonly timeTab: {
10
+ readonly cs: "Čas";
11
+ readonly en: "Time";
12
+ readonly sk: "Čas";
13
+ readonly de: "Zeit";
14
+ };
15
+ };
16
+ };
17
+ export default _default;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "uxf-ui-datetime-picker": {
5
+ dateTab: {
6
+ cs: "Datum",
7
+ en: "Date",
8
+ sk: "Dátum",
9
+ de: "Datum",
10
+ },
11
+ timeTab: {
12
+ cs: "Čas",
13
+ en: "Time",
14
+ sk: "Čas",
15
+ de: "Zeit",
16
+ },
17
+ },
18
+ };