@platform-blocks/ui 0.5.0 → 0.6.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/lib/cjs/index.js +215 -1042
- package/lib/cjs/index.js.map +1 -1
- package/lib/components/Carousel/types.d.ts +14 -0
- package/lib/components/HoverCard/types.d.ts +4 -2
- package/lib/components/Popover/types.d.ts +2 -0
- package/lib/components/Switch/styles.d.ts +1 -1
- package/lib/components/TextArea/styles.d.ts +1 -1
- package/lib/components/index.d.ts +0 -2
- package/lib/core/providers/OverlayProvider.d.ts +1 -1
- package/lib/core/theme/PlatformBlocksProvider.d.ts +1 -5
- package/lib/esm/index.js +216 -1024
- package/lib/esm/index.js.map +1 -1
- package/lib/index.d.ts +0 -7
- package/package.json +1 -1
- 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/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
|
@@ -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,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,7 +22,7 @@ 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
|
width?: number;
|
|
@@ -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;
|
|
@@ -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 */
|
|
@@ -57,7 +57,6 @@ export { Row, Column } from './Layout';
|
|
|
57
57
|
export { ToastProvider, useToast, useToastApi } from './Toast';
|
|
58
58
|
export { Progress } from './Progress';
|
|
59
59
|
export { QRCode } from './QRCode';
|
|
60
|
-
export { NavigationProgress, navigationProgress } from './NavigationProgress';
|
|
61
60
|
export { Radio, RadioGroup } from './Radio';
|
|
62
61
|
export { Rating } from './Rating';
|
|
63
62
|
export { Collapse } from './Collapse';
|
|
@@ -82,7 +81,6 @@ export { ShimmerText } from './ShimmerText';
|
|
|
82
81
|
export { Highlight } from './Highlight';
|
|
83
82
|
export { Title } from './Title/Title';
|
|
84
83
|
export { TableOfContents } from './TableOfContents/TableOfContents';
|
|
85
|
-
export { HoverCard } from './HoverCard/HoverCard';
|
|
86
84
|
export { ContextMenu } from './ContextMenu';
|
|
87
85
|
export { Popover } from './Popover';
|
|
88
86
|
export { Gallery } from './Gallery';
|
|
@@ -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
|
}
|