Files
Manuel Emilio Urena b79215aa0a Mantine v7 Migration (#1717)
* Start migration, start updating files & details

* Attempt at migrating ContainerGrid styles

* Continue migration

* Migrate tag/[tagname]

* Checkpoint: Before the adsProvider migration

* General progress - migrate complex AdUnit useStyles

* Migrates VotableTags component to mantine v7

* Migrate card styles, profile styles and more

* More migrations

* Nits

* Migrates components to mantine v7

* Migrate all articles components

* Updates User components to mantine v7

* Cleanup to files up to ChatList.tsx

* Checkpoint: Container Grid

* Migrate up to CosmeticShopItemUpsertForm

* Mantine migration: Training and subscription components

* Fixes alpha color mix in css modules

* Checkpoint up to QuickSearchDropdown

* Checkpoint up to RouterTransition

* Checkpoint up to ImageResources

* Fixes after merging with main

* Checkpoint - main components

* Some pages

* Fix minor nit

* Completes migration of pages components

* 2nd pass of fixes'

* More fixes after typecheck

* Last type fixes

* Somehow, manage initial render

* Minor nits, initial render, improvements

* Update colors in theme

* Minor changes and improvements

* Fixes app header and footer styles

* Replaces sx and  text color everywhere

* Fixes media queries

* Fixes ContainerGrid

* Fixes ActionIcon styles everywhere

* Fixes alpha color mix in css modules

* Fixes dark/light theme not working with tailwind

* Fixes after merging with main

* Fixes bad css module imports

* Fixes issues preventing build

* Main fixes to account and model feed pages

* Fixes after merging with main

* Fixes animation module file typo

* Fixes to feeds

* Fixes after merging with main

* Fixes icons in menu items

* Fixes homeblocks and other things

* Fixes to AuctionFiltersDropdown

* Fixes home page and most feed cards

* Fixes most styles in the generation form

* Fixes gen panel

* Fixes shop styles

* Updates package-lock file

* Fixes after merging with main

* Creator program nits

* Fixes search page styles

* Several fixes to small pages

* Fixes css type issues

* Fixes reviews page and css modules types issues

* Fixes lock file and tailwind vars

* Fixes package-lock

* More fixes to package-lock

* Buzz dashboard nits

* Minor model form nits

* Fixes model details page and richTextEditor styles

* Start working on the training page

* Brings back old color scheme

* loader types + auction

* Fixes most forms

* Fixes type issues

* Adjusts text link color

* Fixes collections layout and styles

* Final touches to the image detail page

* Fixes after merging with main

* Fix autocomplete search

* Small tweaks and fixes

* More style fixes

* Fixes notifications and navigation progress

* Fixes after merging with main

* Adds creatable multiselect component

* Fixes grouped select input

* Adjusts aria-label for close buttons in modal

* More small fixes

* Fixes nits from review

* Bunch of fixes all around

* Fixes after merging with main

* Another wave of fixes

* Fixes after merging with main

* Bunch of updates based off review feedback

* General fixes

* Finishes migrating all user facing pages and components

* Fixes type issues

* Fixes admin pages

* Last round of feedback incoming

---------

Co-authored-by: Luis Rojas <lrojas94@gmail.com>
Co-authored-by: Brett Woodward <flipperbw@gmail.com>
2025-06-18 15:20:59 -04:00

3.1 KiB

Mantine Migration Guide

This document outlines the breaking changes when migrating Mantine from version 5 to 6 and from version 6 to 7.

🧨 Mantine v5 → v6 Breaking Changes

📅 Date & Time Components

  • Renamed Components:
    • DatePickerDatePickerInput
    • CalendarDatePicker
  • Removed Components:
    • TimeRangeInput
    • DateRangePicker
    • RangeCalendar
  • Updated Components:
    • TimeInput now uses native <input type="time">
  • Prop Changes:
    • amountOfMonthsnumberOfColumns
    • allowFreeInput removed; use DateInput instead
    • dayClassName and dayStyle removed; use getDayProps

🎨 Theme Object Adjustments

  • Removed from theme:
    • dateFormat, datesLocale
  • Prop Renames:
    • withFocusReturnreturnFocus
    • overflowscrollAreaComponent
    • overlayBluroverlayProps.blur
    • overlayColoroverlayProps.color
    • overlayOpacityoverlayProps.opacity
    • exitTransitionDurationtransitionProps.exitDuration
    • transitiontransitionProps.transition
    • transitionDurationtransitionProps.duration
    • transitionTimingFunctiontransitionProps.timingFunction

🧮 NumberInput Component

  • Props now expect number | '' instead of number | undefined

🔢 Pagination Component

  • Prop Changes:
    • itemComponent, getItemAriaLabel removed; use getItemProps
    • initialPagedefaultValue
    • pagevalue

🔍 Spotlight Component

  • Now based on Modal
  • Prop Renames follow same pattern as above

🧪 Input Components

  • invalid prop → error
  • Styles API updated: use data-* attributes

🚨 Mantine v6 → v7 Breaking Changes

🎨 Styling Overhaul

  • Removed:
    • createStyles function
    • Nested selectors in sx, styles props
  • Recommendations:
    • Use CSS Modules or className, style props
    • Use postcss-preset-mantine for advanced styling

🧩 @mantine/emotion Package

  • Optional package to restore createStyles and sx behavior during migration

🛠 Migration Tips

  • Transition to CSS Modules or Tailwind classes
  • Use @mantine/emotion for interim compatibility
  • Review and test each component after migration
  • Use Tailwind CSS instead of Mantine createStyles or sx props.
  • Remove all createStyles usage. Convert styles to Tailwind classNames directly on components.
  • If a Mantine component has an sx or classNames prop, replace it with a className using Tailwind.
  • Keep using Mantine components, but prefer native HTML elements when simpler.
  • Use Tailwind utility classes for spacing, layout, colors, and typography.
  • Avoid inline styles. Use Tailwind whenever possible.
  • Assume Tailwind config includes custom colors and spacing aligned with Mantine theme.
  • Do not suggest Emotion or styled-components. Tailwind is the preferred styling method.
  • Treat Mantine components as unstyled when possible — all visuals handled by Tailwind.

📚 References