diff --git a/Demos/FluentUIDemo/ContentView.swift b/Demos/FluentUIDemo/ContentView.swift index 2e4aa4cba..049cea103 100644 --- a/Demos/FluentUIDemo/ContentView.swift +++ b/Demos/FluentUIDemo/ContentView.swift @@ -7,6 +7,8 @@ import SwiftUI import FluentUI struct ContentView: View { + @Environment(\.fluentTheme) var fluentTheme: FluentTheme + #if os(macOS) // Until we have a SwiftUI button on macOS, this will have to do. private struct ButtonRepresentable: NSViewRepresentable { @@ -38,5 +40,7 @@ struct ContentView: View { #endif } .padding() + .frame(maxWidth: .infinity, maxHeight: .infinity) + .background(fluentTheme.swiftUIColor(.background1)) } } diff --git a/MicrosoftFluentUI.podspec b/MicrosoftFluentUI.podspec index 013c09deb..25af414d9 100644 --- a/MicrosoftFluentUI.podspec +++ b/MicrosoftFluentUI.podspec @@ -1,4 +1,5 @@ # Constants +common_root = 'Sources/FluentUI_common' ios_root = 'Sources/FluentUI_iOS' macos_root = 'Sources/FluentUI_macOS' @@ -13,14 +14,22 @@ Pod::Spec.new do |s| s.homepage = "https://www.microsoft.com/design/fluent/#/" s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { "Microsoft" => "fluentuinativeowners@microsoft.com"} - s.source = { :git => "https://github.com/microsoft/fluentui-apple.git", :tag => "#{s.version}" } - s.swift_version = "5.9" - s.module_name = 'FluentUI' + s.source = { :git => "https://github.com/microsoft/fluentui-apple.git", :tag => "#{s.version}" } + s.swift_version = "5.9" + s.module_name = 'FluentUI' + s.ios.deployment_target = "16.0" + s.osx.deployment_target = "12.0" -# iOS - s.ios.deployment_target = "16.0" +# Common + + s.subspec 'Core_common' do |core_common| + core_common.source_files = ["#{common_root}/#{core_dir}/**/*.{swift,h}"] + end + + +# iOS s.subspec 'Avatar_ios' do |avatar_ios| avatar_ios.platform = :ios @@ -112,6 +121,7 @@ Pod::Spec.new do |s| s.subspec 'Core_ios' do |core_ios| core_ios.platform = :ios + core_ios.dependency "#{s.name}/Core_common" core_ios.resource_bundle = { 'FluentUIResources-ios' => ["#{ios_root}/#{resources_dir}/**/*.{storyboard,xib,xcassets,strings,stringsdict}"] } core_ios.script_phase = { :name => 'Optimize resource bundle', :script => 'REMOVE_UNUSED_RESOURCES_SCRIPT_PATH=${PODS_TARGET_SRCROOT}/scripts/removeUnusedResourcesFromAssets.swift @@ -355,24 +365,15 @@ fi', :execution_position => :before_compile } # Mac - s.osx.deployment_target = "12" - - s.subspec 'Appearance_mac' do |appearance_mac| - appearance_mac.platform = :osx - appearance_mac.source_files = ["#{macos_root}/#{components_dir}/Appearance/**/*.{swift,h}"] - end - s.subspec 'AvatarView_mac' do |avatarview_mac| avatarview_mac.platform = :osx avatarview_mac.dependency "#{s.name}/Core_mac" - avatarview_mac.dependency "#{s.name}/DynamicColor_mac" avatarview_mac.source_files = ["#{macos_root}/#{components_dir}/AvatarView/**/*.{swift,h}"] end s.subspec 'BadgeView_mac' do |badgeview_mac| badgeview_mac.platform = :osx badgeview_mac.dependency "#{s.name}/Core_mac" - badgeview_mac.dependency "#{s.name}/DynamicColor_mac" badgeview_mac.source_files = ["#{macos_root}/#{components_dir}/Badge/**/*.{swift,h}"] end @@ -384,6 +385,7 @@ fi', :execution_position => :before_compile } s.subspec 'Core_mac' do |core_mac| core_mac.platform = :osx + core_mac.dependency "#{s.name}/Core_common" core_mac.resource_bundle = { 'FluentUIResources-macos' => ["#{macos_root}/#{resources_dir}/**/*.{storyboard,xib,xcassets,strings,stringsdict}"] } core_mac.source_files = ["#{macos_root}/#{core_dir}/**/*.{swift,h}"] end @@ -391,16 +393,9 @@ fi', :execution_position => :before_compile } s.subspec 'DatePicker_mac' do |datepicker_mac| datepicker_mac.platform = :osx datepicker_mac.dependency "#{s.name}/Core_mac" - datepicker_mac.dependency "#{s.name}/Appearance_mac" datepicker_mac.source_files = ["#{macos_root}/#{components_dir}/DatePicker/**/*.{swift,h}"] end - s.subspec 'DynamicColor_mac' do |dynamiccolor_mac| - dynamiccolor_mac.platform = :osx - dynamiccolor_mac.dependency "#{s.name}/Appearance_mac" - dynamiccolor_mac.source_files = ["#{macos_root}/#{components_dir}/DynamicColor/**/*.{swift,h}"] - end - s.subspec 'Link_mac' do |link_mac| link_mac.platform = :osx link_mac.dependency "#{s.name}/Core_mac" diff --git a/Package.swift b/Package.swift index 570869c40..370a886ab 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,9 @@ let targets: [Target] = [ ), .target( name: "FluentUI_ios", + dependencies: [ + .target(name: "FluentUI_common") + ], path: "Sources/FluentUI_iOS", resources: [ .copy("Resources/Version.plist") @@ -23,7 +26,14 @@ let targets: [Target] = [ ), .target( name: "FluentUI_macos", + dependencies: [ + .target(name: "FluentUI_common") + ], path: "Sources/FluentUI_macOS" + ), + .target( + name: "FluentUI_common", + path: "Sources/FluentUI_common" ) ] diff --git a/Sources/FluentUI/FluentUI.swift b/Sources/FluentUI/FluentUI.swift index 5a51e5e21..08533b359 100644 --- a/Sources/FluentUI/FluentUI.swift +++ b/Sources/FluentUI/FluentUI.swift @@ -3,7 +3,7 @@ // Licensed under the MIT License. // -#if os(iOS) || os(visionOS) +#if os(iOS) || os(visionOS) || targetEnvironment(macCatalyst) @_exported import FluentUI_ios #elseif os(macOS) @_exported import FluentUI_macos diff --git a/Sources/FluentUI_iOS/Core/Extensions/Color+Extensions.swift b/Sources/FluentUI_common/Core/Extensions/Color+Extensions.swift similarity index 83% rename from Sources/FluentUI_iOS/Core/Extensions/Color+Extensions.swift rename to Sources/FluentUI_common/Core/Extensions/Color+Extensions.swift index 1f6736874..22bd47197 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/Color+Extensions.swift +++ b/Sources/FluentUI_common/Core/Extensions/Color+Extensions.swift @@ -38,17 +38,21 @@ extension Color { /// Creates a custom `Color` from a prebuilt `DynamicColor` structure. /// - /// - Parameter dynamicColor: A dynmic color structure that describes the `Color` to be created. + /// - Parameter dynamicColor: A dynamic color structure that describes the `Color` to be created. init(dynamicColor: DynamicColor) { - if #available(iOS 17, *) { + if #available(iOS 17, macOS 14, *) { self.init(dynamicColor) } else { +#if os(macOS) + self.init(nsColor: NSColor(dynamicColor: dynamicColor)) +#else self.init(uiColor: UIColor(dynamicColor: dynamicColor)) +#endif // os(macOS) } } var dynamicColor: DynamicColor { - if #available(iOS 17, *) { + if #available(iOS 17, macOS 14, *) { var lightEnvironment = EnvironmentValues.init() lightEnvironment.colorScheme = .light @@ -58,9 +62,15 @@ extension Color { return DynamicColor(light: Color(self.resolve(in: lightEnvironment)), dark: Color(self.resolve(in: darkEnvironment))) } else { +#if os(macOS) + let nsColor = NSColor(self) + return DynamicColor(light: Color(nsColor.light), + dark: Color(nsColor.dark)) +#else let uiColor = UIColor(self) return DynamicColor(light: Color(uiColor.light), dark: Color(uiColor.dark)) +#endif // os(macOS) } } } diff --git a/Sources/FluentUI_macOS/Core/Extensions/NSColor+Extensions.swift b/Sources/FluentUI_common/Core/Extensions/NSColor+Extensions.swift similarity index 95% rename from Sources/FluentUI_macOS/Core/Extensions/NSColor+Extensions.swift rename to Sources/FluentUI_common/Core/Extensions/NSColor+Extensions.swift index 990bb66c3..7b601f4c6 100644 --- a/Sources/FluentUI_macOS/Core/Extensions/NSColor+Extensions.swift +++ b/Sources/FluentUI_common/Core/Extensions/NSColor+Extensions.swift @@ -5,7 +5,6 @@ #if canImport(AppKit) import AppKit -import SwiftUI extension NSColor { @@ -51,6 +50,11 @@ extension NSColor { return resolvedColorValue(appearance: NSAppearance(named: .darkAqua)) } + convenience init(dynamicColor: DynamicColor) { + self.init(light: NSColor(dynamicColor.light), + dark: dynamicColor.dark.map { NSColor($0) }) + } + /// Returns the version of the current color that results from the specified traits as an `NSColor`. /// /// - Parameter appearance: The user interface appearance to use when resolving the color information. diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIColor+Extensions.swift b/Sources/FluentUI_common/Core/Extensions/UIColor+Extensions.swift similarity index 97% rename from Sources/FluentUI_iOS/Core/Extensions/UIColor+Extensions.swift rename to Sources/FluentUI_common/Core/Extensions/UIColor+Extensions.swift index bb72d77ca..43ceeb890 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIColor+Extensions.swift +++ b/Sources/FluentUI_common/Core/Extensions/UIColor+Extensions.swift @@ -3,8 +3,8 @@ // Licensed under the MIT License. // +#if canImport(UIKit) import UIKit -import SwiftUI extension UIColor { @@ -139,10 +139,9 @@ extension UIColor { } convenience init(dynamicColor: DynamicColor) { - let colorResolver = { $0 != nil ? UIColor($0!) : nil } self.init(light: UIColor(dynamicColor.light), - dark: colorResolver(dynamicColor.dark), - darkElevated: colorResolver(dynamicColor.darkElevated)) + dark: dynamicColor.dark.map { UIColor($0) }, + darkElevated: dynamicColor.darkElevated.map { UIColor($0) }) } /// Returns the version of the current color that results from the specified traits as a `ColorValue`. @@ -172,3 +171,4 @@ extension UIColor { return resolvedColor } } +#endif // canImport(UIKit) diff --git a/Sources/FluentUI_iOS/Core/FluentTheme+Tokens.swift b/Sources/FluentUI_common/Core/Theme/FluentTheme+Tokens.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/FluentTheme+Tokens.swift rename to Sources/FluentUI_common/Core/Theme/FluentTheme+Tokens.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/FluentTheme.swift b/Sources/FluentUI_common/Core/Theme/FluentTheme.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/FluentTheme.swift rename to Sources/FluentUI_common/Core/Theme/FluentTheme.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/ControlTokenSet.swift b/Sources/FluentUI_common/Core/Theme/Tokens/ControlTokenSet.swift similarity index 99% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/ControlTokenSet.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/ControlTokenSet.swift index 605bba1da..98ef48e5d 100644 --- a/Sources/FluentUI_iOS/Core/Theme/Tokens/ControlTokenSet.swift +++ b/Sources/FluentUI_common/Core/Theme/Tokens/ControlTokenSet.swift @@ -316,7 +316,7 @@ public enum ControlTokenValue { // Use our global "Hot Pink" in debug builds, to help identify unintentional conversions. return UIColor(GlobalTokens.sharedSwiftUIColor(.hotPink, .primary)) #else - return GlobalTokens.neutralColor(.black) + return UIColor(GlobalTokens.neutralSwiftUIColor(.black)) #endif } #endif // os(iOS) || os(visionOS) diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/DynamicColor.swift b/Sources/FluentUI_common/Core/Theme/Tokens/DynamicColor.swift similarity index 76% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/DynamicColor.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/DynamicColor.swift index 5f52b3c09..aeac725b1 100644 --- a/Sources/FluentUI_iOS/Core/Theme/Tokens/DynamicColor.swift +++ b/Sources/FluentUI_common/Core/Theme/Tokens/DynamicColor.swift @@ -6,30 +6,31 @@ import SwiftUI /// A container that stores a dynamic set of `Color` values. -struct DynamicColor: Hashable { +@objc(MSFDynamicColor) +public final class DynamicColor: NSObject { /// Creates a custom `ShapeStyle` that stores a dynamic set of `Color` values. /// /// - Parameter light: The default `Color` for a light context. Required. /// - Parameter dark: The override `Color` for a dark context. Optional. /// - Parameter darkElevated: The override `Color` for a dark elevated context. Optional. - init(light: Color, - dark: Color? = nil, - darkElevated: Color? = nil) { + public init(light: Color, + dark: Color? = nil, + darkElevated: Color? = nil) { self.light = light self.dark = dark self.darkElevated = darkElevated } - let light: Color - let dark: Color? - let darkElevated: Color? + public let light: Color + public let dark: Color? + public let darkElevated: Color? } @available(iOS 17, macOS 14, *) extension DynamicColor: ShapeStyle { /// Evaluate to a resolved `Color` (in the form of a `ShapeStyle`) given the current `environment`. - func resolve(in environment: EnvironmentValues) -> Color.Resolved { + public func resolve(in environment: EnvironmentValues) -> Color.Resolved { if environment.colorScheme == .dark { if environment.isPresented, let darkElevated = darkElevated { return darkElevated.resolve(in: environment) diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/EmptyTokenSet.swift b/Sources/FluentUI_common/Core/Theme/Tokens/EmptyTokenSet.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/EmptyTokenSet.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/EmptyTokenSet.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/FontInfo.swift b/Sources/FluentUI_common/Core/Theme/Tokens/FontInfo.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/FontInfo.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/FontInfo.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens.swift b/Sources/FluentUI_common/Core/Theme/Tokens/GlobalTokens.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/GlobalTokens.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/LinearGradientInfo.swift b/Sources/FluentUI_common/Core/Theme/Tokens/LinearGradientInfo.swift similarity index 94% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/LinearGradientInfo.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/LinearGradientInfo.swift index 8927ec21d..682d883a3 100644 --- a/Sources/FluentUI_iOS/Core/Theme/Tokens/LinearGradientInfo.swift +++ b/Sources/FluentUI_common/Core/Theme/Tokens/LinearGradientInfo.swift @@ -43,8 +43,8 @@ public class LinearGradientInfo: NSObject { // MARK: - Extensions extension LinearGradient { - /// Internal property to generate a SwiftUI `LinearGradient` from a gradient info. - init(gradientInfo: LinearGradientInfo) { + /// Generate a SwiftUI `LinearGradient` from a gradient info. + public init(gradientInfo: LinearGradientInfo) { if let locations = gradientInfo.locations { // Map the colors and locations together. let stops: [Gradient.Stop] = zip(gradientInfo.colors, locations).map({ (color, location) in diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo.swift b/Sources/FluentUI_common/Core/Theme/Tokens/ShadowInfo.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/ShadowInfo.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/TokenSet.swift b/Sources/FluentUI_common/Core/Theme/Tokens/TokenSet.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/TokenSet.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/TokenSet.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/TokenizedControl.swift b/Sources/FluentUI_common/Core/Theme/Tokens/TokenizedControl.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/TokenizedControl.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/TokenizedControl.swift diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/TokenizedControlView.swift b/Sources/FluentUI_common/Core/Theme/Tokens/TokenizedControlView.swift similarity index 100% rename from Sources/FluentUI_iOS/Core/Theme/Tokens/TokenizedControlView.swift rename to Sources/FluentUI_common/Core/Theme/Tokens/TokenizedControlView.swift diff --git a/Sources/FluentUI_iOS/Core/Utilities/AnimationSynchronizer.swift b/Sources/FluentUI_common/Core/Utilities/AnimationSynchronizer.swift similarity index 98% rename from Sources/FluentUI_iOS/Core/Utilities/AnimationSynchronizer.swift rename to Sources/FluentUI_common/Core/Utilities/AnimationSynchronizer.swift index 3ba614404..22ec90df8 100644 --- a/Sources/FluentUI_iOS/Core/Utilities/AnimationSynchronizer.swift +++ b/Sources/FluentUI_common/Core/Utilities/AnimationSynchronizer.swift @@ -3,7 +3,7 @@ // Licensed under the MIT License. // -import UIKit +import QuartzCore /// An animation synchronizer syncs homogeneous layer animations by calculating the appropriate timeOffset /// of a referenceLayer so that newly added animations can stay in sync with existing animations. diff --git a/Sources/FluentUI_iOS/Core/module.modulemap b/Sources/FluentUI_common/Core/module.modulemap similarity index 100% rename from Sources/FluentUI_iOS/Core/module.modulemap rename to Sources/FluentUI_common/Core/module.modulemap diff --git a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicator.swift b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicator.swift index 00cdda7ab..e6d79d53e 100644 --- a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicator.swift +++ b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorModifiers.swift b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorModifiers.swift index 3088f8c75..a007da6d8 100644 --- a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorModifiers.swift +++ b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorTokenSet.swift b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorTokenSet.swift index c2f7ecbf5..6e0679ba9 100644 --- a/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/ActivityIndicator/ActivityIndicatorTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/ActivityIndicator/MSFActivityIndicator.swift b/Sources/FluentUI_iOS/Components/ActivityIndicator/MSFActivityIndicator.swift index 8590ad307..7788c7345 100644 --- a/Sources/FluentUI_iOS/Components/ActivityIndicator/MSFActivityIndicator.swift +++ b/Sources/FluentUI_iOS/Components/ActivityIndicator/MSFActivityIndicator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/Avatar/Avatar.swift b/Sources/FluentUI_iOS/Components/Avatar/Avatar.swift index 1e01124f2..0a7a40dfe 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/Avatar.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/Avatar.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// Properties that can be used to customize the appearance of the Avatar. @objc public protocol MSFAvatarState { diff --git a/Sources/FluentUI_iOS/Components/Avatar/AvatarModifiers.swift b/Sources/FluentUI_iOS/Components/Avatar/AvatarModifiers.swift index 65aa586a2..6ed060dda 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/AvatarModifiers.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/AvatarModifiers.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public extension Avatar { diff --git a/Sources/FluentUI_iOS/Components/Avatar/AvatarTokenSet.swift b/Sources/FluentUI_iOS/Components/Avatar/AvatarTokenSet.swift index d6598536f..8f80ef612 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/AvatarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/AvatarTokenSet.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public enum AvatarToken: Int, TokenSetKey { /// The radius of the corners of the `Avatar`. diff --git a/Sources/FluentUI_iOS/Components/Avatar/MSFAvatar.swift b/Sources/FluentUI_iOS/Components/Avatar/MSFAvatar.swift index f761ad003..10f721082 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/MSFAvatar.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/MSFAvatar.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// UIKit wrapper that exposes the SwiftUI Avatar implementation. @objc open class MSFAvatar: ControlHostingView { diff --git a/Sources/FluentUI_iOS/Components/Avatar/MSFAvatarPresence.swift b/Sources/FluentUI_iOS/Components/Avatar/MSFAvatarPresence.swift index 0c3b78dcd..d84793c9e 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/MSFAvatarPresence.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/MSFAvatarPresence.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit @objc public enum MSFAvatarPresence: Int, CaseIterable { case none diff --git a/Sources/FluentUI_iOS/Components/Avatar/Persona.swift b/Sources/FluentUI_iOS/Components/Avatar/Persona.swift index 5c45dd62c..8099c38b7 100644 --- a/Sources/FluentUI_iOS/Components/Avatar/Persona.swift +++ b/Sources/FluentUI_iOS/Components/Avatar/Persona.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: Persona diff --git a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroup.swift b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroup.swift index 3a5434362..52694b183 100644 --- a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroup.swift +++ b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroup.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// Properties that can be used to customize the appearance of the AvatarGroup. @objc public protocol MSFAvatarGroupState { diff --git a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupModifiers.swift b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupModifiers.swift index 17ba903df..032bf7cc2 100644 --- a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupModifiers.swift +++ b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupModifiers.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public extension AvatarGroup { } diff --git a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupTokenSet.swift b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupTokenSet.swift index 19cbf6e26..61b539388 100644 --- a/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/AvatarGroup/AvatarGroupTokenSet.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public enum AvatarGroupToken: Int, TokenSetKey { /// Defines the color around the unread dot. diff --git a/Sources/FluentUI_iOS/Components/AvatarGroup/MSFAvatarGroup.swift b/Sources/FluentUI_iOS/Components/AvatarGroup/MSFAvatarGroup.swift index e9a7a8aa0..eeee26ccf 100644 --- a/Sources/FluentUI_iOS/Components/AvatarGroup/MSFAvatarGroup.swift +++ b/Sources/FluentUI_iOS/Components/AvatarGroup/MSFAvatarGroup.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// UIKit wrapper that exposes the SwiftUI AvatarGroup implementation. @objc open class MSFAvatarGroup: ControlHostingView { diff --git a/Sources/FluentUI_iOS/Components/Badge Field/BadgeField.swift b/Sources/FluentUI_iOS/Components/Badge Field/BadgeField.swift index 05e422a86..52617f3b5 100644 --- a/Sources/FluentUI_iOS/Components/Badge Field/BadgeField.swift +++ b/Sources/FluentUI_iOS/Components/Badge Field/BadgeField.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: BadgeFieldDelegate diff --git a/Sources/FluentUI_iOS/Components/Badge Field/BadgeFieldTokenSet.swift b/Sources/FluentUI_iOS/Components/Badge Field/BadgeFieldTokenSet.swift index a4e00f36f..0df564647 100644 --- a/Sources/FluentUI_iOS/Components/Badge Field/BadgeFieldTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Badge Field/BadgeFieldTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum BadgeFieldToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Badge Field/BadgeStringExtractor.swift b/Sources/FluentUI_iOS/Components/Badge Field/BadgeStringExtractor.swift index 0de4d3013..3c5a05a12 100644 --- a/Sources/FluentUI_iOS/Components/Badge Field/BadgeStringExtractor.swift +++ b/Sources/FluentUI_iOS/Components/Badge Field/BadgeStringExtractor.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit private struct BadgeStringData { diff --git a/Sources/FluentUI_iOS/Components/Badge Field/BadgeView.swift b/Sources/FluentUI_iOS/Components/Badge Field/BadgeView.swift index be0e0773f..64c1cb44d 100644 --- a/Sources/FluentUI_iOS/Components/Badge Field/BadgeView.swift +++ b/Sources/FluentUI_iOS/Components/Badge Field/BadgeView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: BadgeViewDataSource diff --git a/Sources/FluentUI_iOS/Components/Badge Field/BadgeViewTokenSet.swift b/Sources/FluentUI_iOS/Components/Badge Field/BadgeViewTokenSet.swift index ad77acc42..0e180c3fa 100644 --- a/Sources/FluentUI_iOS/Components/Badge Field/BadgeViewTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Badge Field/BadgeViewTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum BadgeViewToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/BarButtonItems/BarButtonItems.swift b/Sources/FluentUI_iOS/Components/BarButtonItems/BarButtonItems.swift index 5d46dba10..df1e33906 100644 --- a/Sources/FluentUI_iOS/Components/BarButtonItems/BarButtonItems.swift +++ b/Sources/FluentUI_iOS/Components/BarButtonItems/BarButtonItems.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public final class BarButtonItems: NSObject { diff --git a/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingController.swift b/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingController.swift index 86b2b60ff..332ea955c 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingController.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFBottomCommandingControllerDelegate) diff --git a/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingTokenSet.swift b/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingTokenSet.swift index 239bd52ec..f74a5e61d 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Commanding/BottomCommandingTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public enum BottomCommandingToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingItem.swift b/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingItem.swift index 206c753a8..b19be9b16 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingItem.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// An object representing a command. diff --git a/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingSection.swift b/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingSection.swift index 610b707f3..6c8e42302 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingSection.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Commanding/CommandingSection.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// A named container of `CommandingItem` objects. diff --git a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift index ec87fffe2..fb943024e 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFBottomSheetControllerDelegate) diff --git a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetPassthroughView.swift b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetPassthroughView.swift index 6b51a0700..a169076b9 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetPassthroughView.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetPassthroughView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class BottomSheetPassthroughView: UIView { diff --git a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetTokenSet.swift b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetTokenSet.swift index f2e710513..4fd7e8d7a 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Sheet/BottomSheetTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum BottomSheetToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Bottom Sheet/ContentHeightResolutionContext.swift b/Sources/FluentUI_iOS/Components/Bottom Sheet/ContentHeightResolutionContext.swift index 7c1f6a394..dfe15298f 100644 --- a/Sources/FluentUI_iOS/Components/Bottom Sheet/ContentHeightResolutionContext.swift +++ b/Sources/FluentUI_iOS/Components/Bottom Sheet/ContentHeightResolutionContext.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Contains all information necessary to determine desired height of content inside of a container. diff --git a/Sources/FluentUI_iOS/Components/Button/Button.swift b/Sources/FluentUI_iOS/Components/Button/Button.swift index 5f8094d7a..e9dcb47ff 100644 --- a/Sources/FluentUI_iOS/Components/Button/Button.swift +++ b/Sources/FluentUI_iOS/Components/Button/Button.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - Button diff --git a/Sources/FluentUI_iOS/Components/Button/ButtonTokenSet.swift b/Sources/FluentUI_iOS/Components/Button/ButtonTokenSet.swift index b49cf8474..911798f5c 100644 --- a/Sources/FluentUI_iOS/Components/Button/ButtonTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Button/ButtonTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ButtonStyle diff --git a/Sources/FluentUI_iOS/Components/Button/FluentButtonStyle.swift b/Sources/FluentUI_iOS/Components/Button/FluentButtonStyle.swift index 34b72a398..2c650a468 100644 --- a/Sources/FluentUI_iOS/Components/Button/FluentButtonStyle.swift +++ b/Sources/FluentUI_iOS/Components/Button/FluentButtonStyle.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/Button/FluentButtonToggleStyle.swift b/Sources/FluentUI_iOS/Components/Button/FluentButtonToggleStyle.swift index e95b5b508..db302c8ea 100644 --- a/Sources/FluentUI_iOS/Components/Button/FluentButtonToggleStyle.swift +++ b/Sources/FluentUI_iOS/Components/Button/FluentButtonToggleStyle.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// `ToggleStyle` which configures the `Toggle` according to its state and design tokens. diff --git a/Sources/FluentUI_iOS/Components/Calendar/AccessibilityContainerView.swift b/Sources/FluentUI_iOS/Components/Calendar/AccessibilityContainerView.swift index 7a4b6615a..243cfe1e7 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/AccessibilityContainerView.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/AccessibilityContainerView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// This is a container that forwards the calls to the tableview to create an adjustable picker. diff --git a/Sources/FluentUI_iOS/Components/Calendar/AccessibleViewDelegate.swift b/Sources/FluentUI_iOS/Components/Calendar/AccessibleViewDelegate.swift index e150d59da..e755fbf4a 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/AccessibleViewDelegate.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/AccessibleViewDelegate.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /** diff --git a/Sources/FluentUI_iOS/Components/Calendar/CalendarView.swift b/Sources/FluentUI_iOS/Components/Calendar/CalendarView.swift index 1c4145b45..95a6018ef 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/CalendarView.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/CalendarView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewHeightStyle diff --git a/Sources/FluentUI_iOS/Components/Calendar/CalendarViewDataSource.swift b/Sources/FluentUI_iOS/Components/Calendar/CalendarViewDataSource.swift index 42fad89b7..32412cbbb 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/CalendarViewDataSource.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/CalendarViewDataSource.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewStyleDataSource diff --git a/Sources/FluentUI_iOS/Components/Calendar/CalendarViewLayout.swift b/Sources/FluentUI_iOS/Components/Calendar/CalendarViewLayout.swift index 6dd38df89..e5f7ded17 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/CalendarViewLayout.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/CalendarViewLayout.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewLayoutDelegate diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayCell.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayCell.swift index 788098241..42c6a6cea 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayCell.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewDayCellTextStyle diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthCell.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthCell.swift index 9ea6804a0..e508bd7a4 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthCell.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - CalendarViewDayMonthCell diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthYearCell.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthYearCell.swift index 0b9225d89..3ba5e451a 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthYearCell.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayMonthYearCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewDayMonthYearCell diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayTodayCell.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayTodayCell.swift index ce2ac6860..2bb6d325f 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayTodayCell.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewDayTodayCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewDayTodayCell diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewMonthBannerView.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewMonthBannerView.swift index c1b10dad1..7c0894479 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewMonthBannerView.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewMonthBannerView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewMonthBannerView diff --git a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewWeekdayHeadingView.swift b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewWeekdayHeadingView.swift index 54d5c04ec..d84130966 100644 --- a/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewWeekdayHeadingView.swift +++ b/Sources/FluentUI_iOS/Components/Calendar/Views/CalendarViewWeekdayHeadingView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CalendarViewWeekdayHeadingView diff --git a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudge.swift b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudge.swift index 93596cca1..96d9d6ce3 100644 --- a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudge.swift +++ b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudge.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Type of callback for both action and dismiss buttons. diff --git a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeModifiers.swift b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeModifiers.swift index ff09b73db..d9f2ac526 100644 --- a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeModifiers.swift +++ b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension CardNudge { diff --git a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeTokenSet.swift b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeTokenSet.swift index 51acf7af5..c5da8483b 100644 --- a/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Card Nudge/CardNudgeTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Style to draw the `CardNudge` control. diff --git a/Sources/FluentUI_iOS/Components/Card Nudge/MSFCardNudge.swift b/Sources/FluentUI_iOS/Components/Card Nudge/MSFCardNudge.swift index 46377315a..f00b78873 100644 --- a/Sources/FluentUI_iOS/Components/Card Nudge/MSFCardNudge.swift +++ b/Sources/FluentUI_iOS/Components/Card Nudge/MSFCardNudge.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/Card/CardView.swift b/Sources/FluentUI_iOS/Components/Card/CardView.swift index 95f2fe2f8..3d8e810af 100644 --- a/Sources/FluentUI_iOS/Components/Card/CardView.swift +++ b/Sources/FluentUI_iOS/Components/Card/CardView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Delegate protocol to handle user interaction with the CardView diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBar.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBar.swift index 7e3cc3f44..b351c0329 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBar.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// `CommandBarDelegate` is used to notify consumers of the `CommandBar` of certain events occurring within the `CommandBar` diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButton.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButton.swift index d16ec60da..9f078b10c 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButton.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CommandBarButton: UIButton { diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButtonGroupView.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButtonGroupView.swift index 5241d9d1e..b79bcdceb 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButtonGroupView.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarButtonGroupView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CommandBarButtonGroupView: UIView { diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarCommandGroupsView.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarCommandGroupsView.swift index 8ced4ca38..164c835eb 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarCommandGroupsView.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarCommandGroupsView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CommandBarCommandGroupsView: UIView { diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarItem.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarItem.swift index 840bea3de..4e9bdead3 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarItem.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFCommandBarItem) diff --git a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarTokenSet.swift b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarTokenSet.swift index 70116e3c9..df025a57c 100644 --- a/Sources/FluentUI_iOS/Components/Command Bar/CommandBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Command Bar/CommandBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum CommandBarToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Picker/DatePickerController.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Picker/DatePickerController.swift index a91d42186..3d3fcce97 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Picker/DatePickerController.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Picker/DatePickerController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DatePickerHeaderStyle diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/DateTimePickerController.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/DateTimePickerController.swift index 1fb41c68f..2d95efd86 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/DateTimePickerController.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/DateTimePickerController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DateTimePickerControllerMode diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerView.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerView.swift index 168fecf0a..918177694 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerView.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DateTimePickerViewMode diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponent.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponent.swift index ba1963d09..30a800018 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponent.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponent.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DateTimePickerViewComponentDelegate diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentCell.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentCell.swift index db6625623..825956f37 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentCell.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - DateTimePickerViewComponentCell diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentTableView.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentTableView.swift index 3220702e4..81b951208 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentTableView.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewComponentTableView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DateTimePickerViewComponentTableView diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewLayout.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewLayout.swift index 2ff30d9a8..a3714f46b 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewLayout.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/Date Time Picker/Views/DateTimePickerViewLayout.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// A static class used to calculate layout and sizing information for DateTimePickerView. diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/DateTimePicker.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/DateTimePicker.swift index 6325191cd..6f560d7fb 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/DateTimePicker.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/DateTimePicker.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DateTimePickerMode diff --git a/Sources/FluentUI_iOS/Components/Date Time Pickers/GenericDateTimePicker.swift b/Sources/FluentUI_iOS/Components/Date Time Pickers/GenericDateTimePicker.swift index 7aacef4e3..0ea00b985 100644 --- a/Sources/FluentUI_iOS/Components/Date Time Pickers/GenericDateTimePicker.swift +++ b/Sources/FluentUI_iOS/Components/Date Time Pickers/GenericDateTimePicker.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: GenericDateTimePicker diff --git a/Sources/FluentUI_iOS/Components/DotView/DotView.swift b/Sources/FluentUI_iOS/Components/DotView/DotView.swift index 0da700ac4..a07dd0ffd 100644 --- a/Sources/FluentUI_iOS/Components/DotView/DotView.swift +++ b/Sources/FluentUI_iOS/Components/DotView/DotView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFDotView) diff --git a/Sources/FluentUI_iOS/Components/Drawer/DrawerController.swift b/Sources/FluentUI_iOS/Components/Drawer/DrawerController.swift index fa2c00835..4d1162c91 100644 --- a/Sources/FluentUI_iOS/Components/Drawer/DrawerController.swift +++ b/Sources/FluentUI_iOS/Components/Drawer/DrawerController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DrawerResizingBehavior diff --git a/Sources/FluentUI_iOS/Components/Drawer/DrawerPresentationController.swift b/Sources/FluentUI_iOS/Components/Drawer/DrawerPresentationController.swift index 54f83a9b5..4db390d6b 100644 --- a/Sources/FluentUI_iOS/Components/Drawer/DrawerPresentationController.swift +++ b/Sources/FluentUI_iOS/Components/Drawer/DrawerPresentationController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - DrawerPresentationDelegate diff --git a/Sources/FluentUI_iOS/Components/Drawer/DrawerShadowView.swift b/Sources/FluentUI_iOS/Components/Drawer/DrawerShadowView.swift index 1d8ac481e..38aa885a5 100644 --- a/Sources/FluentUI_iOS/Components/Drawer/DrawerShadowView.swift +++ b/Sources/FluentUI_iOS/Components/Drawer/DrawerShadowView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class DrawerShadowView: UIView, Shadowable { diff --git a/Sources/FluentUI_iOS/Components/Drawer/DrawerTokenSet.swift b/Sources/FluentUI_iOS/Components/Drawer/DrawerTokenSet.swift index a9b89a33e..733b1b88c 100644 --- a/Sources/FluentUI_iOS/Components/Drawer/DrawerTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Drawer/DrawerTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum DrawerToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Drawer/DrawerTransitionAnimator.swift b/Sources/FluentUI_iOS/Components/Drawer/DrawerTransitionAnimator.swift index 4d39dd131..e61aab9ec 100644 --- a/Sources/FluentUI_iOS/Components/Drawer/DrawerTransitionAnimator.swift +++ b/Sources/FluentUI_iOS/Components/Drawer/DrawerTransitionAnimator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DrawerTransitionAnimator diff --git a/Sources/FluentUI_iOS/Components/EasyTapButton/EasyTapButton.swift b/Sources/FluentUI_iOS/Components/EasyTapButton/EasyTapButton.swift index b93ccac2b..8fe7704d7 100644 --- a/Sources/FluentUI_iOS/Components/EasyTapButton/EasyTapButton.swift +++ b/Sources/FluentUI_iOS/Components/EasyTapButton/EasyTapButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: EasyTapButton diff --git a/Sources/FluentUI_iOS/Components/HUD/HUD.swift b/Sources/FluentUI_iOS/Components/HUD/HUD.swift index 08cc353a1..06343932f 100644 --- a/Sources/FluentUI_iOS/Components/HUD/HUD.swift +++ b/Sources/FluentUI_iOS/Components/HUD/HUD.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: HUDDelegate diff --git a/Sources/FluentUI_iOS/Components/HUD/HUDModifiers.swift b/Sources/FluentUI_iOS/Components/HUD/HUDModifiers.swift index 6030c7e19..0e646dd9f 100644 --- a/Sources/FluentUI_iOS/Components/HUD/HUDModifiers.swift +++ b/Sources/FluentUI_iOS/Components/HUD/HUDModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension View { diff --git a/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplay.swift b/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplay.swift index fb2d04506..2397e3064 100644 --- a/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplay.swift +++ b/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplay.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Defines the content type of the Heads-up display. diff --git a/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplayTokenSet.swift b/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplayTokenSet.swift index ddb272c42..79d24161a 100644 --- a/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplayTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/HUD/HeadsUpDisplayTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/HUD/MSFHeadsUpDisplay.swift b/Sources/FluentUI_iOS/Components/HUD/MSFHeadsUpDisplay.swift index 9e7c1d657..cdc4c64b8 100644 --- a/Sources/FluentUI_iOS/Components/HUD/MSFHeadsUpDisplay.swift +++ b/Sources/FluentUI_iOS/Components/HUD/MSFHeadsUpDisplay.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBar.swift b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBar.swift index 512996db2..bb988d1e3 100644 --- a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBar.swift +++ b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarModifiers.swift b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarModifiers.swift index ce730d451..b0600ba2f 100644 --- a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarModifiers.swift +++ b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarTokenSet.swift b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarTokenSet.swift index c0c84e39c..3279c58ce 100644 --- a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/IndeterminateProgressBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/MSFIndeterminateProgressBar.swift b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/MSFIndeterminateProgressBar.swift index f3e761f2b..905215e51 100644 --- a/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/MSFIndeterminateProgressBar.swift +++ b/Sources/FluentUI_iOS/Components/IndeterminateProgressBar/MSFIndeterminateProgressBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/Label/BadgeLabel.swift b/Sources/FluentUI_iOS/Components/Label/BadgeLabel.swift index f556f6110..ff3482b22 100644 --- a/Sources/FluentUI_iOS/Components/Label/BadgeLabel.swift +++ b/Sources/FluentUI_iOS/Components/Label/BadgeLabel.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: BadgeLabel diff --git a/Sources/FluentUI_iOS/Components/Label/BadgeLabelTokenSet.swift b/Sources/FluentUI_iOS/Components/Label/BadgeLabelTokenSet.swift index f8abd7d81..d537916ff 100644 --- a/Sources/FluentUI_iOS/Components/Label/BadgeLabelTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Label/BadgeLabelTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum BadgeLabelToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Label/Label.swift b/Sources/FluentUI_iOS/Components/Label/Label.swift index 911091c12..069691dda 100644 --- a/Sources/FluentUI_iOS/Components/Label/Label.swift +++ b/Sources/FluentUI_iOS/Components/Label/Label.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - Label diff --git a/Sources/FluentUI_iOS/Components/Label/LabelTokenSet.swift b/Sources/FluentUI_iOS/Components/Label/LabelTokenSet.swift index 99466c609..d5d2903b0 100644 --- a/Sources/FluentUI_iOS/Components/Label/LabelTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Label/LabelTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TextColorStyle diff --git a/Sources/FluentUI_iOS/Components/List/FluentList.swift b/Sources/FluentUI_iOS/Components/List/FluentList.swift index 05fa9c2eb..f47a1fee2 100644 --- a/Sources/FluentUI_iOS/Components/List/FluentList.swift +++ b/Sources/FluentUI_iOS/Components/List/FluentList.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Fluent specific list style enum diff --git a/Sources/FluentUI_iOS/Components/List/FluentListModifiers.swift b/Sources/FluentUI_iOS/Components/List/FluentListModifiers.swift index bad696318..865dae572 100644 --- a/Sources/FluentUI_iOS/Components/List/FluentListModifiers.swift +++ b/Sources/FluentUI_iOS/Components/List/FluentListModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension FluentList { diff --git a/Sources/FluentUI_iOS/Components/List/FluentListSection.swift b/Sources/FluentUI_iOS/Components/List/FluentListSection.swift index 047f85252..6daa9a0cc 100644 --- a/Sources/FluentUI_iOS/Components/List/FluentListSection.swift +++ b/Sources/FluentUI_iOS/Components/List/FluentListSection.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// This a wrapper around `SwiftUI.Section` that has fluent style applied. It is intended to be used in conjunction with `FluentUI.FluentList` and `FluentUI.ListItem` diff --git a/Sources/FluentUI_iOS/Components/List/FluentListSectionFooter.swift b/Sources/FluentUI_iOS/Components/List/FluentListSectionFooter.swift index 3d94d470b..6be760db7 100644 --- a/Sources/FluentUI_iOS/Components/List/FluentListSectionFooter.swift +++ b/Sources/FluentUI_iOS/Components/List/FluentListSectionFooter.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// This component is a work in progress. Expect changes to be made to it on a somewhat regular basis. diff --git a/Sources/FluentUI_iOS/Components/List/FluentListSectionHeader.swift b/Sources/FluentUI_iOS/Components/List/FluentListSectionHeader.swift index d10809e0d..c128ed91e 100644 --- a/Sources/FluentUI_iOS/Components/List/FluentListSectionHeader.swift +++ b/Sources/FluentUI_iOS/Components/List/FluentListSectionHeader.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public typealias ListSectionHeaderFooterTokenSet = TableViewHeaderFooterViewTokenSet diff --git a/Sources/FluentUI_iOS/Components/List/ListActionItem.swift b/Sources/FluentUI_iOS/Components/List/ListActionItem.swift index 0e2dc2b29..4ed72afa4 100644 --- a/Sources/FluentUI_iOS/Components/List/ListActionItem.swift +++ b/Sources/FluentUI_iOS/Components/List/ListActionItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/List/ListItem.swift b/Sources/FluentUI_iOS/Components/List/ListItem.swift index bc9e37752..bafee32fa 100644 --- a/Sources/FluentUI_iOS/Components/List/ListItem.swift +++ b/Sources/FluentUI_iOS/Components/List/ListItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public typealias ListItemAccessoryType = TableViewCellAccessoryType diff --git a/Sources/FluentUI_iOS/Components/MultilineCommandBar/MultilineCommandBar.swift b/Sources/FluentUI_iOS/Components/MultilineCommandBar/MultilineCommandBar.swift index 0751222a7..8db0b536d 100644 --- a/Sources/FluentUI_iOS/Components/MultilineCommandBar/MultilineCommandBar.swift +++ b/Sources/FluentUI_iOS/Components/MultilineCommandBar/MultilineCommandBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// An object representing a row in the `MultilineCommandBar`. diff --git a/Sources/FluentUI_iOS/Components/Navigation/BadgeLabelButton.swift b/Sources/FluentUI_iOS/Components/Navigation/BadgeLabelButton.swift index 2fccd8599..4d5da9d34 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/BadgeLabelButton.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/BadgeLabelButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class BadgeLabelButton: UIButton { diff --git a/Sources/FluentUI_iOS/Components/Navigation/Helpers/ContentScrollViewTraits.swift b/Sources/FluentUI_iOS/Components/Navigation/Helpers/ContentScrollViewTraits.swift index 70fd3c49c..05106c1b1 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Helpers/ContentScrollViewTraits.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Helpers/ContentScrollViewTraits.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ContentScrollViewTraits diff --git a/Sources/FluentUI_iOS/Components/Navigation/Helpers/NavigationAnimator.swift b/Sources/FluentUI_iOS/Components/Navigation/Helpers/NavigationAnimator.swift index a2938f497..39f8fb878 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Helpers/NavigationAnimator.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Helpers/NavigationAnimator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: NavigationAnimator diff --git a/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift b/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift index 21b0d01c6..e6a3b4d2e 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/NavigationBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - NavigationBarTopAccessoryViewAttributes diff --git a/Sources/FluentUI_iOS/Components/Navigation/NavigationBarTokenSet.swift b/Sources/FluentUI_iOS/Components/Navigation/NavigationBarTokenSet.swift index 50f1666f0..d25c16a60 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/NavigationBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/NavigationBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum NavigationBarToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Navigation/NavigationController.swift b/Sources/FluentUI_iOS/Components/Navigation/NavigationController.swift index 180842104..a17647dce 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/NavigationController.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/NavigationController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: NavigationController diff --git a/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBar.swift b/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBar.swift index 47efdc423..43ae5309e 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBar.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: SearchBarDelegate diff --git a/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBarTokenSet.swift b/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBarTokenSet.swift index b15df6f44..046276788 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/SearchBar/SearchBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum SearchBarToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderController.swift b/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderController.swift index 36f75ddc2..5cc6bf3f8 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderController.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ShyHeaderController diff --git a/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderView.swift b/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderView.swift index d9f2e505d..0a5d2638d 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderView.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Shy Header/ShyHeaderView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ShyHeaderView diff --git a/Sources/FluentUI_iOS/Components/Navigation/TwoLineTitleView+Navigation.swift b/Sources/FluentUI_iOS/Components/Navigation/TwoLineTitleView+Navigation.swift index c61ed0b2a..551a96690 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/TwoLineTitleView+Navigation.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/TwoLineTitleView+Navigation.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: NavigationBarTitleAccessory enum extensions diff --git a/Sources/FluentUI_iOS/Components/Navigation/UIBarButtonItem+BadgeValue.swift b/Sources/FluentUI_iOS/Components/Navigation/UIBarButtonItem+BadgeValue.swift index 53f68cefc..8cc33307f 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/UIBarButtonItem+BadgeValue.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/UIBarButtonItem+BadgeValue.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc public extension UIBarButtonItem { diff --git a/Sources/FluentUI_iOS/Components/Navigation/UINavigationItem+Navigation.swift b/Sources/FluentUI_iOS/Components/Navigation/UINavigationItem+Navigation.swift index ba346097a..0cc744fc6 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/UINavigationItem+Navigation.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/UINavigationItem+Navigation.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc public extension UINavigationItem { diff --git a/Sources/FluentUI_iOS/Components/Navigation/UIViewController+Navigation.swift b/Sources/FluentUI_iOS/Components/Navigation/UIViewController+Navigation.swift index 5650e310e..094944ce6 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/UIViewController+Navigation.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/UIViewController+Navigation.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc public extension UIViewController { diff --git a/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleView.swift b/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleView.swift index 5654d3019..9264f5610 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleView.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: AvatarTitleView diff --git a/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleViewTokenSet.swift b/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleViewTokenSet.swift index aa556ba98..cee8d62c7 100644 --- a/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleViewTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Navigation/Views/AvatarTitleViewTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Design token set for the `AvatarTitleView` control. diff --git a/Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift b/Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift index 5b3420e0b..05386edec 100644 --- a/Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift +++ b/Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Properties that can be used to customize the appearance of the `Notification`. diff --git a/Sources/FluentUI_iOS/Components/Notification/MSFNotification.swift b/Sources/FluentUI_iOS/Components/Notification/MSFNotification.swift index 8cf5a40d2..ad08f3d0c 100644 --- a/Sources/FluentUI_iOS/Components/Notification/MSFNotification.swift +++ b/Sources/FluentUI_iOS/Components/Notification/MSFNotification.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/Notification/NotificationModifiers.swift b/Sources/FluentUI_iOS/Components/Notification/NotificationModifiers.swift index 360876339..91d2449eb 100644 --- a/Sources/FluentUI_iOS/Components/Notification/NotificationModifiers.swift +++ b/Sources/FluentUI_iOS/Components/Notification/NotificationModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension View { diff --git a/Sources/FluentUI_iOS/Components/Notification/NotificationTokenSet.swift b/Sources/FluentUI_iOS/Components/Notification/NotificationTokenSet.swift index 2d7fc035a..6fafa5eff 100644 --- a/Sources/FluentUI_iOS/Components/Notification/NotificationTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Notification/NotificationTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Pre-defined styles of the notification diff --git a/Sources/FluentUI_iOS/Components/Obscurable/BlurringView.swift b/Sources/FluentUI_iOS/Components/Obscurable/BlurringView.swift index 12e6026df..9da7c1aa2 100644 --- a/Sources/FluentUI_iOS/Components/Obscurable/BlurringView.swift +++ b/Sources/FluentUI_iOS/Components/Obscurable/BlurringView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: BlurringView diff --git a/Sources/FluentUI_iOS/Components/Obscurable/DimmingView.swift b/Sources/FluentUI_iOS/Components/Obscurable/DimmingView.swift index b11521632..e3856e919 100644 --- a/Sources/FluentUI_iOS/Components/Obscurable/DimmingView.swift +++ b/Sources/FluentUI_iOS/Components/Obscurable/DimmingView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: DimmingViewType diff --git a/Sources/FluentUI_iOS/Components/Obscurable/Obscurable.swift b/Sources/FluentUI_iOS/Components/Obscurable/Obscurable.swift index 05a5ce52e..0641776fd 100644 --- a/Sources/FluentUI_iOS/Components/Obscurable/Obscurable.swift +++ b/Sources/FluentUI_iOS/Components/Obscurable/Obscurable.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Obscurable represents any UIView containing class that obscures views behind it. It is used to generically use different styles of background obscuring for modals, as well as provide an interface to turn their effect on or off. diff --git a/Sources/FluentUI_iOS/Components/Other Cells/ActionsCell.swift b/Sources/FluentUI_iOS/Components/Other Cells/ActionsCell.swift index 0f9c975dd..2c2a327c1 100644 --- a/Sources/FluentUI_iOS/Components/Other Cells/ActionsCell.swift +++ b/Sources/FluentUI_iOS/Components/Other Cells/ActionsCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ActionsCell diff --git a/Sources/FluentUI_iOS/Components/Other Cells/ActivityIndicatorCell.swift b/Sources/FluentUI_iOS/Components/Other Cells/ActivityIndicatorCell.swift index c396b65d7..4b07ffa38 100644 --- a/Sources/FluentUI_iOS/Components/Other Cells/ActivityIndicatorCell.swift +++ b/Sources/FluentUI_iOS/Components/Other Cells/ActivityIndicatorCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ActivityIndicatorCell diff --git a/Sources/FluentUI_iOS/Components/Other Cells/BooleanCell.swift b/Sources/FluentUI_iOS/Components/Other Cells/BooleanCell.swift index 1d2b2df64..61731c2d3 100644 --- a/Sources/FluentUI_iOS/Components/Other Cells/BooleanCell.swift +++ b/Sources/FluentUI_iOS/Components/Other Cells/BooleanCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: BooleanCell diff --git a/Sources/FluentUI_iOS/Components/Other Cells/CenteredLabelCell.swift b/Sources/FluentUI_iOS/Components/Other Cells/CenteredLabelCell.swift index 1034f450f..5d222c554 100644 --- a/Sources/FluentUI_iOS/Components/Other Cells/CenteredLabelCell.swift +++ b/Sources/FluentUI_iOS/Components/Other Cells/CenteredLabelCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: CenteredLabelCell diff --git a/Sources/FluentUI_iOS/Components/People Picker/PeoplePicker.swift b/Sources/FluentUI_iOS/Components/People Picker/PeoplePicker.swift index 506c0a592..0d8f677f1 100644 --- a/Sources/FluentUI_iOS/Components/People Picker/PeoplePicker.swift +++ b/Sources/FluentUI_iOS/Components/People Picker/PeoplePicker.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PeoplePickerDelegate diff --git a/Sources/FluentUI_iOS/Components/People Picker/PeoplePickerTokenSet.swift b/Sources/FluentUI_iOS/Components/People Picker/PeoplePickerTokenSet.swift index cd15c6376..aa199251e 100644 --- a/Sources/FluentUI_iOS/Components/People Picker/PeoplePickerTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/People Picker/PeoplePickerTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Design token set for the `PeoplePicker` control. diff --git a/Sources/FluentUI_iOS/Components/People Picker/PersonaBadgeViewDataSource.swift b/Sources/FluentUI_iOS/Components/People Picker/PersonaBadgeViewDataSource.swift index 1027d8055..9c757e3a3 100644 --- a/Sources/FluentUI_iOS/Components/People Picker/PersonaBadgeViewDataSource.swift +++ b/Sources/FluentUI_iOS/Components/People Picker/PersonaBadgeViewDataSource.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PersonaBadgeViewDataSource diff --git a/Sources/FluentUI_iOS/Components/People Picker/PersonaCell.swift b/Sources/FluentUI_iOS/Components/People Picker/PersonaCell.swift index 354b3ef62..6bcfe451f 100644 --- a/Sources/FluentUI_iOS/Components/People Picker/PersonaCell.swift +++ b/Sources/FluentUI_iOS/Components/People Picker/PersonaCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PersonaCell diff --git a/Sources/FluentUI_iOS/Components/People Picker/PersonaListView.swift b/Sources/FluentUI_iOS/Components/People Picker/PersonaListView.swift index 56831fbe1..bb1e65590 100644 --- a/Sources/FluentUI_iOS/Components/People Picker/PersonaListView.swift +++ b/Sources/FluentUI_iOS/Components/People Picker/PersonaListView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PersonaListViewSelectionDirection diff --git a/Sources/FluentUI_iOS/Components/PersonaButton/MSFPersonaButton.swift b/Sources/FluentUI_iOS/Components/PersonaButton/MSFPersonaButton.swift index fb0ca1bcd..c0c959b11 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButton/MSFPersonaButton.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButton/MSFPersonaButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButton.swift b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButton.swift index fc5007a8e..389618f95 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButton.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Properties that define the appearance of a `PersonaButton`. diff --git a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonModifiers.swift b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonModifiers.swift index 332f68244..8fcf64320 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonModifiers.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension PersonaButton { diff --git a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonTokenSet.swift b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonTokenSet.swift index 276f31368..dd02828a5 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButton/PersonaButtonTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Pre-defined sizes of the persona button diff --git a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/MSFPersonaButtonCarousel.swift b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/MSFPersonaButtonCarousel.swift index 0f61a8e92..dd7fd8c88 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/MSFPersonaButtonCarousel.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/MSFPersonaButtonCarousel.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarousel.swift b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarousel.swift index 6a21a24bf..5392c6968 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarousel.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarousel.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI /// Properties that define the appearance of a `PersonaButtonCarousel`. diff --git a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselModifiers.swift b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselModifiers.swift index a9342be48..1a71a29f1 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselModifiers.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension PersonaButtonCarousel { diff --git a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselTokenSet.swift b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselTokenSet.swift index 991fb8cbf..fd9e00948 100644 --- a/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/PersonaButtonCarousel/PersonaButtonCarouselTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Representation of design tokens to controls at runtime which interfaces with the Design Token System auto-generated code. diff --git a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButton.swift b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButton.swift index 78d5fb9cd..33dd872b9 100644 --- a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButton.swift +++ b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButton.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PillButton diff --git a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonBar.swift b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonBar.swift index 224ccccc1..efaef387c 100644 --- a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonBar.swift +++ b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: PillButtonBarItem diff --git a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonTokenSet.swift b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonTokenSet.swift index f9dea2c67..c549e765d 100644 --- a/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Pill Button Bar/PillButtonTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum PillButtonToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuController.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuController.swift index cb76a2a44..57ae79ec5 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuController.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /** diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItem.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItem.swift index 2d169b3c0..3cace58ee 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItem.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /** diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemCell.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemCell.swift index 46fb26d74..52c4f7c64 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemCell.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class PopupMenuItemCell: TableViewCell, PopupMenuItemTemplateCell { diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemTokenSet.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemTokenSet.swift index d34ae2a17..da6485526 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuItemTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class PopupMenuItemTokenSet: TableViewCellTokenSet { diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuProtocols.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuProtocols.swift index f7dc0af75..ba1844bdb 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuProtocols.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuProtocols.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Defines the timing for the call of the onSelected closure/block diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSection.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSection.swift index 3eaf6d6e5..ebf3608d8 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSection.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSection.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /** diff --git a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSectionHeaderView.swift b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSectionHeaderView.swift index 40e063b83..91ee5be1a 100644 --- a/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSectionHeaderView.swift +++ b/Sources/FluentUI_iOS/Components/Popup Menu/PopupMenuSectionHeaderView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class PopupMenuSectionHeaderView: TableViewHeaderFooterView { diff --git a/Sources/FluentUI_iOS/Components/Presenters/CardPresentationController.swift b/Sources/FluentUI_iOS/Components/Presenters/CardPresentationController.swift index 7835f3d66..fcf0d20ba 100644 --- a/Sources/FluentUI_iOS/Components/Presenters/CardPresentationController.swift +++ b/Sources/FluentUI_iOS/Components/Presenters/CardPresentationController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CardPresentationController: UIPresentationController { diff --git a/Sources/FluentUI_iOS/Components/Presenters/CardPresenterNavigationController.swift b/Sources/FluentUI_iOS/Components/Presenters/CardPresenterNavigationController.swift index 993d3a27d..58670ca88 100644 --- a/Sources/FluentUI_iOS/Components/Presenters/CardPresenterNavigationController.swift +++ b/Sources/FluentUI_iOS/Components/Presenters/CardPresenterNavigationController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CardPresenterNavigationController: UINavigationController, CardPresentable { diff --git a/Sources/FluentUI_iOS/Components/Presenters/CardTransitionAnimator.swift b/Sources/FluentUI_iOS/Components/Presenters/CardTransitionAnimator.swift index 92a26d16a..d280ad724 100644 --- a/Sources/FluentUI_iOS/Components/Presenters/CardTransitionAnimator.swift +++ b/Sources/FluentUI_iOS/Components/Presenters/CardTransitionAnimator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class CardTransitionAnimator: NSObject { diff --git a/Sources/FluentUI_iOS/Components/Presenters/PageCardPresenterController.swift b/Sources/FluentUI_iOS/Components/Presenters/PageCardPresenterController.swift index 8d5a804c6..7e9224eb8 100644 --- a/Sources/FluentUI_iOS/Components/Presenters/PageCardPresenterController.swift +++ b/Sources/FluentUI_iOS/Components/Presenters/PageCardPresenterController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - CardPresentable diff --git a/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleTokenSet.swift b/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleTokenSet.swift index 255659e0f..6b0ae398a 100644 --- a/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleTokenSet.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public enum ResizingHandleToken: Int, TokenSetKey { /// Defines the color of the mark of the `ResizingHandle`. diff --git a/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleView.swift b/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleView.swift index d48b7f4d9..068dcc801 100644 --- a/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleView.swift +++ b/Sources/FluentUI_iOS/Components/ResizingHandleView/ResizingHandleView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - ResizingHandleView diff --git a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentItem.swift b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentItem.swift index a953ef647..5a0a96ddc 100644 --- a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentItem.swift +++ b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentItem.swift @@ -2,7 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // -import Foundation + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Used for SegmentedControl array of views diff --git a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentPillButton.swift b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentPillButton.swift index 721e7cdd3..782e2355a 100644 --- a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentPillButton.swift +++ b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentPillButton.swift @@ -2,6 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class SegmentPillButton: UIButton { diff --git a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControl.swift b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControl.swift index 0a0b939c6..587912f7f 100644 --- a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControl.swift +++ b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControl.swift @@ -2,6 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: SegmentedControl diff --git a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControlTokenSet.swift b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControlTokenSet.swift index 3117dc1a6..7b0a8ab23 100644 --- a/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControlTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/SegmentedControl/SegmentedControlTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum SegmentedControlToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Separator/Separator.swift b/Sources/FluentUI_iOS/Components/Separator/Separator.swift index 4ffa37c8c..51d94d11f 100644 --- a/Sources/FluentUI_iOS/Components/Separator/Separator.swift +++ b/Sources/FluentUI_iOS/Components/Separator/Separator.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - SeparatorOrientation diff --git a/Sources/FluentUI_iOS/Components/Separator/SeparatorTokenSet.swift b/Sources/FluentUI_iOS/Components/Separator/SeparatorTokenSet.swift index 8fdf54c0e..a42bf8a53 100644 --- a/Sources/FluentUI_iOS/Components/Separator/SeparatorTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Separator/SeparatorTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum SeparatorToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerLinesView.swift b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerLinesView.swift index 6fbc84593..0bc52d5d1 100644 --- a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerLinesView.swift +++ b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerLinesView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /** diff --git a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerTokenSet.swift b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerTokenSet.swift index 77e3f71f0..7164b349d 100644 --- a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Shimmer style can be either concealing or revealing. diff --git a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerView.swift b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerView.swift index 3163bcbf2..c88e8e6e2 100644 --- a/Sources/FluentUI_iOS/Components/Shimmer/ShimmerView.swift +++ b/Sources/FluentUI_iOS/Components/Shimmer/ShimmerView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// View that converts the subviews of a container view into a loading state with the "shimmering" effect. diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBar.swift b/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBar.swift index 4d3408fcd..27635cf02 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBar.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBar.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Delegate protocol to handle user events inside the side tab bar. diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBarTokenSet.swift b/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBarTokenSet.swift index 6fb31def3..d94ec7fd4 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/SideTabBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum SideTabBarToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItem.swift b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItem.swift index 7c5914a3d..03b3cf206 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItem.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItem.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFTabBarItem) diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemTokenSet.swift b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemTokenSet.swift index a17b19573..c3f8181a1 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Internal design token set for the `TabBarItem`. diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemView.swift b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemView.swift index ae9ce6b95..05fc42316 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemView.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarItemView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class TabBarItemView: UIControl, TokenizedControl { diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarTokenSet.swift b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarTokenSet.swift index 8629a57d5..f1480f695 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum TabBarToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarView.swift b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarView.swift index 6c6e6662c..27dfa9fd9 100644 --- a/Sources/FluentUI_iOS/Components/Tab Bar/TabBarView.swift +++ b/Sources/FluentUI_iOS/Components/Tab Bar/TabBarView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TabBarViewDelegate diff --git a/Sources/FluentUI_iOS/Components/Table View/TableViewCell.swift b/Sources/FluentUI_iOS/Components/Table View/TableViewCell.swift index ff03d47ce..832a4292a 100644 --- a/Sources/FluentUI_iOS/Components/Table View/TableViewCell.swift +++ b/Sources/FluentUI_iOS/Components/Table View/TableViewCell.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // Supported vertical alignment for accessory views in `TableViewCell` diff --git a/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterView.swift b/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterView.swift index 209242a28..e4d29c123 100644 --- a/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterView.swift +++ b/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TableViewHeaderFooterViewDelegate diff --git a/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterViewTokenSet.swift b/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterViewTokenSet.swift index c3ef37d18..7f8cee2d3 100644 --- a/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterViewTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Table View/TableViewHeaderFooterViewTokenSet.swift @@ -2,6 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum TableViewHeaderFooterViewToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/TableViewListShared/TableViewCellTokenSet.swift b/Sources/FluentUI_iOS/Components/TableViewListShared/TableViewCellTokenSet.swift index 87e4bc5b4..3a7556853 100644 --- a/Sources/FluentUI_iOS/Components/TableViewListShared/TableViewCellTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/TableViewListShared/TableViewCellTokenSet.swift @@ -2,6 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum TableViewCellToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/TextField/FluentTextField.swift b/Sources/FluentUI_iOS/Components/TextField/FluentTextField.swift index 580ece3ee..60f712e37 100644 --- a/Sources/FluentUI_iOS/Components/TextField/FluentTextField.swift +++ b/Sources/FluentUI_iOS/Components/TextField/FluentTextField.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFTextField) diff --git a/Sources/FluentUI_iOS/Components/TextField/FluentTextFieldInternal.swift b/Sources/FluentUI_iOS/Components/TextField/FluentTextFieldInternal.swift index d614f5ddc..10fa28639 100644 --- a/Sources/FluentUI_iOS/Components/TextField/FluentTextFieldInternal.swift +++ b/Sources/FluentUI_iOS/Components/TextField/FluentTextFieldInternal.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit /// Internal subclass of UITextField that allows us to adjust the position of the `rightView`. diff --git a/Sources/FluentUI_iOS/Components/TextField/TextFieldTokenSet.swift b/Sources/FluentUI_iOS/Components/TextField/TextFieldTokenSet.swift index 9478b85dc..0539b9a51 100644 --- a/Sources/FluentUI_iOS/Components/TextField/TextFieldTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/TextField/TextFieldTokenSet.swift @@ -3,7 +3,10 @@ // Licensed under the MIT License. // -import CoreFoundation +#if canImport(FluentUI_common) +import FluentUI_common +#endif +import SwiftUI /// The predefined states of the `FluentTextField`. public enum FluentTextFieldState: Int, CaseIterable { diff --git a/Sources/FluentUI_iOS/Components/Tooltip/Tooltip.swift b/Sources/FluentUI_iOS/Components/Tooltip/Tooltip.swift index b8c2d3cad..1d28f9e03 100644 --- a/Sources/FluentUI_iOS/Components/Tooltip/Tooltip.swift +++ b/Sources/FluentUI_iOS/Components/Tooltip/Tooltip.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: Tooltip diff --git a/Sources/FluentUI_iOS/Components/Tooltip/TooltipModifiers.swift b/Sources/FluentUI_iOS/Components/Tooltip/TooltipModifiers.swift index f4cbbc267..3ef2a8f10 100644 --- a/Sources/FluentUI_iOS/Components/Tooltip/TooltipModifiers.swift +++ b/Sources/FluentUI_iOS/Components/Tooltip/TooltipModifiers.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI public extension View { diff --git a/Sources/FluentUI_iOS/Components/Tooltip/TooltipTokenSet.swift b/Sources/FluentUI_iOS/Components/Tooltip/TooltipTokenSet.swift index dc13926b5..dc87e976f 100644 --- a/Sources/FluentUI_iOS/Components/Tooltip/TooltipTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/Tooltip/TooltipTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum TooltipToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Components/Tooltip/TooltipView.swift b/Sources/FluentUI_iOS/Components/Tooltip/TooltipView.swift index ffc601169..a9349b204 100644 --- a/Sources/FluentUI_iOS/Components/Tooltip/TooltipView.swift +++ b/Sources/FluentUI_iOS/Components/Tooltip/TooltipView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TooltipView diff --git a/Sources/FluentUI_iOS/Components/Tooltip/TooltipViewController.swift b/Sources/FluentUI_iOS/Components/Tooltip/TooltipViewController.swift index 4fa4b00f1..58685e07b 100644 --- a/Sources/FluentUI_iOS/Components/Tooltip/TooltipViewController.swift +++ b/Sources/FluentUI_iOS/Components/Tooltip/TooltipViewController.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TooltipViewController diff --git a/Sources/FluentUI_iOS/Components/TouchForwardingView/TouchForwardingView.swift b/Sources/FluentUI_iOS/Components/TouchForwardingView/TouchForwardingView.swift index 3250a2bd2..33a0dab1a 100644 --- a/Sources/FluentUI_iOS/Components/TouchForwardingView/TouchForwardingView.swift +++ b/Sources/FluentUI_iOS/Components/TouchForwardingView/TouchForwardingView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit @objc(MSFTouchForwardingView) diff --git a/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleView.swift b/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleView.swift index 0dc4ff424..d7bec19fa 100644 --- a/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleView.swift +++ b/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: TwoLineTitleViewDelegate diff --git a/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleViewTokenSet.swift b/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleViewTokenSet.swift index 7d3da505d..e16869d0a 100644 --- a/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleViewTokenSet.swift +++ b/Sources/FluentUI_iOS/Components/TwoLineTitleView/TwoLineTitleViewTokenSet.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public enum TwoLineTitleViewToken: Int, TokenSetKey { diff --git a/Sources/FluentUI_iOS/Core/ColorProviding.swift b/Sources/FluentUI_iOS/Core/ColorProviding.swift index 73d5aefba..ab90c93b8 100644 --- a/Sources/FluentUI_iOS/Core/ColorProviding.swift +++ b/Sources/FluentUI_iOS/Core/ColorProviding.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: ColorProviding diff --git a/Sources/FluentUI_iOS/Core/Compatibility.swift b/Sources/FluentUI_iOS/Core/Compatibility.swift index dccb9c7bd..547c678e6 100644 --- a/Sources/FluentUI_iOS/Core/Compatibility.swift +++ b/Sources/FluentUI_iOS/Core/Compatibility.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit struct Compatibility { diff --git a/Sources/FluentUI_iOS/Core/ControlHostingView.swift b/Sources/FluentUI_iOS/Core/ControlHostingView.swift index 22e93c1df..27576b5cc 100644 --- a/Sources/FluentUI_iOS/Core/ControlHostingView.swift +++ b/Sources/FluentUI_iOS/Core/ControlHostingView.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Core/Extensions/NSLayoutConstraint+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/NSLayoutConstraint+Extensions.swift index 3ca37cd1d..4438e9401 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/NSLayoutConstraint+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/NSLayoutConstraint+Extensions.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit extension NSLayoutConstraint { diff --git a/Sources/FluentUI_iOS/Core/Extensions/String+Extension.swift b/Sources/FluentUI_iOS/Core/Extensions/String+Extension.swift index cbb795b9a..8ac14beab 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/String+Extension.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/String+Extension.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit extension String { diff --git a/Sources/FluentUI_iOS/Core/Extensions/SwiftUI+ViewModifiers.swift b/Sources/FluentUI_iOS/Core/Extensions/SwiftUI+ViewModifiers.swift index 5093a8ea4..727caef0c 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/SwiftUI+ViewModifiers.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/SwiftUI+ViewModifiers.swift @@ -3,7 +3,11 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit extension View { /// Applies modifiers defined in a closure if a condition is met. diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIApplication+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/UIApplication+Extensions.swift index d1fb788e9..117a1423f 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIApplication+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/UIApplication+Extensions.swift @@ -2,6 +2,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + import SwiftUI extension UIApplication { diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIFont+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/UIFont+Extensions.swift index 36c5d45f7..5de3084ea 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIFont+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/UIFont+Extensions.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIImage+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/UIImage+Extensions.swift index 44f0e0546..96d310c0a 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIImage+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/UIImage+Extensions.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit extension UIImage { diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIScrollView+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/UIScrollView+Extensions.swift index 7d4824813..785f725f5 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIScrollView+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/UIScrollView+Extensions.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit extension UIScrollView { diff --git a/Sources/FluentUI_iOS/Core/Extensions/UIView+Extensions.swift b/Sources/FluentUI_iOS/Core/Extensions/UIView+Extensions.swift index ca7fd77cb..218afe11b 100644 --- a/Sources/FluentUI_iOS/Core/Extensions/UIView+Extensions.swift +++ b/Sources/FluentUI_iOS/Core/Extensions/UIView+Extensions.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit extension UIView { diff --git a/Sources/FluentUI_iOS/Core/FluentThemedHostingController.swift b/Sources/FluentUI_iOS/Core/FluentThemedHostingController.swift index 230be7cff..160e5f694 100644 --- a/Sources/FluentUI_iOS/Core/FluentThemedHostingController.swift +++ b/Sources/FluentUI_iOS/Core/FluentThemedHostingController.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// FluentUI specific implementation of the UIHostingController. This is primarily useful for adding `FluentTheme` observation /// to any wrapped Fluent controls. diff --git a/Sources/FluentUI_iOS/Core/FluentUIFramework.swift b/Sources/FluentUI_iOS/Core/FluentUIFramework.swift index 460e0c62f..cb808d54e 100644 --- a/Sources/FluentUI_iOS/Core/FluentUIFramework.swift +++ b/Sources/FluentUI_iOS/Core/FluentUIFramework.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit // MARK: - FluentUIFramework diff --git a/Sources/FluentUI_iOS/Core/FocusRingView.swift b/Sources/FluentUI_iOS/Core/FocusRingView.swift index 3f57c7d04..4c98c77fa 100644 --- a/Sources/FluentUI_iOS/Core/FocusRingView.swift +++ b/Sources/FluentUI_iOS/Core/FocusRingView.swift @@ -2,6 +2,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // + +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit class FocusRingView: UIView { diff --git a/Sources/FluentUI_iOS/Core/Theme/FluentTheme+UIKit.swift b/Sources/FluentUI_iOS/Core/Theme/FluentTheme+UIKit.swift index dd7080352..33ec79913 100644 --- a/Sources/FluentUI_iOS/Core/Theme/FluentTheme+UIKit.swift +++ b/Sources/FluentUI_iOS/Core/Theme/FluentTheme+UIKit.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit public extension FluentTheme { @@ -52,7 +55,7 @@ public extension FluentTheme { /// - Returns: A `UIColor` for the given token. @objc(colorForToken:) func color(_ token: ColorToken) -> UIColor { - return UIColor(dynamicColor: colorTokenSet[token]) + return UIColor(swiftUIColor(token)) } /// Returns the font value for the given token. diff --git a/Sources/FluentUI_iOS/Core/Theme/FluentTheme+visionOS.swift b/Sources/FluentUI_iOS/Core/Theme/FluentTheme+visionOS.swift index a853049e2..7865aff15 100644 --- a/Sources/FluentUI_iOS/Core/Theme/FluentTheme+visionOS.swift +++ b/Sources/FluentUI_iOS/Core/Theme/FluentTheme+visionOS.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI #if os(visionOS) diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens+UIKit.swift b/Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens+UIKit.swift index 7e33f7252..601971306 100644 --- a/Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens+UIKit.swift +++ b/Sources/FluentUI_iOS/Core/Theme/Tokens/GlobalTokens+UIKit.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import UIKit public extension GlobalTokens { diff --git a/Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo+UIKit.swift b/Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo+UIKit.swift index a4edaf211..5f044408c 100644 --- a/Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo+UIKit.swift +++ b/Sources/FluentUI_iOS/Core/Theme/Tokens/ShadowInfo+UIKit.swift @@ -3,6 +3,9 @@ // Licensed under the MIT License. // +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI import UIKit diff --git a/Sources/FluentUI_iOS/Core/UIKit+SwiftUI_interoperability.swift b/Sources/FluentUI_iOS/Core/UIKit+SwiftUI_interoperability.swift index 9580e22ad..f3ad2554a 100644 --- a/Sources/FluentUI_iOS/Core/UIKit+SwiftUI_interoperability.swift +++ b/Sources/FluentUI_iOS/Core/UIKit+SwiftUI_interoperability.swift @@ -3,8 +3,11 @@ // Licensed under the MIT License. // -import UIKit +#if canImport(FluentUI_common) +import FluentUI_common +#endif import SwiftUI +import UIKit /// This is a generic UIView wrapper that allows SwiftUI to use UIKit views in its hierarchy. struct UIViewAdapter: UIViewRepresentable { diff --git a/Sources/FluentUI_iOS/FluentUI_iOS.swift b/Sources/FluentUI_iOS/FluentUI_iOS.swift new file mode 100644 index 000000000..61b5eb5f3 --- /dev/null +++ b/Sources/FluentUI_iOS/FluentUI_iOS.swift @@ -0,0 +1,8 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// + +#if canImport(FluentUI_common) +@_exported import FluentUI_common +#endif diff --git a/Sources/FluentUI_macOS/Components/Appearance/Apperance+Theme.swift b/Sources/FluentUI_macOS/Core/Extensions/Apperance+Theme.swift similarity index 100% rename from Sources/FluentUI_macOS/Components/Appearance/Apperance+Theme.swift rename to Sources/FluentUI_macOS/Core/Extensions/Apperance+Theme.swift diff --git a/Sources/FluentUI_macOS/Components/DynamicColor/DynamicColor.swift b/Sources/FluentUI_macOS/Core/LegacyDynamicColor.swift similarity index 100% rename from Sources/FluentUI_macOS/Components/DynamicColor/DynamicColor.swift rename to Sources/FluentUI_macOS/Core/LegacyDynamicColor.swift diff --git a/Sources/FluentUI_macOS/FluentUI_macOS.swift b/Sources/FluentUI_macOS/FluentUI_macOS.swift new file mode 100644 index 000000000..61b5eb5f3 --- /dev/null +++ b/Sources/FluentUI_macOS/FluentUI_macOS.swift @@ -0,0 +1,8 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// + +#if canImport(FluentUI_common) +@_exported import FluentUI_common +#endif diff --git a/Tests/FluentUI_iOS_Tests/ColorTests.swift b/Tests/FluentUI_iOS_Tests/ColorTests.swift index 6425a4f83..f49587897 100644 --- a/Tests/FluentUI_iOS_Tests/ColorTests.swift +++ b/Tests/FluentUI_iOS_Tests/ColorTests.swift @@ -5,6 +5,9 @@ import XCTest import SwiftUI +#if canImport(FluentUI_common) +@testable import FluentUI_common +#endif @testable import FluentUI_ios class ColorTests: XCTestCase { diff --git a/Tests/FluentUI_iOS_Tests/FontTests.swift b/Tests/FluentUI_iOS_Tests/FontTests.swift index 68837fc75..d03dcbd44 100644 --- a/Tests/FluentUI_iOS_Tests/FontTests.swift +++ b/Tests/FluentUI_iOS_Tests/FontTests.swift @@ -5,6 +5,9 @@ import XCTest import SwiftUI +#if canImport(FluentUI_common) +@testable import FluentUI_common +#endif @testable import FluentUI_ios class FontTests: XCTestCase {