@expo/ui 55.0.5 → 55.0.6
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 +15 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AlertDialogView.kt +56 -28
- package/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt +9 -1
- package/android/src/main/java/expo/modules/ui/DividerView.kt +21 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +15 -15
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +6 -0
- package/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt +20 -3
- package/android/src/main/java/expo/modules/ui/SlotView.kt +8 -0
- package/android/src/main/java/expo/modules/ui/SurfaceView.kt +88 -11
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +15 -3
- package/android/src/main/java/expo/modules/ui/TextView.kt +145 -12
- package/build/jetpack-compose/AlertDialog/index.d.ts +72 -36
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts +7 -2
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Divider/index.d.ts +20 -5
- package/build/jetpack-compose/Divider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts +34 -9
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts.map +1 -1
- package/build/jetpack-compose/Surface/index.d.ts +52 -2
- package/build/jetpack-compose/Surface/index.d.ts.map +1 -1
- package/build/jetpack-compose/Text/index.d.ts +77 -89
- package/build/jetpack-compose/Text/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextInput/index.d.ts +18 -3
- package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +2 -2
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +5 -0
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +1 -1
- package/build/types.d.ts +26 -0
- package/build/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.5/expo.modules.ui-55.0.5-sources.jar → 55.0.6/expo.modules.ui-55.0.6-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.5/expo.modules.ui-55.0.5.module → 55.0.6/expo.modules.ui-55.0.6.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.5/expo.modules.ui-55.0.5.pom → 55.0.6/expo.modules.ui-55.0.6.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.6/expo.modules.ui-55.0.6.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 +2 -2
- package/src/jetpack-compose/AlertDialog/index.tsx +94 -41
- package/src/jetpack-compose/BasicAlertDialog/index.tsx +9 -2
- package/src/jetpack-compose/Card/index.tsx +4 -2
- package/src/jetpack-compose/Divider/index.tsx +34 -14
- package/src/jetpack-compose/Progress/index.tsx +4 -2
- package/src/jetpack-compose/PullToRefreshBox/index.tsx +35 -18
- package/src/jetpack-compose/Surface/index.tsx +75 -4
- package/src/jetpack-compose/Text/index.tsx +171 -101
- package/src/jetpack-compose/TextInput/index.tsx +38 -8
- package/src/jetpack-compose/index.ts +2 -2
- package/src/jetpack-compose/modifiers/index.ts +10 -0
- package/src/swift-ui/modifiers/index.ts +1 -1
- package/src/types.ts +27 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.5/expo.modules.ui-55.0.5.pom.sha512 +0 -1
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
package expo.modules.ui
|
|
2
2
|
|
|
3
|
+
import android.content.Context
|
|
3
4
|
import android.graphics.Color
|
|
5
|
+
import android.graphics.Typeface
|
|
4
6
|
import androidx.compose.material3.MaterialTheme
|
|
5
7
|
import androidx.compose.material3.Text
|
|
6
8
|
import androidx.compose.runtime.Composable
|
|
9
|
+
import androidx.compose.ui.geometry.Offset
|
|
10
|
+
import androidx.compose.ui.graphics.Shadow
|
|
11
|
+
import androidx.compose.ui.text.AnnotatedString
|
|
12
|
+
import androidx.compose.ui.text.SpanStyle
|
|
7
13
|
import androidx.compose.ui.text.TextStyle
|
|
14
|
+
import androidx.compose.ui.text.buildAnnotatedString
|
|
15
|
+
import androidx.compose.ui.text.font.FontFamily
|
|
8
16
|
import androidx.compose.ui.text.font.FontStyle
|
|
9
17
|
import androidx.compose.ui.text.font.FontWeight
|
|
10
18
|
import androidx.compose.ui.text.style.TextAlign
|
|
11
19
|
import androidx.compose.ui.text.style.TextDecoration
|
|
12
20
|
import androidx.compose.ui.text.style.TextOverflow
|
|
21
|
+
import androidx.compose.ui.text.withStyle
|
|
13
22
|
import androidx.compose.ui.unit.sp
|
|
23
|
+
import com.facebook.react.common.assets.ReactFontManager
|
|
24
|
+
import expo.modules.kotlin.records.Field
|
|
25
|
+
import expo.modules.kotlin.records.Record
|
|
14
26
|
import expo.modules.kotlin.types.Enumerable
|
|
15
27
|
import expo.modules.kotlin.views.ComposeProps
|
|
16
28
|
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
@@ -105,6 +117,50 @@ enum class TextOverflowType(val value: String) : Enumerable {
|
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
|
|
120
|
+
enum class TextLineBreakType(val value: String) : Enumerable {
|
|
121
|
+
SIMPLE("simple"),
|
|
122
|
+
HEADING("heading"),
|
|
123
|
+
PARAGRAPH("paragraph");
|
|
124
|
+
|
|
125
|
+
fun toComposeLineBreak(): androidx.compose.ui.text.style.LineBreak {
|
|
126
|
+
return when (this) {
|
|
127
|
+
SIMPLE -> androidx.compose.ui.text.style.LineBreak.Simple
|
|
128
|
+
HEADING -> androidx.compose.ui.text.style.LineBreak.Heading
|
|
129
|
+
PARAGRAPH -> androidx.compose.ui.text.style.LineBreak.Paragraph
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
fun resolveFontFamily(name: String?, context: Context): FontFamily? {
|
|
135
|
+
if (name == null) return null
|
|
136
|
+
return when (name) {
|
|
137
|
+
"default" -> FontFamily.Default
|
|
138
|
+
"sansSerif" -> FontFamily.SansSerif
|
|
139
|
+
"serif" -> FontFamily.Serif
|
|
140
|
+
"monospace" -> FontFamily.Monospace
|
|
141
|
+
"cursive" -> FontFamily.Cursive
|
|
142
|
+
else -> {
|
|
143
|
+
val typeface = ReactFontManager.getInstance().getTypeface(name, Typeface.NORMAL, context.assets)
|
|
144
|
+
FontFamily(typeface)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
data class TextShadowRecord(
|
|
150
|
+
@Field val color: Color? = null,
|
|
151
|
+
@Field val offsetX: Float? = null,
|
|
152
|
+
@Field val offsetY: Float? = null,
|
|
153
|
+
@Field val blurRadius: Float? = null
|
|
154
|
+
) : Record {
|
|
155
|
+
fun toComposeShadow(): Shadow {
|
|
156
|
+
return Shadow(
|
|
157
|
+
color = colorToComposeColorOrNull(color) ?: androidx.compose.ui.graphics.Color.Black,
|
|
158
|
+
offset = Offset(offsetX ?: 0f, offsetY ?: 0f),
|
|
159
|
+
blurRadius = blurRadius ?: 0f
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
108
164
|
enum class TypographyStyle(val value: String) : Enumerable {
|
|
109
165
|
DISPLAY_LARGE("displayLarge"),
|
|
110
166
|
DISPLAY_MEDIUM("displayMedium"),
|
|
@@ -145,23 +201,85 @@ enum class TypographyStyle(val value: String) : Enumerable {
|
|
|
145
201
|
}
|
|
146
202
|
}
|
|
147
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Shared text and span-level style properties.
|
|
206
|
+
* Both TextSpanRecord and TextProps implement this to ensure style properties
|
|
207
|
+
* are consistent across parent text and nested spans.
|
|
208
|
+
*/
|
|
209
|
+
interface TextSpanStyle {
|
|
210
|
+
val text: String
|
|
211
|
+
val color: Color?
|
|
212
|
+
val fontSize: Float?
|
|
213
|
+
val fontWeight: TextFontWeight?
|
|
214
|
+
val fontStyle: TextFontStyle?
|
|
215
|
+
val fontFamily: String?
|
|
216
|
+
val textDecoration: TextDecorationType?
|
|
217
|
+
val letterSpacing: Float?
|
|
218
|
+
val background: Color?
|
|
219
|
+
val shadow: TextShadowRecord?
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
data class TextSpanRecord(
|
|
223
|
+
@Field override val text: String = "",
|
|
224
|
+
@Field val children: List<TextSpanRecord>? = null,
|
|
225
|
+
@Field override val color: Color? = null,
|
|
226
|
+
@Field override val fontSize: Float? = null,
|
|
227
|
+
@Field override val fontWeight: TextFontWeight? = null,
|
|
228
|
+
@Field override val fontStyle: TextFontStyle? = null,
|
|
229
|
+
@Field override val fontFamily: String? = null,
|
|
230
|
+
@Field override val textDecoration: TextDecorationType? = null,
|
|
231
|
+
@Field override val letterSpacing: Float? = null,
|
|
232
|
+
@Field override val background: Color? = null,
|
|
233
|
+
@Field override val shadow: TextShadowRecord? = null
|
|
234
|
+
) : Record, TextSpanStyle
|
|
235
|
+
|
|
148
236
|
data class TextProps(
|
|
149
|
-
val text: String = "",
|
|
150
|
-
val
|
|
237
|
+
override val text: String = "",
|
|
238
|
+
val spans: List<TextSpanRecord>? = null,
|
|
239
|
+
override val color: Color? = null,
|
|
151
240
|
val typography: TypographyStyle? = null,
|
|
152
|
-
val fontSize: Float? = null,
|
|
153
|
-
val fontWeight: TextFontWeight? = null,
|
|
154
|
-
val fontStyle: TextFontStyle? = null,
|
|
241
|
+
override val fontSize: Float? = null,
|
|
242
|
+
override val fontWeight: TextFontWeight? = null,
|
|
243
|
+
override val fontStyle: TextFontStyle? = null,
|
|
244
|
+
override val fontFamily: String? = null,
|
|
155
245
|
val textAlign: TextAlignType? = null,
|
|
156
|
-
val textDecoration: TextDecorationType? = null,
|
|
157
|
-
val letterSpacing: Float? = null,
|
|
246
|
+
override val textDecoration: TextDecorationType? = null,
|
|
247
|
+
override val letterSpacing: Float? = null,
|
|
158
248
|
val lineHeight: Float? = null,
|
|
249
|
+
val lineBreak: TextLineBreakType? = null,
|
|
250
|
+
override val background: Color? = null,
|
|
251
|
+
override val shadow: TextShadowRecord? = null,
|
|
159
252
|
val overflow: TextOverflowType? = null,
|
|
160
253
|
val softWrap: Boolean? = null,
|
|
161
254
|
val maxLines: Int? = null,
|
|
162
255
|
val minLines: Int? = null,
|
|
163
256
|
val modifiers: ModifierList = emptyList()
|
|
164
|
-
) : ComposeProps
|
|
257
|
+
) : ComposeProps, TextSpanStyle
|
|
258
|
+
|
|
259
|
+
private fun AnnotatedString.Builder.appendSpans(spans: List<TextSpanRecord>, context: Context?) {
|
|
260
|
+
for (span in spans) {
|
|
261
|
+
val style = SpanStyle(
|
|
262
|
+
color = colorToComposeColorOrNull(span.color) ?: androidx.compose.ui.graphics.Color.Unspecified,
|
|
263
|
+
fontSize = span.fontSize?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified,
|
|
264
|
+
fontWeight = span.fontWeight?.toComposeFontWeight(),
|
|
265
|
+
fontStyle = span.fontStyle?.toComposeFontStyle(),
|
|
266
|
+
fontFamily = context?.let { resolveFontFamily(span.fontFamily, it) },
|
|
267
|
+
textDecoration = span.textDecoration?.toComposeTextDecoration(),
|
|
268
|
+
letterSpacing = span.letterSpacing?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified,
|
|
269
|
+
background = colorToComposeColorOrNull(span.background) ?: androidx.compose.ui.graphics.Color.Unspecified,
|
|
270
|
+
shadow = span.shadow?.toComposeShadow()
|
|
271
|
+
)
|
|
272
|
+
if (span.children != null) {
|
|
273
|
+
withStyle(style) {
|
|
274
|
+
appendSpans(span.children, context)
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
withStyle(style) {
|
|
278
|
+
append(span.text)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
165
283
|
|
|
166
284
|
@Composable
|
|
167
285
|
fun FunctionalComposableScope.TextContent(props: TextProps) {
|
|
@@ -171,19 +289,34 @@ fun FunctionalComposableScope.TextContent(props: TextProps) {
|
|
|
171
289
|
// Merge base style with custom properties
|
|
172
290
|
val mergedStyle = baseStyle.merge(
|
|
173
291
|
TextStyle(
|
|
292
|
+
color = colorToComposeColor(props.color),
|
|
174
293
|
fontSize = props.fontSize?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified,
|
|
175
294
|
fontWeight = props.fontWeight?.toComposeFontWeight(),
|
|
176
295
|
fontStyle = props.fontStyle?.toComposeFontStyle(),
|
|
296
|
+
fontFamily = appContext.reactContext?.let { resolveFontFamily(props.fontFamily, it) },
|
|
177
297
|
textDecoration = props.textDecoration?.toComposeTextDecoration(),
|
|
178
298
|
letterSpacing = props.letterSpacing?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified,
|
|
179
|
-
lineHeight = props.lineHeight?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified
|
|
299
|
+
lineHeight = props.lineHeight?.sp ?: androidx.compose.ui.unit.TextUnit.Unspecified,
|
|
300
|
+
lineBreak = props.lineBreak?.toComposeLineBreak() ?: androidx.compose.ui.text.style.LineBreak.Unspecified,
|
|
301
|
+
background = colorToComposeColorOrNull(props.background) ?: androidx.compose.ui.graphics.Color.Unspecified,
|
|
302
|
+
shadow = props.shadow?.toComposeShadow()
|
|
180
303
|
)
|
|
181
304
|
)
|
|
182
305
|
|
|
306
|
+
val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
307
|
+
|
|
308
|
+
val textValue = if (props.spans != null) {
|
|
309
|
+
val context = appContext.reactContext
|
|
310
|
+
buildAnnotatedString {
|
|
311
|
+
appendSpans(props.spans, context)
|
|
312
|
+
}
|
|
313
|
+
} else {
|
|
314
|
+
AnnotatedString(props.text)
|
|
315
|
+
}
|
|
316
|
+
|
|
183
317
|
Text(
|
|
184
|
-
text =
|
|
185
|
-
modifier =
|
|
186
|
-
color = colorToComposeColor(props.color),
|
|
318
|
+
text = textValue,
|
|
319
|
+
modifier = modifier,
|
|
187
320
|
textAlign = props.textAlign?.toComposeTextAlign(),
|
|
188
321
|
overflow = props.overflow?.toComposeTextOverflow() ?: TextOverflow.Clip,
|
|
189
322
|
softWrap = props.softWrap ?: true,
|
|
@@ -1,62 +1,98 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { type ModifierConfig, type DialogProperties } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Colors for the alert dialog, matching `AlertDialogDefaults` in Compose.
|
|
5
|
+
*/
|
|
6
|
+
export type AlertDialogColors = {
|
|
4
7
|
/**
|
|
5
|
-
* The background color of the
|
|
8
|
+
* The background color of the dialog.
|
|
6
9
|
*/
|
|
7
10
|
containerColor?: ColorValue;
|
|
8
11
|
/**
|
|
9
|
-
* The
|
|
10
|
-
*/
|
|
11
|
-
contentColor?: ColorValue;
|
|
12
|
-
};
|
|
13
|
-
export type AlertDialogProps = {
|
|
14
|
-
/**
|
|
15
|
-
* The title of the alert dialog.
|
|
12
|
+
* The color of the icon.
|
|
16
13
|
*/
|
|
17
|
-
|
|
14
|
+
iconContentColor?: ColorValue;
|
|
18
15
|
/**
|
|
19
|
-
* The
|
|
16
|
+
* The color of the title text.
|
|
20
17
|
*/
|
|
21
|
-
|
|
18
|
+
titleContentColor?: ColorValue;
|
|
22
19
|
/**
|
|
23
|
-
* The
|
|
20
|
+
* The color of the body text.
|
|
24
21
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
dismissButtonText?: string;
|
|
22
|
+
textContentColor?: ColorValue;
|
|
23
|
+
};
|
|
24
|
+
export type AlertDialogProps = {
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
26
|
+
* Colors for the alert dialog.
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
colors?: AlertDialogColors;
|
|
34
29
|
/**
|
|
35
|
-
* The
|
|
30
|
+
* The tonal elevation of the dialog in dp, which affects its background color
|
|
31
|
+
* based on the color scheme.
|
|
36
32
|
*/
|
|
37
|
-
|
|
33
|
+
tonalElevation?: number;
|
|
38
34
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* @default false
|
|
35
|
+
* Properties for the dialog window.
|
|
42
36
|
*/
|
|
43
|
-
|
|
37
|
+
properties?: DialogProperties;
|
|
44
38
|
/**
|
|
45
|
-
* Callback that is called when the user tries to
|
|
39
|
+
* Callback that is called when the user tries to dismiss the dialog
|
|
40
|
+
* (for example, by tapping outside of it or pressing the back button).
|
|
46
41
|
*/
|
|
47
|
-
|
|
42
|
+
onDismissRequest?: () => void;
|
|
48
43
|
/**
|
|
49
|
-
*
|
|
44
|
+
* Modifiers for the component.
|
|
50
45
|
*/
|
|
51
|
-
|
|
46
|
+
modifiers?: ModifierConfig[];
|
|
52
47
|
/**
|
|
53
|
-
*
|
|
48
|
+
* Children containing slot sub-components (`AlertDialog.Title`, `AlertDialog.Text`,
|
|
49
|
+
* `AlertDialog.ConfirmButton`, `AlertDialog.DismissButton`, `AlertDialog.Icon`).
|
|
54
50
|
*/
|
|
55
|
-
|
|
51
|
+
children?: React.ReactNode;
|
|
56
52
|
};
|
|
57
|
-
export type NativeAlertDialogProps = AlertDialogProps;
|
|
58
53
|
/**
|
|
59
|
-
*
|
|
54
|
+
* The title slot of the `AlertDialog`.
|
|
55
|
+
*/
|
|
56
|
+
declare function AlertDialogTitle(props: {
|
|
57
|
+
children: React.ReactNode;
|
|
58
|
+
}): import("react").JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* The text (body) slot of the `AlertDialog`.
|
|
61
|
+
*/
|
|
62
|
+
declare function AlertDialogText(props: {
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}): import("react").JSX.Element;
|
|
65
|
+
/**
|
|
66
|
+
* The confirm button slot of the `AlertDialog`.
|
|
67
|
+
*/
|
|
68
|
+
declare function AlertDialogConfirmButton(props: {
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
}): import("react").JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* The dismiss button slot of the `AlertDialog`.
|
|
73
|
+
*/
|
|
74
|
+
declare function AlertDialogDismissButton(props: {
|
|
75
|
+
children: React.ReactNode;
|
|
76
|
+
}): import("react").JSX.Element;
|
|
77
|
+
/**
|
|
78
|
+
* The icon slot of the `AlertDialog`.
|
|
79
|
+
*/
|
|
80
|
+
declare function AlertDialogIcon(props: {
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* Renders an `AlertDialog` component with slot-based content matching the Compose API.
|
|
85
|
+
* Content is provided via slot sub-components: `AlertDialog.Title`, `AlertDialog.Text`,
|
|
86
|
+
* `AlertDialog.ConfirmButton`, `AlertDialog.DismissButton`, and `AlertDialog.Icon`.
|
|
60
87
|
*/
|
|
61
|
-
|
|
88
|
+
declare function AlertDialogComponent(props: AlertDialogProps): import("react").JSX.Element;
|
|
89
|
+
declare namespace AlertDialogComponent {
|
|
90
|
+
var Title: typeof AlertDialogTitle;
|
|
91
|
+
var Text: typeof AlertDialogText;
|
|
92
|
+
var ConfirmButton: typeof AlertDialogConfirmButton;
|
|
93
|
+
var DismissButton: typeof AlertDialogDismissButton;
|
|
94
|
+
var Icon: typeof AlertDialogIcon;
|
|
95
|
+
}
|
|
96
|
+
export { AlertDialogComponent as AlertDialog };
|
|
97
|
+
export type { DialogProperties };
|
|
62
98
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/AlertDialog/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/AlertDialog/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,gBAAgB,CAAC,EAAE,UAAU,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA2BF;;GAEG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE7D;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE5D;AAED;;GAEG;AACH,iBAAS,wBAAwB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAErE;AAED;;GAEG;AACH,iBAAS,wBAAwB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAErE;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE5D;AAED;;;;GAIG;AACH,iBAAS,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,+BAGpD;kBAHQ,oBAAoB;;;;;;;AAW7B,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,CAAC;AAG/C,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ModifierConfig, type DialogProperties } from '../../types';
|
|
2
2
|
export type BasicAlertDialogProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The content to display inside the dialog.
|
|
@@ -9,14 +9,19 @@ export type BasicAlertDialogProps = {
|
|
|
9
9
|
* (e.g. by tapping outside of it or pressing the back button).
|
|
10
10
|
*/
|
|
11
11
|
onDismissRequest?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Properties for the dialog window.
|
|
14
|
+
*/
|
|
15
|
+
properties?: DialogProperties;
|
|
12
16
|
/**
|
|
13
17
|
* Modifiers for the component.
|
|
14
18
|
*/
|
|
15
|
-
modifiers?:
|
|
19
|
+
modifiers?: ModifierConfig[];
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
22
|
* A basic alert dialog that provides a blank container for custom content.
|
|
19
23
|
* Unlike `AlertDialog`, this component does not have structured title/text/buttons slots.
|
|
20
24
|
*/
|
|
21
25
|
export declare function BasicAlertDialog(props: BasicAlertDialogProps): import("react").JSX.Element;
|
|
26
|
+
export type { DialogProperties };
|
|
22
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/BasicAlertDialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/BasicAlertDialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAyBF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D;AAGD,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -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,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;C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,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"}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { type ColorValue } from 'react-native';
|
|
2
|
+
import { type ModifierConfig } from '../../types';
|
|
3
|
+
export type DividerCommonConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* Thickness of the divider line. Accepts dp values; use `StyleSheet.hairlineWidth` for a single-pixel line.
|
|
6
|
+
*/
|
|
7
|
+
thickness?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Color of the divider line.
|
|
10
|
+
*/
|
|
11
|
+
color?: ColorValue;
|
|
3
12
|
/**
|
|
4
13
|
* Modifiers for the component.
|
|
5
14
|
*/
|
|
6
|
-
modifiers?:
|
|
15
|
+
modifiers?: ModifierConfig[];
|
|
7
16
|
};
|
|
8
17
|
/**
|
|
9
|
-
* A
|
|
18
|
+
* A horizontal divider line that groups content in lists and layouts,
|
|
19
|
+
* matching Compose's `HorizontalDivider`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const HorizontalDivider: import("react").ComponentType<DividerCommonConfig>;
|
|
22
|
+
/**
|
|
23
|
+
* A vertical divider line that groups content in layouts,
|
|
24
|
+
* matching Compose's `VerticalDivider`.
|
|
10
25
|
*/
|
|
11
|
-
export declare
|
|
26
|
+
export declare const VerticalDivider: import("react").ComponentType<DividerCommonConfig>;
|
|
12
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Divider/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Divider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAuBF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,oDAAkD,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,eAAe,oDAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/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,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CA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AClB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,+DAErC,CAAC;AAMF,MAAM,MAAM,gCAAgC,GAAG,oBAAoB,GAAG;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,iEACsD,CAAC;AAM/F,MAAM,MAAM,kCAAkC,GAAG,oBAAoB,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,qDACwD,CAAC"}
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ColorValue } from 'react-native';
|
|
2
|
+
import { type ModifierConfig } from '../../types';
|
|
3
|
+
import { type ContentAlignment } from '../layout-types';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the loading indicator shown during pull-to-refresh.
|
|
6
|
+
*/
|
|
7
|
+
export type PullToRefreshIndicatorProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Color of the loading indicator spinner.
|
|
10
|
+
* @default MaterialTheme.colorScheme.primary
|
|
11
|
+
*/
|
|
12
|
+
color?: ColorValue;
|
|
13
|
+
/**
|
|
14
|
+
* Background color of the loading indicator container.
|
|
15
|
+
* @default MaterialTheme.colorScheme.surfaceContainerHigh
|
|
16
|
+
*/
|
|
17
|
+
containerColor?: ColorValue;
|
|
18
|
+
/**
|
|
19
|
+
* Modifiers for the loading indicator.
|
|
20
|
+
*/
|
|
21
|
+
modifiers?: ModifierConfig[];
|
|
22
|
+
};
|
|
2
23
|
export type PullToRefreshBoxProps = {
|
|
3
24
|
/**
|
|
4
25
|
* Whether the content is refreshing.
|
|
@@ -6,26 +27,30 @@ export type PullToRefreshBoxProps = {
|
|
|
6
27
|
*/
|
|
7
28
|
isRefreshing?: boolean;
|
|
8
29
|
/**
|
|
9
|
-
* Callback
|
|
30
|
+
* Callback that is called when the user pulls to refresh.
|
|
10
31
|
*/
|
|
11
32
|
onRefresh?: () => void;
|
|
12
33
|
/**
|
|
13
|
-
*
|
|
34
|
+
* Alignment of children within the box.
|
|
35
|
+
* @default 'topStart'
|
|
14
36
|
*/
|
|
15
|
-
|
|
37
|
+
contentAlignment?: ContentAlignment;
|
|
16
38
|
/**
|
|
17
|
-
*
|
|
18
|
-
|
|
39
|
+
* Configuration for the loading indicator shown during pull-to-refresh.
|
|
40
|
+
*/
|
|
41
|
+
indicator?: PullToRefreshIndicatorProps;
|
|
42
|
+
/**
|
|
43
|
+
* Modifiers for the component.
|
|
19
44
|
*/
|
|
20
|
-
|
|
45
|
+
modifiers?: ModifierConfig[];
|
|
21
46
|
/**
|
|
22
47
|
* The content to refresh.
|
|
23
48
|
*/
|
|
24
49
|
children: React.ReactNode;
|
|
25
50
|
};
|
|
26
51
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
52
|
+
* A pull-to-refresh container that wraps scrollable content and shows a refresh indicator when pulled,
|
|
53
|
+
* matching Compose's `PullToRefreshBox`.
|
|
29
54
|
*/
|
|
30
55
|
export declare function PullToRefreshBox(props: PullToRefreshBoxProps): import("react").JSX.Element;
|
|
31
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/PullToRefreshBox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/PullToRefreshBox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAsBF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAE5D"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ColorValue } from 'react-native';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ModifierConfig } from '../../types';
|
|
4
|
+
import { ShapeJSXElement } from '../Shape';
|
|
5
|
+
/**
|
|
6
|
+
* Border stroke configuration.
|
|
7
|
+
*/
|
|
8
|
+
export type SurfaceBorder = {
|
|
9
|
+
/**
|
|
10
|
+
* Border width in dp.
|
|
11
|
+
* @default 1
|
|
12
|
+
*/
|
|
13
|
+
width?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Border color.
|
|
16
|
+
* @default MaterialTheme.colorScheme.outline
|
|
17
|
+
*/
|
|
18
|
+
color?: ColorValue;
|
|
19
|
+
};
|
|
4
20
|
export type SurfaceProps = {
|
|
5
21
|
/**
|
|
6
22
|
* The content to display inside the surface.
|
|
@@ -29,10 +45,44 @@ export type SurfaceProps = {
|
|
|
29
45
|
* @default 0
|
|
30
46
|
*/
|
|
31
47
|
shadowElevation?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Shape configuration for clipping the surface.
|
|
50
|
+
*/
|
|
51
|
+
shape?: ShapeJSXElement;
|
|
52
|
+
/**
|
|
53
|
+
* Border stroke drawn around the surface.
|
|
54
|
+
*/
|
|
55
|
+
border?: SurfaceBorder;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the surface is enabled and responds to user interaction.
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
enabled?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the surface is in a selected state. When provided together with `onClick`,
|
|
64
|
+
* the surface becomes a selectable surface that visually reflects its selection state.
|
|
65
|
+
*/
|
|
66
|
+
selected?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the surface is in a checked (toggled on) state. When provided together with
|
|
69
|
+
* `onCheckedChange`, the surface becomes a toggleable surface.
|
|
70
|
+
*/
|
|
71
|
+
checked?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Called when the surface is clicked. Providing this callback makes the surface clickable.
|
|
74
|
+
* When combined with `selected`, the surface becomes a selectable variant.
|
|
75
|
+
*/
|
|
76
|
+
onClick?: () => void;
|
|
77
|
+
/**
|
|
78
|
+
* Called when the checked state of a toggleable surface changes.
|
|
79
|
+
* Providing this callback together with `checked` enables the toggleable variant.
|
|
80
|
+
*/
|
|
81
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
32
82
|
/**
|
|
33
83
|
* Modifiers for the component.
|
|
34
84
|
*/
|
|
35
|
-
modifiers?:
|
|
85
|
+
modifiers?: ModifierConfig[];
|
|
36
86
|
};
|
|
37
87
|
/**
|
|
38
88
|
* A Material Design surface container. Surface is responsible for:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Surface/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRo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