From bf15804e00e3369083e8213a331753952b706204 Mon Sep 17 00:00:00 2001 From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Date: Fri, 31 Jan 2025 17:15:55 -0800 Subject: [PATCH] [0.74] Fix PlatformColor (#14329) * [Fabric] Fix PlatformColor (#14325) * Fix platform color * Change files * Add missing theme colors * snapshots * TurboModule spec checking should accept hstring for string arguments (#14322) * TurboModule spec checking should accept hstring for string arguments * Change files * example * change files --- ...-6d9f3161-2868-4c4d-a3a1-a49b9eee3d5b.json | 7 + ...-9a0e5c82-b824-4c1d-92c9-87c8c46c6c26.json | 7 + .../ButtonComponentTest.test.ts.snap | 252 ++++++++++-------- .../Microsoft.ReactNative.Cxx/NativeModules.h | 20 ++ .../Fabric/Composition/Theme.cpp | 5 + .../renderer/graphics/PlatformColorParser.h | 2 +- .../Modules/ClipboardModule.cpp | 2 +- .../Modules/ClipboardModule.h | 2 +- 8 files changed, 182 insertions(+), 115 deletions(-) create mode 100644 change/react-native-windows-6d9f3161-2868-4c4d-a3a1-a49b9eee3d5b.json create mode 100644 change/react-native-windows-9a0e5c82-b824-4c1d-92c9-87c8c46c6c26.json diff --git a/change/react-native-windows-6d9f3161-2868-4c4d-a3a1-a49b9eee3d5b.json b/change/react-native-windows-6d9f3161-2868-4c4d-a3a1-a49b9eee3d5b.json new file mode 100644 index 00000000000..49e8a7d200e --- /dev/null +++ b/change/react-native-windows-6d9f3161-2868-4c4d-a3a1-a49b9eee3d5b.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "TurboModule spec checking should accept hstring for string arguments", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-9a0e5c82-b824-4c1d-92c9-87c8c46c6c26.json b/change/react-native-windows-9a0e5c82-b824-4c1d-92c9-87c8c46c6c26.json new file mode 100644 index 00000000000..8b2a0d45035 --- /dev/null +++ b/change/react-native-windows-9a0e5c82-b824-4c1d-92c9-87c8c46c6c26.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Fix platform color", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/e2e-test-app-fabric/test/__snapshots__/ButtonComponentTest.test.ts.snap b/packages/e2e-test-app-fabric/test/__snapshots__/ButtonComponentTest.test.ts.snap index 90f09136b64..88c0c104b4c 100644 --- a/packages/e2e-test-app-fabric/test/__snapshots__/ButtonComponentTest.test.ts.snap +++ b/packages/e2e-test-app-fabric/test/__snapshots__/ButtonComponentTest.test.ts.snap @@ -48,6 +48,10 @@ exports[`Button Tests Buttons can be disabled 1`] = ` "Visual Type": "SpriteVisual", "__Children": [ { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(249, 249, 249, 77)", + }, "Offset": "0, 0, 0", "Size": "916, 37", "Visual Type": "SpriteVisual", @@ -55,7 +59,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -64,7 +68,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -73,7 +77,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -82,7 +86,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -91,7 +95,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -100,7 +104,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -109,7 +113,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -118,7 +122,7 @@ exports[`Button Tests Buttons can be disabled 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -202,7 +206,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -211,7 +215,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -220,7 +224,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -229,7 +233,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -238,7 +242,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -247,7 +251,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -256,7 +260,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -265,7 +269,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -324,6 +328,10 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` ], }, "Visual Tree": { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(255, 255, 255, 179)", + }, "Comment": "accessibility_props", "Offset": "0, 0, 0", "Size": "916, 37", @@ -332,7 +340,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -341,7 +349,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -350,7 +358,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -359,7 +367,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -368,7 +376,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -377,7 +385,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -386,7 +394,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -395,7 +403,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -466,6 +474,10 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` "Visual Type": "SpriteVisual", "__Children": [ { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(249, 249, 249, 77)", + }, "Offset": "0, 0, 0", "Size": "916, 37", "Visual Type": "SpriteVisual", @@ -473,7 +485,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -482,7 +494,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -491,7 +503,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -500,7 +512,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -509,7 +521,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -518,7 +530,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -527,7 +539,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -536,7 +548,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 15)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -620,7 +632,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -629,7 +641,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -638,7 +650,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -647,7 +659,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -656,7 +668,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -665,7 +677,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -674,7 +686,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -683,7 +695,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -727,6 +739,10 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] ], }, "Visual Tree": { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(255, 255, 255, 179)", + }, "Comment": "accessible_false_button", "Offset": "0, 0, 0", "Size": "916, 37", @@ -735,7 +751,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -744,7 +760,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -753,7 +769,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -762,7 +778,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -771,7 +787,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -780,7 +796,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -789,7 +805,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -798,7 +814,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -852,6 +868,10 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] ], }, "Visual Tree": { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(255, 255, 255, 179)", + }, "Comment": "focusable_false_button", "Offset": "0, 0, 0", "Size": "916, 37", @@ -860,7 +880,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -869,7 +889,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -878,7 +898,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -887,7 +907,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -896,7 +916,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -905,7 +925,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -914,7 +934,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -923,7 +943,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -963,6 +983,10 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] ], }, "Visual Tree": { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(255, 255, 255, 179)", + }, "Comment": "accessible_focusable_false_button", "Offset": "0, 0, 0", "Size": "916, 37", @@ -971,7 +995,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -980,7 +1004,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -989,7 +1013,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -998,7 +1022,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1007,7 +1031,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1016,7 +1040,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -1025,7 +1049,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1034,7 +1058,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`] { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1172,7 +1196,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1181,7 +1205,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "51, 1", @@ -1190,7 +1214,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1199,7 +1223,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1208,7 +1232,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1217,7 +1241,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "51, 2", @@ -1226,7 +1250,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1235,7 +1259,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1289,7 +1313,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1298,7 +1322,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "54, 1", @@ -1307,7 +1331,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1316,7 +1340,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1325,7 +1349,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1334,7 +1358,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "54, 2", @@ -1343,7 +1367,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1352,7 +1376,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1530,7 +1554,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1539,7 +1563,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "51, 1", @@ -1548,7 +1572,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1557,7 +1581,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1566,7 +1590,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1575,7 +1599,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "51, 2", @@ -1584,7 +1608,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1593,7 +1617,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1647,7 +1671,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1656,7 +1680,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "97, 1", @@ -1665,7 +1689,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1674,7 +1698,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1683,7 +1707,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1692,7 +1716,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "97, 2", @@ -1701,7 +1725,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1710,7 +1734,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1764,7 +1788,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1773,7 +1797,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "54, 1", @@ -1782,7 +1806,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1791,7 +1815,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1800,7 +1824,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1809,7 +1833,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "54, 2", @@ -1818,7 +1842,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1827,7 +1851,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] = { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", @@ -1889,6 +1913,10 @@ exports[`Button Tests Buttons have default styling 1`] = ` ], }, "Visual Tree": { + "Brush": { + "Brush Type": "ColorBrush", + "Color": "rgba(255, 255, 255, 179)", + }, "Comment": "button_default_styling", "Offset": "0, 0, 0", "Size": "916, 37", @@ -1897,7 +1925,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 0, 0", "Size": "4, 4", @@ -1906,7 +1934,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, 0, 0", "Size": "908, 1", @@ -1915,7 +1943,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, 0, 0", "Size": "4, 4", @@ -1924,7 +1952,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-1, 4, 0", "Size": "1, 28", @@ -1933,7 +1961,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "-4, -5, 0", "Size": "4, 5", @@ -1942,7 +1970,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "4, -2, 0", "Size": "908, 2", @@ -1951,7 +1979,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, -5, 0", "Size": "4, 5", @@ -1960,7 +1988,7 @@ exports[`Button Tests Buttons have default styling 1`] = ` { "Brush": { "Brush Type": "ColorBrush", - "Color": "rgba(0, 0, 0, 255)", + "Color": "rgba(0, 0, 0, 41)", }, "Offset": "0, 4, 0", "Size": "1, 28", diff --git a/vnext/Microsoft.ReactNative.Cxx/NativeModules.h b/vnext/Microsoft.ReactNative.Cxx/NativeModules.h index cff77c5c1d2..41fb06bd8b7 100644 --- a/vnext/Microsoft.ReactNative.Cxx/NativeModules.h +++ b/vnext/Microsoft.ReactNative.Cxx/NativeModules.h @@ -371,6 +371,26 @@ constexpr bool MatchInputArg() noexcept { return true; } +template <> +constexpr bool MatchInputArg() noexcept { + return true; +} + +template <> +constexpr bool MatchInputArg() noexcept { + return true; +} + +template <> +constexpr bool MatchInputArg() noexcept { + return true; +} + +template <> +constexpr bool MatchInputArg() noexcept { + return true; +} + template struct MethodSignature { using Result = TResult; diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/Theme.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/Theme.cpp index 2c4a3e72ad3..5b69be1c63c 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/Theme.cpp @@ -241,15 +241,20 @@ bool Theme::TryGetPlatformColor(const std::string &platformColor, winrt::Windows {"ButtonForegroundPressed", "TextFillColorSecondary"}, {"ButtonForegroundPointerOver", "TextFillColorPrimary"}, {"ButtonBackground", "ControlFillColorDefault"}, + {"ButtonBorderBrush", "ButtonBorder"}, {"ButtonBorder", "ControlElevationBorder"}, {"ControlElevationBorder", "ControlStrokeColorSecondary"}, // TODO ControlElevationBorderBrush is actually gradient brush {"ButtonForeground", "TextFillColorPrimary"}, + {"SolidBackgroundFillColorBaseBrush", "SolidBackgroundFillColorBase"}, {"ButtonBackgroundDisabled", "ControlFillColorDisabled"}, + {"ButtonBorderBrushDisabled", "ButtonBorderDisabled"}, {"ButtonBorderDisabled", "ControlStrokeColorDefault"}, {"ButtonForegroundDisabled", "TextFillColorDisabled"}, {"ButtonBackgroundPointerOver", "ControlFillColorSecondary"}, + {"ButtonBorderBrushPointerOver", "ButtonBorderPointerOver"}, {"ButtonBorderPointerOver", "ControlElevationBorder"}, + {"ButtonBorderBrushPressed", "ButtonBorderPressed"}, {"ButtonBorderPressed", "ControlFillColorTransparent"}, {"ToggleSwitchFillOff", "ControlAltFillColorSecondary"}, {"ToggleSwitchFillOffPointerOver", "ControlAltFillColorTertiary"}, diff --git a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h index 9c471d66c11..627fc35e599 100644 --- a/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +++ b/vnext/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h @@ -15,7 +15,7 @@ namespace facebook::react { inline SharedColor parsePlatformColor(const ContextContainer &contextContainer, int32_t surfaceId, const RawValue &value) { - if (value.hasType>()) { + if (value.hasType>>()) { auto map = (std::unordered_map>)value; if (map.find("windowsbrush") != map.end()) { facebook::react::Color color = { diff --git a/vnext/Microsoft.ReactNative/Modules/ClipboardModule.cpp b/vnext/Microsoft.ReactNative/Modules/ClipboardModule.cpp index e639b93d0c4..5b155aa3364 100644 --- a/vnext/Microsoft.ReactNative/Modules/ClipboardModule.cpp +++ b/vnext/Microsoft.ReactNative/Modules/ClipboardModule.cpp @@ -48,7 +48,7 @@ void Clipboard::getString(React::ReactPromise result) noexcept { ); } -void Clipboard::setString(std::wstring content) noexcept { +void Clipboard::setString(winrt::hstring content) noexcept { m_reactContext.UIDispatcher().Post([=] { DataTransfer::DataPackage data; data.SetText(content); diff --git a/vnext/Microsoft.ReactNative/Modules/ClipboardModule.h b/vnext/Microsoft.ReactNative/Modules/ClipboardModule.h index 92e26ae21f2..ca842ff625d 100644 --- a/vnext/Microsoft.ReactNative/Modules/ClipboardModule.h +++ b/vnext/Microsoft.ReactNative/Modules/ClipboardModule.h @@ -18,7 +18,7 @@ struct Clipboard { void getString(winrt::Microsoft::ReactNative::ReactPromise result) noexcept; REACT_METHOD(setString) - void setString(std::wstring content) noexcept; + void setString(winrt::hstring content) noexcept; winrt::Microsoft::ReactNative::ReactContext m_reactContext; };