mihr_ui 0.1.0-dev.3
mihr_ui: ^0.1.0-dev.3 copied to clipboard
A complete Flutter UI kit with design tokens, semantic theme extensions, automatic light/dark mode, WCAG-compliant palette generation, and production-ready components.
Changelog #
[Unreleased] #
0.1.0-dev.3 - 2026-05-14 #
Added #
- Theme:
MihrThemeConfig— immutable preset that groups all theme customization (brand, gray, error/warning/success palettes, font family, button theme, extra extensions, andmaterialOverridesescape-hatch) into a single shareable value withcopyWithsupport. - Buttons:
MihrButtonData—InheritedWidgetinserted above every button's content; exposes resolvedforegroundColor,iconColor, andbackgroundColorto arbitrary child widgets (custom painters, SVGs, progress indicators). - Buttons:
styleBuilderparameter on all button variants — receives the fully merged default + themeButtonStyleand returns a modified copy; mutually exclusive withstyle. - Typography:
MihrTypography.of(context)/MihrTypography.maybeOf(context)— typed context accessors for the font-family-aware instance registered in the theme. Also available ascontext.typography. - Typography:
MihrTypography.fromFontFamily(String)constructor — builds a full type-scale instance for any font family, caching the default Inter instance.
Changed #
- Theme:
MihrTheme.light()/MihrTheme.dark()named parameters (brand,gray,error,warning,success,fontFamily,buttonTheme) are now@Deprecated. Pass aMihrThemeConfigvia theconfig:parameter instead. Removal scheduled for 0.2.0.
Fixed #
- Buttons:
MihrTertiaryButton(ghost) hover background usedbg.tertiary— semantically reserved for toggles/sliders and identical tobg.primaryHoverin dark mode, producing invisible hover on dark surfaces. Corrected tobg.primaryHover(one step above the primary surface, consistent withMihrSecondaryButton). Added light + dark hover regression tests forMihrTertiaryButton,MihrSecondaryButton, andMihrDestructiveButton.tertiary.
Removed #
- BREAKING — Buttons:
MihrButtonThemeData.sizesandlinkSizescustom size override properties removed. Use thestyleBuilderor per-instancestyleparameter to adjust padding and height constraints. - BREAKING — Buttons:
MihrButtonShadows.focusOuterproperty andwithFocusRing()method removed. Focus rings are now handled internally. - BREAKING — Typography: Static
MihrTypography.displayXxx/MihrTypography.textXxxproperties removed. Replace all direct static access withcontext.typography.displayXxxorMihrTypography.of(context).displayXxx.
0.1.0-dev.2 #
0.1.0-dev.1 #
Added #
- Color system:
ColorScaledata class with 12 shades (25-950), 6 core palettes (brand, gray, grayDark, error, warning, success), 17 accent palettes, and 7 gray variants. - Semantic tokens:
TextColors(23),BackgroundColors(32),BorderColors(10),ForegroundColors(21),AlphaColors(20),UtilityColors(18 families),ComponentColors(29). **ColorScaleGenerator**: Runtime palette generation from a single color with WCAG AA auto-correction and contrast reporting.- Typography:
MihrTypographywith 11 sizes x 4 weights (44 styles) and MaterialTextThemebridge. - Spacing:
MihrSpacingwith 30 primitives + 17 semantic tokens +EdgeInsets/SizedBoxgap helpers.MihrWidthsfor max-width constraints.MihrBreakpointsfor responsive grid configuration. - Border radius:
MihrRadiuswith 11 named sizes (none-full) and pre-builtBorderRadiusconstants. - Shadows:
MihrBackdropBlurswith 4 presets (sm/md/lg/xl). - Gradients:
GrayGradients(14),BrandGradients(7),DecoGradients(91 decorative). - Theme:
MihrTheme.light()/.dark()with full MaterialColorScheme(30+ properties), 22 widget theme overrides, and all semantic token extensions. - Buttons:
MihrPrimaryButton,MihrSoftPrimaryButton,MihrSecondaryButton,MihrTertiaryButton,MihrLinkButton,MihrDestructiveButtonwith 4 sizes (sm/md/lg/xl), icon variants, loading state, andMihrButtonThemeDataextension.