@expo/ui 55.0.2 → 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 +31 -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 +258 -70
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +44 -1
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
- 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 +53 -161
- 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 -86
- 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 +38 -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/Switch/index.d.ts +10 -50
- 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/index.d.ts +18 -1
- package/build/jetpack-compose/modifiers/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/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/modifiers/index.d.ts +22 -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/BottomSheetView.swift +1 -6
- package/ios/ClosedRangeDateRecord.swift +10 -0
- package/ios/ColorPickerView.swift +9 -8
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +4 -6
- package/ios/DatePickerView.swift +7 -5
- package/ios/DisclosureGroupView.swift +5 -7
- package/ios/ListView.swift +6 -14
- package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
- package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
- package/ios/Picker/PickerView.swift +6 -10
- package/ios/Popover/PopoverView.swift +3 -5
- package/ios/ProgressView.swift +0 -5
- package/ios/SectionView.swift +3 -5
- package/ios/SliderView.swift +8 -6
- package/ios/StepperView.swift +12 -16
- package/ios/TextView.swift +37 -1
- package/ios/Toggle/ToggleView.swift +5 -7
- 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.2/expo.modules.ui-55.0.2.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.2/expo.modules.ui-55.0.2.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 +112 -7
- 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/Switch/index.tsx +17 -87
- package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
- package/src/jetpack-compose/index.ts +5 -4
- package/src/jetpack-compose/modifiers/index.ts +26 -2
- package/src/swift-ui/ProgressView/index.tsx +1 -3
- package/src/swift-ui/Stepper/index.tsx +7 -7
- package/src/swift-ui/Text/index.tsx +66 -2
- package/src/swift-ui/modifiers/index.ts +40 -0
- 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/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
package expo.modules.ui.menu
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import androidx.compose.material3.DropdownMenuItem
|
|
5
|
+
import androidx.compose.material3.MenuDefaults
|
|
6
|
+
import androidx.compose.material3.Text
|
|
7
|
+
import androidx.compose.runtime.Composable
|
|
8
|
+
import expo.modules.kotlin.records.Field
|
|
9
|
+
import expo.modules.kotlin.records.Record
|
|
10
|
+
import expo.modules.kotlin.views.ComposableScope
|
|
11
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
12
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
13
|
+
import expo.modules.ui.ModifierList
|
|
14
|
+
import expo.modules.ui.ModifierRegistry
|
|
15
|
+
import expo.modules.ui.composeOrNull
|
|
16
|
+
import expo.modules.ui.findChildSlotView
|
|
17
|
+
import java.io.Serializable
|
|
18
|
+
|
|
19
|
+
class ItemPressedEvent : Record, Serializable
|
|
20
|
+
|
|
21
|
+
class DropdownMenuItemColors : Record {
|
|
22
|
+
@Field val textColor: Color? = null
|
|
23
|
+
@Field val leadingIconColor: Color? = null
|
|
24
|
+
@Field val trailingIconColor: Color? = null
|
|
25
|
+
@Field val disabledTextColor: Color? = null
|
|
26
|
+
@Field val disabledLeadingIconColor: Color? = null
|
|
27
|
+
@Field val disabledTrailingIconColor: Color? = null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
data class DropdownMenuItemProps(
|
|
31
|
+
val enabled: Boolean = true,
|
|
32
|
+
val elementColors: DropdownMenuItemColors = DropdownMenuItemColors(),
|
|
33
|
+
val modifiers: ModifierList = emptyList()
|
|
34
|
+
) : ComposeProps
|
|
35
|
+
|
|
36
|
+
@Composable
|
|
37
|
+
fun FunctionalComposableScope.DropdownMenuItemContent(
|
|
38
|
+
props: DropdownMenuItemProps,
|
|
39
|
+
onItemPressed: (ItemPressedEvent) -> Unit
|
|
40
|
+
) {
|
|
41
|
+
val textSlotView = findChildSlotView(view, "text")
|
|
42
|
+
val leadingSlotView = findChildSlotView(view, "leadingIcon")
|
|
43
|
+
val trailingSlotView = findChildSlotView(view, "trailingIcon")
|
|
44
|
+
|
|
45
|
+
val colors = props.elementColors
|
|
46
|
+
val defaultColors = MenuDefaults.itemColors()
|
|
47
|
+
|
|
48
|
+
DropdownMenuItem(
|
|
49
|
+
text = { textSlotView?.let { with(ComposableScope()) { with(it) { Content() } } } ?: Unit },
|
|
50
|
+
enabled = props.enabled,
|
|
51
|
+
modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
|
|
52
|
+
colors = MenuDefaults.itemColors(
|
|
53
|
+
textColor = colors.textColor.composeOrNull ?: defaultColors.textColor,
|
|
54
|
+
leadingIconColor = colors.leadingIconColor.composeOrNull ?: defaultColors.leadingIconColor,
|
|
55
|
+
trailingIconColor = colors.trailingIconColor.composeOrNull ?: defaultColors.trailingIconColor,
|
|
56
|
+
disabledTextColor = colors.disabledTextColor.composeOrNull ?: defaultColors.disabledTextColor,
|
|
57
|
+
disabledLeadingIconColor = colors.disabledLeadingIconColor.composeOrNull ?: defaultColors.disabledLeadingIconColor,
|
|
58
|
+
disabledTrailingIconColor = colors.disabledTrailingIconColor.composeOrNull ?: defaultColors.disabledTrailingIconColor
|
|
59
|
+
),
|
|
60
|
+
leadingIcon = leadingSlotView?.let {
|
|
61
|
+
{ with(ComposableScope()) { with(it) { Content() } } }
|
|
62
|
+
},
|
|
63
|
+
trailingIcon = trailingSlotView?.let {
|
|
64
|
+
{ with(ComposableScope()) { with(it) { Content() } } }
|
|
65
|
+
},
|
|
66
|
+
onClick = {
|
|
67
|
+
onItemPressed(ItemPressedEvent())
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
package expo.modules.ui.menu
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import expo.modules.kotlin.types.Enumerable
|
|
5
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
6
|
+
import expo.modules.ui.ModifierList
|
|
7
|
+
|
|
8
|
+
enum class ActivationMethod(val value: String) : Enumerable {
|
|
9
|
+
SINGLE_PRESS("singlePress"),
|
|
10
|
+
LONG_PRESS("longPress")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
data class DropdownMenuProps(
|
|
14
|
+
val activationMethod: ActivationMethod = ActivationMethod.SINGLE_PRESS,
|
|
15
|
+
val expanded: Boolean = false,
|
|
16
|
+
val color: Color? = null,
|
|
17
|
+
val modifiers: ModifierList = emptyList()
|
|
18
|
+
) : ComposeProps
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { PrimitiveBaseProps } from '../layout-types';
|
|
2
|
+
import { ENTER_TRANSITION_SYMBOL, EXIT_TRANSITION_SYMBOL } from './symbols';
|
|
3
|
+
type EnterTransitionRecord = {
|
|
4
|
+
type: 'fadeIn' | 'slideInHorizontally' | 'slideInVertically' | 'expandIn' | 'expandHorizontally' | 'expandVertically' | 'scaleIn';
|
|
5
|
+
initialAlpha?: number;
|
|
6
|
+
/** Fraction of width: -1.0 = full width left, 1.0 = full width right */
|
|
7
|
+
initialOffsetX?: number;
|
|
8
|
+
/** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
|
|
9
|
+
initialOffsetY?: number;
|
|
10
|
+
initialScale?: number;
|
|
11
|
+
};
|
|
12
|
+
type ExitTransitionRecord = {
|
|
13
|
+
type: 'fadeOut' | 'slideOutHorizontally' | 'slideOutVertically' | 'shrinkOut' | 'shrinkHorizontally' | 'shrinkVertically' | 'scaleOut';
|
|
14
|
+
targetAlpha?: number;
|
|
15
|
+
/** Fraction of width: -1.0 = full width left, 1.0 = full width right */
|
|
16
|
+
targetOffsetX?: number;
|
|
17
|
+
/** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
|
|
18
|
+
targetOffsetY?: number;
|
|
19
|
+
targetScale?: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Represents an enter transition that can be combined with other enter transitions using `.plus()`.
|
|
23
|
+
*/
|
|
24
|
+
export type EnterTransitionType = {
|
|
25
|
+
/** Combines this transition with another enter transition (mirrors Compose's `+` operator). */
|
|
26
|
+
plus: (other: EnterTransitionType) => EnterTransitionType;
|
|
27
|
+
[ENTER_TRANSITION_SYMBOL]: () => EnterTransitionRecord[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Represents an exit transition that can be combined with other exit transitions using `.plus()`.
|
|
31
|
+
*/
|
|
32
|
+
export type ExitTransitionType = {
|
|
33
|
+
/** Combines this transition with another exit transition (mirrors Compose's `+` operator). */
|
|
34
|
+
plus: (other: ExitTransitionType) => ExitTransitionType;
|
|
35
|
+
[EXIT_TRANSITION_SYMBOL]: () => ExitTransitionRecord[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Factory for enter transitions used with `AnimatedVisibility`.
|
|
39
|
+
* Transitions can be combined using `.plus()`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Single transition
|
|
44
|
+
* EnterTransition.fadeIn()
|
|
45
|
+
*
|
|
46
|
+
* // Combined transitions
|
|
47
|
+
* EnterTransition.fadeIn({ initialAlpha: 0.3 })
|
|
48
|
+
* .plus(EnterTransition.slideInHorizontally({ initialOffsetX: 1.0 }))
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare const EnterTransition: {
|
|
52
|
+
/** Fades the content in. */
|
|
53
|
+
fadeIn: (params?: {
|
|
54
|
+
initialAlpha?: number;
|
|
55
|
+
}) => EnterTransitionType;
|
|
56
|
+
/** Slides the content in horizontally. */
|
|
57
|
+
slideInHorizontally: (params?: {
|
|
58
|
+
initialOffsetX?: number;
|
|
59
|
+
}) => EnterTransitionType;
|
|
60
|
+
/** Slides the content in vertically. */
|
|
61
|
+
slideInVertically: (params?: {
|
|
62
|
+
initialOffsetY?: number;
|
|
63
|
+
}) => EnterTransitionType;
|
|
64
|
+
/** Expands the content from the center. */
|
|
65
|
+
expandIn: () => EnterTransitionType;
|
|
66
|
+
/** Expands the content horizontally from the center. */
|
|
67
|
+
expandHorizontally: () => EnterTransitionType;
|
|
68
|
+
/** Expands the content vertically from the center. */
|
|
69
|
+
expandVertically: () => EnterTransitionType;
|
|
70
|
+
/** Scales the content in from a smaller size. */
|
|
71
|
+
scaleIn: (params?: {
|
|
72
|
+
initialScale?: number;
|
|
73
|
+
}) => EnterTransitionType;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Factory for exit transitions used with `AnimatedVisibility`.
|
|
77
|
+
* Transitions can be combined using `.plus()`.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* // Single transition
|
|
82
|
+
* ExitTransition.fadeOut()
|
|
83
|
+
*
|
|
84
|
+
* // Combined transitions
|
|
85
|
+
* ExitTransition.fadeOut()
|
|
86
|
+
* .plus(ExitTransition.slideOutHorizontally({ targetOffsetX: 1.0 }))
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare const ExitTransition: {
|
|
90
|
+
/** Fades the content out. */
|
|
91
|
+
fadeOut: (params?: {
|
|
92
|
+
targetAlpha?: number;
|
|
93
|
+
}) => ExitTransitionType;
|
|
94
|
+
/** Slides the content out horizontally. */
|
|
95
|
+
slideOutHorizontally: (params?: {
|
|
96
|
+
targetOffsetX?: number;
|
|
97
|
+
}) => ExitTransitionType;
|
|
98
|
+
/** Slides the content out vertically. */
|
|
99
|
+
slideOutVertically: (params?: {
|
|
100
|
+
targetOffsetY?: number;
|
|
101
|
+
}) => ExitTransitionType;
|
|
102
|
+
/** Shrinks the content towards the center. */
|
|
103
|
+
shrinkOut: () => ExitTransitionType;
|
|
104
|
+
/** Shrinks the content horizontally towards the center. */
|
|
105
|
+
shrinkHorizontally: () => ExitTransitionType;
|
|
106
|
+
/** Shrinks the content vertically towards the center. */
|
|
107
|
+
shrinkVertically: () => ExitTransitionType;
|
|
108
|
+
/** Scales the content out to a smaller size. */
|
|
109
|
+
scaleOut: (params?: {
|
|
110
|
+
targetScale?: number;
|
|
111
|
+
}) => ExitTransitionType;
|
|
112
|
+
};
|
|
113
|
+
export type AnimatedVisibilityProps = {
|
|
114
|
+
children?: React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* Whether the content is visible. When changed, the content will animate in or out.
|
|
117
|
+
*/
|
|
118
|
+
visible: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* The enter transition to use when `visible` changes to `true`.
|
|
121
|
+
* Use `EnterTransition` factory methods and combine with `.plus()`.
|
|
122
|
+
* Defaults to Compose's `fadeIn + expandIn` when not specified.
|
|
123
|
+
*/
|
|
124
|
+
enterTransition?: EnterTransitionType;
|
|
125
|
+
/**
|
|
126
|
+
* The exit transition to use when `visible` changes to `false`.
|
|
127
|
+
* Use `ExitTransition` factory methods and combine with `.plus()`.
|
|
128
|
+
* Defaults to Compose's `fadeOut + shrinkOut` when not specified.
|
|
129
|
+
*/
|
|
130
|
+
exitTransition?: ExitTransitionType;
|
|
131
|
+
} & PrimitiveBaseProps;
|
|
132
|
+
export declare function AnimatedVisibility(props: AnimatedVisibilityProps): import("react").JSX.Element;
|
|
133
|
+
export {};
|
|
134
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","s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B,CAAC"}
|
|
@@ -1,85 +1,99 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
|
-
import {
|
|
3
|
-
import { ExpoModifier, ViewEvent } from '../../types';
|
|
2
|
+
import type { ModifierConfig, ViewEvent } from '../../types';
|
|
4
3
|
import { ShapeJSXElement, ShapeRecordProps } from '../Shape';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
* - `outlined` - A button with an outline.
|
|
8
|
-
* - `elevated` - A filled button with a shadow.
|
|
5
|
+
* Colors for button elements.
|
|
9
6
|
*/
|
|
10
|
-
export type
|
|
11
|
-
/**
|
|
12
|
-
* Colors for button's core elements.
|
|
13
|
-
*/
|
|
14
|
-
export type ButtonElementColors = {
|
|
7
|
+
export type ButtonColors = {
|
|
15
8
|
containerColor?: ColorValue;
|
|
16
9
|
contentColor?: ColorValue;
|
|
17
10
|
disabledContainerColor?: ColorValue;
|
|
18
11
|
disabledContentColor?: ColorValue;
|
|
19
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Content padding for the button's inner content.
|
|
15
|
+
* All values are in density-independent pixels (dp).
|
|
16
|
+
*/
|
|
17
|
+
export type ButtonContentPadding = {
|
|
18
|
+
start?: number;
|
|
19
|
+
top?: number;
|
|
20
|
+
end?: number;
|
|
21
|
+
bottom?: number;
|
|
22
|
+
};
|
|
20
23
|
export type ButtonProps = {
|
|
21
24
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
onPress?: () => void;
|
|
25
|
-
/**
|
|
26
|
-
* A string describing the leading icon to display in the button.
|
|
27
|
-
* Uses Material Icons on Android.
|
|
25
|
+
* Callback that is called when the button is clicked.
|
|
28
26
|
*/
|
|
29
|
-
|
|
27
|
+
onClick?: () => void;
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
29
|
+
* Whether the button is enabled for user interaction.
|
|
30
|
+
* @default true
|
|
33
31
|
*/
|
|
34
|
-
|
|
32
|
+
enabled?: boolean;
|
|
35
33
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Uses Material Icons on Android.
|
|
38
|
-
* @deprecated Use `leadingIcon` instead.
|
|
34
|
+
* Colors for button elements.
|
|
39
35
|
*/
|
|
40
|
-
|
|
36
|
+
colors?: ButtonColors;
|
|
41
37
|
/**
|
|
42
|
-
* The button
|
|
38
|
+
* The padding between the button container and its content.
|
|
39
|
+
* Use this to adjust internal spacing, for example when adding a leading icon
|
|
43
40
|
*/
|
|
44
|
-
|
|
41
|
+
contentPadding?: ButtonContentPadding;
|
|
45
42
|
/**
|
|
46
|
-
* The
|
|
43
|
+
* The shape of the button.
|
|
47
44
|
*/
|
|
48
|
-
children?: string | string[] | React.JSX.Element;
|
|
49
|
-
/**
|
|
50
|
-
* Colors for button's core elements.
|
|
51
|
-
* @platform android
|
|
52
|
-
*/
|
|
53
|
-
elementColors?: ButtonElementColors;
|
|
54
|
-
/**
|
|
55
|
-
* Button color.
|
|
56
|
-
*/
|
|
57
|
-
color?: ColorValue;
|
|
58
45
|
shape?: ShapeJSXElement;
|
|
59
46
|
/**
|
|
60
|
-
*
|
|
47
|
+
* Modifiers for the component.
|
|
61
48
|
*/
|
|
62
|
-
|
|
49
|
+
modifiers?: ModifierConfig[];
|
|
63
50
|
/**
|
|
64
|
-
*
|
|
51
|
+
* Content to display inside the button.
|
|
65
52
|
*/
|
|
66
|
-
|
|
53
|
+
children: React.ReactNode;
|
|
67
54
|
};
|
|
68
|
-
|
|
69
|
-
* @hidden
|
|
70
|
-
*/
|
|
71
|
-
export type NativeButtonProps = Omit<ButtonProps, 'role' | 'onPress' | 'leadingIcon' | 'trailingIcon' | 'systemImage' | 'shape'> & {
|
|
72
|
-
text: string;
|
|
73
|
-
leadingIcon?: string;
|
|
74
|
-
trailingIcon?: string;
|
|
55
|
+
type NativeButtonProps = Omit<ButtonProps, 'onClick' | 'shape' | 'children'> & {
|
|
75
56
|
shape?: ShapeRecordProps;
|
|
57
|
+
children?: React.ReactNode;
|
|
76
58
|
} & ViewEvent<'onButtonPressed', void>;
|
|
77
59
|
/**
|
|
78
60
|
* @hidden
|
|
79
61
|
*/
|
|
80
|
-
export declare function transformButtonProps(props: ButtonProps): NativeButtonProps;
|
|
62
|
+
export declare function transformButtonProps(props: Omit<ButtonProps, 'children'>): NativeButtonProps;
|
|
63
|
+
/**
|
|
64
|
+
* A filled button component.
|
|
65
|
+
*/
|
|
66
|
+
export declare const Button: {
|
|
67
|
+
(props: ButtonProps): import("react").JSX.Element;
|
|
68
|
+
displayName: string;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* A filled tonal button component.
|
|
72
|
+
*/
|
|
73
|
+
export declare const FilledTonalButton: {
|
|
74
|
+
(props: ButtonProps): import("react").JSX.Element;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* An outlined button component.
|
|
79
|
+
*/
|
|
80
|
+
export declare const OutlinedButton: {
|
|
81
|
+
(props: ButtonProps): import("react").JSX.Element;
|
|
82
|
+
displayName: string;
|
|
83
|
+
};
|
|
81
84
|
/**
|
|
82
|
-
*
|
|
85
|
+
* An elevated button component.
|
|
83
86
|
*/
|
|
84
|
-
export declare
|
|
87
|
+
export declare const ElevatedButton: {
|
|
88
|
+
(props: ButtonProps): import("react").JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* A text button component.
|
|
93
|
+
*/
|
|
94
|
+
export declare const TextButton: {
|
|
95
|
+
(props: ButtonProps): import("react").JSX.Element;
|
|
96
|
+
displayName: string;
|
|
97
|
+
};
|
|
98
|
+
export {};
|
|
85
99
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,
|
|
1
|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E,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAEvC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,iBAAiB,CAU5F;AAaD;;GAEG;AACH,eAAO,MAAM,MAAM;YAXS,WAAW;;CAWc,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,iBAAiB;YAhBF,WAAW;;CAgBoC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,cAAc;YArBC,WAAW;;CAqB8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,cAAc;YA1BC,WAAW;;CA0B8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,UAAU;YA/BK,WAAW;;CA+BsB,CAAC"}
|
|
@@ -1,40 +1,98 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { type ModifierConfig } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Colors for card's core elements.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type CardColors = {
|
|
7
7
|
containerColor?: ColorValue;
|
|
8
8
|
contentColor?: ColorValue;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Border configuration for cards.
|
|
12
|
+
*/
|
|
13
|
+
export type CardBorder = {
|
|
14
|
+
/**
|
|
15
|
+
* Border width in dp.
|
|
16
|
+
* @default 1
|
|
17
|
+
*/
|
|
18
|
+
width?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Border color.
|
|
21
|
+
*/
|
|
22
|
+
color?: ColorValue;
|
|
23
|
+
};
|
|
10
24
|
export type CardProps = {
|
|
11
25
|
/**
|
|
12
26
|
* The content to display inside the card.
|
|
13
27
|
*/
|
|
14
28
|
children?: React.ReactNode;
|
|
15
29
|
/**
|
|
16
|
-
*
|
|
17
|
-
* - 'default' - A filled card with no outline.
|
|
18
|
-
* - 'elevated' - A filled card with elevation/shadow.
|
|
19
|
-
* - 'outlined' - A card with an outline border.
|
|
20
|
-
* @default 'default'
|
|
30
|
+
* Colors for card's core elements.
|
|
21
31
|
*/
|
|
22
|
-
|
|
32
|
+
colors?: CardColors;
|
|
23
33
|
/**
|
|
24
|
-
*
|
|
34
|
+
* Default elevation in dp.
|
|
25
35
|
*/
|
|
26
|
-
|
|
36
|
+
elevation?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Border configuration for the card.
|
|
39
|
+
*/
|
|
40
|
+
border?: CardBorder;
|
|
41
|
+
/**
|
|
42
|
+
* Modifiers for the component.
|
|
43
|
+
*/
|
|
44
|
+
modifiers?: ModifierConfig[];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A card component that renders a filled card surface for content.
|
|
48
|
+
*/
|
|
49
|
+
export declare const Card: import("react").ComponentType<CardProps>;
|
|
50
|
+
export type ElevatedCardProps = {
|
|
51
|
+
/**
|
|
52
|
+
* The content to display inside the card.
|
|
53
|
+
*/
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Colors for card's core elements.
|
|
57
|
+
*/
|
|
58
|
+
colors?: CardColors;
|
|
59
|
+
/**
|
|
60
|
+
* Default elevation in dp. Material 3 default is 1dp.
|
|
61
|
+
*/
|
|
62
|
+
elevation?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Modifiers for the component.
|
|
65
|
+
*/
|
|
66
|
+
modifiers?: ModifierConfig[];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* An elevated card component that provides a raised surface for content.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ElevatedCard: import("react").ComponentType<ElevatedCardProps>;
|
|
72
|
+
export type OutlinedCardProps = {
|
|
73
|
+
/**
|
|
74
|
+
* The content to display inside the card.
|
|
75
|
+
*/
|
|
76
|
+
children?: React.ReactNode;
|
|
27
77
|
/**
|
|
28
78
|
* Colors for card's core elements.
|
|
29
79
|
*/
|
|
30
|
-
|
|
80
|
+
colors?: CardColors;
|
|
81
|
+
/**
|
|
82
|
+
* Default elevation in dp.
|
|
83
|
+
*/
|
|
84
|
+
elevation?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Border configuration for the outlined card.
|
|
87
|
+
*/
|
|
88
|
+
border?: CardBorder;
|
|
31
89
|
/**
|
|
32
90
|
* Modifiers for the component.
|
|
33
91
|
*/
|
|
34
|
-
modifiers?:
|
|
92
|
+
modifiers?: ModifierConfig[];
|
|
35
93
|
};
|
|
36
94
|
/**
|
|
37
|
-
*
|
|
95
|
+
* An outlined card component that provides a bordered surface for content.
|
|
38
96
|
*/
|
|
39
|
-
export declare
|
|
97
|
+
export declare const OutlinedCard: import("react").ComponentType<OutlinedCardProps>;
|
|
40
98
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AAsBF,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,0CAA6C,CAAC;AAM/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,kDAA6D,CAAC;AAMvF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,kDAA6D,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ColorValue } from 'react-native';
|
|
2
|
+
import { type ModifierConfig } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Colors for checkbox core elements.
|
|
5
|
+
*/
|
|
6
|
+
export type CheckboxColors = {
|
|
7
|
+
checkedColor?: ColorValue;
|
|
8
|
+
disabledCheckedColor?: ColorValue;
|
|
9
|
+
uncheckedColor?: ColorValue;
|
|
10
|
+
disabledUncheckedColor?: ColorValue;
|
|
11
|
+
checkmarkColor?: ColorValue;
|
|
12
|
+
disabledIndeterminateColor?: ColorValue;
|
|
13
|
+
};
|
|
14
|
+
export type CheckboxProps = {
|
|
15
|
+
/**
|
|
16
|
+
* Indicates whether the checkbox is checked.
|
|
17
|
+
*/
|
|
18
|
+
value: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the checkbox is enabled.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Callback function that is called when the checked state changes.
|
|
26
|
+
*/
|
|
27
|
+
onCheckedChange?: (value: boolean) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Colors for checkbox core elements.
|
|
30
|
+
*/
|
|
31
|
+
colors?: CheckboxColors;
|
|
32
|
+
/**
|
|
33
|
+
* Modifiers for the component.
|
|
34
|
+
*/
|
|
35
|
+
modifiers?: ModifierConfig[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A checkbox component.
|
|
39
|
+
*/
|
|
40
|
+
export declare function Checkbox(props: CheckboxProps): import("react").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* The toggleable state of a tri-state checkbox.
|
|
43
|
+
*/
|
|
44
|
+
export type ToggleableState = 'on' | 'off' | 'indeterminate';
|
|
45
|
+
export type TriStateCheckboxProps = {
|
|
46
|
+
/**
|
|
47
|
+
* The toggleable state of the checkbox: `'on'`, `'off'`, or `'indeterminate'`.
|
|
48
|
+
*/
|
|
49
|
+
state: ToggleableState;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the checkbox is enabled.
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Callback function that is called when the checkbox is clicked.
|
|
57
|
+
*/
|
|
58
|
+
onClick?: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Colors for checkbox core elements.
|
|
61
|
+
*/
|
|
62
|
+
colors?: CheckboxColors;
|
|
63
|
+
/**
|
|
64
|
+
* Modifiers for the component.
|
|
65
|
+
*/
|
|
66
|
+
modifiers?: ModifierConfig[];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A tri-state checkbox component that supports `'on'`, `'off'`, and `'indeterminate'` states.
|
|
70
|
+
* Useful for "select all" patterns where the parent checkbox reflects the state of its children.
|
|
71
|
+
*/
|
|
72
|
+
export declare function TriStateCheckbox(props: TriStateCheckboxProps): import("react").JSX.Element;
|
|
73
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,aAAa,CAAC;AAG7D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,0BAA0B,CAAC,EAAE,UAAU,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAyBF;;GAEG;AACH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