@expo/ui 58.0.25 → 58.0.27

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 (91) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +50 -0
  4. package/android/src/main/java/expo/modules/ui/SplitButtonLayoutView.kt +94 -0
  5. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuGroup.kt +36 -0
  6. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +27 -8
  7. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuPopup.kt +28 -0
  8. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +13 -0
  9. package/android/src/main/java/expo/modules/ui/menu/SelectableDropdownMenuItem.kt +93 -0
  10. package/build/community/datetime-picker/DateTimePicker.android.js +1 -0
  11. package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
  12. package/build/jetpack-compose/DatePicker/index.d.ts +2 -2
  13. package/build/jetpack-compose/DatePicker/index.js +1 -1
  14. package/build/jetpack-compose/DatePicker/index.js.map +1 -1
  15. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +10 -0
  16. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js +12 -0
  17. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js.map +1 -1
  18. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.d.ts +89 -0
  19. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js +80 -0
  20. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js.map +1 -0
  21. package/build/jetpack-compose/DropdownMenu/index.d.ts +91 -0
  22. package/build/jetpack-compose/DropdownMenu/index.js +33 -0
  23. package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
  24. package/build/jetpack-compose/SplitButtonLayout/index.d.ts +102 -0
  25. package/build/jetpack-compose/SplitButtonLayout/index.js +68 -0
  26. package/build/jetpack-compose/SplitButtonLayout/index.js.map +1 -0
  27. package/build/jetpack-compose/index.d.ts +1 -0
  28. package/build/jetpack-compose/index.js +1 -0
  29. package/build/jetpack-compose/index.js.map +1 -1
  30. package/build/universal/TextInput/index.android.d.ts +1 -1
  31. package/build/universal/TextInput/index.android.js +7 -2
  32. package/build/universal/TextInput/index.android.js.map +1 -1
  33. package/build/universal/TextInput/index.d.ts +1 -1
  34. package/build/universal/TextInput/index.ios.d.ts +1 -1
  35. package/build/universal/TextInput/index.ios.js +3 -2
  36. package/build/universal/TextInput/index.ios.js.map +1 -1
  37. package/build/universal/TextInput/index.js +2 -1
  38. package/build/universal/TextInput/index.js.map +1 -1
  39. package/build/universal/TextInput/types.d.ts +4 -0
  40. package/build/universal/TextInput/types.js.map +1 -1
  41. package/ios/HostView.swift +6 -6
  42. package/ios/UniversalLayout.swift +51 -19
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25-sources.jar → 58.0.27/expo.modules.ui-58.0.27-sources.jar} +0 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.md5 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha1 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha256 +1 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha512 +1 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar +0 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.md5 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha1 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha256 +1 -0
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha512 +1 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25.module → 58.0.27/expo.modules.ui-58.0.27.module} +22 -22
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.md5 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha1 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha256 +1 -0
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha512 +1 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.25/expo.modules.ui-58.0.25.pom → 58.0.27/expo.modules.ui-58.0.27.pom} +1 -1
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.md5 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha1 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha256 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha512 +1 -0
  63. package/package.json +2 -2
  64. package/src/community/datetime-picker/DateTimePicker.android.tsx +2 -1
  65. package/src/jetpack-compose/DatePicker/index.tsx +4 -4
  66. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +18 -0
  67. package/src/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.tsx +149 -0
  68. package/src/jetpack-compose/DropdownMenu/index.tsx +147 -0
  69. package/src/jetpack-compose/SplitButtonLayout/index.tsx +182 -0
  70. package/src/jetpack-compose/index.ts +1 -0
  71. package/src/universal/TextInput/index.android.tsx +7 -1
  72. package/src/universal/TextInput/index.ios.tsx +3 -0
  73. package/src/universal/TextInput/index.tsx +2 -0
  74. package/src/universal/TextInput/types.ts +5 -0
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.md5 +0 -1
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha1 +0 -1
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha256 +0 -1
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha512 +0 -1
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar +0 -0
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.md5 +0 -1
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha1 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha256 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha512 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.md5 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha1 +0 -1
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha256 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha512 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.md5 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha1 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha256 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha512 +0 -1
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SecureField, Text, TextField, useNativeState } from '@expo/ui/swift-ui';
3
- import { autocorrectionDisabled, disabled as disabledMod, foregroundStyle, keyboardType as keyboardTypeMod, lineLimit, multilineTextAlignment, onGeometryChange, onSubmit, submitLabel, textContentType, textInputAutocapitalization, tint } from '@expo/ui/swift-ui/modifiers';
3
+ import { accessibilityLabel as accessibilityLabelMod, autocorrectionDisabled, disabled as disabledMod, foregroundStyle, keyboardType as keyboardTypeMod, lineLimit, multilineTextAlignment, onGeometryChange, onSubmit, submitLabel, textContentType, textInputAutocapitalization, tint } from '@expo/ui/swift-ui/modifiers';
4
4
  import { useImperativeHandle, useRef } from 'react';
5
5
  import { transformToModifiers } from '../transformStyle';
6
6
  import { autoCompleteToTextContentType, enterKeyHintToReturnKeyType, inputModeToKeyboardType, resolveEditable } from './utils';
@@ -17,7 +17,7 @@ function mapKeyboardType(value) {
17
17
  if (value === 'visible-password') return 'default';
18
18
  return value;
19
19
  }
20
- export function TextInput({ ref, value, onChangeText, placeholder, autoFocus, editable: editableProp, multiline, keyboardType: keyboardTypeProp, autoCapitalize, autoCorrect, returnKeyType: returnKeyTypeProp, onSubmitEditing, onFocus, onBlur, cursorColor, textAlign, readOnly, inputMode, enterKeyHint, defaultValue, numberOfLines: numberOfLinesProp, rows, testID, placeholderTextColor, style, textStyle, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selection, onSelectionChange, selectTextOnFocus, modifiers: userModifiers }) {
20
+ export function TextInput({ ref, value, onChangeText, placeholder, accessibilityLabel, autoFocus, editable: editableProp, multiline, keyboardType: keyboardTypeProp, autoCapitalize, autoCorrect, returnKeyType: returnKeyTypeProp, onSubmitEditing, onFocus, onBlur, cursorColor, textAlign, readOnly, inputMode, enterKeyHint, defaultValue, numberOfLines: numberOfLinesProp, rows, testID, placeholderTextColor, style, textStyle, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selection, onSelectionChange, selectTextOnFocus, modifiers: userModifiers }) {
21
21
  const editable = resolveEditable(editableProp, readOnly);
22
22
  const keyboardType = keyboardTypeProp ?? inputModeToKeyboardType(inputMode);
23
23
  const returnKeyType = returnKeyTypeProp ?? enterKeyHintToReturnKeyType(enterKeyHint);
@@ -68,6 +68,7 @@ export function TextInput({ ref, value, onChangeText, placeholder, autoFocus, ed
68
68
  textStyle
69
69
  })
70
70
  ];
71
+ if (accessibilityLabel !== undefined) modifiers.push(accessibilityLabelMod(accessibilityLabel));
71
72
  if (editable === false) modifiers.push(disabledMod(true));
72
73
  if (keyboardType) modifiers.push(keyboardTypeMod(mapKeyboardType(keyboardType)));
73
74
  if (autoCapitalize) {
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/TextInput/index.ios.tsx"],"sourcesContent":[null],"names":["SecureField","Text","TextField","useNativeState","autocorrectionDisabled","disabled","disabledMod","foregroundStyle","keyboardType","keyboardTypeMod","lineLimit","multilineTextAlignment","onGeometryChange","onSubmit","submitLabel","textContentType","textInputAutocapitalization","tint","useImperativeHandle","useRef","transformToModifiers","autoCompleteToTextContentType","enterKeyHintToReturnKeyType","inputModeToKeyboardType","resolveEditable","mapReturnKeyType","value","mapKeyboardType","TextInput","ref","onChangeText","placeholder","autoFocus","editable","editableProp","multiline","keyboardTypeProp","autoCapitalize","autoCorrect","returnKeyType","returnKeyTypeProp","onSubmitEditing","onFocus","onBlur","cursorColor","textAlign","readOnly","inputMode","enterKeyHint","defaultValue","numberOfLines","numberOfLinesProp","rows","testID","placeholderTextColor","style","textStyle","secureTextEntry","autoComplete","onContentSizeChange","maxLength","caretHidden","selectionColor","selection","onSelectionChange","selectTextOnFocus","modifiers","userModifiers","initialFallbackRef","fallback","current","state","textFieldRef","secureFieldRef","isFocusedRef","focus","blur","clear","isFocused","setSelection","start","end","__DEV__","console","warn","Promise","resolve","handleFocusChange","focused","length","undefined","componentName","push","reservesSpace","mappedContentType","text","onTextChange","onFocusChange","Placeholder","axis"],"mappings":";AAAA,SACEA,WAAW,EAEXC,IAAI,EACJC,SAAS,EAETC,cAAc,QACT,oBAAoB;AAC3B,SACEC,sBAAsB,EACtBC,YAAYC,WAAW,EACvBC,eAAe,EACfC,gBAAgBC,eAAe,EAC/BC,SAAS,EACTC,sBAAsB,EACtBC,gBAAgB,EAChBC,QAAQ,EACRC,WAAW,EACXC,eAAe,EACfC,2BAA2B,EAC3BC,IAAI,QAEC,8BAA8B;AACrC,SAASC,mBAAmB,EAAEC,MAAM,QAAQ,QAAQ;AAGpD,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SACEC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,uBAAuB,EACvBC,eAAe,QACV,UAAU;AAKjB,SAASC,iBAAiBC,KAA2B;IACnD,IAAIA,UAAU,YAAYA,UAAU,SAAS,OAAO;IACpD,IACEA,UAAU,aACVA,UAAU,UACVA,UAAU,cACVA,UAAU,kBACV;QACA,OAAO;IACT;IACA,OAAOA;AACT;AAEA,SAASC,gBAAgBD,KAA0B;IACjD,IAAIA,UAAU,WAAW,OAAO;IAChC,IAAIA,UAAU,cAAc,OAAO;IACnC,IAAIA,UAAU,oBAAoB,OAAO;IACzC,OAAOA;AACT;AAEA,OAAO,SAASE,UAAU,EACxBC,GAAG,EACHH,KAAK,EACLI,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,UAAUC,YAAY,EACtBC,SAAS,EACT3B,cAAc4B,gBAAgB,EAC9BC,cAAc,EACdC,WAA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Aae,iBAAiBA,gBAAgB,GAAG;QACnDgB,UAAU0B,IAAI,CAAClF,UAAUwC,eAAe;YAAE2C,eAAe;QAAK;IAChE;IACA,MAAMC,oBAAoBzE,8BAA8BqC;IACxD,IAAIoC,mBAAmB;QACrB5B,UAAU0B,IAAI,CAAC7E,gBAAgB+E;IACjC;IACA,IAAInC,qBAAqBO,UAAU0B,IAAI,CAAChF,iBAAiB+C;IAEzD,IAAIF,iBAAiB;QACnB,qBACE,KAACzD;YACC6B,KAAK4C;YACLsB,MAAMxB;YACNxC,aAAaA;YACbC,WAAWA;YACXgE,cAAclE;YACdmE,eAAeV;YACf3B,WAAWA;YACXM,WAAWA,UAAUuB,MAAM,GAAG,IAAIvB,YAAYwB;YAC9CrC,QAAQA;sBACPC,wBAAwBvB,4BACvB,KAAC/B,YAAYkG,WAAW;0BACtB,cAAA,KAACjG;oBAAKiE,WAAW;wBAAC3D,gBAAgB+C;qBAAsB;8BAAGvB;;iBAE3D;;IAGV;IAEA,qBACE,KAAC7B;QACC2B,KAAK2C;QACLuB,MAAMxB;QACNxC,aAAaA;QACbC,WAAWA;QACXmE,MAAMhE,YAAY,aAAa;QAC/B6D,cAAclE;QACdmE,eAAeV;QACfxB,WAAWA;QACXC,mBAAmBA;QACnBJ,WAAWA;QACXM,WAAWA,UAAUuB,MAAM,GAAG,IAAIvB,YAAYwB;QAC9CrC,QAAQA;kBACPC,wBAAwBvB,4BACvB,KAAC7B,UAAUgG,WAAW;sBACpB,cAAA,KAACjG;gBAAKiE,WAAW;oBAAC3D,gBAAgB+C;iBAAsB;0BAAGvB;;aAE3D;;AAGV;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/TextInput/index.ios.tsx"],"sourcesContent":[null],"names":["SecureField","Text","TextField","useNativeState","accessibilityLabel","accessibilityLabelMod","autocorrectionDisabled","disabled","disabledMod","foregroundStyle","keyboardType","keyboardTypeMod","lineLimit","multilineTextAlignment","onGeometryChange","onSubmit","submitLabel","textContentType","textInputAutocapitalization","tint","useImperativeHandle","useRef","transformToModifiers","autoCompleteToTextContentType","enterKeyHintToReturnKeyType","inputModeToKeyboardType","resolveEditable","mapReturnKeyType","value","mapKeyboardType","TextInput","ref","onChangeText","placeholder","autoFocus","editable","editableProp","multiline","keyboardTypeProp","autoCapitalize","autoCorrect","returnKeyType","returnKeyTypeProp","onSubmitEditing","onFocus","onBlur","cursorColor","textAlign","readOnly","inputMode","enterKeyHint","defaultValue","numberOfLines","numberOfLinesProp","rows","testID","placeholderTextColor","style","textStyle","secureTextEntry","autoComplete","onContentSizeChange","maxLength","caretHidden","selectionColor","selection","onSelectionChange","selectTextOnFocus","modifiers","userModifiers","initialFallbackRef","fallback","current","state","textFieldRef","secureFieldRef","isFocusedRef","focus","blur","clear","isFocused","setSelection","start","end","__DEV__","console","warn","Promise","resolve","handleFocusChange","focused","length","undefined","componentName","push","reservesSpace","mappedContentType","text","onTextChange","onFocusChange","Placeholder","axis"],"mappings":";AAAA,SACEA,WAAW,EAEXC,IAAI,EACJC,SAAS,EAETC,cAAc,QACT,oBAAoB;AAC3B,SACEC,sBAAsBC,qBAAqB,EAC3CC,sBAAsB,EACtBC,YAAYC,WAAW,EACvBC,eAAe,EACfC,gBAAgBC,eAAe,EAC/BC,SAAS,EACTC,sBAAsB,EACtBC,gBAAgB,EAChBC,QAAQ,EACRC,WAAW,EACXC,eAAe,EACfC,2BAA2B,EAC3BC,IAAI,QAEC,8BAA8B;AACrC,SAASC,mBAAmB,EAAEC,MAAM,QAAQ,QAAQ;AAGpD,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SACEC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,uBAAuB,EACvBC,eAAe,QACV,UAAU;AAKjB,SAASC,iBAAiBC,KAA2B;IACnD,IAAIA,UAAU,YAAYA,UAAU,SAAS,OAAO;IACpD,IACEA,UAAU,aACVA,UAAU,UACVA,UAAU,cACVA,UAAU,kBACV;QACA,OAAO;IACT;IACA,OAAOA;AACT;AAEA,S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9CrC,QAAQA;kBACPC,wBAAwBvB,4BACvB,KAAC/B,UAAUkG,WAAW;sBACpB,cAAA,KAACnG;gBAAKmE,WAAW;oBAAC3D,gBAAgB+C;iBAAsB;0BAAGvB;;aAE3D;;AAGV;AAEA,cAAc,UAAU"}
@@ -33,7 +33,7 @@ const styles = StyleSheet.create({
33
33
  paddingVertical: 11
34
34
  }
35
35
  });
36
- export function TextInput({ ref, value, onChangeText, placeholder, autoFocus, editable, multiline, keyboardType, autoCapitalize, autoCorrect, returnKeyType, onSubmitEditing, onFocus, onBlur, cursorColor, textAlign, readOnly, inputMode, enterKeyHint, defaultValue, numberOfLines, rows, testID, placeholderTextColor, style, textStyle, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selection, onSelectionChange, selectTextOnFocus }) {
36
+ export function TextInput({ ref, value, onChangeText, placeholder, accessibilityLabel, autoFocus, editable, multiline, keyboardType, autoCapitalize, autoCorrect, returnKeyType, onSubmitEditing, onFocus, onBlur, cursorColor, textAlign, readOnly, inputMode, enterKeyHint, defaultValue, numberOfLines, rows, testID, placeholderTextColor, style, textStyle, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selection, onSelectionChange, selectTextOnFocus }) {
37
37
  const [focused, setFocused] = useState(false);
38
38
  const initialFallbackRef = useRef(defaultValue ?? '');
39
39
  const fallback = useNativeState(initialFallbackRef.current);
@@ -67,6 +67,7 @@ export function TextInput({ ref, value, onChangeText, placeholder, autoFocus, ed
67
67
  ref: innerRef,
68
68
  value: state.value,
69
69
  placeholder: placeholder,
70
+ accessibilityLabel: accessibilityLabel,
70
71
  placeholderTextColor: placeholderTextColor ?? colors.gray[500],
71
72
  autoFocus: autoFocus,
72
73
  editable: editable,
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/TextInput/index.tsx"],"sourcesContent":[null],"names":["useImperativeHandle","useRef","useState","TextInput","RNTextInput","StyleSheet","useNativeState","colors","durations","easings","shadows","styles","create","input","backgroundColor","background","borderColor","gray","borderRadius","borderStyle","borderWidth","boxShadow","boxSizing","color","display","fontSize","height","outlineStyle","outlineWidth","paddingHorizontal","paddingVertical","transitionDuration","fast","transitionProperty","transitionTimingFunction","standard","focused","primary","focus","multiline","ref","value","onChangeText","placeholder","autoFocus","editable","keyboardType","autoCapitalize","autoCorrect","returnKeyType","onSubmitEditing","onFocus","onBlur","cursorColor","textAlign","readOnly","inputMode","enterKeyHint","defaultValue","numberOfLines","rows","testID","placeholderTextColor","style","textStyle","secureTextEntry","autoComplete","onContentSizeChange","maxLength","caretHidden","selectionColor","selection","onSelectionChange","selectTextOnFocus","setFocused","initialFallbackRef","fallback","current","state","innerRef","Promise","resolve","blur","clear","isFocused","setSelection","start","end","e","nativeEvent","text","undefined","contentSize","next"],"mappings":";AAAA,SAASA,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC9D,SAASC,aAAaC,WAAW,EAAEC,UAAU,QAAQ,eAAe;AAEpE,SAASC,cAAc,QAAQ,WAAW;AAC1C,SAASC,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,OAAO,QAAQ,cAAc;AAGlE,MAAMC,SAASN,WAAWO,MAAM,CAAC;IAC/BC,OAAO;QACLC,iBAAiBP,OAAOQ,UAAU;QAClCC,aAAaT,OAAOU,IAAI,CAAC,IAAI;QAC7BC,cAAc;QACdC,aAAa;QACbC,aAAa;QACbC,WAAWX,QAAQG,KAAK;QACxBS,WAAW;QACXC,OAAOhB,OAAOU,IAAI,CAAC,IAAI;QACvBO,SAAS;QACTC,UAAU;QACVC,QAAQ;QACRC,cAAc;QACdC,cAAc;QACdC,mBAAmB;QACnBC,iBAAiB;QACjBC,oBAAoBvB,UAAUwB,IAAI;QAClCC,oBAAoB;QACpBC,0BAA0BzB,QAAQ0B,QAAQ;IAC5C;IACAC,SAAS;QACPpB,aAAaT,OAAO8B,OAAO,CAAC,IAAI;QAChChB,WAAWX,QAAQ4B,KAAK;IAC1B;IACAC,WAA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BAAsBA,wBAAwBvD,OAAOU,IAAI,CAAC,IAAI;QAC9D2B,WAAWA;QACXC,UAAUA;QACVU,UAAUA;QACVhB,WAAWA;QACXoB,eAAeA,iBAAiBC;QAChCK,iBAAiBA;QACjBC,cAAcA;QACdE,WAAWA;QACXC,aAAaA;QACbC,gBAAgBA;QAChBT,QAAQA;QACRf,cAAcA;QACdU,WAAWA;QACXT,gBAAgBA;QAChBC,aAAaA;QACbC,eAAeA;QACfQ,cAAcA;QACdJ,aAAaA;QACbH,iBAAiBA,kBAAkB,CAACsC,IAAMtC,gBAAgBsC,EAAEC,WAAW,CAACC,IAAI,IAAIC;QAChFxC,SAAS;YACPuB,WAAW;YACXvB;QACF;QACAC,QAAQ;YACNsB,WAAW;YACXtB;QACF;QACAV,cAAc,CAACgD;YACbZ,MAAMrC,KAAK,GAAGiD;YACdhD,eAAegD;QACjB;QACAvB,qBACEA,sBAAsB,CAACqB,IAAMrB,oBAAoBqB,EAAEC,WAAW,CAACG,WAAW,IAAID;QAEhFlB,mBAAmBA;QACnBF,WAAWA,WAAW9B;QACtB+B,mBACEA,oBACI,CAACgB;YACC,MAAMK,OAAOL,EAAEC,WAAW,CAAClB,SAAS;YACpC,IAAIA,WAAWA,UAAU9B,KAAK,GAAGoD;YACjCrB,kBAAkBqB;QACpB,IACAtB,YACE,CAACiB;YACCjB,UAAU9B,KAAK,GAAG+C,EAAEC,WAAW,CAAClB,SAAS;QAC3C,IACAoB;QAER5B,OAAO;YACLpD,OAAOE,KAAK;YACZuB,WAAWzB,OAAOyB,OAAO;YACzBG,aAAa5B,OAAO4B,SAAS;YAC7BwB;YACAC;YACAV,aAAaA,cAAc,SAAS;gBAAEA;YAAU,IAAI;SACrD;;AAGP;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/TextInput/index.tsx"],"sourcesContent":[null],"names":["useImperativeHandle","useRef","useState","TextInput","RNTextInput","StyleSheet","useNativeState","colors","durations","easings","shadows","styles","create","input","backgroundColor","background","borderColor","gray","borderRadius","borderStyle","borderWidth","boxShadow","boxSizing","color","display","fontSize","height","outlineStyle","outlineWidth","paddingHorizontal","paddingVertical","transitionDuration","fast","transitionProperty","transitionTimingFunction","standard","focused","primary","focus","multiline","ref","value","onChangeText","placeholder","accessibilityLabel","autoFocus","editable","keyboardType","autoCapitalize","autoCorrect","returnKeyType","onSubmitEditing","onFocus","onBlur","cursorColor","textAlign","readOnly","inputMode","enterKeyHint","defaultValue","numberOfLines","rows","testID","placeholderTextColor","style","textStyle","secureTextEntry","autoComplete","onContentSizeChange","maxLength","caretHidden","selectionColor","selection","onSelectionChange","selectTextOnFocus","setFocused","initialFallbackRef","fallback","current","state","innerRef","Promise","resolve","blur","clear","isFocused","setSelection","start","end","e","nativeEvent","text","undefined","contentSize","next"],"mappings":";AAAA,SAASA,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC9D,SAASC,aAAaC,WAAW,EAAEC,UAAU,QAAQ,eAAe;AAEpE,SAASC,cAAc,QAAQ,WAAW;AAC1C,SAASC,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAEC,OAAO,QAAQ,cAAc;AAGlE,MAAMC,SAASN,WAAWO,MAAM,CAAC;IAC/BC,OAAO;QACLC,iBAAiBP,OAAOQ,UAAU;QAClCC,aAAaT,OAAOU,IAAI,CAAC,IAAI;QAC7BC,cAAc;QACdC,aAAa;QACbC,aAAa;QACbC,WAAWX,QAAQG,KAAK;QACxBS,WAAW;QACXC,OAAOhB,OAAOU,IAAI,CAAC,IAAI;QACvBO,SAAS;QACTC,UAAU;QACVC,QAAQ;QACRC,cAAc;QACdC,cAAc;QACdC,mBAAmB;QACnBC,iBAAiB;QACjBC,oBAAoBvB,UAAUwB,IAAI;QAClCC,oBAAoB;QACpBC,0BAA0BzB,QAAQ0B,QAAQ;IAC5C;IACAC,SAAS;QACPpB,aAAaT,OAAO8B,OAAO,CAAC,IAAI;QAChChB,WAAWX,QAAQ4B,KAAK;IAC1B;IACAC,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BE,aAAaA;QACbC,oBAAoBA;QACpBmB,sBAAsBA,wBAAwBxD,OAAOU,IAAI,CAAC,IAAI;QAC9D4B,WAAWA;QACXC,UAAUA;QACVU,UAAUA;QACVjB,WAAWA;QACXqB,eAAeA,iBAAiBC;QAChCK,iBAAiBA;QACjBC,cAAcA;QACdE,WAAWA;QACXC,aAAaA;QACbC,gBAAgBA;QAChBT,QAAQA;QACRf,cAAcA;QACdU,WAAWA;QACXT,gBAAgBA;QAChBC,aAAaA;QACbC,eAAeA;QACfQ,cAAcA;QACdJ,aAAaA;QACbH,iBAAiBA,kBAAkB,CAACsC,IAAMtC,gBAAgBsC,EAAEC,WAAW,CAACC,IAAI,IAAIC;QAChFxC,SAAS;YACPuB,WAAW;YACXvB;QACF;QACAC,QAAQ;YACNsB,WAAW;YACXtB;QACF;QACAX,cAAc,CAACiD;YACbZ,MAAMtC,KAAK,GAAGkD;YACdjD,eAAeiD;QACjB;QACAvB,qBACEA,sBAAsB,CAACqB,IAAMrB,oBAAoBqB,EAAEC,WAAW,CAACG,WAAW,IAAID;QAEhFlB,mBAAmBA;QACnBF,WAAWA,WAAW/B;QACtBgC,mBACEA,oBACI,CAACgB;YACC,MAAMK,OAAOL,EAAEC,WAAW,CAAClB,SAAS;YACpC,IAAIA,WAAWA,UAAU/B,KAAK,GAAGqD;YACjCrB,kBAAkBqB;QACpB,IACAtB,YACE,CAACiB;YACCjB,UAAU/B,KAAK,GAAGgD,EAAEC,WAAW,CAAClB,SAAS;QAC3C,IACAoB;QAER5B,OAAO;YACLrD,OAAOE,KAAK;YACZuB,WAAWzB,OAAOyB,OAAO;YACzBG,aAAa5B,OAAO4B,SAAS;YAC7ByB;YACAC;YACAV,aAAaA,cAAc,SAAS;gBAAEA;YAAU,IAAI;SACrD;;AAGP;AAEA,cAAc,UAAU"}
@@ -45,6 +45,10 @@ export interface TextInputProps {
45
45
  * Placeholder text shown when the field is empty.
46
46
  */
47
47
  placeholder?: string;
48
+ /**
49
+ * Label announced by screen readers, including when the field contains text.
50
+ */
51
+ accessibilityLabel?: string;
48
52
  /**
49
53
  * If true, focuses the input on mount.
50
54
  * @default false
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/TextInput/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA4BA;;CAEC,GACD,WAoQC"}
1
+ {"version":3,"sources":["universal/TextInput/types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA4BA;;CAEC,GACD,WAyQC"}
@@ -268,14 +268,14 @@ private struct FillAlignmentModifier: ViewModifier {
268
268
 
269
269
  func body(content: Content) -> some View {
270
270
  if fillHorizontal || fillVertical || pinHorizontal || pinVertical {
271
- // A `matchContents` axis needs a `0` minimum as well. Without it the frame keeps the
272
- // content's own size whenever that size is larger than the proposal, and the hosting
273
- // controller centers the overflow instead of keeping it at `alignment`. The proposal is
274
- // smaller on every frame where the hosting view still has the previous content size.
271
+ // When the content is larger than the proposal (a safe-area inset covers the host, or a
272
+ // `matchContents` host still has the previous content size), the `0` minimums keep the
273
+ // frame at the proposed size. Otherwise the frame grows to the content, and the hosting
274
+ // controller centers it instead of keeping it at `alignment`.
275
275
  content.frame(
276
- minWidth: pinHorizontal ? 0 : nil,
276
+ minWidth: fillHorizontal || pinHorizontal ? 0 : nil,
277
277
  maxWidth: fillHorizontal || pinHorizontal ? .infinity : nil,
278
- minHeight: pinVertical ? 0 : nil,
278
+ minHeight: fillVertical || pinVertical ? 0 : nil,
279
279
  maxHeight: fillVertical || pinVertical ? .infinity : nil,
280
280
  alignment: alignment
281
281
  )
@@ -179,6 +179,13 @@ internal struct ParentAwareHStackLayout: Layout {
179
179
  )
180
180
  }
181
181
 
182
+ // A `Spacer` reads the orientation and grows only along the stack axis.
183
+ static var layoutProperties: LayoutProperties {
184
+ var properties = LayoutProperties()
185
+ properties.stackOrientation = .horizontal
186
+ return properties
187
+ }
188
+
182
189
  func makeCache(subviews: Subviews) -> StackLayoutCache {
183
190
  StackLayoutCache()
184
191
  }
@@ -217,6 +224,13 @@ internal struct ParentAwareVStackLayout: Layout {
217
224
  )
218
225
  }
219
226
 
227
+ // A `Spacer` reads the orientation and grows only along the stack axis.
228
+ static var layoutProperties: LayoutProperties {
229
+ var properties = LayoutProperties()
230
+ properties.stackOrientation = .vertical
231
+ return properties
232
+ }
233
+
220
234
  func makeCache(subviews: Subviews) -> StackLayoutCache {
221
235
  StackLayoutCache()
222
236
  }
@@ -333,6 +347,9 @@ private struct MeasuredChild {
333
347
  var canCompress: Bool
334
348
  var priority: Double
335
349
  var maxMain: CGFloat
350
+ /// Main size of a flexible child at a zero offer, such as the minimum length of a `Spacer`.
351
+ /// Zero for other children.
352
+ var minMain: CGFloat
336
353
  }
337
354
 
338
355
  private struct MeasuredChildren {
@@ -392,7 +409,9 @@ private struct StackConfiguration {
392
409
  subviews: subviews,
393
410
  cache: &cache
394
411
  )
395
- let fill = alignment.offset(container: crossLength(bounds.size, axis: axis), content: measurement.contentCross)
412
+ let fill = measurement.contentCross.isFinite
413
+ ? alignment.offset(container: crossLength(bounds.size, axis: axis), content: measurement.contentCross)
414
+ : 0
396
415
  // The origin stays leading.
397
416
  // SwiftUI mirrors a custom layout in right-to-left.
398
417
  var cursor = axis == .horizontal ? bounds.minX : bounds.minY
@@ -407,20 +426,22 @@ private struct StackConfiguration {
407
426
  private func measure(proposal: ProposedViewSize, subviews: LayoutSubviews) -> StackMeasurement {
408
427
  let spacings = stackSpacings(subviews: subviews, explicit: spacing)
409
428
  let measured = measureChildren(subviews: subviews, proposal: proposal, spacings: spacings)
410
- // A flexible child reports its cross size for its final main size and no cross proposal.
411
- // So a `Spacer` does not stretch the stack, and wrapped text counts its lines.
429
+ // A flexible child reports its cross size for its final main size, so wrapped text counts its lines.
412
430
  let dimensions = zip(subviews, measured.children).map { subview, child in
413
431
  let dimensionProposal = child.flexible
414
- ? proposedSize(main: mainLength(child.size, axis: axis), cross: nil, axis: axis)
432
+ ? proposedSize(main: mainLength(child.size, axis: axis), cross: child.crossProposal, axis: axis)
415
433
  : child.proposal
416
434
  return subview.dimensions(in: dimensionProposal)
417
435
  }
418
436
  let guides = dimensions.map(alignment.guide)
419
- let reference = guides.max() ?? 0
420
- let extents = zip(dimensions, guides).map { dimension, guide in
421
- crossLength(CGSize(width: dimension.width, height: dimension.height), axis: axis) - guide
422
- }
423
- let contentCross = reference + (extents.max() ?? 0)
437
+ let crossSizes = dimensions.map { crossLength(CGSize(width: $0.width, height: $0.height), axis: axis) }
438
+ // A child that answers an infinite probe with an infinite size has no finite center or end guide.
439
+ // The stack then reports that it can grow and skips the guides.
440
+ let growsAcross = crossSizes.contains { $0.isInfinite }
441
+ let reference = growsAcross ? 0 : guides.max() ?? 0
442
+ let contentCross = growsAcross
443
+ ? CGFloat.infinity
444
+ : reference + (zip(crossSizes, guides).map { $0 - $1 }.max() ?? 0)
424
445
  return StackMeasurement(
425
446
  size: stackSize(
426
447
  main: measured.definiteMain ?? measured.contentMain,
@@ -430,7 +451,7 @@ private struct StackConfiguration {
430
451
  sizes: measured.children.map(\.size),
431
452
  proposals: measured.children.map(\.proposal),
432
453
  spacings: spacings,
433
- crossOffsets: guides.map { reference - $0 },
454
+ crossOffsets: growsAcross ? guides.map { _ in 0 } : guides.map { reference - $0 },
434
455
  contentCross: contentCross
435
456
  )
436
457
  }
@@ -441,7 +462,8 @@ private struct StackConfiguration {
441
462
  spacings: [CGFloat]
442
463
  ) -> MeasuredChildren {
443
464
  let offeredMain = finite(axis == .horizontal ? proposal.width : proposal.height)
444
- let offeredCross = finite(axis == .horizontal ? proposal.height : proposal.width)
465
+ let proposedCross = axis == .horizontal ? proposal.height : proposal.width
466
+ let offeredCross = finite(proposedCross)
445
467
  let ownMainPoints = axis == .horizontal ? ownDimensions.widthPoints : ownDimensions.heightPoints
446
468
  let ownMainFraction = axis == .horizontal ? ownDimensions.widthFraction : ownDimensions.heightFraction
447
469
  let ownCrossPoints = axis == .horizontal ? ownDimensions.heightPoints : ownDimensions.widthPoints
@@ -478,8 +500,9 @@ private struct StackConfiguration {
478
500
  let mainFraction = axis == .horizontal ? dimensions.widthFraction : dimensions.heightFraction
479
501
  let crossFraction = axis == .horizontal ? dimensions.heightFraction : dimensions.widthFraction
480
502
  // A fraction uses the size chosen above.
481
- // Every other child still gets the offered cross size, so text can wrap.
482
- let crossProposal = crossFraction != nil ? definiteCross : offeredCross
503
+ // Every other child gets the cross proposal unchanged, so text can wrap, and an infinite probe
504
+ // reaches a child that can grow.
505
+ let crossProposal = crossFraction != nil ? definiteCross : proposedCross
483
506
 
484
507
  if mainFraction != nil, let definiteMain {
485
508
  let childProposal = proposedSize(main: definiteMain, cross: crossProposal, axis: axis)
@@ -491,7 +514,8 @@ private struct StackConfiguration {
491
514
  flexible: false,
492
515
  canCompress: false,
493
516
  priority: subview.priority,
494
- maxMain: mainLength(size, axis: axis)
517
+ maxMain: mainLength(size, axis: axis),
518
+ minMain: 0
495
519
  ))
496
520
  continue
497
521
  }
@@ -502,6 +526,9 @@ private struct StackConfiguration {
502
526
  let idealMain = mainLength(ideal, axis: axis)
503
527
  let maxMain = mainLength(maxed, axis: axis)
504
528
  let flexible = offeredMain != nil && (maxMain.isInfinite || maxMain > idealMain + 1)
529
+ let minMain = flexible
530
+ ? mainLength(subview.sizeThatFits(proposedSize(main: 0, cross: crossProposal, axis: axis)), axis: axis)
531
+ : 0
505
532
  children.append(MeasuredChild(
506
533
  size: ideal,
507
534
  proposal: idealProposal,
@@ -509,7 +536,8 @@ private struct StackConfiguration {
509
536
  flexible: flexible,
510
537
  canCompress: !flexible,
511
538
  priority: subview.priority,
512
- maxMain: maxMain
539
+ maxMain: maxMain,
540
+ minMain: minMain
513
541
  ))
514
542
  }
515
543
 
@@ -536,7 +564,8 @@ private struct StackConfiguration {
536
564
  let fixedMain = children.reduce(CGFloat(0)) { total, child in
537
565
  child.flexible ? total : total + mainLength(child.size, axis: axis)
538
566
  }
539
- let overflow = fixedMain + spacings.reduce(0, +) - offeredMain
567
+ let flexibleMinimum = children.reduce(CGFloat(0)) { $0 + $1.minMain }
568
+ let overflow = fixedMain + flexibleMinimum + spacings.reduce(0, +) - offeredMain
540
569
  guard overflow > 1 else { return }
541
570
 
542
571
  var candidates: [CompressionCandidate] = []
@@ -571,7 +600,7 @@ private struct StackConfiguration {
571
600
  }
572
601
  return total + mainLength(item.element.size, axis: axis)
573
602
  }
574
- var available = max(0, offeredMain - spacings.reduce(0, +) - reserved)
603
+ var available = max(0, offeredMain - spacings.reduce(0, +) - reserved - flexibleMinimum)
575
604
  for (position, candidate) in candidates.enumerated() {
576
605
  let rest = candidates[(position + 1)...]
577
606
  let peers = rest.prefix { $0.priority == candidate.priority }.count + 1
@@ -590,7 +619,8 @@ private struct StackConfiguration {
590
619
  }
591
620
 
592
621
  /// Flexible children share the space left by the others.
593
- /// A higher priority goes first.
622
+ /// A higher priority goes first, and leaves room for the minimum of every child after it, as in `HStack`.
623
+ /// A `Spacer` reports the lowest priority, so it keeps its minimum length.
594
624
  /// Among equals, the least flexible goes first, so a capped child leaves the rest to a `Spacer`.
595
625
  private func growChildren(
596
626
  _ children: inout [MeasuredChild],
@@ -611,7 +641,9 @@ private struct StackConfiguration {
611
641
  var remaining = max(0, offeredMain - fixedMain - spacings.reduce(0, +))
612
642
  for (position, index) in order.enumerated() {
613
643
  let peers = order[(position + 1)...].prefix { children[$0].priority == children[index].priority }.count + 1
614
- let share = peers == 1 ? remaining : (remaining / CGFloat(peers)).rounded(.down)
644
+ let laterMinimum = order[(position + peers)...].reduce(CGFloat(0)) { $0 + children[$1].minMain }
645
+ let available = max(0, remaining - laterMinimum)
646
+ let share = peers == 1 ? available : (available / CGFloat(peers)).rounded(.down)
615
647
  let proposal = proposedSize(main: share, cross: children[index].crossProposal, axis: axis)
616
648
  let size = subviews[index].sizeThatFits(proposal)
617
649
  children[index].size = size
@@ -0,0 +1 @@
1
+ bc95695ef06307f2c0099b8ed103d6f4ee1c1bce69682e23413a73d1f5382b66
@@ -0,0 +1 @@
1
+ 73bf2bbf6c3100c6375b86c350d5533eacdde6dfc09b4441b96f38a57218718a9940dceb935194b0063870fcdfbb46ef6b72f755a13e61a2546bab1b32967b84
@@ -0,0 +1 @@
1
+ f9bb58ebd351c2f423eb615d6365671b1f1553b3
@@ -0,0 +1 @@
1
+ 9ff0f17bc171c0a78627d99ec3e3e9daa17da71fb9d691e0a157ae5f249a8ace
@@ -0,0 +1 @@
1
+ 3610fc8f33f9a6d61a67482880e1b89515d0116933b15b51f3169bec6950096737c88627d8d20d916c3589d26cea950f51c9b5bbf20d70adcba058c70e48e51f
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "58.0.25",
6
+ "version": "58.0.27",
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-58.0.25.aar",
28
- "url": "expo.modules.ui-58.0.25.aar",
29
- "size": 1946686,
30
- "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
31
- "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
32
- "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
33
- "md5": "92b25ba3977597adf5cb9f0393240678"
27
+ "name": "expo.modules.ui-58.0.27.aar",
28
+ "url": "expo.modules.ui-58.0.27.aar",
29
+ "size": 2019247,
30
+ "sha512": "3610fc8f33f9a6d61a67482880e1b89515d0116933b15b51f3169bec6950096737c88627d8d20d916c3589d26cea950f51c9b5bbf20d70adcba058c70e48e51f",
31
+ "sha256": "9ff0f17bc171c0a78627d99ec3e3e9daa17da71fb9d691e0a157ae5f249a8ace",
32
+ "sha1": "f9bb58ebd351c2f423eb615d6365671b1f1553b3",
33
+ "md5": "881118e26c11ff41e0a8f115338a7358"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-58.0.25.aar",
145
- "url": "expo.modules.ui-58.0.25.aar",
146
- "size": 1946686,
147
- "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
148
- "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
149
- "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
150
- "md5": "92b25ba3977597adf5cb9f0393240678"
144
+ "name": "expo.modules.ui-58.0.27.aar",
145
+ "url": "expo.modules.ui-58.0.27.aar",
146
+ "size": 2019247,
147
+ "sha512": "3610fc8f33f9a6d61a67482880e1b89515d0116933b15b51f3169bec6950096737c88627d8d20d916c3589d26cea950f51c9b5bbf20d70adcba058c70e48e51f",
148
+ "sha256": "9ff0f17bc171c0a78627d99ec3e3e9daa17da71fb9d691e0a157ae5f249a8ace",
149
+ "sha1": "f9bb58ebd351c2f423eb615d6365671b1f1553b3",
150
+ "md5": "881118e26c11ff41e0a8f115338a7358"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-58.0.25-sources.jar",
165
- "url": "expo.modules.ui-58.0.25-sources.jar",
166
- "size": 122645,
167
- "sha512": "7067f7aabef1e8872cc798d93f8b8bc1736f678f3668d7eb4c13af5cb301454b1bcd184f3d2f8e54e73ad5638956b3e517955166551e94fe5e74ee25c6e7c703",
168
- "sha256": "1f04b317f757dbed2ba12650ac539706c6a5d9a7a05cc6c004f4b0d752482ca4",
169
- "sha1": "9e68c38ef193df41a3c083158aa103c674511b71",
170
- "md5": "c817ba0333b967a239df3a6777bd57ff"
164
+ "name": "expo.modules.ui-58.0.27-sources.jar",
165
+ "url": "expo.modules.ui-58.0.27-sources.jar",
166
+ "size": 126202,
167
+ "sha512": "73bf2bbf6c3100c6375b86c350d5533eacdde6dfc09b4441b96f38a57218718a9940dceb935194b0063870fcdfbb46ef6b72f755a13e61a2546bab1b32967b84",
168
+ "sha256": "bc95695ef06307f2c0099b8ed103d6f4ee1c1bce69682e23413a73d1f5382b66",
169
+ "sha1": "161044ad8c5afe93447eba78b51e99afbc1d9e21",
170
+ "md5": "86ee1f5cbe59fc8fd3532316b486649b"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 446d55df73ca334f4c5d3d8d75ca2d7868c30880
@@ -0,0 +1 @@
1
+ 8efb293c2e908cc5e5409fb5abdac11b1d635ff2a6c832b94f6d3d2ee32e6f32
@@ -0,0 +1 @@
1
+ d38f514408fcf5a2b95b552c256b8153e57027035f9a9a84ce1ffe9d3c6b126b529a89f075db718ab406076c1c9da03869bc544e991e671211e9a55650d80e4c
@@ -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>58.0.25</version>
12
+ <version>58.0.27</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
+ 14ca71a20147be25ed2dc4369f0b42ffcb167098
@@ -0,0 +1 @@
1
+ b66a2b9b2c0268cdc3d77e41961cb49f47c9440f1a27b050d2e8abcc2355a927
@@ -0,0 +1 @@
1
+ 73be91cbbad5b367ee7d91ce5427fc6020f16b391b02829f6f60ac2e2836c50ac38b982391bb06c56346f3d0daec1a9df24744c749e2e8d65f79f1e57a7445f3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "58.0.25",
3
+ "version": "58.0.27",
4
4
  "description": "A collection of UI components",
5
5
  "keywords": [
6
6
  "Jetpack Compose",
@@ -141,7 +141,7 @@
141
141
  },
142
142
  "devDependencies": {
143
143
  "@babel/core": "^7.26.0",
144
- "@expo/internal-scripts": "58.0.5",
144
+ "@expo/internal-scripts": "58.0.6",
145
145
  "@playwright/test": "^1.59.0",
146
146
  "@testing-library/react": "^16.3.0",
147
147
  "@testing-library/react-native": "^14.0.1",
@@ -79,7 +79,8 @@ export function DateTimePicker(props: DateTimePickerProps) {
79
79
  }
80
80
  };
81
81
 
82
- const onDateSelected = (date: Date) => {
82
+ const onDateSelected = (date: Date | null) => {
83
+ if (date === null) return;
83
84
  const selected = usesDateComponents ? utcDayToLocalDate(date, value) : date;
84
85
  if (onValueChange) {
85
86
  onValueChange(buildChangeEvent(selected), selected);
@@ -138,9 +138,9 @@ export interface DateTimePickerProps {
138
138
  */
139
139
  initialDate?: string | null;
140
140
  /**
141
- * Callback function that is called when a date is selected.
141
+ * Called when the selection changes. The date is `null` when date input is incomplete or invalid.
142
142
  */
143
- onDateSelected?: (date: Date) => void;
143
+ onDateSelected?: (date: Date | null) => void;
144
144
  /**
145
145
  * The variant of the picker, which determines its appearance and behavior.
146
146
  * @default 'picker'
@@ -212,7 +212,7 @@ type NativeDatePickerProps = Omit<
212
212
  initialDate?: number | null;
213
213
  selectableDates?: { start?: number | null; end?: number | null } | null;
214
214
  elementColors?: DatePickerElementColors & TimePickerElementColors;
215
- } & ViewEvent<'onDateSelected', { date: Date }>;
215
+ } & ViewEvent<'onDateSelected', { date: number | null }>;
216
216
 
217
217
  function convertSelectableDates(selectableDates?: {
218
218
  start?: Date;
@@ -243,7 +243,7 @@ function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePic
243
243
  initialDate: initialDateTimestamp,
244
244
  selectableDates: convertSelectableDates(selectableDates),
245
245
  onDateSelected: ({ nativeEvent: { date } }) => {
246
- props.onDateSelected?.(new Date(date));
246
+ props.onDateSelected?.(convertTimestampToDate(date));
247
247
  },
248
248
  variant,
249
249
  ...(elementColors != null ? { elementColors } : undefined),
@@ -3,6 +3,7 @@ import type { ColorValue } from 'react-native';
3
3
 
4
4
  import type { ModifierConfig, ViewEvent } from '../../types';
5
5
  import { createViewModifierEventListener } from '../modifiers/utils';
6
+ import type { MenuShapePosition } from './index';
6
7
 
7
8
  type SlotNativeViewProps = {
8
9
  slotName: string;
@@ -37,6 +38,12 @@ export interface DropdownMenuItemProps {
37
38
  * @default true
38
39
  */
39
40
  enabled?: boolean;
41
+ /**
42
+ * The position of the item in its `DropdownMenuGroup`, which sets its shape through Compose's
43
+ * `MenuDefaults.itemShape(index, count).shape`. When set, the item is a Material 3 Expressive
44
+ * menu item and can show `SupportingText`.
45
+ */
46
+ shape?: MenuShapePosition;
40
47
  /**
41
48
  * Color overrides for the menu item.
42
49
  */
@@ -81,6 +88,16 @@ function TrailingIcon(props: { children: React.ReactNode }) {
81
88
  return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
82
89
  }
83
90
 
91
+ /**
92
+ * A supporting text slot for `DropdownMenuItem`, shown below the text.
93
+ * Only applies to an item with a `shape`.
94
+ *
95
+ * @platform android
96
+ */
97
+ function SupportingText(props: { children: React.ReactNode }) {
98
+ return <SlotNativeView slotName="supportingText">{props.children}</SlotNativeView>;
99
+ }
100
+
84
101
  /**
85
102
  * A text slot for `DropdownMenuItem`.
86
103
  * Wrap text content to display as the menu item label.
@@ -114,5 +131,6 @@ function DropdownMenuItemComponent(props: DropdownMenuItemProps) {
114
131
  DropdownMenuItemComponent.Text = TextSlot;
115
132
  DropdownMenuItemComponent.LeadingIcon = LeadingIcon;
116
133
  DropdownMenuItemComponent.TrailingIcon = TrailingIcon;
134
+ DropdownMenuItemComponent.SupportingText = SupportingText;
117
135
 
118
136
  export { DropdownMenuItemComponent as DropdownMenuItem };