@expo/ui 1.0.0-canary-20250305-0af9ad2 → 1.0.0-canary-20250306-d9d3e02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -45,6 +45,7 @@
45
45
 
46
46
  ### 💡 Others
47
47
 
48
+ - Add docs ([#34808](https://github.com/expo/expo/pull/34808) by [@aleqsio](https://github.com/aleqsio))
48
49
  - [apple] Migrate remaining `expo-module.config.json` to unified platform syntax. ([#34445](https://github.com/expo/expo/pull/34445) by [@reichhartd](https://github.com/reichhartd))
49
50
  - Rename the events for the `Switch` component. ([#34577](https://github.com/expo/expo/pull/34577) by [@behenate](https://github.com/behenate))
50
51
 
@@ -1,6 +1,6 @@
1
1
  import { StyleProp, ViewStyle } from 'react-native';
2
2
  import { MaterialIcon } from './types';
3
- import { ViewEvent } from '../../src';
3
+ import { ViewEvent } from '../../src/types';
4
4
  /**
5
5
  * The role of the button.
6
6
  * - `default` - The default button role.
@@ -11,10 +11,12 @@ import { ViewEvent } from '../../src';
11
11
  export type ButtonRole = 'default' | 'cancel' | 'destructive';
12
12
  /**
13
13
  * The built-in button styles available on iOS and Android.
14
+ *
14
15
  * Common styles:
15
16
  * - `default` - The default system button style.
16
17
  * - `bordered` - A button with a light fill. On Android equivalent to `FilledTonalButton`.
17
18
  * - `borderless` - A button with no background or border. On Android equivalent to `TextButton`.
19
+ *
18
20
  * Apple-only styles:
19
21
  * - `borderedProminent` - A bordered button with a prominent appearance.
20
22
  * - `plain` - A button with no border or background and a less prominent text.
@@ -23,11 +25,22 @@ export type ButtonRole = 'default' | 'cancel' | 'destructive';
23
25
  * - `accessoryBarAction` - A button style for accessory bar actions.
24
26
  * - `card` - A button style for cards.
25
27
  * - `link` - A button style for links.
28
+ *
26
29
  * Android-only styles:
27
30
  * - `outlined` - A button with an outline.
28
31
  * - `elevated` - A filled button with a shadow.
29
32
  */
30
33
  export type ButtonVariant = 'default' | 'bordered' | 'plain' | 'borderedProminent' | 'borderless' | 'accessoryBar' | 'accessoryBarAction' | 'card' | 'link' | 'outlined' | 'elevated';
34
+ /**
35
+ * Colors for button's core elements.
36
+ * @platform android
37
+ */
38
+ export type ButtonElementColors = {
39
+ containerColor?: string;
40
+ contentColor?: string;
41
+ disabledContainerColor?: string;
42
+ disabledContentColor?: string;
43
+ };
31
44
  export type ButtonProps = {
32
45
  /**
33
46
  * A callback that is called when the button is pressed.
@@ -62,12 +75,7 @@ export type ButtonProps = {
62
75
  * Colors for button's core elements.
63
76
  * @platform android
64
77
  */
65
- elementColors?: {
66
- containerColor?: string;
67
- contentColor?: string;
68
- disabledContainerColor?: string;
69
- disabledContentColor?: string;
70
- };
78
+ elementColors?: ButtonElementColors;
71
79
  /**
72
80
  * Button color.
73
81
  */
@@ -77,11 +85,20 @@ export type ButtonProps = {
77
85
  */
78
86
  disabled?: boolean;
79
87
  };
88
+ /**
89
+ * @hidden
90
+ */
80
91
  export type NativeButtonProps = Omit<ButtonProps, 'role' | 'onPress' | 'children' | 'systemImage'> & {
81
92
  buttonRole?: ButtonRole;
82
93
  text: string;
83
94
  systemImage?: string;
84
95
  } & ViewEvent<'onButtonPressed', void>;
96
+ /**
97
+ * @hidden
98
+ */
85
99
  export declare function transformButtonProps(props: ButtonProps): NativeButtonProps;
100
+ /**
101
+ * Displays a native button component.
102
+ */
86
103
  export declare function Button(props: ButtonProps): import("react").JSX.Element;
87
104
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GA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GG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,WAAW,EACX,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAChD,GAAG;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;AAQvC;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAgB1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAWxC"}
@@ -1,18 +1,27 @@
1
- import React, { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
3
3
  import { ButtonProps } from '../Button';
4
4
  import { PickerProps } from '../Picker';
5
5
  import { SwitchProps } from '../Switch';
6
6
  type SubmenuElement = ReactElement<ButtonProps> | ReactElement<SwitchProps> | ReactElement<PickerProps> | ReactElement<SubmenuProps>;
7
7
  type ContentChildren = SubmenuElement | SubmenuElement[];
8
+ /**
9
+ * @hidden
10
+ */
8
11
  export type ContextMenuContentProps = {
9
12
  children: ContentChildren;
10
13
  };
14
+ /**
15
+ * @hidden
16
+ */
11
17
  export type EventHandlers = {
12
18
  [key: string]: {
13
19
  [key: string]: (event: NativeSyntheticEvent<any>) => void;
14
20
  };
15
21
  };
22
+ /**
23
+ * @hidden
24
+ */
16
25
  export type ContextMenuElementBase = {
17
26
  contextMenuElementID: string;
18
27
  };
@@ -71,7 +80,7 @@ export type SubmenuProps = {
71
80
  * The `Submenu` component is used to create a nested context menu. Submenus can be infinitely nested.
72
81
  * Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple titled sections.
73
82
  */
74
- export declare function Submenu(props: SubmenuProps): React.JSX.Element;
83
+ export declare function Submenu(props: SubmenuProps): import("react").JSX.Element;
75
84
  /**
76
85
  * `ContextMenu` allows you to create a context menu, which can be used to provide additional options to the user.
77
86
  *
@@ -81,6 +90,6 @@ export declare function Submenu(props: SubmenuProps): React.JSX.Element;
81
90
  * - Android does not support nesting in the context menu. All the submenus will be flat-mapped into a single level with multiple sections. The `title` prop of the `Button`, which opens the submenu on iOS will be used as a section title.
82
91
  * - Android does not support showing a `Picker` element in the context menu.
83
92
  */
84
- export declare function ContextMenu(props: ContextMenuProps): React.JSX.Element;
93
+ export declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
85
94
  export {};
86
95
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,KAAK,cAAc,GACf,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,YAAY,CAAC,CAAC;AAE/B,KAAK,eAAe,GAAG,cAAc,GAAG,cAAc,EAAE,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MA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CAAC,WAAW,CAAC,CAAC;IACxC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AA2BF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAE1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAwBlD"}
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { StyleProp, ViewStyle } from 'react-native';
3
- import { ViewEvent } from '../../src';
2
+ import { ViewEvent } from '../../src/types';
4
3
  type AndroidVariant = 'picker' | 'input';
5
4
  type IOSVariant = 'wheel' | 'automatic' | 'graphical' | 'compact';
6
5
  type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
@@ -68,6 +67,6 @@ type NativeDatePickerProps = Omit<DatePickerProps, 'iosVariant' | 'androidVarian
68
67
  date: Date;
69
68
  }>;
70
69
  export declare function transformDatePickerProps(props: DatePickerProps): NativeDatePickerProps;
71
- export declare function DateTimePicker(props: DatePickerProps): React.JSX.Element;
70
+ export declare function DateTimePicker(props: DatePickerProps): import("react").JSX.Element;
72
71
  export {};
73
72
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/DatePicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,KAAK,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzC,KAAK,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAElE,KAAK,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;I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AAElE,KAAK,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAC/B,eAAe,EACf,YAAY,GAAG,gBAAgB,GAAG,gBAAgB,CACnD,GAAG;IACF,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;CACvC,GAAG,SAAS,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAEhD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,qBAAqB,CAStF;AAOD,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,+BAEpD"}
@@ -1,4 +1,22 @@
1
1
  import { StyleProp, ViewStyle } from 'react-native';
2
+ /**
3
+ * Colors for picker's core elements.
4
+ * @platform android
5
+ */
6
+ export type PickerElementColors = {
7
+ activeBorderColor?: string;
8
+ activeContentColor?: string;
9
+ inactiveBorderColor?: string;
10
+ inactiveContentColor?: string;
11
+ disabledActiveBorderColor?: string;
12
+ disabledActiveContentColor?: string;
13
+ disabledInactiveBorderColor?: string;
14
+ disabledInactiveContentColor?: string;
15
+ activeContainerColor?: string;
16
+ inactiveContainerColor?: string;
17
+ disabledActiveContainerColor?: string;
18
+ disabledInactiveContainerColor?: string;
19
+ };
2
20
  /**
3
21
  * Props for the Picker component.
4
22
  */
@@ -39,20 +57,7 @@ export type PickerProps = {
39
57
  * Colors for picker's core elements.
40
58
  * @platform android
41
59
  */
42
- elementColors?: {
43
- activeBorderColor?: string;
44
- activeContentColor?: string;
45
- inactiveBorderColor?: string;
46
- inactiveContentColor?: string;
47
- disabledActiveBorderColor?: string;
48
- disabledActiveContentColor?: string;
49
- disabledInactiveBorderColor?: string;
50
- disabledInactiveContentColor?: string;
51
- activeContainerColor?: string;
52
- inactiveContainerColor?: string;
53
- disabledActiveContainerColor?: string;
54
- disabledInactiveContainerColor?: string;
55
- };
60
+ elementColors?: PickerElementColors;
56
61
  /**
57
62
  * Picker color. On iOS it only applies to the `menu` variant.
58
63
  */
@@ -60,6 +65,9 @@ export type PickerProps = {
60
65
  };
61
66
  type NativePickerProps = PickerProps;
62
67
  export declare function transformPickerProps(props: PickerProps): NativePickerProps;
68
+ /**
69
+ * Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button.
70
+ */
63
71
  export declare function Picker(props: PickerProps): import("react").JSX.Element;
64
72
  export {};
65
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Picker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;OAGG;IACH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,GAAG,iBAAiB,CAa1E;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
@@ -1,5 +1,16 @@
1
1
  import { StyleProp, ViewStyle } from 'react-native';
2
- import { ViewEvent } from '../../src';
2
+ import { ViewEvent } from '../../src/types';
3
+ /**
4
+ * Colors for slider's core elements.
5
+ * @platform android
6
+ */
7
+ export type SliderElementColors = {
8
+ thumbColor?: string;
9
+ activeTrackColor?: string;
10
+ inactiveTrackColor?: string;
11
+ activeTickColor?: string;
12
+ inactiveTickColor?: string;
13
+ };
3
14
  export type SliderProps = {
4
15
  /**
5
16
  * Custom styles for the slider component.
@@ -29,13 +40,7 @@ export type SliderProps = {
29
40
  * Colors for slider's core elements.
30
41
  * @platform android
31
42
  */
32
- elementColors?: {
33
- thumbColor?: string;
34
- activeTrackColor?: string;
35
- inactiveTrackColor?: string;
36
- activeTickColor?: string;
37
- inactiveTickColor?: string;
38
- };
43
+ elementColors?: SliderElementColors;
39
44
  /**
40
45
  * Slider color.
41
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Slider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAA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AGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,GACzD,SAAS,CAAC,gBAAgB,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAOjD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAqB1E;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
@@ -1,5 +1,5 @@
1
1
  import { StyleProp, ViewStyle } from 'react-native';
2
- import { ViewEvent } from '../../src';
2
+ import { ViewEvent } from '../../src/types';
3
3
  export type TextInputRole = 'default' | 'cancel' | 'destructive';
4
4
  /**
5
5
  * Props for the TextInput component.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EACT,SAAS,GACT,eAAe,GACf,SAAS,GACT,WAAW,GACX,eAAe,GACf,yBAAyB,GACzB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,SAAS,GACT,YAAY,GACZ,0BAA0B,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,SAAS,CACpF,gBAAgB,EAChB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CACtC,CAAC;AAiBJ,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAE9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EACT,SAAS,GACT,eAAe,GACf,SAAS,GACT,WAAW,GACX,eAAe,GACf,yBAAyB,GACzB,KAAK,GACL,gBAAgB,GAChB,aAAa,GACb,SAAS,GACT,YAAY,GACZ,0BAA0B,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,SAAS,CACpF,gBAAgB,EAChB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CACtC,CAAC;AAiBJ,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAE9C"}
@@ -0,0 +1,13 @@
1
+ export type * from '../components/Switch';
2
+ export type * from '../components/Picker';
3
+ export type * from '../components/Button';
4
+ export type * from '../components/ContextMenu';
5
+ export type * from '../components/Section';
6
+ export type * from '../components/Slider';
7
+ /**
8
+ * @hidden
9
+ */
10
+ export type ViewEvent<Name extends string, Data> = Record<Name, Data extends object ? ((event: {
11
+ nativeEvent: Data;
12
+ }) => void) | undefined : (() => void) | undefined>;
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,uBAAuB,CAAC;AAC3C,mBAAmB,sBAAsB,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC"}
@@ -2,7 +2,7 @@ import { requireNativeView } from 'expo';
2
2
  import { Platform, StyleProp, StyleSheet, ViewStyle } from 'react-native';
3
3
 
4
4
  import { MaterialIcon } from './types';
5
- import { ViewEvent } from '../../src';
5
+ import { ViewEvent } from '../../src/types';
6
6
 
7
7
  /**
8
8
  * The role of the button.
@@ -15,10 +15,12 @@ export type ButtonRole = 'default' | 'cancel' | 'destructive';
15
15
 
16
16
  /**
17
17
  * The built-in button styles available on iOS and Android.
18
+ *
18
19
  * Common styles:
19
20
  * - `default` - The default system button style.
20
21
  * - `bordered` - A button with a light fill. On Android equivalent to `FilledTonalButton`.
21
22
  * - `borderless` - A button with no background or border. On Android equivalent to `TextButton`.
23
+ *
22
24
  * Apple-only styles:
23
25
  * - `borderedProminent` - A bordered button with a prominent appearance.
24
26
  * - `plain` - A button with no border or background and a less prominent text.
@@ -27,6 +29,7 @@ export type ButtonRole = 'default' | 'cancel' | 'destructive';
27
29
  * - `accessoryBarAction` - A button style for accessory bar actions.
28
30
  * - `card` - A button style for cards.
29
31
  * - `link` - A button style for links.
32
+ *
30
33
  * Android-only styles:
31
34
  * - `outlined` - A button with an outline.
32
35
  * - `elevated` - A filled button with a shadow.
@@ -48,6 +51,17 @@ export type ButtonVariant =
48
51
  | 'outlined'
49
52
  | 'elevated';
50
53
 
54
+ /**
55
+ * Colors for button's core elements.
56
+ * @platform android
57
+ */
58
+ export type ButtonElementColors = {
59
+ containerColor?: string;
60
+ contentColor?: string;
61
+ disabledContainerColor?: string;
62
+ disabledContentColor?: string;
63
+ };
64
+
51
65
  export type ButtonProps = {
52
66
  /**
53
67
  * A callback that is called when the button is pressed.
@@ -82,12 +96,7 @@ export type ButtonProps = {
82
96
  * Colors for button's core elements.
83
97
  * @platform android
84
98
  */
85
- elementColors?: {
86
- containerColor?: string;
87
- contentColor?: string;
88
- disabledContainerColor?: string;
89
- disabledContentColor?: string;
90
- };
99
+ elementColors?: ButtonElementColors;
91
100
  /**
92
101
  * Button color.
93
102
  */
@@ -98,6 +107,9 @@ export type ButtonProps = {
98
107
  disabled?: boolean;
99
108
  };
100
109
 
110
+ /**
111
+ * @hidden
112
+ */
101
113
  export type NativeButtonProps = Omit<
102
114
  ButtonProps,
103
115
  'role' | 'onPress' | 'children' | 'systemImage'
@@ -113,6 +125,9 @@ const ButtonNativeView: React.ComponentType<NativeButtonProps> = requireNativeVi
113
125
  'Button'
114
126
  );
115
127
 
128
+ /**
129
+ * @hidden
130
+ */
116
131
  export function transformButtonProps(props: ButtonProps): NativeButtonProps {
117
132
  const { role, children, onPress, systemImage, ...restProps } = props;
118
133
  return {
@@ -131,6 +146,9 @@ export function transformButtonProps(props: ButtonProps): NativeButtonProps {
131
146
  };
132
147
  }
133
148
 
149
+ /**
150
+ * Displays a native button component.
151
+ */
134
152
  export function Button(props: ButtonProps) {
135
153
  // Min height from https://m3.material.io/components/buttons/specs, minWidth
136
154
  return (
@@ -1,5 +1,5 @@
1
1
  import { requireNativeView } from 'expo';
2
- import React, { ReactElement, ReactNode, useMemo } from 'react';
2
+ import { ReactElement, ReactNode, useMemo } from 'react';
3
3
  import { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
4
4
 
5
5
  import { ButtonProps } from '../Button';
@@ -15,16 +15,25 @@ type SubmenuElement =
15
15
 
16
16
  type ContentChildren = SubmenuElement | SubmenuElement[];
17
17
 
18
+ /**
19
+ * @hidden
20
+ */
18
21
  export type ContextMenuContentProps = {
19
22
  children: ContentChildren;
20
23
  };
21
24
 
25
+ /**
26
+ * @hidden
27
+ */
22
28
  export type EventHandlers = {
23
29
  [key: string]: {
24
30
  [key: string]: (event: NativeSyntheticEvent<any>) => void;
25
31
  };
26
32
  };
27
33
 
34
+ /**
35
+ * @hidden
36
+ */
28
37
  export type ContextMenuElementBase = { contextMenuElementID: string };
29
38
 
30
39
  /**
@@ -1,9 +1,8 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { Platform } from 'expo-modules-core';
3
- import React from 'react';
4
3
  import { StyleProp, ViewStyle } from 'react-native';
5
4
 
6
- import { ViewEvent } from '../../src';
5
+ import { ViewEvent } from '../../src/types';
7
6
 
8
7
  type AndroidVariant = 'picker' | 'input';
9
8
 
@@ -1,6 +1,25 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
+ /**
5
+ * Colors for picker's core elements.
6
+ * @platform android
7
+ */
8
+ export type PickerElementColors = {
9
+ activeBorderColor?: string;
10
+ activeContentColor?: string;
11
+ inactiveBorderColor?: string;
12
+ inactiveContentColor?: string;
13
+ disabledActiveBorderColor?: string;
14
+ disabledActiveContentColor?: string;
15
+ disabledInactiveBorderColor?: string;
16
+ disabledInactiveContentColor?: string;
17
+ activeContainerColor?: string;
18
+ inactiveContainerColor?: string;
19
+ disabledActiveContainerColor?: string;
20
+ disabledInactiveContainerColor?: string;
21
+ };
22
+
4
23
  /**
5
24
  * Props for the Picker component.
6
25
  */
@@ -32,24 +51,12 @@ export type PickerProps = {
32
51
  * Optional style to apply to the picker component.
33
52
  */
34
53
  style?: StyleProp<ViewStyle>;
54
+
35
55
  /**
36
56
  * Colors for picker's core elements.
37
57
  * @platform android
38
58
  */
39
- elementColors?: {
40
- activeBorderColor?: string;
41
- activeContentColor?: string;
42
- inactiveBorderColor?: string;
43
- inactiveContentColor?: string;
44
- disabledActiveBorderColor?: string;
45
- disabledActiveContentColor?: string;
46
- disabledInactiveBorderColor?: string;
47
- disabledInactiveContentColor?: string;
48
- activeContainerColor?: string;
49
- inactiveContainerColor?: string;
50
- disabledActiveContainerColor?: string;
51
- disabledInactiveContainerColor?: string;
52
- };
59
+ elementColors?: PickerElementColors;
53
60
  /**
54
61
  * Picker color. On iOS it only applies to the `menu` variant.
55
62
  */
@@ -78,6 +85,9 @@ export function transformPickerProps(props: PickerProps): NativePickerProps {
78
85
  };
79
86
  }
80
87
 
88
+ /**
89
+ * Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button.
90
+ */
81
91
  export function Picker(props: PickerProps) {
82
92
  return <PickerNativeView {...transformPickerProps(props)} />;
83
93
  }
@@ -1,7 +1,19 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
- import { ViewEvent } from '../../src';
4
+ import { ViewEvent } from '../../src/types';
5
+
6
+ /**
7
+ * Colors for slider's core elements.
8
+ * @platform android
9
+ */
10
+ export type SliderElementColors = {
11
+ thumbColor?: string;
12
+ activeTrackColor?: string;
13
+ inactiveTrackColor?: string;
14
+ activeTickColor?: string;
15
+ inactiveTickColor?: string;
16
+ };
5
17
 
6
18
  export type SliderProps = {
7
19
  /**
@@ -32,13 +44,7 @@ export type SliderProps = {
32
44
  * Colors for slider's core elements.
33
45
  * @platform android
34
46
  */
35
- elementColors?: {
36
- thumbColor?: string;
37
- activeTrackColor?: string;
38
- inactiveTrackColor?: string;
39
- activeTickColor?: string;
40
- inactiveTickColor?: string;
41
- };
47
+ elementColors?: SliderElementColors;
42
48
  /**
43
49
  * Slider color.
44
50
  */
@@ -1,7 +1,7 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
- import { ViewEvent } from '../../src';
4
+ import { ViewEvent } from '../../src/types';
5
5
 
6
6
  export type TextInputRole = 'default' | 'cancel' | 'destructive';
7
7
 
package/package.json CHANGED
@@ -1,9 +1,7 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "1.0.0-canary-20250305-0af9ad2",
3
+ "version": "1.0.0-canary-20250306-d9d3e02",
4
4
  "description": "A collection of UI components",
5
- "main": "src/index.ts",
6
- "types": "build/index.d.ts",
7
5
  "scripts": {
8
6
  "build": "expo-module build",
9
7
  "clean": "expo-module clean",
@@ -29,12 +27,12 @@
29
27
  "dependencies": {},
30
28
  "devDependencies": {
31
29
  "@types/react": "~19.0.10",
32
- "expo-module-scripts": "4.0.5-canary-20250305-0af9ad2"
30
+ "expo-module-scripts": "4.0.5-canary-20250306-d9d3e02"
33
31
  },
34
32
  "peerDependencies": {
35
33
  "expo": "*",
36
34
  "react": "*",
37
35
  "react-native": "*"
38
36
  },
39
- "gitHead": "0af9ad2afd326af47eae076f81a89105a026312d"
37
+ "gitHead": "d9d3e024d8742099c307754673f17117a20c1dea"
40
38
  }
package/src/types.ts ADDED
@@ -0,0 +1,16 @@
1
+ export type * from '../components/Switch';
2
+ export type * from '../components/Picker';
3
+ export type * from '../components/Button';
4
+ export type * from '../components/ContextMenu';
5
+ export type * from '../components/Section';
6
+ export type * from '../components/Slider';
7
+
8
+ /**
9
+ * @hidden
10
+ */
11
+ export type ViewEvent<Name extends string, Data> = Record<
12
+ Name,
13
+ Data extends object
14
+ ? ((event: { nativeEvent: Data }) => void) | undefined
15
+ : (() => void) | undefined
16
+ >;
package/tsconfig.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "outDir": "./build",
5
5
  "emitDeclarationOnly": true
6
6
  },
7
- "include": ["./components", "src/index.ts"],
7
+ "include": ["./components", "src/types.ts"],
8
8
  "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
9
9
  }
@@ -1,13 +0,0 @@
1
- export type { Switch, SwitchProps } from '../components/Switch';
2
- export type { Picker, PickerProps } from '../components/Picker';
3
- export type { Button, ButtonProps } from '../components/Button';
4
- export type { ContextMenu, ContextMenuProps, Submenu, SubmenuProps, ActivationMethod, } from '../components/ContextMenu';
5
- export type { Section, SectionProps } from '../components/Section';
6
- export type { Slider, SliderProps } from '../components/Slider';
7
- /**
8
- * @hidden
9
- */
10
- export type ViewEvent<Name extends string, Data> = Record<Name, Data extends object ? ((event: {
11
- nativeEvent: Data;
12
- }) => void) | undefined : (() => void) | undefined>;
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,YAAY,EACZ,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC"}
package/src/index.ts DELETED
@@ -1,22 +0,0 @@
1
- export type { Switch, SwitchProps } from '../components/Switch';
2
- export type { Picker, PickerProps } from '../components/Picker';
3
- export type { Button, ButtonProps } from '../components/Button';
4
- export type {
5
- ContextMenu,
6
- ContextMenuProps,
7
- Submenu,
8
- SubmenuProps,
9
- ActivationMethod,
10
- } from '../components/ContextMenu';
11
- export type { Section, SectionProps } from '../components/Section';
12
- export type { Slider, SliderProps } from '../components/Slider';
13
-
14
- /**
15
- * @hidden
16
- */
17
- export type ViewEvent<Name extends string, Data> = Record<
18
- Name,
19
- Data extends object
20
- ? ((event: { nativeEvent: Data }) => void) | undefined
21
- : (() => void) | undefined
22
- >;