Releases: danielsaidi/SwiftUIKit
2.7.0
✨ New features
Color
has new hex string- and int-based initializers.ColorRepresentable
is a new typealias that bridges NSColor and UIColor.ColorRepresentable
has new hex string- and int-based initializers.ErrorAlerter
is a new protocol that can be implemented by any type that can alert errors using anAlertContext
.ErrorAlertConvertible
is a new protocol that can be implemented by any error that can describe itself as an errorAlert
.FontRepresentable
is a new typealias that bridges NSFont and UIFont.Persisted
can now be used with SwiftUI and will properly update observing views.
💡 Behavior changes
PresentationContext
is nowopen
instead ofpublic
.DocumentCamera
now passes on its actions instead of itself.- Unit tests no longer use Quick and Nimble.
🗑 Deprecations
DocumentGroupOnboardingScreen
has been renamed toDocumentGroupSheet
.DocumentGroupOnboardingScreenError
has been renamed toDocumentGroupSheetError
.DocumentGroupOnboardingScreen
presentAsOnboarding
has been renamed topresentFromDocumentGroup
.ImageResource
has been renamed toImageRepresentable
.ShadowStyle
has been renamed toViewShadowStyle
to not conflict with the new SwiftUI 4 ShadowStyle that comes in Xcode 14.
2.6.0
This version adds focus and printing utils, makes the system font picker work better on multiple platforms and deprecates web views.
Web views can be found in the new WebViewKit from now on.
✨ New features
AlertContextFocusedValueKey
is a new type that can be used to bind and access an focused alert.FullScreenModalContextFocusedValueKey
is a new type that can be used to bind and access a focused full.ItemPrinter
is a new protocol that can be implemented by types that can print printable items.ItemPrintingView
is a view protocol that adds item printing functionality to any view.PrintableItem
defines a list of printable items, currently only pdf documents.SheetContextFocusedValueKey
is a new type that can be used to bind and access a focused sheet.StandardItemPrinter
is an multi-platformItemPrinter
implementation that prints usingUIPrintInteractionController
.
💡 Behavior changes
SystemFontPicker
has been adjusted to work better on various platforms.SystemFontPickerFont
has been adjusted to work better on various platforms.
🐛 Bug fixes
SystemFontPicker
now uses the provided fonts instead of all.
🗑 Deprecations
SafariWebView
has been deprecated - use WebViewKit instead.WebView
has been deprecated - use WebViewKit instead.
2.5.0
✨ New features
PageIndicator
is a new view that mimics the page dots in a page view.PageIndicatorDisplayMode
is a new enum that can be used to control indicator views.PageIndicatorStyle
is a new enum that can be used to style indicator views.PageView
is now available for macOS as well.
💡 Behavior changes
PageView
is now generic and no longer generatesAnyView
views.
💥 Breaking Changes
PageView
for iOS is now generic with new initializer signatures.PageView
indexDisplayMode
is now calledpageIndicatorDisplayMode
.
2.4.0
This release adds a bunch of new views and features as well as new macOS utils.
This release also deprecates a bunch of stuff to make the library more focused.
Note that WebView
now wraps a WKWebView
instead of a SFSafariViewController
. If you want the old behavior, use the new SafariWebView
.
✨ New features
DetailPanel
is a new macOS view that mimics a trailing detail panel.DetailPanelButtonGroup
is a new macOS view that can be used to mimic a native, segmented button group.DetailPanelContainer
is a new macOS view with a main content view and a trailing detail panel.DetailPanelContext
is a new macOS class that can be used with the newDetailPanelPresenter
.DetailPanelForm
is a new macOS view that can be used to wrap form content within aSideBar
.DetailPanelHeader
is a new macOS view that can adjust the provided text to look like a native detail panel header.DetailPanelPresenter
is a new macOS protocol that can be implemented to add detail panel functionality to the implementing type.ForEachPicker
is a new view that works like theListPicker
, but doesn't wrap the content in aList
.ForEachMultiPicker
is a new view that works like theMultiListPicker
, but doesn't wrap the content in aList
.Form
has a newdetailPanelForm
modifier.FormActionButtonStyle
now has mutable properties.ListItemSubtitle
is a new view that copies its behavior from the deprecatedMenuListSubtitle
.ListText
has a new icon and subtitle parameter.ListTextContent
is a new view that just renders the content of aListText
.SafariWebView
is a new name for the previous version ofWebView
.ScanCodeGenerator
generateCodeView
is now a protocol implementation.ScanCodeType
now supportsaztek
andpdf417
as well.ScanCodeType
now implements more protocols to make it more versatile.ScanCodeType
has a newcode128
case that replacesbarcode
.ScanCodeType.name
is now the capitalized version of the raw string value.SidebarPresenter
is a new macOS protocol that can be implemented to add sidebar functionality to the implementing type.SystemFontPicker
is a new view that uses aPicker
.SystemFontForEachPicker
is a new view that uses aForEach
picker instead of aList
.SystemFontListPicker
now has afonts
init parameter.SystemFontListPicker
now has anitemFontSize
init parameter.SystemFontListPicker
now has adismissAfterPick
init parameter.SystemFontPickerFont
s initializer and properties are now public.SystemFontPickerFont
is a new public struct that is used by the various font pickers.SystemFontPickerItem
is a new view that can be used to display a picked system font.Text
has a newdetailPanelHeader
modifier.UrlOpener
now supports macOS as well.
💡 Behavior changes
ListItem
now only applies a min height on iOS.ListPicker
now uses aForEachPicker
for each section.ListMultiPicker
now uses aForEachMultiPicker
for each section.ScanCodeType.barcode
is now an alias forScanCodeType.code128
.WebView
now wraps aWKWebView
instead of aSFSafariViewController
.
🗑 Deprecations
AsyncImage
has been deprecated. Use SwiftUI AsyncImage instead.AsyncImageLoader
has been deprecated. Use SwiftUI AsyncImage instead.BlurView
andView+Blur
is deprecated. Use the native material approach instead.ColorBadge
has been deprecated.FontListPicker
has been renamed toSystemFontListPicker
.FullHeightView
has been deprecated.FullSizeView
has been deprecated.FullWidthView
has been deprecated.ListPicker
no longer has atitle
.ListMultiPicker
no longer has atitle
.SystemFontListPicker
no longer has atitle
.Presentation/Toast
has been deprecated. Use the new SystemNotification library instead.View+Alert
alert(context:)
has been renamed toalert(_ :)
.View+FullScreenCover
fullScreenCover(context:)
has been renamed tofullScreenCover(_ :)
.View+Sheet
sheet(context:)
has been renamed tosheet(_ :)
.
💥 Breaking Changes
Color.clearInteractable
has been deprecated and should not be used anymore.Picker
has been removed, since it caused conflicts with SwiftUI.UrlOpener
default functions are no longer part of the protocol definition.View.clearInteractable
has been deprecated and should not be used anymore.
2.3.2
💡 Behavior changes
ListNavigationButton
is now available on all platforms.ListDisclosureIndicator
is now available on all platforms.
🗑 Deprecations
ListButtonLink
has been renamed toListNavigationButton
.
2.3.1
This release adjust the ListToggle
.
💡 Behavior changes
ListToggle
now applies.labelsHidden()
to the toggle, to make it take up less space.
2.1.0
This release adds a brand new "list item" concept that replaces the previous "menu list" one.
NOTE
This release was revised, with some list view names shortened and a few more list view items added. This is the official 2.1, but it is also released as a 2.1.1 to avoid dependency cache problems.
✨ New features
-
EdgeInsets
has a newinit(all:)
initializer. -
EdgeInsets
has a newinit(horizontal:,vertical:)
initializer. -
Label
has a newinit(String, Image)
initializer. -
View+Frame
has a newframe(square:)
view extension. -
View+DynamicType
has a newdisableDynamicType()
view extension. -
ListItem
is a new view that can be used to make items in a list get the same style and behavior. -
ListButton
is a new view that wraps its content in aListItem
that is embedded in aButton
. -
ListButtonLink
is a new view that wraps its content in aListButton
and appends a trailingListDisclosureIndicator
. -
ListDisclosureIndicator
is a new view that imitates and iOS navigation link arrow. -
ListNavigationLink
is a new view that wraps its content in aListItem
that is embedded in aNavigationLink
. -
ListSelectItem
is a new view that wraps its content in aListItem
and applies a checkmark if the item is selected. -
ListText
is a new view that wraps aText
view in aListItem
. -
ListToggle
is a new view that wraps its content in aListItem
and appends a trailingToggle
.
🗑 Deprecations
- The
MenuList
namespace is deprecated and replaced with the newList
namespace.
2.0.0
This version requires Xcode 13 and later, since it refers to the latest api:s.
Parts of the library that have native corresponding parts in newer versions of SwiftUI, like SearchBar
. They will be around until the library targets the versions of SwiftUI where they were introduced.
✨ New features
Color+Codable
is a new extension that makes Color codable.Color+Random
now lets you randomize the color opacity as well.EnvironmentValues+SafeAreaInsets
lets you read the safe are insets of the key window.FormActionButton
can now be provided with a custom style.FormActionButtonStyle
can now be configured with a custom style.MenuListIcon
has a new emoji-based initializer.MenuListItem
now lets you use any custom content builder.MenuListItemStack
is a new view that lets you reuse the spacing and tap behavior.MenuListSection
is a new view for menu list sections.MenuListSlider
is a new view for menu list sliders.MenuListSubtitle
is a new view for menu list subtitles.MenuListToggle
is a new view for menu list toggles.MultilineText
is a new text view that can be used when a multiline text is cut off with ...MultiPicker
is a new, generic multi item picker. It will probably replaceSimpleMultiPicker
in due time.Persisted
now lets you inject a custom store.Picker
is a new, generic single item picker. It will probably replaceSimplePicker
in due time.PickerListItem
is a new protocol that can be used inPicker
lists.PickerSection
is a new, generic struct that can be used to divide aPicker
andMultiPicker
into sections.ShadowStyle
has a newformActionButton
type.ShadowStyle
has zero defaults forx
andy
.SystemColor
has a bunch of new colors.SystemColor
is nowCodable
andEquatable
.Text+Markdown
is a new view extension that provides a newText(markdown:)
initializer.UrlSharing
is a new protocol that any view can implement to easily be able to share urls.View+Autosave
is a new view extension that provides a customizable autosave view modifier.
💡 Behavior changes
FormActionButtonStyle
no longer applies a primary text color.FormActionButtonStyle
no longer applies a shadow by default. You can define one with the staticshadowStyle
property.
💥 Breaking Changes
- All deprecated parts of the library have been removed.
MenuListItemIcon
has been renamed toMenuListIcon
.SystemColor
no longer auto-implementsSimplePickerValue
.UserDefaultsPersisted
has been renamed toPersisted
.
1.7.2
✨ New features
FlipView
has a newisFlipped
binding, so that it can be read from outside as well.FormText
now supports iOS 13.FormText
has a newtrailingView
property.- There is a new
UIImage+Rotated
extension.
💥 Breaking Changes
ScanCodeGenerator
functionsof
parameter name is not omitted.
1.7.1
💡 Behavior changes
This release renames ActionButton
and ActionButtonStyle
to FormActionButton
and FormActionButtonStyle
, since the name "action button" is too general.
🐛 Bug fixes
- This release fixes build errors on tvOS and macOS.
🗑 Deprecations
ActionButton
andActionButtonStyle
has been deprecated.