expo-native-sheet-emojis 1.8.0 → 1.8.1
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/README.md
CHANGED
|
@@ -50,6 +50,7 @@ async function pickEmoji() {
|
|
|
50
50
|
const result = await EmojiSheetModule.present({
|
|
51
51
|
theme: 'dark',
|
|
52
52
|
categoryBarPosition: 'top',
|
|
53
|
+
layoutDirection: 'auto',
|
|
53
54
|
});
|
|
54
55
|
|
|
55
56
|
if (!result.cancelled) {
|
|
@@ -70,6 +71,7 @@ function MyComponent() {
|
|
|
70
71
|
<EmojiSheetView
|
|
71
72
|
style={{ flex: 1 }}
|
|
72
73
|
theme="light"
|
|
74
|
+
layoutDirection="auto"
|
|
73
75
|
onEmojiSelected={(emoji) => console.log(emoji)}
|
|
74
76
|
columns={7}
|
|
75
77
|
showSearch={true}
|
|
@@ -309,6 +311,7 @@ A declarative React component that renders the emoji picker inline.
|
|
|
309
311
|
| onDismiss | `() => void` | -- | Called when the picker is dismissed (View API only, not Embedded view) |
|
|
310
312
|
| theme | `EmojiSheetTheme \| 'dark' \| 'light' \| 'system'` | `'light'` | Theme configuration |
|
|
311
313
|
| translations | `EmojiSheetTranslations` | -- | Localized strings |
|
|
314
|
+
| layoutDirection | `'auto' \| 'ltr' \| 'rtl'` | `'auto'` | UI layout direction. `'auto'` follows the device locale; use `'ltr'` or `'rtl'` to force a direction. |
|
|
312
315
|
| categoryBarPosition | `'top' \| 'bottom'` | `'top'` | Position of the category tab bar |
|
|
313
316
|
| columns | `number` | `7` | Number of emoji columns in the grid |
|
|
314
317
|
| emojiSize | `number` | `32` | Size of each emoji cell in points |
|
|
@@ -356,6 +359,7 @@ All theme fields with their purpose:
|
|
|
356
359
|
| theme | `EmojiSheetTheme \| 'dark' \| 'light' \| 'system'` | `'light'` | Theme configuration |
|
|
357
360
|
| translations | `EmojiSheetTranslations` | -- | Localized UI strings |
|
|
358
361
|
| snapPoints | `[number, number]` | `[0.5, 1.0]` | Bottom sheet snap points as screen fractions |
|
|
362
|
+
| layoutDirection | `'auto' \| 'ltr' \| 'rtl'` | `'auto'` | UI layout direction. `'auto'` follows the device locale; use `'ltr'` or `'rtl'` to force a direction. |
|
|
359
363
|
| categoryBarPosition | `'top' \| 'bottom'` | `'top'` | Position of the category tab bar |
|
|
360
364
|
| columns | `number` | `7` | Number of columns in the emoji grid |
|
|
361
365
|
| emojiSize | `number` | `32` | Emoji cell size in points |
|
|
@@ -388,6 +392,22 @@ The category bar can be placed at the **top** or **bottom** of the picker.
|
|
|
388
392
|
|
|
389
393
|
Set via `categoryBarPosition: 'top'` or `categoryBarPosition: 'bottom'` in the options.
|
|
390
394
|
|
|
395
|
+
## Layout Direction
|
|
396
|
+
|
|
397
|
+
The picker supports automatic and forced layout direction:
|
|
398
|
+
|
|
399
|
+
- `auto` (default): Follows the device locale/layout direction
|
|
400
|
+
- `ltr`: Forces a left-to-right layout
|
|
401
|
+
- `rtl`: Forces a right-to-left layout
|
|
402
|
+
|
|
403
|
+
This affects the search bar, category strip, sticky category headers, and overall picker chrome on both iOS and Android.
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
await EmojiSheetModule.present({
|
|
407
|
+
layoutDirection: 'rtl',
|
|
408
|
+
});
|
|
409
|
+
```
|
|
410
|
+
|
|
391
411
|
## Configuration Props
|
|
392
412
|
|
|
393
413
|
| Prop | Type | Default | Description |
|
|
@@ -395,6 +415,7 @@ Set via `categoryBarPosition: 'top'` or `categoryBarPosition: 'bottom'` in the o
|
|
|
395
415
|
| theme | `EmojiSheetTheme \| 'dark' \| 'light' \| 'system'` | `'light'` | Visual theme |
|
|
396
416
|
| translations | `EmojiSheetTranslations` | -- | Localized strings |
|
|
397
417
|
| snapPoints | `[number, number]` | `[0.5, 1.0]` | Sheet snap points |
|
|
418
|
+
| layoutDirection | `'auto' \| 'ltr' \| 'rtl'` | `'auto'` | UI layout direction |
|
|
398
419
|
| categoryBarPosition | `'top' \| 'bottom'` | `'top'` | Category bar placement |
|
|
399
420
|
| columns | `number` | `7` | Grid column count |
|
|
400
421
|
| emojiSize | `number` | `32` | Cell size (points) |
|
|
@@ -60,7 +60,22 @@ class EmojiSearchBar(
|
|
|
60
60
|
}
|
|
61
61
|
addView(searchIcon)
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
editText = EditText(context).apply {
|
|
64
|
+
setBackgroundColor(0x00000000)
|
|
65
|
+
hint = "Search emoji"
|
|
66
|
+
setSingleLine(true)
|
|
67
|
+
textDirection = View.TEXT_DIRECTION_LOCALE
|
|
68
|
+
textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
|
69
|
+
imeOptions = EditorInfo.IME_ACTION_SEARCH
|
|
70
|
+
setTextSize(TypedValue.COMPLEX_UNIT_SP, 15f)
|
|
71
|
+
setPadding((4 * density).toInt(), 0, clearSize + clearMarginEnd, 0)
|
|
72
|
+
val etLp = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
73
|
+
etLp.marginStart = iconWidth
|
|
74
|
+
layoutParams = etLp
|
|
75
|
+
}
|
|
76
|
+
addView(editText)
|
|
77
|
+
|
|
78
|
+
// Add the clear button after the EditText so it stays on top and wins taps.
|
|
64
79
|
clearButton = TextView(context).apply {
|
|
65
80
|
text = "\u2715"
|
|
66
81
|
setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f)
|
|
@@ -81,21 +96,6 @@ class EmojiSearchBar(
|
|
|
81
96
|
}
|
|
82
97
|
addView(clearButton)
|
|
83
98
|
|
|
84
|
-
editText = EditText(context).apply {
|
|
85
|
-
setBackgroundColor(0x00000000)
|
|
86
|
-
hint = "Search emoji"
|
|
87
|
-
setSingleLine(true)
|
|
88
|
-
textDirection = View.TEXT_DIRECTION_LOCALE
|
|
89
|
-
textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
|
90
|
-
imeOptions = EditorInfo.IME_ACTION_SEARCH
|
|
91
|
-
setTextSize(TypedValue.COMPLEX_UNIT_SP, 15f)
|
|
92
|
-
setPadding((4 * density).toInt(), 0, clearSize + clearMarginEnd, 0)
|
|
93
|
-
val etLp = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
94
|
-
etLp.marginStart = iconWidth
|
|
95
|
-
layoutParams = etLp
|
|
96
|
-
}
|
|
97
|
-
addView(editText)
|
|
98
|
-
|
|
99
99
|
editText.setOnFocusChangeListener { _, hasFocus ->
|
|
100
100
|
onFocusChanged?.invoke(hasFocus)
|
|
101
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = 'EmojiSheetModule'
|
|
3
|
-
s.version = '1.8.
|
|
3
|
+
s.version = '1.8.1'
|
|
4
4
|
s.summary = 'Native emoji picker bottom sheet for React Native'
|
|
5
5
|
s.description = 'A fully native iOS/Android emoji picker presented in a bottom sheet with search, skin tones, and theming support.'
|
|
6
6
|
s.author = ''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-native-sheet-emojis",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "A fully native emoji picker bottom sheet for React Native. Built with Swift and Kotlin for maximum performance. Features search with multilingual keywords, skin tones, frequently used tracking, theming, and configurable layout.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|