@expo/ui 57.0.21 → 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.
Files changed (92) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +1 -0
  4. package/android/src/main/java/expo/modules/ui/HostView.kt +7 -1
  5. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +23 -2
  6. package/build/community/datetime-picker/DateTimePicker.android.d.ts.map +1 -1
  7. package/build/community/datetime-picker/utils.d.ts +11 -0
  8. package/build/community/datetime-picker/utils.d.ts.map +1 -0
  9. package/build/community/picker/Picker.android.d.ts.map +1 -1
  10. package/build/jetpack-compose/modifiers/index.d.ts +18 -3
  11. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  12. package/build/swift-ui/ArrangementView/index.d.ts +49 -0
  13. package/build/swift-ui/ArrangementView/index.d.ts.map +1 -0
  14. package/build/swift-ui/index.d.ts +1 -0
  15. package/build/swift-ui/index.d.ts.map +1 -1
  16. package/build/swift-ui/modifiers/animation/index.d.ts +6 -1
  17. package/build/swift-ui/modifiers/animation/index.d.ts.map +1 -1
  18. package/build/swift-ui/modifiers/animation/types.d.ts +15 -1
  19. package/build/swift-ui/modifiers/animation/types.d.ts.map +1 -1
  20. package/build/swift-ui/modifiers/arrangementModifiers.d.ts +110 -0
  21. package/build/swift-ui/modifiers/arrangementModifiers.d.ts.map +1 -0
  22. package/build/swift-ui/modifiers/containerBackground.d.ts +2 -2
  23. package/build/swift-ui/modifiers/index.d.ts +40 -2
  24. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  25. package/build/universal/Switch/index.android.d.ts.map +1 -1
  26. package/expo-module.config.json +1 -1
  27. package/ios/ArrangementViewView.swift +40 -0
  28. package/ios/ExpoUIModule.swift +1 -1
  29. package/ios/Modifiers/AnimationConfig.swift +20 -0
  30. package/ios/Modifiers/ArrangementModifiers.swift +157 -0
  31. package/ios/Modifiers/ContainerBackgroundModifier.swift +26 -13
  32. package/ios/Modifiers/PreferredColorSchemeModifier.swift +12 -0
  33. package/ios/Modifiers/View+ModifierArray.swift +3 -3
  34. package/ios/Modifiers/ViewModifierRegistry.swift +116 -9
  35. package/ios/Modifiers/WidgetKitModifiers.swift +13 -0
  36. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.21/expo.modules.ui-57.0.21-sources.jar → 57.0.22/expo.modules.ui-57.0.22-sources.jar} +0 -0
  37. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.md5 +1 -0
  38. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha1 +1 -0
  39. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha256 +1 -0
  40. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha512 +1 -0
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar +0 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.md5 +1 -0
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha1 +1 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha256 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha512 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.21/expo.modules.ui-57.0.21.module → 57.0.22/expo.modules.ui-57.0.22.module} +22 -22
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.md5 +1 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha1 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha256 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha512 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.21/expo.modules.ui-57.0.21.pom → 57.0.22/expo.modules.ui-57.0.22.pom} +1 -1
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.md5 +1 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha1 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha256 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha512 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  61. package/package.json +4 -4
  62. package/src/community/datetime-picker/DateTimePicker.android.tsx +14 -4
  63. package/src/community/datetime-picker/utils.ts +21 -0
  64. package/src/community/picker/Picker.android.tsx +5 -0
  65. package/src/jetpack-compose/modifiers/index.ts +17 -3
  66. package/src/swift-ui/ArrangementView/index.tsx +70 -0
  67. package/src/swift-ui/index.tsx +1 -0
  68. package/src/swift-ui/modifiers/animation/index.ts +24 -11
  69. package/src/swift-ui/modifiers/animation/types.ts +18 -0
  70. package/src/swift-ui/modifiers/arrangementModifiers.ts +142 -0
  71. package/src/swift-ui/modifiers/containerBackground.ts +2 -2
  72. package/src/swift-ui/modifiers/index.ts +51 -1
  73. package/src/universal/Switch/index.android.tsx +11 -2
  74. package/ios/AccessoryWidgetBackgroundView.swift +0 -27
  75. package/ios/Modifiers/WidgetModifiers.swift +0 -70
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21-sources.jar.md5 +0 -1
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21-sources.jar.sha1 +0 -1
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21-sources.jar.sha256 +0 -1
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21-sources.jar.sha512 +0 -1
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.aar +0 -0
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.aar.md5 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.aar.sha1 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.aar.sha256 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.aar.sha512 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.module.md5 +0 -1
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.module.sha1 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.module.sha256 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.module.sha512 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.pom.md5 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.pom.sha1 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.pom.sha256 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.21/expo.modules.ui-57.0.21.pom.sha512 +0 -1
@@ -786,6 +786,16 @@ export const scrollDismissesKeyboard = (
786
786
  export const scrollDisabled = (disabled: boolean = true) =>
787
787
  createModifier('scrollDisabled', { disabled });
788
788
 
789
+ /**
790
+ * Sets the preferred color scheme for the nearest enclosing presentation, such as a `BottomSheet`,
791
+ * including its background. The value overrides the device's light or dark appearance for that
792
+ * presentation.
793
+ * @param colorScheme - The preferred color scheme, or `null` to indicate no preference.
794
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/preferredcolorscheme(_:)).
795
+ */
796
+ export const preferredColorScheme = (colorScheme: 'light' | 'dark' | null) =>
797
+ createModifier('preferredColorScheme', { colorScheme });
798
+
789
799
  /**
790
800
  * Disables or enables clipping of a scrollable view's content to its bounds.
791
801
  * Content drawn outside those bounds, such as a shadow or a view scaled up past the edge, is
@@ -1712,6 +1722,41 @@ export const resizable = (
1712
1722
  */
1713
1723
  export const navigationTitle = (title: string) => createModifier('navigationTitle', { title });
1714
1724
 
1725
+ /**
1726
+ * Title display modes for the `navigationBarTitleDisplayMode` modifier.
1727
+ * @platform ios
1728
+ */
1729
+ export type NavigationBarTitleDisplayMode = 'automatic' | 'inline' | 'large';
1730
+
1731
+ /**
1732
+ * Configures the title display mode for a navigation bar.
1733
+ * @param displayMode - The style to use for displaying the navigation bar title.
1734
+ * @platform ios
1735
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/navigationbartitledisplaymode(_:)).
1736
+ */
1737
+ export const navigationBarTitleDisplayMode = (displayMode: NavigationBarTitleDisplayMode) =>
1738
+ createModifier('navigationBarTitleDisplayMode', { displayMode });
1739
+
1740
+ /**
1741
+ * Title display modes for the `toolbarTitleDisplayMode` modifier. On tvOS, `large` and
1742
+ * `inlineLarge` have no effect. On macOS, `large` has no effect.
1743
+ * @platform ios 17.0+
1744
+ * @platform tvos 17.0+
1745
+ * @platform macos 14.0+
1746
+ */
1747
+ export type ToolbarTitleDisplayMode = 'automatic' | 'inline' | 'inlineLarge' | 'large';
1748
+
1749
+ /**
1750
+ * Configures the title display mode for a toolbar.
1751
+ * @param mode - The style to use for displaying the toolbar title.
1752
+ * @platform ios 17.0+
1753
+ * @platform tvos 17.0+
1754
+ * @platform macos 14.0+
1755
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/toolbartitledisplaymode(_:)).
1756
+ */
1757
+ export const toolbarTitleDisplayMode = (mode: ToolbarTitleDisplayMode) =>
1758
+ createModifier('toolbarTitleDisplayMode', { mode });
1759
+
1715
1760
  // =============================================================================
1716
1761
  // Type Definitions
1717
1762
  // =============================================================================
@@ -1799,6 +1844,7 @@ export type BuiltInModifier =
1799
1844
  | ReturnType<typeof containerRelativeFrame>
1800
1845
  | ReturnType<typeof scrollContentBackground>
1801
1846
  | ReturnType<typeof scrollDisabled>
1847
+ | ReturnType<typeof preferredColorScheme>
1802
1848
  | ReturnType<typeof scrollClipDisabled>
1803
1849
  | ReturnType<typeof scrollIndicators>
1804
1850
  | ReturnType<typeof scrollEdgeEffectStyle>
@@ -1857,7 +1903,9 @@ export type BuiltInModifier =
1857
1903
  | ReturnType<typeof widgetURL>
1858
1904
  | ReturnType<typeof activityBackgroundTint>
1859
1905
  | ReturnType<typeof containerBackground>
1860
- | ReturnType<typeof navigationTitle>;
1906
+ | ReturnType<typeof navigationTitle>
1907
+ | ReturnType<typeof navigationBarTitleDisplayMode>
1908
+ | ReturnType<typeof toolbarTitleDisplayMode>;
1861
1909
 
1862
1910
  /**
1863
1911
  * Main ViewModifier type that supports both built-in and 3rd party modifiers.
@@ -1901,6 +1949,7 @@ export * from './pickerStyle';
1901
1949
  export * from './menuOrder';
1902
1950
  export * from './tabViewModifiers';
1903
1951
  export * from './navigationModifiers';
1952
+ export * from './arrangementModifiers';
1904
1953
  export * from './datePickerStyle';
1905
1954
  export * from './progressViewStyle';
1906
1955
  export * from './gaugeStyle';
@@ -1915,5 +1964,6 @@ export type {
1915
1964
  TimingAnimationParams,
1916
1965
  SpringAnimationParams,
1917
1966
  InterpolatingSpringAnimationParams,
1967
+ SpringPresetAnimationParams,
1918
1968
  ChainableAnimationType,
1919
1969
  } from './animation/types';
@@ -1,5 +1,11 @@
1
1
  import { Row, Switch as ComposeSwitch, Text } from '@expo/ui/jetpack-compose';
2
- import { testID as testIDModifier, weight } from '@expo/ui/jetpack-compose/modifiers';
2
+ import {
3
+ fillMaxWidth,
4
+ IntrinsicSize,
5
+ testID as testIDModifier,
6
+ weight,
7
+ width,
8
+ } from '@expo/ui/jetpack-compose/modifiers';
3
9
 
4
10
  import type { SwitchProps } from './types';
5
11
 
@@ -16,7 +22,10 @@ export function Switch({ value, onValueChange, label, disabled, testID, modifier
16
22
  if (label == null) return toggle;
17
23
 
18
24
  return (
19
- <Row verticalAlignment="center" horizontalArrangement={{ spacedBy: 8 }}>
25
+ <Row
26
+ verticalAlignment="center"
27
+ horizontalArrangement={{ spacedBy: 8 }}
28
+ modifiers={[fillMaxWidth(), width(IntrinsicSize.Max)]}>
20
29
  <Text modifiers={[weight(1)]}>{label}</Text>
21
30
  {toggle}
22
31
  </Row>
@@ -1,27 +0,0 @@
1
- import SwiftUI
2
- import ExpoModulesCore
3
- #if !os(tvOS)
4
- import WidgetKit
5
- #endif
6
-
7
- public final class AccessoryWidgetBackgroundProps: UIBaseViewProps {}
8
-
9
- public struct AccessoryWidgetBackgroundView: ExpoSwiftUI.View {
10
- @ObservedObject public var props: AccessoryWidgetBackgroundProps
11
-
12
- public init(props: AccessoryWidgetBackgroundProps) {
13
- self.props = props
14
- }
15
-
16
- public var body: some View {
17
- #if !os(tvOS)
18
- if #available(iOS 16.0, *) {
19
- AccessoryWidgetBackground()
20
- } else {
21
- Color.clear
22
- }
23
- #else
24
- EmptyView()
25
- #endif
26
- }
27
- }
@@ -1,70 +0,0 @@
1
- // Copyright 2015-present 650 Industries. All rights reserved.
2
-
3
- import ExpoModulesCore
4
- import SwiftUI
5
- #if !os(tvOS)
6
- import WidgetKit
7
- #endif
8
-
9
- internal enum WidgetAccentedRenderingModeOptions: String, Enumerable {
10
- case accented
11
- case desaturated
12
- case accentedDesaturated
13
- case fullColor
14
-
15
- #if !os(tvOS)
16
- @available(iOS 18.0, *)
17
- var toWidgetAccentedRenderingMode: WidgetAccentedRenderingMode {
18
- switch self {
19
- case .accented: return .accented
20
- case .accentedDesaturated: return .accentedDesaturated
21
- case .desaturated: return .desaturated
22
- case .fullColor: return .fullColor
23
- }
24
- }
25
- #endif
26
- }
27
-
28
- /**
29
- * This is a unique modifier that exists only on Image, but returns some View, and for this reason it cannot be a ViewModifier.
30
- */
31
- internal struct WidgetAccentedRenderingModeModifier: Record {
32
- @Field var renderingMode: WidgetAccentedRenderingModeOptions?
33
-
34
- @ViewBuilder
35
- func apply(to image: Image) -> some View {
36
- #if !os(tvOS)
37
- if #available(iOS 18.0, *), renderingMode != nil {
38
- image.widgetAccentedRenderingMode(renderingMode?.toWidgetAccentedRenderingMode)
39
- } else {
40
- image
41
- }
42
- #else
43
- image
44
- #endif
45
- }
46
- }
47
-
48
- internal struct WidgetURLModifier: ViewModifier, Record {
49
- @Field var url: URL?
50
-
51
- func body(content: Content) -> some View {
52
- #if !os(tvOS)
53
- content.widgetURL(url)
54
- #else
55
- content
56
- #endif
57
- }
58
- }
59
-
60
- internal struct ActivityBackgroundTintModifier: ViewModifier, Record {
61
- @Field var color: Color?
62
-
63
- func body(content: Content) -> some View {
64
- #if !os(tvOS) && !os(macOS) && !targetEnvironment(macCatalyst)
65
- content.activityBackgroundTint(color)
66
- #else
67
- content
68
- #endif
69
- }
70
- }
@@ -1 +0,0 @@
1
- ca977e2408458c690c3555514485a6a8e7fade24
@@ -1 +0,0 @@
1
- 352b556c7e482ce79471552b5d73a5f29d92e9a339fd3edecf327c7df9e6576b
@@ -1 +0,0 @@
1
- bd014a7ec6f4940b753de1ef54b686c8316d45a4242893e9a508948dd22fc893063a285538d30a3fa943deedbf32915697892ff4a739e17fcb2b194a79f71d8d
@@ -1 +0,0 @@
1
- b8495e88a2dd3b3386885867acede44c5a99186f
@@ -1 +0,0 @@
1
- edfc30f6ff0935cee758638ea4443ec247e3628ba4a088f44f58becfca185b6e
@@ -1 +0,0 @@
1
- 894745399f2255f02b84f664c1e62ab66d71daf4a24e3ce48ecfb7e60d0ba9abfbe31a5d9517953e2d365b786ba9da8ba8f476361777fd57006eb7fb7522c32c
@@ -1 +0,0 @@
1
- 6cf7f09b53eaeeca0883ac8ad938b9df0e00096c
@@ -1 +0,0 @@
1
- 47ec6c69bad894a590e872629d8952ffee42b2546379499696f1ea119ccbd85a
@@ -1 +0,0 @@
1
- 84201e84b7b47e73be1a36b5223ddee0195e4c3f3c4fe038d1037befaab65ad7d397e1788f527fb81e7a6c988877c2d555d56f67cba059890af11a5e43d1851c
@@ -1 +0,0 @@
1
- f458817401652c83a6bea14ae3809f6fbed2c4ea
@@ -1 +0,0 @@
1
- 6d17e36602db105406e27bf20b375ca7024d6e0d66edb58aa53ba699e08a4627
@@ -1 +0,0 @@
1
- 76428b808dc49f9b22d89e130b22b6333b1c067da971d6bad98c113733184bb79db86721c06f52d926d31b048bc2413cc2608d7be59ad025a0bf30c5089e4ec4