Releases: composablehorizons/compose-unstyled
Releases Β· composablehorizons/compose-unstyled
2.7.0
Added
- Introduce new Theme
extendAPI. This allows you to extend a given theme via thebuildTheme {}function and have a hook, in which you can provide your own composition locals. Check the respective Demo to get started. - Added
accessibilityLabeltoUnstyledSwitchso switches can expose an explicit content
description.
Changed
- Compose Unstyled now uses Kotlin
2.4.0and Compose Multiplatform1.11.1.
Fixed
- Fixed dialog pointer input handling when scaling animations are used. (#125)
Removed
- Removed the unused
ComposableWithContent,OverriddenValue, andThemeToken.provides()
theming helper APIs.
2.6.0
Added
- Each modal API (sheets, dialogs) now comes with its own
Hostcomposable. When you wrap your
content with the respective host, the modal is rendered within the same composition tree, instead
of its own Window. (#410) - Added new
Trackcomposable in theToggleSwitch, in order to separate the clickable area from
the rendered area of the switch. This is useful when building full row toggles such as in setting
screens.(#415) - Added unscoped versions of radio button, disclosure, and tab group to make it more straightforward
to build your own components without fighting scoping. (#417, #421, #424) - Added
contentAlignmentparameter toTabGroup'sTabto make it simpler to position children
inside of tabs. (#426) Stackis now part of the defaultcomposeunstyledmodule. (#425)
Fixed
- Fixed modal bottom sheet overlays being dismissed before the sheet finishes exiting. (#409)
- Fixed vertical sliders handling pointer and keyboard input in the wrong direction. (#413)
- Fixed
UnstyledSliderthumbs briefly rendering at the start of the track before moving to their
initial value position. (#430)
2.5.0
2.4.1
2.4.0
Added
- Added a
composeunstyledmodule with all primitives and theming APIs, so you can build design
systems with a single dependency.
Changed
- Rewrote
DropdownMenukeyboard navigation so directMenuItemchildren inside
DropdownMenuPanelare focused in placement order. You can still use custom layouts inside the
panel, but nested menu items are not part of the guaranteed focus order.
Fixed
- Bottom Sheets now animate content size changes smoothly without dropping frames.
- Dropdown menus no longer wait for their enter animation to finish before applying indication to
the focused item. - Pointer-opened dropdown menus now reliably support arrow, Home, End, Tab, and Shift+Tab keyboard
navigation. - Bottom sheets now stay attached to the bottom of the container on lower-powered devices while
content shrinks during a detent animation.
2.3.0
Added
- Added a
selectionColorsparameter toUnstyledTextFieldfor styling text selection handles and
background. (#374)
Changed
buildTheme {}now creates a theme without styling by default. It removes Compose Foundation's
default styling, such as indication and text selection colors.- Deprecated
minimumInteractiveComponentSize,ComponentInteractiveSize, and
defaultComponentInteractiveSize. This is now your responsibility to implement if your design
system requires such functionality.
Fixed
- Fixed short bottom sheets animating into percentage detents too slowly.
- Fixed content-height bottom sheets changing height while transitioning to or from the hidden
detent. - Fixed offset outlines preserving the wrong rounded corner geometry when drawn outside a component.
2.2.0
Added
- Added focus-visible support to
focusRing, includingFocusVisibilityProvider,
collectIsFocusVisibleAsState, andFocusRingVisibility.Focusedfor opting into the previous
focus-only behavior. (#349) - Added a dedicated
visual-regressionsmodule for desktop screenshot regression coverage.
Changed
- Theme's
minimumInteractiveComponentSize()now applies touch-sized minimum bounds on devices that
support touch input instead of forcing it depending on the platform target. - Improved Bottom Sheet layout performance by reducing repeated measurement calculations.
UnstyledDialogandUnstyledModalBottomSheetoverlay lambdas now use dedicated overlay scopes,
withScrimavailable directly from those scopes.
Removed
- Removed the separate
composeunstyled-scrimartifact. UseScrimfromcomposeunstyled-modal,
composeunstyled-dialog, orcomposeunstyled-modal-bottom-sheetinstead.
Fixed
- Fixed fully expanded bottom sheets with short lazy content anchoring incorrectly instead of staying
aligned to the bottom of the container. (#356) - Fixed fully expanded bottom sheets clipping content when the sheet modifier adds height, such as
top padding. (#356) - Fixed a visual glitch where bottom sheets could briefly jump past their expanded position when
flung by touch.
2.1.0
Added
- Added recomposition test coverage for Bottom Sheet, Modal Bottom Sheet, and Toggle Switch.
- Added screenshot test coverage for Bottom Sheet and Modal Bottom Sheet demos.
- Tooltip now has a dedicated
TooltipHostfor rendering tooltip panels instead of leaking
Portal.
Changed
- Dropdown menus now render in our own
Modal()instead of a platform popup. - Dropdown Menu and Tooltip now expose shared anchor placement APIs from
composeunstyled-anchored-apiwithout exposing the internal anchored layout implementation
transitively. UnstyledIconnow defaultscontentDescriptiontonullfor decorative icons.
Fixed
- Fixed
UnstyledSwitchalways animating to enabled even if its original state was enabled. - Fixed bottom sheet content-dependent detent measurement when sheet modifiers add padding or fixed
height content is taller than the visible sheet. (#316) - Fixed dropdown menus being placed incorrectly on the first frame when initially expanded. (#308)
- Fixed modal bottom sheets animating before their modal window is attached. (#287)
2.0.0
New Docs
Visit https://composables.com/compose-unstyled/docs for updated documentation and code examples
Added
- Modules! You can now pick and choose only the APIs that you want to use instead of being forced
to add the full library to your codebase.composeunstyled-primitivescontinues to aggregate all
primitives for users who prefer a single dependency. - Added the following new modules:
composeunstyled-anchored,composeunstyled-bottom-sheet,
composeunstyled-build-modifier,composeunstyled-button,composeunstyled-checkbox,
composeunstyled-colored-indication,composeunstyled-dialog,composeunstyled-disclosure,
composeunstyled-dropdown-menu,composeunstyled-escape-handler,
composeunstyled-focus-ring,composeunstyled-icon,composeunstyled-modal,
composeunstyled-modal-bottom-sheet,composeunstyled-outline,composeunstyled-portal,
composeunstyled-progress,composeunstyled-radio-group,composeunstyled-scrim,
composeunstyled-scrollbars,composeunstyled-separators,composeunstyled-slider,
composeunstyled-stack,composeunstyled-tab-group,composeunstyled-text-field,
composeunstyled-toggle-switch,composeunstyled-tooltip,composeunstyled-tri-state-checkbox,
andcomposeunstyled-window-container-size. - New Modal API: The Modal API has been revamped in order to make building custom modals easier,
without having to manage platform-specific modal lifecycles directly. - Added
PortalHostandPortalfor rendering content into a same-window portal without changing
parent layout. - Added anchored positioning APIs for placing floating content relative to an anchor.
- Added
Scrimas a scoped modal primitive. - Added
Sheetas the measured bottom sheet panel andUnstyledBottomSheetas the bottom sheet
container. - Added public
BottomSheetStateandModalBottomSheetStateconstructors so design systems can wrap
primitive state in their own state objects. - Compose Unstyled now uses Kotlin
2.3.20and Compose Multiplatform1.11.0-alpha01.
Removed
- The
composeunstyledartifact is removed. Usecomposeunstyled-primitivesfor the aggregate
dependency, or depend on the individual modules you need. - All deprecated APIs are now removed. If you have breaking changes moving to this version,
downgrade to the latest 1.x.x version and useReplaceWith()to smoothly migrate to the latest
APIs. - Removed the
com.composables.corepackage. - Removed
ComposeUnstyledFlags.
Changed
- Decoupled theming from primitives. Primitives no longer read
LocalContentColoror
LocalTextStyle; users are responsible for styling primitives with their theming API of choice. - Moved
Text,LocalContentColor,LocalTextStyle,ProvideContentColor, and
ProvideTextStyleto the theming module. - The
BottomSheetAPI has been reworked and split into two composables.UnstyledBottomSheet
works as the area in which the bottom sheet can move on, while theSheetdoes the actual
rendering. - Bottom sheet animations can now be customized per state change with animation specs, and modal
bottom sheets can use a separate dismiss animation spec. - Modal Bottom Sheet does not have its own independent
Sheetcomposable anymore. It reuses
BottomSheet'sSheetAPI. - Modal Bottom Sheet now has a separate
overlayslot for passing any dimming overlay such as a
scrim. - Modal Bottom Sheet is now IME-aware by default through
ModalBottomSheetProperties.offsetForIme. UnstyledDialogvisibility is now controlled by avisibleparameter, andDialogPanelsupports
an optionalpaneTitlefor accessibility.UnstyledDisclosureis now controlled byexpandedandonExpandedChange.UnstyledDropdownMenunow uses scopedDropdownMenuPanelandMenuItemAPIs, supports anchored
side/alignment offsets, and supports Home/End keyboard navigation inside menus.UnstyledTooltipnow uses a scopedTooltipPanelAPI withTooltipPlacementinstead of
arrow-specific parameters.UnstyledTabGroupnow uses generic tab keys and scopedTabList,Tab, andTabPanelAPIs.UnstyledTextFieldnow usesTextFieldState, exposes a scopedTextInputslot, and passes
through the newerBasicTextFieldtransformation, line limit, keyboard, layout, and scroll
parameters.UnstyledSlidernow exposestrackandthumbslots withSliderState, supports horizontal and
vertical orientations, reverse direction, stepped values, keyboard control, and custom thumb sizing.- Checkbox, tri-state checkbox, and radio group indicators are now scoped child APIs
(CheckedIndicator,StateIndicator, andSelectedIndicator) that receive the primitive
interaction source. - Radio groups now support generic value types and scope
RadioButtontoRadioGroupScope. - Toggle switch behavior and thumb placement are now split between
UnstyledSwitchand the scoped
SwitchThumbAPI. - Scroll area state APIs moved into the scrollbars module and were renamed to
ScrollbarState.
TheScrollAreacontainer was removed so scrollbars do not impose layout or styling choices. - Scrollbars are now standalone vertical and horizontal primitives with caller-provided thumbs and
ThumbVisibilitycontrol. - Component primitives no longer choose internal layout, alignment, or sizing for their content.
Design systems are now responsible for arranging primitive slots and indicators.
Fixed
- Tooltips now hide on Escape only while visible and keep keyboard focus and hover visibility
handling separate. - Scrollbars now support dynamic sizing.
(#78) - Scrollbars now stay visible while their thumb is dragged.
- Bottom Sheet content is now constrained to the visible sheet height. No need to hardcode a size if
your content is scrollable. (#134) - Dialog, Modal Bottom Sheet, and Scrim now synchronize their exit lifecycle through shared modal
state, preventing the modal window from being removed before animated fragments finish exiting. - Dialog no longer freezes when it is initially visible without a scrim.
1.49.9
Fixed
- Fix dialog freeze when initially visible without a scrim. (Fixes #128)
- Fix stepped slider snapping behavior. (Fixes #81)
- Fix modals not inheriting
LocalLayoutDirectionfrom their parent. (Fixes #192) - Prevent unnecessary theme recompositions when theme values do not change.
Added
- Add new
ScrollAreacomponent in thecom.composeunstyledpackage. Old packages will be removed
in 2.0.