@helpwave/hightide 0.1.8 → 0.1.9
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/dist/components/date/DatePicker.d.mts +3 -4
- package/dist/components/date/DatePicker.d.ts +3 -4
- package/dist/components/date/DatePicker.js +117 -13
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +117 -13
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.d.mts +5 -19
- package/dist/components/date/TimeDisplay.d.ts +5 -19
- package/dist/components/date/TimeDisplay.js +121 -37
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +121 -37
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.d.mts +2 -5
- package/dist/components/dialogs/ConfirmDialog.d.ts +2 -5
- package/dist/components/dialogs/ConfirmDialog.js +155 -23
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +155 -23
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.d.mts +2 -3
- package/dist/components/layout-and-navigation/Overlay.d.ts +2 -3
- package/dist/components/layout-and-navigation/Overlay.js +150 -10
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +150 -10
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.d.mts +2 -3
- package/dist/components/layout-and-navigation/Pagination.d.ts +2 -3
- package/dist/components/layout-and-navigation/Pagination.js +145 -13
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +145 -13
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.d.mts +3 -2
- package/dist/components/layout-and-navigation/SearchableList.d.ts +3 -2
- package/dist/components/layout-and-navigation/SearchableList.js +149 -11
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +149 -11
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.d.mts +2 -5
- package/dist/components/layout-and-navigation/StepperBar.d.ts +2 -5
- package/dist/components/layout-and-navigation/StepperBar.js +145 -15
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +145 -15
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +145 -13
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +145 -13
- package/dist/components/layout-and-navigation/Table.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.d.mts +3 -4
- package/dist/components/layout-and-navigation/TextImage.d.ts +3 -4
- package/dist/components/layout-and-navigation/TextImage.js +153 -19
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +153 -19
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js +48 -8
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +48 -8
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.js +147 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +147 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.d.mts +2 -3
- package/dist/components/loading-states/LoadingAnimation.d.ts +2 -3
- package/dist/components/loading-states/LoadingAnimation.js +145 -13
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +145 -13
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.d.mts +2 -5
- package/dist/components/modals/ConfirmModal.d.ts +2 -5
- package/dist/components/modals/ConfirmModal.js +156 -26
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +156 -26
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.d.mts +2 -7
- package/dist/components/modals/DiscardChangesModal.d.ts +2 -7
- package/dist/components/modals/DiscardChangesModal.js +160 -46
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +160 -46
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.d.mts +1 -0
- package/dist/components/modals/InputModal.d.ts +1 -0
- package/dist/components/modals/InputModal.js +156 -26
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +156 -26
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.d.mts +3 -2
- package/dist/components/modals/LanguageModal.d.ts +3 -2
- package/dist/components/modals/LanguageModal.js +161 -23
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +161 -23
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.d.mts +5 -5
- package/dist/components/modals/ThemeModal.d.ts +5 -5
- package/dist/components/modals/ThemeModal.js +169 -29
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +169 -29
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.d.mts +3 -5
- package/dist/components/properties/CheckboxProperty.d.ts +3 -5
- package/dist/components/properties/CheckboxProperty.js +147 -25
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +147 -25
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.d.mts +1 -0
- package/dist/components/properties/DateProperty.d.ts +1 -0
- package/dist/components/properties/DateProperty.js +145 -13
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +145 -13
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +4 -5
- package/dist/components/properties/MultiSelectProperty.d.ts +4 -5
- package/dist/components/properties/MultiSelectProperty.js +160 -42
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +160 -42
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.d.mts +1 -0
- package/dist/components/properties/NumberProperty.d.ts +1 -0
- package/dist/components/properties/NumberProperty.js +147 -15
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +147 -15
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.d.mts +2 -3
- package/dist/components/properties/PropertyBase.d.ts +2 -3
- package/dist/components/properties/PropertyBase.js +145 -13
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +145 -13
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +2 -3
- package/dist/components/properties/SelectProperty.d.ts +2 -3
- package/dist/components/properties/SelectProperty.js +150 -28
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +150 -28
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.d.mts +2 -1
- package/dist/components/properties/TextProperty.d.ts +2 -1
- package/dist/components/properties/TextProperty.js +149 -17
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +149 -17
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.d.mts +4 -20
- package/dist/components/user-action/DateAndTimePicker.d.ts +4 -20
- package/dist/components/user-action/DateAndTimePicker.js +215 -51
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +215 -51
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +4 -8
- package/dist/components/user-action/MultiSelect.d.ts +4 -8
- package/dist/components/user-action/MultiSelect.js +156 -22
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +156 -22
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +149 -11
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +149 -11
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +13 -4
- package/dist/css/uncompiled/globals.css +4 -4
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +332 -300
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +329 -300
- package/dist/index.mjs.map +1 -1
- package/dist/localization/defaults/form.d.mts +54 -0
- package/dist/localization/defaults/form.d.ts +54 -0
- package/dist/localization/defaults/form.js +127 -0
- package/dist/localization/defaults/form.js.map +1 -0
- package/dist/localization/defaults/form.mjs +103 -0
- package/dist/localization/defaults/form.mjs.map +1 -0
- package/dist/localization/defaults/time.d.mts +39 -0
- package/dist/localization/defaults/time.d.ts +39 -0
- package/dist/localization/defaults/time.js +101 -0
- package/dist/localization/defaults/time.js.map +1 -0
- package/dist/localization/defaults/time.mjs +76 -0
- package/dist/localization/defaults/time.mjs.map +1 -0
- package/dist/localization/useTranslation.d.mts +30 -6
- package/dist/localization/useTranslation.d.ts +30 -6
- package/dist/localization/useTranslation.js +46 -6
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +46 -6
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.d.mts +4 -2
- package/dist/theming/useTheme.d.ts +4 -2
- package/dist/theming/useTheme.js +10 -2
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +10 -2
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -26,15 +26,55 @@ var LanguageContext = createContext({
|
|
|
26
26
|
var useLanguage = () => useContext(LanguageContext);
|
|
27
27
|
|
|
28
28
|
// src/localization/useTranslation.ts
|
|
29
|
-
var useTranslation = (
|
|
30
|
-
const { language: languageProp, translation: overwrite } =
|
|
29
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
30
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
31
31
|
const { language: inferredLanguage } = useLanguage();
|
|
32
32
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
33
|
-
|
|
34
|
-
if (overwrite
|
|
35
|
-
|
|
33
|
+
const usedTranslations = [...translations];
|
|
34
|
+
if (overwrite) {
|
|
35
|
+
usedTranslations.push(overwrite);
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return (key, options) => {
|
|
38
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
39
|
+
try {
|
|
40
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
41
|
+
const translation = translations[i];
|
|
42
|
+
const localizedTranslation = translation[usedLanguage];
|
|
43
|
+
if (!localizedTranslation) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const value = localizedTranslation[key];
|
|
47
|
+
if (!value) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
let forProcessing;
|
|
51
|
+
if (typeof value !== "string") {
|
|
52
|
+
if (count <= 0 && value?.zero) {
|
|
53
|
+
forProcessing = value.zero;
|
|
54
|
+
} else if (count === 1 && value?.one) {
|
|
55
|
+
forProcessing = value.one;
|
|
56
|
+
} else if (count === 2 && value?.two) {
|
|
57
|
+
forProcessing = value.two;
|
|
58
|
+
} else if (count <= 10 && value?.few) {
|
|
59
|
+
forProcessing = value.few;
|
|
60
|
+
} else if (count > 10 && value?.many) {
|
|
61
|
+
forProcessing = value.many;
|
|
62
|
+
} else {
|
|
63
|
+
forProcessing = value.other;
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
forProcessing = value;
|
|
67
|
+
}
|
|
68
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
69
|
+
return replacements[placeholder] ?? `{{${placeholder}}}`;
|
|
70
|
+
});
|
|
71
|
+
return forProcessing;
|
|
72
|
+
}
|
|
73
|
+
} catch (e) {
|
|
74
|
+
console.error(e);
|
|
75
|
+
}
|
|
76
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
77
|
+
};
|
|
38
78
|
};
|
|
39
79
|
|
|
40
80
|
// src/components/user-action/Select.tsx
|
|
@@ -371,15 +411,113 @@ var useSearch = ({
|
|
|
371
411
|
};
|
|
372
412
|
};
|
|
373
413
|
|
|
414
|
+
// src/localization/defaults/form.ts
|
|
415
|
+
var formTranslation = {
|
|
416
|
+
en: {
|
|
417
|
+
all: "All",
|
|
418
|
+
back: "Back",
|
|
419
|
+
cancel: "Cancel",
|
|
420
|
+
change: "Change",
|
|
421
|
+
clear: "Clear",
|
|
422
|
+
close: "Close",
|
|
423
|
+
confirm: "Confirm",
|
|
424
|
+
decline: "Decline",
|
|
425
|
+
delete: "Delete",
|
|
426
|
+
discard: "Discard",
|
|
427
|
+
discardChanges: "Discard Changes",
|
|
428
|
+
done: "Done",
|
|
429
|
+
edit: "Edit",
|
|
430
|
+
enterText: "Enter text here",
|
|
431
|
+
error: "Error",
|
|
432
|
+
exit: "Exit",
|
|
433
|
+
fieldRequiredError: "This field is required.",
|
|
434
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
435
|
+
less: "Less",
|
|
436
|
+
loading: "Loading",
|
|
437
|
+
maxLengthError: "Maximum length exceeded.",
|
|
438
|
+
minLengthError: "Minimum length not met.",
|
|
439
|
+
more: "More",
|
|
440
|
+
next: "Next",
|
|
441
|
+
no: "No",
|
|
442
|
+
none: "None",
|
|
443
|
+
of: "of",
|
|
444
|
+
optional: "Optional",
|
|
445
|
+
pleaseWait: "Please wait...",
|
|
446
|
+
previous: "Previous",
|
|
447
|
+
remove: "Remove",
|
|
448
|
+
required: "Required",
|
|
449
|
+
reset: "Reset",
|
|
450
|
+
save: "Save",
|
|
451
|
+
search: "Search",
|
|
452
|
+
select: "Select",
|
|
453
|
+
selectOption: "Select an option",
|
|
454
|
+
show: "Show",
|
|
455
|
+
showMore: "Show more",
|
|
456
|
+
showLess: "Show less",
|
|
457
|
+
submit: "Submit",
|
|
458
|
+
success: "Success",
|
|
459
|
+
update: "Update",
|
|
460
|
+
unsavedChanges: "Unsaved Changes",
|
|
461
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
462
|
+
yes: "Yes"
|
|
463
|
+
},
|
|
464
|
+
de: {
|
|
465
|
+
all: "Alle",
|
|
466
|
+
back: "Zur\xFCck",
|
|
467
|
+
cancel: "Abbrechen",
|
|
468
|
+
change: "\xC4ndern",
|
|
469
|
+
clear: "L\xF6schen",
|
|
470
|
+
close: "Schlie\xDFen",
|
|
471
|
+
confirm: "Best\xE4tigen",
|
|
472
|
+
decline: "Ablehnen",
|
|
473
|
+
delete: "L\xF6schen",
|
|
474
|
+
discard: "Verwerfen",
|
|
475
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
476
|
+
done: "Fertig",
|
|
477
|
+
edit: "Bearbeiten",
|
|
478
|
+
enterText: "Text hier eingeben",
|
|
479
|
+
error: "Fehler",
|
|
480
|
+
exit: "Beenden",
|
|
481
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
482
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
483
|
+
less: "Weniger",
|
|
484
|
+
loading: "L\xE4dt",
|
|
485
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
486
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
487
|
+
more: "Mehr",
|
|
488
|
+
next: "Weiter",
|
|
489
|
+
no: "Nein",
|
|
490
|
+
none: "Nichts",
|
|
491
|
+
of: "von",
|
|
492
|
+
optional: "Optional",
|
|
493
|
+
pleaseWait: "Bitte warten...",
|
|
494
|
+
previous: "Vorherige",
|
|
495
|
+
remove: "Entfernen",
|
|
496
|
+
required: "Erforderlich",
|
|
497
|
+
reset: "Zur\xFCcksetzen",
|
|
498
|
+
save: "Speichern",
|
|
499
|
+
search: "Suche",
|
|
500
|
+
select: "Select",
|
|
501
|
+
selectOption: "Option ausw\xE4hlen",
|
|
502
|
+
show: "Anzeigen",
|
|
503
|
+
showMore: "Mehr anzeigen",
|
|
504
|
+
showLess: "Weniger anzeigen",
|
|
505
|
+
submit: "Abschicken",
|
|
506
|
+
success: "Erfolg",
|
|
507
|
+
update: "Update",
|
|
508
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
509
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
510
|
+
yes: "Ja"
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
|
|
374
514
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
375
515
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
376
516
|
var defaultSearchableListTranslation = {
|
|
377
517
|
en: {
|
|
378
|
-
search: "Search",
|
|
379
518
|
nothingFound: "Nothing found"
|
|
380
519
|
},
|
|
381
520
|
de: {
|
|
382
|
-
search: "Suche",
|
|
383
521
|
nothingFound: "Nichts gefunden"
|
|
384
522
|
}
|
|
385
523
|
};
|
|
@@ -394,7 +532,7 @@ var SearchableList = ({
|
|
|
394
532
|
className,
|
|
395
533
|
resultListClassName
|
|
396
534
|
}) => {
|
|
397
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
535
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
398
536
|
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
399
537
|
return /* @__PURE__ */ jsxs3("div", { className: clsx4("col gap-y-2", className), children: [
|
|
400
538
|
list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs3("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
@@ -403,14 +541,14 @@ var SearchableList = ({
|
|
|
403
541
|
{
|
|
404
542
|
value: search,
|
|
405
543
|
onChangeText: setSearch,
|
|
406
|
-
placeholder: translation
|
|
544
|
+
placeholder: translation("search"),
|
|
407
545
|
autoFocus,
|
|
408
546
|
className: "w-full"
|
|
409
547
|
}
|
|
410
548
|
),
|
|
411
549
|
/* @__PURE__ */ jsx5(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx5(Search, { className: "w-full h-full" }) })
|
|
412
550
|
] }),
|
|
413
|
-
hasResult ? /* @__PURE__ */ jsx5("div", { className: clsx4("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx5("div", { className: "row text-description py-2 px-2", children: translation
|
|
551
|
+
hasResult ? /* @__PURE__ */ jsx5("div", { className: clsx4("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx5("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
|
|
414
552
|
] });
|
|
415
553
|
};
|
|
416
554
|
|
|
@@ -702,10 +840,10 @@ var Overlay = ({
|
|
|
702
840
|
var overlayStack = [];
|
|
703
841
|
var defaultModalHeaderTranslation = {
|
|
704
842
|
en: {
|
|
705
|
-
|
|
843
|
+
...formTranslation.en
|
|
706
844
|
},
|
|
707
845
|
de: {
|
|
708
|
-
|
|
846
|
+
...formTranslation.de
|
|
709
847
|
}
|
|
710
848
|
};
|
|
711
849
|
var OverlayHeader = ({
|
|
@@ -716,7 +854,7 @@ var OverlayHeader = ({
|
|
|
716
854
|
description,
|
|
717
855
|
descriptionText = ""
|
|
718
856
|
}) => {
|
|
719
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
857
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
720
858
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
721
859
|
const titleRow = /* @__PURE__ */ jsxs7("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
722
860
|
title ?? /* @__PURE__ */ jsx9(
|
|
@@ -728,7 +866,7 @@ var OverlayHeader = ({
|
|
|
728
866
|
children: titleText
|
|
729
867
|
}
|
|
730
868
|
),
|
|
731
|
-
!!onClose && /* @__PURE__ */ jsx9(Tooltip, { tooltip: translation
|
|
869
|
+
!!onClose && /* @__PURE__ */ jsx9(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ jsx9(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ jsx9(X, { className: "w-full h-full" }) }) })
|
|
732
870
|
] });
|
|
733
871
|
return /* @__PURE__ */ jsxs7("div", { className: "col", children: [
|
|
734
872
|
hasTitleRow && titleRow,
|
|
@@ -812,14 +950,14 @@ var Modal = ({
|
|
|
812
950
|
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
813
951
|
var defaultLanguageModalTranslation = {
|
|
814
952
|
en: {
|
|
815
|
-
|
|
816
|
-
|
|
953
|
+
language: "Language",
|
|
954
|
+
chooseLanguage: "Choose your language",
|
|
817
955
|
done: "Done",
|
|
818
956
|
...LanguageUtil.languagesLocalNames
|
|
819
957
|
},
|
|
820
958
|
de: {
|
|
821
|
-
|
|
822
|
-
|
|
959
|
+
language: "Sprache",
|
|
960
|
+
chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
|
|
823
961
|
done: "Fertig",
|
|
824
962
|
...LanguageUtil.languagesLocalNames
|
|
825
963
|
}
|
|
@@ -831,14 +969,14 @@ var LanguageModal = ({
|
|
|
831
969
|
...modalProps
|
|
832
970
|
}) => {
|
|
833
971
|
const { language, setLanguage } = useLanguage();
|
|
834
|
-
const translation = useTranslation(defaultLanguageModalTranslation, overwriteTranslation);
|
|
972
|
+
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
835
973
|
return /* @__PURE__ */ jsx10(
|
|
836
974
|
Modal,
|
|
837
975
|
{
|
|
838
976
|
headerProps: {
|
|
839
977
|
...headerProps,
|
|
840
|
-
titleText: headerProps?.titleText ?? translation
|
|
841
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
978
|
+
titleText: headerProps?.titleText ?? translation("language"),
|
|
979
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseLanguage")
|
|
842
980
|
},
|
|
843
981
|
onClose,
|
|
844
982
|
...modalProps,
|
|
@@ -852,7 +990,7 @@ var LanguageModal = ({
|
|
|
852
990
|
onChange: (language2) => setLanguage(language2)
|
|
853
991
|
}
|
|
854
992
|
),
|
|
855
|
-
/* @__PURE__ */ jsx10("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx10(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation
|
|
993
|
+
/* @__PURE__ */ jsx10("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx10(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
856
994
|
] })
|
|
857
995
|
}
|
|
858
996
|
);
|