@expo/ui 58.0.24 → 58.0.26

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 (95) hide show
  1. package/CHANGELOG.md +17 -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 +9 -1
  11. package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
  12. package/build/community/datetime-picker/types.d.ts +0 -1
  13. package/build/community/datetime-picker/types.js.map +1 -1
  14. package/build/jetpack-compose/DatePicker/index.d.ts +2 -2
  15. package/build/jetpack-compose/DatePicker/index.js +1 -1
  16. package/build/jetpack-compose/DatePicker/index.js.map +1 -1
  17. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +10 -0
  18. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js +12 -0
  19. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.js.map +1 -1
  20. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.d.ts +89 -0
  21. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js +80 -0
  22. package/build/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.js.map +1 -0
  23. package/build/jetpack-compose/DropdownMenu/index.d.ts +91 -0
  24. package/build/jetpack-compose/DropdownMenu/index.js +33 -0
  25. package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
  26. package/build/jetpack-compose/SplitButtonLayout/index.d.ts +102 -0
  27. package/build/jetpack-compose/SplitButtonLayout/index.js +68 -0
  28. package/build/jetpack-compose/SplitButtonLayout/index.js.map +1 -0
  29. package/build/jetpack-compose/index.d.ts +1 -0
  30. package/build/jetpack-compose/index.js +1 -0
  31. package/build/jetpack-compose/index.js.map +1 -1
  32. package/build/universal/FieldGroup/FieldSection.android.js +32 -5
  33. package/build/universal/FieldGroup/FieldSection.android.js.map +1 -1
  34. package/build/universal/TextInput/index.android.d.ts +1 -1
  35. package/build/universal/TextInput/index.android.js +7 -2
  36. package/build/universal/TextInput/index.android.js.map +1 -1
  37. package/build/universal/TextInput/index.d.ts +1 -1
  38. package/build/universal/TextInput/index.ios.d.ts +1 -1
  39. package/build/universal/TextInput/index.ios.js +3 -2
  40. package/build/universal/TextInput/index.ios.js.map +1 -1
  41. package/build/universal/TextInput/index.js +2 -1
  42. package/build/universal/TextInput/index.js.map +1 -1
  43. package/build/universal/TextInput/types.d.ts +4 -0
  44. package/build/universal/TextInput/types.js.map +1 -1
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.24/expo.modules.ui-58.0.24-sources.jar → 58.0.26/expo.modules.ui-58.0.26-sources.jar} +0 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.md5 +1 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha1 +1 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha256 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26-sources.jar.sha512 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar +0 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.md5 +1 -0
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha1 +1 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha256 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.aar.sha512 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.24/expo.modules.ui-58.0.24.module → 58.0.26/expo.modules.ui-58.0.26.module} +22 -22
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.md5 +1 -0
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha1 +1 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha256 +1 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.module.sha512 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.24/expo.modules.ui-58.0.24.pom → 58.0.26/expo.modules.ui-58.0.26.pom} +1 -1
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.md5 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha1 +1 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha256 +1 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.26/expo.modules.ui-58.0.26.pom.sha512 +1 -0
  65. package/package.json +2 -2
  66. package/src/community/datetime-picker/DateTimePicker.android.tsx +8 -4
  67. package/src/community/datetime-picker/types.tsx +0 -1
  68. package/src/jetpack-compose/DatePicker/index.tsx +4 -4
  69. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +18 -0
  70. package/src/jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.tsx +149 -0
  71. package/src/jetpack-compose/DropdownMenu/index.tsx +147 -0
  72. package/src/jetpack-compose/SplitButtonLayout/index.tsx +182 -0
  73. package/src/jetpack-compose/index.ts +1 -0
  74. package/src/universal/FieldGroup/FieldSection.android.tsx +28 -2
  75. package/src/universal/TextInput/index.android.tsx +7 -1
  76. package/src/universal/TextInput/index.ios.tsx +3 -0
  77. package/src/universal/TextInput/index.tsx +2 -0
  78. package/src/universal/TextInput/types.ts +5 -0
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.md5 +0 -1
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha1 +0 -1
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha256 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha512 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar +0 -0
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.md5 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha1 +0 -1
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha256 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha512 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.md5 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha1 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha256 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha512 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.md5 +0 -1
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha1 +0 -1
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha256 +0 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha512 +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/DropdownMenu/DropdownMenuItem.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SlotNativeView","DropdownMenuItemNativeView","LeadingIcon","props","slotName","children","TrailingIcon","TextSlot","DropdownMenuItemComponent","onClick","modifiers","restProps","undefined","enabled","onItemPressed","Text","DropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAOrE,MAAMC,iBAA2DF,kBAC/D,UACA;AA+CF,MAAMG,6BACJH,kBAAkB,UAAU;AAE9B;;;;;CAKC,GACD,SAASI,YAAYC,KAAoC;IACvD,qBAAO,KAACH;QAAeI,UAAS;kBAAeD,MAAME,QAAQ;;AAC/D;AAEA;;;;;CAKC,GACD,SAASC,aAAaH,KAAoC;IACxD,qBAAO,KAACH;QAAeI,UAAS;kBAAgBD,MAAME,QAAQ;;AAChE;AAEA;;;;;CAKC,GACD,SAASE,SAASJ,KAAoC;IACpD,qBAAO,KAACH;QAAeI,UAAS;kBAAQD,MAAME,QAAQ;;AACxD;AAEA;;;;;CAKC,GACD,SAASG,0BAA0BL,KAA4B;IAC7D,MAAM,EAAEM,OAAO,EAAEC,SAAS,EAAEL,QAAQ,EAAE,GAAGM,WAAW,GAAGR;IACvD,qBACE,KAACF;QACE,GAAGU,SAAS;QACbD,WAAWA;QACV,GAAIA,YAAYX,gCAAgCW,aAAaE,SAAS;QACvEC,SAASV,MAAMU,OAAO,IAAI;QAC1BC,eAAeL,UAAU,IAAMA,YAAYG;kBAC1CP;;AAGP;AAEAG,0BAA0BO,IAAI,GAAGR;AACjCC,0BAA0BN,WAAW,GAAGA;AACxCM,0BAA0BF,YAAY,GAAGA;AAEzC,SAASE,6BAA6BQ,gBAAgB,GAAG"}
1
+ {"version":3,"sources":["jetpack-compose/DropdownMenu/DropdownMenuItem.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SlotNativeView","DropdownMenuItemNativeView","LeadingIcon","props","slotName","children","TrailingIcon","SupportingText","TextSlot","DropdownMenuItemComponent","onClick","modifiers","restProps","undefined","enabled","onItemPressed","Text","DropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAQrE,MAAMC,iBAA2DF,kBAC/D,UACA;AAqDF,MAAMG,6BACJH,kBAAkB,UAAU;AAE9B;;;;;CAKC,GACD,SAASI,YAAYC,KAAoC;IACvD,qBAAO,KAACH;QAAeI,UAAS;kBAAeD,MAAME,QAAQ;;AAC/D;AAEA;;;;;CAKC,GACD,SAASC,aAAaH,KAAoC;IACxD,qBAAO,KAACH;QAAeI,UAAS;kBAAgBD,MAAME,QAAQ;;AAChE;AAEA;;;;;CAKC,GACD,SAASE,eAAeJ,KAAoC;IAC1D,qBAAO,KAACH;QAAeI,UAAS;kBAAkBD,MAAME,QAAQ;;AAClE;AAEA;;;;;CAKC,GACD,SAASG,SAASL,KAAoC;IACpD,qBAAO,KAACH;QAAeI,UAAS;kBAAQD,MAAME,QAAQ;;AACxD;AAEA;;;;;CAKC,GACD,SAASI,0BAA0BN,KAA4B;IAC7D,MAAM,EAAEO,OAAO,EAAEC,SAAS,EAAEN,QAAQ,EAAE,GAAGO,WAAW,GAAGT;IACvD,qBACE,KAACF;QACE,GAAGW,SAAS;QACbD,WAAWA;QACV,GAAIA,YAAYZ,gCAAgCY,aAAaE,SAAS;QACvEC,SAASX,MAAMW,OAAO,IAAI;QAC1BC,eAAeL,UAAU,IAAMA,YAAYG;kBAC1CR;;AAGP;AAEAI,0BAA0BO,IAAI,GAAGR;AACjCC,0BAA0BP,WAAW,GAAGA;AACxCO,0BAA0BH,YAAY,GAAGA;AACzCG,0BAA0BF,cAAc,GAAGA;AAE3C,SAASE,6BAA6BQ,gBAAgB,GAAG"}
@@ -0,0 +1,89 @@
1
+ import type { ColorValue } from 'react-native';
2
+ import type { ModifierConfig } from '../../types';
3
+ import type { MenuShapePosition } from './index';
4
+ /**
5
+ * Color overrides for the `SelectableDropdownMenuItem` component. Each color defaults to the
6
+ * value of Compose's `MenuDefaults.selectableItemColors()`.
7
+ */
8
+ export type SelectableDropdownMenuItemColors = {
9
+ textColor?: ColorValue;
10
+ containerColor?: ColorValue;
11
+ leadingIconColor?: ColorValue;
12
+ trailingContentColor?: ColorValue;
13
+ disabledTextColor?: ColorValue;
14
+ disabledContainerColor?: ColorValue;
15
+ disabledLeadingIconColor?: ColorValue;
16
+ disabledTrailingContentColor?: ColorValue;
17
+ selectedTextColor?: ColorValue;
18
+ selectedContainerColor?: ColorValue;
19
+ selectedLeadingIconColor?: ColorValue;
20
+ selectedTrailingContentColor?: ColorValue;
21
+ };
22
+ /**
23
+ * Props of the `SelectableDropdownMenuItem` component.
24
+ */
25
+ export interface SelectableDropdownMenuItemProps {
26
+ /**
27
+ * Whether the item is selected.
28
+ */
29
+ selected: boolean;
30
+ /**
31
+ * Callback that is called when the item is clicked.
32
+ */
33
+ onClick?: () => void;
34
+ /**
35
+ * The position of the item in its `DropdownMenuGroup`, which sets its shape through Compose's
36
+ * `MenuDefaults.itemShape(index, count)`. Defaults to `MenuDefaults.itemShapes()`, the shape of a
37
+ * single item.
38
+ */
39
+ shapes?: MenuShapePosition;
40
+ /**
41
+ * Whether the item is enabled.
42
+ * @default true
43
+ */
44
+ enabled?: boolean;
45
+ /**
46
+ * Color overrides for the item.
47
+ */
48
+ colors?: SelectableDropdownMenuItemColors;
49
+ /**
50
+ * Modifiers for the component.
51
+ */
52
+ modifiers?: ModifierConfig[];
53
+ /**
54
+ * Slot children for the text, the icons, and the supporting text.
55
+ */
56
+ children?: React.ReactNode;
57
+ }
58
+ /**
59
+ * A text slot for `SelectableDropdownMenuItem`.
60
+ *
61
+ * @platform android
62
+ */
63
+ declare function TextSlot(props: {
64
+ children: React.ReactNode;
65
+ }): import("react").JSX.Element;
66
+ /**
67
+ * A Material 3 Expressive menu item that wraps Compose's `SelectableDropdownMenuItem`, for a
68
+ * choice of one option. A selected item gets a highlighted container and shows its
69
+ * `SelectedLeadingIcon`.
70
+ *
71
+ * @platform android
72
+ */
73
+ export declare function SelectableDropdownMenuItem(props: SelectableDropdownMenuItemProps): import("react").JSX.Element;
74
+ export declare namespace SelectableDropdownMenuItem {
75
+ var Text: typeof TextSlot;
76
+ var LeadingIcon: (props: {
77
+ children: React.ReactNode;
78
+ }) => import("react").JSX.Element;
79
+ var SelectedLeadingIcon: (props: {
80
+ children: React.ReactNode;
81
+ }) => import("react").JSX.Element;
82
+ var TrailingContent: (props: {
83
+ children: React.ReactNode;
84
+ }) => import("react").JSX.Element;
85
+ var SupportingText: (props: {
86
+ children: React.ReactNode;
87
+ }) => import("react").JSX.Element;
88
+ }
89
+ export {};
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { requireNativeView } from 'expo';
3
+ import { createViewModifierEventListener } from '../modifiers/utils';
4
+ const SlotNativeView = requireNativeView('ExpoUI', 'SlotView');
5
+ const SelectableDropdownMenuItemNativeView = requireNativeView('ExpoUI', 'SelectableDropdownMenuItemView');
6
+ /**
7
+ * A text slot for `SelectableDropdownMenuItem`.
8
+ *
9
+ * @platform android
10
+ */ function TextSlot(props) {
11
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
12
+ slotName: "text",
13
+ children: props.children
14
+ });
15
+ }
16
+ /**
17
+ * A leading icon slot for `SelectableDropdownMenuItem`. When the item also has a
18
+ * `SelectedLeadingIcon`, this icon shows only while the item is not selected.
19
+ *
20
+ * @platform android
21
+ */ function LeadingIcon(props) {
22
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
23
+ slotName: "leadingIcon",
24
+ children: props.children
25
+ });
26
+ }
27
+ /**
28
+ * A leading icon slot for `SelectableDropdownMenuItem`, shown while the item is selected.
29
+ *
30
+ * @platform android
31
+ */ function SelectedLeadingIcon(props) {
32
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
33
+ slotName: "selectedLeadingIcon",
34
+ children: props.children
35
+ });
36
+ }
37
+ /**
38
+ * A trailing content slot for `SelectableDropdownMenuItem`, shown after the text.
39
+ *
40
+ * @platform android
41
+ */ function TrailingContent(props) {
42
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
43
+ slotName: "trailingContent",
44
+ children: props.children
45
+ });
46
+ }
47
+ /**
48
+ * A supporting text slot for `SelectableDropdownMenuItem`, shown below the text.
49
+ *
50
+ * @platform android
51
+ */ function SupportingText(props) {
52
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
53
+ slotName: "supportingText",
54
+ children: props.children
55
+ });
56
+ }
57
+ /**
58
+ * A Material 3 Expressive menu item that wraps Compose's `SelectableDropdownMenuItem`, for a
59
+ * choice of one option. A selected item gets a highlighted container and shows its
60
+ * `SelectedLeadingIcon`.
61
+ *
62
+ * @platform android
63
+ */ export function SelectableDropdownMenuItem(props) {
64
+ const { onClick, modifiers, children, ...restProps } = props;
65
+ return /*#__PURE__*/ _jsx(SelectableDropdownMenuItemNativeView, {
66
+ ...restProps,
67
+ modifiers: modifiers,
68
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
69
+ enabled: props.enabled ?? true,
70
+ onItemPressed: onClick ? ()=>onClick() : undefined,
71
+ children: children
72
+ });
73
+ }
74
+ SelectableDropdownMenuItem.Text = TextSlot;
75
+ SelectableDropdownMenuItem.LeadingIcon = LeadingIcon;
76
+ SelectableDropdownMenuItem.SelectedLeadingIcon = SelectedLeadingIcon;
77
+ SelectableDropdownMenuItem.TrailingContent = TrailingContent;
78
+ SelectableDropdownMenuItem.SupportingText = SupportingText;
79
+
80
+ //# sourceMappingURL=SelectableDropdownMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["jetpack-compose/DropdownMenu/SelectableDropdownMenuItem.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SlotNativeView","SelectableDropdownMenuItemNativeView","TextSlot","props","slotName","children","LeadingIcon","SelectedLeadingIcon","TrailingContent","SupportingText","SelectableDropdownMenuItem","onClick","modifiers","restProps","undefined","enabled","onItemPressed","Text"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAGrE,MAAMC,iBAGDF,kBAAkB,UAAU;AAgEjC,MAAMG,uCACJH,kBAAkB,UAAU;AAE9B;;;;CAIC,GACD,SAASI,SAASC,KAAoC;IACpD,qBAAO,KAACH;QAAeI,UAAS;kBAAQD,MAAME,QAAQ;;AACxD;AAEA;;;;;CAKC,GACD,SAASC,YAAYH,KAAoC;IACvD,qBAAO,KAACH;QAAeI,UAAS;kBAAeD,MAAME,QAAQ;;AAC/D;AAEA;;;;CAIC,GACD,SAASE,oBAAoBJ,KAAoC;IAC/D,qBAAO,KAACH;QAAeI,UAAS;kBAAuBD,MAAME,QAAQ;;AACvE;AAEA;;;;CAIC,GACD,SAASG,gBAAgBL,KAAoC;IAC3D,qBAAO,KAACH;QAAeI,UAAS;kBAAmBD,MAAME,QAAQ;;AACnE;AAEA;;;;CAIC,GACD,SAASI,eAAeN,KAAoC;IAC1D,qBAAO,KAACH;QAAeI,UAAS;kBAAkBD,MAAME,QAAQ;;AAClE;AAEA;;;;;;CAMC,GACD,OAAO,SAASK,2BAA2BP,KAAsC;IAC/E,MAAM,EAAEQ,OAAO,EAAEC,SAAS,EAAEP,QAAQ,EAAE,GAAGQ,WAAW,GAAGV;IACvD,qBACE,KAACF;QACE,GAAGY,SAAS;QACbD,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaE,SAAS;QACvEC,SAASZ,MAAMY,OAAO,IAAI;QAC1BC,eAAeL,UAAU,IAAMA,YAAYG;kBAC1CT;;AAGP;AAEAK,2BAA2BO,IAAI,GAAGf;AAClCQ,2BAA2BJ,WAAW,GAAGA;AACzCI,2BAA2BH,mBAAmB,GAAGA;AACjDG,2BAA2BF,eAAe,GAAGA;AAC7CE,2BAA2BD,cAAc,GAAGA"}
@@ -52,6 +52,79 @@ export interface DropdownMenuProps {
52
52
  */
53
53
  modifiers?: ModifierConfig[];
54
54
  }
55
+ /**
56
+ * The position of a group in a `DropdownMenuPopup`, or of an item in a group.
57
+ * Compose's `MenuDefaults.groupShape(index, count)` and `MenuDefaults.itemShape(index, count)` use
58
+ * it to round the outer corners of the first and last element.
59
+ */
60
+ export type MenuShapePosition = {
61
+ /**
62
+ * The index of the group in the menu, or of the item in its group.
63
+ */
64
+ index: number;
65
+ /**
66
+ * The number of groups in the menu, or of items in the group.
67
+ */
68
+ count: number;
69
+ };
70
+ /**
71
+ * Props of the `DropdownMenuPopup` component.
72
+ */
73
+ export interface DropdownMenuPopupProps {
74
+ /**
75
+ * The contents of the menu, typically `DropdownMenuGroup` components.
76
+ */
77
+ children: ReactNode;
78
+ /**
79
+ * Whether the menu is expanded (visible).
80
+ */
81
+ expanded?: boolean;
82
+ /**
83
+ * Callback fired when the menu requests to be dismissed (for example, tapping outside).
84
+ * Must be provided when `expanded` is `true` to allow the menu to close.
85
+ */
86
+ onDismissRequest?: () => void;
87
+ /**
88
+ * Properties for the popup window of the menu.
89
+ */
90
+ properties?: PopupProperties;
91
+ /**
92
+ * Modifiers for the contents of the menu.
93
+ */
94
+ modifiers?: ModifierConfig[];
95
+ }
96
+ /**
97
+ * Props of the `DropdownMenuGroup` component.
98
+ */
99
+ export interface DropdownMenuGroupProps {
100
+ /**
101
+ * The contents of the group, typically `DropdownMenuItem` or `SelectableDropdownMenuItem`
102
+ * components.
103
+ */
104
+ children: ReactNode;
105
+ /**
106
+ * The position of the group in the menu, which sets its shape through Compose's
107
+ * `MenuDefaults.groupShape(index, count)`. Defaults to `MenuDefaults.groupShapes()`, the shape
108
+ * of a single group.
109
+ */
110
+ shapes?: MenuShapePosition;
111
+ /**
112
+ * The container color of the group. Defaults to `MenuDefaults.groupStandardContainerColor`.
113
+ */
114
+ containerColor?: ColorValue;
115
+ /**
116
+ * Tonal elevation of the group in dp. Defaults to `MenuDefaults.TonalElevation`.
117
+ */
118
+ tonalElevation?: number;
119
+ /**
120
+ * Shadow elevation of the group in dp. Defaults to `MenuDefaults.ShadowElevation`.
121
+ */
122
+ shadowElevation?: number;
123
+ /**
124
+ * Modifiers for the component.
125
+ */
126
+ modifiers?: ModifierConfig[];
127
+ }
55
128
  /**
56
129
  * Container for items displayed in the dropdown menu.
57
130
  * Children should be `DropdownMenuItem` components or other native views.
@@ -84,5 +157,23 @@ declare namespace DropdownMenu {
84
157
  var Items: typeof import(".").Items;
85
158
  }
86
159
  export { DropdownMenu };
160
+ /**
161
+ * A Material 3 Expressive menu that wraps Compose's `DropdownMenuPopup`. The menu anchors to its
162
+ * parent, so it goes in a `Box` next to the component that opens it. Unlike `DropdownMenu`, it
163
+ * has no container. It holds `DropdownMenuGroup` components, with a `Spacer` between the groups.
164
+ *
165
+ * @platform android
166
+ */
167
+ export declare function DropdownMenuPopup(props: DropdownMenuPopupProps): import("react").JSX.Element;
168
+ /**
169
+ * A group of menu items that wraps Compose's `DropdownMenuGroup`, for use in a
170
+ * `DropdownMenuPopup`.
171
+ *
172
+ * @platform android
173
+ */
174
+ export declare function DropdownMenuGroup(props: DropdownMenuGroupProps): import("react").JSX.Element;
87
175
  export { DropdownMenuItem } from './DropdownMenuItem';
176
+ export type { DropdownMenuItemProps, DropdownMenuItemElementColors } from './DropdownMenuItem';
177
+ export { SelectableDropdownMenuItem } from './SelectableDropdownMenuItem';
178
+ export type { SelectableDropdownMenuItemProps, SelectableDropdownMenuItemColors, } from './SelectableDropdownMenuItem';
88
179
  export type { PopupProperties };
@@ -3,6 +3,8 @@ import { requireNativeView } from 'expo';
3
3
  import { PresentedContent } from '../../PresentedContentContext';
4
4
  import { createViewModifierEventListener } from '../modifiers/utils';
5
5
  const MenuNativeView = requireNativeView('ExpoUI', 'DropdownMenuView');
6
+ const MenuPopupNativeView = requireNativeView('ExpoUI', 'DropdownMenuPopupView');
7
+ const MenuGroupNativeView = requireNativeView('ExpoUI', 'DropdownMenuGroupView');
6
8
  // TODO: Extract into separate SlotView similar to swift-ui
7
9
  const SlotNativeView = requireNativeView('ExpoUI', 'SlotView');
8
10
  /**
@@ -45,6 +47,37 @@ DropdownMenu.Trigger = Trigger;
45
47
  DropdownMenu.Preview = Preview;
46
48
  DropdownMenu.Items = Items;
47
49
  export { DropdownMenu };
50
+ /**
51
+ * A Material 3 Expressive menu that wraps Compose's `DropdownMenuPopup`. The menu anchors to its
52
+ * parent, so it goes in a `Box` next to the component that opens it. Unlike `DropdownMenu`, it
53
+ * has no container. It holds `DropdownMenuGroup` components, with a `Spacer` between the groups.
54
+ *
55
+ * @platform android
56
+ */ export function DropdownMenuPopup(props) {
57
+ const { modifiers, children, ...restProps } = props;
58
+ return /*#__PURE__*/ _jsx(MenuPopupNativeView, {
59
+ modifiers: modifiers,
60
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
61
+ ...restProps,
62
+ children: /*#__PURE__*/ _jsx(PresentedContent, {
63
+ children: children
64
+ })
65
+ });
66
+ }
67
+ /**
68
+ * A group of menu items that wraps Compose's `DropdownMenuGroup`, for use in a
69
+ * `DropdownMenuPopup`.
70
+ *
71
+ * @platform android
72
+ */ export function DropdownMenuGroup(props) {
73
+ const { modifiers, ...restProps } = props;
74
+ return /*#__PURE__*/ _jsx(MenuGroupNativeView, {
75
+ modifiers: modifiers,
76
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
77
+ ...restProps
78
+ });
79
+ }
48
80
  export { DropdownMenuItem } from './DropdownMenuItem';
81
+ export { SelectableDropdownMenuItem } from './SelectableDropdownMenuItem';
49
82
 
50
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/DropdownMenu/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","PresentedContent","createViewModifierEventListener","MenuNativeView","SlotNativeView","Items","props","slotName","children","tag","Trigger","Preview","DropdownMenu","modifiers","restProps","style","undefined","DropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,+BAA+B,QAAQ,qBAAqB;AAErE,MAAMC,iBAAuDH,kBAC3D,UACA;AAGF,2DAA2D;AAC3D,MAAMI,iBAGDJ,kBAAkB,UAAU;AA0EjC;;;CAGC,GACD,OAAO,SAASK,MAAMC,KAA8B;IAClD,oGAAoG;IACpG,qBACE,KAACF;QAAeG,UAAS;kBACvB,cAAA,KAACN;sBAAkBK,MAAME,QAAQ;;;AAGvC;AACAH,MAAMI,GAAG,GAAG;AAEZ;;CAEC,GACD,OAAO,SAASC,QAAQJ,KAA8B;IACpD,qBAAO;kBAAGA,MAAME,QAAQ;;AAC1B;AACAE,QAAQD,GAAG,GAAG;AAEd;;CAEC,GACD,OAAO,SAASE,QAAQL,KAA8B;IACpD,qBAAO;AACT;AAEA,SAASM,aAAaN,KAAwB;IAC5C,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACH;QACCY,OAAOT,MAAMS,KAAK;QAClBF,WAAWA;QACV,GAAIA,YAAYX,gCAAgCW,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBACZR,MAAME,QAAQ;;AAGrB;AAEAI,aAAaF,OAAO,GAAGA;AACvBE,aAAaD,OAAO,GAAGA;AACvBC,aAAaP,KAAK,GAAGA;AAErB,SAASO,YAAY,GAAG;AACxB,SAASK,gBAAgB,QAAQ,qBAAqB"}
1
+ {"version":3,"sources":["jetpack-compose/DropdownMenu/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","PresentedContent","createViewModifierEventListener","MenuNativeView","MenuPopupNativeView","MenuGroupNativeView","SlotNativeView","Items","props","slotName","children","tag","Trigger","Preview","DropdownMenu","modifiers","restProps","style","undefined","DropdownMenuPopup","DropdownMenuGroup","DropdownMenuItem","SelectableDropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,+BAA+B,QAAQ,qBAAqB;AAErE,MAAMC,iBAAuDH,kBAC3D,UACA;AAGF,MAAMI,sBAAiEJ,kBACrE,UACA;AAGF,MAAMK,sBAAmEL,kBACvE,UACA;AAGF,2DAA2D;AAC3D,MAAMM,iBAGDN,kBAAkB,UAAU;AAuKjC;;;CAGC,GACD,OAAO,SAASO,MAAMC,KAA8B;IAClD,oGAAoG;IACpG,qBACE,KAACF;QAAeG,UAAS;kBACvB,cAAA,KAACR;sBAAkBO,MAAME,QAAQ;;;AAGvC;AACAH,MAAMI,GAAG,GAAG;AAEZ;;CAEC,GACD,OAAO,SAASC,QAAQJ,KAA8B;IACpD,qBAAO;kBAAGA,MAAME,QAAQ;;AAC1B;AACAE,QAAQD,GAAG,GAAG;AAEd;;CAEC,GACD,OAAO,SAASE,QAAQL,KAA8B;IACpD,qBAAO;AACT;AAEA,SAASM,aAAaN,KAAwB;IAC5C,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACL;QACCc,OAAOT,MAAMS,KAAK;QAClBF,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBACZR,MAAME,QAAQ;;AAGrB;AAEAI,aAAaF,OAAO,GAAGA;AACvBE,aAAaD,OAAO,GAAGA;AACvBC,aAAaP,KAAK,GAAGA;AAErB,SAASO,YAAY,GAAG;AAExB;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkBX,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAEL,QAAQ,EAAE,GAAGM,WAAW,GAAGR;IAC9C,qBACE,KAACJ;QACCW,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBAEb,cAAA,KAACf;sBAAkBS;;;AAGzB;AAEA;;;;;CAKC,GACD,OAAO,SAASU,kBAAkBZ,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACH;QACCU,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;;AAGnB;AAEA,SAASK,gBAAgB,QAAQ,qBAAqB;AAEtD,SAASC,0BAA0B,QAAQ,+BAA+B"}
@@ -0,0 +1,102 @@
1
+ import type { ModifierConfig } from '../../types';
2
+ import type { ButtonColors } from '../Button';
3
+ export type { ButtonColors };
4
+ export interface SplitButtonLayoutProps {
5
+ /**
6
+ * The space between the leading and trailing buttons, in dp.
7
+ * @default SplitButtonDefaults.Spacing
8
+ */
9
+ spacing?: number;
10
+ /**
11
+ * Modifiers for the component.
12
+ */
13
+ modifiers?: ModifierConfig[];
14
+ /**
15
+ * The `SplitButtonLayout.LeadingButton` and `SplitButtonLayout.TrailingButton` slots.
16
+ */
17
+ children: React.ReactNode;
18
+ }
19
+ type SlotProps = {
20
+ children: React.ReactNode;
21
+ };
22
+ export interface SplitButtonLeadingButtonProps {
23
+ /**
24
+ * Callback that is called when the leading button is clicked.
25
+ */
26
+ onClick?: () => void;
27
+ /**
28
+ * Whether the button is enabled for user interaction.
29
+ * @default true
30
+ */
31
+ enabled?: boolean;
32
+ /**
33
+ * Colors for the button. Unset colors use `ButtonDefaults.buttonColors()`.
34
+ */
35
+ colors?: ButtonColors;
36
+ /**
37
+ * Modifiers for the component.
38
+ */
39
+ modifiers?: ModifierConfig[];
40
+ /**
41
+ * Content to display inside the button.
42
+ */
43
+ children: React.ReactNode;
44
+ }
45
+ export interface SplitButtonTrailingButtonProps {
46
+ /**
47
+ * Whether the trailing button is checked. This usually matches the menu's `expanded` state.
48
+ */
49
+ checked: boolean;
50
+ /**
51
+ * Callback that is called with the new checked state when the button is clicked.
52
+ */
53
+ onCheckedChange?: (checked: boolean) => void;
54
+ /**
55
+ * Whether the button is enabled for user interaction.
56
+ * @default true
57
+ */
58
+ enabled?: boolean;
59
+ /**
60
+ * Colors for the button. Unset colors use `ButtonDefaults.buttonColors()`.
61
+ */
62
+ colors?: ButtonColors;
63
+ /**
64
+ * Modifiers for the component.
65
+ */
66
+ modifiers?: ModifierConfig[];
67
+ /**
68
+ * Content to display inside the button, usually an icon.
69
+ */
70
+ children: React.ReactNode;
71
+ }
72
+ /**
73
+ * The leading button of a split button, which runs the primary action.
74
+ * Goes in the `SplitButtonLayout.LeadingButton` slot.
75
+ * Wraps `SplitButtonDefaults.LeadingButton`.
76
+ */
77
+ declare function SplitButtonLeadingButton(props: SplitButtonLeadingButtonProps): import("react").JSX.Element;
78
+ /**
79
+ * The trailing button of a split button, which usually opens a `DropdownMenu` of related actions.
80
+ * Goes in the `SplitButtonLayout.TrailingButton` slot.
81
+ * Wraps `SplitButtonDefaults.TrailingButton`.
82
+ */
83
+ declare function SplitButtonTrailingButton(props: SplitButtonTrailingButtonProps): import("react").JSX.Element;
84
+ /**
85
+ * Leading button slot for `SplitButtonLayout`. Usually holds a `SplitButtonLeadingButton`.
86
+ */
87
+ declare function SplitButtonLayoutLeadingButton(props: SlotProps): import("react").JSX.Element;
88
+ /**
89
+ * Trailing button slot for `SplitButtonLayout`. Usually holds a `SplitButtonTrailingButton`,
90
+ * or a `DropdownMenu` whose trigger is a `SplitButtonTrailingButton`.
91
+ */
92
+ declare function SplitButtonLayoutTrailingButton(props: SlotProps): import("react").JSX.Element;
93
+ /**
94
+ * A Material 3 split button layout: a leading button for the primary action and a trailing button,
95
+ * usually for a menu of related actions. Both buttons take the same height.
96
+ */
97
+ declare function SplitButtonLayout(props: SplitButtonLayoutProps): import("react").JSX.Element;
98
+ declare namespace SplitButtonLayout {
99
+ var LeadingButton: typeof SplitButtonLayoutLeadingButton;
100
+ var TrailingButton: typeof SplitButtonLayoutTrailingButton;
101
+ }
102
+ export { SplitButtonLayout, SplitButtonLeadingButton, SplitButtonTrailingButton };
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { requireNativeView } from 'expo';
3
+ import { createViewModifierEventListener } from '../modifiers/utils';
4
+ const SplitButtonLayoutNativeView = requireNativeView('ExpoUI', 'SplitButtonLayoutView');
5
+ const SplitButtonLeadingButtonNativeView = requireNativeView('ExpoUI', 'SplitButtonLeadingButtonView');
6
+ const SplitButtonTrailingButtonNativeView = requireNativeView('ExpoUI', 'SplitButtonTrailingButtonView');
7
+ const SlotNativeView = requireNativeView('ExpoUI', 'SlotView');
8
+ /**
9
+ * The leading button of a split button, which runs the primary action.
10
+ * Goes in the `SplitButtonLayout.LeadingButton` slot.
11
+ * Wraps `SplitButtonDefaults.LeadingButton`.
12
+ */ function SplitButtonLeadingButton(props) {
13
+ const { onClick, modifiers, ...restProps } = props;
14
+ return /*#__PURE__*/ _jsx(SplitButtonLeadingButtonNativeView, {
15
+ modifiers: modifiers,
16
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
17
+ ...restProps,
18
+ enabled: props.enabled ?? true,
19
+ onButtonPressed: onClick ? ()=>onClick() : undefined
20
+ });
21
+ }
22
+ /**
23
+ * The trailing button of a split button, which usually opens a `DropdownMenu` of related actions.
24
+ * Goes in the `SplitButtonLayout.TrailingButton` slot.
25
+ * Wraps `SplitButtonDefaults.TrailingButton`.
26
+ */ function SplitButtonTrailingButton(props) {
27
+ const { onCheckedChange, modifiers, ...restProps } = props;
28
+ return /*#__PURE__*/ _jsx(SplitButtonTrailingButtonNativeView, {
29
+ modifiers: modifiers,
30
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
31
+ ...restProps,
32
+ enabled: props.enabled ?? true,
33
+ onCheckedChange: onCheckedChange ? ({ nativeEvent: { checked } })=>onCheckedChange(checked) : undefined
34
+ });
35
+ }
36
+ /**
37
+ * Leading button slot for `SplitButtonLayout`. Usually holds a `SplitButtonLeadingButton`.
38
+ */ function SplitButtonLayoutLeadingButton(props) {
39
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
40
+ slotName: "leadingButton",
41
+ children: props.children
42
+ });
43
+ }
44
+ /**
45
+ * Trailing button slot for `SplitButtonLayout`. Usually holds a `SplitButtonTrailingButton`,
46
+ * or a `DropdownMenu` whose trigger is a `SplitButtonTrailingButton`.
47
+ */ function SplitButtonLayoutTrailingButton(props) {
48
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
49
+ slotName: "trailingButton",
50
+ children: props.children
51
+ });
52
+ }
53
+ /**
54
+ * A Material 3 split button layout: a leading button for the primary action and a trailing button,
55
+ * usually for a menu of related actions. Both buttons take the same height.
56
+ */ function SplitButtonLayout(props) {
57
+ const { modifiers, ...restProps } = props;
58
+ return /*#__PURE__*/ _jsx(SplitButtonLayoutNativeView, {
59
+ modifiers: modifiers,
60
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
61
+ ...restProps
62
+ });
63
+ }
64
+ SplitButtonLayout.LeadingButton = SplitButtonLayoutLeadingButton;
65
+ SplitButtonLayout.TrailingButton = SplitButtonLayoutTrailingButton;
66
+ export { SplitButtonLayout, SplitButtonLeadingButton, SplitButtonTrailingButton };
67
+
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["jetpack-compose/SplitButtonLayout/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SplitButtonLayoutNativeView","SplitButtonLeadingButtonNativeView","SplitButtonTrailingButtonNativeView","SlotNativeView","SplitButtonLeadingButton","props","onClick","modifiers","restProps","undefined","enabled","onButtonPressed","SplitButtonTrailingButton","onCheckedChange","nativeEvent","checked","SplitButtonLayoutLeadingButton","slotName","children","SplitButtonLayoutTrailingButton","SplitButtonLayout","LeadingButton","TrailingButton"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AA0FrE,MAAMC,8BAA2EF,kBAC/E,UACA;AAGF,MAAMG,qCACJH,kBAAkB,UAAU;AAE9B,MAAMI,sCACJJ,kBAAkB,UAAU;AAE9B,MAAMK,iBAA2DL,kBAC/D,UACA;AAGF;;;;CAIC,GACD,SAASM,yBAAyBC,KAAoC;IACpE,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,WAAW,GAAGH;IAC7C,qBACE,KAACJ;QACCM,WAAWA;QACV,GAAIA,YAAYR,gCAAgCQ,aAAaE,SAAS;QACtE,GAAGD,SAAS;QACbE,SAASL,MAAMK,OAAO,IAAI;QAC1BC,iBAAiBL,UAAU,IAAMA,YAAYG;;AAGnD;AAEA;;;;CAIC,GACD,SAASG,0BAA0BP,KAAqC;IACtE,MAAM,EAAEQ,eAAe,EAAEN,SAAS,EAAE,GAAGC,WAAW,GAAGH;IACrD,qBACE,KAACH;QACCK,WAAWA;QACV,GAAIA,YAAYR,gCAAgCQ,aAAaE,SAAS;QACtE,GAAGD,SAAS;QACbE,SAASL,MAAMK,OAAO,IAAI;QAC1BG,iBACEA,kBAAkB,CAAC,EAAEC,aAAa,EAAEC,OAAO,EAAE,EAAE,GAAKF,gBAAgBE,WAAWN;;AAIvF;AAEA;;CAEC,GACD,SAASO,+BAA+BX,KAAgB;IACtD,qBAAO,KAACF;QAAec,UAAS;kBAAiBZ,MAAMa,QAAQ;;AACjE;AAEA;;;CAGC,GACD,SAASC,gCAAgCd,KAAgB;IACvD,qBAAO,KAACF;QAAec,UAAS;kBAAkBZ,MAAMa,QAAQ;;AAClE;AAEA;;;CAGC,GACD,SAASE,kBAAkBf,KAA6B;IACtD,MAAM,EAAEE,SAAS,EAAE,GAAGC,WAAW,GAAGH;IACpC,qBACE,KAACL;QACCO,WAAWA;QACV,GAAIA,YAAYR,gCAAgCQ,aAAaE,SAAS;QACtE,GAAGD,SAAS;;AAGnB;AAEAY,kBAAkBC,aAAa,GAAGL;AAClCI,kBAAkBE,cAAc,GAAGH;AAEnC,SAASC,iBAAiB,EAAEhB,wBAAwB,EAAEQ,yBAAyB,GAAG"}
@@ -24,6 +24,7 @@ export * from './SegmentedButton';
24
24
  export * from './Progress';
25
25
  export * from './Slider';
26
26
  export * from './Spacer';
27
+ export * from './SplitButtonLayout';
27
28
  export * from './Switch';
28
29
  export * from './SyncSwitch';
29
30
  export { TextField, OutlinedTextField, BasicTextField, type TextFieldProps, type OutlinedTextFieldProps, type BasicTextFieldProps, type BasicTextFieldRef, type TextFieldRef, type TextFieldCapitalization, type TextFieldImeAction, type TextFieldKeyboardOptions, type TextFieldKeyboardType, type TextFieldKeyboardActions, type TextFieldColors, type TextFieldTextStyle, type CommonTextFieldProperties, } from './TextField';
@@ -24,6 +24,7 @@ export * from './SegmentedButton';
24
24
  export * from './Progress';
25
25
  export * from './Slider';
26
26
  export * from './Spacer';
27
+ export * from './SplitButtonLayout';
27
28
  export * from './Switch';
28
29
  export * from './SyncSwitch';
29
30
  export { TextField, OutlinedTextField, BasicTextField } from './TextField';
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState","useWorkletCallback"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,6BAA6B;AAC3C,cAAc,YAAY;AAC1B,SAASC,cAAc,EAAEC,kBAAkB,QAA8B,WAAW"}
1
+ {"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState","useWorkletCallback"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,6BAA6B;AAC3C,cAAc,YAAY;AAC1B,SAASC,cAAc,EAAEC,kBAAkB,QAA8B,WAAW"}
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Column as ComposeColumn, Text as ComposeText, ListItem, useMaterialColors } from '@expo/ui/jetpack-compose';
3
- import { clip, fillMaxWidth, padding, Shapes } from '@expo/ui/jetpack-compose/modifiers';
3
+ import { clickable, clip, fillMaxWidth, padding, Shapes } from '@expo/ui/jetpack-compose/modifiers';
4
+ import { cloneElement, isValidElement } from 'react';
5
+ import { ListItem as UniversalListItem } from '../ListItem';
4
6
  import { useUniversalLifecycle } from '../hooks';
5
7
  import { getUserSizingOverrides } from '../modifierUtils';
6
8
  import { transformToModifiers } from '../transformStyle';
@@ -62,14 +64,36 @@ import { getFieldItemPosition } from './types';
62
64
  ],
63
65
  children: rows.map((child, index)=>{
64
66
  const position = getFieldItemPosition(index, rows.length);
67
+ const rowModifiers = [
68
+ fillMaxWidth(),
69
+ clip(Shapes.RoundedCorner(cornerRadii(position)))
70
+ ];
71
+ if (isUniversalListItem(child)) {
72
+ // A `ListItem` already renders a Compose `ListItem`. Style it as the row instead of
73
+ // nesting it in another one, which would draw a second surface with its own padding.
74
+ const { onPress, modifiers, colors: itemColors } = child.props;
75
+ return /*#__PURE__*/ cloneElement(child, {
76
+ key: index,
77
+ onPress: undefined,
78
+ colors: {
79
+ containerColor: colors.surfaceContainer,
80
+ ...itemColors
81
+ },
82
+ // Clip before `clickable` so the ripple follows the rounded row.
83
+ modifiers: [
84
+ ...rowModifiers,
85
+ ...onPress ? [
86
+ clickable(onPress)
87
+ ] : [],
88
+ ...modifiers ?? []
89
+ ]
90
+ });
91
+ }
65
92
  return /*#__PURE__*/ _jsx(ListItem, {
66
93
  colors: {
67
94
  containerColor: colors.surfaceContainer
68
95
  },
69
- modifiers: [
70
- fillMaxWidth(),
71
- clip(Shapes.RoundedCorner(cornerRadii(position)))
72
- ],
96
+ modifiers: rowModifiers,
73
97
  children: /*#__PURE__*/ _jsx(ListItem.HeadlineContent, {
74
98
  children: child
75
99
  })
@@ -85,6 +109,9 @@ import { getFieldItemPosition } from './types';
85
109
  ]
86
110
  });
87
111
  }
112
+ function isUniversalListItem(node) {
113
+ return /*#__PURE__*/ isValidElement(node) && node.type === UniversalListItem;
114
+ }
88
115
  /**
89
116
  * Per-position corner radii used to produce the Material 3 grouped-list look.
90
117
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/FieldGroup/FieldSection.android.tsx"],"sourcesContent":[null],"names":["Column","ComposeColumn","Text","ComposeText","ListItem","useMaterialColors","clip","fillMaxWidth","padding","Shapes","useUniversalLifecycle","getUserSizingOverrides","transformToModifiers","extractFieldSectionSlots","getFieldItemPosition","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","titleUppercase","modifiers","extraModifiers","colors","header","footer","rows","widthIsPercentage","width","userOwnsWidth","sectionModifiers","outerModifiers","componentName","headerNode","color","onSurfaceVariant","typography","letterSpacing","undefined","toUpperCase","verticalArrangement","spacedBy","length","map","child","index","position","containerColor","surfaceContainer","RoundedCorner","cornerRadii","HeadlineContent","full","small","topStart","topEnd","bottomStart","bottomEnd"],"mappings":";AAAA,SACEA,UAAUC,aAAa,EACvBC,QAAQC,WAAW,EACnBC,QAAQ,EACRC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,IAAI,EAAEC,YAAY,EAAEC,OAAO,EAAEC,MAAM,QAAQ,qCAAqC;AAEzF,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,sBAAsB,QAAQ,mBAAmB;AAC1D,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAC/D,SAASC,oBAAoB,QAAwD,UAAU;AAE/F;;;;;;CAMC,GACD,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,WAAWC,cAAc,EACP;IAClBhB,sBAAsBS,UAAUC;IAChC,MAAMO,SAAStB;IAEf,IAAIiB,QAAQ,OAAO;IAEnB,MAAM,EAAEM,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGjB,yBAAyBG;IAE1D,4DAA4D;I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AGqB;iBAA0B;;;AAG9F;AAEA;;;;;;;CAOC,GACD,SAASyB,YAAYJ,QAA2B;IAC9C,MAAMM,OAAO;IACb,MAAMC,QAAQ;IACd,OAAQP;QACN,KAAK;YACH,OAAO;gBAAEQ,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaJ;gBAAMK,WAAWL;YAAK;QAC5E,KAAK;YACH,OAAO;gBAAEE,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaH;gBAAOI,WAAWJ;YAAM;QAC9E,KAAK;YACH,OAAO;gBAAEC,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaJ;gBAAMK,WAAWL;YAAK;QAC9E,KAAK;QACL;YACE,OAAO;gBAAEE,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaH;gBAAOI,WAAWJ;YAAM;IAClF;AACF"}
1
+ {"version":3,"sources":["universal/FieldGroup/FieldSection.android.tsx"],"sourcesContent":[null],"names":["Column","ComposeColumn","Text","ComposeText","ListItem","useMaterialColors","clickable","clip","fillMaxWidth","padding","Shapes","cloneElement","isValidElement","UniversalListItem","useUniversalLifecycle","getUserSizingOverrides","transformToModifiers","extractFieldSectionSlots","getFieldItemPosition","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","titleUppercase","modifiers","extraModifiers","colors","header","footer","rows","widthIsPercentage","width","userOwnsWidth","sectionModifiers","outerModifiers","componentName","headerNode","color","onSurfaceVariant","typography","letterSpacing","undefined","toUpperCase","verticalArrangement","spacedBy","length","map","child","index","position","rowModifiers","RoundedCorner","cornerRadii","isUniversalListItem","onPress","itemColors","props","key","containerColor","surfaceContainer","HeadlineContent","node","type","full","small","topStart","topEnd","bottomStart","bottomEnd"],"mappings":";AAAA,SACEA,UAAUC,aAAa,EACvBC,QAAQC,WAAW,EACnBC,QAAQ,EACRC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,EAAEC,IAAI,EAAEC,YAAY,EAAEC,OAAO,EAAEC,MAAM,QAAQ,qCAAqC;A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Mc,OAAO;IACb,MAAMC,QAAQ;IACd,OAAQf;QACN,KAAK;YACH,OAAO;gBAAEgB,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaJ;gBAAMK,WAAWL;YAAK;QAC5E,KAAK;YACH,OAAO;gBAAEE,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaH;gBAAOI,WAAWJ;YAAM;QAC9E,KAAK;YACH,OAAO;gBAAEC,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaJ;gBAAMK,WAAWL;YAAK;QAC9E,KAAK;QACL;YACE,OAAO;gBAAEE,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaH;gBAAOI,WAAWJ;YAAM;IAClF;AACF"}
@@ -1,3 +1,3 @@
1
1
  import type { TextInputProps } from './types';
2
- export declare 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, underlineColorAndroid, testID, placeholderTextColor, textStyle, style, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selectionHandleColor, selection, onSelectionChange, selectTextOnFocus, modifiers: userModifiers, }: TextInputProps): import("react").JSX.Element;
2
+ export declare 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, underlineColorAndroid, testID, placeholderTextColor, textStyle, style, secureTextEntry, autoComplete, onContentSizeChange, maxLength, caretHidden, selectionColor, selectionHandleColor, selection, onSelectionChange, selectTextOnFocus, modifiers: userModifiers, }: TextInputProps): import("react").JSX.Element;
3
3
  export * from './types';