@expo/ui 58.0.14 → 58.0.15

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 (74) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +35 -2
  4. package/android/src/main/java/expo/modules/ui/DateRangePickerView.kt +35 -2
  5. package/android/src/main/java/expo/modules/ui/HostView.kt +21 -0
  6. package/android/src/main/java/expo/modules/ui/RNHostView.kt +22 -1
  7. package/build/State/useWorkletCallback.d.ts +1 -1
  8. package/build/community/datetime-picker/DateTimePicker.android.js +4 -0
  9. package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
  10. package/build/jetpack-compose/DatePicker/index.d.ts +38 -0
  11. package/build/jetpack-compose/DatePicker/index.js.map +1 -1
  12. package/build/swift-ui/Toolbar/index.d.ts +2 -0
  13. package/build/swift-ui/Toolbar/index.js +2 -0
  14. package/build/swift-ui/Toolbar/index.js.map +1 -1
  15. package/build/swift-ui/modifiers/hingeObservation.d.ts +1 -1
  16. package/build/swift-ui/modifiers/hingeObservation.js +1 -1
  17. package/build/swift-ui/modifiers/index.d.ts +1 -0
  18. package/build/swift-ui/modifiers/index.js +1 -0
  19. package/build/swift-ui/modifiers/index.js.map +1 -1
  20. package/build/swift-ui/modifiers/searchable.d.ts +83 -0
  21. package/build/swift-ui/modifiers/searchable.js +74 -0
  22. package/build/swift-ui/modifiers/searchable.js.map +1 -0
  23. package/ios/ChartView.swift +8 -6
  24. package/ios/Modifiers/SearchToolbarBehaviorModifier.swift +35 -0
  25. package/ios/Modifiers/SearchableModifier.swift +94 -0
  26. package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
  27. package/ios/Picker/PickerView.swift +9 -7
  28. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.14/expo.modules.ui-58.0.14-sources.jar → 58.0.15/expo.modules.ui-58.0.15-sources.jar} +0 -0
  29. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.md5 +1 -0
  30. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha1 +1 -0
  31. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha256 +1 -0
  32. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha512 +1 -0
  33. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar +0 -0
  34. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.md5 +1 -0
  35. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha1 +1 -0
  36. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha256 +1 -0
  37. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha512 +1 -0
  38. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.14/expo.modules.ui-58.0.14.module → 58.0.15/expo.modules.ui-58.0.15.module} +22 -22
  39. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.md5 +1 -0
  40. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha1 +1 -0
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha256 +1 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha512 +1 -0
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.14/expo.modules.ui-58.0.14.pom → 58.0.15/expo.modules.ui-58.0.15.pom} +1 -1
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.md5 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha1 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha256 +1 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha512 +1 -0
  48. package/package.json +2 -2
  49. package/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
  50. package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
  51. package/src/State/useWorkletCallback.ts +1 -1
  52. package/src/community/datetime-picker/DateTimePicker.android.tsx +4 -0
  53. package/src/jetpack-compose/DatePicker/index.tsx +38 -0
  54. package/src/swift-ui/Toolbar/index.tsx +2 -0
  55. package/src/swift-ui/modifiers/hingeObservation.ts +1 -1
  56. package/src/swift-ui/modifiers/index.ts +1 -0
  57. package/src/swift-ui/modifiers/searchable.ts +107 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14-sources.jar.md5 +0 -1
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14-sources.jar.sha1 +0 -1
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14-sources.jar.sha256 +0 -1
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14-sources.jar.sha512 +0 -1
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.aar +0 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.aar.md5 +0 -1
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.aar.sha1 +0 -1
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.aar.sha256 +0 -1
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.aar.sha512 +0 -1
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.md5 +0 -1
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha1 +0 -1
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha256 +0 -1
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha512 +0 -1
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.md5 +0 -1
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha1 +0 -1
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha256 +0 -1
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha512 +0 -1
@@ -1999,6 +1999,7 @@ export * from './presentationModifiers';
1999
1999
  export * from './environment';
2000
2000
  export type { ShapeStyle } from './shapeStyle';
2001
2001
  export * from './scrollPosition';
2002
+ export * from './searchable';
2002
2003
  export * from './symbolEffect';
2003
2004
  export * from './scrollObservation';
2004
2005
  export * from './hingeObservation';
@@ -0,0 +1,107 @@
1
+ import { getStateId, type ObservableState } from '../../State';
2
+ import { createModifier, createModifierWithEventListener } from './createModifier';
3
+
4
+ /**
5
+ * The placement of a search field in a view hierarchy.
6
+ *
7
+ * - `automatic`: SwiftUI places the search field automatically.
8
+ * - `toolbar`: The search field appears in the toolbar. Falls back to `automatic` on tvOS.
9
+ * - `sidebar`: The search field appears in the sidebar of a navigation view. Falls back to
10
+ * `automatic` on tvOS.
11
+ * - `navigationBarDrawer`: The search field appears in the navigation bar. Falls back to
12
+ * `automatic` on macOS and tvOS.
13
+ */
14
+ export type SearchFieldPlacement = 'automatic' | 'toolbar' | 'sidebar' | 'navigationBarDrawer';
15
+
16
+ /**
17
+ * Marks this view as searchable, which configures the display of a search field.
18
+ *
19
+ * @param text - The text to display and edit in the search field. An `ObservableState<string>`
20
+ * created with `useNativeState`.
21
+ * @param options.placement - The preferred placement of the search field within the containing
22
+ * view hierarchy. Defaults to `automatic`.
23
+ * @param options.prompt - The prompt of the search field, which provides users with guidance on
24
+ * what to search for.
25
+ * @param options.onChange - Fires on the JS thread when the user edits or clears the search field.
26
+ * It does not fire for values written from JavaScript.
27
+ *
28
+ * @platform ios
29
+ * @platform tvos
30
+ * @platform macos
31
+ *
32
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/searchable(text:placement:prompt:)-18a8f).
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * const query = useNativeState('');
37
+ *
38
+ * <Host>
39
+ * <NavigationStack>
40
+ * <List
41
+ * modifiers={[
42
+ * searchable(query, {
43
+ * prompt: 'Search agents',
44
+ * onChange: (text) => setFilter(text),
45
+ * }),
46
+ * ]}>
47
+ * {rows.map((row) => (
48
+ * <Text key={row.id}>{row.name}</Text>
49
+ * ))}
50
+ * </List>
51
+ * </NavigationStack>
52
+ * </Host>
53
+ * ```
54
+ */
55
+ export const searchable = (
56
+ text: ObservableState<string>,
57
+ options?: {
58
+ placement?: SearchFieldPlacement;
59
+ prompt?: string;
60
+ onChange?: (text: string) => void;
61
+ }
62
+ ) => {
63
+ const params = {
64
+ text: getStateId(text),
65
+ placement: options?.placement,
66
+ prompt: options?.prompt,
67
+ };
68
+ const onChange = options?.onChange;
69
+ if (onChange) {
70
+ return createModifierWithEventListener(
71
+ 'searchable',
72
+ (event: { text?: string }) => onChange(event?.text ?? ''),
73
+ params
74
+ );
75
+ }
76
+ return createModifier('searchable', params);
77
+ };
78
+
79
+ /**
80
+ * The behavior of a search field in a toolbar.
81
+ *
82
+ * - `automatic`: The automatic behavior.
83
+ * - `minimize`: A search toolbar behavior that prefers rendering a search field as a button-like
84
+ * control. Falls back to `automatic` on macOS and tvOS.
85
+ */
86
+ export type SearchToolbarBehavior = 'automatic' | 'minimize';
87
+
88
+ /**
89
+ * Configures the behavior for search in the toolbar.
90
+ *
91
+ * On iOS below 26.0, the modifier is a no-op.
92
+ *
93
+ * @param behavior - The search field behavior.
94
+ *
95
+ * @platform ios 26.0+
96
+ * @platform tvos 26.0+
97
+ * @platform macos 26.0+
98
+ *
99
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/searchtoolbarbehavior(_:)).
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * <List modifiers={[searchable(query), searchToolbarBehavior('minimize')]}>
104
+ * ```
105
+ */
106
+ export const searchToolbarBehavior = (behavior: SearchToolbarBehavior) =>
107
+ createModifier('searchToolbarBehavior', { behavior });
@@ -1 +0,0 @@
1
- e587fcde7f1c58c339f95759565034f989a49dcf
@@ -1 +0,0 @@
1
- eee15e7c9f3aeb7b3941ead7ce0e72d8174b0b95964c69ef5a1d5fbf02536fbe
@@ -1 +0,0 @@
1
- 3e6c99d1b6aa74d01d30339d222653a631dae2abf99075e4c25fc171fbb33f9d55bca7daee4d1cd4c6ecdcdc89fb71067de948ac4a91135b6ce38cbb337c52d1
@@ -1 +0,0 @@
1
- 1409db74c61bae87d4830fa0652a822c1ba21d80
@@ -1 +0,0 @@
1
- dc0a8e5a28e1f4f7d722e8706b5858844aa6eac089e89e5f8099374b309bed60
@@ -1 +0,0 @@
1
- ef66aaa30d2d2703c4ff5c36c117ffaf8dd41a2d2a9a8a286224b817f77d20ae2298cd6e0959e1a78ccc3c741cbc286db2e8d5a086b4ed9e11acc6a206207d68
@@ -1 +0,0 @@
1
- bac0bb14d7f8206e4f6fea13dab4cf103839b7f6
@@ -1 +0,0 @@
1
- 9211bc6ae1cb6ca9bae211e99fdfecb0870b0e5dfc1bf31d50552e794cc02abf
@@ -1 +0,0 @@
1
- 250717c1fdfaad128b302fc4d7ce975d8cb26444b84ebb91de16d911d91cef07f40632026edc6fe3653c5ebbb621a90e35c1749b301b9e70961f72428265ae4e
@@ -1 +0,0 @@
1
- 2aa19c59ef78a58437075381e54f80196277f198
@@ -1 +0,0 @@
1
- 190fae0bf2c5e0e704aff6203b831db1bb670bb9d12db1d93e2c382a1aaca0a6
@@ -1 +0,0 @@
1
- b1e6707e0766bbcc90144b50abbb05f9dc5bd5c29bda43a4ba32924d7c930425a8c173d500f1ac3d9b1a3d3ad8fb4667fd848ec1ab58bc9ed4d26bbbb7ca7ee7