@expo/ui 0.2.0-beta.0 → 0.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ChipView.kt +186 -0
  4. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +7 -0
  5. package/build/jetpack-compose/Chip/index.d.ts +62 -0
  6. package/build/jetpack-compose/Chip/index.d.ts.map +1 -0
  7. package/build/jetpack-compose/index.d.ts +1 -0
  8. package/build/jetpack-compose/index.d.ts.map +1 -1
  9. package/expo-module.config.json +1 -1
  10. package/ios/Modifiers/ViewModifierRegistry.swift +1 -1
  11. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar → 0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2-sources.jar} +0 -0
  12. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2-sources.jar.md5 +1 -0
  13. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2-sources.jar.sha1 +1 -0
  14. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2-sources.jar.sha256 +1 -0
  15. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2-sources.jar.sha512 +1 -0
  16. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.aar +0 -0
  17. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.aar.md5 +1 -0
  18. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.aar.sha1 +1 -0
  19. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.aar.sha256 +1 -0
  20. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.aar.sha512 +1 -0
  21. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module → 0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module} +22 -22
  22. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module.md5 +1 -0
  23. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module.sha1 +1 -0
  24. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module.sha256 +1 -0
  25. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module.sha512 +1 -0
  26. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom → 0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom} +1 -1
  27. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom.md5 +1 -0
  28. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom.sha1 +1 -0
  29. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom.sha256 +1 -0
  30. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom.sha512 +1 -0
  31. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  32. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  33. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  34. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  35. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  36. package/package.json +2 -2
  37. package/src/jetpack-compose/Chip/index.tsx +101 -0
  38. package/src/jetpack-compose/index.ts +1 -0
  39. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.md5 +0 -1
  40. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha1 +0 -1
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha256 +0 -1
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0-sources.jar.sha512 +0 -1
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar +0 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.md5 +0 -1
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha1 +0 -1
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha256 +0 -1
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.aar.sha512 +0 -1
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.md5 +0 -1
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha1 +0 -1
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha256 +0 -1
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.module.sha512 +0 -1
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.md5 +0 -1
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha1 +0 -1
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha256 +0 -1
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.0/expo.modules.ui-0.2.0-beta.0.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.2.0-beta.2 — 2025-09-12
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 0.2.0-beta.1 — 2025-09-11
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - [iOS] Fix tvOS compilation. ([#39542](https://github.com/expo/expo/pull/39542) by [@douglowder](https://github.com/douglowder))
22
+
13
23
  ## 0.2.0-beta.0 — 2025-09-10
14
24
 
15
25
  ### 🎉 New features
@@ -73,6 +83,7 @@ _This version does not introduce any user-facing changes._
73
83
 
74
84
  - [Android] Add compose modifier support. ([#38630](https://github.com/expo/expo/pull/38630) by [@aleqsio](https://github.com/aleqsio))
75
85
  - [iOS] Add `glassEffect` modifier. ([#38876](https://github.com/expo/expo/pull/38876) by [@nishan](https://github.com/intergalacticspacehighway))
86
+ - [Android] Add Chip component for Android. ([#39094](https://github.com/expo/expo/pull/39094) by [@hryhoriiK97](https://github.com/hryhoriiK97))
76
87
 
77
88
  ## 0.2.0-alpha.0 — 2025-08-13
78
89
 
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
12
12
  apply plugin: 'org.jetbrains.kotlin.plugin.compose'
13
13
 
14
14
  group = 'expo.modules.ui'
15
- version = '0.2.0-beta.0'
15
+ version = '0.2.0-beta.2'
16
16
 
17
17
  android {
18
18
  namespace "expo.modules.ui"
19
19
  defaultConfig {
20
20
  versionCode 1
21
- versionName "0.2.0-beta.0"
21
+ versionName "0.2.0-beta.2"
22
22
  }
23
23
  buildFeatures {
24
24
  compose true
@@ -0,0 +1,186 @@
1
+ package expo.modules.ui
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.layout.*
5
+ import androidx.compose.material3.*
6
+ import androidx.compose.runtime.*
7
+ import androidx.compose.ui.Alignment
8
+ import androidx.compose.ui.Modifier
9
+ import androidx.compose.ui.graphics.Color
10
+ import androidx.compose.ui.text.style.TextAlign
11
+ import androidx.compose.ui.unit.dp
12
+ import expo.modules.kotlin.AppContext
13
+ import expo.modules.kotlin.records.Record
14
+ import expo.modules.kotlin.viewevent.EventDispatcher
15
+ import expo.modules.kotlin.views.ComposeProps
16
+ import expo.modules.kotlin.views.ExpoComposeView
17
+ import java.io.Serializable
18
+
19
+ open class ChipPressedEvent : Record, Serializable
20
+
21
+ data class ChipProps(
22
+ val variant: MutableState<String> = mutableStateOf("assist"),
23
+ val label: MutableState<String> = mutableStateOf(""),
24
+ val leadingIcon: MutableState<String?> = mutableStateOf(null),
25
+ val trailingIcon: MutableState<String?> = mutableStateOf(null),
26
+ val iconSize: MutableState<Int> = mutableIntStateOf(18),
27
+ val textStyle: MutableState<String> = mutableStateOf("labelSmall"),
28
+ val enabled: MutableState<Boolean> = mutableStateOf(true),
29
+ val selected: MutableState<Boolean> = mutableStateOf(false)
30
+ ) : ComposeProps
31
+
32
+ class ChipView(context: Context, appContext: AppContext) :
33
+ ExpoComposeView<ChipProps>(context, appContext, withHostingView = true) {
34
+
35
+ override val props = ChipProps()
36
+
37
+ private val onPress by EventDispatcher<ChipPressedEvent>()
38
+ private val onDismiss by EventDispatcher<ChipPressedEvent>()
39
+
40
+ @OptIn(ExperimentalMaterial3Api::class)
41
+ @Composable
42
+ override fun Content(modifier: Modifier) {
43
+ val variant by props.variant
44
+ val label by props.label
45
+ val leadingIcon by props.leadingIcon
46
+ val trailingIcon by props.trailingIcon
47
+ val iconSize by props.iconSize
48
+ val textStyle by props.textStyle
49
+ val enabled by props.enabled
50
+ val selected by props.selected
51
+
52
+ val chipModifier = modifier
53
+ .padding(4.dp)
54
+ .wrapContentSize(Alignment.Center)
55
+
56
+ @Composable
57
+ fun AssistChipComposable() {
58
+ AssistChip(
59
+ onClick = { onPress.invoke(ChipPressedEvent()) },
60
+ label = { ChipText(label = label, textStyle = textStyle) },
61
+ leadingIcon = {
62
+ leadingIcon?.let {
63
+ ChipIcon(iconName = it, iconSize = iconSize)
64
+ }
65
+ },
66
+ trailingIcon = {
67
+ trailingIcon?.let {
68
+ ChipIcon(iconName = it, iconSize = iconSize)
69
+ }
70
+ },
71
+ enabled = enabled,
72
+ colors = AssistChipDefaults.assistChipColors(),
73
+ border = AssistChipDefaults.assistChipBorder(enabled = enabled),
74
+ modifier = chipModifier
75
+ )
76
+ }
77
+
78
+ @Composable
79
+ fun FilterChipComposable() {
80
+ FilterChip(
81
+ onClick = { onPress.invoke(ChipPressedEvent()) },
82
+ label = { ChipText(label = label, textStyle = textStyle) },
83
+ selected = selected,
84
+ leadingIcon = if (selected) {
85
+ {
86
+ ChipIcon(iconName = "filled.Done", iconSize = iconSize)
87
+ }
88
+ } else null,
89
+ trailingIcon = {
90
+ trailingIcon?.let {
91
+ ChipIcon(iconName = it, iconSize = iconSize)
92
+ }
93
+ },
94
+ enabled = enabled,
95
+ colors = FilterChipDefaults.filterChipColors(),
96
+ border = FilterChipDefaults.filterChipBorder(enabled = enabled, selected = selected),
97
+ modifier = chipModifier
98
+ )
99
+ }
100
+
101
+ @Composable
102
+ fun InputChipComposable() {
103
+ if (!enabled) return
104
+ InputChip(
105
+ onClick = { onDismiss.invoke(ChipPressedEvent()) },
106
+ label = { ChipText(label = label, textStyle = textStyle) },
107
+ enabled = enabled,
108
+ selected = selected,
109
+ avatar = {
110
+ leadingIcon?.let {
111
+ ChipIcon(iconName = it, iconSize = iconSize)
112
+ }
113
+ },
114
+ trailingIcon = {
115
+ ChipIcon(
116
+ iconName = trailingIcon ?: "filled.Close",
117
+ iconSize = iconSize
118
+ )
119
+ },
120
+ modifier = chipModifier
121
+ )
122
+ }
123
+
124
+ @Composable
125
+ fun SuggestionChipComposable() {
126
+ SuggestionChip(
127
+ onClick = { onPress.invoke(ChipPressedEvent()) },
128
+ label = { ChipText(label = label, textStyle = textStyle) },
129
+ icon = {
130
+ leadingIcon?.let {
131
+ ChipIcon(iconName = it, iconSize = iconSize)
132
+ }
133
+ },
134
+ modifier = chipModifier
135
+ )
136
+ }
137
+
138
+ when (variant.lowercase()) {
139
+ "assist" -> AssistChipComposable()
140
+ "filter" -> FilterChipComposable()
141
+ "input" -> InputChipComposable()
142
+ "suggestion" -> SuggestionChipComposable()
143
+ else -> AssistChipComposable()
144
+ }
145
+ }
146
+ }
147
+
148
+ @Composable
149
+ private fun ChipText(label: String, textStyle: String = "labelSmall") {
150
+ Box(
151
+ contentAlignment = Alignment.Center,
152
+ modifier = Modifier.fillMaxSize()
153
+ ) {
154
+ Text(
155
+ text = label,
156
+ style = when (textStyle) {
157
+ "labelSmall" -> MaterialTheme.typography.labelSmall
158
+ "labelMedium" -> MaterialTheme.typography.labelMedium
159
+ "labelLarge" -> MaterialTheme.typography.labelLarge
160
+ "bodySmall" -> MaterialTheme.typography.bodySmall
161
+ "bodyMedium" -> MaterialTheme.typography.bodyMedium
162
+ "bodyLarge" -> MaterialTheme.typography.bodyLarge
163
+ else -> MaterialTheme.typography.labelSmall
164
+ },
165
+ textAlign = TextAlign.Center
166
+ )
167
+ }
168
+ }
169
+ @Composable
170
+ private fun ChipIcon(
171
+ iconName: String,
172
+ iconSize: Int = 18,
173
+ tint: Color = MaterialTheme.colorScheme.primary,
174
+ modifier: Modifier = Modifier
175
+ ) {
176
+ getImageVector(iconName)?.let { imageVector ->
177
+ Icon(
178
+ imageVector = imageVector,
179
+ contentDescription = iconName,
180
+ tint = tint,
181
+ modifier = modifier
182
+ .size(iconSize.dp)
183
+ .padding(end = 4.dp)
184
+ )
185
+ }
186
+ }
@@ -97,6 +97,13 @@ class ExpoUIModule : Module() {
97
97
  )
98
98
  }
99
99
 
100
+ View(ChipView::class) {
101
+ Events(
102
+ "onPress",
103
+ "onDismiss"
104
+ )
105
+ }
106
+
100
107
  Function("padding") { all: Int ->
101
108
  return@Function ExpoModifier(Modifier.padding(Dp(all.toFloat())))
102
109
  }
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ import { ExpoModifier } from '../../types';
4
+ /**
5
+ * Available text style variants for chip labels.
6
+ */
7
+ export type ChipTextStyle = 'labelSmall' | 'labelMedium' | 'labelLarge' | 'bodySmall' | 'bodyMedium' | 'bodyLarge';
8
+ export interface ChipProps extends ViewProps {
9
+ /**
10
+ * The variant of the chip
11
+ */
12
+ variant?: 'assist' | 'filter' | 'input' | 'suggestion';
13
+ /**
14
+ * The text label to display on the chip
15
+ */
16
+ label: string;
17
+ /**
18
+ * Optional leading icon name (using Material Icons). Used for assist, filter, input (avatar icon), and suggestion chips.
19
+ */
20
+ leadingIcon?: string;
21
+ /**
22
+ * Optional trailing icon name (using Material Icons). Used for assist, filter, and input chips. For input chips, defaults to 'filled.Close' if not specified.
23
+ */
24
+ trailingIcon?: string;
25
+ /**
26
+ * Size of the icon in density-independent pixels (dp). Defaults to 18.
27
+ */
28
+ iconSize?: number;
29
+ /**
30
+ * Text style variant for the chip label. Defaults to 'labelSmall'.
31
+ */
32
+ textStyle?: ChipTextStyle;
33
+ /**
34
+ * Whether the chip is enabled and can be clicked. Used for assist, filter and input chips.
35
+ */
36
+ enabled?: boolean;
37
+ /**
38
+ * Whether the chip is selected. Used only for filter chips.
39
+ */
40
+ selected?: boolean;
41
+ /**
42
+ * Modifiers for the component
43
+ */
44
+ modifiers?: ExpoModifier[];
45
+ /**
46
+ * Callback fired when the chip is clicked. Used for assist and filter chips.
47
+ */
48
+ onPress?: () => void;
49
+ /**
50
+ * Callback fired when the chip is dismissed. Only used for input chips.
51
+ */
52
+ onDismiss?: () => void;
53
+ }
54
+ /**
55
+ * @hidden
56
+ */
57
+ export declare function transformChipProps(props: ChipProps): ChipProps;
58
+ /**
59
+ * Displays a native chip component.
60
+ */
61
+ export declare function Chip(props: ChipProps): React.JSX.Element;
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Chip/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAKD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAO9D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAQxD"}
@@ -1,4 +1,5 @@
1
1
  export * from './AlertDialog';
2
+ export * from './Chip';
2
3
  export * from './Button';
3
4
  export * from './ContextMenu';
4
5
  export * from './DatePicker';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "expo.modules.ui",
11
11
  "artifactId": "expo.modules.ui",
12
- "version": "0.2.0-beta.0",
12
+ "version": "0.2.0-beta.2",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -180,7 +180,7 @@ internal struct ForegroundStyleModifier: ViewModifier, Record {
180
180
  case .quaternary:
181
181
  content.foregroundStyle(.quaternary)
182
182
  case .quinary:
183
- if #available(iOS 16.0, *) {
183
+ if #available(iOS 16.0, tvOS 17.0, *) {
184
184
  content.foregroundStyle(.quinary)
185
185
  } else {
186
186
  content.foregroundStyle(.quaternary)
@@ -0,0 +1 @@
1
+ 52f56d8ce78bb4f30f6249844a2c3093b054ef1b2f5ea6ea7d5a12b454f5526b
@@ -0,0 +1 @@
1
+ 7e22d3be8ddd94a0c7a34138f5a59434434110c209a1c67c7875b22adacaeae116e0fcd0713ed8c9a85a11626c2bd585aacb09037377946ce5a48f4e3304a9fa
@@ -0,0 +1 @@
1
+ 7000d36858d8ab31a4505a0c19f9266e4e7e98b7a2fb17b5de6eff8d2a9556bc
@@ -0,0 +1 @@
1
+ 04d36cf0b0c9f7014ce6d036652d34ef3761bb62ba8170fdbfa780d131a47fecb223b4286916dc2275ce3ac6eb3481c4500550ae9239f8d1dd68c084ea128d1e
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "0.2.0-beta.0",
6
+ "version": "0.2.0-beta.2",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.ui-0.2.0-beta.0.aar",
28
- "url": "expo.modules.ui-0.2.0-beta.0.aar",
29
- "size": 291011,
30
- "sha512": "6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6",
31
- "sha256": "58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f",
32
- "sha1": "36d879db9ac35ea3a9ebbd51217ccb375ec59311",
33
- "md5": "7af71bb5bcbff7e9f188026f342b300b"
27
+ "name": "expo.modules.ui-0.2.0-beta.2.aar",
28
+ "url": "expo.modules.ui-0.2.0-beta.2.aar",
29
+ "size": 324202,
30
+ "sha512": "04d36cf0b0c9f7014ce6d036652d34ef3761bb62ba8170fdbfa780d131a47fecb223b4286916dc2275ce3ac6eb3481c4500550ae9239f8d1dd68c084ea128d1e",
31
+ "sha256": "7000d36858d8ab31a4505a0c19f9266e4e7e98b7a2fb17b5de6eff8d2a9556bc",
32
+ "sha1": "22688f17e9f523d3382da309e7d7c5360c28cb6b",
33
+ "md5": "511552fcc9064c335d40f2724d42ca5e"
34
34
  }
35
35
  ]
36
36
  },
@@ -102,13 +102,13 @@
102
102
  ],
103
103
  "files": [
104
104
  {
105
- "name": "expo.modules.ui-0.2.0-beta.0.aar",
106
- "url": "expo.modules.ui-0.2.0-beta.0.aar",
107
- "size": 291011,
108
- "sha512": "6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6",
109
- "sha256": "58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f",
110
- "sha1": "36d879db9ac35ea3a9ebbd51217ccb375ec59311",
111
- "md5": "7af71bb5bcbff7e9f188026f342b300b"
105
+ "name": "expo.modules.ui-0.2.0-beta.2.aar",
106
+ "url": "expo.modules.ui-0.2.0-beta.2.aar",
107
+ "size": 324202,
108
+ "sha512": "04d36cf0b0c9f7014ce6d036652d34ef3761bb62ba8170fdbfa780d131a47fecb223b4286916dc2275ce3ac6eb3481c4500550ae9239f8d1dd68c084ea128d1e",
109
+ "sha256": "7000d36858d8ab31a4505a0c19f9266e4e7e98b7a2fb17b5de6eff8d2a9556bc",
110
+ "sha1": "22688f17e9f523d3382da309e7d7c5360c28cb6b",
111
+ "md5": "511552fcc9064c335d40f2724d42ca5e"
112
112
  }
113
113
  ]
114
114
  },
@@ -122,13 +122,13 @@
122
122
  },
123
123
  "files": [
124
124
  {
125
- "name": "expo.modules.ui-0.2.0-beta.0-sources.jar",
126
- "url": "expo.modules.ui-0.2.0-beta.0-sources.jar",
127
- "size": 18894,
128
- "sha512": "b6fd029855da3e7ceb97e20cf9dbcbf73f0b81342a24eb9e1988d7d05734fb038080702280129e643d1acab4b1ca0d9d2147d54f64906f6824659640bcc12b46",
129
- "sha256": "ab99988e09f8bda506deaa7eded3b45bfa56f444c6f55c78d7814cfb6c40918b",
130
- "sha1": "205cb5aac195bc0632e0fe3d9b0842734ffc8c96",
131
- "md5": "74326687662c24724b38c2a64454fc7d"
125
+ "name": "expo.modules.ui-0.2.0-beta.2-sources.jar",
126
+ "url": "expo.modules.ui-0.2.0-beta.2-sources.jar",
127
+ "size": 20394,
128
+ "sha512": "7e22d3be8ddd94a0c7a34138f5a59434434110c209a1c67c7875b22adacaeae116e0fcd0713ed8c9a85a11626c2bd585aacb09037377946ce5a48f4e3304a9fa",
129
+ "sha256": "52f56d8ce78bb4f30f6249844a2c3093b054ef1b2f5ea6ea7d5a12b454f5526b",
130
+ "sha1": "24aa4b775d293e67addeb4ca62506468ec2d04f8",
131
+ "md5": "85f85abe12b0ab2ecef0554a122d9400"
132
132
  }
133
133
  ]
134
134
  }
@@ -0,0 +1 @@
1
+ a7c73b3e239dda977c76920f6f0533321d90b03e013a5015b941f2c19fef1a71
@@ -0,0 +1 @@
1
+ 597270376cb075bac137d73242675a4718e169a11f5b20e81cab5fa83148af188bd1fae0c2954b1a8b4157a311377b7449c4ac9171b518d4349917efc96934dd
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.ui</groupId>
11
11
  <artifactId>expo.modules.ui</artifactId>
12
- <version>0.2.0-beta.0</version>
12
+ <version>0.2.0-beta.2</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ b54a134b9359a65090dd503b1502593be242e39c4edad9addfba2ba10fdf22f4
@@ -0,0 +1 @@
1
+ 9503271bae88dd7a4d6a5efdb86f788a01682b315787a5a8036d04954917ea8383ba8e6267fb8c482707c0394ef79cd91a2b32ceadc065ecb13b5641426ccb5a
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.ui</groupId>
4
4
  <artifactId>expo.modules.ui</artifactId>
5
5
  <versioning>
6
- <latest>0.2.0-beta.0</latest>
7
- <release>0.2.0-beta.0</release>
6
+ <latest>0.2.0-beta.2</latest>
7
+ <release>0.2.0-beta.2</release>
8
8
  <versions>
9
- <version>0.2.0-beta.0</version>
9
+ <version>0.2.0-beta.2</version>
10
10
  </versions>
11
- <lastUpdated>20250910183907</lastUpdated>
11
+ <lastUpdated>20250912154226</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- dbf3205149ca30c6a46668d9691f009b
1
+ 6a21e746c6c56a1cef3435ba7596affb
@@ -1 +1 @@
1
- d501989b8a9de5c4b65ece81effa74f17ce4f203
1
+ 83341d9931696e20604c02f7f8bc2ff8919b51cc
@@ -1 +1 @@
1
- c15378d73f02ff83387ad8d1f3e6bb8e49f9ceef68a59d4b6aad8d8167022d9c
1
+ 52ff813bf5c181d9617584d12d0b35f6f7812c0c080b06688b0dfc3fe4780ee4
@@ -1 +1 @@
1
- cad5ce054bcf736c04e22ea4541453c5f57d94957538fad7d57e53643a89ce2138dbf7ca3e1ea2dcc664c018c7576463b72abdce354c9048367fb06ac27248e2
1
+ 9026fb57dcf2fb748700bc260f54a011e44c1d9dea1cb48898f408c3ee9256c9789cfdfb1005af55b9eb5968ad92f9344e21a3bbc24d5ec01ee2e2fba2aaf997
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "0.2.0-beta.0",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "A collection of UI components",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -56,5 +56,5 @@
56
56
  "react": "*",
57
57
  "react-native": "*"
58
58
  },
59
- "gitHead": "87186d10c8239c6469e055417e67bd4d0ed63efb"
59
+ "gitHead": "33f49d0f802b101fd61ac0eedcb1ce35b0adde51"
60
60
  }
@@ -0,0 +1,101 @@
1
+ import { requireNativeView } from 'expo';
2
+ import React from 'react';
3
+ import { StyleSheet, ViewProps } from 'react-native';
4
+
5
+ import { ExpoModifier } from '../../types';
6
+
7
+ /**
8
+ * Available text style variants for chip labels.
9
+ */
10
+ export type ChipTextStyle =
11
+ | 'labelSmall'
12
+ | 'labelMedium'
13
+ | 'labelLarge'
14
+ | 'bodySmall'
15
+ | 'bodyMedium'
16
+ | 'bodyLarge';
17
+
18
+ export interface ChipProps extends ViewProps {
19
+ /**
20
+ * The variant of the chip
21
+ */
22
+ variant?: 'assist' | 'filter' | 'input' | 'suggestion';
23
+
24
+ /**
25
+ * The text label to display on the chip
26
+ */
27
+ label: string;
28
+
29
+ /**
30
+ * Optional leading icon name (using Material Icons). Used for assist, filter, input (avatar icon), and suggestion chips.
31
+ */
32
+ leadingIcon?: string;
33
+
34
+ /**
35
+ * Optional trailing icon name (using Material Icons). Used for assist, filter, and input chips. For input chips, defaults to 'filled.Close' if not specified.
36
+ */
37
+ trailingIcon?: string;
38
+
39
+ /**
40
+ * Size of the icon in density-independent pixels (dp). Defaults to 18.
41
+ */
42
+ iconSize?: number;
43
+
44
+ /**
45
+ * Text style variant for the chip label. Defaults to 'labelSmall'.
46
+ */
47
+ textStyle?: ChipTextStyle;
48
+
49
+ /**
50
+ * Whether the chip is enabled and can be clicked. Used for assist, filter and input chips.
51
+ */
52
+ enabled?: boolean;
53
+
54
+ /**
55
+ * Whether the chip is selected. Used only for filter chips.
56
+ */
57
+ selected?: boolean;
58
+
59
+ /**
60
+ * Modifiers for the component
61
+ */
62
+ modifiers?: ExpoModifier[];
63
+
64
+ /**
65
+ * Callback fired when the chip is clicked. Used for assist and filter chips.
66
+ */
67
+ onPress?: () => void;
68
+
69
+ /**
70
+ * Callback fired when the chip is dismissed. Only used for input chips.
71
+ */
72
+ onDismiss?: () => void;
73
+ }
74
+
75
+ // Native component declaration using the same pattern as Button
76
+ const ChipNativeView: React.ComponentType<ChipProps> = requireNativeView('ExpoUI', 'ChipView');
77
+
78
+ /**
79
+ * @hidden
80
+ */
81
+ export function transformChipProps(props: ChipProps): ChipProps {
82
+ const { modifiers, ...restProps } = props;
83
+ return {
84
+ ...restProps,
85
+ // @ts-expect-error
86
+ modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),
87
+ };
88
+ }
89
+
90
+ /**
91
+ * Displays a native chip component.
92
+ */
93
+ export function Chip(props: ChipProps): React.JSX.Element {
94
+ // Min height from https://m3.material.io/components/chips/specs, minWidth
95
+ return (
96
+ <ChipNativeView
97
+ {...transformChipProps(props)}
98
+ style={StyleSheet.compose({ minWidth: 100, height: 32 }, props.style)}
99
+ />
100
+ );
101
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './AlertDialog';
2
+ export * from './Chip';
2
3
  export * from './Button';
3
4
  export * from './ContextMenu';
4
5
  export * from './DatePicker';
@@ -1 +0,0 @@
1
- ab99988e09f8bda506deaa7eded3b45bfa56f444c6f55c78d7814cfb6c40918b
@@ -1 +0,0 @@
1
- b6fd029855da3e7ceb97e20cf9dbcbf73f0b81342a24eb9e1988d7d05734fb038080702280129e643d1acab4b1ca0d9d2147d54f64906f6824659640bcc12b46
@@ -1 +0,0 @@
1
- 58ef0ec293f9b85991b304342c43ce649f2d584533688852d9a1d478cf62686f
@@ -1 +0,0 @@
1
- 6c96517eed68d10b3cfecfe24c26bc2831a2d97698031384d3dc4476522c24dfa33b959ba334f1f0e270a8daf5e9ab4e853f3c65dd19e2980104a497487217f6
@@ -1 +0,0 @@
1
- 5d3185389a12aaaf816139b7fc828fe7a2091aa8327105ddf68d6755421f92ca
@@ -1 +0,0 @@
1
- 7a47fecf74767a09ddf626951308f2b11b8ee7e92463f824fc65f10684c186edee5cf6d8f214863234cb329cc0870cdb2f3411d3d14bcd945dfe3bd7d775e2e4
@@ -1 +0,0 @@
1
- 56e36ab4ccc46af602f0a076fbb3d89e4bdefde72e4199b3d584d1f1da781580
@@ -1 +0,0 @@
1
- f6ede85483da148e5c17c467162570a2ac8308325390be56e811502f213a26f036c68e862caa927b3938c3ddcfb2694924cbc85150da42e950612cedee6efbe0