orn-ui 0.2.6 → 0.2.7
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/AGENTS.md +354 -0
- package/README.md +43 -13
- package/lib/typescript/atoms/Badge.d.ts +1 -1
- package/lib/typescript/atoms/Badge.d.ts.map +1 -1
- package/lib/typescript/atoms/Image.d.ts +6 -6
- package/lib/typescript/atoms/Image.d.ts.map +1 -1
- package/lib/typescript/atoms/Input.d.ts +1 -1
- package/lib/typescript/atoms/Input.d.ts.map +1 -1
- package/lib/typescript/atoms/PressableScale.d.ts +1 -1
- package/lib/typescript/atoms/PressableScale.d.ts.map +1 -1
- package/lib/typescript/atoms/Skeleton.d.ts +5 -5
- package/lib/typescript/atoms/Skeleton.d.ts.map +1 -1
- package/lib/typescript/atoms/Spinner.d.ts +4 -4
- package/lib/typescript/atoms/Spinner.d.ts.map +1 -1
- package/lib/typescript/atoms/Transition.d.ts +10 -10
- package/lib/typescript/atoms/Transition.d.ts.map +1 -1
- package/lib/typescript/molecules/AvatarHeader.d.ts +2 -2
- package/lib/typescript/molecules/AvatarHeader.d.ts.map +1 -1
- package/lib/typescript/molecules/FormActions.d.ts +1 -1
- package/lib/typescript/molecules/FormActions.d.ts.map +1 -1
- package/lib/typescript/molecules/OptionCard.d.ts +2 -2
- package/lib/typescript/molecules/OptionCard.d.ts.map +1 -1
- package/lib/typescript/molecules/Stepper.d.ts +8 -8
- package/lib/typescript/molecules/Stepper.d.ts.map +1 -1
- package/lib/typescript/molecules/Steps.d.ts +3 -3
- package/lib/typescript/molecules/Steps.d.ts.map +1 -1
- package/lib/typescript/molecules/SymmetricGrid.d.ts +4 -4
- package/lib/typescript/molecules/SymmetricGrid.d.ts.map +1 -1
- package/lib/typescript/organisms/BottomSheet.d.ts +8 -8
- package/lib/typescript/organisms/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/organisms/DateField.d.ts +10 -10
- package/lib/typescript/organisms/DateField.d.ts.map +1 -1
- package/lib/typescript/organisms/DatePicker.d.ts +10 -10
- package/lib/typescript/organisms/DatePicker.d.ts.map +1 -1
- package/lib/typescript/organisms/List.d.ts +6 -6
- package/lib/typescript/organisms/List.d.ts.map +1 -1
- package/lib/typescript/organisms/NavigationBar.d.ts +2 -2
- package/lib/typescript/organisms/NavigationBar.d.ts.map +1 -1
- package/lib/typescript/organisms/ReorderableList.d.ts +7 -7
- package/lib/typescript/organisms/ReorderableList.d.ts.map +1 -1
- package/lib/typescript/organisms/Screen.d.ts +6 -6
- package/lib/typescript/organisms/SearchList.d.ts +8 -8
- package/lib/typescript/organisms/SearchList.d.ts.map +1 -1
- package/lib/typescript/organisms/Select.d.ts +2 -2
- package/lib/typescript/organisms/Select.d.ts.map +1 -1
- package/lib/typescript/organisms/Toast.d.ts +2 -2
- package/lib/typescript/organisms/Toast.d.ts.map +1 -1
- package/lib/typescript/organisms/ToastProvider.d.ts +2 -2
- package/lib/typescript/organisms/ToastProvider.d.ts.map +1 -1
- package/lib/typescript/organisms/Wizard.d.ts +7 -7
- package/lib/typescript/organisms/Wizard.d.ts.map +1 -1
- package/lib/typescript/theme/UIProvider.d.ts +9 -9
- package/lib/typescript/theme/UIProvider.d.ts.map +1 -1
- package/llms.txt +33 -0
- package/package.json +24 -6
- package/registry/avatar-header.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bottom-sheet.json +1 -1
- package/registry/core.json +1 -1
- package/registry/date-field.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/form-actions.json +1 -1
- package/registry/image.json +1 -1
- package/registry/index.json +26 -26
- package/registry/input.json +1 -1
- package/registry/list.json +1 -1
- package/registry/navigation-bar.json +1 -1
- package/registry/option-card.json +1 -1
- package/registry/pressable-scale.json +1 -1
- package/registry/reorderable-list.json +1 -1
- package/registry/screen.json +1 -1
- package/registry/search-list.json +1 -1
- package/registry/select.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/steps.json +1 -1
- package/registry/symmetric-grid.json +1 -1
- package/registry/toast-provider.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/transition.json +1 -1
- package/registry/wizard.json +1 -1
- package/src/atoms/Badge.tsx +1 -1
- package/src/atoms/Image.tsx +6 -6
- package/src/atoms/Input.tsx +1 -1
- package/src/atoms/PressableScale.tsx +1 -1
- package/src/atoms/Skeleton.tsx +5 -5
- package/src/atoms/Spinner.tsx +4 -4
- package/src/atoms/Transition.tsx +10 -10
- package/src/molecules/AvatarHeader.tsx +2 -2
- package/src/molecules/FormActions.tsx +1 -1
- package/src/molecules/OptionCard.tsx +2 -2
- package/src/molecules/Stepper.tsx +8 -8
- package/src/molecules/Steps.tsx +3 -3
- package/src/molecules/SymmetricGrid.tsx +4 -4
- package/src/organisms/BottomSheet.tsx +8 -8
- package/src/organisms/DateField.tsx +10 -10
- package/src/organisms/DatePicker.tsx +10 -10
- package/src/organisms/List.tsx +6 -6
- package/src/organisms/NavigationBar.tsx +2 -2
- package/src/organisms/ReorderableList.tsx +7 -7
- package/src/organisms/Screen.tsx +6 -6
- package/src/organisms/SearchList.tsx +8 -8
- package/src/organisms/Select.tsx +2 -2
- package/src/organisms/Toast.tsx +2 -2
- package/src/organisms/ToastProvider.tsx +2 -2
- package/src/organisms/Wizard.tsx +7 -7
- package/src/theme/UIProvider.tsx +9 -9
|
@@ -6,13 +6,13 @@ export interface SymmetricGridProps<T> {
|
|
|
6
6
|
data: T[];
|
|
7
7
|
renderItem: (item: T, index: number) => React.ReactElement;
|
|
8
8
|
keyExtractor: (item: T, index: number) => string;
|
|
9
|
-
/**
|
|
9
|
+
/** Columns per row. @default 2 */
|
|
10
10
|
columns?: number;
|
|
11
|
-
/**
|
|
11
|
+
/** Spacing between cells, on both axes. @default theme.tokens.spacing.md */
|
|
12
12
|
gap?: number;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Incomplete last row: centered (symmetric) instead of stuck to the
|
|
15
|
+
* left with a gap on the right. @default true
|
|
16
16
|
*/
|
|
17
17
|
balanceLastRow?: boolean;
|
|
18
18
|
style?: StyleProp<ViewStyle>;
|
|
@@ -27,21 +27,21 @@ export interface BottomSheetProps {
|
|
|
27
27
|
visible: boolean;
|
|
28
28
|
onClose: () => void;
|
|
29
29
|
children: React.ReactNode;
|
|
30
|
-
/**
|
|
30
|
+
/** With a title, the header appears, with its close button. */
|
|
31
31
|
title?: string;
|
|
32
|
-
/**
|
|
32
|
+
/** Sheet actions. Where they live is decided by `footerPlacement`. */
|
|
33
33
|
footer?: React.ReactNode;
|
|
34
34
|
/**
|
|
35
|
-
* 'fixed'
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* 'fixed' anchors it to the bottom of the sheet; 'scroll' leaves it at the
|
|
36
|
+
* end of the content; 'hide-with-keyboard' hides it while typing, which in a
|
|
37
|
+
* long form gives that strip back to the focused field. @default 'fixed'
|
|
38
38
|
*/
|
|
39
39
|
footerPlacement?: FooterPlacement;
|
|
40
|
-
/**
|
|
40
|
+
/** The content scrolls when it doesn't fit. @default true */
|
|
41
41
|
scrollable?: boolean;
|
|
42
|
-
/**
|
|
42
|
+
/** Dragging the sheet down closes it. @default true */
|
|
43
43
|
draggable?: boolean;
|
|
44
|
-
/**
|
|
44
|
+
/** Fraction of the screen (0-1) or pixels. @default 0.9 */
|
|
45
45
|
maxHeight?: number;
|
|
46
46
|
closeAccessibilityLabel?: string;
|
|
47
47
|
containerStyle?: ViewStyle;
|
|
@@ -11,31 +11,31 @@ export interface DateFieldProps
|
|
|
11
11
|
label?: string;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
* 'single'
|
|
14
|
+
* 'single' picks one date; 'range' picks an interval with two taps.
|
|
15
15
|
* @default 'single'
|
|
16
16
|
*/
|
|
17
17
|
mode?: 'single' | 'range';
|
|
18
|
-
/**
|
|
18
|
+
/** Selected date in mode="single". */
|
|
19
19
|
value?: Date;
|
|
20
|
-
/**
|
|
20
|
+
/** Called in mode="single". */
|
|
21
21
|
onChange?: (date: Date) => void;
|
|
22
|
-
/**
|
|
22
|
+
/** Selected range in mode="range". */
|
|
23
23
|
range?: DateRange;
|
|
24
|
-
/**
|
|
24
|
+
/** Called in mode="range", both when setting the start and when closing the range. */
|
|
25
25
|
onRangeChange?: (range: DateRange) => void;
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
error?: string;
|
|
28
28
|
disabled?: boolean;
|
|
29
|
-
/**
|
|
29
|
+
/** Formats the date in the field. @default "Month D, YYYY" */
|
|
30
30
|
format?: (date: Date) => string;
|
|
31
|
-
/**
|
|
31
|
+
/** Title of the calendar modal. @default the `selectDate` from `useLabels()` */
|
|
32
32
|
modalTitle?: string;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* If provided, the modal shows a button that clears the selection and closes.
|
|
35
|
+
* Without this there's no button: the previous "Clear" only closed, without clearing anything.
|
|
36
36
|
*/
|
|
37
37
|
onClear?: () => void;
|
|
38
|
-
/**
|
|
38
|
+
/** Text for that button. @default the `clear` from `useLabels()` */
|
|
39
39
|
clearLabel?: string;
|
|
40
40
|
containerStyle?: StyleProp<ViewStyle>;
|
|
41
41
|
testID?: string;
|
|
@@ -20,29 +20,29 @@ export interface DateRange {
|
|
|
20
20
|
|
|
21
21
|
export interface DatePickerProps {
|
|
22
22
|
/**
|
|
23
|
-
* 'single'
|
|
23
|
+
* 'single' picks one date; 'range' picks an interval with two taps.
|
|
24
24
|
* @default 'single'
|
|
25
25
|
*/
|
|
26
26
|
mode?: 'single' | 'range';
|
|
27
|
-
/**
|
|
27
|
+
/** Selected date in mode="single". */
|
|
28
28
|
value?: Date;
|
|
29
|
-
/**
|
|
29
|
+
/** Called in mode="single". */
|
|
30
30
|
onChange?: (date: Date) => void;
|
|
31
|
-
/**
|
|
31
|
+
/** Selected range in mode="range". */
|
|
32
32
|
range?: DateRange;
|
|
33
|
-
/**
|
|
33
|
+
/** Called in mode="range", both when setting the start and when closing the range. */
|
|
34
34
|
onRangeChange?: (range: DateRange) => void;
|
|
35
35
|
minDate?: Date;
|
|
36
36
|
maxDate?: Date;
|
|
37
|
-
/**
|
|
37
|
+
/** Month shown on open if there's no `value`. @default today */
|
|
38
38
|
defaultMonth?: Date;
|
|
39
|
-
/**
|
|
39
|
+
/** Month names. @default those from `useLabels()` */
|
|
40
40
|
monthNames?: string[];
|
|
41
|
-
/**
|
|
41
|
+
/** Day initials, index 0 = Sunday. @default those from `useLabels()` */
|
|
42
42
|
weekdayNames?: string[];
|
|
43
|
-
/** 0 =
|
|
43
|
+
/** 0 = Sunday, 1 = Monday. @default 0 */
|
|
44
44
|
firstDayOfWeek?: 0 | 1;
|
|
45
|
-
/**
|
|
45
|
+
/** Reports which month became visible when navigating with the arrows. */
|
|
46
46
|
onVisibleMonthChange?: (month: Date) => void;
|
|
47
47
|
style?: StyleProp<ViewStyle>;
|
|
48
48
|
testID?: string;
|
package/src/organisms/List.tsx
CHANGED
|
@@ -12,19 +12,19 @@ export interface ListProps<T> {
|
|
|
12
12
|
keyExtractor: (item: T, index: number) => string;
|
|
13
13
|
renderItem: FlatListProps<T>['renderItem'];
|
|
14
14
|
|
|
15
|
-
/**
|
|
15
|
+
/** Initial load: while true and there's no data, placeholders are shown. */
|
|
16
16
|
isLoading: boolean;
|
|
17
|
-
/**
|
|
17
|
+
/** Reload with data already on screen (pull-to-refresh). @default false */
|
|
18
18
|
isRefreshing?: boolean;
|
|
19
19
|
isLoadingMore?: boolean;
|
|
20
|
-
/**
|
|
20
|
+
/** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
|
|
21
21
|
isReady?: boolean;
|
|
22
22
|
loadingText?: string;
|
|
23
23
|
loadingMoreText?: string;
|
|
24
24
|
|
|
25
|
-
/**
|
|
25
|
+
/** Ghost rows for the initial load. @default 6 */
|
|
26
26
|
skeletonCount?: number;
|
|
27
|
-
/**
|
|
27
|
+
/** Custom placeholder, to match the real shape of the item. */
|
|
28
28
|
renderSkeletonItem?: () => React.ReactElement;
|
|
29
29
|
|
|
30
30
|
onEndReached?: () => void;
|
|
@@ -41,7 +41,7 @@ export interface ListProps<T> {
|
|
|
41
41
|
contentContainerStyle?: ViewStyle;
|
|
42
42
|
containerStyle?: ViewStyle;
|
|
43
43
|
|
|
44
|
-
/**
|
|
44
|
+
/** List component to use (FlashList, etc). @default FlatList */
|
|
45
45
|
ListComponent?: React.ComponentType<any>;
|
|
46
46
|
listProps?: Record<string, unknown>;
|
|
47
47
|
}
|
|
@@ -26,11 +26,11 @@ export interface NavigationBarProps {
|
|
|
26
26
|
items: NavigationBarItem[];
|
|
27
27
|
activeKey: string;
|
|
28
28
|
onChange: (key: string) => void;
|
|
29
|
-
/**
|
|
29
|
+
/** Screen edge where the bar lives. @default 'bottom' */
|
|
30
30
|
position?: 'bottom' | 'top';
|
|
31
31
|
/** @default true */
|
|
32
32
|
showLabels?: boolean;
|
|
33
|
-
/**
|
|
33
|
+
/** Adds the safe area inset for the edge where the bar lives. @default true */
|
|
34
34
|
safeArea?: boolean;
|
|
35
35
|
style?: StyleProp<ViewStyle>;
|
|
36
36
|
testID?: string;
|
|
@@ -5,19 +5,19 @@ import { createStyles } from '../theme/createStyles';
|
|
|
5
5
|
export interface ReorderableListProps<T> {
|
|
6
6
|
data: T[];
|
|
7
7
|
keyExtractor: (item: T, index: number) => string;
|
|
8
|
-
/**
|
|
8
|
+
/** Fixed height of each row: needed to calculate the target index without measuring layout async. */
|
|
9
9
|
itemHeight: number;
|
|
10
10
|
renderItem: (item: T, index: number, dragging: boolean) => React.ReactElement;
|
|
11
|
-
/**
|
|
11
|
+
/** Called on release, with the array already reordered. Does not mutate `data`. */
|
|
12
12
|
onReorder: (data: T[]) => void;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `UIScrollView`
|
|
17
|
-
* vertical
|
|
14
|
+
* Starts dragging row `index`. Use it to turn off the container's scroll
|
|
15
|
+
* (`scrollEnabled={false}`) while it lasts: on iOS the parent
|
|
16
|
+
* `UIScrollView` cancels touches on the content as soon as its
|
|
17
|
+
* vertical gesture starts, and without this the drag dies within a few pixels.
|
|
18
18
|
*/
|
|
19
19
|
onDragStart?: (index: number) => void;
|
|
20
|
-
/**
|
|
20
|
+
/** Ends the drag — on release or cancellation. Always runs if `onDragStart` ran. */
|
|
21
21
|
onDragEnd?: () => void;
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
style?: StyleProp<ViewStyle>;
|
package/src/organisms/Screen.tsx
CHANGED
|
@@ -10,14 +10,14 @@ export interface ScreenProps {
|
|
|
10
10
|
style?: ViewStyle;
|
|
11
11
|
scrollable?: boolean;
|
|
12
12
|
contentContainerStyle?: ViewStyle;
|
|
13
|
-
/**
|
|
13
|
+
/** Which safe area insets to apply. @default ['top', 'bottom'] */
|
|
14
14
|
edges?: ScreenEdge[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* List, SearchList):
|
|
20
|
-
*
|
|
16
|
+
* Compensates for the keyboard: on iOS with scroll the ScrollView itself does it, in
|
|
17
|
+
* other cases a KeyboardAvoidingView does. Set to false when
|
|
18
|
+
* the content already brings its own scroller that handles the keyboard (Wizard,
|
|
19
|
+
* List, SearchList): the two compensations add up and the focused field
|
|
20
|
+
* ends up pushed off screen.
|
|
21
21
|
* @default true
|
|
22
22
|
*/
|
|
23
23
|
keyboardAvoiding?: boolean;
|
|
@@ -19,7 +19,7 @@ import { IconButton } from '../atoms/IconButton';
|
|
|
19
19
|
import type { IconName } from '../icons/types';
|
|
20
20
|
|
|
21
21
|
export interface SearchListProps<T> {
|
|
22
|
-
/**
|
|
22
|
+
/** Optional chrome above the search bar (e.g. back button + title). */
|
|
23
23
|
header?: React.ReactNode;
|
|
24
24
|
|
|
25
25
|
searchValue: string;
|
|
@@ -34,23 +34,23 @@ export interface SearchListProps<T> {
|
|
|
34
34
|
keyExtractor: (item: T, index: number) => string;
|
|
35
35
|
renderItem: FlatListProps<T>['renderItem'];
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/** Initial load: while true and there's no data, placeholders are shown. */
|
|
38
38
|
isLoading?: boolean;
|
|
39
|
-
/** 'replace'
|
|
39
|
+
/** 'replace' swaps the whole list for a spinner/skeleton; 'overlay' shows it on top while keeping the layout. */
|
|
40
40
|
loadingMode?: 'replace' | 'overlay';
|
|
41
|
-
/**
|
|
41
|
+
/** Reload with data already on screen (pull-to-refresh). @default false */
|
|
42
42
|
isRefreshing?: boolean;
|
|
43
43
|
isLoadingMore?: boolean;
|
|
44
|
-
/**
|
|
44
|
+
/** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
|
|
45
45
|
isReady?: boolean;
|
|
46
46
|
loadingText?: string;
|
|
47
47
|
loadingMoreText?: string;
|
|
48
48
|
hasMore?: boolean;
|
|
49
49
|
noMoreText?: string;
|
|
50
50
|
|
|
51
|
-
/**
|
|
51
|
+
/** Ghost rows for the initial load. @default 6 */
|
|
52
52
|
skeletonCount?: number;
|
|
53
|
-
/**
|
|
53
|
+
/** Custom placeholder, to match the real shape of the item. */
|
|
54
54
|
renderSkeletonItem?: () => React.ReactElement;
|
|
55
55
|
|
|
56
56
|
onLoadMore?: () => void;
|
|
@@ -68,7 +68,7 @@ export interface SearchListProps<T> {
|
|
|
68
68
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
69
69
|
containerStyle?: ViewStyle;
|
|
70
70
|
|
|
71
|
-
/**
|
|
71
|
+
/** List component to use (FlashList, etc). @default FlatList */
|
|
72
72
|
ListComponent?: React.ComponentType<any>;
|
|
73
73
|
listProps?: Record<string, unknown>;
|
|
74
74
|
}
|
package/src/organisms/Select.tsx
CHANGED
|
@@ -38,10 +38,10 @@ export interface SelectProps<T> {
|
|
|
38
38
|
error?: string;
|
|
39
39
|
isLoading?: boolean;
|
|
40
40
|
disabled?: boolean;
|
|
41
|
-
/**
|
|
41
|
+
/** Adds a search box inside the dropdown. @default false */
|
|
42
42
|
searchable?: boolean;
|
|
43
43
|
searchPlaceholder?: string;
|
|
44
|
-
/**
|
|
44
|
+
/** Maximum height of the dropdown, if the available space allows it. @default 280 */
|
|
45
45
|
maxHeight?: number;
|
|
46
46
|
onOpenChange?: (open: boolean) => void;
|
|
47
47
|
containerStyle?: StyleProp<ViewStyle>;
|
package/src/organisms/Toast.tsx
CHANGED
|
@@ -12,10 +12,10 @@ export interface ToastProps {
|
|
|
12
12
|
title: string;
|
|
13
13
|
message?: string;
|
|
14
14
|
variant?: ToastVariant;
|
|
15
|
-
/**
|
|
15
|
+
/** Fires when the toast is tapped (in addition to closing it). */
|
|
16
16
|
onPress?: () => void;
|
|
17
17
|
onDismiss?: () => void;
|
|
18
|
-
/**
|
|
18
|
+
/** Hides the close X. The toast still auto-dismisses by timeout. */
|
|
19
19
|
hideCloseButton?: boolean;
|
|
20
20
|
style?: StyleProp<ViewStyle>;
|
|
21
21
|
testID?: string;
|
|
@@ -54,9 +54,9 @@ export interface ToastProviderProps {
|
|
|
54
54
|
children: React.ReactNode;
|
|
55
55
|
/** @default 'top' */
|
|
56
56
|
position?: 'top' | 'bottom';
|
|
57
|
-
/**
|
|
57
|
+
/** Maximum simultaneous toasts; the oldest ones are dropped. @default 3 */
|
|
58
58
|
maxVisible?: number;
|
|
59
|
-
/**
|
|
59
|
+
/** Default duration in ms. @default 4000 */
|
|
60
60
|
defaultDuration?: number;
|
|
61
61
|
}
|
|
62
62
|
|
package/src/organisms/Wizard.tsx
CHANGED
|
@@ -13,28 +13,28 @@ export interface WizardStep extends StepItem {
|
|
|
13
13
|
|
|
14
14
|
export interface WizardProps {
|
|
15
15
|
steps: WizardStep[];
|
|
16
|
-
/**
|
|
16
|
+
/** Current step (controlled). If omitted, the Wizard manages its own state. */
|
|
17
17
|
current?: number;
|
|
18
18
|
onStepChange?: (index: number) => void;
|
|
19
19
|
onFinish?: () => void;
|
|
20
20
|
/** @default 'horizontal' */
|
|
21
21
|
orientation?: 'horizontal' | 'vertical';
|
|
22
22
|
completedIndicator?: 'check' | 'number';
|
|
23
|
-
/**
|
|
23
|
+
/** Allows returning to an already-completed step by tapping it in the indicator. @default true */
|
|
24
24
|
allowStepNavigation?: boolean;
|
|
25
25
|
backLabel?: string;
|
|
26
26
|
nextLabel?: string;
|
|
27
27
|
finishLabel?: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* VirtualizedList
|
|
29
|
+
* The step content scrolls when it doesn't fit. Set to false only if
|
|
30
|
+
* a step renders its own virtualized list (nesting a
|
|
31
|
+
* VirtualizedList inside a ScrollView breaks virtualization).
|
|
32
32
|
* @default true
|
|
33
33
|
*/
|
|
34
34
|
scrollableContent?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
36
|
+
* The step content slides in following the navigation direction.
|
|
37
|
+
* Only opacity and transform, so the animation runs on the native thread.
|
|
38
38
|
* @default true
|
|
39
39
|
*/
|
|
40
40
|
animated?: boolean;
|
package/src/theme/UIProvider.tsx
CHANGED
|
@@ -42,24 +42,24 @@ const UIContext = createContext<UIContextValue | undefined>(undefined);
|
|
|
42
42
|
|
|
43
43
|
export interface UIProviderProps {
|
|
44
44
|
children: React.ReactNode;
|
|
45
|
-
/**
|
|
45
|
+
/** Light/dark pair. Defaults to the library's brand theme (create one with createTheme()). */
|
|
46
46
|
theme?: ThemePair;
|
|
47
|
-
/**
|
|
47
|
+
/** Initial mode (uncontrolled) if `mode` isn't passed. @default 'system' */
|
|
48
48
|
defaultMode?: ThemeMode;
|
|
49
|
-
/**
|
|
49
|
+
/** Controlled mode. If passed together with onModeChange, the provider doesn't manage its own state. */
|
|
50
50
|
mode?: ThemeMode;
|
|
51
51
|
onModeChange?: (mode: ThemeMode) => void;
|
|
52
|
-
/**
|
|
52
|
+
/** Icon renderer. Defaults to the included zero-dep glyphs. */
|
|
53
53
|
icons?: IconRenderer;
|
|
54
|
-
/**
|
|
54
|
+
/** Safe area insets (from useSafeAreaInsets()). Defaults to {0,0,0,0}. */
|
|
55
55
|
insets?: EdgeInsets;
|
|
56
56
|
labels?: Partial<Labels>;
|
|
57
|
-
/** @default false,
|
|
57
|
+
/** @default false, for parity with the rest of the library (accessibility first). */
|
|
58
58
|
allowFontScaling?: boolean;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @default
|
|
60
|
+
* Source of insets used by `Modal`/`BottomSheet` for their own native
|
|
61
|
+
* window. Don't pass this by hand — `SafeAreaUIProvider` wires it up itself.
|
|
62
|
+
* @default repeats the ambient insets (behavior without safe-area-context)
|
|
63
63
|
*/
|
|
64
64
|
ModalSafeAreaBoundary?: ModalSafeAreaBoundaryComponent;
|
|
65
65
|
}
|