@platform-blocks/ui 0.2.0 → 0.3.0
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/README.md +23 -1
- package/lib/cjs/index.js +6915 -4498
- package/lib/cjs/index.js.map +1 -1
- package/lib/components/AutoComplete/types.d.ts +2 -0
- package/lib/components/Avatar/types.d.ts +3 -2
- package/lib/components/Badge/types.d.ts +4 -4
- package/lib/components/Blockquote/styles.d.ts +2 -1
- package/lib/components/Breadcrumbs/types.d.ts +2 -1
- package/lib/components/Calendar/types.d.ts +1 -0
- package/lib/components/Card/types.d.ts +1 -1
- package/lib/components/Carousel/types.d.ts +3 -2
- package/lib/components/Chip/types.d.ts +1 -1
- package/lib/components/ColorPicker/styles.d.ts +15 -1
- package/lib/components/ColorPicker/types.d.ts +4 -1
- package/lib/components/CopyButton/types.d.ts +3 -2
- package/lib/components/Dialog/Dialog.d.ts +1 -1
- package/lib/components/Dialog/types.d.ts +3 -0
- package/lib/components/Input/styles.d.ts +0 -24
- package/lib/components/Input/types.d.ts +2 -0
- package/lib/components/KeyCap/types.d.ts +9 -2
- package/lib/components/KeyboardAwareLayout/KeyboardAwareLayout.d.ts +4 -0
- package/lib/components/KeyboardAwareLayout/index.d.ts +3 -0
- package/lib/components/KeyboardAwareLayout/types.d.ts +26 -0
- package/lib/components/Knob/Knob.d.ts +6 -0
- package/lib/components/Knob/index.d.ts +2 -0
- package/lib/components/Knob/types.d.ts +65 -0
- package/lib/components/ListGroup/types.d.ts +11 -2
- package/lib/components/MenuItemButton/MenuItemButton.d.ts +2 -1
- package/lib/components/MonthPicker/types.d.ts +2 -2
- package/lib/components/NumberInput/types.d.ts +14 -0
- package/lib/components/Pagination/types.d.ts +10 -1
- package/lib/components/PinInput/types.d.ts +2 -0
- package/lib/components/Popover/Popover.d.ts +9 -3
- package/lib/components/Popover/index.d.ts +1 -1
- package/lib/components/Popover/styles.d.ts +1 -0
- package/lib/components/Popover/types.d.ts +2 -0
- package/lib/components/Ring/Ring.d.ts +8 -0
- package/lib/components/Ring/index.d.ts +3 -0
- package/lib/components/Ring/types.d.ts +75 -0
- package/lib/components/SegmentedControl/types.d.ts +8 -2
- package/lib/components/Select/Select.d.ts +0 -1
- package/lib/components/Select/Select.types.d.ts +33 -0
- package/lib/components/Spotlight/DirectSpotlightState.d.ts +1 -1
- package/lib/components/Spotlight/Spotlight.d.ts +1 -1
- package/lib/components/Spotlight/types.d.ts +3 -1
- package/lib/components/Stepper/types.d.ts +10 -2
- package/lib/components/TextArea/styles.d.ts +3 -33
- package/lib/components/TextArea/types.d.ts +2 -1
- package/lib/components/TimePicker/TimePicker.d.ts +1 -3
- package/lib/components/TimePickerInput/TimePickerInput.d.ts +3 -0
- package/lib/components/TimePickerInput/index.d.ts +2 -2
- package/lib/components/TimePickerInput/types.d.ts +3 -0
- package/lib/components/Timeline/types.d.ts +10 -2
- package/lib/components/Tree/types.d.ts +7 -0
- package/lib/components/index.d.ts +7 -1
- package/lib/components/optimized.d.ts +5 -0
- package/lib/components/types.d.ts +3 -0
- package/lib/core/hooks/usePopoverPositioning.d.ts +2 -5
- package/lib/core/keyboard/selection.d.ts +42 -0
- package/lib/core/providers/KeyboardManagerProvider.d.ts +45 -0
- package/lib/core/providers/index.d.ts +3 -1
- package/lib/core/theme/PlatformBlocksProvider.d.ts +14 -1
- package/lib/core/theme/componentSize.d.ts +10 -0
- package/lib/core/theme/index.d.ts +1 -0
- package/lib/core/theme/sizes.d.ts +2 -1
- package/lib/core/theme/types.d.ts +4 -2
- package/lib/esm/index.js +6905 -4496
- package/lib/esm/index.js.map +1 -1
- package/lib/index.d.ts +12 -1
- package/lib/utils/optionalDependencies.d.ts +17 -2
- package/lib/utils/optionalModule.d.ts +16 -0
- package/package.json +2 -1
- package/lib/components/Select/types.d.ts +0 -25
|
@@ -93,6 +93,8 @@ export interface AutoCompleteProps extends SpacingProps, LayoutProps {
|
|
|
93
93
|
selectedValuesContainerStyle?: ViewStyle;
|
|
94
94
|
/** Additional props applied to the default Chip renderer for selected values */
|
|
95
95
|
selectedValueChipProps?: Partial<ChipProps>;
|
|
96
|
+
/** Controls whether the input regains focus after selecting an option */
|
|
97
|
+
refocusAfterSelect?: boolean;
|
|
96
98
|
/** Whether to allow free-form input (can add custom values) */
|
|
97
99
|
freeSolo?: boolean;
|
|
98
100
|
/** What to display in input after selection - 'label' or 'value' */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
3
4
|
export interface AvatarProps {
|
|
4
|
-
size?:
|
|
5
|
+
size?: ComponentSizeValue;
|
|
5
6
|
src?: string;
|
|
6
7
|
fallback?: string;
|
|
7
8
|
backgroundColor?: string;
|
|
@@ -24,7 +25,7 @@ export interface AvatarGroupProps {
|
|
|
24
25
|
limit?: number;
|
|
25
26
|
spacing?: number;
|
|
26
27
|
style?: ViewStyle;
|
|
27
|
-
size?:
|
|
28
|
+
size?: ComponentSizeValue;
|
|
28
29
|
/** Whether to add borders around avatars for separation */
|
|
29
30
|
bordered?: boolean;
|
|
30
31
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { type ComponentSizeValue } from '../../core/theme/componentSize';
|
|
4
4
|
import { SpacingProps } from '../../core/utils';
|
|
5
5
|
import { BorderRadiusProps } from '../../core/theme/radius';
|
|
6
6
|
import { ShadowProps } from '../../core/theme/shadow';
|
|
7
7
|
export interface BadgeProps extends SpacingProps, BorderRadiusProps, ShadowProps {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
size?:
|
|
10
|
-
variant?: 'filled' | 'outline' | 'light' | 'subtle';
|
|
9
|
+
size?: ComponentSizeValue;
|
|
10
|
+
variant?: 'filled' | 'outline' | 'light' | 'subtle' | 'gradient';
|
|
11
11
|
/** Alias for variant */
|
|
12
|
-
v?: 'filled' | 'outline' | 'light' | 'subtle';
|
|
12
|
+
v?: 'filled' | 'outline' | 'light' | 'subtle' | 'gradient';
|
|
13
13
|
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'gray' | string;
|
|
14
14
|
/** Alias for color */
|
|
15
15
|
c?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'gray' | string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type ComponentSizeValue } from '../../core/theme/componentSize';
|
|
1
2
|
import type { PlatformBlocksTheme } from '../../core/theme/types';
|
|
2
3
|
interface StyleConfig {
|
|
3
4
|
variant: 'default' | 'testimonial' | 'featured' | 'minimal';
|
|
4
|
-
size:
|
|
5
|
+
size: ComponentSizeValue;
|
|
5
6
|
alignment: 'left' | 'center' | 'right';
|
|
6
7
|
border: boolean;
|
|
7
8
|
shadow: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
import { SpacingProps } from '../../core/theme/types';
|
|
4
|
+
import { type ComponentSizeValue } from '../../core/theme/componentSize';
|
|
4
5
|
export interface BreadcrumbItem {
|
|
5
6
|
/** The label text for the breadcrumb */
|
|
6
7
|
label: string;
|
|
@@ -21,7 +22,7 @@ export interface BreadcrumbsProps extends SpacingProps {
|
|
|
21
22
|
/** Maximum number of items to show (will collapse middle items) */
|
|
22
23
|
maxItems?: number;
|
|
23
24
|
/** Size of the breadcrumbs */
|
|
24
|
-
size?:
|
|
25
|
+
size?: ComponentSizeValue;
|
|
25
26
|
/** Whether to show icons */
|
|
26
27
|
showIcons?: boolean;
|
|
27
28
|
/** Custom styles */
|
|
@@ -5,7 +5,7 @@ import { BorderRadiusProps } from '../../core/theme/radius';
|
|
|
5
5
|
import { ShadowProps } from '../../core/theme/shadow';
|
|
6
6
|
export interface CardProps extends SpacingProps, LayoutProps, BorderRadiusProps, ShadowProps {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
-
variant?: 'outline' | 'filled';
|
|
8
|
+
variant?: 'outline' | 'filled' | 'elevated' | 'subtle' | 'ghost' | 'gradient';
|
|
9
9
|
padding?: number;
|
|
10
10
|
style?: any;
|
|
11
11
|
onPress?: () => void;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
import { SpacingProps } from '../../core/utils';
|
|
4
4
|
import type { ResponsiveSize } from '../AppShell/types';
|
|
5
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
5
6
|
export interface CarouselProps extends SpacingProps {
|
|
6
7
|
children: React.ReactNode[];
|
|
7
8
|
/** Orientation of the carousel */
|
|
@@ -43,8 +44,8 @@ export interface CarouselProps extends SpacingProps {
|
|
|
43
44
|
itemStyle?: ViewStyle;
|
|
44
45
|
snapToItem?: boolean;
|
|
45
46
|
arrowPosition?: 'inside' | 'outside';
|
|
46
|
-
arrowSize?:
|
|
47
|
-
dotSize?:
|
|
47
|
+
arrowSize?: ComponentSizeValue;
|
|
48
|
+
dotSize?: ComponentSizeValue;
|
|
48
49
|
scrollEnabled?: boolean;
|
|
49
50
|
reducedMotion?: boolean;
|
|
50
51
|
windowSize?: number;
|
|
@@ -7,7 +7,7 @@ import { ShadowProps } from '../../core/theme/shadow';
|
|
|
7
7
|
export interface ChipProps extends SpacingProps, BorderRadiusProps, ShadowProps {
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
size?: SizeValue;
|
|
10
|
-
variant?: 'filled' | 'outline' | 'light' | 'subtle';
|
|
10
|
+
variant?: 'filled' | 'outline' | 'light' | 'subtle' | 'gradient';
|
|
11
11
|
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'gray' | string;
|
|
12
12
|
onPress?: () => void;
|
|
13
13
|
startIcon?: React.ReactNode;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
export
|
|
2
|
+
export interface ColorPickerSizeMetrics {
|
|
3
|
+
inputHeight: number;
|
|
4
|
+
paddingHorizontal: number;
|
|
5
|
+
paddingVertical: number;
|
|
6
|
+
previewSize: number;
|
|
7
|
+
previewBorderRadius: number;
|
|
8
|
+
previewMarginRight: number;
|
|
9
|
+
textFontSize: number;
|
|
10
|
+
textInputHeight: number;
|
|
11
|
+
dropdownIconSize: number;
|
|
12
|
+
dropdownIconMarginLeft: number;
|
|
13
|
+
swatchSize: number;
|
|
14
|
+
swatchGap: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function useColorPickerStyles(metrics: ColorPickerSizeMetrics): {
|
|
3
17
|
container: ViewStyle;
|
|
4
18
|
label: TextStyle;
|
|
5
19
|
wrapper: ViewStyle;
|
|
@@ -2,6 +2,7 @@ import { ViewStyle, TextStyle } from 'react-native';
|
|
|
2
2
|
import { SpacingProps } from '../../core/theme/types';
|
|
3
3
|
import { LayoutProps } from '../../core/utils';
|
|
4
4
|
import { BorderRadiusProps } from '../../core/theme/radius';
|
|
5
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
5
6
|
import type { PlacementType } from '../../core/utils/positioning-enhanced';
|
|
6
7
|
export interface ColorPickerProps extends SpacingProps, LayoutProps, BorderRadiusProps {
|
|
7
8
|
/** Current color value in hex format (e.g., "#ff0000") */
|
|
@@ -23,7 +24,7 @@ export interface ColorPickerProps extends SpacingProps, LayoutProps, BorderRadiu
|
|
|
23
24
|
/** Help text to display below the picker */
|
|
24
25
|
description?: string;
|
|
25
26
|
/** Size of the picker */
|
|
26
|
-
size?:
|
|
27
|
+
size?: ComponentSizeValue;
|
|
27
28
|
/** Variant of the picker */
|
|
28
29
|
variant?: 'default' | 'filled' | 'unstyled';
|
|
29
30
|
/** Radius of the picker */
|
|
@@ -54,6 +55,8 @@ export interface ColorPickerProps extends SpacingProps, LayoutProps, BorderRadiu
|
|
|
54
55
|
autoReposition?: boolean;
|
|
55
56
|
/** Fallback placements to try */
|
|
56
57
|
fallbackPlacements?: PlacementType[];
|
|
58
|
+
/** Whether dropdown should avoid the on-screen keyboard when visible */
|
|
59
|
+
keyboardAvoidance?: boolean;
|
|
57
60
|
/** Custom style for the container */
|
|
58
61
|
style?: ViewStyle;
|
|
59
62
|
/** Custom style for the preview */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewStyle } from 'react-native';
|
|
2
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
2
3
|
export interface CopyButtonProps {
|
|
3
4
|
/** The text to copy to clipboard */
|
|
4
5
|
value: string;
|
|
@@ -12,8 +13,8 @@ export interface CopyButtonProps {
|
|
|
12
13
|
toastTitle?: string;
|
|
13
14
|
/** Detailed message for the toast */
|
|
14
15
|
toastMessage?: string;
|
|
15
|
-
/**
|
|
16
|
-
size?:
|
|
16
|
+
/** Visual size token */
|
|
17
|
+
size?: ComponentSizeValue;
|
|
17
18
|
/** Style overrides for the button container */
|
|
18
19
|
style?: ViewStyle;
|
|
19
20
|
/** Disable the "copied to clipboard" toast */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DialogProps } from './types';
|
|
3
|
-
export declare function Dialog({ visible, variant, title, children, closable, backdrop, backdropClosable, shouldClose, onClose, width, height, style }: DialogProps): React.JSX.Element | null;
|
|
3
|
+
export declare function Dialog({ visible, variant, title, children, closable, backdrop, backdropClosable, shouldClose, onClose, width, height, style, bottomSheetSwipeZone, }: DialogProps): React.JSX.Element | null;
|
|
@@ -12,6 +12,8 @@ export interface DialogProps {
|
|
|
12
12
|
width?: number;
|
|
13
13
|
height?: number;
|
|
14
14
|
style?: object;
|
|
15
|
+
/** Controls which part of the bottom sheet responds to swipe-to-dismiss gestures */
|
|
16
|
+
bottomSheetSwipeZone?: 'container' | 'handle' | 'none';
|
|
15
17
|
}
|
|
16
18
|
export interface DialogConfig {
|
|
17
19
|
id: string;
|
|
@@ -23,6 +25,7 @@ export interface DialogConfig {
|
|
|
23
25
|
backdrop?: boolean;
|
|
24
26
|
backdropClosable?: boolean;
|
|
25
27
|
isClosing?: boolean;
|
|
28
|
+
bottomSheetSwipeZone?: 'container' | 'handle' | 'none';
|
|
26
29
|
}
|
|
27
30
|
export interface DialogContextValue {
|
|
28
31
|
dialogs: DialogConfig[];
|
|
@@ -57,29 +57,5 @@ export declare const createInputStyles: (theme: PlatformBlocksTheme, isRTL?: boo
|
|
|
57
57
|
fontSize: number;
|
|
58
58
|
padding: number;
|
|
59
59
|
minHeight: number;
|
|
60
|
-
} | {
|
|
61
|
-
fontSize: number;
|
|
62
|
-
padding: number;
|
|
63
|
-
minHeight: number;
|
|
64
|
-
} | {
|
|
65
|
-
fontSize: number;
|
|
66
|
-
padding: number;
|
|
67
|
-
minHeight: number;
|
|
68
|
-
} | {
|
|
69
|
-
fontSize: number;
|
|
70
|
-
padding: number;
|
|
71
|
-
minHeight: number;
|
|
72
|
-
} | {
|
|
73
|
-
fontSize: number;
|
|
74
|
-
padding: number;
|
|
75
|
-
minHeight: number;
|
|
76
|
-
} | {
|
|
77
|
-
fontSize: number;
|
|
78
|
-
padding: number;
|
|
79
|
-
minHeight: number;
|
|
80
|
-
} | {
|
|
81
|
-
fontSize: number;
|
|
82
|
-
padding: number;
|
|
83
|
-
minHeight: number;
|
|
84
60
|
};
|
|
85
61
|
};
|
|
@@ -71,6 +71,8 @@ export interface BaseInputProps extends SpacingProps, LayoutProps, BorderRadiusP
|
|
|
71
71
|
clearButtonLabel?: string;
|
|
72
72
|
/** Callback when the clear button is pressed */
|
|
73
73
|
onClear?: () => void;
|
|
74
|
+
/** Identifier used with KeyboardManagerProvider to request refocus */
|
|
75
|
+
keyboardFocusId?: string;
|
|
74
76
|
}
|
|
75
77
|
export type ExtendedTextInputProps = Omit<TextInputProps, keyof BaseInputProps> & {
|
|
76
78
|
onKeyDown?: (event: any) => void;
|
|
@@ -2,6 +2,13 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { SpacingProps } from '../../core/theme/types';
|
|
3
3
|
import type { LayoutProps } from '../../core/utils';
|
|
4
4
|
import type { BorderRadiusProps } from '../../core/theme/radius';
|
|
5
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
6
|
+
export interface KeyCapMetrics {
|
|
7
|
+
height: number;
|
|
8
|
+
minWidth: number;
|
|
9
|
+
paddingHorizontal: number;
|
|
10
|
+
fontSize: number;
|
|
11
|
+
}
|
|
5
12
|
export interface KeyCapProps extends SpacingProps, LayoutProps, BorderRadiusProps {
|
|
6
13
|
/**
|
|
7
14
|
* The key or text to display
|
|
@@ -10,7 +17,7 @@ export interface KeyCapProps extends SpacingProps, LayoutProps, BorderRadiusProp
|
|
|
10
17
|
/**
|
|
11
18
|
* Size variant of the key cap
|
|
12
19
|
*/
|
|
13
|
-
size?:
|
|
20
|
+
size?: ComponentSizeValue;
|
|
14
21
|
/**
|
|
15
22
|
* Visual variant of the key cap
|
|
16
23
|
*/
|
|
@@ -47,7 +54,7 @@ export interface KeyCapProps extends SpacingProps, LayoutProps, BorderRadiusProp
|
|
|
47
54
|
testID?: string;
|
|
48
55
|
}
|
|
49
56
|
export interface KeyCapStyleProps {
|
|
50
|
-
|
|
57
|
+
metrics: KeyCapMetrics;
|
|
51
58
|
variant: NonNullable<KeyCapProps['variant']>;
|
|
52
59
|
color: NonNullable<KeyCapProps['color']>;
|
|
53
60
|
pressed: boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KeyboardAvoidingView } from 'react-native';
|
|
3
|
+
import type { KeyboardAwareLayoutProps } from './types';
|
|
4
|
+
export declare const KeyboardAwareLayout: React.ForwardRefExoticComponent<KeyboardAwareLayoutProps & React.RefAttributes<KeyboardAvoidingView>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { KeyboardAvoidingViewProps, ScrollView, ScrollViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SpacingProps } from '../../core/utils';
|
|
4
|
+
export interface KeyboardAwareLayoutProps extends SpacingProps, Omit<KeyboardAvoidingViewProps, 'behavior' | 'children' | 'keyboardVerticalOffset'> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Optional behavior override for KeyboardAvoidingView */
|
|
7
|
+
behavior?: KeyboardAvoidingViewProps['behavior'];
|
|
8
|
+
/** Additional offset passed to KeyboardAvoidingView (defaults to 0) */
|
|
9
|
+
keyboardVerticalOffset?: number;
|
|
10
|
+
/** Enables or disables KeyboardAvoidingView adjustments */
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/** When true (default) content is wrapped in a ScrollView */
|
|
13
|
+
scrollable?: boolean;
|
|
14
|
+
/** Extra padding added in addition to keyboard height */
|
|
15
|
+
extraScrollHeight?: number;
|
|
16
|
+
/** Style applied to the outer KeyboardAvoidingView */
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
18
|
+
/** Style applied to the ScrollView/inner content container */
|
|
19
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
20
|
+
/** Controls ScrollView keyboard tap handling */
|
|
21
|
+
keyboardShouldPersistTaps?: 'always' | 'never' | 'handled';
|
|
22
|
+
/** Forward ref to the internal ScrollView when scrollable is true */
|
|
23
|
+
scrollRef?: React.Ref<ScrollView>;
|
|
24
|
+
/** Additional props that will be spread onto the internal ScrollView */
|
|
25
|
+
scrollViewProps?: ScrollViewProps;
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SpacingProps, LayoutProps } from '../../core/utils';
|
|
4
|
+
export interface KnobMark {
|
|
5
|
+
/** Absolute value within the knob range to display */
|
|
6
|
+
value: number;
|
|
7
|
+
/** Optional label rendered near the tick */
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface KnobProps extends SpacingProps, LayoutProps {
|
|
11
|
+
/** Interaction mode for bounded or endless rotary behavior */
|
|
12
|
+
mode?: 'bounded' | 'endless';
|
|
13
|
+
/** Controlled value */
|
|
14
|
+
value?: number;
|
|
15
|
+
/** Uncontrolled initial value */
|
|
16
|
+
defaultValue?: number;
|
|
17
|
+
/** Minimum selectable value */
|
|
18
|
+
min?: number;
|
|
19
|
+
/** Maximum selectable value */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** Step increment applied when interacting */
|
|
22
|
+
step?: number;
|
|
23
|
+
/** Called on every value change */
|
|
24
|
+
onChange?: (value: number) => void;
|
|
25
|
+
/** Called after interaction completes */
|
|
26
|
+
onChangeEnd?: (value: number) => void;
|
|
27
|
+
/** Fired when the user begins dragging */
|
|
28
|
+
onScrubStart?: () => void;
|
|
29
|
+
/** Fired when the user ends dragging */
|
|
30
|
+
onScrubEnd?: () => void;
|
|
31
|
+
/** Diameter of the control in pixels */
|
|
32
|
+
size?: number;
|
|
33
|
+
/** Diameter of the thumb indicator */
|
|
34
|
+
thumbSize?: number;
|
|
35
|
+
/** Disable all user interaction */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Prevent interaction but keep visual state */
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** Custom formatter for the value label */
|
|
40
|
+
formatLabel?: (value: number) => ReactNode;
|
|
41
|
+
/** Render the value label inside the knob */
|
|
42
|
+
withLabel?: boolean;
|
|
43
|
+
/** Optional marks rendered around the control */
|
|
44
|
+
marks?: KnobMark[];
|
|
45
|
+
/** Restrict interaction to the supplied marks */
|
|
46
|
+
restrictToMarks?: boolean;
|
|
47
|
+
/** Optional visual label rendered outside the knob */
|
|
48
|
+
label?: ReactNode;
|
|
49
|
+
/** Optional helper text rendered with the label */
|
|
50
|
+
description?: ReactNode;
|
|
51
|
+
/** Placement for the external label */
|
|
52
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
53
|
+
/** Style overrides for the outer container */
|
|
54
|
+
style?: ViewStyle;
|
|
55
|
+
/** Style overrides for the circular track */
|
|
56
|
+
trackStyle?: ViewStyle;
|
|
57
|
+
/** Style overrides for the thumb */
|
|
58
|
+
thumbStyle?: ViewStyle;
|
|
59
|
+
/** Style overrides for mark labels */
|
|
60
|
+
markLabelStyle?: TextStyle;
|
|
61
|
+
/** Accessibility identifier */
|
|
62
|
+
testID?: string;
|
|
63
|
+
/** Screen reader label */
|
|
64
|
+
accessibilityLabel?: string;
|
|
65
|
+
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type { ViewStyle, TextStyle } from 'react-native';
|
|
2
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
3
|
+
export interface ListGroupMetrics {
|
|
4
|
+
paddingVertical: number;
|
|
5
|
+
paddingHorizontal: number;
|
|
6
|
+
gap: number;
|
|
7
|
+
dividerInset: number;
|
|
8
|
+
textSize: ComponentSizeValue;
|
|
9
|
+
}
|
|
2
10
|
export interface ListGroupProps {
|
|
3
11
|
children: React.ReactNode;
|
|
4
12
|
variant?: 'default' | 'bordered' | 'flush';
|
|
5
|
-
size?:
|
|
13
|
+
size?: ComponentSizeValue;
|
|
6
14
|
radius?: 'sm' | 'md' | 'lg' | number;
|
|
7
15
|
dividers?: boolean;
|
|
8
16
|
insetDividers?: boolean;
|
|
@@ -20,7 +28,8 @@ export interface ListGroupItemProps {
|
|
|
20
28
|
textStyle?: TextStyle;
|
|
21
29
|
}
|
|
22
30
|
export interface ListGroupContextValue {
|
|
23
|
-
size:
|
|
31
|
+
size: ComponentSizeValue;
|
|
32
|
+
metrics: ListGroupMetrics;
|
|
24
33
|
dividers: boolean;
|
|
25
34
|
insetDividers: boolean;
|
|
26
35
|
}
|
|
@@ -3,6 +3,7 @@ import { View } from 'react-native';
|
|
|
3
3
|
import type { PressableProps } from 'react-native';
|
|
4
4
|
import type { GestureResponderEvent } from 'react-native';
|
|
5
5
|
import { SpacingProps } from '../../core/utils';
|
|
6
|
+
import { type ComponentSizeValue } from '../../core/theme/componentSize';
|
|
6
7
|
export interface MenuItemButtonProps extends SpacingProps {
|
|
7
8
|
/** Text label (alternative to children) */
|
|
8
9
|
title?: string;
|
|
@@ -23,7 +24,7 @@ export interface MenuItemButtonProps extends SpacingProps {
|
|
|
23
24
|
/** Whether the button should take up full width */
|
|
24
25
|
fullWidth?: boolean;
|
|
25
26
|
/** Size of the button */
|
|
26
|
-
size?:
|
|
27
|
+
size?: ComponentSizeValue;
|
|
27
28
|
/** Whether to use compact styling */
|
|
28
29
|
compact?: boolean;
|
|
29
30
|
/** Whether to use fully rounded corners */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
2
2
|
import type { ResponsiveProp } from '../../core/theme/breakpoints';
|
|
3
3
|
export interface MonthPickerProps {
|
|
4
4
|
/** Currently selected date (uses the first day of the month) */
|
|
@@ -16,7 +16,7 @@ export interface MonthPickerProps {
|
|
|
16
16
|
/** Locale used for month labels */
|
|
17
17
|
locale?: string;
|
|
18
18
|
/** Size token that influences typography weight */
|
|
19
|
-
size?:
|
|
19
|
+
size?: ComponentSizeValue;
|
|
20
20
|
/** Format of month labels */
|
|
21
21
|
monthLabelFormat?: 'short' | 'long';
|
|
22
22
|
/** Hide navigation header (used when embedded in Calendar) */
|
|
@@ -24,6 +24,8 @@ export interface NumberInputProps extends Omit<BaseInputProps, 'value' | 'onChan
|
|
|
24
24
|
max?: number;
|
|
25
25
|
/** Step increment */
|
|
26
26
|
step?: number;
|
|
27
|
+
/** Multiplier applied to the step when using modifier keys */
|
|
28
|
+
shiftMultiplier?: number;
|
|
27
29
|
/** Number of decimal places */
|
|
28
30
|
precision?: number;
|
|
29
31
|
/** Thousand separator character or boolean to enable default separator */
|
|
@@ -54,8 +56,20 @@ export interface NumberInputProps extends Omit<BaseInputProps, 'value' | 'onChan
|
|
|
54
56
|
withKeyboardEvents?: boolean;
|
|
55
57
|
/** Show increment/decrement buttons */
|
|
56
58
|
withControls?: boolean;
|
|
59
|
+
/** Render horizontal decrement/increment buttons flanking the input */
|
|
60
|
+
withSideButtons?: boolean;
|
|
57
61
|
/** Whether to hide step controls on mobile */
|
|
58
62
|
hideControlsOnMobile?: boolean;
|
|
63
|
+
/** Enable press-drag gesture to adjust value */
|
|
64
|
+
withDragGesture?: boolean;
|
|
65
|
+
/** Axis that determines how drag gestures adjust the value */
|
|
66
|
+
dragAxis?: 'horizontal' | 'vertical';
|
|
67
|
+
/** Pixel distance required to trigger a single step while dragging */
|
|
68
|
+
dragStepDistance?: number;
|
|
69
|
+
/** Multiplier applied to the configured step while dragging */
|
|
70
|
+
dragStepMultiplier?: number;
|
|
71
|
+
/** Callback fired when the drag gesture activation state changes */
|
|
72
|
+
onDragStateChange?: (isDragging: boolean) => void;
|
|
59
73
|
/** Custom formatter function */
|
|
60
74
|
formatter?: (value: number) => string;
|
|
61
75
|
/** Custom parser function */
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
import { SpacingProps } from '../../core/theme/types';
|
|
4
|
+
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
5
|
+
export interface PaginationMetrics {
|
|
6
|
+
height: number;
|
|
7
|
+
minWidth: number;
|
|
8
|
+
paddingHorizontal: number;
|
|
9
|
+
fontSize: number;
|
|
10
|
+
iconSize: number;
|
|
11
|
+
borderRadius: number;
|
|
12
|
+
}
|
|
4
13
|
export interface PaginationProps extends SpacingProps {
|
|
5
14
|
/** Current page number (1-indexed) */
|
|
6
15
|
current: number;
|
|
@@ -13,7 +22,7 @@ export interface PaginationProps extends SpacingProps {
|
|
|
13
22
|
/** Page change handler */
|
|
14
23
|
onChange: (page: number) => void;
|
|
15
24
|
/** Size of pagination controls */
|
|
16
|
-
size?:
|
|
25
|
+
size?: ComponentSizeValue;
|
|
17
26
|
/** Variant style */
|
|
18
27
|
variant?: 'default' | 'outline' | 'subtle';
|
|
19
28
|
/** Color scheme */
|
|
@@ -3,6 +3,8 @@ import { BaseInputProps } from '../Input/types';
|
|
|
3
3
|
export interface PinInputProps extends Omit<BaseInputProps, 'value' | 'onChangeText'> {
|
|
4
4
|
/** Number of PIN digits */
|
|
5
5
|
length?: number;
|
|
6
|
+
/** Stable id used by KeyboardManager to restore focus */
|
|
7
|
+
keyboardFocusId?: string;
|
|
6
8
|
/** PIN value */
|
|
7
9
|
value?: string;
|
|
8
10
|
/** Change handler */
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
import type { PopoverProps, PopoverTargetProps, PopoverDropdownProps } from './types';
|
|
3
|
-
|
|
3
|
+
declare const PopoverComponent: import("../../core/factory").PlatformBlocksComponent<{
|
|
4
4
|
props: PopoverProps;
|
|
5
5
|
ref: View;
|
|
6
6
|
}>;
|
|
7
|
-
|
|
7
|
+
declare const PopoverTarget: import("../../core/factory").PlatformBlocksComponent<{
|
|
8
8
|
props: PopoverTargetProps;
|
|
9
9
|
ref: View;
|
|
10
10
|
}>;
|
|
11
|
-
|
|
11
|
+
declare const PopoverDropdown: import("../../core/factory").PlatformBlocksComponent<{
|
|
12
12
|
props: PopoverDropdownProps;
|
|
13
13
|
ref: View;
|
|
14
14
|
}>;
|
|
15
|
+
type PopoverCompoundComponent = typeof PopoverComponent & {
|
|
16
|
+
Target: typeof PopoverTarget;
|
|
17
|
+
Dropdown: typeof PopoverDropdown;
|
|
18
|
+
};
|
|
19
|
+
declare const Popover: PopoverCompoundComponent;
|
|
20
|
+
export { Popover };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Popover
|
|
1
|
+
export { Popover } from './Popover';
|
|
2
2
|
export type { PopoverProps, PopoverTargetProps, PopoverDropdownProps } from './types';
|
|
@@ -82,6 +82,8 @@ export interface PopoverProps extends SpacingProps {
|
|
|
82
82
|
hideDetached?: boolean;
|
|
83
83
|
/** Override viewport padding */
|
|
84
84
|
viewport?: PositioningOptions['viewport'];
|
|
85
|
+
/** Whether positioning should avoid the on-screen keyboard */
|
|
86
|
+
keyboardAvoidance?: boolean;
|
|
85
87
|
/** Override fallback placements */
|
|
86
88
|
fallbackPlacements?: PlacementType[];
|
|
87
89
|
/** Override boundary padding */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { RingProps } from './types';
|
|
3
|
+
interface RingFactoryPayload {
|
|
4
|
+
props: RingProps;
|
|
5
|
+
ref: View;
|
|
6
|
+
}
|
|
7
|
+
export declare const Ring: import("../../core/factory").PlatformBlocksComponent<RingFactoryPayload>;
|
|
8
|
+
export default Ring;
|