@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
|
@@ -61,15 +61,63 @@ var LanguageContext = (0, import_react2.createContext)({
|
|
|
61
61
|
var useLanguage = () => (0, import_react2.useContext)(LanguageContext);
|
|
62
62
|
|
|
63
63
|
// src/localization/useTranslation.ts
|
|
64
|
-
var
|
|
65
|
-
|
|
64
|
+
var TranslationPluralCount = {
|
|
65
|
+
zero: 0,
|
|
66
|
+
one: 1,
|
|
67
|
+
two: 2,
|
|
68
|
+
few: 3,
|
|
69
|
+
many: 11,
|
|
70
|
+
other: -1
|
|
71
|
+
};
|
|
72
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
73
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
66
74
|
const { language: inferredLanguage } = useLanguage();
|
|
67
75
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
68
|
-
|
|
69
|
-
if (overwrite
|
|
70
|
-
|
|
76
|
+
const usedTranslations = [...translations];
|
|
77
|
+
if (overwrite) {
|
|
78
|
+
usedTranslations.push(overwrite);
|
|
71
79
|
}
|
|
72
|
-
return
|
|
80
|
+
return (key, options) => {
|
|
81
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
82
|
+
try {
|
|
83
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
84
|
+
const translation = translations[i];
|
|
85
|
+
const localizedTranslation = translation[usedLanguage];
|
|
86
|
+
if (!localizedTranslation) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const value = localizedTranslation[key];
|
|
90
|
+
if (!value) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
let forProcessing;
|
|
94
|
+
if (typeof value !== "string") {
|
|
95
|
+
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
96
|
+
forProcessing = value.zero;
|
|
97
|
+
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
98
|
+
forProcessing = value.one;
|
|
99
|
+
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
100
|
+
forProcessing = value.two;
|
|
101
|
+
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
102
|
+
forProcessing = value.few;
|
|
103
|
+
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
104
|
+
forProcessing = value.many;
|
|
105
|
+
} else {
|
|
106
|
+
forProcessing = value.other;
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
forProcessing = value;
|
|
110
|
+
}
|
|
111
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
112
|
+
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
113
|
+
});
|
|
114
|
+
return forProcessing;
|
|
115
|
+
}
|
|
116
|
+
} catch (e) {
|
|
117
|
+
console.error(e);
|
|
118
|
+
}
|
|
119
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
120
|
+
};
|
|
73
121
|
};
|
|
74
122
|
|
|
75
123
|
// src/components/user-action/Select.tsx
|
|
@@ -406,15 +454,113 @@ var useSearch = ({
|
|
|
406
454
|
};
|
|
407
455
|
};
|
|
408
456
|
|
|
457
|
+
// src/localization/defaults/form.ts
|
|
458
|
+
var formTranslation = {
|
|
459
|
+
en: {
|
|
460
|
+
all: "All",
|
|
461
|
+
back: "Back",
|
|
462
|
+
cancel: "Cancel",
|
|
463
|
+
change: "Change",
|
|
464
|
+
clear: "Clear",
|
|
465
|
+
close: "Close",
|
|
466
|
+
confirm: "Confirm",
|
|
467
|
+
decline: "Decline",
|
|
468
|
+
delete: "Delete",
|
|
469
|
+
discard: "Discard",
|
|
470
|
+
discardChanges: "Discard Changes",
|
|
471
|
+
done: "Done",
|
|
472
|
+
edit: "Edit",
|
|
473
|
+
enterText: "Enter text here",
|
|
474
|
+
error: "Error",
|
|
475
|
+
exit: "Exit",
|
|
476
|
+
fieldRequiredError: "This field is required.",
|
|
477
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
478
|
+
less: "Less",
|
|
479
|
+
loading: "Loading",
|
|
480
|
+
maxLengthError: "Maximum length exceeded.",
|
|
481
|
+
minLengthError: "Minimum length not met.",
|
|
482
|
+
more: "More",
|
|
483
|
+
next: "Next",
|
|
484
|
+
no: "No",
|
|
485
|
+
none: "None",
|
|
486
|
+
of: "of",
|
|
487
|
+
optional: "Optional",
|
|
488
|
+
pleaseWait: "Please wait...",
|
|
489
|
+
previous: "Previous",
|
|
490
|
+
remove: "Remove",
|
|
491
|
+
required: "Required",
|
|
492
|
+
reset: "Reset",
|
|
493
|
+
save: "Save",
|
|
494
|
+
search: "Search",
|
|
495
|
+
select: "Select",
|
|
496
|
+
selectOption: "Select an option",
|
|
497
|
+
show: "Show",
|
|
498
|
+
showMore: "Show more",
|
|
499
|
+
showLess: "Show less",
|
|
500
|
+
submit: "Submit",
|
|
501
|
+
success: "Success",
|
|
502
|
+
update: "Update",
|
|
503
|
+
unsavedChanges: "Unsaved Changes",
|
|
504
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
505
|
+
yes: "Yes"
|
|
506
|
+
},
|
|
507
|
+
de: {
|
|
508
|
+
all: "Alle",
|
|
509
|
+
back: "Zur\xFCck",
|
|
510
|
+
cancel: "Abbrechen",
|
|
511
|
+
change: "\xC4ndern",
|
|
512
|
+
clear: "L\xF6schen",
|
|
513
|
+
close: "Schlie\xDFen",
|
|
514
|
+
confirm: "Best\xE4tigen",
|
|
515
|
+
decline: "Ablehnen",
|
|
516
|
+
delete: "L\xF6schen",
|
|
517
|
+
discard: "Verwerfen",
|
|
518
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
519
|
+
done: "Fertig",
|
|
520
|
+
edit: "Bearbeiten",
|
|
521
|
+
enterText: "Text hier eingeben",
|
|
522
|
+
error: "Fehler",
|
|
523
|
+
exit: "Beenden",
|
|
524
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
525
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
526
|
+
less: "Weniger",
|
|
527
|
+
loading: "L\xE4dt",
|
|
528
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
529
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
530
|
+
more: "Mehr",
|
|
531
|
+
next: "Weiter",
|
|
532
|
+
no: "Nein",
|
|
533
|
+
none: "Nichts",
|
|
534
|
+
of: "von",
|
|
535
|
+
optional: "Optional",
|
|
536
|
+
pleaseWait: "Bitte warten...",
|
|
537
|
+
previous: "Vorherige",
|
|
538
|
+
remove: "Entfernen",
|
|
539
|
+
required: "Erforderlich",
|
|
540
|
+
reset: "Zur\xFCcksetzen",
|
|
541
|
+
save: "Speichern",
|
|
542
|
+
search: "Suche",
|
|
543
|
+
select: "Select",
|
|
544
|
+
selectOption: "Option ausw\xE4hlen",
|
|
545
|
+
show: "Anzeigen",
|
|
546
|
+
showMore: "Mehr anzeigen",
|
|
547
|
+
showLess: "Weniger anzeigen",
|
|
548
|
+
submit: "Abschicken",
|
|
549
|
+
success: "Erfolg",
|
|
550
|
+
update: "Update",
|
|
551
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
552
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
553
|
+
yes: "Ja"
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
|
|
409
557
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
410
558
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
411
559
|
var defaultSearchableListTranslation = {
|
|
412
560
|
en: {
|
|
413
|
-
search: "Search",
|
|
414
561
|
nothingFound: "Nothing found"
|
|
415
562
|
},
|
|
416
563
|
de: {
|
|
417
|
-
search: "Suche",
|
|
418
564
|
nothingFound: "Nichts gefunden"
|
|
419
565
|
}
|
|
420
566
|
};
|
|
@@ -429,7 +575,7 @@ var SearchableList = ({
|
|
|
429
575
|
className,
|
|
430
576
|
resultListClassName
|
|
431
577
|
}) => {
|
|
432
|
-
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
578
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
433
579
|
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
434
580
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx4.default)("col gap-y-2", className), children: [
|
|
435
581
|
list.length > minimumItemsForSearch && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
@@ -438,14 +584,14 @@ var SearchableList = ({
|
|
|
438
584
|
{
|
|
439
585
|
value: search,
|
|
440
586
|
onChangeText: setSearch,
|
|
441
|
-
placeholder: translation
|
|
587
|
+
placeholder: translation("search"),
|
|
442
588
|
autoFocus,
|
|
443
589
|
className: "w-full"
|
|
444
590
|
}
|
|
445
591
|
),
|
|
446
592
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Search, { className: "w-full h-full" }) })
|
|
447
593
|
] }),
|
|
448
|
-
hasResult ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_clsx4.default)("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "row text-description py-2 px-2", children: translation
|
|
594
|
+
hasResult ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_clsx4.default)("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
|
|
449
595
|
] });
|
|
450
596
|
};
|
|
451
597
|
|
|
@@ -561,7 +707,7 @@ var Select = ({
|
|
|
561
707
|
"div",
|
|
562
708
|
{
|
|
563
709
|
ref: menuRef,
|
|
564
|
-
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-
|
|
710
|
+
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",
|
|
565
711
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
566
712
|
SearchableList,
|
|
567
713
|
{
|
|
@@ -737,10 +883,10 @@ var Overlay = ({
|
|
|
737
883
|
var overlayStack = [];
|
|
738
884
|
var defaultModalHeaderTranslation = {
|
|
739
885
|
en: {
|
|
740
|
-
|
|
886
|
+
...formTranslation.en
|
|
741
887
|
},
|
|
742
888
|
de: {
|
|
743
|
-
|
|
889
|
+
...formTranslation.de
|
|
744
890
|
}
|
|
745
891
|
};
|
|
746
892
|
var OverlayHeader = ({
|
|
@@ -751,7 +897,7 @@ var OverlayHeader = ({
|
|
|
751
897
|
description,
|
|
752
898
|
descriptionText = ""
|
|
753
899
|
}) => {
|
|
754
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
900
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
755
901
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
756
902
|
const titleRow = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
757
903
|
title ?? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -763,7 +909,7 @@ var OverlayHeader = ({
|
|
|
763
909
|
children: titleText
|
|
764
910
|
}
|
|
765
911
|
),
|
|
766
|
-
!!onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tooltip, { tooltip: translation
|
|
912
|
+
!!onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.X, { className: "w-full h-full" }) }) })
|
|
767
913
|
] });
|
|
768
914
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "col", children: [
|
|
769
915
|
hasTitleRow && titleRow,
|
|
@@ -850,11 +996,19 @@ var themes = ["light", "dark"];
|
|
|
850
996
|
var defaultThemeTypeTranslation = {
|
|
851
997
|
en: {
|
|
852
998
|
dark: "Dark",
|
|
853
|
-
light: "Light"
|
|
999
|
+
light: "Light",
|
|
1000
|
+
theme: {
|
|
1001
|
+
one: "Theme",
|
|
1002
|
+
other: "Themes"
|
|
1003
|
+
}
|
|
854
1004
|
},
|
|
855
1005
|
de: {
|
|
856
1006
|
dark: "Dunkel",
|
|
857
|
-
light: "Hell"
|
|
1007
|
+
light: "Hell",
|
|
1008
|
+
theme: {
|
|
1009
|
+
one: "Farbschema",
|
|
1010
|
+
other: "Farbschemas"
|
|
1011
|
+
}
|
|
858
1012
|
}
|
|
859
1013
|
};
|
|
860
1014
|
var ThemeUtil = {
|
|
@@ -871,16 +1025,10 @@ var useTheme = () => (0, import_react10.useContext)(ThemeContext);
|
|
|
871
1025
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
872
1026
|
var defaultConfirmDialogTranslation = {
|
|
873
1027
|
en: {
|
|
874
|
-
|
|
875
|
-
message: "Choose your preferred theme",
|
|
876
|
-
done: "Done",
|
|
877
|
-
...ThemeUtil.translation.en
|
|
1028
|
+
chooseTheme: "Choose your preferred theme"
|
|
878
1029
|
},
|
|
879
1030
|
de: {
|
|
880
|
-
|
|
881
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
882
|
-
done: "Fertig",
|
|
883
|
-
...ThemeUtil.translation.en
|
|
1031
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
884
1032
|
}
|
|
885
1033
|
};
|
|
886
1034
|
var ThemeModal = ({
|
|
@@ -890,14 +1038,14 @@ var ThemeModal = ({
|
|
|
890
1038
|
...modalProps
|
|
891
1039
|
}) => {
|
|
892
1040
|
const { theme, setTheme } = useTheme();
|
|
893
|
-
const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
|
|
1041
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
894
1042
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
895
1043
|
Modal,
|
|
896
1044
|
{
|
|
897
1045
|
headerProps: {
|
|
898
1046
|
...headerProps,
|
|
899
|
-
titleText: headerProps?.titleText ?? translation
|
|
900
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
1047
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
1048
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
901
1049
|
},
|
|
902
1050
|
onClose,
|
|
903
1051
|
...modalProps,
|
|
@@ -911,7 +1059,7 @@ var ThemeModal = ({
|
|
|
911
1059
|
onChange: (theme2) => setTheme(theme2)
|
|
912
1060
|
}
|
|
913
1061
|
),
|
|
914
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
915
1063
|
] })
|
|
916
1064
|
}
|
|
917
1065
|
);
|