@expo/ui 57.0.20 → 57.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +1 -0
- package/android/src/main/java/expo/modules/ui/HostView.kt +7 -1
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +34 -5
- package/android/src/main/java/expo/modules/ui/SemanticsModifier.kt +2 -1
- package/build/community/datetime-picker/DateTimePicker.android.d.ts.map +1 -1
- package/build/community/datetime-picker/utils.d.ts +11 -0
- package/build/community/datetime-picker/utils.d.ts.map +1 -0
- package/build/community/picker/Picker.android.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +33 -6
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/ArrangementView/index.d.ts +49 -0
- package/build/swift-ui/ArrangementView/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +1 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/animation/index.d.ts +6 -1
- package/build/swift-ui/modifiers/animation/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/animation/types.d.ts +15 -1
- package/build/swift-ui/modifiers/animation/types.d.ts.map +1 -1
- package/build/swift-ui/modifiers/arrangementModifiers.d.ts +110 -0
- package/build/swift-ui/modifiers/arrangementModifiers.d.ts.map +1 -0
- package/build/swift-ui/modifiers/containerBackground.d.ts +2 -2
- package/build/swift-ui/modifiers/index.d.ts +40 -2
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +8 -0
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/universal/State.android.d.ts +1 -3
- package/build/universal/State.android.d.ts.map +1 -1
- package/build/universal/State.d.ts +2 -3
- package/build/universal/State.d.ts.map +1 -1
- package/build/universal/State.ios.d.ts +1 -3
- package/build/universal/State.ios.d.ts.map +1 -1
- package/build/universal/Switch/index.android.d.ts.map +1 -1
- package/build/universal/transformStyle.ios.d.ts.map +1 -1
- package/build/universal/types.d.ts +24 -0
- package/build/universal/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/ArrangementViewView.swift +40 -0
- package/ios/ExpoUIModule.swift +1 -1
- package/ios/Modifiers/AnimationConfig.swift +20 -0
- package/ios/Modifiers/ArrangementModifiers.swift +157 -0
- package/ios/Modifiers/ContainerBackgroundModifier.swift +26 -13
- package/ios/Modifiers/PreferredColorSchemeModifier.swift +12 -0
- package/ios/Modifiers/PresentationModifiers.swift +10 -0
- package/ios/Modifiers/View+ModifierArray.swift +3 -3
- package/ios/Modifiers/ViewModifierRegistry.swift +120 -9
- package/ios/Modifiers/WidgetKitModifiers.swift +13 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.20/expo.modules.ui-57.0.20-sources.jar → 57.0.22/expo.modules.ui-57.0.22-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.20/expo.modules.ui-57.0.20.module → 57.0.22/expo.modules.ui-57.0.22.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.20/expo.modules.ui-57.0.20.pom → 57.0.22/expo.modules.ui-57.0.22.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +4 -4
- package/src/community/datetime-picker/DateTimePicker.android.tsx +14 -4
- package/src/community/datetime-picker/utils.ts +21 -0
- package/src/community/picker/Picker.android.tsx +5 -0
- package/src/jetpack-compose/modifiers/index.ts +33 -4
- package/src/swift-ui/ArrangementView/index.tsx +70 -0
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/modifiers/animation/index.ts +24 -11
- package/src/swift-ui/modifiers/animation/types.ts +18 -0
- package/src/swift-ui/modifiers/arrangementModifiers.ts +142 -0
- package/src/swift-ui/modifiers/containerBackground.ts +2 -2
- package/src/swift-ui/modifiers/index.ts +51 -1
- package/src/swift-ui/modifiers/presentationModifiers.ts +10 -0
- package/src/universal/State.android.ts +1 -1
- package/src/universal/State.ios.ts +1 -1
- package/src/universal/State.ts +12 -4
- package/src/universal/Switch/index.android.tsx +11 -2
- package/src/universal/transformStyle.ios.ts +5 -2
- package/src/universal/types.ts +27 -0
- package/ios/AccessoryWidgetBackgroundView.swift +0 -27
- package/ios/Modifiers/WidgetModifiers.swift +0 -70
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.20/expo.modules.ui-57.0.20.pom.sha512 +0 -1
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import ExpoModulesCore
|
|
4
4
|
import SwiftUI
|
|
5
|
-
#if !os(tvOS)
|
|
6
|
-
import WidgetKit
|
|
7
|
-
#endif
|
|
8
5
|
|
|
9
6
|
internal enum ContainerBackgroundPlacementOptions: String, Enumerable {
|
|
10
7
|
case widget
|
|
11
8
|
case navigation
|
|
12
9
|
case navigationSplitView
|
|
13
10
|
|
|
14
|
-
#if !os(tvOS)
|
|
11
|
+
#if !os(tvOS) && !os(macOS)
|
|
12
|
+
// `widget` is declared in WidgetKit, so expo-widgets applies it through `ViewModifierRegistry.widgetKit`.
|
|
15
13
|
@available(iOS 18.0, *)
|
|
16
|
-
var toContainerBackgroundPlacement: ContainerBackgroundPlacement {
|
|
14
|
+
var toContainerBackgroundPlacement: ContainerBackgroundPlacement? {
|
|
17
15
|
switch self {
|
|
18
|
-
case .widget: return
|
|
16
|
+
case .widget: return nil
|
|
19
17
|
case .navigation: return .navigation
|
|
20
18
|
case .navigationSplitView: return .navigationSplitView
|
|
21
19
|
}
|
|
@@ -28,20 +26,35 @@ internal struct ContainerBackgroundModifier: ViewModifier, Record {
|
|
|
28
26
|
@Field var container: ContainerBackgroundPlacementOptions?
|
|
29
27
|
|
|
30
28
|
func body(content: Content) -> some View {
|
|
31
|
-
#if
|
|
29
|
+
#if os(tvOS) || os(macOS)
|
|
30
|
+
content
|
|
31
|
+
#else
|
|
32
32
|
if let shapeStyle = style?.toAnyShapeStyle(), let container {
|
|
33
|
-
if
|
|
34
|
-
|
|
35
|
-
} else if #available(iOS
|
|
36
|
-
content.containerBackground(shapeStyle, for:
|
|
33
|
+
if container == .widget, let widgetKit = ViewModifierRegistry.widgetKit {
|
|
34
|
+
widgetKit.containerBackground(AnyView(content), style: shapeStyle)
|
|
35
|
+
} else if #available(iOS 18.0, *), let placement = container.toContainerBackgroundPlacement {
|
|
36
|
+
content.containerBackground(shapeStyle, for: placement)
|
|
37
|
+
} else if let widgetKit = ViewModifierRegistry.widgetKit {
|
|
38
|
+
// On iOS 17, the other placements fall back to `widget`.
|
|
39
|
+
widgetKit.containerBackground(AnyView(content), style: shapeStyle)
|
|
37
40
|
} else {
|
|
38
41
|
content
|
|
39
42
|
}
|
|
40
43
|
} else {
|
|
41
44
|
content
|
|
42
45
|
}
|
|
43
|
-
#else
|
|
44
|
-
content
|
|
45
46
|
#endif
|
|
46
47
|
}
|
|
48
|
+
|
|
49
|
+
#if DEBUG
|
|
50
|
+
private static var didWarnAboutWidgetPlacement = false
|
|
51
|
+
|
|
52
|
+
func warnIfWidgetPlacementIsUnavailable() {
|
|
53
|
+
guard container == .widget, ViewModifierRegistry.widgetKit == nil, !Self.didWarnAboutWidgetPlacement else {
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
Self.didWarnAboutWidgetPlacement = true
|
|
57
|
+
log.warn("containerBackground with the 'widget' placement has no effect here, because it only applies inside widgets rendered by expo-widgets. Use the 'navigation' or 'navigationSplitView' placement in app screens.")
|
|
58
|
+
}
|
|
59
|
+
#endif
|
|
47
60
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
internal struct PreferredColorSchemeModifier: ViewModifier, Record {
|
|
7
|
+
@Field var colorScheme: ColorSchemeType?
|
|
8
|
+
|
|
9
|
+
func body(content: Content) -> some View {
|
|
10
|
+
content.preferredColorScheme(colorScheme?.toNativeColorScheme())
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -160,6 +160,16 @@ internal struct PresentationDragIndicatorModifier: ViewModifier, Record {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
// MARK: - Presentation Corner Radius
|
|
164
|
+
|
|
165
|
+
internal struct PresentationCornerRadiusModifier: ViewModifier, Record {
|
|
166
|
+
@Field var cornerRadius: Double?
|
|
167
|
+
|
|
168
|
+
func body(content: Content) -> some View {
|
|
169
|
+
content.presentationCornerRadius(cornerRadius.map { CGFloat($0) })
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
163
173
|
// MARK: - Presentation Background Interaction
|
|
164
174
|
|
|
165
175
|
internal enum PresentationBackgroundInteractionTypeModifier: String, Enumerable {
|
|
@@ -67,10 +67,10 @@ internal extension Image {
|
|
|
67
67
|
)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
if
|
|
70
|
+
if let widgetKit = ViewModifierRegistry.widgetKit,
|
|
71
71
|
let modifierConfig = modifiers.first(where: { $0["$type"] as? String == "widgetAccentedRenderingMode" }),
|
|
72
|
-
let
|
|
73
|
-
|
|
72
|
+
let view = widgetKit.widgetAccentedRenderingMode(image, params: modifierConfig, appContext: appContext) {
|
|
73
|
+
view
|
|
74
74
|
} else {
|
|
75
75
|
image
|
|
76
76
|
}
|
|
@@ -1529,6 +1529,8 @@ public class ViewModifierRegistry {
|
|
|
1529
1529
|
public typealias ModifierFactory = ([String: Any], AppContext, EventDispatcher) throws -> any ViewModifier
|
|
1530
1530
|
private(set) internal var modifierFactories: [String: ModifierFactory] = [:]
|
|
1531
1531
|
|
|
1532
|
+
public static var widgetKit: WidgetKitModifiers?
|
|
1533
|
+
|
|
1532
1534
|
private init() {
|
|
1533
1535
|
registerBuiltInModifiers()
|
|
1534
1536
|
}
|
|
@@ -1813,6 +1815,83 @@ internal struct NavigationTitleModifier: ViewModifier, Record {
|
|
|
1813
1815
|
}
|
|
1814
1816
|
}
|
|
1815
1817
|
|
|
1818
|
+
internal enum NavigationBarTitleDisplayMode: String, Enumerable {
|
|
1819
|
+
case automatic
|
|
1820
|
+
case inline
|
|
1821
|
+
case large
|
|
1822
|
+
|
|
1823
|
+
#if os(iOS)
|
|
1824
|
+
var value: NavigationBarItem.TitleDisplayMode {
|
|
1825
|
+
switch self {
|
|
1826
|
+
case .automatic:
|
|
1827
|
+
return .automatic
|
|
1828
|
+
case .inline:
|
|
1829
|
+
return .inline
|
|
1830
|
+
case .large:
|
|
1831
|
+
return .large
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
#endif
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
internal struct NavigationBarTitleDisplayModeModifier: ViewModifier, Record {
|
|
1838
|
+
@Field var displayMode: NavigationBarTitleDisplayMode = .automatic
|
|
1839
|
+
|
|
1840
|
+
func body(content: Content) -> some View {
|
|
1841
|
+
#if os(iOS)
|
|
1842
|
+
content.navigationBarTitleDisplayMode(displayMode.value)
|
|
1843
|
+
#else
|
|
1844
|
+
content
|
|
1845
|
+
#endif
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
internal enum ToolbarTitleDisplayModeType: String, Enumerable {
|
|
1850
|
+
case automatic
|
|
1851
|
+
case inline
|
|
1852
|
+
case inlineLarge
|
|
1853
|
+
case large
|
|
1854
|
+
|
|
1855
|
+
@available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
|
|
1856
|
+
var value: SwiftUI.ToolbarTitleDisplayMode? {
|
|
1857
|
+
switch self {
|
|
1858
|
+
case .automatic:
|
|
1859
|
+
return .automatic
|
|
1860
|
+
case .inline:
|
|
1861
|
+
return .inline
|
|
1862
|
+
case .inlineLarge:
|
|
1863
|
+
#if os(tvOS)
|
|
1864
|
+
return nil
|
|
1865
|
+
#else
|
|
1866
|
+
return .inlineLarge
|
|
1867
|
+
#endif
|
|
1868
|
+
case .large:
|
|
1869
|
+
#if os(iOS)
|
|
1870
|
+
return .large
|
|
1871
|
+
#else
|
|
1872
|
+
return nil
|
|
1873
|
+
#endif
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
internal struct ToolbarTitleDisplayModeModifier: ViewModifier, Record {
|
|
1879
|
+
@Field var mode: ToolbarTitleDisplayModeType = .automatic
|
|
1880
|
+
|
|
1881
|
+
@ViewBuilder
|
|
1882
|
+
func body(content: Content) -> some View {
|
|
1883
|
+
if #available(iOS 17.0, tvOS 17.0, macOS 14.0, *) {
|
|
1884
|
+
if let value = mode.value {
|
|
1885
|
+
content.toolbarTitleDisplayMode(value)
|
|
1886
|
+
} else {
|
|
1887
|
+
content
|
|
1888
|
+
}
|
|
1889
|
+
} else {
|
|
1890
|
+
content
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1816
1895
|
// MARK: - Built-in Modifier Registration
|
|
1817
1896
|
|
|
1818
1897
|
// swiftlint:disable:next no_grouping_extension
|
|
@@ -1989,6 +2068,14 @@ extension ViewModifierRegistry {
|
|
|
1989
2068
|
return try NavigationTitleModifier(from: params, appContext: appContext)
|
|
1990
2069
|
}
|
|
1991
2070
|
|
|
2071
|
+
register("navigationBarTitleDisplayMode") { params, appContext, _ in
|
|
2072
|
+
return try NavigationBarTitleDisplayModeModifier(from: params, appContext: appContext)
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
register("toolbarTitleDisplayMode") { params, appContext, _ in
|
|
2076
|
+
return try ToolbarTitleDisplayModeModifier(from: params, appContext: appContext)
|
|
2077
|
+
}
|
|
2078
|
+
|
|
1992
2079
|
register("navigationSplitViewStyle") { params, appContext, _ in
|
|
1993
2080
|
return try NavigationSplitViewStyleModifier(from: params, appContext: appContext)
|
|
1994
2081
|
}
|
|
@@ -1997,6 +2084,26 @@ extension ViewModifierRegistry {
|
|
|
1997
2084
|
return try NavigationSplitViewColumnWidthModifier(from: params, appContext: appContext)
|
|
1998
2085
|
}
|
|
1999
2086
|
|
|
2087
|
+
register("arrangementViewStyle") { params, appContext, _ in
|
|
2088
|
+
return try ArrangementViewStyleModifier(from: params, appContext: appContext)
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
register("splitArrangementLayoutRatio") { params, appContext, _ in
|
|
2092
|
+
return try SplitArrangementLayoutRatioModifier(from: params, appContext: appContext)
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
register("splitArrangementLayoutSize") { params, appContext, _ in
|
|
2096
|
+
return try SplitArrangementLayoutSizeModifier(from: params, appContext: appContext)
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
register("splitArrangementFixedLayoutSize") { params, appContext, _ in
|
|
2100
|
+
return try SplitArrangementFixedLayoutSizeModifier(from: params, appContext: appContext)
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
register("overlayArrangementEdge") { params, appContext, _ in
|
|
2104
|
+
return try OverlayArrangementEdgeModifier(from: params, appContext: appContext)
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2000
2107
|
register("accessibilityLabel") { params, appContext, _ in
|
|
2001
2108
|
return try AccessibilityLabelModifier(from: params, appContext: appContext)
|
|
2002
2109
|
}
|
|
@@ -2305,6 +2412,10 @@ extension ViewModifierRegistry {
|
|
|
2305
2412
|
return try ScrollDisabledModifier(from: params, appContext: appContext)
|
|
2306
2413
|
}
|
|
2307
2414
|
|
|
2415
|
+
register("preferredColorScheme") { params, appContext, _ in
|
|
2416
|
+
return try PreferredColorSchemeModifier(from: params, appContext: appContext)
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2308
2419
|
register("scrollClipDisabled") { params, appContext, _ in
|
|
2309
2420
|
return try ScrollClipDisabledModifier(from: params, appContext: appContext)
|
|
2310
2421
|
}
|
|
@@ -2349,6 +2460,10 @@ extension ViewModifierRegistry {
|
|
|
2349
2460
|
return try PresentationDragIndicatorModifier(from: params, appContext: appContext)
|
|
2350
2461
|
}
|
|
2351
2462
|
|
|
2463
|
+
register("presentationCornerRadius") { params, appContext, _ in
|
|
2464
|
+
return try PresentationCornerRadiusModifier(from: params, appContext: appContext)
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2352
2467
|
register("presentationBackgroundInteraction") { params, appContext, _ in
|
|
2353
2468
|
return try PresentationBackgroundInteractionModifier(from: params, appContext: appContext)
|
|
2354
2469
|
}
|
|
@@ -2385,14 +2500,6 @@ extension ViewModifierRegistry {
|
|
|
2385
2500
|
return try ContentTransitionModifier(from: params, appContext: appContext)
|
|
2386
2501
|
}
|
|
2387
2502
|
|
|
2388
|
-
register("widgetURL") { params, appContext, _ in
|
|
2389
|
-
return try WidgetURLModifier(from: params, appContext: appContext)
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
register("activityBackgroundTint") { params, appContext, _ in
|
|
2393
|
-
return try ActivityBackgroundTintModifier(from: params, appContext: appContext)
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
2503
|
register("keyboardType") { params, appContext, _ in
|
|
2397
2504
|
return try KeyboardTypeModifier(from: params, appContext: appContext)
|
|
2398
2505
|
}
|
|
@@ -2406,7 +2513,11 @@ extension ViewModifierRegistry {
|
|
|
2406
2513
|
}
|
|
2407
2514
|
|
|
2408
2515
|
register("containerBackground") { params, appContext, _ in
|
|
2409
|
-
|
|
2516
|
+
let modifier = try ContainerBackgroundModifier(from: params, appContext: appContext)
|
|
2517
|
+
#if DEBUG
|
|
2518
|
+
modifier.warnIfWidgetPlacementIsUnavailable()
|
|
2519
|
+
#endif
|
|
2520
|
+
return modifier
|
|
2410
2521
|
}
|
|
2411
2522
|
|
|
2412
2523
|
register("symbolEffect") { params, appContext, _ in
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2026-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The parts of SwiftUI that are declared in WidgetKit. expo-widgets sets
|
|
8
|
+
* `ViewModifierRegistry.widgetKit`, so ExpoUI does not link WidgetKit.
|
|
9
|
+
*/
|
|
10
|
+
public protocol WidgetKitModifiers {
|
|
11
|
+
func containerBackground(_ view: AnyView, style: AnyShapeStyle) -> AnyView
|
|
12
|
+
func widgetAccentedRenderingMode(_ image: Image, params: [String: Any], appContext: AppContext) -> AnyView?
|
|
13
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
67ccc30c75819937df5e850cb742a4ba
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b9f56fabf01aea58b15172683c4a748b8dc3cf55
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e1ff6f3760b8699263fd244601e146335a9f853109153f91be6c98d092a9302e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
81d467c2d81c5fb4545160a5b5563fcf0f6eb3fbb191a507382ad6b0abde41d6c5506edc2281c1e98dee29eb2c861856f8e34d4208972a2dbf2b547c77143627
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7220f1074490e12c04ff057048d86124
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d581a4836a4dd119bfc57aca7152c5f7a45911b8
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a869c8586462b852b75439dbfeaa7caef538db6eeff7bac5aee0026215a61a06
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
34080b16453bc36824a34471ee76e7da22af80c63cc419ea34d8c2e1e562f72f968ce8faefd5672f33a4c899c0cdf85c2e711318d859ba4d4562b7e0a61482d8
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.22",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-57.0.
|
|
28
|
-
"url": "expo.modules.ui-57.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-57.0.22.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.22.aar",
|
|
29
|
+
"size": 2080513,
|
|
30
|
+
"sha512": "34080b16453bc36824a34471ee76e7da22af80c63cc419ea34d8c2e1e562f72f968ce8faefd5672f33a4c899c0cdf85c2e711318d859ba4d4562b7e0a61482d8",
|
|
31
|
+
"sha256": "a869c8586462b852b75439dbfeaa7caef538db6eeff7bac5aee0026215a61a06",
|
|
32
|
+
"sha1": "d581a4836a4dd119bfc57aca7152c5f7a45911b8",
|
|
33
|
+
"md5": "7220f1074490e12c04ff057048d86124"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-57.0.
|
|
145
|
-
"url": "expo.modules.ui-57.0.
|
|
146
|
-
"size":
|
|
147
|
-
"sha512": "
|
|
148
|
-
"sha256": "
|
|
149
|
-
"sha1": "
|
|
150
|
-
"md5": "
|
|
144
|
+
"name": "expo.modules.ui-57.0.22.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.22.aar",
|
|
146
|
+
"size": 2080513,
|
|
147
|
+
"sha512": "34080b16453bc36824a34471ee76e7da22af80c63cc419ea34d8c2e1e562f72f968ce8faefd5672f33a4c899c0cdf85c2e711318d859ba4d4562b7e0a61482d8",
|
|
148
|
+
"sha256": "a869c8586462b852b75439dbfeaa7caef538db6eeff7bac5aee0026215a61a06",
|
|
149
|
+
"sha1": "d581a4836a4dd119bfc57aca7152c5f7a45911b8",
|
|
150
|
+
"md5": "7220f1074490e12c04ff057048d86124"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-57.0.
|
|
165
|
-
"url": "expo.modules.ui-57.0.
|
|
166
|
-
"size":
|
|
167
|
-
"sha512": "
|
|
168
|
-
"sha256": "
|
|
169
|
-
"sha1": "
|
|
170
|
-
"md5": "
|
|
164
|
+
"name": "expo.modules.ui-57.0.22-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.22-sources.jar",
|
|
166
|
+
"size": 105727,
|
|
167
|
+
"sha512": "81d467c2d81c5fb4545160a5b5563fcf0f6eb3fbb191a507382ad6b0abde41d6c5506edc2281c1e98dee29eb2c861856f8e34d4208972a2dbf2b547c77143627",
|
|
168
|
+
"sha256": "e1ff6f3760b8699263fd244601e146335a9f853109153f91be6c98d092a9302e",
|
|
169
|
+
"sha1": "b9f56fabf01aea58b15172683c4a748b8dc3cf55",
|
|
170
|
+
"md5": "67ccc30c75819937df5e850cb742a4ba"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7fb20f1c978e1a0b3d762c0dd5323bf9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
14b81e92a813dd3ff42d0b57bc819fe6fe45dbe9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f7022f3602a1162d857c67860c42f26d80c57f0955e815776e0d69da62a6b89
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f4323dcdf2bd04112993e148d47b98df0245f0679aedb4965f45646c987da2d513b3a312aba6ca5802a411cc07b8260c3b3a944a30da7e4b9c2d2140e9cc0b78
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>57.0.
|
|
12
|
+
<version>57.0.22</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bf3cc748e5aba7f0faca9af9cae6ca11
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
64719d73cd6c6e4410f220586d1b900553d8636f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b1893b9a45c11ca23be9b083040c6c8e42e5dbf2f83388fb2ecb46ebb759ef43
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2e7e5260dc6cae8eb8555c1614f8e50394413bd3cc98d8c34ffb9831458a6079516da7c302bac741da5f578dac28c7772d1cf5efd111f007f15639876db47768
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.22</latest>
|
|
7
|
+
<release>57.0.22</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.22</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20261006120050</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ec005e8760fa18717c30f9efdbaf8407
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
213f89fcaff64a6fdd6b446eda846a2de8851a2e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fd6986f721f0b9289418efa80805a6cf05ffcaccc5f74b409b7953f92f5a053e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9461340626636adffd749d7a45d2b9ee7741281f8c1507b97ca59fcf2c1a9cdb97cede810b8aa5dbe7f8d22d6076a512501797a90eb796b321ec3a39624f4241
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.22",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@types/react": "~19.2.0",
|
|
97
97
|
"react-native-reanimated": "4.5.1",
|
|
98
98
|
"react-native-worklets": "0.10.1",
|
|
99
|
-
"expo
|
|
100
|
-
"expo": "
|
|
99
|
+
"expo": "57.0.27",
|
|
100
|
+
"expo-module-scripts": "56.0.3"
|
|
101
101
|
},
|
|
102
102
|
"jest": {
|
|
103
103
|
"preset": "expo-module-scripts"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"optional": true
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "50ac74f1ab5682c8e32b24da6e5e97dd4dbbb80f",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildEvent, buildChangeEvent, type DateTimePickerProps } from './types';
|
|
2
|
+
import { localDateToUtcDayISOString, utcDayToLocalDate } from './utils';
|
|
2
3
|
import {
|
|
3
4
|
DateTimePicker as AndroidPicker,
|
|
4
5
|
DatePickerDialog as AndroidDatePickerDialog,
|
|
@@ -52,6 +53,14 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
52
53
|
negativeButton,
|
|
53
54
|
} = props;
|
|
54
55
|
|
|
56
|
+
// Material3 date pickers work in UTC days, while `value` and the reported date are local —
|
|
57
|
+
// matching `@react-native-community/datetimepicker`. Send `value`'s local calendar day as a UTC
|
|
58
|
+
// day and convert the picked UTC day back, keeping `value`'s time of day. The native side
|
|
59
|
+
// already converts `minimumDate`/`maximumDate` by their local calendar day. Time pickers read
|
|
60
|
+
// local hours from the instant, so they take `value` unchanged.
|
|
61
|
+
const usesDateComponents = mode !== 'time';
|
|
62
|
+
const initialDate = usesDateComponents ? localDateToUtcDayISOString(value) : value.toISOString();
|
|
63
|
+
|
|
55
64
|
const onDismissed = () => {
|
|
56
65
|
if (onDismissProp) {
|
|
57
66
|
onDismissProp();
|
|
@@ -70,10 +79,11 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
70
79
|
};
|
|
71
80
|
|
|
72
81
|
const onDateSelected = (date: Date) => {
|
|
82
|
+
const selected = usesDateComponents ? utcDayToLocalDate(date, value) : date;
|
|
73
83
|
if (onValueChange) {
|
|
74
|
-
onValueChange(buildChangeEvent(
|
|
84
|
+
onValueChange(buildChangeEvent(selected), selected);
|
|
75
85
|
} else {
|
|
76
|
-
onChange?.(buildEvent(
|
|
86
|
+
onChange?.(buildEvent(selected), selected);
|
|
77
87
|
}
|
|
78
88
|
};
|
|
79
89
|
|
|
@@ -81,7 +91,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
81
91
|
minimumDate || maximumDate ? { start: minimumDate, end: maximumDate } : undefined;
|
|
82
92
|
|
|
83
93
|
const dialogProps = {
|
|
84
|
-
initialDate
|
|
94
|
+
initialDate,
|
|
85
95
|
color: accentColor,
|
|
86
96
|
confirmButtonLabel: positiveButton?.label,
|
|
87
97
|
dismissButtonLabel: negativeButton?.label,
|
|
@@ -111,7 +121,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
111
121
|
return (
|
|
112
122
|
<Host matchContents={{ vertical: true }} style={style}>
|
|
113
123
|
<AndroidPicker
|
|
114
|
-
initialDate={
|
|
124
|
+
initialDate={initialDate}
|
|
115
125
|
displayedComponents={modeToDisplayedComponents(mode)}
|
|
116
126
|
variant={displayToAndroidVariant(display)}
|
|
117
127
|
selectableDates={selectableDates}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Material3's DatePicker (and the native side's `toUtcDayMillis` bounds conversion) works in UTC
|
|
2
|
+
// days, while `value`, `minimumDate`, and `maximumDate` are local dates — matching
|
|
3
|
+
// `@react-native-community/datetimepicker`. These helpers convert between the two.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the ISO string of the UTC midnight of `value`'s local calendar day, so Material3 shows
|
|
7
|
+
* the same day the user sees locally.
|
|
8
|
+
*/
|
|
9
|
+
export function localDateToUtcDayISOString(value: Date): string {
|
|
10
|
+
return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate())).toISOString();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Converts the UTC-midnight day reported by Material3 back into a local date, keeping the time of
|
|
15
|
+
* day from `timeOfDay`.
|
|
16
|
+
*/
|
|
17
|
+
export function utcDayToLocalDate(utcDay: Date, timeOfDay: Date): Date {
|
|
18
|
+
const result = new Date(timeOfDay);
|
|
19
|
+
result.setFullYear(utcDay.getUTCFullYear(), utcDay.getUTCMonth(), utcDay.getUTCDate());
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
@@ -36,6 +36,11 @@ export function Picker<T extends PickerItemValue>(props: PickerProps<T>) {
|
|
|
36
36
|
const selectedLabel = selectedItem?.label ?? '';
|
|
37
37
|
const labelState = useNativeState(selectedLabel);
|
|
38
38
|
|
|
39
|
+
// `useNativeState` only captures its initial value, so push later changes to the field.
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
labelState.set(selectedLabel);
|
|
42
|
+
}, [labelState, selectedLabel]);
|
|
43
|
+
|
|
39
44
|
return (
|
|
40
45
|
<Host style={style} matchContents={{ vertical: true }}>
|
|
41
46
|
<ExposedDropdownMenuBox
|