@expo/ui 1.0.0-canary-20250306-d9d3e02 → 1.0.0-canary-20250331-817737a
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 +7 -0
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +4 -0
- package/android/src/main/java/expo/modules/ui/PickerView.kt +3 -0
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +75 -0
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +7 -3
- package/build/components/BottomSheet/index.d.ts +9 -0
- package/build/components/BottomSheet/index.d.ts.map +1 -0
- package/build/components/BottomSheet/index.ios.d.ts +11 -0
- package/build/components/BottomSheet/index.ios.d.ts.map +1 -0
- package/build/components/Button/index.d.ts +1 -1
- package/build/components/ContextMenu/index.android.d.ts +23 -0
- package/build/components/ContextMenu/index.android.d.ts.map +1 -0
- package/build/components/ContextMenu/index.d.ts +54 -20
- package/build/components/ContextMenu/index.d.ts.map +1 -1
- package/build/components/DatePicker/index.d.ts +6 -6
- package/build/components/Label/index.d.ts +28 -0
- package/build/components/Label/index.d.ts.map +1 -0
- package/build/components/Label/index.ios.d.ts +10 -0
- package/build/components/Label/index.ios.d.ts.map +1 -0
- package/build/components/List/index.d.ts +87 -0
- package/build/components/List/index.d.ts.map +1 -0
- package/build/components/List/index.ios.d.ts +9 -0
- package/build/components/List/index.ios.d.ts.map +1 -0
- package/build/components/Picker/index.d.ts +8 -5
- package/build/components/Picker/index.d.ts.map +1 -1
- package/build/components/Progress/index.d.ts +1 -1
- package/build/components/Section/index.d.ts +10 -2
- package/build/components/Section/index.d.ts.map +1 -1
- package/build/components/Slider/index.d.ts +5 -2
- package/build/components/Slider/index.d.ts.map +1 -1
- package/build/components/Switch/index.d.ts +18 -36
- package/build/components/Switch/index.d.ts.map +1 -1
- package/build/components/TextInput/index.d.ts +24 -1
- package/build/components/TextInput/index.d.ts.map +1 -1
- package/build/src/types.d.ts +4 -2
- package/build/src/types.d.ts.map +1 -1
- package/components/BottomSheet/index.ios.tsx +34 -0
- package/components/BottomSheet/index.tsx +12 -0
- package/components/Button/index.tsx +1 -1
- package/components/ContextMenu/index.android.tsx +72 -0
- package/components/ContextMenu/index.tsx +67 -33
- package/components/DatePicker/index.tsx +6 -6
- package/components/Label/index.ios.tsx +16 -0
- package/components/Label/index.tsx +34 -0
- package/components/List/index.ios.tsx +35 -0
- package/components/List/index.tsx +99 -0
- package/components/Picker/index.tsx +8 -5
- package/components/Progress/index.tsx +1 -1
- package/components/Section/index.tsx +10 -2
- package/components/Slider/index.tsx +5 -2
- package/components/Switch/index.tsx +37 -54
- package/components/TextInput/index.tsx +30 -3
- package/ios/BottomSheetView.swift +82 -0
- package/ios/ContextMenu/ContextMenu.swift +65 -2
- package/ios/ContextMenu/ContextMenuRecords.swift +6 -0
- package/ios/ExpoUIModule.swift +5 -0
- package/ios/Label.swift +24 -0
- package/ios/List.swift +122 -0
- package/ios/PickerView.swift +32 -27
- package/ios/SectionView.swift +1 -1
- package/package.json +3 -4
- package/src/types.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
### 🎉 New features
|
|
10
10
|
|
|
11
|
+
- [iOS] Add bottom sheet. ([#35455](https://github.com/expo/expo/pull/35455) by [@aleqsio](https://github.com/aleqsio))
|
|
12
|
+
- [iOS] Add support for `pallete` and `inline` pickers. ([#35435](https://github.com/expo/expo/pull/35435) by [@aleqsio](https://github.com/aleqsio))
|
|
13
|
+
- Add TextInput for Android. ([#35228](https://github.com/expo/expo/pull/35228) by [@aleqsio](https://github.com/aleqsio))
|
|
14
|
+
- Add context menu previews. ([#35369](https://github.com/expo/expo/pull/35369) by [@aleqsio](https://github.com/aleqsio)).
|
|
11
15
|
- Add TextInput for iOS. ([#35098](https://github.com/expo/expo/pull/35098) by [@aleqsio](https://github.com/aleqsio))
|
|
12
16
|
- Add `disabled` button prop. ([#35115](https://github.com/expo/expo/pull/35115) by [@andrew-levy](https://github.com/andrew-levy))
|
|
13
17
|
- Add Radio option to Picker Component for Android. ([#34629](https://github.com/expo/expo/pull/34629)) by [@benjaminkomen](https://github.com/benjaminkomen)
|
|
@@ -15,6 +19,7 @@
|
|
|
15
19
|
- Adds `DateTimePicker` component. ([#34883](https://github.com/expo/expo/pull/34883) by [@alanjhughes](https://github.com/alanjhughes))
|
|
16
20
|
- Add CircularProgress and LinearProgress component. ([#34907](https://github.com/expo/expo/pull/34907) by [@janicduplessis](https://github.com/janicduplessis))
|
|
17
21
|
- Add Gauge component ([#35032](https://github.com/expo/expo/pull/35032) by [@jakex7](https://github.com/jakex7))
|
|
22
|
+
- Add List and Label component ([#35222](https://github.com/expo/expo/pull/35222) by [@Pflaumenbaum](https://github.com/Pflaumenbaum))
|
|
18
23
|
|
|
19
24
|
### 🐛 Bug fixes
|
|
20
25
|
|
|
@@ -24,6 +29,7 @@
|
|
|
24
29
|
|
|
25
30
|
- Drop section polyfill for Android ([#35305](https://github.com/expo/expo/pull/35305) by [@aleqsio](https://github.com/aleqsio))
|
|
26
31
|
- Standardize platform key ordering in `expo-module.config.json`. ([#35003](https://github.com/expo/expo/pull/35003) by [@reichhartd](https://github.com/reichhartd))
|
|
32
|
+
- Dismiss context menu when a menu item is tapped on Android ([#35365](https://github.com/expo/expo/pull/35365) by [@fobos531](https://github.com/fobos531))
|
|
27
33
|
|
|
28
34
|
## 0.0.2 — 2025-02-11
|
|
29
35
|
|
|
@@ -48,6 +54,7 @@
|
|
|
48
54
|
- Add docs ([#34808](https://github.com/expo/expo/pull/34808) by [@aleqsio](https://github.com/aleqsio))
|
|
49
55
|
- [apple] Migrate remaining `expo-module.config.json` to unified platform syntax. ([#34445](https://github.com/expo/expo/pull/34445) by [@reichhartd](https://github.com/reichhartd))
|
|
50
56
|
- Rename the events for the `Switch` component. ([#34577](https://github.com/expo/expo/pull/34577) by [@behenate](https://github.com/behenate))
|
|
57
|
+
- Allow lower case section titles ([#35113](https://github.com/expo/expo/pull/35113) by [@Pflaumenbaum](https://github.com/Pflaumenbaum))
|
|
51
58
|
|
|
52
59
|
## 0.0.1 — 2025-01-21
|
|
53
60
|
|
|
@@ -161,6 +161,9 @@ class PickerView(context: Context, appContext: AppContext) : ExpoComposeView<Pic
|
|
|
161
161
|
SegmentedComposable()
|
|
162
162
|
} else if (variant == "radio") {
|
|
163
163
|
RadioComposable()
|
|
164
|
+
} else {
|
|
165
|
+
// Default to segmented picker
|
|
166
|
+
SegmentedComposable()
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
package expo.modules.ui
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import androidx.compose.foundation.text.KeyboardOptions
|
|
5
|
+
|
|
6
|
+
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
7
|
+
import expo.modules.kotlin.views.ExpoComposeView
|
|
8
|
+
|
|
9
|
+
import androidx.compose.material3.Text
|
|
10
|
+
import androidx.compose.material3.TextField
|
|
11
|
+
import androidx.compose.runtime.MutableState
|
|
12
|
+
import androidx.compose.runtime.mutableStateOf
|
|
13
|
+
|
|
14
|
+
import expo.modules.kotlin.AppContext
|
|
15
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
16
|
+
|
|
17
|
+
import androidx.compose.runtime.getValue
|
|
18
|
+
import androidx.compose.runtime.remember
|
|
19
|
+
import androidx.compose.runtime.setValue
|
|
20
|
+
import androidx.compose.ui.text.input.KeyboardType
|
|
21
|
+
import expo.modules.kotlin.views.AutoSizingComposable
|
|
22
|
+
import expo.modules.kotlin.views.Direction
|
|
23
|
+
import java.util.EnumSet
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
data class TextInputProps(
|
|
27
|
+
val defaultValue: MutableState<String> = mutableStateOf(""),
|
|
28
|
+
val placeholder: MutableState<String> = mutableStateOf(""),
|
|
29
|
+
val multiline: MutableState<Boolean> = mutableStateOf(false),
|
|
30
|
+
val numberOfLines: MutableState<Int?> = mutableStateOf(null),
|
|
31
|
+
val keyboardType: MutableState<String> = mutableStateOf("default"),
|
|
32
|
+
val autocorrection: MutableState<Boolean> = mutableStateOf(true),
|
|
33
|
+
) : ComposeProps
|
|
34
|
+
|
|
35
|
+
fun String.keyboardType(): KeyboardType {
|
|
36
|
+
return when (this) {
|
|
37
|
+
"default" -> KeyboardType.Text
|
|
38
|
+
"numeric" -> KeyboardType.Number
|
|
39
|
+
"email-address" -> KeyboardType.Email
|
|
40
|
+
"phone-pad" -> KeyboardType.Phone
|
|
41
|
+
"decimal-pad" -> KeyboardType.Decimal
|
|
42
|
+
"password" -> KeyboardType.Password
|
|
43
|
+
"ascii-capable" -> KeyboardType.Ascii
|
|
44
|
+
"url" -> KeyboardType.Uri
|
|
45
|
+
"number-password" -> KeyboardType.NumberPassword
|
|
46
|
+
else -> KeyboardType.Text
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class TextInputView(context: Context, appContext: AppContext) : ExpoComposeView<TextInputProps>(context, appContext) {
|
|
51
|
+
override val props = TextInputProps()
|
|
52
|
+
private val onValueChanged by EventDispatcher()
|
|
53
|
+
|
|
54
|
+
init {
|
|
55
|
+
setContent {
|
|
56
|
+
var value by remember { props.defaultValue }
|
|
57
|
+
AutoSizingComposable(shadowNodeProxy, axis = EnumSet.of(Direction.VERTICAL)) {
|
|
58
|
+
TextField(
|
|
59
|
+
value = value,
|
|
60
|
+
onValueChange = {
|
|
61
|
+
value = it
|
|
62
|
+
onValueChanged(mapOf("value" to it))
|
|
63
|
+
},
|
|
64
|
+
placeholder = { Text(props.placeholder.value) },
|
|
65
|
+
maxLines = if (props.multiline.value) props.numberOfLines.value ?: Int.MAX_VALUE else 1,
|
|
66
|
+
singleLine = !props.multiline.value,
|
|
67
|
+
keyboardOptions = KeyboardOptions.Default.copy(
|
|
68
|
+
keyboardType = props.keyboardType.value.keyboardType(),
|
|
69
|
+
autoCorrectEnabled = props.autocorrection.value,
|
|
70
|
+
),
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -20,6 +20,7 @@ import expo.modules.kotlin.views.ExpoComposeView
|
|
|
20
20
|
import androidx.compose.material3.Text
|
|
21
21
|
import androidx.compose.runtime.Composable
|
|
22
22
|
import androidx.compose.runtime.getValue
|
|
23
|
+
import androidx.compose.runtime.MutableState
|
|
23
24
|
import androidx.compose.runtime.mutableStateOf
|
|
24
25
|
import androidx.compose.runtime.remember
|
|
25
26
|
import androidx.compose.ui.unit.dp
|
|
@@ -47,7 +48,7 @@ private fun SectionTitle(text: String) {
|
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
@Composable
|
|
50
|
-
fun FlatMenu(elements: Array<ContextMenuElement>, sectionTitle: String?, dispatchers: ContextMenuDispatchers) {
|
|
51
|
+
fun FlatMenu(elements: Array<ContextMenuElement>, sectionTitle: String?, dispatchers: ContextMenuDispatchers, expanded: MutableState<Boolean>) {
|
|
51
52
|
sectionTitle?.takeIf { !it.isEmpty() }?.let {
|
|
52
53
|
SectionTitle(it)
|
|
53
54
|
}
|
|
@@ -68,6 +69,7 @@ fun FlatMenu(elements: Array<ContextMenuElement>, sectionTitle: String?, dispatc
|
|
|
68
69
|
text = { Text(it.text) },
|
|
69
70
|
onClick = {
|
|
70
71
|
dispatchers.buttonPressed(ContextMenuButtonPressedEvent(id))
|
|
72
|
+
expanded.value = false
|
|
71
73
|
}
|
|
72
74
|
)
|
|
73
75
|
}
|
|
@@ -95,13 +97,14 @@ fun FlatMenu(elements: Array<ContextMenuElement>, sectionTitle: String?, dispatc
|
|
|
95
97
|
dispatchers.switchCheckedChanged(
|
|
96
98
|
ContextMenuSwitchValueChangeEvent(!it.value, id)
|
|
97
99
|
)
|
|
100
|
+
expanded.value = false
|
|
98
101
|
}
|
|
99
102
|
)
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
element.submenu?.let {
|
|
103
106
|
HorizontalDivider()
|
|
104
|
-
FlatMenu(it.elements, it.button.text, dispatchers)
|
|
107
|
+
FlatMenu(it.elements, it.button.text, dispatchers, expanded)
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
}
|
|
@@ -163,7 +166,8 @@ class ContextMenu(context: Context, appContext: AppContext) : ExpoComposeView<Co
|
|
|
163
166
|
dispatchers = ContextMenuDispatchers(
|
|
164
167
|
buttonPressed = onContextMenuButtonPressed,
|
|
165
168
|
switchCheckedChanged = onContextMenuSwitchValueChanged
|
|
166
|
-
)
|
|
169
|
+
),
|
|
170
|
+
expanded = expanded
|
|
167
171
|
)
|
|
168
172
|
}
|
|
169
173
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type BottomSheetProps = {
|
|
3
|
+
style?: StyleProp<ViewStyle>;
|
|
4
|
+
children: any;
|
|
5
|
+
isOpened: boolean;
|
|
6
|
+
onIsOpenedChange: (isOpened: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function BottomSheet({ children }: BottomSheetProps): any;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/BottomSheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,OAEzD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NativeSyntheticEvent } from 'react-native';
|
|
2
|
+
import { BottomSheetProps } from '.';
|
|
3
|
+
type NativeBottomSheetProps = Omit<BottomSheetProps, 'onIsOpenedChange'> & {
|
|
4
|
+
onIsOpenedChange: (event: NativeSyntheticEvent<{
|
|
5
|
+
isOpened: boolean;
|
|
6
|
+
}>) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function transformBottomSheetProps(props: BottomSheetProps): NativeBottomSheetProps;
|
|
9
|
+
export declare function BottomSheet(props: BottomSheetProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../../components/BottomSheet/index.ios.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,oBAAoB,EAAQ,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAErC,KAAK,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAG;IACzE,gBAAgB,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CAChF,CAAC;AAOF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,sBAAsB,CAOzF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAUlD"}
|
|
@@ -48,7 +48,7 @@ export type ButtonProps = {
|
|
|
48
48
|
onPress?: () => void;
|
|
49
49
|
/**
|
|
50
50
|
* A string describing the system image to display in the button.
|
|
51
|
-
* Uses
|
|
51
|
+
* Uses Material Icons on Android and SF Symbols on iOS.
|
|
52
52
|
*/
|
|
53
53
|
systemImage?: {
|
|
54
54
|
ios?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ContextMenuProps } from '.';
|
|
2
|
+
export declare function Submenu(): import("react").JSX.Element;
|
|
3
|
+
export declare function Items(): import("react").JSX.Element;
|
|
4
|
+
export declare namespace Items {
|
|
5
|
+
var tag: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Trigger(props: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare namespace Trigger {
|
|
11
|
+
var tag: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Preview(props: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
|
|
17
|
+
declare namespace ContextMenu {
|
|
18
|
+
var Trigger: typeof import("./index.android").Trigger;
|
|
19
|
+
var Preview: typeof import("./index.android").Preview;
|
|
20
|
+
var Items: typeof import("./index.android").Items;
|
|
21
|
+
}
|
|
22
|
+
export { ContextMenu };
|
|
23
|
+
//# sourceMappingURL=index.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.android.d.ts","sourceRoot":"","sources":["../../../components/ContextMenu/index.android.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAkC,MAAM,GAAG,CAAC;AAQrE,wBAAgB,OAAO,gCAEtB;AAED,wBAAgB,KAAK,gCAEpB;yBAFe,KAAK;;;AAKrB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;yBAFe,OAAO;;;AAKvB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAmC3C;kBAnCQ,WAAW;;;;;AAyCpB,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { MenuElement } from './utils';
|
|
3
4
|
import { ButtonProps } from '../Button';
|
|
4
5
|
import { PickerProps } from '../Picker';
|
|
5
6
|
import { SwitchProps } from '../Switch';
|
|
6
7
|
type SubmenuElement = ReactElement<ButtonProps> | ReactElement<SwitchProps> | ReactElement<PickerProps> | ReactElement<SubmenuProps>;
|
|
7
|
-
type ContentChildren = SubmenuElement | SubmenuElement[];
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
8
|
export type ContextMenuContentProps = {
|
|
12
|
-
children:
|
|
9
|
+
children: SubmenuElement | SubmenuElement[];
|
|
13
10
|
};
|
|
14
11
|
/**
|
|
15
12
|
* @hidden
|
|
16
13
|
*/
|
|
17
|
-
export type EventHandlers =
|
|
18
|
-
[key: string]: {
|
|
19
|
-
[key: string]: (event: NativeSyntheticEvent<any>) => void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
14
|
+
export type EventHandlers = Record<string, Record<string, (event: NativeSyntheticEvent<any>) => void>>;
|
|
22
15
|
/**
|
|
23
16
|
* @hidden
|
|
24
17
|
*/
|
|
@@ -35,12 +28,6 @@ export type ActivationMethod = 'singlePress' | 'longPress';
|
|
|
35
28
|
* Props of the `ContextMenu` component.
|
|
36
29
|
*/
|
|
37
30
|
export type ContextMenuProps = {
|
|
38
|
-
/**
|
|
39
|
-
* Items visible inside the context menu. The items should be wrapped in a `React.Fragment`.
|
|
40
|
-
* `Button`, `Switch` and `Submenu` components are supported on both Android and iOS.
|
|
41
|
-
* The `Picker` component is supported only on iOS. Remember to use components from the `@expo/ui` library.
|
|
42
|
-
*/
|
|
43
|
-
Items: React.ReactElement<ContextMenuContentProps>;
|
|
44
31
|
/**
|
|
45
32
|
* Determines how the context menu will be activated.
|
|
46
33
|
*
|
|
@@ -70,17 +57,59 @@ export type SubmenuProps = {
|
|
|
70
57
|
/**
|
|
71
58
|
* The button that will be used to expand the submenu. On Android the `text` prop of the `Button` will be used as a section title.
|
|
72
59
|
*/
|
|
73
|
-
button:
|
|
60
|
+
button: ReactElement<ButtonProps>;
|
|
74
61
|
/**
|
|
75
62
|
* Children of the submenu. Only `Button`, `Switch`, `Picker` and `Submenu` elements should be used.
|
|
76
63
|
*/
|
|
77
|
-
children:
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
export type NativeMenuProps = ContextMenuProps & {
|
|
70
|
+
elements: MenuElement[];
|
|
71
|
+
onContextMenuButtonPressed: (event: NativeSyntheticEvent<{
|
|
72
|
+
contextMenuElementID: string;
|
|
73
|
+
}>) => void;
|
|
74
|
+
onContextMenuSwitchValueChanged: (event: NativeSyntheticEvent<{
|
|
75
|
+
contextMenuElementID: string;
|
|
76
|
+
value: boolean;
|
|
77
|
+
}>) => void;
|
|
78
|
+
onContextMenuPickerOptionSelected: (event: NativeSyntheticEvent<{
|
|
79
|
+
index: number;
|
|
80
|
+
label: string;
|
|
81
|
+
contextMenuElementID: string;
|
|
82
|
+
}>) => void;
|
|
78
83
|
};
|
|
79
84
|
/**
|
|
80
85
|
* The `Submenu` component is used to create a nested context menu. Submenus can be infinitely nested.
|
|
81
86
|
* Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple titled sections.
|
|
82
87
|
*/
|
|
83
88
|
export declare function Submenu(props: SubmenuProps): import("react").JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* Items visible inside the context menu. Pass input components as immidiate children of the tag.
|
|
91
|
+
* `Button`, `Switch` and `Submenu` components are supported on both Android and iOS.
|
|
92
|
+
* The `Picker` component is supported only on iOS. Remember to use components from the `@expo/ui` library.
|
|
93
|
+
*/
|
|
94
|
+
export declare function Items(props: {
|
|
95
|
+
children: React.ReactNode;
|
|
96
|
+
}): import("react").JSX.Element;
|
|
97
|
+
export declare namespace Items {
|
|
98
|
+
var tag: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The component visible all the time that triggers the menu when tapped or long-pressed.
|
|
102
|
+
*/
|
|
103
|
+
export declare function Trigger(props: {
|
|
104
|
+
children: React.ReactNode;
|
|
105
|
+
}): import("react").JSX.Element;
|
|
106
|
+
/**
|
|
107
|
+
* The component visible above the menu when it is opened.
|
|
108
|
+
* @platform ios
|
|
109
|
+
*/
|
|
110
|
+
export declare function Preview(props: {
|
|
111
|
+
children: React.ReactNode;
|
|
112
|
+
}): import("react").JSX.Element;
|
|
84
113
|
/**
|
|
85
114
|
* `ContextMenu` allows you to create a context menu, which can be used to provide additional options to the user.
|
|
86
115
|
*
|
|
@@ -90,6 +119,11 @@ export declare function Submenu(props: SubmenuProps): import("react").JSX.Elemen
|
|
|
90
119
|
* - Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple sections. The `title` prop of the `Button`, which opens the submenu on iOS will be used as a section title.
|
|
91
120
|
* - Android does not support showing a `Picker` element in the context menu.
|
|
92
121
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
122
|
+
declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
|
|
123
|
+
declare namespace ContextMenu {
|
|
124
|
+
var Trigger: typeof import(".").Trigger;
|
|
125
|
+
var Preview: typeof import(".").Preview;
|
|
126
|
+
var Items: typeof import(".").Items;
|
|
127
|
+
}
|
|
128
|
+
export { ContextMenu };
|
|
95
129
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,SAA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
* The
|
|
11
|
+
* The initial date to display on the picker.
|
|
12
12
|
*/
|
|
13
13
|
initialDate?: string | null;
|
|
14
14
|
/**
|
|
15
15
|
* A title displayed on the picker on iOS.
|
|
16
|
-
* @platform
|
|
16
|
+
* @platform ios
|
|
17
17
|
*/
|
|
18
18
|
title?: string;
|
|
19
19
|
/**
|
|
@@ -22,7 +22,7 @@ export type DatePickerProps = {
|
|
|
22
22
|
onDateSelected?: (date: Date) => void;
|
|
23
23
|
/**
|
|
24
24
|
* The variant of the picker, which determines its appearance and behavior.
|
|
25
|
-
* @platform
|
|
25
|
+
* @platform ios
|
|
26
26
|
* @default 'automatic'
|
|
27
27
|
*/
|
|
28
28
|
iosVariant?: IOSVariant;
|
|
@@ -35,15 +35,15 @@ export type DatePickerProps = {
|
|
|
35
35
|
/**
|
|
36
36
|
* Show to button to toggle between variants on Android.
|
|
37
37
|
* @platform android
|
|
38
|
-
* @default
|
|
38
|
+
* @default true
|
|
39
39
|
*/
|
|
40
40
|
showVariantToggle?: boolean;
|
|
41
41
|
/**
|
|
42
42
|
* The components that the picker should display.
|
|
43
|
-
* On iOS, you can have a picker that selects both date and time.
|
|
44
43
|
* On Android, you can have a picker that selects just the date or just the time.
|
|
45
44
|
* `dateAndTime` is only available on iOS and will result in a date picker on Android.
|
|
46
|
-
*
|
|
45
|
+
* On iOS, you can have a picker that selects both date and time.
|
|
46
|
+
* @default 'date'
|
|
47
47
|
*/
|
|
48
48
|
displayedComponents?: DisplayedComponents;
|
|
49
49
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type LabelProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The title text to be displayed in the label.
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The name of the SFSymbol to be displayed in the label.
|
|
9
|
+
*/
|
|
10
|
+
systemImage?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The color of the label icon.
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Additional styles to apply to the label.
|
|
17
|
+
*/
|
|
18
|
+
style?: StyleProp<ViewStyle>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders a native label view, which could be used in a list or section.
|
|
22
|
+
*
|
|
23
|
+
* @param {LabelProps} props - The properties passed to the Label component.
|
|
24
|
+
* @returns {JSX.Element} The rendered native Label component.
|
|
25
|
+
* @platform ios
|
|
26
|
+
*/
|
|
27
|
+
export declare function Label(props: LabelProps): import("react").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Label/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAEtC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LabelProps } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a native label view, which could be used in a list or section.
|
|
4
|
+
*
|
|
5
|
+
* @param {LabelProps} props - The properties passed to the Label component.
|
|
6
|
+
* @returns {JSX.Element} The rendered native Label component.
|
|
7
|
+
* @platform ios
|
|
8
|
+
*/
|
|
9
|
+
export declare function Label(props: LabelProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../../components/Label/index.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAI/B;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAEtC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { ViewEvent } from '../../src/types';
|
|
3
|
+
export type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grouped' | 'sidebar';
|
|
4
|
+
export interface ListProps {
|
|
5
|
+
/**
|
|
6
|
+
* Custom style for the container wrapping the list.
|
|
7
|
+
*/
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
/**
|
|
10
|
+
* One of the predefined ListStyle types in SwiftUI.
|
|
11
|
+
* @default 'automatic'
|
|
12
|
+
*/
|
|
13
|
+
listStyle?: ListStyle;
|
|
14
|
+
/**
|
|
15
|
+
* Allows the selection of list items.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
selectEnabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Enables reordering of list items.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
moveEnabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Allows the deletion of list items.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
deleteEnabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the list scrollable.
|
|
31
|
+
* @default true
|
|
32
|
+
* @platform ios 16.0+
|
|
33
|
+
*/
|
|
34
|
+
scrollEnabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Enables SwiftUI edit mode.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
editModeEnabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The children elements to be rendered inside the list.
|
|
42
|
+
*/
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Callback triggered when an item is deleted from the list.
|
|
46
|
+
*/
|
|
47
|
+
onDeleteItem?: (index: number) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Callback triggered when an item is moved in the list.
|
|
50
|
+
*/
|
|
51
|
+
onMoveItem?: (from: number, to: number) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Callback triggered when the selection changes in a list.
|
|
54
|
+
*/
|
|
55
|
+
onSelectionChange?: (selection: number[]) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* DeleteItemEvent represents an event triggered when an item is deleted from the list.
|
|
59
|
+
*/
|
|
60
|
+
type DeleteItemEvent = ViewEvent<'onDeleteItem', {
|
|
61
|
+
index: number;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* MoveItemEvent represents an event triggered when an item is moved in the list.
|
|
65
|
+
*/
|
|
66
|
+
type MoveItemEvent = ViewEvent<'onMoveItem', {
|
|
67
|
+
from: number;
|
|
68
|
+
to: number;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* SelectItemEvent represents an event triggered when the selection changes in a list.
|
|
72
|
+
*/
|
|
73
|
+
type SelectItemEvent = ViewEvent<'onSelectionChange', {
|
|
74
|
+
selection: number[];
|
|
75
|
+
}>;
|
|
76
|
+
export type NativeListProps = Omit<ListProps, 'onDeleteItem' | 'onMoveItem' | 'onSelectionChange'> & DeleteItemEvent & MoveItemEvent & SelectItemEvent & {
|
|
77
|
+
children: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* A list component that renders its children using a native SwiftUI list.
|
|
81
|
+
* @param {ListProps} props - The properties for the list component.
|
|
82
|
+
* @returns {JSX.Element | null} The rendered list with its children or null if the platform is unsupported.
|
|
83
|
+
* @platform ios
|
|
84
|
+
*/
|
|
85
|
+
export declare function List({ children }: ListProps): import("react").ReactNode;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjG,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,KAAK,eAAe,GAAG,SAAS,CAAC,cAAc,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACpE;;GAEG;AACH,KAAK,aAAa,GAAG,SAAS,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAC3E;;GAEG;AACH,KAAK,eAAe,GAAG,SAAS,CAAC,mBAAmB,EAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AAE/E,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,cAAc,GAAG,YAAY,GAAG,mBAAmB,CAAC,GAChG,eAAe,GACf,aAAa,GACb,eAAe,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEJ;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,6BAE3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ListProps } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* A list component that renders its children using a native SwiftUI list.
|
|
4
|
+
* @param {ListProps} props - The properties for the list component.
|
|
5
|
+
* @returns {JSX.Element | null} The rendered list with its children or null if the platform is unsupported.
|
|
6
|
+
* @platform ios
|
|
7
|
+
*/
|
|
8
|
+
export declare function List(props: ListProps): import("react").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=index.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.ios.d.ts","sourceRoot":"","sources":["../../../components/List/index.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAmB,MAAM,GAAG,CAAC;AAc/C;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,sCAYpC"}
|
|
@@ -30,8 +30,8 @@ export type PickerProps = {
|
|
|
30
30
|
*/
|
|
31
31
|
selectedIndex: number | null;
|
|
32
32
|
/**
|
|
33
|
-
* A label displayed on the picker when in `menu` variant inside a form section on iOS.
|
|
34
|
-
* @platform
|
|
33
|
+
* A label displayed on the picker when in `'menu'` variant inside a form section on iOS.
|
|
34
|
+
* @platform ios
|
|
35
35
|
*/
|
|
36
36
|
label?: string;
|
|
37
37
|
/**
|
|
@@ -45,10 +45,10 @@ export type PickerProps = {
|
|
|
45
45
|
}) => void;
|
|
46
46
|
/**
|
|
47
47
|
* The variant of the picker, which determines its appearance and behavior.
|
|
48
|
-
* The 'wheel' and 'menu' variants are iOS only, the 'radio' variant is Android only.
|
|
48
|
+
* The `'wheel'`, `'inline'`, `'palette'` and `'menu'` variants are iOS only, the `'radio'` variant is Android only. The `'inline'` variant can only be used inside sections or lists. The `'palette'` variant displays differently inside menus.
|
|
49
49
|
* @default 'segmented'
|
|
50
50
|
*/
|
|
51
|
-
variant?: 'wheel' | 'segmented' | 'menu' | 'radio';
|
|
51
|
+
variant?: 'wheel' | 'segmented' | 'menu' | 'radio' | 'inline' | 'palette';
|
|
52
52
|
/**
|
|
53
53
|
* Optional style to apply to the picker component.
|
|
54
54
|
*/
|
|
@@ -59,11 +59,14 @@ export type PickerProps = {
|
|
|
59
59
|
*/
|
|
60
60
|
elementColors?: PickerElementColors;
|
|
61
61
|
/**
|
|
62
|
-
* Picker color. On iOS it only applies to the `menu` variant.
|
|
62
|
+
* Picker color. On iOS it only applies to the `'menu'` variant.
|
|
63
63
|
*/
|
|
64
64
|
color?: string;
|
|
65
65
|
};
|
|
66
66
|
type NativePickerProps = PickerProps;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
67
70
|
export declare function transformPickerProps(props: PickerProps): NativePickerProps;
|
|
68
71
|
/**
|
|
69
72
|
* Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Picker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;;GAGG;AACH,MAAM,M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@@ -13,7 +13,7 @@ export type ProgressProps = {
|
|
|
13
13
|
*/
|
|
14
14
|
style?: StyleProp<ViewStyle>;
|
|
15
15
|
/**
|
|
16
|
-
* The current progress value of the slider. This is a number between 0 and 1
|
|
16
|
+
* The current progress value of the slider. This is a number between `0` and `1`.
|
|
17
17
|
*/
|
|
18
18
|
progress?: number | null;
|
|
19
19
|
/**
|