@expo/ui 55.0.1 → 55.0.3
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 +58 -0
- package/CONTRIBUTING.md +30 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
- package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
- package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
- package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +302 -31
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
- package/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt +21 -8
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +149 -40
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +204 -50
- package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
- package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
- package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
- package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +62 -104
- package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
- package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
- package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
- package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -80
- package/android/src/main/java/expo/modules/ui/convertibles/AnimatableFloat.kt +26 -0
- package/android/src/main/java/expo/modules/ui/convertibles/AnimationSpecParams.kt +93 -0
- package/android/src/main/java/expo/modules/ui/convertibles/GraphicsLayerParams.kt +24 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
- package/build/jetpack-compose/Button/index.d.ts +65 -51
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +72 -14
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
- package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
- package/build/jetpack-compose/Chip/index.d.ts +247 -27
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +137 -3
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/IconButton/index.d.ts +45 -29
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Progress/index.d.ts +78 -35
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
- package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Slider/index.d.ts +34 -10
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Spacer/index.d.ts +2 -2
- package/build/jetpack-compose/Switch/index.d.ts +25 -47
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +5 -4
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/animation.d.ts +44 -0
- package/build/jetpack-compose/modifiers/animation.d.ts.map +1 -0
- package/build/jetpack-compose/modifiers/index.d.ts +68 -4
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts +4 -0
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts.map +1 -0
- package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
- package/build/swift-ui/ControlGroup/index.d.ts +29 -0
- package/build/swift-ui/ControlGroup/index.d.ts.map +1 -0
- package/build/swift-ui/Gauge/index.d.ts.map +1 -1
- package/build/swift-ui/Image/index.d.ts +7 -1
- package/build/swift-ui/Image/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
- package/build/swift-ui/Menu/index.d.ts.map +1 -1
- package/build/swift-ui/Picker/index.d.ts.map +1 -1
- package/build/swift-ui/Popover/index.d.ts.map +1 -1
- package/build/swift-ui/ProgressView/index.d.ts +1 -5
- package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
- package/build/swift-ui/Section/index.d.ts.map +1 -1
- package/build/swift-ui/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/SlotView.d.ts +5 -0
- package/build/swift-ui/SlotView.d.ts.map +1 -0
- package/build/swift-ui/Stepper/index.d.ts +3 -3
- package/build/swift-ui/Stepper/index.d.ts.map +1 -1
- package/build/swift-ui/Text/index.d.ts +33 -1
- package/build/swift-ui/Text/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +2 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +54 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
- package/build/swift-ui/types.d.ts +7 -0
- package/build/swift-ui/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/AccessoryWidgetBackgroundView.swift +27 -0
- package/ios/BottomSheetView.swift +1 -6
- package/ios/ClosedRangeDateRecord.swift +10 -0
- package/ios/ColorPickerView.swift +9 -8
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +7 -15
- package/ios/ConfirmationDialog/ConfirmationDialogProps.swift +0 -5
- package/ios/ContextMenu/ContextMenu.swift +27 -22
- package/ios/ContextMenu/ContextMenuRecords.swift +0 -6
- package/ios/ControlGroupView.swift +33 -0
- package/ios/DatePickerView.swift +7 -5
- package/ios/DisclosureGroupView.swift +5 -7
- package/ios/ExpoUIModule.swift +10 -32
- package/ios/GaugeView.swift +4 -26
- package/ios/HostView.swift +1 -2
- package/ios/ImageView.swift +22 -11
- package/ios/Label.swift +2 -17
- package/ios/LabeledContentView.swift +3 -27
- package/ios/ListView.swift +6 -14
- package/ios/Menu/MenuRecords.swift +0 -2
- package/ios/Menu/MenuView.swift +2 -5
- package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
- package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
- package/ios/Modifiers/ResizableModifier.swift +24 -0
- package/ios/Modifiers/Rotation3DEffectModifier.swift +20 -0
- package/ios/Modifiers/View+ModifierArray.swift +29 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +37 -3
- package/ios/Modifiers/WidgetModifiers.swift +46 -0
- package/ios/Picker/PickerView.swift +8 -16
- package/ios/Popover/PopoverProps.swift +0 -4
- package/ios/Popover/PopoverView.swift +5 -11
- package/ios/ProgressView.swift +0 -5
- package/ios/RNHostView.swift +91 -10
- package/ios/SectionView.swift +9 -17
- package/ios/SecureFieldView.swift +0 -1
- package/ios/ShareLink/ShareLinkView.swift +1 -1
- package/ios/SliderView.swift +16 -31
- package/ios/SlotView.swift +38 -0
- package/ios/StepperView.swift +12 -16
- package/ios/TextFieldView.swift +0 -1
- package/ios/TextView.swift +37 -1
- package/ios/Toggle/ToggleView.swift +5 -7
- package/ios/UIBaseView.swift +34 -3
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.module → 55.0.3/expo.modules.ui-55.0.3.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.pom → 55.0.3/expo.modules.ui-55.0.3.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.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 +5 -2
- package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
- package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
- package/src/jetpack-compose/Button/index.tsx +69 -92
- package/src/jetpack-compose/Card/index.tsx +105 -29
- package/src/jetpack-compose/Checkbox/index.tsx +126 -0
- package/src/jetpack-compose/Chip/index.tsx +391 -51
- package/src/jetpack-compose/DatePicker/index.tsx +215 -6
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
- package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
- package/src/jetpack-compose/IconButton/index.tsx +49 -56
- package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Progress/index.tsx +120 -62
- package/src/jetpack-compose/RadioButton/index.tsx +8 -9
- package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
- package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Slider/index.tsx +76 -29
- package/src/jetpack-compose/Spacer/index.tsx +2 -2
- package/src/jetpack-compose/Switch/index.tsx +32 -84
- package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
- package/src/jetpack-compose/index.ts +5 -4
- package/src/jetpack-compose/modifiers/animation.ts +37 -0
- package/src/jetpack-compose/modifiers/index.ts +86 -6
- package/src/swift-ui/AccessoryWidgetBackground/index.tsx +12 -0
- package/src/swift-ui/ConfirmationDialog/index.tsx +4 -12
- package/src/swift-ui/ContextMenu/index.tsx +6 -20
- package/src/swift-ui/ControlGroup/index.tsx +59 -0
- package/src/swift-ui/Gauge/index.tsx +5 -20
- package/src/swift-ui/Image/index.tsx +7 -1
- package/src/swift-ui/Label/index.tsx +2 -5
- package/src/swift-ui/LabeledContent/index.tsx +3 -12
- package/src/swift-ui/Menu/index.tsx +2 -6
- package/src/swift-ui/Picker/index.tsx +4 -11
- package/src/swift-ui/Popover/index.tsx +3 -12
- package/src/swift-ui/ProgressView/index.tsx +1 -3
- package/src/swift-ui/Section/index.tsx +4 -9
- package/src/swift-ui/Slider/index.tsx +4 -12
- package/src/swift-ui/SlotView.tsx +8 -0
- package/src/swift-ui/Stepper/index.tsx +7 -7
- package/src/swift-ui/Text/index.tsx +66 -2
- package/src/swift-ui/index.tsx +2 -0
- package/src/swift-ui/modifiers/index.ts +87 -1
- package/src/swift-ui/types.ts +5 -0
- package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
- package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
- package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
- package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
- package/build/jetpack-compose/Button/types.d.ts +0 -5
- package/build/jetpack-compose/Button/types.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
- package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
- package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
- package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
- package/build/jetpack-compose/Picker/index.d.ts +0 -62
- package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
- package/build/jetpack-compose/TextButton/index.d.ts +0 -29
- package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
- package/ios/ConfirmationDialog/ConfirmationDialogComponents.swift +0 -26
- package/ios/ContextMenu/ContextMenuComponents.swift +0 -37
- package/ios/Menu/MenuComponents.swift +0 -12
- package/ios/Picker/PickerComponents.swift +0 -24
- package/ios/Popover/PopoverComponents.swift +0 -18
- package/ios/SectionComponents.swift +0 -34
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha512 +0 -1
- package/src/jetpack-compose/Button/types.ts +0 -57
- package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
- package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
- package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
- package/src/jetpack-compose/FilterChip/index.tsx +0 -89
- package/src/jetpack-compose/Picker/index.tsx +0 -90
- package/src/jetpack-compose/TextButton/index.tsx +0 -55
|
@@ -1,96 +1,436 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import
|
|
2
|
+
import { type ColorValue } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { type ModifierConfig } from '../../types';
|
|
5
5
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Colors for AssistChip.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
| 'bodyLarge';
|
|
10
|
+
export type AssistChipColors = {
|
|
11
|
+
containerColor?: ColorValue;
|
|
12
|
+
labelColor?: ColorValue;
|
|
13
|
+
leadingIconContentColor?: ColorValue;
|
|
14
|
+
trailingIconContentColor?: ColorValue;
|
|
15
|
+
};
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Colors for FilterChip.
|
|
19
|
+
*/
|
|
20
|
+
export type FilterChipColors = {
|
|
21
|
+
containerColor?: ColorValue;
|
|
22
|
+
labelColor?: ColorValue;
|
|
23
|
+
iconColor?: ColorValue;
|
|
24
|
+
selectedContainerColor?: ColorValue;
|
|
25
|
+
selectedLabelColor?: ColorValue;
|
|
26
|
+
selectedLeadingIconColor?: ColorValue;
|
|
27
|
+
selectedTrailingIconColor?: ColorValue;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Colors for InputChip.
|
|
32
|
+
*/
|
|
33
|
+
export type InputChipColors = {
|
|
34
|
+
containerColor?: ColorValue;
|
|
35
|
+
labelColor?: ColorValue;
|
|
36
|
+
leadingIconColor?: ColorValue;
|
|
37
|
+
trailingIconColor?: ColorValue;
|
|
38
|
+
selectedContainerColor?: ColorValue;
|
|
39
|
+
selectedLabelColor?: ColorValue;
|
|
40
|
+
selectedLeadingIconColor?: ColorValue;
|
|
41
|
+
selectedTrailingIconColor?: ColorValue;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Colors for SuggestionChip.
|
|
46
|
+
*/
|
|
47
|
+
export type SuggestionChipColors = {
|
|
48
|
+
containerColor?: ColorValue;
|
|
49
|
+
labelColor?: ColorValue;
|
|
50
|
+
iconContentColor?: ColorValue;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Border configuration for chips.
|
|
55
|
+
*/
|
|
56
|
+
export type ChipBorder = {
|
|
19
57
|
/**
|
|
20
|
-
*
|
|
58
|
+
* Border width in dp.
|
|
59
|
+
* @default 1
|
|
21
60
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
61
|
+
width?: number;
|
|
24
62
|
/**
|
|
25
|
-
*
|
|
63
|
+
* Border color.
|
|
26
64
|
*/
|
|
27
|
-
|
|
65
|
+
color?: ColorValue;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type SlotChildProps = {
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type NativeSlotViewProps = {
|
|
73
|
+
slotName: string;
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
|
|
78
|
+
'ExpoUI',
|
|
79
|
+
'SlotView'
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// region AssistChip
|
|
28
83
|
|
|
84
|
+
export type AssistChipProps = {
|
|
29
85
|
/**
|
|
30
|
-
*
|
|
86
|
+
* Whether the chip is enabled and can be clicked.
|
|
87
|
+
* @default true
|
|
31
88
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
89
|
+
enabled?: boolean;
|
|
34
90
|
/**
|
|
35
|
-
*
|
|
91
|
+
* Colors for the chip's container, label, and icons.
|
|
36
92
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
93
|
+
colors?: AssistChipColors;
|
|
39
94
|
/**
|
|
40
|
-
*
|
|
95
|
+
* Elevation in dp.
|
|
41
96
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
97
|
+
elevation?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Border configuration.
|
|
100
|
+
*/
|
|
101
|
+
border?: ChipBorder;
|
|
102
|
+
/**
|
|
103
|
+
* Callback fired when the chip is clicked.
|
|
104
|
+
*/
|
|
105
|
+
onClick?: () => void;
|
|
44
106
|
/**
|
|
45
|
-
*
|
|
107
|
+
* Modifiers for the component.
|
|
46
108
|
*/
|
|
47
|
-
|
|
109
|
+
modifiers?: ModifierConfig[];
|
|
110
|
+
/**
|
|
111
|
+
* Children containing Label, LeadingIcon, and TrailingIcon slots.
|
|
112
|
+
*/
|
|
113
|
+
children: React.ReactNode;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
type NativeAssistChipProps = Omit<AssistChipProps, 'onClick'> & {
|
|
117
|
+
onNativeClick?: () => void;
|
|
118
|
+
};
|
|
48
119
|
|
|
120
|
+
const AssistChipNativeView: React.ComponentType<NativeAssistChipProps> = requireNativeView(
|
|
121
|
+
'ExpoUI',
|
|
122
|
+
'AssistChipView'
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Label slot for AssistChip.
|
|
127
|
+
*/
|
|
128
|
+
function AssistChipLabel(props: SlotChildProps) {
|
|
129
|
+
return <SlotNativeView slotName="label">{props.children}</SlotNativeView>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Leading icon slot for AssistChip.
|
|
134
|
+
*/
|
|
135
|
+
function AssistChipLeadingIcon(props: SlotChildProps) {
|
|
136
|
+
return <SlotNativeView slotName="leadingIcon">{props.children}</SlotNativeView>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Trailing icon slot for AssistChip.
|
|
141
|
+
*/
|
|
142
|
+
function AssistChipTrailingIcon(props: SlotChildProps) {
|
|
143
|
+
return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An assist chip that helps users complete actions and primary tasks.
|
|
148
|
+
*/
|
|
149
|
+
function AssistChipComponent(props: AssistChipProps) {
|
|
150
|
+
const { children, modifiers, onClick, ...restProps } = props;
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<AssistChipNativeView
|
|
154
|
+
modifiers={modifiers}
|
|
155
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
156
|
+
{...restProps}
|
|
157
|
+
onNativeClick={onClick}>
|
|
158
|
+
{children}
|
|
159
|
+
</AssistChipNativeView>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
AssistChipComponent.Label = AssistChipLabel;
|
|
164
|
+
AssistChipComponent.LeadingIcon = AssistChipLeadingIcon;
|
|
165
|
+
AssistChipComponent.TrailingIcon = AssistChipTrailingIcon;
|
|
166
|
+
|
|
167
|
+
export { AssistChipComponent as AssistChip };
|
|
168
|
+
|
|
169
|
+
// endregion
|
|
170
|
+
|
|
171
|
+
// region FilterChip
|
|
172
|
+
|
|
173
|
+
export type FilterChipProps = {
|
|
174
|
+
/**
|
|
175
|
+
* Whether the chip is currently selected.
|
|
176
|
+
*/
|
|
177
|
+
selected: boolean;
|
|
49
178
|
/**
|
|
50
|
-
* Whether the chip is enabled and can be
|
|
179
|
+
* Whether the chip is enabled and can be interacted with.
|
|
51
180
|
*/
|
|
52
181
|
enabled?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Colors for the chip's container, label, icon, and selected states.
|
|
184
|
+
*/
|
|
185
|
+
colors?: FilterChipColors;
|
|
186
|
+
/**
|
|
187
|
+
* Elevation in dp.
|
|
188
|
+
*/
|
|
189
|
+
elevation?: number;
|
|
190
|
+
/**
|
|
191
|
+
* Border configuration.
|
|
192
|
+
*/
|
|
193
|
+
border?: ChipBorder;
|
|
194
|
+
/**
|
|
195
|
+
* Callback fired when the chip is clicked.
|
|
196
|
+
*/
|
|
197
|
+
onClick?: () => void;
|
|
198
|
+
/**
|
|
199
|
+
* Modifiers for the component.
|
|
200
|
+
*/
|
|
201
|
+
modifiers?: ModifierConfig[];
|
|
202
|
+
/**
|
|
203
|
+
* Children containing Label, LeadingIcon, and TrailingIcon slots.
|
|
204
|
+
*/
|
|
205
|
+
children: React.ReactNode;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
type NativeFilterChipProps = Omit<FilterChipProps, 'onClick'> & {
|
|
209
|
+
onNativeClick?: () => void;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const FilterChipNativeView: React.ComponentType<NativeFilterChipProps> = requireNativeView(
|
|
213
|
+
'ExpoUI',
|
|
214
|
+
'FilterChipView'
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Label slot for FilterChip.
|
|
219
|
+
*/
|
|
220
|
+
function FilterChipLabel(props: SlotChildProps) {
|
|
221
|
+
return <SlotNativeView slotName="label">{props.children}</SlotNativeView>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Leading icon slot for FilterChip.
|
|
226
|
+
*/
|
|
227
|
+
function FilterChipLeadingIcon(props: SlotChildProps) {
|
|
228
|
+
return <SlotNativeView slotName="leadingIcon">{props.children}</SlotNativeView>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Trailing icon slot for FilterChip.
|
|
233
|
+
*/
|
|
234
|
+
function FilterChipTrailingIcon(props: SlotChildProps) {
|
|
235
|
+
return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* A filter chip component for refining content with selection/deselection.
|
|
240
|
+
*/
|
|
241
|
+
function FilterChipComponent(props: FilterChipProps) {
|
|
242
|
+
const { children, modifiers, onClick, ...restProps } = props;
|
|
243
|
+
|
|
244
|
+
return (
|
|
245
|
+
<FilterChipNativeView
|
|
246
|
+
modifiers={modifiers}
|
|
247
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
248
|
+
{...restProps}
|
|
249
|
+
onNativeClick={onClick}>
|
|
250
|
+
{children}
|
|
251
|
+
</FilterChipNativeView>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
FilterChipComponent.Label = FilterChipLabel;
|
|
256
|
+
FilterChipComponent.LeadingIcon = FilterChipLeadingIcon;
|
|
257
|
+
FilterChipComponent.TrailingIcon = FilterChipTrailingIcon;
|
|
258
|
+
|
|
259
|
+
export { FilterChipComponent as FilterChip };
|
|
260
|
+
|
|
261
|
+
// endregion
|
|
262
|
+
|
|
263
|
+
// region InputChip
|
|
53
264
|
|
|
265
|
+
export type InputChipProps = {
|
|
54
266
|
/**
|
|
55
|
-
* Whether the chip is
|
|
267
|
+
* Whether the chip is enabled and can be interacted with.
|
|
268
|
+
* @default true
|
|
269
|
+
*/
|
|
270
|
+
enabled?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Whether the chip is selected.
|
|
273
|
+
* @default false
|
|
56
274
|
*/
|
|
57
275
|
selected?: boolean;
|
|
58
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Colors for the chip's container, label, icons, and selected states.
|
|
278
|
+
*/
|
|
279
|
+
colors?: InputChipColors;
|
|
280
|
+
/**
|
|
281
|
+
* Elevation in dp.
|
|
282
|
+
*/
|
|
283
|
+
elevation?: number;
|
|
284
|
+
/**
|
|
285
|
+
* Border configuration.
|
|
286
|
+
*/
|
|
287
|
+
border?: ChipBorder;
|
|
288
|
+
/**
|
|
289
|
+
* Callback fired when the chip is clicked.
|
|
290
|
+
*/
|
|
291
|
+
onClick?: () => void;
|
|
59
292
|
/**
|
|
60
293
|
* Modifiers for the component.
|
|
61
294
|
*/
|
|
62
|
-
modifiers?:
|
|
63
|
-
|
|
295
|
+
modifiers?: ModifierConfig[];
|
|
64
296
|
/**
|
|
65
|
-
*
|
|
297
|
+
* Children containing Label, Avatar, and TrailingIcon slots.
|
|
66
298
|
*/
|
|
67
|
-
|
|
299
|
+
children: React.ReactNode;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
type NativeInputChipProps = Omit<InputChipProps, 'onClick'> & {
|
|
303
|
+
onNativeClick?: () => void;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const InputChipNativeView: React.ComponentType<NativeInputChipProps> = requireNativeView(
|
|
307
|
+
'ExpoUI',
|
|
308
|
+
'InputChipView'
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Label slot for InputChip.
|
|
313
|
+
*/
|
|
314
|
+
function InputChipLabel(props: SlotChildProps) {
|
|
315
|
+
return <SlotNativeView slotName="label">{props.children}</SlotNativeView>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Avatar slot for InputChip.
|
|
320
|
+
*/
|
|
321
|
+
function InputChipAvatar(props: SlotChildProps) {
|
|
322
|
+
return <SlotNativeView slotName="avatar">{props.children}</SlotNativeView>;
|
|
323
|
+
}
|
|
68
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Trailing icon slot for InputChip.
|
|
327
|
+
*/
|
|
328
|
+
function InputChipTrailingIcon(props: SlotChildProps) {
|
|
329
|
+
return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* An input chip that represents user input and can be dismissed.
|
|
334
|
+
*/
|
|
335
|
+
function InputChipComponent(props: InputChipProps) {
|
|
336
|
+
const { children, modifiers, onClick, ...restProps } = props;
|
|
337
|
+
|
|
338
|
+
return (
|
|
339
|
+
<InputChipNativeView
|
|
340
|
+
modifiers={modifiers}
|
|
341
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
342
|
+
{...restProps}
|
|
343
|
+
onNativeClick={onClick}>
|
|
344
|
+
{children}
|
|
345
|
+
</InputChipNativeView>
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
InputChipComponent.Label = InputChipLabel;
|
|
350
|
+
InputChipComponent.Avatar = InputChipAvatar;
|
|
351
|
+
InputChipComponent.TrailingIcon = InputChipTrailingIcon;
|
|
352
|
+
|
|
353
|
+
export { InputChipComponent as InputChip };
|
|
354
|
+
|
|
355
|
+
// endregion
|
|
356
|
+
|
|
357
|
+
// region SuggestionChip
|
|
358
|
+
|
|
359
|
+
export type SuggestionChipProps = {
|
|
69
360
|
/**
|
|
70
|
-
*
|
|
361
|
+
* Whether the chip is enabled and can be clicked.
|
|
362
|
+
* @default true
|
|
71
363
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
364
|
+
enabled?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Colors for the chip's container, label, and icon.
|
|
367
|
+
*/
|
|
368
|
+
colors?: SuggestionChipColors;
|
|
369
|
+
/**
|
|
370
|
+
* Elevation in dp.
|
|
371
|
+
*/
|
|
372
|
+
elevation?: number;
|
|
373
|
+
/**
|
|
374
|
+
* Border configuration.
|
|
375
|
+
*/
|
|
376
|
+
border?: ChipBorder;
|
|
377
|
+
/**
|
|
378
|
+
* Callback fired when the chip is clicked.
|
|
379
|
+
*/
|
|
380
|
+
onClick?: () => void;
|
|
381
|
+
/**
|
|
382
|
+
* Modifiers for the component.
|
|
383
|
+
*/
|
|
384
|
+
modifiers?: ModifierConfig[];
|
|
385
|
+
/**
|
|
386
|
+
* Children containing Label and Icon slots.
|
|
387
|
+
*/
|
|
388
|
+
children: React.ReactNode;
|
|
389
|
+
};
|
|
74
390
|
|
|
75
|
-
type
|
|
76
|
-
|
|
77
|
-
|
|
391
|
+
type NativeSuggestionChipProps = Omit<SuggestionChipProps, 'onClick'> & {
|
|
392
|
+
onNativeClick?: () => void;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
const SuggestionChipNativeView: React.ComponentType<NativeSuggestionChipProps> = requireNativeView(
|
|
78
396
|
'ExpoUI',
|
|
79
|
-
'
|
|
397
|
+
'SuggestionChipView'
|
|
80
398
|
);
|
|
81
399
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
...restProps,
|
|
88
|
-
};
|
|
400
|
+
/**
|
|
401
|
+
* Label slot for SuggestionChip.
|
|
402
|
+
*/
|
|
403
|
+
function SuggestionChipLabel(props: SlotChildProps) {
|
|
404
|
+
return <SlotNativeView slotName="label">{props.children}</SlotNativeView>;
|
|
89
405
|
}
|
|
90
406
|
|
|
91
407
|
/**
|
|
92
|
-
*
|
|
408
|
+
* Icon slot for SuggestionChip.
|
|
93
409
|
*/
|
|
94
|
-
|
|
95
|
-
return <
|
|
410
|
+
function SuggestionChipIcon(props: SlotChildProps) {
|
|
411
|
+
return <SlotNativeView slotName="icon">{props.children}</SlotNativeView>;
|
|
96
412
|
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* A suggestion chip that offers contextual suggestions and recommendations.
|
|
416
|
+
*/
|
|
417
|
+
function SuggestionChipComponent(props: SuggestionChipProps) {
|
|
418
|
+
const { children, modifiers, onClick, ...restProps } = props;
|
|
419
|
+
|
|
420
|
+
return (
|
|
421
|
+
<SuggestionChipNativeView
|
|
422
|
+
modifiers={modifiers}
|
|
423
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
424
|
+
{...restProps}
|
|
425
|
+
onNativeClick={onClick}>
|
|
426
|
+
{children}
|
|
427
|
+
</SuggestionChipNativeView>
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
SuggestionChipComponent.Label = SuggestionChipLabel;
|
|
432
|
+
SuggestionChipComponent.Icon = SuggestionChipIcon;
|
|
433
|
+
|
|
434
|
+
export { SuggestionChipComponent as SuggestionChip };
|
|
435
|
+
|
|
436
|
+
// endregion
|