fossui 0.1.2
fossui: ^0.1.2 copied to clipboard
The Fresh, Minimal Flutter UI kit, 39 components. No app shell required. Inspired by coss.com/ui, Cal.com's design system.
0.1.2 #
Added #
FossChippresents a compact pill for a value the user can pick or drop. The callbacks decide its shape: with neither it is a static tag,onRemoveadds a close affordance,onSelectedmakes the body toggleselected, and both together give a filter chip that can also be dropped. Two variants (soft,outline), two sizes (sm24,md32), and aFossChipStylefor one-off overrides.FossListTilelays out a list row: an optional leading widget, a title over an optional subtitle, and an optional trailing widget. Only the title is required and every gap collapses with its slot. Two variants:filled(the default) paints a tinted, rounded surface so a plain list reads as a stack of bands, andplainis transparent so a row inside aFossCarddoes not double-draw. PassingonTapturns the row into one target with hover, pressed, and keyboard activation; leaving it null keeps it inert, which is separate fromenabled: false. Takes aFossListTileStylefor one-off overrides.FossPaginationpages through a list: a previous control, a run of page numbers with an ellipsis wherever the run is cut, and a next control. It is controlled throughpage,pageCount, andonPageChanged, and pages are 1-based.siblingCountsets how many pages sit either side of the current one, but it is an upper bound: the row uses the widest run the width it is given can hold, so it fits a phone without the caller measuring anything. That figure ignorespage, so the row does not resize while the user is paging. Takes aFossPaginationStylefor one-off overrides.FossTimePickerpicks a time of day from a field. The trigger is the oneFossDatePickeruses, so the two line up in a form; tapping it opens hour, minute, and period wheels in a bottom sheet, or a centered dialog throughpresentation. Where the date picker commits on a tap, this one keeps a draft in the sheet and reports throughonChangedonly when the footer confirms, because where a wheel stops scrolling is not the same as a choice.minuteStepcoarsens the minute column, anduse24HourFormatdrops the period column, following the device setting when left null.minTime,maxTime, andisTimeEnabledbound the range: a blocked time stays on the wheel rather than leaving a hole in it, dimmed, and the confirm action is disabled while the draft sits on one. Wheels are awkward without a pointer, so each column is a labelled adjustable that steps with the arrow keys. Values are the newFossTimeOfDay;FossTimePickerStylecovers one-off overrides.
Changed #
FossMultiComboboxnow renders its selected values asFossChip. The look is unchanged; the chip is public API, so the same pill is available outside the field.
Fixed #
FossCalendarkeyboard focus ring now follows the day's own corners. On a range, the ring drew a fully rounded box over the half-rounded start and end fills, so a focused end day showed a rounded outline with the flat fill edge poking out behind it. The ring now traces the fill: rounded on the outer side of a range end, square through the middle days.FossNumberFieldsteppers now fill the full field height, so a stepper's hover fill and tap target span the button instead of a short band floating in the middle. The hover fill is clipped to the field's rounded corner, so it no longer squares off over the border.
0.1.1 #
Added #
FossAccordionpresents a vertical stack of collapsible sections. It is keyboard navigable, supports single or multiple open sections, and takes aFossAccordionStylefor one-off overrides.FossCalendarshows a single month grid with single, multiple, or range selection (FossCalendar.single/.multiple/.range), aFossDateRangevalue type,minDate/maxDateandisDateEnabledbounds, keyboard grid navigation, and aFossCalendarStylefor one-off overrides.FossDatePickeropens aFossCalendarin a modal dialog from a field trigger and shows the chosen date back in it (FossDatePicker.single/.range). It presents as a bottom sheet by default or a centered card viapresentation, and takes aformatcallback with a built-in default (no date library), acloseOnSelectpolicy, controlled (open+onOpenChange) or uncontrolled open, keyboard open andEscapedismiss,minDate/maxDate/isDateEnabled/firstDayOfWeekpassed through to the calendar, and aFossDatePickerStylefor one-off overrides.FossMeterrenders a static gauge for a bounded value, themed throughFossMeterStyle.FossNumberFieldpairs a numeric input with decrement and increment steppers, clamping to[min, max]withstepandlargeStep,format/parsecallbacks, three sizes, and aFossNumberFieldStylefor one-off overrides.FossOtpFieldis a segmented one-time-code field: a row of single-character slots over one hidden input, with typing, backspace, arrow, and paste (or platform one-time-code autofill) driving a shared value. It takes a requiredlength, controlled (value+onChanged) or uncontrolled use, anonCompletedcallback, two sizes, charactervalidation(numeric default), optionalobscuremasking, optionalgroupsseparators, anerrorstate, and aFossOtpFieldStylefor one-off overrides.FossPopoveranchors an interactive floating surface to a trigger, opening on a preferredside/alignand flipping to stay on screen. It is controlled (open+onOpenChange) or uncontrolled, with aFossPopoverControllerfor imperative open / close / toggle, an optionalmodalscrim with focus trap, outside-tap andEscapedismiss, and aFossPopoverStylefor one-off overrides.FossSkeletonis a loading placeholder that stands in for content while it loads: amuted-filled box (orFossSkeleton.circlefor avatars) with superellipse corners and a shimmer that sweeps on theskeletonmotion token and stops under reduced motion. Size it to the content it replaces.FossTextrenders a string in a type step (FossTextSize) at one of four weights (FossTextWeight), with an optional semantic color role (FossTextColor) that uses theforegroundrole when unset. Named constructors (FossText.body/.label/.title/.heading/.display/.caption) cover the common roles, aTextStylemerges over the resolved style for a one-off, an opt-inheaderflag marks a true document heading for assistive technology, and the commonTextprops pass through.FossToggleis a two-state pressable button that holds an on / off state (pressed+onPressedChanged, null disables). It renders a label, aleadingicon, or a square icon-only control, withstandardandoutlinevariants, three sizes, keyboard toggle, a focus ring, and aFossToggleStylefor one-off overrides.FossToggleGroupbinds a set of toggles to one selection (FossToggleGroup.single/.multiple), propagatingvariantandsizeto everyFossToggleGroupItem. Theoutlinevariant joins the items into a segmented bar with a shared border and rounded outer ends;standardspaces them. It supports horizontal or verticalorientation, group and per-item disable, and aFossToggleGroupStylefor one-off overrides.
Improved #
FossDrawernow fades its content at whichever scroll edge still has more to show, cueing that the panel body scrolls.
Fixed #
- The default type scale now renders in the bundled Geist font in consumer apps. The family is referenced package-qualified, so text no longer fell back to the platform system font.
0.1.0 #
The first stable release. fossui ships 21 themeable, accessible components,
themed from one source and reached through a single import. It works under
MaterialApp, CupertinoApp, or a bare WidgetsApp, with no FossApp wrapper.
This cut also lands a documentation pass and a few public API renames for naming
consistency.
Added #
FossSinceannotation marks the version a public API arrived in. Everything in this release is unannotated; the marker starts appearing on APIs added after0.1.0.
Changed #
- Toast naming now lines up with the other variant enums.
FossToastTypeisFossToastVariant, itsnormalcase isneutral, andFossToasttakes the variant throughvariant:rather thantype:. - The accessibility label parameter is spelled
semanticLabelthroughout.FossAvatar,FossBadge,FossProgress,FossSwitch, andFossTooltipdrop the oldsemanticsLabelspelling to match the rest of the set. - Picker callbacks line up on
onChanged.FossComboboxandFossMultiComboboxreport a pick throughonChanged(wasonSelected), matchingFossSelectand the other form fields.FossSelect.onChangednarrows toValueChanged<T>, since the field has no clear action and never reported null. showFossToastreturns aFossToastHandleinstead of a bare id. Call.dismiss()or.update()on it to control the toast, noBuildContextneeded.FossMultiSelect.selectionLabelis nowselectionLabelBuilder, matching the builder-parameter convention.FossCheckboxGroupScopeandFossRadioGroupScopeare no longer part of the public API; they were internal plumbing, never meant to be used directly.
Improved #
- API docs carry more for every component: a per-theme preview image, links to the documentation site and live playground, an explicit summary of what the component does and does not do, sidebar grouping by category, and cross-links between related components. Previews also show on hover over a constructor.
- Accessibility refinements: the slider stops announcing an unchanged value once it reaches either bound, the drawer names its route for screen readers, and the disabled switch drops the forbidden cursor for the standard pointer.
- Design fidelity: title-to-description spacing now tracks each surface (tighter on the alert and toast, looser on the dialog and drawer), every form error caption shares the deeper destructive-foreground red, the select trigger padding lines up with the other fields, the toast enter and exit ease over a longer beat with a lighter rear-card tint, the tabs indicator uses a symmetric ease, the alert action row keeps its full gap above the text, and checkbox and radio labels are medium weight.
Fixed #
- A single-select combobox no longer collapses to the chosen row when reopened; the full option list shows again.
- Tabs seeded with an
initialValuethat names a disabled or missing tab now fall back to the first enabled tab instead of leaving the panel blank. - Fields and dialogs render correctly under a theme with a zero corner radius.
- Right-to-left fixes: the multi-select combobox placeholder and the select popup align to the reading-direction start rather than the physical left.
- A diagonal swipe on a toast dismisses it once instead of firing its dismiss twice.
0.1.0-beta.3 #
A quality pass over every component: accessibility, visual fidelity, touch targets, and golden coverage. No new components, plus one additive theming API for one-call rebrands.
Added #
FossThemeData.rethemelayers a compactFossThemeSpecover a base theme: enumerated color roles, plus single seeds for radius, spacing, shadow tint, and font family.FossRadii.fromBasederives the radius scale from one value.
Improved #
- Accessibility across the set. The progress bar exposes its role and numeric range. Radio groups get arrow-key roving focus and a group role. The spinner stops under reduced motion and announces once on appear. Toasts announce errors assertively and hold open while pressed. Text fields expose the hint as an accessible hint and drop focus on an outside tap.
- Touch targets sized for the finger. A standalone checkbox and an icon-only button floor to a full target, while grouped rows hug their content so a stack keeps even spacing.
- Fidelity fixes. Softer resting shadows on the switch, tabs, tooltip, and slider. Corrected padding on the badge, tabs, and text field. Card content inherits the card foreground, and every form error caption shares one color.
- Toasts swipe to dismiss in any direction, and the drawer drags without rebuilding its panel. A burst of toasts now collapses into a peek pile, so the stack stays compact instead of filling the screen.
- The bundled font ships lighter, trimmed to the glyphs and weights the library renders, so it adds about half of what it did to an app.
Fixed #
- A toast queued behind the visible cap no longer expires before it is seen; its timer pauses until it surfaces.
0.1.0-beta.2 #
Consolidation and polish. No new components; the public API is unchanged.
Improved #
- Dialogs share one surface and route.
FossAlertDialogcomposesFossDialog, and a helper presents either as a bottom sheet or a centered card. - Select and combobox popups dismiss on scroll, stay within the viewport, and open on arrow-down.
- The text field and combobox share one field frame, so their border, focus ring, and sizing match.
- Default marks (checks, chevrons, close, status icons) render from one internal glyph set, for a single consistent geometry.
Fixed #
- Combobox popup no longer duplicates entries or leaves its overlay behind.
0.1.0-beta.1 #
First component release. Everything ships from a single
import 'package:fossui/fossui.dart';.
Theming #
- Token system as a
ThemeExtension:FossThemeDatawith light and dark defaults, six token bundles (colors, typography, radii, spacing, shadows, motion), aFossThemewidget for non-Material apps, and thecontext.fossThemeaccessor.
Components #
- Buttons and inputs:
FossButton(with an icon-only variant),FossTextField,FossCheckbox,FossRadio,FossSwitch,FossSlider. - Selection:
FossSelect,FossMultiSelect,FossCombobox. - Surfaces and overlays:
FossCard,FossDialog,FossAlertDialog,FossDrawer,FossTooltip,FossToastwithFossToaster. - Feedback and display:
FossAlert,FossBadge,FossAvatar,FossProgress,FossSpinner,FossSeparator,FossTabs.
