@platform-blocks/ui 0.5.0 → 0.6.1
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/lib/cjs/index.js +670 -1744
- package/lib/cjs/index.js.map +1 -1
- package/lib/components/Carousel/types.d.ts +14 -0
- package/lib/components/Dialog/Dialog.d.ts +1 -1
- package/lib/components/Dialog/types.d.ts +23 -2
- package/lib/components/HoverCard/types.d.ts +5 -3
- package/lib/components/Image/Image.d.ts +1 -1
- package/lib/components/Image/types.d.ts +3 -3
- package/lib/components/Input/styles.d.ts +1 -12
- package/lib/components/Layout/Layout.d.ts +1 -0
- package/lib/components/Menu/types.d.ts +2 -2
- package/lib/components/Popover/types.d.ts +7 -5
- package/lib/components/Select/Select.types.d.ts +1 -1
- package/lib/components/Skeleton/types.d.ts +2 -2
- package/lib/components/Switch/styles.d.ts +1 -1
- package/lib/components/Table/Table.d.ts +4 -4
- package/lib/components/TextArea/styles.d.ts +1 -1
- package/lib/components/TextArea/types.d.ts +2 -2
- package/lib/components/Timeline/types.d.ts +20 -0
- package/lib/components/Video/types.d.ts +2 -2
- package/lib/components/Waveform/WaveformSkeleton.d.ts +2 -2
- package/lib/components/Waveform/types.d.ts +2 -2
- package/lib/components/index.d.ts +0 -4
- package/lib/components/types.d.ts +0 -1
- package/lib/core/providers/OverlayProvider.d.ts +1 -1
- package/lib/core/theme/PlatformBlocksProvider.d.ts +1 -5
- package/lib/core/utils/layout.d.ts +13 -16
- package/lib/core/utils/positioning-enhanced.d.ts +2 -0
- package/lib/esm/index.js +672 -1725
- package/lib/esm/index.js.map +1 -1
- package/lib/index.d.ts +0 -11
- package/package.json +67 -57
- package/lib/components/Can/Can.d.ts +0 -30
- package/lib/components/Can/PermissionDemo.d.ts +0 -2
- package/lib/components/Can/ability.d.ts +0 -89
- package/lib/components/Can/builder.d.ts +0 -113
- package/lib/components/Can/context.d.ts +0 -25
- package/lib/components/Can/index.d.ts +0 -6
- package/lib/components/Can/types.d.ts +0 -230
- package/lib/components/HoverCard/index.d.ts +0 -2
- package/lib/components/Lottie/Lottie.d.ts +0 -30
- package/lib/components/Lottie/index.d.ts +0 -2
- package/lib/components/NavigationProgress/NavigationProgress.d.ts +0 -4
- package/lib/components/NavigationProgress/defaults.d.ts +0 -8
- package/lib/components/NavigationProgress/hooks/useNavigationProgressState.d.ts +0 -1
- package/lib/components/NavigationProgress/index.d.ts +0 -2
- package/lib/components/NavigationProgress/styles/resolver.d.ts +0 -1
- package/lib/components/NavigationProgress/tokens.d.ts +0 -4
- package/lib/components/NavigationProgress/types.d.ts +0 -30
- package/lib/components/RichTextEditor/RichTextEditor.d.ts +0 -3
- package/lib/components/RichTextEditor/index.d.ts +0 -2
- package/lib/components/RichTextEditor/styles.d.ts +0 -61
- package/lib/components/RichTextEditor/types.d.ts +0 -150
|
@@ -4,9 +4,11 @@ import { SpacingProps } from '../../core/utils';
|
|
|
4
4
|
import type { ResponsiveSize } from '../AppShell/types';
|
|
5
5
|
import type { ComponentSizeValue } from '../../core/theme/componentSize';
|
|
6
6
|
export interface CarouselProps extends SpacingProps {
|
|
7
|
+
/** Array of carousel slide elements */
|
|
7
8
|
children: React.ReactNode[];
|
|
8
9
|
/** Orientation of the carousel */
|
|
9
10
|
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
/** Show navigation arrow buttons */
|
|
10
12
|
showArrows?: boolean;
|
|
11
13
|
/** Show navigation dots */
|
|
12
14
|
showDots?: boolean;
|
|
@@ -55,16 +57,28 @@ export interface CarouselProps extends SpacingProps {
|
|
|
55
57
|
};
|
|
56
58
|
/** Responsive gap between slides (overrides itemGap). Accepts spacing token string or number or responsive map. */
|
|
57
59
|
slideGap?: ResponsiveSize;
|
|
60
|
+
/** Gap between slides in pixels */
|
|
58
61
|
itemGap?: number;
|
|
62
|
+
/** Fixed height of the carousel container */
|
|
59
63
|
height?: number;
|
|
64
|
+
/** Callback fired when the active slide changes */
|
|
60
65
|
onSlideChange?: (index: number) => void;
|
|
66
|
+
/** Style override for the carousel container */
|
|
61
67
|
style?: ViewStyle;
|
|
68
|
+
/** Style override applied to each slide item */
|
|
62
69
|
itemStyle?: ViewStyle;
|
|
70
|
+
/** Enable snapping to individual items */
|
|
63
71
|
snapToItem?: boolean;
|
|
72
|
+
/** Position of navigation arrows relative to the carousel */
|
|
64
73
|
arrowPosition?: 'inside' | 'outside';
|
|
74
|
+
/** Size of the navigation arrow buttons */
|
|
65
75
|
arrowSize?: ComponentSizeValue;
|
|
76
|
+
/** Size of the navigation dots */
|
|
66
77
|
dotSize?: ComponentSizeValue;
|
|
78
|
+
/** Enable or disable scroll gestures */
|
|
67
79
|
scrollEnabled?: boolean;
|
|
80
|
+
/** Disable animated width/color transitions for dots and snapping */
|
|
68
81
|
reducedMotion?: boolean;
|
|
82
|
+
/** Number of logical pages to render for virtualization */
|
|
69
83
|
windowSize?: number;
|
|
70
84
|
}
|
|
@@ -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,
|
|
3
|
+
export declare function Dialog({ visible, variant, title, children, closable, backdrop, backdropClosable, shouldClose, onClose, w, h, radius, style, showHeader, bottomSheetSwipeZone, }: DialogProps): React.JSX.Element | null;
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface DialogProps {
|
|
3
|
+
/** Controls whether the dialog is visible. */
|
|
3
4
|
visible: boolean;
|
|
5
|
+
/** Presentation style of the dialog. */
|
|
4
6
|
variant?: 'modal' | 'bottomsheet' | 'fullscreen';
|
|
7
|
+
/** Optional title text shown in the header area. */
|
|
5
8
|
title?: string | null;
|
|
9
|
+
/** Dialog body content. */
|
|
6
10
|
children: ReactNode;
|
|
11
|
+
/** Allows the user to close the dialog via UI controls or escape/back. */
|
|
7
12
|
closable?: boolean;
|
|
13
|
+
/** Whether to render the dimming backdrop behind the dialog. */
|
|
8
14
|
backdrop?: boolean;
|
|
15
|
+
/** Whether tapping the backdrop should close the dialog. */
|
|
9
16
|
backdropClosable?: boolean;
|
|
17
|
+
/** Triggers close animation when set to true. */
|
|
10
18
|
shouldClose?: boolean;
|
|
19
|
+
/** Called when the dialog requests to close. */
|
|
11
20
|
onClose?: () => void;
|
|
12
|
-
width
|
|
13
|
-
|
|
21
|
+
/** Optional explicit width for the dialog content (modal/bottomsheet). */
|
|
22
|
+
w?: number;
|
|
23
|
+
/** Optional explicit height for the dialog content. */
|
|
24
|
+
h?: number;
|
|
25
|
+
/** Corner radius for the dialog container (bottom sheet rounds top corners only). */
|
|
26
|
+
radius?: number;
|
|
27
|
+
/** Optional style overrides for the dialog container. */
|
|
14
28
|
style?: object;
|
|
29
|
+
/** Whether to show the styled header area with background and border (default true). */
|
|
30
|
+
showHeader?: boolean;
|
|
15
31
|
/** Controls which part of the bottom sheet responds to swipe-to-dismiss gestures */
|
|
16
32
|
bottomSheetSwipeZone?: 'container' | 'handle' | 'none';
|
|
17
33
|
}
|
|
@@ -26,6 +42,11 @@ export interface DialogConfig {
|
|
|
26
42
|
backdropClosable?: boolean;
|
|
27
43
|
isClosing?: boolean;
|
|
28
44
|
bottomSheetSwipeZone?: 'container' | 'handle' | 'none';
|
|
45
|
+
w?: number;
|
|
46
|
+
h?: number;
|
|
47
|
+
radius?: number;
|
|
48
|
+
style?: object;
|
|
49
|
+
showHeader?: boolean;
|
|
29
50
|
}
|
|
30
51
|
export interface DialogContextValue {
|
|
31
52
|
dialogs: DialogConfig[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle, View } from 'react-native';
|
|
3
3
|
import { SizeValue } from '../../core/theme/sizes';
|
|
4
|
-
export type HoverCardPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export type HoverCardPosition = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
5
5
|
export type HoverCardShadow = 'none' | 'sm' | 'md' | 'lg';
|
|
6
6
|
export interface HoverCardProps {
|
|
7
7
|
/** Floating content */
|
|
@@ -22,10 +22,10 @@ export interface HoverCardProps {
|
|
|
22
22
|
shadow?: HoverCardShadow;
|
|
23
23
|
/** Corner radius */
|
|
24
24
|
radius?: SizeValue;
|
|
25
|
-
/** Whether rendered in portal (
|
|
25
|
+
/** Whether rendered in portal (deprecated - always uses portal) */
|
|
26
26
|
withinPortal?: boolean;
|
|
27
27
|
/** Fixed width */
|
|
28
|
-
|
|
28
|
+
w?: number;
|
|
29
29
|
/** Show directional arrow */
|
|
30
30
|
withArrow?: boolean;
|
|
31
31
|
/** Close on Escape (web) */
|
|
@@ -46,6 +46,8 @@ export interface HoverCardProps {
|
|
|
46
46
|
keepMounted?: boolean;
|
|
47
47
|
/** Trigger mode */
|
|
48
48
|
trigger?: 'hover' | 'click';
|
|
49
|
+
/** Positioning strategy: 'fixed' for web, 'portal' for native */
|
|
50
|
+
strategy?: 'fixed' | 'portal';
|
|
49
51
|
}
|
|
50
52
|
export interface HoverCardFactoryPayload {
|
|
51
53
|
props: HoverCardProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ImageProps } from './types';
|
|
3
|
-
export declare function Image({ src, source, alt, accessibilityLabel, resizeMode, size,
|
|
3
|
+
export declare function Image({ src, source, alt, accessibilityLabel, resizeMode, size, w, h, aspectRatio, borderWidth, borderColor, rounded, circle, fallback, loading, onLoad, onError, onLoadStart, onLoadEnd, containerStyle, imageStyle, testID, style, ...rest }: ImageProps): React.JSX.Element | null;
|
|
@@ -9,7 +9,7 @@ export interface BaseComponentProps extends SpacingProps {
|
|
|
9
9
|
/** Additional CSS styles */
|
|
10
10
|
style?: any;
|
|
11
11
|
}
|
|
12
|
-
export interface ImageProps extends BaseComponentProps, Omit<LayoutProps, '
|
|
12
|
+
export interface ImageProps extends BaseComponentProps, Omit<LayoutProps, 'w' | 'h'>, BorderRadiusProps {
|
|
13
13
|
/** Image source URI */
|
|
14
14
|
src: string;
|
|
15
15
|
/** Image source object (alternative to src) */
|
|
@@ -25,9 +25,9 @@ export interface ImageProps extends BaseComponentProps, Omit<LayoutProps, 'width
|
|
|
25
25
|
/** Image size preset */
|
|
26
26
|
size?: SizeValue | number;
|
|
27
27
|
/** Custom width */
|
|
28
|
-
|
|
28
|
+
w?: number | string;
|
|
29
29
|
/** Custom height */
|
|
30
|
-
|
|
30
|
+
h?: number | string;
|
|
31
31
|
/** Aspect ratio */
|
|
32
32
|
aspectRatio?: number;
|
|
33
33
|
/** Border width */
|
|
@@ -16,18 +16,7 @@ export declare const createInputStyles: (theme: PlatformBlocksTheme, isRTL?: boo
|
|
|
16
16
|
fontSize: number;
|
|
17
17
|
marginTop: number;
|
|
18
18
|
};
|
|
19
|
-
input:
|
|
20
|
-
outlineWidth?: number | undefined;
|
|
21
|
-
border?: string | undefined;
|
|
22
|
-
backgroundColor?: string | undefined;
|
|
23
|
-
flex: number;
|
|
24
|
-
fontSize: number;
|
|
25
|
-
color: string;
|
|
26
|
-
paddingVertical: number;
|
|
27
|
-
paddingHorizontal: number;
|
|
28
|
-
minHeight: number;
|
|
29
|
-
fontFamily: string;
|
|
30
|
-
};
|
|
19
|
+
input: any;
|
|
31
20
|
inputContainer: any;
|
|
32
21
|
label: {
|
|
33
22
|
color: string;
|
|
@@ -14,5 +14,6 @@ export interface ColumnProps extends Omit<FlexProps, 'direction'> {
|
|
|
14
14
|
export declare const Row: React.FC<RowProps>;
|
|
15
15
|
/**
|
|
16
16
|
* Column component - alias for Flex with direction="column"
|
|
17
|
+
* Defaults to fullWidth={true} since vertical layouts typically fill available width
|
|
17
18
|
*/
|
|
18
19
|
export declare const Column: React.FC<ColumnProps>;
|
|
@@ -17,9 +17,9 @@ export interface MenuProps extends SpacingProps {
|
|
|
17
17
|
/** Callback when menu closes */
|
|
18
18
|
onClose?: () => void;
|
|
19
19
|
/** Menu content width */
|
|
20
|
-
|
|
20
|
+
w?: number | 'target' | 'auto';
|
|
21
21
|
/** Maximum height for scrollable content */
|
|
22
|
-
|
|
22
|
+
maxH?: number;
|
|
23
23
|
/** Menu content shadow */
|
|
24
24
|
shadow?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
25
|
/** Border radius */
|
|
@@ -29,6 +29,8 @@ export interface PopoverProps extends SpacingProps {
|
|
|
29
29
|
onClose?: () => void;
|
|
30
30
|
/** Called when popover is dismissed via outside click or escape */
|
|
31
31
|
onDismiss?: () => void;
|
|
32
|
+
/** How the popover is triggered: 'click' (default) or 'hover' (mostly useful for devices with a mouse) */
|
|
33
|
+
trigger?: 'click' | 'hover';
|
|
32
34
|
/** Disable popover entirely */
|
|
33
35
|
disabled?: boolean;
|
|
34
36
|
/** Close when clicking outside */
|
|
@@ -50,15 +52,15 @@ export interface PopoverProps extends SpacingProps {
|
|
|
50
52
|
/** Overlay component props */
|
|
51
53
|
overlayProps?: Record<string, unknown>;
|
|
52
54
|
/** Dropdown width, number or 'target' to match target width */
|
|
53
|
-
|
|
55
|
+
w?: number | 'target';
|
|
54
56
|
/** Dropdown max-width */
|
|
55
|
-
|
|
57
|
+
maxW?: number;
|
|
56
58
|
/** Dropdown max-height */
|
|
57
|
-
|
|
59
|
+
maxH?: number;
|
|
58
60
|
/** Dropdown min-width */
|
|
59
|
-
|
|
61
|
+
minW?: number;
|
|
60
62
|
/** Dropdown min-height */
|
|
61
|
-
|
|
63
|
+
minH?: number;
|
|
62
64
|
/** Border radius */
|
|
63
65
|
radius?: RadiusValue | number;
|
|
64
66
|
/** Box shadow */
|
|
@@ -48,7 +48,7 @@ export interface SelectProps<T = any> extends SpacingProps, LayoutProps {
|
|
|
48
48
|
/** Stretches the trigger to occupy the full width of its container. */
|
|
49
49
|
fullWidth?: boolean;
|
|
50
50
|
/** Maximum height the dropdown may reach before it scrolls. */
|
|
51
|
-
|
|
51
|
+
maxH?: number;
|
|
52
52
|
/** Whether the dropdown should close immediately after selection. */
|
|
53
53
|
closeOnSelect?: boolean;
|
|
54
54
|
/** Allows the user to clear the current selection. */
|
|
@@ -6,9 +6,9 @@ export interface SkeletonProps extends SpacingProps {
|
|
|
6
6
|
/** Shape of the skeleton placeholder */
|
|
7
7
|
shape?: SkeletonShape;
|
|
8
8
|
/** Width of the skeleton component */
|
|
9
|
-
|
|
9
|
+
w?: DimensionValue;
|
|
10
10
|
/** Height of the skeleton component */
|
|
11
|
-
|
|
11
|
+
h?: DimensionValue;
|
|
12
12
|
/** Size of the skeleton component (overrides width/height) */
|
|
13
13
|
size?: SizeValue;
|
|
14
14
|
/** Border radius for rectangle/rounded shapes */
|
|
@@ -53,9 +53,9 @@ export interface TableProps extends SpacingProps {
|
|
|
53
53
|
export interface TableScrollContainerProps extends SpacingProps {
|
|
54
54
|
children?: React.ReactNode;
|
|
55
55
|
/** Minimum width before scrolling kicks in */
|
|
56
|
-
|
|
56
|
+
minW?: number;
|
|
57
57
|
/** Maximum height before vertical scrolling */
|
|
58
|
-
|
|
58
|
+
maxH?: number;
|
|
59
59
|
/** Scroll type for web */
|
|
60
60
|
type?: 'native' | 'custom';
|
|
61
61
|
style?: any;
|
|
@@ -84,9 +84,9 @@ export interface TableCellProps extends SpacingProps {
|
|
|
84
84
|
/** Text alignment */
|
|
85
85
|
align?: 'left' | 'center' | 'right';
|
|
86
86
|
/** Minimum width for auto-sizing */
|
|
87
|
-
|
|
87
|
+
minW?: number;
|
|
88
88
|
/** Maximum width for auto-sizing */
|
|
89
|
-
|
|
89
|
+
maxW?: number;
|
|
90
90
|
/** Flex grow factor for flexible sizing */
|
|
91
91
|
flex?: number;
|
|
92
92
|
/** Width strategy for responsive behavior */
|
|
@@ -17,7 +17,7 @@ export interface TextAreaProps extends BaseInputProps {
|
|
|
17
17
|
/** Show character counter */
|
|
18
18
|
showCharCounter?: boolean;
|
|
19
19
|
/** Fixed height for the TextArea */
|
|
20
|
-
|
|
20
|
+
h?: number;
|
|
21
21
|
/** Resize behavior */
|
|
22
22
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
23
23
|
/** Additional TextInput props */
|
|
@@ -30,5 +30,5 @@ export interface TextAreaStyleProps {
|
|
|
30
30
|
error?: boolean;
|
|
31
31
|
rows?: number;
|
|
32
32
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
33
|
-
|
|
33
|
+
h?: number;
|
|
34
34
|
}
|
|
@@ -12,6 +12,8 @@ export interface TimelineItemProps extends Omit<ViewProps, 'children'> {
|
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
/** Item title */
|
|
14
14
|
title?: string;
|
|
15
|
+
/** Optional timestamp text or node */
|
|
16
|
+
timestamp?: ReactNode;
|
|
15
17
|
/** Custom bullet content (icon, avatar, etc.) */
|
|
16
18
|
bullet?: ReactNode;
|
|
17
19
|
/** Line variant for this item */
|
|
@@ -20,6 +22,12 @@ export interface TimelineItemProps extends Omit<ViewProps, 'children'> {
|
|
|
20
22
|
color?: string;
|
|
21
23
|
/** Item color variant token (e.g. primary.5 or primary) used if color not provided */
|
|
22
24
|
colorVariant?: string;
|
|
25
|
+
/** Override title text color for this item */
|
|
26
|
+
titleColor?: string;
|
|
27
|
+
/** Override description text color for this item */
|
|
28
|
+
descriptionColor?: string;
|
|
29
|
+
/** Override timestamp text color for this item */
|
|
30
|
+
timestampColor?: string;
|
|
23
31
|
/** Whether this item is active */
|
|
24
32
|
active?: boolean;
|
|
25
33
|
/** Override timeline alignment for this specific item */
|
|
@@ -34,6 +42,12 @@ export interface TimelineProps extends Omit<ViewProps, 'children'> {
|
|
|
34
42
|
color?: string;
|
|
35
43
|
/** Timeline color variant token (e.g. primary.5) used when color not provided */
|
|
36
44
|
colorVariant?: string;
|
|
45
|
+
/** Default title color for all items */
|
|
46
|
+
titleColor?: string;
|
|
47
|
+
/** Default description color for all items */
|
|
48
|
+
descriptionColor?: string;
|
|
49
|
+
/** Default timestamp color for all items */
|
|
50
|
+
timestampColor?: string;
|
|
37
51
|
/** Line width */
|
|
38
52
|
lineWidth?: number;
|
|
39
53
|
/** Bullet size */
|
|
@@ -58,4 +72,10 @@ export interface TimelineContextValue {
|
|
|
58
72
|
metrics: TimelineSizeMetrics;
|
|
59
73
|
/** Whether layout is split with centered vertical line */
|
|
60
74
|
centerMode?: boolean;
|
|
75
|
+
/** Default title color for items */
|
|
76
|
+
titleColor?: string;
|
|
77
|
+
/** Default description color for items */
|
|
78
|
+
descriptionColor?: string;
|
|
79
|
+
/** Default timestamp color for items */
|
|
80
|
+
timestampColor?: string;
|
|
61
81
|
}
|
|
@@ -74,8 +74,8 @@ export interface VideoProps extends SpacingProps {
|
|
|
74
74
|
/** Video source configuration */
|
|
75
75
|
source: VideoSource;
|
|
76
76
|
/** Display and sizing */
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
w?: number | string;
|
|
78
|
+
h?: number | string;
|
|
79
79
|
aspectRatio?: number;
|
|
80
80
|
poster?: string;
|
|
81
81
|
/** Playback configuration */
|
|
@@ -4,9 +4,9 @@ export interface WaveformProps extends Omit<ViewProps, 'children'> {
|
|
|
4
4
|
/** Array of peak values (normalized between -1 and 1) */
|
|
5
5
|
peaks: number[];
|
|
6
6
|
/** Width of the waveform */
|
|
7
|
-
|
|
7
|
+
w?: number;
|
|
8
8
|
/** Height of the waveform */
|
|
9
|
-
|
|
9
|
+
h?: number;
|
|
10
10
|
/** Color of the waveform */
|
|
11
11
|
color?: string;
|
|
12
12
|
/** Visual variant of the waveform */
|
|
@@ -50,14 +50,12 @@ export { Slider, RangeSlider } from './Slider';
|
|
|
50
50
|
export { Knob } from './Knob';
|
|
51
51
|
export { AutoComplete } from './AutoComplete';
|
|
52
52
|
export { FileInput } from './FileInput';
|
|
53
|
-
export { RichTextEditor } from './RichTextEditor';
|
|
54
53
|
export { Form } from './Form';
|
|
55
54
|
export { FormLayout, FormSection, FormGroup, FormField } from './FormLayout';
|
|
56
55
|
export { Row, Column } from './Layout';
|
|
57
56
|
export { ToastProvider, useToast, useToastApi } from './Toast';
|
|
58
57
|
export { Progress } from './Progress';
|
|
59
58
|
export { QRCode } from './QRCode';
|
|
60
|
-
export { NavigationProgress, navigationProgress } from './NavigationProgress';
|
|
61
59
|
export { Radio, RadioGroup } from './Radio';
|
|
62
60
|
export { Rating } from './Rating';
|
|
63
61
|
export { Collapse } from './Collapse';
|
|
@@ -82,7 +80,6 @@ export { ShimmerText } from './ShimmerText';
|
|
|
82
80
|
export { Highlight } from './Highlight';
|
|
83
81
|
export { Title } from './Title/Title';
|
|
84
82
|
export { TableOfContents } from './TableOfContents/TableOfContents';
|
|
85
|
-
export { HoverCard } from './HoverCard/HoverCard';
|
|
86
83
|
export { ContextMenu } from './ContextMenu';
|
|
87
84
|
export { Popover } from './Popover';
|
|
88
85
|
export { Gallery } from './Gallery';
|
|
@@ -135,7 +132,6 @@ export type { SliderProps, RangeSliderProps } from './Slider';
|
|
|
135
132
|
export type { KnobProps, KnobMark } from './Knob';
|
|
136
133
|
export type { AutoCompleteProps, AutoCompleteOption } from './AutoComplete';
|
|
137
134
|
export type { FileInputProps, FileInputFile } from './FileInput';
|
|
138
|
-
export type { RichTextEditorProps, RichTextEditorContent, RichTextEditorFormat, RichTextEditorSelection } from './RichTextEditor';
|
|
139
135
|
export type { FormProps, FormFieldProps, FormInputProps, FormLabelProps, FormErrorProps, FormSubmitProps } from './Form';
|
|
140
136
|
export type { RowProps, ColumnProps } from './Layout';
|
|
141
137
|
export type { ToastOptions, ToastPosition } from './Toast';
|
|
@@ -35,7 +35,6 @@ export type { SliderProps, RangeSliderProps } from './Slider';
|
|
|
35
35
|
export type { KnobProps, KnobMark } from './Knob';
|
|
36
36
|
export type { AutoCompleteProps, AutoCompleteOption } from './AutoComplete';
|
|
37
37
|
export type { FileInputProps, FileInputFile } from './FileInput';
|
|
38
|
-
export type { RichTextEditorProps } from './RichTextEditor';
|
|
39
38
|
export type { FormProps } from './Form';
|
|
40
39
|
export type { RowProps, ColumnProps } from './Layout';
|
|
41
40
|
export type { ProgressProps } from './Progress';
|
|
@@ -3,7 +3,7 @@ export interface OverlayConfig {
|
|
|
3
3
|
id: string;
|
|
4
4
|
content: ReactNode;
|
|
5
5
|
trigger?: 'click' | 'hover' | 'contextmenu' | 'manual';
|
|
6
|
-
placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
6
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'auto';
|
|
7
7
|
offset?: number;
|
|
8
8
|
anchor?: {
|
|
9
9
|
x: number;
|
|
@@ -3,11 +3,9 @@ import { PlatformBlocksThemeProviderProps } from './ThemeProvider';
|
|
|
3
3
|
import type { DirectionProviderProps } from '../providers';
|
|
4
4
|
import type { HighlightProps as HighlightComponentProps } from '../../components/Highlight';
|
|
5
5
|
import type { HapticsProviderProps } from '../haptics/HapticsProvider';
|
|
6
|
-
import type { PermissionProviderProps } from '../../components/Can';
|
|
7
6
|
import { ThemeModeConfig } from './ThemeModeProvider';
|
|
8
7
|
type DirectionProviderConfig = Omit<DirectionProviderProps, 'children'>;
|
|
9
8
|
type HapticsProviderConfig = Omit<HapticsProviderProps, 'children'>;
|
|
10
|
-
type PermissionProviderConfig = Omit<PermissionProviderProps, 'children'>;
|
|
11
9
|
export interface PlatformBlocksProviderProps extends Omit<PlatformBlocksThemeProviderProps, 'children'> {
|
|
12
10
|
/** Your application */
|
|
13
11
|
children: React.ReactNode;
|
|
@@ -52,14 +50,12 @@ export interface PlatformBlocksProviderProps extends Omit<PlatformBlocksThemePro
|
|
|
52
50
|
direction?: false | DirectionProviderConfig;
|
|
53
51
|
/** Haptics context configuration (pass false to opt out) */
|
|
54
52
|
haptics?: false | HapticsProviderConfig;
|
|
55
|
-
/** Permission context configuration (pass false to opt out) */
|
|
56
|
-
permissions?: false | PermissionProviderConfig;
|
|
57
53
|
}
|
|
58
54
|
/**
|
|
59
55
|
* Main provider component for Platform Blocks library
|
|
60
56
|
* Provides theme context and injects CSS variables
|
|
61
57
|
*/
|
|
62
|
-
export declare function PlatformBlocksProvider({ children, theme, inherit, withCSSVariables, cssVariablesSelector, colorSchemeMode, withOverlays, withSpotlight, withGlobalCSS, themeModeConfig, spotlightConfig, locale, fallbackLocale, i18nResources, direction, haptics
|
|
58
|
+
export declare function PlatformBlocksProvider({ children, theme, inherit, withCSSVariables, cssVariablesSelector, colorSchemeMode, withOverlays, withSpotlight, withGlobalCSS, themeModeConfig, spotlightConfig, locale, fallbackLocale, i18nResources, direction, haptics }: PlatformBlocksProviderProps): React.JSX.Element;
|
|
63
59
|
export declare namespace PlatformBlocksProvider {
|
|
64
60
|
var displayName: string;
|
|
65
61
|
}
|
|
@@ -2,38 +2,35 @@ import { ViewStyle, DimensionValue } from 'react-native';
|
|
|
2
2
|
export interface LayoutProps {
|
|
3
3
|
/** Makes the component fill the full width of its parent */
|
|
4
4
|
fullWidth?: boolean;
|
|
5
|
-
/** Sets a specific width (shorthand for width) */
|
|
6
|
-
w?: DimensionValue;
|
|
7
5
|
/** Sets a specific width */
|
|
8
|
-
|
|
6
|
+
w?: DimensionValue;
|
|
9
7
|
/** Sets a specific height */
|
|
10
|
-
|
|
8
|
+
h?: DimensionValue;
|
|
11
9
|
/** Sets the maximum width */
|
|
12
|
-
|
|
10
|
+
maxW?: DimensionValue;
|
|
13
11
|
/** Sets the minimum width */
|
|
14
|
-
|
|
12
|
+
minW?: DimensionValue;
|
|
15
13
|
/** Sets the maximum height */
|
|
16
|
-
|
|
14
|
+
maxH?: DimensionValue;
|
|
17
15
|
/** Sets the minimum height */
|
|
18
|
-
|
|
16
|
+
minH?: DimensionValue;
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
19
|
* Generates layout styles based on provided layout properties.
|
|
22
20
|
*
|
|
23
21
|
* @param props - The layout properties object
|
|
24
22
|
* @param props.fullWidth - When true, sets width to 100%
|
|
25
|
-
* @param props.w -
|
|
26
|
-
* @param props.
|
|
27
|
-
* @param props.
|
|
28
|
-
* @param props.
|
|
29
|
-
* @param props.
|
|
30
|
-
* @param props.
|
|
31
|
-
* @param props.minHeight - Minimum height constraint
|
|
23
|
+
* @param props.w - Width property (overrides fullWidth)
|
|
24
|
+
* @param props.h - Height value
|
|
25
|
+
* @param props.maxW - Maximum width constraint
|
|
26
|
+
* @param props.minW - Minimum width constraint
|
|
27
|
+
* @param props.maxH - Maximum height constraint
|
|
28
|
+
* @param props.minH - Minimum height constraint
|
|
32
29
|
*
|
|
33
30
|
* @returns A partial ViewStyle object containing the computed layout styles
|
|
34
31
|
*
|
|
35
32
|
* @remarks
|
|
36
|
-
* Property precedence for width:
|
|
33
|
+
* Property precedence for width: w > fullWidth
|
|
37
34
|
* The function processes width properties in order of specificity, with more specific
|
|
38
35
|
* properties overriding more general ones.
|
|
39
36
|
*/
|
|
@@ -38,6 +38,8 @@ export interface PositioningOptions {
|
|
|
38
38
|
boundary?: number;
|
|
39
39
|
/** Fallback placements to try if primary placement doesn't fit */
|
|
40
40
|
fallbackPlacements?: PlacementType[];
|
|
41
|
+
/** Match the anchor element's width (useful for dropdown inputs) */
|
|
42
|
+
matchAnchorWidth?: boolean;
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
43
45
|
* Enhanced overlay positioning that prevents off-screen rendering with intelligent caching
|