chore(deps): update mantine monorepo to v9 (#5411)

Co-authored-by: Thomas Camlong <thomas@ajnart.fr>
This commit is contained in:
homarr-renovate[bot]andThomas Camlong authored and GitHub committed 2026-05-27 17:29:52 +02:00
1 parent fe3cebb902
commit f7ea1b33a0
29 files changed
+707 -455

No files matched your search

@@ -25,9 +25,22 @@ export const WidgetDynamicSelectInput = ({ property, kind, options }: CommonWidg
const [search, setSearch] = useState("");
const [debouncedSearch] = useDebouncedValue(search, 300);
const { isPending, options: selectOptions } = options.useOptions(debouncedSearch, form.values.integrationIds);
const value = inputProps.value as DynamicSelectOption | null;
const currentOption = inputProps.value as DynamicSelectOption | null;
const onChange = inputProps.onChange as (value: DynamicSelectOption | null) => void;
const getLabelForValue = (selectedValue: string) => {
const matched = selectOptions.find((option) =>
typeof option === "string" ? option === selectedValue : option.value === selectedValue,
);
if (!matched) {
return selectedValue;
}
if (typeof matched === "string") {
return matched;
}
return translateIfNecessary(t, matched.label) ?? selectedValue;
};
return (
<Select
label={tWidget("label")}
@@ -41,14 +54,13 @@ export const WidgetDynamicSelectInput = ({ property, kind, options }: CommonWidg
},
)
.concat(
typeof value === "object" &&
value !== null &&
currentOption !== null &&
!selectOptions.some((option) =>
typeof option === "string" ? option === value.value : option.value === value.value,
typeof option === "string" ? option === currentOption.value : option.value === currentOption.value,
)
? {
value: value.value,
label: value.label,
value: currentOption.value,
label: currentOption.label,
}
: [],
)}
@@ -74,19 +86,17 @@ export const WidgetDynamicSelectInput = ({ property, kind, options }: CommonWidg
description={options.withDescription ? tWidget("description") : undefined}
searchable
{...inputProps}
value={value?.value ?? null}
onChange={(value) =>
onChange(
value
? {
value,
label:
selectOptions.filter((option) => typeof option === "object").find((option) => option.value === value)
?.label ?? value,
}
: null,
)
}
value={currentOption === null ? null : currentOption.value}
onChange={(selectedValue: string | null) => {
if (selectedValue === null) {
onChange(null);
return;
}
onChange({
value: selectedValue,
label: getLabelForValue(selectedValue),
});
}}
/>
);
};
@@ -53,7 +53,7 @@ export const WidgetSelectInput = ({ property, kind, options }: CommonWidgetInput
)}
leftSection={CurrentIcon && <CurrentIcon size={16} stroke={1.5} />}
renderOption={({ option, checked }) => {
const Icon = getIconFor(options.options, option.value);
const Icon = getIconFor(options.options, String(option.value));
return (
<Group flex="1" gap="xs">