naked_ui 1.5.0
naked_ui: ^1.5.0 copied to clipboard
A library of behavior-first UI components for Flutter that separate state from presentation.
1.5.0 #
Features #
- Add
NakedTooltip.isFocusVisible. Gaining focus shows the tooltip only when it returns true, so focus that a closing menu or dialog hands back to the trigger after a click does not open it; hover still does. Without it, every focus shows the tooltip, as before.
1.4.0 #
Features #
- Add
OverlayPositionConfig.minimumAvailableHeight, a configurable policy for height-constrained top/bottom panels with collision avoidance. It defaults to 48 logical pixels for a typical interactive row; adjust it for content and padding, or set zero for strict side-capping even at zero headroom.
Fixes #
- Keep constrained overlays usable when an anchor leaves too little room above or below it. Collision positioning may overlap the anchor below the configured threshold; the fallback still respects collision padding.
- Keep live loading announcements separate from a caller-owned menu trigger's accessible name, while preserving its expanded state.
1.3.1 #
Fixes #
- In right-to-left horizontal tab bars, Left and Right move focus to the visually adjacent tab, including wrapping and skipping disabled tabs.
1.3.0 #
Features #
- Add
NakedMenu.openOnTap(defaulttrue). Set it tofalseto use your own control as the trigger: the menu then draws noNakedButton, adds no tap or keyboard activation or focus stop, and leaves opening and closing to thecontroller. AttachtriggerFocusNodeto the control so focus returns to it when the menu closes. The menu merges the control's semantics into one node that carries the expanded state, so do not wrap the control inMergeSemantics, and it must not setsemanticLabel. It cannot befalsefor an item of aNakedMenubar. - Add
constrainToAvailableHeighttoNakedSelect,NakedMenu, andOverlayPositioner(defaultfalse, so nothing changes until it is set). A panel placed above or below its trigger is then laid out no taller than the space on that side, aftersideOffsetandcollisionPadding, instead of as tall as the whole overlay, so a tall panel no longer slides over its trigger and a scroll view inside it scrolls beside the trigger. With collision avoidance on, the larger side bounds the layout; the panel stays on the preferred side when it fits there, otherwise it flips. Content that cannot scroll overflows the shorter panel, and placements to the left or right of the trigger are not capped.
Fixes #
- Keep the focus action and focused state on a
NakedDisclosuretrigger that setssemanticLabel. The label still replaces the trigger's visual content for assistive technology, but no longer drops focus semantics. showNakedDialog,showNakedAlertDialog,NakedTooltip,NakedDisclosure, andNakedToastScopenow skip their transitions when the user asks to reduce motion, whatever durations they were given. They honor bothMediaQuery.disableAnimationsand the platform's Reduce Motion setting, which iOS reports separately anddisableAnimationsdoes not reflect. Until nowNakedDisclosureandNakedToastScopehonored only the former, and dialogs and tooltips neither.- A dialog reads the setting when it opens and when it is dismissed. One that opened without motion also closes without it.
- A tooltip and a toast apply a change to their next show or hide. A disclosure also completes a transition already running.
- A modal
NakedDialogshown without a transition, with a zerotransitionDurationor under reduced motion, no longer hides the dismissible barrier's "Dismiss" node from screen readers.showNakedDialognow wraps the dialog page in a semantics container. - Keep a menu nested in a menubar panel out of the bar's trigger traversal and focus/hover activation. A nested caller-owned control still opens its menu only through its own activation.
- Home and End now scroll the newly focused item just far enough into view in
NakedSelect,NakedMenu, and other anchored overlays with scrolling content, inNakedTabBar, and inNakedMenubar. - The arrow keys and Home and End in
NakedToggleGroup, and the arrow keys from an openNakedMenubarmenu, scroll the newly focused item into view the same way. A target that is already visible stays where it is. NakedSelectnow opens with focus on the selected option, scrolled into view, so Arrow Up and Arrow Down continue from it instead of from the ends of the list. A select without a selected option, or whose selected option is disabled or not built yet in a lazy list, opens on the first item that can take focus, normally its first enabled option: the first Arrow Down reaches the second option and Enter selects the first, where focus used to start on the overlay container. A field in the panel that requests focus while the panel builds keeps it.- Hovering an item in
NakedSelectorNakedMenuclears keyboard focus, and hovering a submenu row also opens it after its delay, only when the pointer moves over it, no longer when a list scrolls under a resting pointer. Moving within the submenu trigger does not restart the delay. NakedComboboxnow scrolls the highlighted option just far enough into view when the arrow keys highlight it and when the options view opens, instead of leaving it outside a scrolling options list. Focus stays on the field, an option that is already visible does not scroll the list or the page, and scrolling by hand is not undone. Opening replaces a scroll offset you gave the list when the highlighted option is outside it, and in a lazily built list such asListView.buildera highlighted option that is not built, such as the last option after Ctrl or Cmd with ArrowDown, is not revealed.- End slider interactions safely when thumbs or interaction configuration change or the slider is disabled. Preserve one start/end sequence and the last requested values across controlled rebuilds.
- Retain slider keyboard focus when semantics are excluded, and preserve surviving external focus nodes when thumbs change.
- Add
NakedSliderTrackto map input to an inset painted rail while retaining the full slider hit target. NakedPopoverwithopenOnTap: falseno longer wraps its child in a focus stop of its own. A button or other control passed as the child is now the only tab stop, and closing the popover returns focus to it instead of to the wrapper, so a screen reader no longer lands on an unlabelled focusable wrapper after the popover closes. AttachtriggerFocusNodeto the control, using the same node as the control's ownfocusNode; sharing one node between the two no longer throws. WithouttriggerFocusNode, closing returns focus to whatever had it before the popover opened. The defaultopenOnTap: trueis unchanged.- Because
NakedPopoverwithopenOnTap: falseno longer attachestriggerFocusNodeitself, a child that cannot take focus (such asText, or a disabled button, which the wrapper used to make focusable) is no longer a tab stop, a node that is not attached to the control receives no focus, and with aFocuschild and a differenttriggerFocusNodethe child's own node is the tab stop.
1.2.3 #
Fixes #
- In right-to-left
NakedTabBars, Home and End now move focus to the first and last tab, matching the arrow keys, instead of the tabs at the visual left and right edges.
1.2.2 #
Fixes #
- Remove the remaining direct Material imports and unused Material icon-font declaration. Public APIs and application font bundling are unchanged.
- Show one
NakedTooltipat a time. Hover, focus, touch, andtooltipKeyactivation now replace the visible tooltip, which disappears at once instead of fading out under the next one. This reverses 1.2.1, which kept a focused ortooltipKey-opened tooltip visible while another trigger was hovered. - A replaced
NakedTooltipno longer reopens when the newer one closes, and a newer activation cancels a pending focus show. Escape closes the visible tooltip even when another trigger has focus. - Do not show touch selection handles in
NakedTextFieldafter a mouse secondary click, matching Flutter'sTextField.
1.2.1 #
Fixes #
- Clear stale keyboard focus when hovering menu items, and close hovered submenus without returning focus to their triggers. Keep ancestor submenus open while the pointer moves into nested panels.
- Dismiss stale hover tooltips when entering another trigger while preserving focus-held and manually opened tooltips. Keep focused tooltips visible when the pointer leaves their trigger or content.
1.2.0 #
Features #
- Build
NakedTooltipon Flutter'sRawTooltipfor triggers, delays, feedback, animation, hoverable content, and overlay lifetime. Retains 1.1.0 focus, blur, Escape, and collision-resolvedOverlayPlacementbehaviors. - Add
NakedTooltip.tooltipKey(GlobalKey<RawTooltipState>) to show the tooltip imperatively viaensureTooltipVisible().
Deprecations #
- Deprecate
NakedTooltip.open,useRootOverlay, anddisableHoverableContentfor removal in 2.0.0. Setting any of these parameters runs the legacy 1.1.0 implementation. UsetooltipKeyto show the tooltip imperatively andonOpenChangedto observe visibility.tooltipKeyhas no effect when a deprecated parameter is set.
Changed #
- Clarify
NakedCombobox's directRawAutocompletecomposition and retain its lifecycle callbacks. Flutter issue #191928 still allows a pending async result to reopen the options after Escape; the adapter reports that reopen accurately and does not add a second visibility state machine.
Fixes #
- Allow Escape on a closed
NakedTooltiptrigger to reach enclosing dismiss actions (such as dialogs or drawers). - Deliver uncontrolled
NakedTooltip.onOpenChangednotifications after the current frame so callers can safely callsetState. Discard pending notifications on disposal, report closure before replacingtooltipKey, and report zero-duration reopens while mounted. - Preserve
NakedTooltipanimation defaults for partialAnimationStylevalues, honor reverse curves, and apply style updates without resetting visibility, focus, or raw tooltip state. NakedTextMagnifiernow updates its position and focal point when its notifier, size, magnification scale, or vertical shift changes, without waiting for the notifier's next update.- A controlled
NakedSelect(open+onOpenChanged) now asks its owner before every close, including Escape on the trigger, an ancestor scroll (once when scrolling starts and once when it ends), and a view resize. These used to close the overlay without callingonOpenChanged. - Escape on a closed
NakedSelecttrigger now reaches an enclosing dismiss action, such as theNakedPopoveraround it. 1.1.0 consumed it. - Remove the duplicate horizontal traversal binding from menubar overlays.
OverlayPortalpreserves the bar ancestry, while menu panels retain their own Home/End bindings; arrow traversal behavior is unchanged. - Guard
NakedMenuandNakedPopoveronCloseRequestedcallbacks against closed anchors on Flutter 3.41 and 3.47, and avoid restoring focus to a closing menubar trigger when a sibling menu in the sameNakedMenubaris already open. - Bind Escape directly on dismissible
showNakedDialogroutes so customWidgetsAppshortcut maps that omitDismissIntentstill dismiss dialogs on Escape while respectingPopScope. - Wrap
NakedComboboxoptions overlays inExcludeFocus(matching Flutter 3.47) so Tab from an open combobox moves focus to the next focusable widget on Flutter 3.41 and 3.44, and guard asyncoptionsBuildercompletions after unmount on Flutter 3.41. - Preserve other actively focused or hovered
NakedTooltipoverlays when a blurred tooltip'sdismissDelayrunsRawTooltip.dismissAllToolTips(), and reset hover/focus state cleanly on Escape or overlay removal. - Reset
NakedScrollbarhover state wheninteractivebecomesfalsewhile hovered, and snapNakedTextMagnifierimmediately on widget property updates instead of animating as a line jump.
Evaluated and skipped #
Expansiblehard-wires a clipped height animation and would dropreverseDuration.RawTooltipstill has no per-instance dismiss, controlled open state, root-overlay option, or focus trigger, andignorePointerneeds Flutter 3.44, so the deprecated parameters keep the 1.1.0 implementation.showRawDialogneeds Flutter 3.44 and only adds native-window dialogs.
1.1.0 #
Migration #
NakedStatesubclasses now supply equality fields throughprops, starting with...super.props. When migrating a manual==/hashCodeoverride, include its former fields inprops; the protectedstatesEqualandstatesHashCodehelpers have been removed.
Features #
- Add
NakedCombobox, a headless autocomplete field onRawAutocomplete. Callers own the text field and the options panel. Keyboard highlight, Enter to select, Escape, and async option staleness come from Flutter. - Add
NakedMenubaronRawMenuAnchorGroup. Menus in the bar close their siblings, switch on hover while one is open, and move with the arrow keys. - Add
NakedScrollbaronRawScrollbar, with thumb and track colors resolved from hovered and dragged states. - Add
NakedTextMagnifieronRawMagnifier.NakedTextFieldnow uses it on touch platforms instead of Material'sTextMagnifier. PassmagnifierConfigurationto keep the previous Material or Cupertino lens. NakedTextFieldno longer supplies selection handles or resolves aCupertinoDynamicColor. PassselectionControlsfor handles andcontextMenuBuilderfor the cut, copy, and paste menu. Resolve a dynamic color before passing it ascursorColor.
Docs #
- Document
NakedTooltipas built onRawMenuAnchor. The 1.0 Flutter 3.41 requirement was originally tied toRawTooltip; the tooltip no longer uses it.
1.0.2 #
Fixes #
- Remove the inner
container: truefrom theNakedSelecttrigger's merged semantics. On Flutter 3.44 the overlay made that folded-away node the menu's traversal parent, so the platform received a node with no parent and the macOS accessibility bridge dropped the update and could crash. The trigger still announces one merged node with its label, value, button role, and expanded state.
1.0.1 #
Fixes #
- Reword the
NakedToastScopemissing-scope error hint to useWidgetsAppand note that any app host works. Message-only change; no API or behavior change.
1.0.0 #
First stable release. The API is unchanged from 1.0.0-beta.15; this release
declares it stable and commits to semantic versioning for future changes.
Development moves to the Remix monorepo
(https://github.com/conceptadev/remix), where naked_ui now lives at
packages/naked_ui. The package remains independently versioned and published.
1.0.0-beta.15 #
Features #
- Add
NakedToastScope,NakedToastController, and typed toast requests with bounded queues, same-id replacement, lifecycle-aware timers, keyboard dismissal, focus restoration, and status/alert semantics. Presenters retain ownership of visuals and actions.
1.0.0-beta.14 #
Fixes #
- Link each
NakedDisclosuretrigger to its controlled panel in the semantics tree. Web relationships now resolve to the current panel DOM node after repeated remounts, while native trigger identity and the panel identifier remain stable.
1.0.0-beta.13 #
Features #
- Add
NakedDisclosure, a standalone headless button-and-panel primitive with controlled and uncontrolled state, accessible expanded semantics, shared widget state, normal panel focus traversal, and optional exit-aware transitions that preserve panel state while closing.
1.0.0-beta.12 #
Features #
- Add
NakedButton.semanticHinton the same Semantics node as the button role, label, enabled state, and tap/long-press actions. - Add
NakedSelect.semanticValueso the trigger can announce a human-readable selection instead ofT.toString().SemanticsRole.comboBoxexists on Flutter 3.41+ but debug semantics still throwMissing checks for role(flutter/flutter#172918), so the trigger keeps the merged button + expanded + value contract. - Add
NakedRadioGroup, a thin wrapper over Flutter'sRadioGroupthat supplies what it lacks: a nullableonChanged(null means disabled), a groupenabledstate radios inherit, and an optional accessible group label. Flutter'sRadioGroupkeeps the singleSemanticsRole.radioGroupnode; the label is a plain container around it, never a second role node.
1.0.0-beta.11 #
Features #
- Add dependency-free
NakedLinkwith Link semantics, optional destination metadata, caller-owned activation, observable hover/focus/press/disabled state, and caller-owned focus nodes. Primary tap, semantic tap, Enter, and Numpad Enter activate; Space and held-key repeats remain unclaimed. Inert Links expose no Link role, destination, focus stop, or tap action.
1.0.0-beta.10 #
Features #
- Add
NakedAccordion.itemBuilderfor styling a trigger and panel as one unit. It receives the sameNakedAccordionItemStateas the trigger builder plus the fully assembled item as its child, and its context resolvesNakedAccordionItemState.controllerOfto the authoritative controller shared with the trigger and panel.
Fixes #
- Track
NakedAccordionpress state whenever the item is enabled instead of only whenonPressChangeis supplied, soWidgetState.pressedreaches builders without a callback, and clear the pressed state when the item becomes disabled.
1.0.0-beta.9 #
Fixes #
- Keep
NakedTextField'sWidgetState.pressed,onTapChange, andonPressChangesynchronized when selection gestures take over; block disabled pointer and selection paths, and defer lifecycle cleanup callbacks to avoid rebuilding while the widget tree is locked. - Mark
NakedToggleOptionsemantics as part of a mutually exclusive group, matching Flutter's segmented-control contract for enabled, selected, and disabled options.
1.0.0-beta.8 #
Fixes #
- Preserve tooltip overlay semantics when
semanticLabelis absent or blank, while continuing to avoid duplicate announcements when a non-empty label represents the content on the trigger. Explicit semantics overrides remain authoritative.
1.0.0-beta.7 #
Features #
- Add
NakedSliderState.visualPercentageOffor mapping arbitrary logical fractions to physical track alignment across orientation, text direction, and inversion, while preservingvisualPercentageAtthumb placement.
1.0.0-beta.6 #
Fixes #
- Make
NakedTextFieldhonor ambientDefaultSelectionStylecursor and selection colors, including context-resolvedCupertinoDynamicColorvariants, while preserving explicit cursor precedence, focus gating, and platform fallbacks.
Maintenance #
- Point package metadata at the canonical
conceptadev/naked_uirepository.
1.0.0-beta.5 #
Breaking changes #
- Replace alignment-pair overlay positioning with a Radix-shaped
OverlayPositionConfig: side, logical alignment, signed side/alignment offsets, collision padding, collision avoidance, and a resolvedOverlayPlacementavailable to overlay descendants after flip or shift. - Change
NakedSliderfrom onedouble valueto a nonempty, orderedList<double> values. Callbacks are list-valued; defaults are nowmin=0,max=100, andstep=1. The slider supports arbitrary thumb counts, orientation, inversion, minimum spacing, nearest-thumb pointer selection, non-crossing constraints, and per-thumb focus, labels, formatters, and semantics actions.
Features and behavior changes #
- Add controlled
open/onOpenChangedcontracts to Select and Tooltip. Controlled owners may accept or reject trigger, selection, Escape, outside tap, hover, focus, and touch requests without transient visual mutation. - Keep Tooltip open while either its trigger or overlay content is hovered,
with an opt-out through
disableHoverableContent; expose the final collision-resolved placement to tooltip content. - Add separate keyed Popover anchors and automatic/manual Tabs activation.
- Add controlled menu checkbox items and typed radio groups/items with checked roles and mutually-exclusive semantics.
- Add recursively composable submenus with delayed hover handoff, LTR/RTL open/close arrows, Escape handling, sibling coordination, root dismissal, first-item focus, and trigger-focus restoration.
1.0.0-beta.4 #
Features #
- Add
SemanticsRole.alertDialogsupport toNakedDialogand ashowNakedAlertDialoghelper with required non-empty caller-localized names, a non-dismissible outside barrier by default, null cancellation from Escape and platform Back, mandatory focus entry, safe initial-focus selection, closed-loop traversal, and caller-owned focus-node handling. Dismissible barriers require a non-empty localized label. ExistingNakedDialogandshowNakedDialogdefaults remain unchanged.
Behavior changes #
- Migrate
NakedToggleGroupoptions from independent Tab stops to one roving-focus stop: Tab enters and exits once, arrows and Home/End move focus without selecting, activation proposes the controlled value, and disabled or dynamically removed options repair focus within the group.
1.0.0-beta.3 #
Fixes and hardening #
- Scope overlay-item builders to their declared state type:
NakedMenuItemandNakedSelectOptionbuilders now receive a context containing a matchingNakedStateScope<S>, soNakedMenuItemState/NakedSelectOptionState'sof/controllerOfhelpers resolve to the item state. Downstream code no longer needsNakedButtonState, which leaked the internal button implementation.
1.0.0-beta.2 #
Breaking changes #
- Require Dart 3.9 and Flutter 3.41, matching the
RawTooltipAPI used by the package. - Treat
NakedSelect.valueas fully controlled, includingnull; a select withoutonChangedis now consistently non-interactive. - Make
NakedAccordionController.valuesimmutable to callers and preserve its observable FIFO ordering. - Make
NakedStateScope.controllerOftype-specific; generic state helpers now require the requested value type. - Require
NakedMenuto have either achildorbuilder, and throw a descriptive error when menu/select items are used outside their owner.
Fixes and hardening #
- Rebuild controller-driven tabs, prevent duplicate tab selection callbacks,
replace duplicated content semantics when
semanticLabelis set, and keep orientation-aware Home/End navigation within each tab bar. - Apply dialog, tab, menu, and menu-item semantic roles, including selected state for select options.
- Correct focus-node ownership swaps across controls and remove the redundant
focus owner around
EditableText. - Consolidate overlay positioning, including safe handling of oversized content, and rebuild Popover on the shared anchored-overlay shell.
- Keep inherited callbacks current, initialize replacement accordion controllers, and scope slider drag-end values to each drag session.
- Correct example paths in CI workflows and remove redundant dependency steps.
1.0.0-beta.1 #
- feat(naked-select): add
mouseCursorproperty to NakedSelect - refactor(naked-tooltip): replace
RawMenuAnchorwithRawTooltip - fix: stabilize flaky tests (InkSparkle shader + focus mode)
0.2.0-beta.7 #
- fix: text style handling in NakedTextField
- feat: improve 3.27-safe semantics for menu, select, accordion, checkbox, radio, slider, and text field
0.2.0-beta.6 #
- fix: disabled and error state support for NakedTextField
0.2.0-beta.5 #
- fix: NakedAccordionItemState scope on content
- refactor: remove NakedMenuController typedef
0.2.0-beta.4 #
- docs: refine documentation for developer clarity
- refactor: Simplify NakedTextFieldBuilder signature
- feat: add excludeSemantics parameter to all widgets
0.2.0-beta.3 #
- feat: expose StrutStyle to NakedTextField
- fix: state scope not in the Context
- feat: recreate NakedTooltip widget
- refactor: Overlay Rendering
- docs: Improve the usage examples
0.2.0-beta.2 #
0.2.0-beta.1 #
-
Added: Popover; Toggle
-
API: Standardized state callbacks (onHoverChange/onPressChange/onFocusChange); removed onDisabledState (use enabled); added onSelectChange/onDragChange where applicable
-
Better use of Raw Flutter components where available
-
Accessibility: Improved semantics across button, checkbox, radio, slider, select, tabs, dialog, tooltip
-
Focus/State: Unified focus handling (FocusNodeMixin) and consistent hover/press/selected for builders
-
Architecture: Builder-first APIs (e.g., NakedTextField builder) with state provided via NakedStateScope
0.0.1-dev.2 - 2025-07-03 #
Features #
- "Naked" - A Behavior-First UI Component Library for Flutter (#579) (c55b55f)
- Add maybeOf helper to InheritedWidgets and refactor of() (805a37e)
- Add maybeOf helper to InheritedWidgets and refactor of() (805a37e)
- Add test for Hover to RadioButton (#601) (8bd0425)
- Add textStyle prop in NakedTextField (#608) (4b5252b)
- Implement Tooltip Lifecycle (#603) (2ddbf60)
- Recreate Button using Naked (#587) (0d55724)
- Refactor radio and checkbox components with new architecture (#672) (4f3ce7d)
Bug Fixes #
Miscellaneous Chores #
0.0.1-dev.0 #
- Initial development release
- Core functionality for HeadlessButton component
- State management via HeadlessInteractiveStateController
- Support for interactive states (disabled, focused, hovered, pressed)
- Fully customizable rendering via builder pattern