Skip to content

v0.2.0

Latest

Choose a tag to compare

@Ako2003 Ako2003 released this 04 Apr 11:26
· 84 commits to main since this release

What's New

Bug Fixes

  • SSR Safety — Modal, Drawer, AlertDialog, DatePicker, and ThemeProvider now guard against document/window access during server-side rendering
  • useToast infinite loop — getServerSnapshot now returns a cached empty array instead of creating a new one each call
  • Portaled dropdowns — Select, Autocomplete, MultiSelect, TimeField, and Dropdown menus now render via createPortal to document.body, preventing clipping by parent overflow containers
  • Toast timer cleanup — Auto-dismiss timers are tracked and cleared on manual dismiss or component reset
  • Drawer setState during render — Replaced render-time setState with derived state pattern

Accessibility

  • asChild prop on Popover.Trigger, Dropdown.Trigger, and Tooltip.Trigger — avoids nested <button> hydration errors
  • Tooltip keyboard support — tabIndex={0}, role="button", Enter/Space activation
  • prefers-reduced-motion — Global media query disables all animations and transitions
  • Focus-visible outlines — Added :focus-visible replacements for 11 components that had outline: none
  • DateRangePicker focus trap — Tab/Shift+Tab wraps within the calendar popup

CSS Architecture

  • Z-index token scale — --mantle-z-dropdown (1000) through --mantle-z-tooltip (6000) replace hardcoded 9999 values
  • Dark mode colors — Replaced hardcoded white/#fff in Slider thumb, Switch thumb, Pagination, ColorSlider, and ColorArea with CSS variable fallbacks

New Features

  • DateRangePicker uncontrolled mode — defaultStartDate and defaultEndDate props
  • Input wrapperClassName — Style the outer wrapper div independently
  • Custom hex colors — All components accept any hex string in the color prop
  • CSS variable overrides — --mantle-bg, --mantle-border, --mantle-text, --mantle-ring, --mantle-hover on every component

Documentation

  • Landing page with interactive component showcase
  • Rich examples for Form, DataTable, Toolbar, Separator, DataField, Disclosure, Dropdown, Modal, Tooltip
  • Responsive props tables (card layout on mobile)

Full Changelog: https://github.com/Ako2003/mantleui/commits/v0.2.0