@expo/ui 0.2.0-beta.2 → 0.2.0-beta.4
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 +25 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ChipView.kt +5 -2
- package/android/src/main/java/expo/modules/ui/button/Button.kt +19 -8
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +26 -4
- package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +2 -0
- package/build/jetpack-compose/Button/index.d.ts +14 -2
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Button/types.d.ts +1 -1
- package/build/jetpack-compose/Button/types.d.ts.map +1 -1
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts +17 -0
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +1 -0
- package/build/jetpack-compose/ContextMenu/index.d.ts +3 -15
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/ContextMenu/utils.d.ts.map +1 -1
- package/build/swift-ui/Button/index.d.ts +6 -5
- package/build/swift-ui/Button/index.d.ts.map +1 -1
- package/build/swift-ui/ContentUnavailableView/index.d.ts +2 -1
- package/build/swift-ui/ContentUnavailableView/index.d.ts.map +1 -1
- package/build/swift-ui/Image/index.d.ts +2 -1
- package/build/swift-ui/Image/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.d.ts +2 -1
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/LabeledContent/index.d.ts +16 -0
- package/build/swift-ui/LabeledContent/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +1 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +17 -10
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Button/Button.swift +7 -2
- package/ios/ExpoUIModule.swift +1 -0
- package/ios/LabeledContentView.swift +27 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +21 -0
- 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 → 0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.module → 0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.2/expo.modules.ui-0.2.0-beta.2.pom → 0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.4/expo.modules.ui-0.2.0-beta.4.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 -3
- package/src/jetpack-compose/Button/index.tsx +21 -4
- package/src/jetpack-compose/Button/types.ts +3 -0
- package/src/jetpack-compose/ContextMenu/Submenu.tsx +21 -0
- package/src/jetpack-compose/ContextMenu/index.tsx +3 -19
- package/src/jetpack-compose/ContextMenu/utils.ts +3 -2
- package/src/swift-ui/Button/index.tsx +6 -5
- package/src/swift-ui/ContentUnavailableView/index.tsx +2 -1
- package/src/swift-ui/Image/index.tsx +2 -1
- package/src/swift-ui/Label/index.tsx +2 -1
- package/src/swift-ui/LabeledContent/index.tsx +34 -0
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/modifiers/index.ts +36 -10
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* This system allows both built-in and 3rd party modifiers to use the same API.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { ColorValue } from 'react-native';
|
|
7
|
+
|
|
6
8
|
import { animation } from './animation/index';
|
|
7
9
|
import { createModifier, ModifierConfig } from './createModifier';
|
|
8
10
|
|
|
@@ -17,6 +19,28 @@ function createModifierWithEventListener(
|
|
|
17
19
|
return { $type: type, ...params, eventListener };
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
type NamedColor =
|
|
23
|
+
| 'primary'
|
|
24
|
+
| 'secondary'
|
|
25
|
+
| 'red'
|
|
26
|
+
| 'orange'
|
|
27
|
+
| 'yellow'
|
|
28
|
+
| 'green'
|
|
29
|
+
| 'blue'
|
|
30
|
+
| 'purple'
|
|
31
|
+
| 'pink'
|
|
32
|
+
| 'white'
|
|
33
|
+
| 'gray'
|
|
34
|
+
| 'black'
|
|
35
|
+
| 'clear'
|
|
36
|
+
| 'mint'
|
|
37
|
+
| 'teal'
|
|
38
|
+
| 'cyan'
|
|
39
|
+
| 'indigo'
|
|
40
|
+
| 'brown';
|
|
41
|
+
|
|
42
|
+
type Color = string | ColorValue | NamedColor;
|
|
43
|
+
|
|
20
44
|
// =============================================================================
|
|
21
45
|
// Built-in Modifier Functions
|
|
22
46
|
// =============================================================================
|
|
@@ -25,7 +49,7 @@ function createModifierWithEventListener(
|
|
|
25
49
|
* Sets the background of a view.
|
|
26
50
|
* @param color - The background color (hex string, e.g., '#FF0000')
|
|
27
51
|
*/
|
|
28
|
-
export const background = (color:
|
|
52
|
+
export const background = (color: Color) => createModifier('background', { color });
|
|
29
53
|
|
|
30
54
|
/**
|
|
31
55
|
* Applies corner radius to a view.
|
|
@@ -36,7 +60,7 @@ export const cornerRadius = (radius: number) => createModifier('cornerRadius', {
|
|
|
36
60
|
/**
|
|
37
61
|
* Adds a shadow to a view.
|
|
38
62
|
*/
|
|
39
|
-
export const shadow = (params: { radius: number; x?: number; y?: number; color?:
|
|
63
|
+
export const shadow = (params: { radius: number; x?: number; y?: number; color?: Color }) =>
|
|
40
64
|
createModifier('shadow', params);
|
|
41
65
|
|
|
42
66
|
/**
|
|
@@ -85,9 +109,11 @@ export const padding = (params: {
|
|
|
85
109
|
|
|
86
110
|
/**
|
|
87
111
|
* Controls fixed size behavior.
|
|
88
|
-
* @param
|
|
112
|
+
* @param horizontal - Whether the view should use its ideal width
|
|
113
|
+
* @param vertical - Whether the view should use its ideal height
|
|
89
114
|
*/
|
|
90
|
-
export const fixedSize = (
|
|
115
|
+
export const fixedSize = (params?: { horizontal?: boolean; vertical?: boolean }) =>
|
|
116
|
+
createModifier('fixedSize', params);
|
|
91
117
|
|
|
92
118
|
/**
|
|
93
119
|
* Adds a tap gesture recognizer.
|
|
@@ -128,7 +154,7 @@ export const clipShape = (
|
|
|
128
154
|
/**
|
|
129
155
|
* Adds a border to a view.
|
|
130
156
|
*/
|
|
131
|
-
export const border = (params: { color:
|
|
157
|
+
export const border = (params: { color: Color; width?: number }) =>
|
|
132
158
|
createModifier('border', params);
|
|
133
159
|
|
|
134
160
|
/**
|
|
@@ -153,7 +179,7 @@ export const offset = (params: { x?: number; y?: number }) => createModifier('of
|
|
|
153
179
|
* @param color - The foreground color (hex string)
|
|
154
180
|
* @deprecated Use foregroundStyle instead
|
|
155
181
|
*/
|
|
156
|
-
export const foregroundColor = (color:
|
|
182
|
+
export const foregroundColor = (color: Color) => createModifier('foregroundColor', { color });
|
|
157
183
|
|
|
158
184
|
/**
|
|
159
185
|
* Sets the foreground style of a view with comprehensive styling options.
|
|
@@ -274,7 +300,7 @@ export const foregroundStyle = (
|
|
|
274
300
|
* Sets the tint color of a view.
|
|
275
301
|
* @param color - The tint color (hex string)
|
|
276
302
|
*/
|
|
277
|
-
export const tint = (color:
|
|
303
|
+
export const tint = (color: Color) => createModifier('tint', { color });
|
|
278
304
|
|
|
279
305
|
/**
|
|
280
306
|
* Hides or shows a view.
|
|
@@ -371,7 +397,7 @@ export const mask = (shape: 'rectangle' | 'circle' | 'roundedRectangle', cornerR
|
|
|
371
397
|
* @param alignment - Overlay alignment
|
|
372
398
|
*/
|
|
373
399
|
export const overlay = (params: {
|
|
374
|
-
color?:
|
|
400
|
+
color?: Color;
|
|
375
401
|
alignment?: 'center' | 'top' | 'bottom' | 'leading' | 'trailing';
|
|
376
402
|
}) => createModifier('overlay', params);
|
|
377
403
|
|
|
@@ -381,7 +407,7 @@ export const overlay = (params: {
|
|
|
381
407
|
* @param alignment - Background alignment
|
|
382
408
|
*/
|
|
383
409
|
export const backgroundOverlay = (params: {
|
|
384
|
-
color?:
|
|
410
|
+
color?: Color;
|
|
385
411
|
alignment?: 'center' | 'top' | 'bottom' | 'leading' | 'trailing';
|
|
386
412
|
}) => createModifier('backgroundOverlay', params);
|
|
387
413
|
|
|
@@ -406,7 +432,7 @@ export const glassEffect = (params?: {
|
|
|
406
432
|
glass?: {
|
|
407
433
|
variant: 'regular' | 'clear' | 'identity';
|
|
408
434
|
interactive?: boolean;
|
|
409
|
-
tint?:
|
|
435
|
+
tint?: Color;
|
|
410
436
|
};
|
|
411
437
|
shape?: 'circle' | 'capsule' | 'rectangle' | 'ellipse';
|
|
412
438
|
}) => createModifier('glassEffect', params);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
85f85abe12b0ab2ecef0554a122d9400
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
24aa4b775d293e67addeb4ca62506468ec2d04f8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
52f56d8ce78bb4f30f6249844a2c3093b054ef1b2f5ea6ea7d5a12b454f5526b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7e22d3be8ddd94a0c7a34138f5a59434434110c209a1c67c7875b22adacaeae116e0fcd0713ed8c9a85a11626c2bd585aacb09037377946ce5a48f4e3304a9fa
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
511552fcc9064c335d40f2724d42ca5e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22688f17e9f523d3382da309e7d7c5360c28cb6b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7000d36858d8ab31a4505a0c19f9266e4e7e98b7a2fb17b5de6eff8d2a9556bc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
04d36cf0b0c9f7014ce6d036652d34ef3761bb62ba8170fdbfa780d131a47fecb223b4286916dc2275ce3ac6eb3481c4500550ae9239f8d1dd68c084ea128d1e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3f9a9d035d2367a31e965c4ebf5b605c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
644261077073c451f6e464c72829c7e6fafbf8ef
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a7c73b3e239dda977c76920f6f0533321d90b03e013a5015b941f2c19fef1a71
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
597270376cb075bac137d73242675a4718e169a11f5b20e81cab5fa83148af188bd1fae0c2954b1a8b4157a311377b7449c4ac9171b518d4349917efc96934dd
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
92ea4c0165d3c06a52f0026f51cb5892
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4c492136ff1cdd26a6017bfb68e6276092a2c31b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b54a134b9359a65090dd503b1502593be242e39c4edad9addfba2ba10fdf22f4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9503271bae88dd7a4d6a5efdb86f788a01682b315787a5a8036d04954917ea8383ba8e6267fb8c482707c0394ef79cd91a2b32ceadc065ecb13b5641426ccb5a
|