@expo/ui 58.0.25 → 58.0.26
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 +9 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +50 -0
- package/android/src/main/java/expo/modules/ui/SplitButtonLayoutView.kt +94 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuGroup.kt +36 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +27 -8
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuPopup.kt +28 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +13 -0
- package/android/src/main/java/expo/modules/ui/menu/SelectableDropdownMenuItem.kt +93 -0
- package/build/community/datetime-picker/DateTimePicker.android.js +1 -0
- package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +2 -2
- package/build/jetpack-compose/DatePicker/index.js +1 -1
- package/build/jetpack-compose/DatePicker/index.js.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +10 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js +12 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js.map +1 -1
- package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.d.ts +89 -0
- package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js +80 -0
- package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js.map +1 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts +91 -0
- package/build/jetpack-compose/DropdownMenu/index.js +33 -0
- package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
- package/build/jetpack-compose/SplitButtonLayout/index.d.ts +102 -0
- package/build/jetpack-compose/SplitButtonLayout/index.js +68 -0
- package/build/jetpack-compose/SplitButtonLayout/index.js.map +1 -0
- package/build/jetpack-compose/index.d.ts +1 -0
- package/build/jetpack-compose/index.js +1 -0
- package/build/jetpack-compose/index.js.map +1 -1
- package/build/universal/TextInput/index.android.d.ts +1 -1
- package/build/universal/TextInput/index.android.js +7 -2
- package/build/universal/TextInput/index.android.js.map +1 -1
- package/build/universal/TextInput/index.d.ts +1 -1
- package/build/universal/TextInput/index.ios.d.ts +1 -1
- package/build/universal/TextInput/index.ios.js +3 -2
- package/build/universal/TextInput/index.ios.js.map +1 -1
- package/build/universal/TextInput/index.js +2 -1
- package/build/universal/TextInput/index.js.map +1 -1
- package/build/universal/TextInput/types.d.ts +4 -0
- package/build/universal/TextInput/types.js.map +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25-sources.jar → 58.0.26/expo.modules.ui-58.0.26-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25.module → 58.0.26/expo.modules.ui-58.0.26.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25.pom → 58.0.26/expo.modules.ui-58.0.26.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha512 +1 -0
- package/package.json +1 -1
- package/src/community/datetime-picker/DateTimePicker.android.tsx +2 -1
- package/src/jetpack-compose/DatePicker/index.tsx +4 -4
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +18 -0
- package/src/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.tsx +149 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +147 -0
- package/src/jetpack-compose/SplitButtonLayout/index.tsx +182 -0
- package/src/jetpack-compose/index.ts +1 -0
- package/src/universal/TextInput/index.android.tsx +7 -1
- package/src/universal/TextInput/index.ios.tsx +3 -0
- package/src/universal/TextInput/index.tsx +2 -0
- package/src/universal/TextInput/types.ts +5 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha512 +0 -1
|
@@ -11,6 +11,16 @@ const MenuNativeView: React.ComponentType<NativeMenuProps> = requireNativeView(
|
|
|
11
11
|
'DropdownMenuView'
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
+
const MenuPopupNativeView: React.ComponentType<NativeMenuPopupProps> = requireNativeView(
|
|
15
|
+
'ExpoUI',
|
|
16
|
+
'DropdownMenuPopupView'
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const MenuGroupNativeView: React.ComponentType<DropdownMenuGroupProps> = requireNativeView(
|
|
20
|
+
'ExpoUI',
|
|
21
|
+
'DropdownMenuGroupView'
|
|
22
|
+
);
|
|
23
|
+
|
|
14
24
|
// TODO: Extract into separate SlotView similar to swift-ui
|
|
15
25
|
const SlotNativeView: React.ComponentType<{
|
|
16
26
|
slotName: string;
|
|
@@ -89,6 +99,99 @@ type NativeMenuProps = {
|
|
|
89
99
|
children?: ReactNode;
|
|
90
100
|
};
|
|
91
101
|
|
|
102
|
+
/**
|
|
103
|
+
* The position of a group in a `DropdownMenuPopup`, or of an item in a group.
|
|
104
|
+
* Compose's `MenuDefaults.groupShape(index, count)` and `MenuDefaults.itemShape(index, count)` use
|
|
105
|
+
* it to round the outer corners of the first and last element.
|
|
106
|
+
*/
|
|
107
|
+
export type MenuShapePosition = {
|
|
108
|
+
/**
|
|
109
|
+
* The index of the group in the menu, or of the item in its group.
|
|
110
|
+
*/
|
|
111
|
+
index: number;
|
|
112
|
+
/**
|
|
113
|
+
* The number of groups in the menu, or of items in the group.
|
|
114
|
+
*/
|
|
115
|
+
count: number;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Props of the `DropdownMenuPopup` component.
|
|
120
|
+
*/
|
|
121
|
+
export interface DropdownMenuPopupProps {
|
|
122
|
+
/**
|
|
123
|
+
* The contents of the menu, typically `DropdownMenuGroup` components.
|
|
124
|
+
*/
|
|
125
|
+
children: ReactNode;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Whether the menu is expanded (visible).
|
|
129
|
+
*/
|
|
130
|
+
expanded?: boolean;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Callback fired when the menu requests to be dismissed (for example, tapping outside).
|
|
134
|
+
* Must be provided when `expanded` is `true` to allow the menu to close.
|
|
135
|
+
*/
|
|
136
|
+
onDismissRequest?: () => void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Properties for the popup window of the menu.
|
|
140
|
+
*/
|
|
141
|
+
properties?: PopupProperties;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Modifiers for the contents of the menu.
|
|
145
|
+
*/
|
|
146
|
+
modifiers?: ModifierConfig[];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type NativeMenuPopupProps = {
|
|
150
|
+
expanded?: boolean;
|
|
151
|
+
onDismissRequest?: () => void;
|
|
152
|
+
properties?: PopupProperties;
|
|
153
|
+
modifiers?: ModifierConfig[];
|
|
154
|
+
children?: ReactNode;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Props of the `DropdownMenuGroup` component.
|
|
159
|
+
*/
|
|
160
|
+
export interface DropdownMenuGroupProps {
|
|
161
|
+
/**
|
|
162
|
+
* The contents of the group, typically `DropdownMenuItem` or `SelectableDropdownMenuItem`
|
|
163
|
+
* components.
|
|
164
|
+
*/
|
|
165
|
+
children: ReactNode;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The position of the group in the menu, which sets its shape through Compose's
|
|
169
|
+
* `MenuDefaults.groupShape(index, count)`. Defaults to `MenuDefaults.groupShapes()`, the shape
|
|
170
|
+
* of a single group.
|
|
171
|
+
*/
|
|
172
|
+
shapes?: MenuShapePosition;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The container color of the group. Defaults to `MenuDefaults.groupStandardContainerColor`.
|
|
176
|
+
*/
|
|
177
|
+
containerColor?: ColorValue;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Tonal elevation of the group in dp. Defaults to `MenuDefaults.TonalElevation`.
|
|
181
|
+
*/
|
|
182
|
+
tonalElevation?: number;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Shadow elevation of the group in dp. Defaults to `MenuDefaults.ShadowElevation`.
|
|
186
|
+
*/
|
|
187
|
+
shadowElevation?: number;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Modifiers for the component.
|
|
191
|
+
*/
|
|
192
|
+
modifiers?: ModifierConfig[];
|
|
193
|
+
}
|
|
194
|
+
|
|
92
195
|
/**
|
|
93
196
|
* Container for items displayed in the dropdown menu.
|
|
94
197
|
* Children should be `DropdownMenuItem` components or other native views.
|
|
@@ -136,7 +239,51 @@ DropdownMenu.Preview = Preview;
|
|
|
136
239
|
DropdownMenu.Items = Items;
|
|
137
240
|
|
|
138
241
|
export { DropdownMenu };
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* A Material 3 Expressive menu that wraps Compose's `DropdownMenuPopup`. The menu anchors to its
|
|
245
|
+
* parent, so it goes in a `Box` next to the component that opens it. Unlike `DropdownMenu`, it
|
|
246
|
+
* has no container. It holds `DropdownMenuGroup` components, with a `Spacer` between the groups.
|
|
247
|
+
*
|
|
248
|
+
* @platform android
|
|
249
|
+
*/
|
|
250
|
+
export function DropdownMenuPopup(props: DropdownMenuPopupProps) {
|
|
251
|
+
const { modifiers, children, ...restProps } = props;
|
|
252
|
+
return (
|
|
253
|
+
<MenuPopupNativeView
|
|
254
|
+
modifiers={modifiers}
|
|
255
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
256
|
+
{...restProps}>
|
|
257
|
+
{/* The menu is a popup in its own window. The anchor stays in the React Native surface. */}
|
|
258
|
+
<PresentedContent>{children}</PresentedContent>
|
|
259
|
+
</MenuPopupNativeView>
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* A group of menu items that wraps Compose's `DropdownMenuGroup`, for use in a
|
|
265
|
+
* `DropdownMenuPopup`.
|
|
266
|
+
*
|
|
267
|
+
* @platform android
|
|
268
|
+
*/
|
|
269
|
+
export function DropdownMenuGroup(props: DropdownMenuGroupProps) {
|
|
270
|
+
const { modifiers, ...restProps } = props;
|
|
271
|
+
return (
|
|
272
|
+
<MenuGroupNativeView
|
|
273
|
+
modifiers={modifiers}
|
|
274
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
275
|
+
{...restProps}
|
|
276
|
+
/>
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
139
280
|
export { DropdownMenuItem } from './DropdownMenuItem';
|
|
281
|
+
export type { DropdownMenuItemProps, DropdownMenuItemElementColors } from './DropdownMenuItem';
|
|
282
|
+
export { SelectableDropdownMenuItem } from './SelectableDropdownMenuItem';
|
|
283
|
+
export type {
|
|
284
|
+
SelectableDropdownMenuItemProps,
|
|
285
|
+
SelectableDropdownMenuItemColors,
|
|
286
|
+
} from './SelectableDropdownMenuItem';
|
|
140
287
|
|
|
141
288
|
// Re-exported so the docs generator includes PopupProperties on the DropdownMenu API page.
|
|
142
289
|
export type { PopupProperties };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
|
|
3
|
+
import type { ModifierConfig, ViewEvent } from '../../types';
|
|
4
|
+
import type { ButtonColors } from '../Button';
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
|
+
|
|
7
|
+
export type { ButtonColors };
|
|
8
|
+
|
|
9
|
+
export interface SplitButtonLayoutProps {
|
|
10
|
+
/**
|
|
11
|
+
* The space between the leading and trailing buttons, in dp.
|
|
12
|
+
* @default SplitButtonDefaults.Spacing
|
|
13
|
+
*/
|
|
14
|
+
spacing?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Modifiers for the component.
|
|
17
|
+
*/
|
|
18
|
+
modifiers?: ModifierConfig[];
|
|
19
|
+
/**
|
|
20
|
+
* The `SplitButtonLayout.LeadingButton` and `SplitButtonLayout.TrailingButton` slots.
|
|
21
|
+
*/
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type SlotProps = {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export interface SplitButtonLeadingButtonProps {
|
|
30
|
+
/**
|
|
31
|
+
* Callback that is called when the leading button is clicked.
|
|
32
|
+
*/
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the button is enabled for user interaction.
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Colors for the button. Unset colors use `ButtonDefaults.buttonColors()`.
|
|
41
|
+
*/
|
|
42
|
+
colors?: ButtonColors;
|
|
43
|
+
/**
|
|
44
|
+
* Modifiers for the component.
|
|
45
|
+
*/
|
|
46
|
+
modifiers?: ModifierConfig[];
|
|
47
|
+
/**
|
|
48
|
+
* Content to display inside the button.
|
|
49
|
+
*/
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SplitButtonTrailingButtonProps {
|
|
54
|
+
/**
|
|
55
|
+
* Whether the trailing button is checked. This usually matches the menu's `expanded` state.
|
|
56
|
+
*/
|
|
57
|
+
checked: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Callback that is called with the new checked state when the button is clicked.
|
|
60
|
+
*/
|
|
61
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the button is enabled for user interaction.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Colors for the button. Unset colors use `ButtonDefaults.buttonColors()`.
|
|
69
|
+
*/
|
|
70
|
+
colors?: ButtonColors;
|
|
71
|
+
/**
|
|
72
|
+
* Modifiers for the component.
|
|
73
|
+
*/
|
|
74
|
+
modifiers?: ModifierConfig[];
|
|
75
|
+
/**
|
|
76
|
+
* Content to display inside the button, usually an icon.
|
|
77
|
+
*/
|
|
78
|
+
children: React.ReactNode;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
type NativeSplitButtonLeadingButtonProps = Omit<SplitButtonLeadingButtonProps, 'onClick'> &
|
|
82
|
+
ViewEvent<'onButtonPressed', void>;
|
|
83
|
+
|
|
84
|
+
type NativeSplitButtonTrailingButtonProps = Omit<
|
|
85
|
+
SplitButtonTrailingButtonProps,
|
|
86
|
+
'onCheckedChange'
|
|
87
|
+
> &
|
|
88
|
+
ViewEvent<'onCheckedChange', { checked: boolean }>;
|
|
89
|
+
|
|
90
|
+
type NativeSlotViewProps = {
|
|
91
|
+
slotName: string;
|
|
92
|
+
children: React.ReactNode;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const SplitButtonLayoutNativeView: React.ComponentType<SplitButtonLayoutProps> = requireNativeView(
|
|
96
|
+
'ExpoUI',
|
|
97
|
+
'SplitButtonLayoutView'
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const SplitButtonLeadingButtonNativeView: React.ComponentType<NativeSplitButtonLeadingButtonProps> =
|
|
101
|
+
requireNativeView('ExpoUI', 'SplitButtonLeadingButtonView');
|
|
102
|
+
|
|
103
|
+
const SplitButtonTrailingButtonNativeView: React.ComponentType<NativeSplitButtonTrailingButtonProps> =
|
|
104
|
+
requireNativeView('ExpoUI', 'SplitButtonTrailingButtonView');
|
|
105
|
+
|
|
106
|
+
const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
|
|
107
|
+
'ExpoUI',
|
|
108
|
+
'SlotView'
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The leading button of a split button, which runs the primary action.
|
|
113
|
+
* Goes in the `SplitButtonLayout.LeadingButton` slot.
|
|
114
|
+
* Wraps `SplitButtonDefaults.LeadingButton`.
|
|
115
|
+
*/
|
|
116
|
+
function SplitButtonLeadingButton(props: SplitButtonLeadingButtonProps) {
|
|
117
|
+
const { onClick, modifiers, ...restProps } = props;
|
|
118
|
+
return (
|
|
119
|
+
<SplitButtonLeadingButtonNativeView
|
|
120
|
+
modifiers={modifiers}
|
|
121
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
122
|
+
{...restProps}
|
|
123
|
+
enabled={props.enabled ?? true}
|
|
124
|
+
onButtonPressed={onClick ? () => onClick() : undefined}
|
|
125
|
+
/>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The trailing button of a split button, which usually opens a `DropdownMenu` of related actions.
|
|
131
|
+
* Goes in the `SplitButtonLayout.TrailingButton` slot.
|
|
132
|
+
* Wraps `SplitButtonDefaults.TrailingButton`.
|
|
133
|
+
*/
|
|
134
|
+
function SplitButtonTrailingButton(props: SplitButtonTrailingButtonProps) {
|
|
135
|
+
const { onCheckedChange, modifiers, ...restProps } = props;
|
|
136
|
+
return (
|
|
137
|
+
<SplitButtonTrailingButtonNativeView
|
|
138
|
+
modifiers={modifiers}
|
|
139
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
140
|
+
{...restProps}
|
|
141
|
+
enabled={props.enabled ?? true}
|
|
142
|
+
onCheckedChange={
|
|
143
|
+
onCheckedChange ? ({ nativeEvent: { checked } }) => onCheckedChange(checked) : undefined
|
|
144
|
+
}
|
|
145
|
+
/>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Leading button slot for `SplitButtonLayout`. Usually holds a `SplitButtonLeadingButton`.
|
|
151
|
+
*/
|
|
152
|
+
function SplitButtonLayoutLeadingButton(props: SlotProps) {
|
|
153
|
+
return <SlotNativeView slotName="leadingButton">{props.children}</SlotNativeView>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Trailing button slot for `SplitButtonLayout`. Usually holds a `SplitButtonTrailingButton`,
|
|
158
|
+
* or a `DropdownMenu` whose trigger is a `SplitButtonTrailingButton`.
|
|
159
|
+
*/
|
|
160
|
+
function SplitButtonLayoutTrailingButton(props: SlotProps) {
|
|
161
|
+
return <SlotNativeView slotName="trailingButton">{props.children}</SlotNativeView>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A Material 3 split button layout: a leading button for the primary action and a trailing button,
|
|
166
|
+
* usually for a menu of related actions. Both buttons take the same height.
|
|
167
|
+
*/
|
|
168
|
+
function SplitButtonLayout(props: SplitButtonLayoutProps) {
|
|
169
|
+
const { modifiers, ...restProps } = props;
|
|
170
|
+
return (
|
|
171
|
+
<SplitButtonLayoutNativeView
|
|
172
|
+
modifiers={modifiers}
|
|
173
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
174
|
+
{...restProps}
|
|
175
|
+
/>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
SplitButtonLayout.LeadingButton = SplitButtonLayoutLeadingButton;
|
|
180
|
+
SplitButtonLayout.TrailingButton = SplitButtonLayoutTrailingButton;
|
|
181
|
+
|
|
182
|
+
export { SplitButtonLayout, SplitButtonLeadingButton, SplitButtonTrailingButton };
|
|
@@ -70,6 +70,7 @@ export function TextInput({
|
|
|
70
70
|
value,
|
|
71
71
|
onChangeText,
|
|
72
72
|
placeholder,
|
|
73
|
+
accessibilityLabel,
|
|
73
74
|
autoFocus,
|
|
74
75
|
editable: editableProp,
|
|
75
76
|
multiline,
|
|
@@ -218,7 +219,12 @@ export function TextInput({
|
|
|
218
219
|
onSelectionChange={onSelectionChange}>
|
|
219
220
|
<BasicTextField.DecorationBox>
|
|
220
221
|
<Box
|
|
221
|
-
modifiers={[
|
|
222
|
+
modifiers={[
|
|
223
|
+
fillMaxWidth(),
|
|
224
|
+
...(accessibilityLabel !== undefined
|
|
225
|
+
? [semantics({ contentDescription: accessibilityLabel })]
|
|
226
|
+
: []),
|
|
227
|
+
]}
|
|
222
228
|
contentAlignment={
|
|
223
229
|
textAlign === 'center' ? 'topCenter' : textAlign === 'right' ? 'topEnd' : undefined
|
|
224
230
|
}>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
useNativeState,
|
|
8
8
|
} from '@expo/ui/swift-ui';
|
|
9
9
|
import {
|
|
10
|
+
accessibilityLabel as accessibilityLabelMod,
|
|
10
11
|
autocorrectionDisabled,
|
|
11
12
|
disabled as disabledMod,
|
|
12
13
|
foregroundStyle,
|
|
@@ -61,6 +62,7 @@ export function TextInput({
|
|
|
61
62
|
value,
|
|
62
63
|
onChangeText,
|
|
63
64
|
placeholder,
|
|
65
|
+
accessibilityLabel,
|
|
64
66
|
autoFocus,
|
|
65
67
|
editable: editableProp,
|
|
66
68
|
multiline,
|
|
@@ -151,6 +153,7 @@ export function TextInput({
|
|
|
151
153
|
...(userModifiers ?? []),
|
|
152
154
|
...transformToModifiers(style, {}, undefined, { componentName: 'TextInput', textStyle }),
|
|
153
155
|
];
|
|
156
|
+
if (accessibilityLabel !== undefined) modifiers.push(accessibilityLabelMod(accessibilityLabel));
|
|
154
157
|
if (editable === false) modifiers.push(disabledMod(true));
|
|
155
158
|
if (keyboardType) modifiers.push(keyboardTypeMod(mapKeyboardType(keyboardType)));
|
|
156
159
|
if (autoCapitalize) {
|
|
@@ -41,6 +41,7 @@ export function TextInput({
|
|
|
41
41
|
value,
|
|
42
42
|
onChangeText,
|
|
43
43
|
placeholder,
|
|
44
|
+
accessibilityLabel,
|
|
44
45
|
autoFocus,
|
|
45
46
|
editable,
|
|
46
47
|
multiline,
|
|
@@ -107,6 +108,7 @@ export function TextInput({
|
|
|
107
108
|
ref={innerRef}
|
|
108
109
|
value={state.value}
|
|
109
110
|
placeholder={placeholder}
|
|
111
|
+
accessibilityLabel={accessibilityLabel}
|
|
110
112
|
placeholderTextColor={placeholderTextColor ?? colors.gray[500]}
|
|
111
113
|
autoFocus={autoFocus}
|
|
112
114
|
editable={editable}
|
|
@@ -52,6 +52,11 @@ export interface TextInputProps {
|
|
|
52
52
|
*/
|
|
53
53
|
placeholder?: string;
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Label announced by screen readers, including when the field contains text.
|
|
57
|
+
*/
|
|
58
|
+
accessibilityLabel?: string;
|
|
59
|
+
|
|
55
60
|
/**
|
|
56
61
|
* If true, focuses the input on mount.
|
|
57
62
|
* @default false
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c817ba0333b967a239df3a6777bd57ff
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9e68c38ef193df41a3c083158aa103c674511b71
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1f04b317f757dbed2ba12650ac539706c6a5d9a7a05cc6c004f4b0d752482ca4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7067f7aabef1e8872cc798d93f8b8bc1736f678f3668d7eb4c13af5cb301454b1bcd184f3d2f8e54e73ad5638956b3e517955166551e94fe5e74ee25c6e7c703
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
92b25ba3977597adf5cb9f0393240678
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
955a5ea0689652fd52f312a16936c39cdd9a8f98
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
00fa5f80250a7641944241a74f1dc39b
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
87f148a603920eca9955ff39ccefa283932f9627
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ee1ce6b5958aede97efbd68fd62f0db816860f9f76d6c809f629f382db9d65ed
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6f8dc44b2cd482c1321242e46eb30c4c02da5472ffd5d983492e482c134fdf3752dcc008612453e40e377588627e9b8ae8f3072d0658739351c1d6cb562eafe9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c212440e0d06cd25147b57f6bbae003f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3780297b6c6f103af3449a71798de47b6558698c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b78be19358302cd52bce296b7aa89c6a34b6e2624dbc9e42904d41389a17fb80
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8a9735eae90ae90c91881c8a28a3beae4b787ec44c2a4fb4f8cc9801f472d985aed0c2bb2f7f47dce024a1c8dfd39ae7282d66bdefaf675d1ed995c5d045cddc
|