@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,
|
|
@@ -815,11 +953,19 @@ var themes = ["light", "dark"];
|
|
|
815
953
|
var defaultThemeTypeTranslation = {
|
|
816
954
|
en: {
|
|
817
955
|
dark: "Dark",
|
|
818
|
-
light: "Light"
|
|
956
|
+
light: "Light",
|
|
957
|
+
theme: {
|
|
958
|
+
one: "Theme",
|
|
959
|
+
other: "Themes"
|
|
960
|
+
}
|
|
819
961
|
},
|
|
820
962
|
de: {
|
|
821
963
|
dark: "Dunkel",
|
|
822
|
-
light: "Hell"
|
|
964
|
+
light: "Hell",
|
|
965
|
+
theme: {
|
|
966
|
+
one: "Farbschema",
|
|
967
|
+
other: "Farbschemas"
|
|
968
|
+
}
|
|
823
969
|
}
|
|
824
970
|
};
|
|
825
971
|
var ThemeUtil = {
|
|
@@ -836,16 +982,10 @@ var useTheme = () => useContext2(ThemeContext);
|
|
|
836
982
|
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
837
983
|
var defaultConfirmDialogTranslation = {
|
|
838
984
|
en: {
|
|
839
|
-
|
|
840
|
-
message: "Choose your preferred theme",
|
|
841
|
-
done: "Done",
|
|
842
|
-
...ThemeUtil.translation.en
|
|
985
|
+
chooseTheme: "Choose your preferred theme"
|
|
843
986
|
},
|
|
844
987
|
de: {
|
|
845
|
-
|
|
846
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
847
|
-
done: "Fertig",
|
|
848
|
-
...ThemeUtil.translation.en
|
|
988
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
849
989
|
}
|
|
850
990
|
};
|
|
851
991
|
var ThemeModal = ({
|
|
@@ -855,14 +995,14 @@ var ThemeModal = ({
|
|
|
855
995
|
...modalProps
|
|
856
996
|
}) => {
|
|
857
997
|
const { theme, setTheme } = useTheme();
|
|
858
|
-
const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
|
|
998
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
859
999
|
return /* @__PURE__ */ jsx11(
|
|
860
1000
|
Modal,
|
|
861
1001
|
{
|
|
862
1002
|
headerProps: {
|
|
863
1003
|
...headerProps,
|
|
864
|
-
titleText: headerProps?.titleText ?? translation
|
|
865
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
1004
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
1005
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
866
1006
|
},
|
|
867
1007
|
onClose,
|
|
868
1008
|
...modalProps,
|
|
@@ -876,7 +1016,7 @@ var ThemeModal = ({
|
|
|
876
1016
|
onChange: (theme2) => setTheme(theme2)
|
|
877
1017
|
}
|
|
878
1018
|
),
|
|
879
|
-
/* @__PURE__ */ jsx11("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx11(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation
|
|
1019
|
+
/* @__PURE__ */ jsx11("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx11(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
880
1020
|
] })
|
|
881
1021
|
}
|
|
882
1022
|
);
|