Skip to content

Commit

Permalink
Bump @mantine/form from 6.0.10 to 7.0.0 in /frontend
Browse files Browse the repository at this point in the history
Bumps [@mantine/form](https://github.com/mantinedev/mantine/tree/HEAD/src/mantine-hooks) from 6.0.10 to 7.0.0.
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.0.0/src/mantine-hooks)

---
updated-dependencies:
- dependency-name: "@mantine/form"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
  • Loading branch information
dependabot[bot] authored and evroon committed Nov 27, 2023
1 parent fcf8dd1 commit d733691
Show file tree
Hide file tree
Showing 34 changed files with 194 additions and 251 deletions.
16 changes: 8 additions & 8 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"@emotion/react": "^11.10.6",
"@emotion/server": "^11.10.0",
"@hello-pangea/dnd": "^16.3.0",
"@mantine/core": "^6.0.5",
"@mantine/dates": "^6.0.5",
"@mantine/dropzone": "^6.0.5",
"@mantine/form": "^6.0.5",
"@mantine/hooks": "^6.0.5",
"@mantine/next": "^6.0.5",
"@mantine/notifications": "^6.0.5",
"@mantine/spotlight": "^6.0.5",
"@mantine/dates": "^7.0.0",
"@mantine/spotlight": "^7.0.0",
"@mantine/core": "^7.0.0",
"@mantine/dropzone": "^7.0.0",
"@mantine/form": "^7.0.0",
"@mantine/hooks": "^7.0.0",
"@mantine/next": "^6.0.21",
"@mantine/notifications": "^7.0.0",
"@next/bundle-analyzer": "^13.3.1",
"@react-icons/all-files": "^4.1.0",
"@tabler/icons-react": "^2.17.0",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/brackets/brackets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function getRoundsGridCols(
function NoRoundsAlert({ readOnly }: { readOnly: boolean }) {
if (readOnly) {
return (
<Alert icon={<IconAlertCircle size={16} />} title="No rounds found" color="blue" radius="lg">
<Alert icon={<IconAlertCircle size={16} />} title="No rounds found" c="blue" radius="lg">
Please wait for the organiser to add them.
</Alert>
);
Expand All @@ -112,7 +112,7 @@ function NotStartedAlert() {
<Alert
icon={<IconAlertCircle size={16} />}
title="Tournament has not started yet"
color="blue"
c="blue"
radius="lg"
>
Please wait for the tournament to start.
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/buttons/delete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';

export default function DeleteButton(props: any) {
return (
<Button color="red" size="xs" leftIcon={<MdDelete size={20} />} {...props}>
<Button c="red" size="xs" leftSection={<MdDelete size={20} />} {...props}>
{props.title}
</Button>
);
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/buttons/next_stage_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export function NextStageButton({ tournamentData, swrStagesResponse }: any) {
<Button
size="md"
style={{ marginBottom: 10 }}
color="indigo"
leftIcon={<IconSquareArrowRight size={24} />}
c="indigo"
leftSection={<IconSquareArrowRight size={24} />}
onClick={async () => {
await activateNextStage(tournamentData.id, 'next');
swrStagesResponse.mutate();
Expand All @@ -26,8 +26,8 @@ export function PreviousStageButton({ tournamentData, swrStagesResponse }: any)
<Button
size="md"
style={{ marginBottom: 10 }}
color="indigo"
leftIcon={<IconSquareArrowLeft size={24} />}
c="indigo"
leftSection={<IconSquareArrowLeft size={24} />}
onClick={async () => {
await activateNextStage(tournamentData.id, 'previous');
swrStagesResponse.mutate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function ColorSchemeToggle() {
const { colorScheme, toggleColorScheme } = useMantineColorScheme();

return (
<Group position="center" mt="xl">
<Group justify="center" mt="xl">
<ActionIcon
onClick={() => toggleColorScheme()}
size="xl"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/forms/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function UserForm({ user }: { user: UserInterface }) {
type="email"
{...details_form.getInputProps('email')}
/>
<Button fullWidth style={{ marginTop: 20 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 20 }} c="green" type="submit">
Save
</Button>
</form>
Expand All @@ -74,7 +74,7 @@ export default function UserForm({ user }: { user: UserInterface }) {
})}
>
<PasswordStrength form={password_form} />
<Button fullWidth style={{ marginTop: 20 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 20 }} c="green" type="submit">
Save
</Button>
</form>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/info/player_score.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function PlayerScore({ score, min_score, max_score, color, decimals }: Sc

return (
<>
<Group position="apart">
<Text size="xs" color={color} weight={700}>
<Group justify="apart">
<Text size="xs" c={color} fw={700}>
{score.toFixed(decimals)}
</Text>
</Group>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/info/player_statistics.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Group, Progress, Text, createStyles } from '@mantine/core';

const useStyles = createStyles((theme) => ({
const useStyles = createStyles((theme: any) => ({
progressBar: {
'&:not(:first-of-type)': {
borderLeft: `3px solid ${theme.colorScheme === 'dark' ? theme.colors.dark[7] : theme.white}`,
Expand Down Expand Up @@ -35,19 +35,19 @@ export function WinDistribution({ wins, draws, losses }: PlayerStatisticsProps)

const draws_text =
draws === 0 ? null : (
<Text size="xs" color="orange" weight={700}>
<Text size="xs" c="orange" fw={700}>
{draws.toFixed(0)}
</Text>
);

return (
<>
<Group position="apart">
<Text size="xs" color="teal" weight={700}>
<Group justify="apart">
<Text size="xs" c="teal" fw={700}>
{wins.toFixed(0)}
</Text>
{draws_text}
<Text size="xs" color="red" weight={700}>
<Text size="xs" c="red" fw={700}>
{losses.toFixed(0)}
</Text>
</Group>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/modals/club_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ export default function ClubModal({
const icon = is_create_form ? <GoPlus size={20} /> : <BiEditAlt size={20} />;
const [opened, setOpened] = useState(false);
const modalOpenButton = is_create_form ? (
<Group position="right">
<Group justify="right">
<SaveButton
onClick={() => setOpened(true)}
leftIcon={<GoPlus size={24} />}
leftSection={<GoPlus size={24} />}
title={operation_text}
/>
</Group>
) : (
<Button
color="green"
c="green"
size="xs"
style={{ marginRight: 10 }}
onClick={() => setOpened(true)}
leftIcon={icon}
leftSection={icon}
>
{operation_text}
</Button>
Expand Down Expand Up @@ -68,7 +68,7 @@ export default function ClubModal({
{...form.getInputProps('name')}
/>

<Button fullWidth style={{ marginTop: 10 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 10 }} c="green" type="submit">
Save
</Button>
</form>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/modals/player_update_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function PlayerUpdateModal({
const [opened, setOpened] = useState(false);
const modalOpenButton = (
<Button
color="green"
c="green"
size="xs"
style={{ marginRight: 10 }}
onClick={() => setOpened(true)}
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function PlayerUpdateModal({
{...form.getInputProps('active', { type: 'checkbox' })}
/>

<Button fullWidth style={{ marginTop: 10 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 10 }} c="green" type="submit">
Save
</Button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/modals/round_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function RoundModal({
label="This round is a draft round"
{...form.getInputProps('is_draft', { type: 'checkbox' })}
/>
<Button fullWidth style={{ marginTop: 20 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 20 }} c="green" type="submit">
Save
</Button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/modals/team_update_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function TeamUpdateModal({
{...form.getInputProps('player_ids')}
/>

<Button fullWidth style={{ marginTop: 10 }} color="green" type="submit">
<Button fullWidth style={{ marginTop: 10 }} c="green" type="submit">
Save
</Button>
</form>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/modals/tournament_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function GeneralTournamentForm({
{...form.getInputProps('auto_assign_courts', { type: 'checkbox' })}
/>

<Button fullWidth mt={8} color="green" type="submit">
<Button fullWidth mt={8} c="green" type="submit">
Save
</Button>
</form>
Expand All @@ -188,10 +188,10 @@ export default function TournamentModal({
clubs={clubs}
/>
</Modal>
<Group position="right">
<Group justify="right">
<SaveButton
onClick={() => setOpened(true)}
leftIcon={<GoPlus size={24} />}
leftSection={<GoPlus size={24} />}
title={operation_text}
/>
</Group>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/navbar/_brand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function Brand() {
paddingTop: '1rem',
})}
>
<Group position="apart" ml="1rem">
<Group justify="apart" ml="1rem">
<UnstyledButton
onClick={async () => {
await router.push('/');
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/navbar/_main_links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface MainLinkProps {
function MainLink({ item, pathName }: { item: MainLinkProps; pathName: String }) {
const { classes, cx } = useNavbarStyles();
return (
<Tooltip label={item.label} position="right" transitionProps={{ duration: 0 }}>
<Tooltip label={item.label} justify="right" transitionProps={{ duration: 0 }}>
<UnstyledButton
onClick={() => item.router.push(item.endpoint)}
className={cx(classes.link, { [classes.linkActive]: pathName === item.endpoint })}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/tables/players.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export default function PlayersTable({
<tr key={player.id}>
<td>
{player.active ? (
<Badge color="green">Active</Badge>
<Badge c="green">Active</Badge>
) : (
<Badge color="red">Inactive</Badge>
<Badge c="red">Inactive</Badge>
)}
</td>
<td>
Expand All @@ -78,7 +78,7 @@ export default function PlayersTable({
score={player.elo_score}
min_score={minELOScore}
max_score={maxELOScore}
color="indigo"
c="indigo"
decimals={0}
/>
</td>
Expand All @@ -87,7 +87,7 @@ export default function PlayersTable({
score={player.swiss_score}
min_score={0}
max_score={maxSwissScore}
color="grape"
c="grape"
decimals={1}
/>
</td>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/tables/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export function ThSortable({ children, field, state }: ThProps) {
return (
<th className={classes.th}>
<UnstyledButton onClick={onSort} className={classes.control}>
<Group position="apart">
<Text weight={800} size="sm">
<Group justify="apart">
<Text fw={800} size="sm">
{children}
</Text>
<Center className={classes.icon}>{getSortIcon(sorted, state.reversed)}</Center>
Expand All @@ -103,8 +103,8 @@ export function ThNotSortable({ children }: { children: React.ReactNode }) {

return (
<th className={classes.th}>
<Group position="apart" ml="20px">
<Text weight={800} size="sm">
<Group justify="apart" ml="20px">
<Text fw={800} size="sm">
{children}
</Text>
</Group>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/tables/teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function TeamsTable({
.map((team) => (
<tr key={team.id}>
<td>
{team.active ? <Badge color="green">Active</Badge> : <Badge color="red">Inactive</Badge>}
{team.active ? <Badge c="green">Active</Badge> : <Badge c="red">Inactive</Badge>}
</td>
<td>{team.name}</td>
<td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/tables/tournaments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export default function TournamentsTable({
</td>
<td>
<Button
color="green"
c="green"
size="xs"
style={{ marginRight: 10 }}
onClick={() => router.push(`/tournaments/${tournament.id}/settings`)}
leftIcon={<BiEditAlt size={20} />}
leftSection={<BiEditAlt size={20} />}
>
Edit Tournament
</Button>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/tables/upcoming_matches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function UpcomingMatchesTable({
<tr key={`${upcoming_match.team1.id} - ${upcoming_match.team2.id}`}>
<td>
{upcoming_match.is_recommended ? (
<Badge leftSection={<IconCheck size={18} />} color="blue">
<Badge leftSection={<IconCheck size={18} />} c="blue">
Recommended
</Badge>
) : null}
Expand All @@ -75,11 +75,11 @@ export default function UpcomingMatchesTable({
<td>{upcoming_match.swiss_diff.toFixed(1)}</td>
<td>
<Button
color="green"
c="green"
size="xs"
style={{ marginRight: 10 }}
onClick={() => scheduleMatch(upcoming_match)}
leftIcon={<IconCalendarPlus size={20} />}
leftSection={<IconCalendarPlus size={20} />}
>
Schedule
</Button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/utils/empty_table_info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function EmptyTableInfo({
<Alert
icon={<IconAlertCircle size={16} />}
title={`No ${entity_name} found`}
color="blue"
c="blue"
radius="lg"
mt={8}
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/utils/error_alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';

export function ErrorAlert({ title, message }: { title: string; message: string }) {
return (
<Alert icon={<IconAlertCircle size={16} />} title={title} color="red" radius="lg">
<Alert icon={<IconAlertCircle size={16} />} title={title} c="red" radius="lg">
{message}
</Alert>
);
Expand Down
Loading

0 comments on commit d733691

Please sign in to comment.