Skip to content

Commit 6e78444

Browse files
authored
[macOS] Alias token improvments on macOS (#2165)
* Alias token improvments on macOS * Rename `SwiftUI+ViewModifiers` in FluentUI_common * Fix type casting in static func * Whitespace
1 parent 1df2e45 commit 6e78444

11 files changed

Lines changed: 861 additions & 272 deletions

File tree

Demos/FluentUIDemo/FluentUIDemo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,11 @@
316316
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.FluentUIDemo;
317317
PRODUCT_NAME = "$(TARGET_NAME)";
318318
SDKROOT = auto;
319-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
319+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
320320
SUPPORTS_MACCATALYST = NO;
321321
SWIFT_EMIT_LOC_STRINGS = YES;
322322
SWIFT_VERSION = 5.0;
323-
TARGETED_DEVICE_FAMILY = "1,2";
323+
TARGETED_DEVICE_FAMILY = "1,2,7";
324324
};
325325
name = Debug;
326326
};
@@ -353,11 +353,11 @@
353353
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.FluentUIDemo;
354354
PRODUCT_NAME = "$(TARGET_NAME)";
355355
SDKROOT = auto;
356-
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
356+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
357357
SUPPORTS_MACCATALYST = NO;
358358
SWIFT_EMIT_LOC_STRINGS = YES;
359359
SWIFT_VERSION = 5.0;
360-
TARGETED_DEVICE_FAMILY = "1,2";
360+
TARGETED_DEVICE_FAMILY = "1,2,7";
361361
};
362362
name = Release;
363363
};

Demos/FluentUIDemo/Sources/Demo.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ import SwiftUI
77

88
/// An iterable enumeration of all available demos.
99
enum Demo: CaseIterable, Hashable {
10+
// Components
1011
case button
1112
case shimmer
1213

14+
// Tokens
15+
case aliasColorTokens
16+
1317
var title: String {
1418
switch self {
1519
case .button:
1620
return "Button"
1721
case .shimmer:
1822
return "Shimmer"
23+
case .aliasColorTokens:
24+
return "Alias Color Tokens"
1925
}
2026
}
2127

@@ -26,13 +32,16 @@ enum Demo: CaseIterable, Hashable {
2632
return ButtonDemoView()
2733
case .shimmer:
2834
return ShimmerDemoView()
35+
case .aliasColorTokens:
36+
return AliasColorTokensDemoView()
2937
}
3038
}
3139

3240
/// Only some demos are supported on visionOS.
3341
var supportsVisionOS: Bool {
3442
switch self {
35-
case .button:
43+
case .button,
44+
.aliasColorTokens:
3645
return true
3746
case .shimmer:
3847
return false
@@ -86,6 +95,7 @@ private struct Demos {
8695
]
8796

8897
static let fluent2DesignTokens: [Demo] = [
98+
.aliasColorTokens
8999
]
90100

91101
static let controls: [Demo] = [

0 commit comments

Comments
 (0)