Migrate to Mantine v8 and Design Changes (#961)

* mantine v8 migration

* various design changes and improvements
This commit is contained in:
Jeff
2025-06-24 00:04:36 -07:00
committed by GitHub
parent bea55d48a8
commit c1330d92b2
473 changed files with 12469 additions and 11607 deletions
@@ -0,0 +1,27 @@
.root {
color: var(--theme-colors-foreground);
transition: color 0.2s ease-in-out;
}
.muted {
color: var(--theme-colors-foreground-muted);
}
.link {
cursor: pointer;
}
.link:hover {
color: var(--theme-colors-foreground);
text-decoration: underline;
}
.no-select {
user-select: none;
}
.overflow-hidden {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -0,0 +1,49 @@
import type { TitleProps as MantineTitleProps } from '@mantine/core';
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
import { createPolymorphicComponent, Title as MantineHeader } from '@mantine/core';
import clsx from 'clsx';
import styles from './text-title.module.css';
type MantineTextTitleDivProps = ComponentPropsWithoutRef<'div'> & MantineTitleProps;
interface TextTitleProps extends MantineTextTitleDivProps {
children?: ReactNode;
isLink?: boolean;
isMuted?: boolean;
isNoSelect?: boolean;
overflow?: 'hidden' | 'visible';
to?: string;
weight?: number;
}
const _TextTitle = ({
children,
className,
isLink,
isMuted,
isNoSelect,
overflow,
...rest
}: TextTitleProps) => {
return (
<MantineHeader
className={clsx(
styles.root,
{
[styles.link]: isLink,
[styles.muted]: isMuted,
[styles.noSelect]: isNoSelect,
[styles.overflowHidden]: overflow === 'hidden' && !rest.lineClamp,
},
className,
)}
{...rest}
>
{children}
</MantineHeader>
);
};
export const TextTitle = createPolymorphicComponent<'div', TextTitleProps>(_TextTitle);