@helpwave/hightide 0.1.8 → 0.1.10
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 +125 -13
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +125 -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 +129 -37
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +129 -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 +163 -23
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +163 -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 +158 -10
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +158 -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 +153 -13
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +153 -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 +157 -11
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +157 -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 +153 -15
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +153 -15
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +153 -13
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +153 -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 +161 -19
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +161 -19
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js +56 -8
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +56 -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 +155 -15
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +155 -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 +153 -13
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +153 -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 +164 -26
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +164 -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 +168 -46
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +168 -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 +164 -26
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +164 -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 +170 -24
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +170 -24
- 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 +178 -30
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +178 -30
- 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 +155 -25
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +155 -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 +153 -13
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +153 -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 +169 -43
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +169 -43
- 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 +155 -15
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +155 -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 +153 -13
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +153 -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 +159 -29
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +159 -29
- 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 +157 -17
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +157 -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 +223 -51
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +223 -51
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Menu.js +1 -1
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +1 -1
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +5 -9
- package/dist/components/user-action/MultiSelect.d.ts +5 -9
- package/dist/components/user-action/MultiSelect.js +165 -23
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +165 -23
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +158 -12
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +158 -12
- 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 +345 -303
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +341 -303
- 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 +38 -6
- package/dist/localization/useTranslation.d.ts +38 -6
- package/dist/localization/useTranslation.js +56 -6
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +55 -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,63 @@ var LanguageContext = createContext({
|
|
|
26
26
|
var useLanguage = () => useContext(LanguageContext);
|
|
27
27
|
|
|
28
28
|
// src/localization/useTranslation.ts
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
var TranslationPluralCount = {
|
|
30
|
+
zero: 0,
|
|
31
|
+
one: 1,
|
|
32
|
+
two: 2,
|
|
33
|
+
few: 3,
|
|
34
|
+
many: 11,
|
|
35
|
+
other: -1
|
|
36
|
+
};
|
|
37
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
38
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
31
39
|
const { language: inferredLanguage } = useLanguage();
|
|
32
40
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
33
|
-
|
|
34
|
-
if (overwrite
|
|
35
|
-
|
|
41
|
+
const usedTranslations = [...translations];
|
|
42
|
+
if (overwrite) {
|
|
43
|
+
usedTranslations.push(overwrite);
|
|
36
44
|
}
|
|
37
|
-
return
|
|
45
|
+
return (key, options) => {
|
|
46
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
47
|
+
try {
|
|
48
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
49
|
+
const translation = translations[i];
|
|
50
|
+
const localizedTranslation = translation[usedLanguage];
|
|
51
|
+
if (!localizedTranslation) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const value = localizedTranslation[key];
|
|
55
|
+
if (!value) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
let forProcessing;
|
|
59
|
+
if (typeof value !== "string") {
|
|
60
|
+
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
61
|
+
forProcessing = value.zero;
|
|
62
|
+
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
63
|
+
forProcessing = value.one;
|
|
64
|
+
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
65
|
+
forProcessing = value.two;
|
|
66
|
+
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
67
|
+
forProcessing = value.few;
|
|
68
|
+
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
69
|
+
forProcessing = value.many;
|
|
70
|
+
} else {
|
|
71
|
+
forProcessing = value.other;
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
forProcessing = value;
|
|
75
|
+
}
|
|
76
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
77
|
+
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
78
|
+
});
|
|
79
|
+
return forProcessing;
|
|
80
|
+
}
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.error(e);
|
|
83
|
+
}
|
|
84
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
85
|
+
};
|
|
38
86
|
};
|
|
39
87
|
|
|
40
88
|
// src/components/user-action/Select.tsx
|
|
@@ -371,15 +419,113 @@ var useSearch = ({
|
|
|
371
419
|
};
|
|
372
420
|
};
|
|
373
421
|
|
|
422
|
+
// src/localization/defaults/form.ts
|
|
423
|
+
var formTranslation = {
|
|
424
|
+
en: {
|
|
425
|
+
all: "All",
|
|
426
|
+
back: "Back",
|
|
427
|
+
cancel: "Cancel",
|
|
428
|
+
change: "Change",
|
|
429
|
+
clear: "Clear",
|
|
430
|
+
close: "Close",
|
|
431
|
+
confirm: "Confirm",
|
|
432
|
+
decline: "Decline",
|
|
433
|
+
delete: "Delete",
|
|
434
|
+
discard: "Discard",
|
|
435
|
+
discardChanges: "Discard Changes",
|
|
436
|
+
done: "Done",
|
|
437
|
+
edit: "Edit",
|
|
438
|
+
enterText: "Enter text here",
|
|
439
|
+
error: "Error",
|
|
440
|
+
exit: "Exit",
|
|
441
|
+
fieldRequiredError: "This field is required.",
|
|
442
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
443
|
+
less: "Less",
|
|
444
|
+
loading: "Loading",
|
|
445
|
+
maxLengthError: "Maximum length exceeded.",
|
|
446
|
+
minLengthError: "Minimum length not met.",
|
|
447
|
+
more: "More",
|
|
448
|
+
next: "Next",
|
|
449
|
+
no: "No",
|
|
450
|
+
none: "None",
|
|
451
|
+
of: "of",
|
|
452
|
+
optional: "Optional",
|
|
453
|
+
pleaseWait: "Please wait...",
|
|
454
|
+
previous: "Previous",
|
|
455
|
+
remove: "Remove",
|
|
456
|
+
required: "Required",
|
|
457
|
+
reset: "Reset",
|
|
458
|
+
save: "Save",
|
|
459
|
+
search: "Search",
|
|
460
|
+
select: "Select",
|
|
461
|
+
selectOption: "Select an option",
|
|
462
|
+
show: "Show",
|
|
463
|
+
showMore: "Show more",
|
|
464
|
+
showLess: "Show less",
|
|
465
|
+
submit: "Submit",
|
|
466
|
+
success: "Success",
|
|
467
|
+
update: "Update",
|
|
468
|
+
unsavedChanges: "Unsaved Changes",
|
|
469
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
470
|
+
yes: "Yes"
|
|
471
|
+
},
|
|
472
|
+
de: {
|
|
473
|
+
all: "Alle",
|
|
474
|
+
back: "Zur\xFCck",
|
|
475
|
+
cancel: "Abbrechen",
|
|
476
|
+
change: "\xC4ndern",
|
|
477
|
+
clear: "L\xF6schen",
|
|
478
|
+
close: "Schlie\xDFen",
|
|
479
|
+
confirm: "Best\xE4tigen",
|
|
480
|
+
decline: "Ablehnen",
|
|
481
|
+
delete: "L\xF6schen",
|
|
482
|
+
discard: "Verwerfen",
|
|
483
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
484
|
+
done: "Fertig",
|
|
485
|
+
edit: "Bearbeiten",
|
|
486
|
+
enterText: "Text hier eingeben",
|
|
487
|
+
error: "Fehler",
|
|
488
|
+
exit: "Beenden",
|
|
489
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
490
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
491
|
+
less: "Weniger",
|
|
492
|
+
loading: "L\xE4dt",
|
|
493
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
494
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
495
|
+
more: "Mehr",
|
|
496
|
+
next: "Weiter",
|
|
497
|
+
no: "Nein",
|
|
498
|
+
none: "Nichts",
|
|
499
|
+
of: "von",
|
|
500
|
+
optional: "Optional",
|
|
501
|
+
pleaseWait: "Bitte warten...",
|
|
502
|
+
previous: "Vorherige",
|
|
503
|
+
remove: "Entfernen",
|
|
504
|
+
required: "Erforderlich",
|
|
505
|
+
reset: "Zur\xFCcksetzen",
|
|
506
|
+
save: "Speichern",
|
|
507
|
+
search: "Suche",
|
|
508
|
+
select: "Select",
|
|
509
|
+
selectOption: "Option ausw\xE4hlen",
|
|
510
|
+
show: "Anzeigen",
|
|
511
|
+
showMore: "Mehr anzeigen",
|
|
512
|
+
showLess: "Weniger anzeigen",
|
|
513
|
+
submit: "Abschicken",
|
|
514
|
+
success: "Erfolg",
|
|
515
|
+
update: "Update",
|
|
516
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
517
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
518
|
+
yes: "Ja"
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
|
|
374
522
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
375
523
|
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
376
524
|
var defaultSearchableListTranslation = {
|
|
377
525
|
en: {
|
|
378
|
-
search: "Search",
|
|
379
526
|
nothingFound: "Nothing found"
|
|
380
527
|
},
|
|
381
528
|
de: {
|
|
382
|
-
search: "Suche",
|
|
383
529
|
nothingFound: "Nichts gefunden"
|
|
384
530
|
}
|
|
385
531
|
};
|
|
@@ -394,7 +540,7 @@ var SearchableList = ({
|
|
|
394
540
|
className,
|
|
395
541
|
resultListClassName
|
|
396
542
|
}) => {
|
|
397
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
543
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
398
544
|
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
399
545
|
return /* @__PURE__ */ jsxs3("div", { className: clsx4("col gap-y-2", className), children: [
|
|
400
546
|
list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs3("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
@@ -403,14 +549,14 @@ var SearchableList = ({
|
|
|
403
549
|
{
|
|
404
550
|
value: search,
|
|
405
551
|
onChangeText: setSearch,
|
|
406
|
-
placeholder: translation
|
|
552
|
+
placeholder: translation("search"),
|
|
407
553
|
autoFocus,
|
|
408
554
|
className: "w-full"
|
|
409
555
|
}
|
|
410
556
|
),
|
|
411
557
|
/* @__PURE__ */ jsx5(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx5(Search, { className: "w-full h-full" }) })
|
|
412
558
|
] }),
|
|
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
|
|
559
|
+
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
560
|
] });
|
|
415
561
|
};
|
|
416
562
|
|
|
@@ -526,7 +672,7 @@ var Select = ({
|
|
|
526
672
|
"div",
|
|
527
673
|
{
|
|
528
674
|
ref: menuRef,
|
|
529
|
-
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-
|
|
675
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
|
|
530
676
|
children: /* @__PURE__ */ jsx7(
|
|
531
677
|
SearchableList,
|
|
532
678
|
{
|
|
@@ -702,10 +848,10 @@ var Overlay = ({
|
|
|
702
848
|
var overlayStack = [];
|
|
703
849
|
var defaultModalHeaderTranslation = {
|
|
704
850
|
en: {
|
|
705
|
-
|
|
851
|
+
...formTranslation.en
|
|
706
852
|
},
|
|
707
853
|
de: {
|
|
708
|
-
|
|
854
|
+
...formTranslation.de
|
|
709
855
|
}
|
|
710
856
|
};
|
|
711
857
|
var OverlayHeader = ({
|
|
@@ -716,7 +862,7 @@ var OverlayHeader = ({
|
|
|
716
862
|
description,
|
|
717
863
|
descriptionText = ""
|
|
718
864
|
}) => {
|
|
719
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
865
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
720
866
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
721
867
|
const titleRow = /* @__PURE__ */ jsxs7("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
722
868
|
title ?? /* @__PURE__ */ jsx9(
|
|
@@ -728,7 +874,7 @@ var OverlayHeader = ({
|
|
|
728
874
|
children: titleText
|
|
729
875
|
}
|
|
730
876
|
),
|
|
731
|
-
!!onClose && /* @__PURE__ */ jsx9(Tooltip, { tooltip: translation
|
|
877
|
+
!!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
878
|
] });
|
|
733
879
|
return /* @__PURE__ */ jsxs7("div", { className: "col", children: [
|
|
734
880
|
hasTitleRow && titleRow,
|
|
@@ -815,11 +961,19 @@ var themes = ["light", "dark"];
|
|
|
815
961
|
var defaultThemeTypeTranslation = {
|
|
816
962
|
en: {
|
|
817
963
|
dark: "Dark",
|
|
818
|
-
light: "Light"
|
|
964
|
+
light: "Light",
|
|
965
|
+
theme: {
|
|
966
|
+
one: "Theme",
|
|
967
|
+
other: "Themes"
|
|
968
|
+
}
|
|
819
969
|
},
|
|
820
970
|
de: {
|
|
821
971
|
dark: "Dunkel",
|
|
822
|
-
light: "Hell"
|
|
972
|
+
light: "Hell",
|
|
973
|
+
theme: {
|
|
974
|
+
one: "Farbschema",
|
|
975
|
+
other: "Farbschemas"
|
|
976
|
+
}
|
|
823
977
|
}
|
|
824
978
|
};
|
|
825
979
|
var ThemeUtil = {
|
|
@@ -836,16 +990,10 @@ var useTheme = () => useContext2(ThemeContext);
|
|
|
836
990
|
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
837
991
|
var defaultConfirmDialogTranslation = {
|
|
838
992
|
en: {
|
|
839
|
-
|
|
840
|
-
message: "Choose your preferred theme",
|
|
841
|
-
done: "Done",
|
|
842
|
-
...ThemeUtil.translation.en
|
|
993
|
+
chooseTheme: "Choose your preferred theme"
|
|
843
994
|
},
|
|
844
995
|
de: {
|
|
845
|
-
|
|
846
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
847
|
-
done: "Fertig",
|
|
848
|
-
...ThemeUtil.translation.en
|
|
996
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
849
997
|
}
|
|
850
998
|
};
|
|
851
999
|
var ThemeModal = ({
|
|
@@ -855,14 +1003,14 @@ var ThemeModal = ({
|
|
|
855
1003
|
...modalProps
|
|
856
1004
|
}) => {
|
|
857
1005
|
const { theme, setTheme } = useTheme();
|
|
858
|
-
const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
|
|
1006
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
859
1007
|
return /* @__PURE__ */ jsx11(
|
|
860
1008
|
Modal,
|
|
861
1009
|
{
|
|
862
1010
|
headerProps: {
|
|
863
1011
|
...headerProps,
|
|
864
|
-
titleText: headerProps?.titleText ?? translation
|
|
865
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
1012
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
1013
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
866
1014
|
},
|
|
867
1015
|
onClose,
|
|
868
1016
|
...modalProps,
|
|
@@ -876,7 +1024,7 @@ var ThemeModal = ({
|
|
|
876
1024
|
onChange: (theme2) => setTheme(theme2)
|
|
877
1025
|
}
|
|
878
1026
|
),
|
|
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
|
|
1027
|
+
/* @__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
1028
|
] })
|
|
881
1029
|
}
|
|
882
1030
|
);
|