packages/anvil2-swift/CHANGELOG.md.
0.0.4
Patch Changes
-
#3290
14c9b27Thanks @andrewking1235! - [Anvil2Icon, Anvil2Status] Replace the icon’sstatus:parameter withcolor: Color?, and add.anvil2IconColor(_:)to set the color of every tintableAnvil2Iconin a subtree. A tintable glyph now draws incolor, then.anvil2IconColor(_:), thensemantic.foreground.color.standard; it no longer reads the surroundingforegroundStyle. RemoveAnvil2Statusand.anvil2Status(_:). To migrate, replacestatus: .dangerwithcolor: theme.semantic.foreground.color.critical(or the color you need), replace.anvil2Status(_:)with.anvil2IconColor(_:), and replace.foregroundStyle(_:)used to tint icons with.anvil2IconColor(_:) -
#3224
44d88f1Thanks @AdamLantz! - [Anvil2TokensNext] Add theAnvil2TokensNextlibrary as a preview: its token values are placeholders and may change in any release. It is generated from@servicetitan/anvil2-tokens, so apps can adopt the new tokens beforeAnvil2Tokensswitches to them in a later breaking release. It keepsAnvil2Themeand\.anvil2Theme, adds the.classic,.cartoand.cartoMobilethemes andtheme.variant, and renames tokens (e.g.foreground.color.standard→foreground.color.base). Import it instead ofAnvil2Tokensin a file; components still readAnvil2Tokens -
#3161
8cf10ccThanks @jpex! - [Anvil2Icons] Update the Atlas logo icon to the new Atlas brand mark -
#3287
5c81ed8Thanks @AdamLantz! - [Anvil2TokensNext] Add border and inverse colors to every category hue -
#3287
5c81ed8Thanks @AdamLantz! - [Anvil2TokensNext] Fix.cartoand.cartoMobiledark colors that Carto gives no dark value of its own: they now match classic dark instead of Carto light -
#3287
5c81ed8Thanks @AdamLantz! - [Anvil2TokensNext] Add component tokens undertheme.component -
Updated dependencies [
5c81ed8,5c81ed8,5c81ed8]:- @servicetitan/anvil2-tokens@0.1.1
0.0.3
Patch Changes
-
#3177
90a5582Thanks @andrewking1235! - [Anvil2Icon] AddAnvil2Icon, a SwiftUI view that draws anAnvil2IconAsset(or a caller-suppliedImage) atsmall/medium/large(16/24/32 pt). Tintable glyphs inherit the surroundingforegroundStyleunless a status is set. AddsAnvil2Status(info/success/warning/danger), shared by status-aware components: passstatus:, or set it for a subtree with.anvil2Status(_:). Callers chooseinit(decorative:)orinit(_:accessibilityLabel:)for accessibility, and.anvil2IconStyle(size:)sets a default size for a subtree -
#3178
b57b018Thanks @andrewking1235! - [Anvil2IconAsset] Rename theAnvil2Iconenum toAnvil2IconAsset. ReplaceAnvil2IconwithAnvil2IconAssetat each use site (e.g.Anvil2Icon.arrowDown.image→Anvil2IconAsset.arrowDown.image); cases are unchanged -
#3150
70ad407Thanks @tounsoo! - [Anvil2Illustration] Fix invalidNaNplant leaf paths inemptyStateCommercialInteriorsNoSearchResultsandemptyStateCommercialPropertyCareUserCleared, restoring the missing leaf inemptyStateCommercialPropertyCareUserCleared -
#3170
38263d0Thanks @ericag1985! - [Anvil2Theme] Addmotion.duration.cycleas a 1s repeating-motion duration -
#3189
0f9b0bfThanks @andrewking1235! - [Anvil2Button] AddAnvil2Button, a SwiftUI pill button in six appearances (primary/secondary/ghost/danger/dangerSecondary/dangerGhost) atmedium/large(48/64 pt minimum height, growing with Dynamic Type). It takes an optionalAnvil2IconAssetplaced.leadingor.trailing, andisLoading, which keeps the button’s width, shows a spinner in place of the content and ignores taps; disable it with.disabled(_:).init(iconOnly:accessibilityLabel:)draws a circular icon-only button whose accessibility label is required..anvil2ButtonStyle(appearance:size:sizing:)sets a default appearance and size for a subtree, andsizing: .flexiblefills the offered width.Anvil2ButtonButtonStyle(.buttonStyle(.anvil2(_:size:))) gives any SwiftUIButtonthe same look and pressed, hover, focus and disabled states, without the loading state -
#3187
a734331Thanks @andrewking1235! - [Anvil2Spinner] AddAnvil2Spinner, a SwiftUI view that shows an indeterminate loading arc atsmall/medium/large(16/40/80 pt). The arc issemantic.border.color.accentby default;tint: .inheritedtakes the surroundingforegroundStyleinstead, for a spinner on a filled background. Callers chooseinit(decorative:tint:)orinit(accessibilityLabel:size:tint:)for accessibility (labeled spinners are announced as a progress indicator), and.anvil2SpinnerStyle(size:tint:)sets a default size and tint for a subtree. With Reduce Motion on, the arc stops at rest -
#3192
acf451dThanks @andrewking1235! - [Anvil2Components] Ship a resource bundle with a String Catalog for library-authored strings, with English as the package’s default localization -
#3171
ef97d69Thanks @andrewking1235! - [Package] Raise the minimum iOS version from 17.4 to 18.4. Apps that depend on Anvil2 must set their iOS deployment target to 18.4 or later -
#3196
e073fb0Thanks @andrewking1235! - [Anvil2Checkbox] AddAnvil2Checkbox, a SwiftUI checkbox whose whole row (box, label and optionaldescription) is one control and one accessibility element. The two-state initializers bindisOn; theallowingMixed:initializers take anAnvil2Checkbox.MixableState(unchecked/checked/indeterminate) and callaction, leaving the next state to the caller.hasErrorcolors the box critical, and.disabled(_:)disables it.init(accessibilityLabel:…)draws a box with no visible label whose accessibility label is required. VoiceOver reads the state as “checked”, “unchecked” or “mixed”, localized in English, French and Spanish in the Anvil2Components String Catalog..toggleStyle(.anvil2Checkbox)(Anvil2CheckboxToggleStyle) gives any SwiftUITogglethe same look, including mixedToggle(sources:isOn:), without the error state -
Updated dependencies [
38263d0]:- @servicetitan/carto-tokens@0.4.8
0.0.2
Patch Changes
-
#3074
9ea5560Thanks @andrewking1235! - [Anvil2Icon, Anvil2Illustration] Add theAnvil2IconsandAnvil2Illustrationslibraries, generated from@servicetitan/anvil2-iconsand@servicetitan/anvil2-illustrationsAnvil2Iconhas one case per webIcon*export; tintable icons take the foreground style, and multicolour ones (isTintable == false) keep their own coloursAnvil2Illustrationhas one case per illustration; each image resolves to its light or dark variant from the current appearance- Both ship as SVG asset catalogs with preserved vector data, and
Anvil2Componentsdepends on both
0.0.1
Patch Changes
-
#3064
3e36538Thanks @rollsroyc3! - [Tokens] Addtext.highlight.backgroundFallback, a solid stand-in fortext.highlight.background(web’s gradient) on React Native, Swift, and Kotlin, which cannot render it. [Text] ConsumebackgroundFallbackfor thehighlightedprop’s background instead of a hardcodedrgba(188, 226, 234, 0.4)literal. -
#3011
1b48f54Thanks @andrewking1235! - [Anvil2Theme] Add initial prerelease of the injectable native theme, replacing the staticAnvil2Tokensnamespace- Components read tokens from
@Environment(\.anvil2Theme); the default isAnvil2Theme.carto - A theme built from a modified lower tier re-derives every tier above it
- Easing tokens are a SwiftUI
UnitCurve, passed straight toAnimation.timingCurve(_:duration:) - Font-family and breakpoint tokens are no longer emitted
- Components read tokens from
-
Updated dependencies [
3e36538]:- @servicetitan/carto-tokens@0.4.7