@helpwave/hightide 0.1.7 → 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/branding/HelpwaveBadge.js +30 -8
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +30 -8
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.d.mts +3 -4
- package/dist/components/date/DatePicker.d.ts +3 -4
- package/dist/components/date/DatePicker.js +135 -33
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +135 -33
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.d.mts +1 -1
- package/dist/components/date/DayPicker.d.ts +1 -1
- package/dist/components/date/DayPicker.js +23 -11
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +23 -11
- package/dist/components/date/DayPicker.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/date/YearMonthPicker.js +106 -22
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +106 -22
- package/dist/components/date/YearMonthPicker.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 +157 -25
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +157 -25
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.js +2 -2
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.d.mts +1 -1
- package/dist/components/layout-and-navigation/Carousel.d.ts +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +86 -28
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +86 -28
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +3 -0
- package/dist/components/layout-and-navigation/Expandable.d.ts +3 -0
- package/dist/components/layout-and-navigation/Expandable.js +4 -3
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +4 -3
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +4 -3
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +4 -3
- package/dist/components/layout-and-navigation/FAQSection.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 +152 -12
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +152 -12
- 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 +10 -8
- package/dist/components/layout-and-navigation/SearchableList.d.ts +10 -8
- package/dist/components/layout-and-navigation/SearchableList.js +261 -30
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +261 -30
- 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 +149 -19
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +149 -19
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +146 -14
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.mjs +146 -14
- 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/layout-and-navigation/Tile.d.mts +10 -15
- package/dist/components/layout-and-navigation/Tile.d.ts +10 -15
- package/dist/components/layout-and-navigation/Tile.js +30 -8
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +30 -8
- package/dist/components/layout-and-navigation/Tile.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/loading-states/ProgressIndicator.js +2 -2
- package/dist/components/loading-states/ProgressIndicator.js.map +1 -1
- package/dist/components/loading-states/ProgressIndicator.mjs +2 -2
- package/dist/components/loading-states/ProgressIndicator.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 +158 -28
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +158 -28
- 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 +162 -48
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +162 -48
- 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 +158 -28
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +158 -28
- 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 +538 -166
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +537 -165
- 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 +547 -176
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +544 -173
- 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 +148 -26
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +148 -26
- 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 +146 -14
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +146 -14
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +5 -5
- package/dist/components/properties/MultiSelectProperty.d.ts +5 -5
- package/dist/components/properties/MultiSelectProperty.js +626 -456
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +622 -452
- 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 +148 -16
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +148 -16
- 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 +146 -14
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +146 -14
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +5 -6
- package/dist/components/properties/SelectProperty.d.ts +5 -6
- package/dist/components/properties/SelectProperty.js +542 -279
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +542 -279
- 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 +150 -18
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +150 -18
- 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 +233 -71
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +233 -71
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Menu.d.mts +14 -8
- package/dist/components/user-action/Menu.d.ts +14 -8
- package/dist/components/user-action/Menu.js +32 -11
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +32 -11
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +13 -23
- package/dist/components/user-action/MultiSelect.d.ts +13 -23
- package/dist/components/user-action/MultiSelect.js +632 -325
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +629 -323
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.d.mts +5 -18
- package/dist/components/user-action/Select.d.ts +5 -18
- package/dist/components/user-action/Select.js +447 -113
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +442 -107
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Tooltip.js +2 -2
- package/dist/components/user-action/Tooltip.js.map +1 -1
- package/dist/components/user-action/Tooltip.mjs +2 -2
- package/dist/components/user-action/Tooltip.mjs.map +1 -1
- package/dist/css/globals.css +224 -207
- package/dist/css/uncompiled/globals.css +138 -74
- package/dist/hooks/useSearch.d.mts +17 -0
- package/dist/hooks/useSearch.d.ts +17 -0
- package/dist/hooks/useSearch.js +66 -0
- package/dist/hooks/useSearch.js.map +1 -0
- package/dist/hooks/useSearch.mjs +42 -0
- package/dist/hooks/useSearch.mjs.map +1 -0
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +882 -758
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +836 -717
- 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/dist/util/PropsWithFunctionChildren.d.mts +14 -0
- package/dist/util/PropsWithFunctionChildren.d.ts +14 -0
- package/dist/util/PropsWithFunctionChildren.js +38 -0
- package/dist/util/PropsWithFunctionChildren.js.map +1 -0
- package/dist/util/PropsWithFunctionChildren.mjs +14 -0
- package/dist/util/PropsWithFunctionChildren.mjs.map +1 -0
- package/dist/util/simpleSearch.d.mts +2 -2
- package/dist/util/simpleSearch.d.ts +2 -2
- package/dist/util/simpleSearch.js +4 -1
- package/dist/util/simpleSearch.js.map +1 -1
- package/dist/util/simpleSearch.mjs +4 -1
- package/dist/util/simpleSearch.mjs.map +1 -1
- package/package.json +1 -2
|
@@ -61,22 +61,61 @@ 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 useTranslation = (
|
|
65
|
-
const { language: languageProp, translation: overwrite } =
|
|
64
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
65
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
66
66
|
const { language: inferredLanguage } = useLanguage();
|
|
67
67
|
const usedLanguage = languageProp ?? inferredLanguage;
|
|
68
|
-
|
|
69
|
-
if (overwrite
|
|
70
|
-
|
|
68
|
+
const usedTranslations = [...translations];
|
|
69
|
+
if (overwrite) {
|
|
70
|
+
usedTranslations.push(overwrite);
|
|
71
71
|
}
|
|
72
|
-
return
|
|
72
|
+
return (key, options) => {
|
|
73
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
74
|
+
try {
|
|
75
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
76
|
+
const translation = translations[i];
|
|
77
|
+
const localizedTranslation = translation[usedLanguage];
|
|
78
|
+
if (!localizedTranslation) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const value = localizedTranslation[key];
|
|
82
|
+
if (!value) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
let forProcessing;
|
|
86
|
+
if (typeof value !== "string") {
|
|
87
|
+
if (count <= 0 && value?.zero) {
|
|
88
|
+
forProcessing = value.zero;
|
|
89
|
+
} else if (count === 1 && value?.one) {
|
|
90
|
+
forProcessing = value.one;
|
|
91
|
+
} else if (count === 2 && value?.two) {
|
|
92
|
+
forProcessing = value.two;
|
|
93
|
+
} else if (count <= 10 && value?.few) {
|
|
94
|
+
forProcessing = value.few;
|
|
95
|
+
} else if (count > 10 && value?.many) {
|
|
96
|
+
forProcessing = value.many;
|
|
97
|
+
} else {
|
|
98
|
+
forProcessing = value.other;
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
forProcessing = value;
|
|
102
|
+
}
|
|
103
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
104
|
+
return replacements[placeholder] ?? `{{${placeholder}}}`;
|
|
105
|
+
});
|
|
106
|
+
return forProcessing;
|
|
107
|
+
}
|
|
108
|
+
} catch (e) {
|
|
109
|
+
console.error(e);
|
|
110
|
+
}
|
|
111
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
112
|
+
};
|
|
73
113
|
};
|
|
74
114
|
|
|
75
115
|
// src/components/user-action/Select.tsx
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var import_clsx3 = __toESM(require("clsx"));
|
|
116
|
+
var import_lucide_react3 = require("lucide-react");
|
|
117
|
+
var import_react7 = require("react");
|
|
118
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
80
119
|
|
|
81
120
|
// src/components/user-action/Label.tsx
|
|
82
121
|
var import_clsx = __toESM(require("clsx"));
|
|
@@ -96,18 +135,119 @@ var Label = ({
|
|
|
96
135
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
|
|
97
136
|
};
|
|
98
137
|
|
|
138
|
+
// src/components/layout-and-navigation/SearchableList.tsx
|
|
139
|
+
var import_lucide_react = require("lucide-react");
|
|
140
|
+
var import_clsx4 = __toESM(require("clsx"));
|
|
141
|
+
|
|
99
142
|
// src/components/user-action/Input.tsx
|
|
100
143
|
var import_react4 = require("react");
|
|
101
144
|
var import_clsx2 = __toESM(require("clsx"));
|
|
102
145
|
|
|
103
146
|
// src/hooks/useSaveDelay.ts
|
|
104
147
|
var import_react3 = require("react");
|
|
148
|
+
function useSaveDelay(setNotificationStatus, delay) {
|
|
149
|
+
const [updateTimer, setUpdateTimer] = (0, import_react3.useState)(void 0);
|
|
150
|
+
const [notificationTimer, setNotificationTimer] = (0, import_react3.useState)(void 0);
|
|
151
|
+
const restartTimer = (onSave) => {
|
|
152
|
+
clearTimeout(updateTimer);
|
|
153
|
+
setUpdateTimer(setTimeout(() => {
|
|
154
|
+
onSave();
|
|
155
|
+
setNotificationStatus(true);
|
|
156
|
+
clearTimeout(notificationTimer);
|
|
157
|
+
setNotificationTimer(setTimeout(() => {
|
|
158
|
+
setNotificationStatus(false);
|
|
159
|
+
clearTimeout(notificationTimer);
|
|
160
|
+
}, delay));
|
|
161
|
+
clearTimeout(updateTimer);
|
|
162
|
+
}, delay));
|
|
163
|
+
};
|
|
164
|
+
const clearUpdateTimer = (hasSaved = true) => {
|
|
165
|
+
clearTimeout(updateTimer);
|
|
166
|
+
if (hasSaved) {
|
|
167
|
+
setNotificationStatus(true);
|
|
168
|
+
clearTimeout(notificationTimer);
|
|
169
|
+
setNotificationTimer(setTimeout(() => {
|
|
170
|
+
setNotificationStatus(false);
|
|
171
|
+
clearTimeout(notificationTimer);
|
|
172
|
+
}, delay));
|
|
173
|
+
} else {
|
|
174
|
+
setNotificationStatus(false);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
(0, import_react3.useEffect)(() => {
|
|
178
|
+
return () => {
|
|
179
|
+
clearTimeout(updateTimer);
|
|
180
|
+
clearTimeout(notificationTimer);
|
|
181
|
+
};
|
|
182
|
+
}, []);
|
|
183
|
+
return { restartTimer, clearUpdateTimer };
|
|
184
|
+
}
|
|
105
185
|
|
|
106
186
|
// src/util/noop.ts
|
|
107
187
|
var noop = () => void 0;
|
|
108
188
|
|
|
109
189
|
// src/components/user-action/Input.tsx
|
|
110
190
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
191
|
+
var Input = ({
|
|
192
|
+
id,
|
|
193
|
+
type = "text",
|
|
194
|
+
value,
|
|
195
|
+
label,
|
|
196
|
+
onChange = noop,
|
|
197
|
+
onChangeText = noop,
|
|
198
|
+
onEditCompleted,
|
|
199
|
+
className = "",
|
|
200
|
+
expanded = true,
|
|
201
|
+
autoFocus,
|
|
202
|
+
onBlur,
|
|
203
|
+
containerClassName,
|
|
204
|
+
...restProps
|
|
205
|
+
}) => {
|
|
206
|
+
const {
|
|
207
|
+
restartTimer,
|
|
208
|
+
clearUpdateTimer
|
|
209
|
+
} = useSaveDelay(() => void 0, 3e3);
|
|
210
|
+
const ref = (0, import_react4.useRef)(null);
|
|
211
|
+
(0, import_react4.useEffect)(() => {
|
|
212
|
+
if (autoFocus) {
|
|
213
|
+
ref.current?.focus();
|
|
214
|
+
}
|
|
215
|
+
}, [autoFocus]);
|
|
216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_clsx2.default)({ "w-full": expanded }, containerClassName), children: [
|
|
217
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx2.default)("mb-1", label.className) }),
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
219
|
+
"input",
|
|
220
|
+
{
|
|
221
|
+
ref,
|
|
222
|
+
value,
|
|
223
|
+
id,
|
|
224
|
+
type,
|
|
225
|
+
className,
|
|
226
|
+
onBlur: (event) => {
|
|
227
|
+
if (onBlur) {
|
|
228
|
+
onBlur(event);
|
|
229
|
+
}
|
|
230
|
+
if (onEditCompleted) {
|
|
231
|
+
onEditCompleted(event.target.value);
|
|
232
|
+
clearUpdateTimer();
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
onChange: (e) => {
|
|
236
|
+
const value2 = e.target.value;
|
|
237
|
+
if (onEditCompleted) {
|
|
238
|
+
restartTimer(() => {
|
|
239
|
+
onEditCompleted(value2);
|
|
240
|
+
clearUpdateTimer();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
onChange(e);
|
|
244
|
+
onChangeText(value2);
|
|
245
|
+
},
|
|
246
|
+
...restProps
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
] });
|
|
250
|
+
};
|
|
111
251
|
var FormInput = (0, import_react4.forwardRef)(function FormInput2({
|
|
112
252
|
id,
|
|
113
253
|
labelText,
|
|
@@ -144,102 +284,9 @@ var FormInput = (0, import_react4.forwardRef)(function FormInput2({
|
|
|
144
284
|
] });
|
|
145
285
|
});
|
|
146
286
|
|
|
147
|
-
// src/components/user-action/Select.tsx
|
|
148
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
149
|
-
var Select = ({
|
|
150
|
-
value,
|
|
151
|
-
label,
|
|
152
|
-
options,
|
|
153
|
-
onChange,
|
|
154
|
-
isHidingCurrentValue = true,
|
|
155
|
-
hintText = "",
|
|
156
|
-
showDisabledOptions = true,
|
|
157
|
-
isDisabled,
|
|
158
|
-
className,
|
|
159
|
-
textColor = "text-menu-text",
|
|
160
|
-
additionalItems,
|
|
161
|
-
selectedDisplayOverwrite
|
|
162
|
-
}) => {
|
|
163
|
-
let filteredOptions = isHidingCurrentValue ? options.filter((option) => option.value !== value) : options;
|
|
164
|
-
if (!showDisabledOptions) {
|
|
165
|
-
filteredOptions = filteredOptions.filter((value2) => !value2.disabled);
|
|
166
|
-
}
|
|
167
|
-
const selectedOption = options.find((option) => option.value === value);
|
|
168
|
-
if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
|
|
169
|
-
console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
|
|
170
|
-
}
|
|
171
|
-
const borderColor = "border-menu-border";
|
|
172
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx3.default)(className), children: [
|
|
173
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx3.default)("mb-1", label.className) }),
|
|
174
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react5.Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
175
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
176
|
-
import_react5.Menu.Button,
|
|
177
|
-
{
|
|
178
|
-
className: (0, import_clsx3.default)(
|
|
179
|
-
"inline-flex w-full justify-between items-center rounded-t-lg border-2 px-4 py-2 font-medium bg-menu-background text-menu-text",
|
|
180
|
-
textColor,
|
|
181
|
-
borderColor,
|
|
182
|
-
{
|
|
183
|
-
"rounded-b-lg": !open,
|
|
184
|
-
"hover:border-primary": !isDisabled,
|
|
185
|
-
"bg-disabled-background cursor-not-allowed text-disabled": isDisabled
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
disabled: isDisabled,
|
|
189
|
-
children: [
|
|
190
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: selectedDisplayOverwrite ?? selectedOption?.label ?? hintText }),
|
|
191
|
-
open ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.ChevronDown, {})
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
),
|
|
195
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
196
|
-
import_react5.Menu.Items,
|
|
197
|
-
{
|
|
198
|
-
className: "absolute w-full z-10 rounded-b-lg bg-menu-background text-menu-text shadow-lg max-h-[500px] overflow-y-auto",
|
|
199
|
-
children: [
|
|
200
|
-
(additionalItems ?? []).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
201
|
-
"div",
|
|
202
|
-
{
|
|
203
|
-
className: (0, import_clsx3.default)(borderColor, "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0", {
|
|
204
|
-
"border-b-0 rounded-b-lg": filteredOptions.length === 0 && index === (additionalItems?.length ?? 1) - 1
|
|
205
|
-
}),
|
|
206
|
-
children: item
|
|
207
|
-
},
|
|
208
|
-
`additionalItems${index}`
|
|
209
|
-
)),
|
|
210
|
-
filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react5.Menu.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
211
|
-
"div",
|
|
212
|
-
{
|
|
213
|
-
className: (0, import_clsx3.default)(
|
|
214
|
-
"px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0 cursor-pointer",
|
|
215
|
-
option.className,
|
|
216
|
-
borderColor,
|
|
217
|
-
{
|
|
218
|
-
"brightness-90": option.value === value,
|
|
219
|
-
"brightness-95": index % 2 === 1,
|
|
220
|
-
"text-disabled bg-disabled-background cursor-not-allowed": !!option.disabled,
|
|
221
|
-
"bg-menu-background text-menu-text hover:brightness-90 cursor-pointer": !option.disabled,
|
|
222
|
-
"rounded-b-lg": index === filteredOptions.length - 1
|
|
223
|
-
}
|
|
224
|
-
),
|
|
225
|
-
onClick: () => {
|
|
226
|
-
if (!option.disabled) {
|
|
227
|
-
onChange(option.value);
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
children: option.label
|
|
231
|
-
}
|
|
232
|
-
) }, `item${index}`))
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
)
|
|
236
|
-
] }) })
|
|
237
|
-
] });
|
|
238
|
-
};
|
|
239
|
-
|
|
240
287
|
// src/components/user-action/Button.tsx
|
|
241
|
-
var
|
|
242
|
-
var
|
|
288
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
289
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
243
290
|
var paddingMapping = {
|
|
244
291
|
small: "btn-sm",
|
|
245
292
|
medium: "btn-md",
|
|
@@ -283,25 +330,25 @@ var SolidButton = ({
|
|
|
283
330
|
negative: "text-button-solid-negative-icon",
|
|
284
331
|
neutral: "text-button-solid-neutral-icon"
|
|
285
332
|
}[color];
|
|
286
|
-
return /* @__PURE__ */ (0,
|
|
333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
287
334
|
"button",
|
|
288
335
|
{
|
|
289
336
|
onClick: disabled ? void 0 : onClick,
|
|
290
337
|
disabled: disabled || onClick === void 0,
|
|
291
|
-
className: (0,
|
|
338
|
+
className: (0, import_clsx3.default)(
|
|
292
339
|
{
|
|
293
340
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
294
|
-
[(0,
|
|
341
|
+
[(0, import_clsx3.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
295
342
|
},
|
|
296
343
|
ButtonUtil.paddingMapping[size],
|
|
297
344
|
className
|
|
298
345
|
),
|
|
299
346
|
...restProps,
|
|
300
347
|
children: [
|
|
301
|
-
startIcon && /* @__PURE__ */ (0,
|
|
348
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
302
349
|
"span",
|
|
303
350
|
{
|
|
304
|
-
className: (0,
|
|
351
|
+
className: (0, import_clsx3.default)({
|
|
305
352
|
[iconColorClasses]: !disabled,
|
|
306
353
|
[`text-disabled-icon`]: disabled
|
|
307
354
|
}),
|
|
@@ -309,10 +356,10 @@ var SolidButton = ({
|
|
|
309
356
|
}
|
|
310
357
|
),
|
|
311
358
|
children,
|
|
312
|
-
endIcon && /* @__PURE__ */ (0,
|
|
359
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
313
360
|
"span",
|
|
314
361
|
{
|
|
315
|
-
className: (0,
|
|
362
|
+
className: (0, import_clsx3.default)({
|
|
316
363
|
[iconColorClasses]: !disabled,
|
|
317
364
|
[`text-disabled-icon`]: disabled
|
|
318
365
|
}),
|
|
@@ -341,15 +388,15 @@ var IconButton = ({
|
|
|
341
388
|
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
342
389
|
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
343
390
|
}[color];
|
|
344
|
-
return /* @__PURE__ */ (0,
|
|
391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
345
392
|
"button",
|
|
346
393
|
{
|
|
347
394
|
onClick: disabled ? void 0 : onClick,
|
|
348
395
|
disabled: disabled || onClick === void 0,
|
|
349
|
-
className: (0,
|
|
396
|
+
className: (0, import_clsx3.default)(
|
|
350
397
|
{
|
|
351
398
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
352
|
-
[(0,
|
|
399
|
+
[(0, import_clsx3.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
353
400
|
},
|
|
354
401
|
ButtonUtil.iconPaddingMapping[size],
|
|
355
402
|
className
|
|
@@ -360,21 +407,343 @@ var IconButton = ({
|
|
|
360
407
|
);
|
|
361
408
|
};
|
|
362
409
|
|
|
410
|
+
// src/hooks/useSearch.ts
|
|
411
|
+
var import_react5 = require("react");
|
|
412
|
+
|
|
413
|
+
// src/util/simpleSearch.ts
|
|
414
|
+
var MultiSearchWithMapping = (search, objects, mapping) => {
|
|
415
|
+
return objects.filter((object) => {
|
|
416
|
+
const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
|
|
417
|
+
if (!mappedSearchKeywords) {
|
|
418
|
+
return true;
|
|
419
|
+
}
|
|
420
|
+
return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
|
|
421
|
+
});
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// src/hooks/useSearch.ts
|
|
425
|
+
var useSearch = ({
|
|
426
|
+
list,
|
|
427
|
+
initialSearch,
|
|
428
|
+
searchMapping
|
|
429
|
+
}) => {
|
|
430
|
+
const [items, setItems] = (0, import_react5.useState)(list);
|
|
431
|
+
const [search, setSearch] = (0, import_react5.useState)(initialSearch);
|
|
432
|
+
(0, import_react5.useEffect)(() => {
|
|
433
|
+
setItems(list);
|
|
434
|
+
}, [list]);
|
|
435
|
+
const result = (0, import_react5.useMemo)(
|
|
436
|
+
() => MultiSearchWithMapping(search, items, searchMapping),
|
|
437
|
+
[search, items, searchMapping]
|
|
438
|
+
);
|
|
439
|
+
return {
|
|
440
|
+
result,
|
|
441
|
+
hasResult: result.length > 0,
|
|
442
|
+
allItems: items,
|
|
443
|
+
setItems,
|
|
444
|
+
search,
|
|
445
|
+
setSearch
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// src/localization/defaults/form.ts
|
|
450
|
+
var formTranslation = {
|
|
451
|
+
en: {
|
|
452
|
+
all: "All",
|
|
453
|
+
back: "Back",
|
|
454
|
+
cancel: "Cancel",
|
|
455
|
+
change: "Change",
|
|
456
|
+
clear: "Clear",
|
|
457
|
+
close: "Close",
|
|
458
|
+
confirm: "Confirm",
|
|
459
|
+
decline: "Decline",
|
|
460
|
+
delete: "Delete",
|
|
461
|
+
discard: "Discard",
|
|
462
|
+
discardChanges: "Discard Changes",
|
|
463
|
+
done: "Done",
|
|
464
|
+
edit: "Edit",
|
|
465
|
+
enterText: "Enter text here",
|
|
466
|
+
error: "Error",
|
|
467
|
+
exit: "Exit",
|
|
468
|
+
fieldRequiredError: "This field is required.",
|
|
469
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
470
|
+
less: "Less",
|
|
471
|
+
loading: "Loading",
|
|
472
|
+
maxLengthError: "Maximum length exceeded.",
|
|
473
|
+
minLengthError: "Minimum length not met.",
|
|
474
|
+
more: "More",
|
|
475
|
+
next: "Next",
|
|
476
|
+
no: "No",
|
|
477
|
+
none: "None",
|
|
478
|
+
of: "of",
|
|
479
|
+
optional: "Optional",
|
|
480
|
+
pleaseWait: "Please wait...",
|
|
481
|
+
previous: "Previous",
|
|
482
|
+
remove: "Remove",
|
|
483
|
+
required: "Required",
|
|
484
|
+
reset: "Reset",
|
|
485
|
+
save: "Save",
|
|
486
|
+
search: "Search",
|
|
487
|
+
select: "Select",
|
|
488
|
+
selectOption: "Select an option",
|
|
489
|
+
show: "Show",
|
|
490
|
+
showMore: "Show more",
|
|
491
|
+
showLess: "Show less",
|
|
492
|
+
submit: "Submit",
|
|
493
|
+
success: "Success",
|
|
494
|
+
update: "Update",
|
|
495
|
+
unsavedChanges: "Unsaved Changes",
|
|
496
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
497
|
+
yes: "Yes"
|
|
498
|
+
},
|
|
499
|
+
de: {
|
|
500
|
+
all: "Alle",
|
|
501
|
+
back: "Zur\xFCck",
|
|
502
|
+
cancel: "Abbrechen",
|
|
503
|
+
change: "\xC4ndern",
|
|
504
|
+
clear: "L\xF6schen",
|
|
505
|
+
close: "Schlie\xDFen",
|
|
506
|
+
confirm: "Best\xE4tigen",
|
|
507
|
+
decline: "Ablehnen",
|
|
508
|
+
delete: "L\xF6schen",
|
|
509
|
+
discard: "Verwerfen",
|
|
510
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
511
|
+
done: "Fertig",
|
|
512
|
+
edit: "Bearbeiten",
|
|
513
|
+
enterText: "Text hier eingeben",
|
|
514
|
+
error: "Fehler",
|
|
515
|
+
exit: "Beenden",
|
|
516
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
517
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
518
|
+
less: "Weniger",
|
|
519
|
+
loading: "L\xE4dt",
|
|
520
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
521
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
522
|
+
more: "Mehr",
|
|
523
|
+
next: "Weiter",
|
|
524
|
+
no: "Nein",
|
|
525
|
+
none: "Nichts",
|
|
526
|
+
of: "von",
|
|
527
|
+
optional: "Optional",
|
|
528
|
+
pleaseWait: "Bitte warten...",
|
|
529
|
+
previous: "Vorherige",
|
|
530
|
+
remove: "Entfernen",
|
|
531
|
+
required: "Erforderlich",
|
|
532
|
+
reset: "Zur\xFCcksetzen",
|
|
533
|
+
save: "Speichern",
|
|
534
|
+
search: "Suche",
|
|
535
|
+
select: "Select",
|
|
536
|
+
selectOption: "Option ausw\xE4hlen",
|
|
537
|
+
show: "Anzeigen",
|
|
538
|
+
showMore: "Mehr anzeigen",
|
|
539
|
+
showLess: "Weniger anzeigen",
|
|
540
|
+
submit: "Abschicken",
|
|
541
|
+
success: "Erfolg",
|
|
542
|
+
update: "Update",
|
|
543
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
544
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
545
|
+
yes: "Ja"
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
// src/components/layout-and-navigation/SearchableList.tsx
|
|
550
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
551
|
+
var defaultSearchableListTranslation = {
|
|
552
|
+
en: {
|
|
553
|
+
nothingFound: "Nothing found"
|
|
554
|
+
},
|
|
555
|
+
de: {
|
|
556
|
+
nothingFound: "Nichts gefunden"
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
var SearchableList = ({
|
|
560
|
+
overwriteTranslation,
|
|
561
|
+
list,
|
|
562
|
+
initialSearch = "",
|
|
563
|
+
searchMapping,
|
|
564
|
+
autoFocus,
|
|
565
|
+
minimumItemsForSearch = 6,
|
|
566
|
+
itemMapper,
|
|
567
|
+
className,
|
|
568
|
+
resultListClassName
|
|
569
|
+
}) => {
|
|
570
|
+
const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
|
|
571
|
+
const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
|
|
572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx4.default)("col gap-y-2", className), children: [
|
|
573
|
+
list.length > minimumItemsForSearch && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "row justify-between gap-x-4 items-center", children: [
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
575
|
+
Input,
|
|
576
|
+
{
|
|
577
|
+
value: search,
|
|
578
|
+
onChangeText: setSearch,
|
|
579
|
+
placeholder: translation("search"),
|
|
580
|
+
autoFocus,
|
|
581
|
+
className: "w-full"
|
|
582
|
+
}
|
|
583
|
+
),
|
|
584
|
+
/* @__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" }) })
|
|
585
|
+
] }),
|
|
586
|
+
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") })
|
|
587
|
+
] });
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
// src/components/layout-and-navigation/Tile.tsx
|
|
591
|
+
var import_clsx5 = __toESM(require("clsx"));
|
|
592
|
+
var import_lucide_react2 = require("lucide-react");
|
|
593
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
594
|
+
var Tile = ({
|
|
595
|
+
title,
|
|
596
|
+
description,
|
|
597
|
+
onClick,
|
|
598
|
+
isSelected = false,
|
|
599
|
+
isDisabled = false,
|
|
600
|
+
prefix,
|
|
601
|
+
suffix,
|
|
602
|
+
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
603
|
+
selectedClassName = " bg-primary/20",
|
|
604
|
+
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
605
|
+
className
|
|
606
|
+
}) => {
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
608
|
+
"div",
|
|
609
|
+
{
|
|
610
|
+
className: (0, import_clsx5.default)(
|
|
611
|
+
"row gap-x-2 w-full items-center",
|
|
612
|
+
{
|
|
613
|
+
[normalClassName]: !!onClick && !isDisabled,
|
|
614
|
+
[selectedClassName]: isSelected && !isDisabled,
|
|
615
|
+
[disabledClassName]: isDisabled
|
|
616
|
+
},
|
|
617
|
+
className
|
|
618
|
+
),
|
|
619
|
+
onClick: isDisabled ? void 0 : onClick,
|
|
620
|
+
children: [
|
|
621
|
+
prefix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Check, { size: 24 }) : void 0),
|
|
622
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "col gap-y-0 w-full", children: [
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h4", { className: (0, import_clsx5.default)(title.className ?? "textstyle-title-normal"), children: title.value }),
|
|
624
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: (0, import_clsx5.default)(description.className ?? "textstyle-description"), children: description.value })
|
|
625
|
+
] }),
|
|
626
|
+
suffix
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
// src/hooks/useOutsideClick.ts
|
|
633
|
+
var import_react6 = require("react");
|
|
634
|
+
var useOutsideClick = (refs, handler) => {
|
|
635
|
+
(0, import_react6.useEffect)(() => {
|
|
636
|
+
const listener = (event) => {
|
|
637
|
+
if (event.target === null) return;
|
|
638
|
+
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
handler();
|
|
642
|
+
};
|
|
643
|
+
document.addEventListener("mousedown", listener);
|
|
644
|
+
document.addEventListener("touchstart", listener);
|
|
645
|
+
return () => {
|
|
646
|
+
document.removeEventListener("mousedown", listener);
|
|
647
|
+
document.removeEventListener("touchstart", listener);
|
|
648
|
+
};
|
|
649
|
+
}, [refs, handler]);
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
// src/components/user-action/Select.tsx
|
|
653
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
654
|
+
var Select = ({
|
|
655
|
+
value,
|
|
656
|
+
label,
|
|
657
|
+
options,
|
|
658
|
+
onChange,
|
|
659
|
+
hintText = "",
|
|
660
|
+
isDisabled,
|
|
661
|
+
isSearchEnabled = false,
|
|
662
|
+
className,
|
|
663
|
+
selectedDisplayOverwrite
|
|
664
|
+
}) => {
|
|
665
|
+
const triggerRef = (0, import_react7.useRef)(null);
|
|
666
|
+
const menuRef = (0, import_react7.useRef)(null);
|
|
667
|
+
const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
|
|
668
|
+
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
669
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
670
|
+
if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
|
|
671
|
+
console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
|
|
672
|
+
}
|
|
673
|
+
const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_clsx6.default)(className), children: [
|
|
675
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx6.default)("mb-1", label.className) }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative", children: [
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
678
|
+
"button",
|
|
679
|
+
{
|
|
680
|
+
ref: triggerRef,
|
|
681
|
+
className: (0, import_clsx6.default)(
|
|
682
|
+
"btn-md justify-between w-full border-2",
|
|
683
|
+
{
|
|
684
|
+
"rounded-b-lg": !open,
|
|
685
|
+
"bg-menu-background border-menu-border hover:border-primary": !isDisabled,
|
|
686
|
+
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
|
|
687
|
+
}
|
|
688
|
+
),
|
|
689
|
+
onClick: () => setIsOpen(!isOpen),
|
|
690
|
+
disabled: isDisabled,
|
|
691
|
+
children: [
|
|
692
|
+
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
|
|
693
|
+
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "textstyle-description", children: hintText }),
|
|
694
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.ChevronDown, {})
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
),
|
|
698
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
699
|
+
"div",
|
|
700
|
+
{
|
|
701
|
+
ref: menuRef,
|
|
702
|
+
className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-md max-h-[500px] overflow-y-auto p-2",
|
|
703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
704
|
+
SearchableList,
|
|
705
|
+
{
|
|
706
|
+
list: options,
|
|
707
|
+
minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
|
|
708
|
+
searchMapping: (item) => item.searchTags,
|
|
709
|
+
itemMapper: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
710
|
+
Tile,
|
|
711
|
+
{
|
|
712
|
+
isSelected: selectedOption?.value === option.value,
|
|
713
|
+
className: "px-2 py-1 rounded-md",
|
|
714
|
+
disabledClassName: "text-disabled-text cursor-not-allowed",
|
|
715
|
+
title: { value: option.label, className: "font-semibold" },
|
|
716
|
+
onClick: () => {
|
|
717
|
+
onChange(option.value);
|
|
718
|
+
setIsOpen(false);
|
|
719
|
+
},
|
|
720
|
+
isDisabled: option.disabled
|
|
721
|
+
},
|
|
722
|
+
index
|
|
723
|
+
)
|
|
724
|
+
}
|
|
725
|
+
)
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
] })
|
|
729
|
+
] });
|
|
730
|
+
};
|
|
731
|
+
|
|
363
732
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
364
|
-
var
|
|
733
|
+
var import_react9 = require("react");
|
|
365
734
|
var import_react_dom = __toESM(require("react-dom"));
|
|
366
|
-
var
|
|
735
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
367
736
|
|
|
368
737
|
// src/hooks/useHoverState.ts
|
|
369
|
-
var
|
|
738
|
+
var import_react8 = require("react");
|
|
370
739
|
var defaultUseHoverStateProps = {
|
|
371
740
|
closingDelay: 200,
|
|
372
741
|
isDisabled: false
|
|
373
742
|
};
|
|
374
743
|
var useHoverState = (props = void 0) => {
|
|
375
744
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
376
|
-
const [isHovered, setIsHovered] = (0,
|
|
377
|
-
const [timer, setTimer] = (0,
|
|
745
|
+
const [isHovered, setIsHovered] = (0, import_react8.useState)(false);
|
|
746
|
+
const [timer, setTimer] = (0, import_react8.useState)();
|
|
378
747
|
const onMouseEnter = () => {
|
|
379
748
|
if (isDisabled) {
|
|
380
749
|
return;
|
|
@@ -390,14 +759,14 @@ var useHoverState = (props = void 0) => {
|
|
|
390
759
|
setIsHovered(false);
|
|
391
760
|
}, closingDelay));
|
|
392
761
|
};
|
|
393
|
-
(0,
|
|
762
|
+
(0, import_react8.useEffect)(() => {
|
|
394
763
|
if (timer) {
|
|
395
764
|
return () => {
|
|
396
765
|
clearTimeout(timer);
|
|
397
766
|
};
|
|
398
767
|
}
|
|
399
768
|
});
|
|
400
|
-
(0,
|
|
769
|
+
(0, import_react8.useEffect)(() => {
|
|
401
770
|
if (timer) {
|
|
402
771
|
clearTimeout(timer);
|
|
403
772
|
}
|
|
@@ -410,8 +779,8 @@ var useHoverState = (props = void 0) => {
|
|
|
410
779
|
};
|
|
411
780
|
|
|
412
781
|
// src/components/user-action/Tooltip.tsx
|
|
413
|
-
var
|
|
414
|
-
var
|
|
782
|
+
var import_clsx7 = require("clsx");
|
|
783
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
415
784
|
var Tooltip = ({
|
|
416
785
|
tooltip,
|
|
417
786
|
children,
|
|
@@ -441,30 +810,30 @@ var Tooltip = ({
|
|
|
441
810
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
442
811
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
443
812
|
};
|
|
444
|
-
return /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
445
814
|
"div",
|
|
446
815
|
{
|
|
447
|
-
className: (0,
|
|
816
|
+
className: (0, import_clsx7.clsx)("relative inline-block", containerClassName),
|
|
448
817
|
...handlers,
|
|
449
818
|
children: [
|
|
450
819
|
children,
|
|
451
|
-
isHovered && /* @__PURE__ */ (0,
|
|
820
|
+
isHovered && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
452
821
|
"div",
|
|
453
822
|
{
|
|
454
|
-
className: (0,
|
|
823
|
+
className: (0, import_clsx7.clsx)(
|
|
455
824
|
`opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
456
|
-
animate-tooltip-fade-in shadow-
|
|
825
|
+
animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
|
|
457
826
|
positionClasses[position],
|
|
458
827
|
tooltipClassName
|
|
459
828
|
),
|
|
460
829
|
style: { zIndex, animationDelay: animationDelay + "ms" },
|
|
461
830
|
children: [
|
|
462
831
|
tooltip,
|
|
463
|
-
/* @__PURE__ */ (0,
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
464
833
|
"div",
|
|
465
834
|
{
|
|
466
|
-
className: (0,
|
|
467
|
-
style: { ...triangleStyle[position], zIndex }
|
|
835
|
+
className: (0, import_clsx7.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
|
|
836
|
+
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
468
837
|
}
|
|
469
838
|
)
|
|
470
839
|
]
|
|
@@ -476,25 +845,25 @@ var Tooltip = ({
|
|
|
476
845
|
};
|
|
477
846
|
|
|
478
847
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
479
|
-
var
|
|
480
|
-
var
|
|
848
|
+
var import_lucide_react4 = require("lucide-react");
|
|
849
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
481
850
|
var Overlay = ({
|
|
482
851
|
children,
|
|
483
852
|
isOpen,
|
|
484
853
|
onBackgroundClick,
|
|
485
854
|
backgroundClassName
|
|
486
855
|
}) => {
|
|
487
|
-
const [root, setRoot] = (0,
|
|
488
|
-
(0,
|
|
856
|
+
const [root, setRoot] = (0, import_react9.useState)();
|
|
857
|
+
(0, import_react9.useEffect)(() => {
|
|
489
858
|
setRoot(document.body);
|
|
490
859
|
}, []);
|
|
491
860
|
if (!root || !isOpen) return null;
|
|
492
861
|
return import_react_dom.default.createPortal(
|
|
493
|
-
/* @__PURE__ */ (0,
|
|
494
|
-
/* @__PURE__ */ (0,
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)("fixed inset-0 z-[9999]"), children: [
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
495
864
|
"div",
|
|
496
865
|
{
|
|
497
|
-
className: (0,
|
|
866
|
+
className: (0, import_clsx8.default)("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
|
|
498
867
|
onClick: onBackgroundClick
|
|
499
868
|
}
|
|
500
869
|
),
|
|
@@ -506,10 +875,10 @@ var Overlay = ({
|
|
|
506
875
|
var overlayStack = [];
|
|
507
876
|
var defaultModalHeaderTranslation = {
|
|
508
877
|
en: {
|
|
509
|
-
|
|
878
|
+
...formTranslation.en
|
|
510
879
|
},
|
|
511
880
|
de: {
|
|
512
|
-
|
|
881
|
+
...formTranslation.de
|
|
513
882
|
}
|
|
514
883
|
};
|
|
515
884
|
var OverlayHeader = ({
|
|
@@ -520,23 +889,23 @@ var OverlayHeader = ({
|
|
|
520
889
|
description,
|
|
521
890
|
descriptionText = ""
|
|
522
891
|
}) => {
|
|
523
|
-
const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
|
|
892
|
+
const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
|
|
524
893
|
const hasTitleRow = !!title || !!titleText || !!onClose;
|
|
525
|
-
const titleRow = /* @__PURE__ */ (0,
|
|
526
|
-
title ?? /* @__PURE__ */ (0,
|
|
894
|
+
const titleRow = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "row justify-between items-start gap-x-8", children: [
|
|
895
|
+
title ?? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
527
896
|
"h2",
|
|
528
897
|
{
|
|
529
|
-
className: (0,
|
|
898
|
+
className: (0, import_clsx8.default)("textstyle-title-lg", {
|
|
530
899
|
"mb-1": description || descriptionText
|
|
531
900
|
}),
|
|
532
901
|
children: titleText
|
|
533
902
|
}
|
|
534
903
|
),
|
|
535
|
-
!!onClose && /* @__PURE__ */ (0,
|
|
904
|
+
!!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" }) }) })
|
|
536
905
|
] });
|
|
537
|
-
return /* @__PURE__ */ (0,
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "col", children: [
|
|
538
907
|
hasTitleRow && titleRow,
|
|
539
|
-
description ?? (descriptionText && /* @__PURE__ */ (0,
|
|
908
|
+
description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "textstyle-description", children: descriptionText }))
|
|
540
909
|
] });
|
|
541
910
|
};
|
|
542
911
|
var Modal = ({
|
|
@@ -547,8 +916,8 @@ var Modal = ({
|
|
|
547
916
|
backgroundClassName,
|
|
548
917
|
headerProps
|
|
549
918
|
}) => {
|
|
550
|
-
const ref = (0,
|
|
551
|
-
(0,
|
|
919
|
+
const ref = (0, import_react9.useRef)(null);
|
|
920
|
+
(0, import_react9.useEffect)(() => {
|
|
552
921
|
if (!isOpen) return;
|
|
553
922
|
const modal = ref.current;
|
|
554
923
|
if (!modal) {
|
|
@@ -585,25 +954,25 @@ var Modal = ({
|
|
|
585
954
|
overlayStack = overlayStack.filter((m) => m !== modal);
|
|
586
955
|
};
|
|
587
956
|
}, [isOpen, onClose]);
|
|
588
|
-
return /* @__PURE__ */ (0,
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
589
958
|
Overlay,
|
|
590
959
|
{
|
|
591
960
|
isOpen,
|
|
592
961
|
onBackgroundClick: onClose,
|
|
593
962
|
backgroundClassName,
|
|
594
|
-
children: /* @__PURE__ */ (0,
|
|
963
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
595
964
|
"div",
|
|
596
965
|
{
|
|
597
966
|
ref,
|
|
598
967
|
tabIndex: -1,
|
|
599
|
-
className: (0,
|
|
968
|
+
className: (0, import_clsx8.default)(
|
|
600
969
|
"fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
|
|
601
970
|
className
|
|
602
971
|
),
|
|
603
972
|
role: "dialog",
|
|
604
973
|
"aria-modal": true,
|
|
605
974
|
children: [
|
|
606
|
-
/* @__PURE__ */ (0,
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(OverlayHeader, { ...headerProps, onClose }),
|
|
607
976
|
children
|
|
608
977
|
]
|
|
609
978
|
}
|
|
@@ -613,43 +982,45 @@ var Modal = ({
|
|
|
613
982
|
};
|
|
614
983
|
|
|
615
984
|
// src/theming/useTheme.tsx
|
|
616
|
-
var
|
|
617
|
-
var
|
|
985
|
+
var import_react10 = require("react");
|
|
986
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
618
987
|
var themes = ["light", "dark"];
|
|
619
988
|
var defaultThemeTypeTranslation = {
|
|
620
989
|
en: {
|
|
621
990
|
dark: "Dark",
|
|
622
|
-
light: "Light"
|
|
991
|
+
light: "Light",
|
|
992
|
+
theme: {
|
|
993
|
+
one: "Theme",
|
|
994
|
+
other: "Themes"
|
|
995
|
+
}
|
|
623
996
|
},
|
|
624
997
|
de: {
|
|
625
998
|
dark: "Dunkel",
|
|
626
|
-
light: "Hell"
|
|
999
|
+
light: "Hell",
|
|
1000
|
+
theme: {
|
|
1001
|
+
one: "Farbschema",
|
|
1002
|
+
other: "Farbschemas"
|
|
1003
|
+
}
|
|
627
1004
|
}
|
|
628
1005
|
};
|
|
629
1006
|
var ThemeUtil = {
|
|
630
1007
|
themes,
|
|
631
1008
|
translation: defaultThemeTypeTranslation
|
|
632
1009
|
};
|
|
633
|
-
var ThemeContext = (0,
|
|
1010
|
+
var ThemeContext = (0, import_react10.createContext)({
|
|
634
1011
|
theme: "light",
|
|
635
1012
|
setTheme: noop
|
|
636
1013
|
});
|
|
637
|
-
var useTheme = () => (0,
|
|
1014
|
+
var useTheme = () => (0, import_react10.useContext)(ThemeContext);
|
|
638
1015
|
|
|
639
1016
|
// src/components/modals/ThemeModal.tsx
|
|
640
|
-
var
|
|
1017
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
641
1018
|
var defaultConfirmDialogTranslation = {
|
|
642
1019
|
en: {
|
|
643
|
-
|
|
644
|
-
message: "Choose your preferred theme",
|
|
645
|
-
done: "Done",
|
|
646
|
-
...ThemeUtil.translation.en
|
|
1020
|
+
chooseTheme: "Choose your preferred theme"
|
|
647
1021
|
},
|
|
648
1022
|
de: {
|
|
649
|
-
|
|
650
|
-
message: "W\xE4hle dein bevorzugtes Farbschema",
|
|
651
|
-
done: "Fertig",
|
|
652
|
-
...ThemeUtil.translation.en
|
|
1023
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
653
1024
|
}
|
|
654
1025
|
};
|
|
655
1026
|
var ThemeModal = ({
|
|
@@ -659,19 +1030,19 @@ var ThemeModal = ({
|
|
|
659
1030
|
...modalProps
|
|
660
1031
|
}) => {
|
|
661
1032
|
const { theme, setTheme } = useTheme();
|
|
662
|
-
const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
|
|
663
|
-
return /* @__PURE__ */ (0,
|
|
1033
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
1034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
664
1035
|
Modal,
|
|
665
1036
|
{
|
|
666
1037
|
headerProps: {
|
|
667
1038
|
...headerProps,
|
|
668
|
-
titleText: headerProps?.titleText ?? translation
|
|
669
|
-
descriptionText: headerProps?.descriptionText ?? translation
|
|
1039
|
+
titleText: headerProps?.titleText ?? translation("theme"),
|
|
1040
|
+
descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
|
|
670
1041
|
},
|
|
671
1042
|
onClose,
|
|
672
1043
|
...modalProps,
|
|
673
|
-
children: /* @__PURE__ */ (0,
|
|
674
|
-
/* @__PURE__ */ (0,
|
|
1044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-64", children: [
|
|
1045
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
675
1046
|
Select,
|
|
676
1047
|
{
|
|
677
1048
|
className: "mt-2",
|
|
@@ -680,7 +1051,7 @@ var ThemeModal = ({
|
|
|
680
1051
|
onChange: (theme2) => setTheme(theme2)
|
|
681
1052
|
}
|
|
682
1053
|
),
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
1054
|
+
/* @__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") }) })
|
|
684
1055
|
] })
|
|
685
1056
|
}
|
|
686
1057
|
);
|