@lotics/ui 1.13.0 → 1.13.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.
- package/package.json +10 -7
- package/src/picker.tsx +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotics/ui",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./tokens": "./src/tokens.ts",
|
|
@@ -151,15 +151,15 @@
|
|
|
151
151
|
},
|
|
152
152
|
"license": "MIT",
|
|
153
153
|
"peerDependencies": {
|
|
154
|
+
"@react-native-picker/picker": ">=2.0.0",
|
|
155
|
+
"expo-image": ">=3.0.0",
|
|
156
|
+
"lucide-react": ">=0.460.0",
|
|
157
|
+
"lucide-react-native": ">=0.460.0",
|
|
154
158
|
"react": "^19.2.0",
|
|
155
159
|
"react-dom": "^19.2.0",
|
|
156
|
-
"react-native": ">=0.
|
|
157
|
-
"react-native-web": ">=0.20.0",
|
|
158
|
-
"lucide-react-native": ">=0.460.0",
|
|
159
|
-
"lucide-react": ">=0.460.0",
|
|
160
|
+
"react-native": ">=0.85.0",
|
|
160
161
|
"react-native-svg": ">=15.0.0",
|
|
161
|
-
"
|
|
162
|
-
"@react-native-picker/picker": ">=2.0.0",
|
|
162
|
+
"react-native-web": ">=0.20.0",
|
|
163
163
|
"recharts": ">=3.0.0"
|
|
164
164
|
},
|
|
165
165
|
"peerDependenciesMeta": {
|
|
@@ -183,5 +183,8 @@
|
|
|
183
183
|
"typecheck": "tsgo --noEmit",
|
|
184
184
|
"lint": "oxlint",
|
|
185
185
|
"test": "vitest run"
|
|
186
|
+
},
|
|
187
|
+
"devDependencies": {
|
|
188
|
+
"recharts": "^3.8.1"
|
|
186
189
|
}
|
|
187
190
|
}
|
package/src/picker.tsx
CHANGED
|
@@ -109,7 +109,12 @@ function StandardPicker<T extends string>(props: PickerProps<T, false>) {
|
|
|
109
109
|
placeholder={placeholder}
|
|
110
110
|
enabled={!disabled}
|
|
111
111
|
>
|
|
112
|
-
{(!value || includeEmptyOption) &&
|
|
112
|
+
{(!value || includeEmptyOption) && (
|
|
113
|
+
// Show the placeholder as the empty option (the standard
|
|
114
|
+
// `<option value="" selected>Placeholder</option>` pattern) so a
|
|
115
|
+
// native select hints what to choose.
|
|
116
|
+
<RNPicker.Item label={!value ? (placeholder ?? "") : ""} value="" />
|
|
117
|
+
)}
|
|
113
118
|
{options.map((option) =>
|
|
114
119
|
option ? (
|
|
115
120
|
<RNPicker.Item
|
|
@@ -259,6 +264,13 @@ function PickerTrigger<T extends string>({
|
|
|
259
264
|
<Pressable
|
|
260
265
|
ref={ref}
|
|
261
266
|
testID={testID}
|
|
267
|
+
// Without a role this Pressable renders as an unfocusable <div> on web —
|
|
268
|
+
// the trigger drops out of the tab order and Enter/Space can't open it.
|
|
269
|
+
// `button` makes it tab-focusable and maps keyboard activation to onPress;
|
|
270
|
+
// `expanded` announces open/closed to assistive tech. The accessible name
|
|
271
|
+
// comes from the visible selection/placeholder text below.
|
|
272
|
+
accessibilityRole="button"
|
|
273
|
+
accessibilityState={{ expanded: open, disabled }}
|
|
262
274
|
style={[
|
|
263
275
|
styles.pressable,
|
|
264
276
|
open && !enableSearch && styles.opened,
|