added format command and added trailing commas to reduce conflicts

This commit is contained in:
dswbx
2025-02-26 20:06:03 +01:00
parent 88b5359f1c
commit 7743f71a11
414 changed files with 3622 additions and 3610 deletions

View File

@@ -12,7 +12,7 @@ import {
TagsInput,
TextInput,
Textarea,
createTheme
createTheme,
} from "@mantine/core";
import { twMerge } from "tailwind-merge";
@@ -26,7 +26,7 @@ export function createMantineTheme(scheme: "light" | "dark"): {
const dark = !light;
const baseComboboxProps: ComboboxProps = {
offset: 2,
transitionProps: { transition: "pop", duration: 75 }
transitionProps: { transition: "pop", duration: 75 },
};
const input =
@@ -39,97 +39,97 @@ export function createMantineTheme(scheme: "light" | "dark"): {
vars: (theme, props) => ({
// https://mantine.dev/styles/styles-api/
root: {
"--button-height": "auto"
}
"--button-height": "auto",
},
}),
classNames: (theme, props) => ({
root: twMerge("px-3 py-2 rounded-md h-auto")
root: twMerge("px-3 py-2 rounded-md h-auto"),
}),
defaultProps: {
size: "md",
variant: light ? "filled" : "white"
}
variant: light ? "filled" : "white",
},
}),
Switch: Switch.extend({
defaultProps: {
size: "md",
color: light ? "dark" : "blue"
}
color: light ? "dark" : "blue",
},
}),
Select: Select.extend({
classNames: (theme, props) => ({
//input: "focus:border-primary/50 bg-transparent disabled:text-primary",
input,
dropdown: `bknd-admin ${scheme} bg-background border-primary/20`
dropdown: `bknd-admin ${scheme} bg-background border-primary/20`,
}),
defaultProps: {
checkIconPosition: "right",
comboboxProps: baseComboboxProps
}
comboboxProps: baseComboboxProps,
},
}),
TagsInput: TagsInput.extend({
defaultProps: {
comboboxProps: baseComboboxProps
}
comboboxProps: baseComboboxProps,
},
}),
Radio: Radio.extend({
defaultProps: {
classNames: {
body: "items-center"
}
}
body: "items-center",
},
},
}),
TextInput: TextInput.extend({
classNames: (theme, props) => ({
wrapper: "leading-none",
input
})
input,
}),
}),
NumberInput: NumberInput.extend({
classNames: (theme, props) => ({
wrapper: "leading-none",
input
})
input,
}),
}),
Textarea: Textarea.extend({
classNames: (theme, props) => ({
wrapper: "leading-none",
input
})
input,
}),
}),
Modal: Modal.extend({
classNames: (theme, props) => ({
...props.classNames,
root: `bknd-admin ${scheme} ${props.className ?? ""}`,
content: "!bg-background !rounded-lg !select-none",
overlay: "!backdrop-blur-sm"
})
overlay: "!backdrop-blur-sm",
}),
}),
Tabs: Tabs.extend({
classNames: (theme, props) => ({
tab: "data-[active=true]:border-primary"
})
tab: "data-[active=true]:border-primary",
}),
}),
Menu: Menu.extend({
defaultProps: {
offset: 2
offset: 2,
},
classNames: (theme, props) => ({
dropdown: "!rounded-lg !px-1",
item: "!rounded-md !text-[14px]"
})
item: "!rounded-md !text-[14px]",
}),
}),
SegmentedControl: SegmentedControl.extend({
classNames: (theme, props) => ({
root: light ? "bg-primary/5" : "bg-lightest/60",
indicator: light ? "bg-background" : "bg-primary/15"
})
})
indicator: light ? "bg-background" : "bg-primary/15",
}),
}),
},
primaryColor: "dark",
primaryShade: 9
primaryShade: 9,
}),
forceColorScheme: scheme
forceColorScheme: scheme,
};
}