@platform-blocks/ui 0.1.2 → 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.
Files changed (81) hide show
  1. package/README.md +60 -1
  2. package/lib/cjs/index.js +5970 -2471
  3. package/lib/cjs/index.js.map +1 -1
  4. package/lib/components/AutoComplete/types.d.ts +2 -0
  5. package/lib/components/Avatar/types.d.ts +3 -2
  6. package/lib/components/Badge/types.d.ts +4 -4
  7. package/lib/components/Blockquote/styles.d.ts +2 -1
  8. package/lib/components/Breadcrumbs/types.d.ts +2 -1
  9. package/lib/components/Calendar/types.d.ts +1 -0
  10. package/lib/components/Card/types.d.ts +1 -1
  11. package/lib/components/Carousel/types.d.ts +3 -2
  12. package/lib/components/Chip/types.d.ts +1 -1
  13. package/lib/components/ColorPicker/styles.d.ts +15 -1
  14. package/lib/components/ColorPicker/types.d.ts +4 -1
  15. package/lib/components/CopyButton/types.d.ts +3 -2
  16. package/lib/components/Dialog/Dialog.d.ts +1 -1
  17. package/lib/components/Dialog/types.d.ts +3 -0
  18. package/lib/components/FileInput/types.d.ts +12 -3
  19. package/lib/components/Highlight/Highlight.d.ts +4 -0
  20. package/lib/components/Highlight/index.d.ts +3 -0
  21. package/lib/components/Highlight/types.d.ts +24 -0
  22. package/lib/components/Input/styles.d.ts +0 -24
  23. package/lib/components/Input/types.d.ts +2 -0
  24. package/lib/components/KeyCap/types.d.ts +9 -2
  25. package/lib/components/KeyboardAwareLayout/KeyboardAwareLayout.d.ts +4 -0
  26. package/lib/components/KeyboardAwareLayout/index.d.ts +3 -0
  27. package/lib/components/KeyboardAwareLayout/types.d.ts +26 -0
  28. package/lib/components/Knob/Knob.d.ts +6 -0
  29. package/lib/components/Knob/index.d.ts +2 -0
  30. package/lib/components/Knob/types.d.ts +65 -0
  31. package/lib/components/ListGroup/types.d.ts +11 -2
  32. package/lib/components/MenuItemButton/MenuItemButton.d.ts +31 -2
  33. package/lib/components/MonthPicker/types.d.ts +2 -2
  34. package/lib/components/NumberInput/types.d.ts +14 -0
  35. package/lib/components/Pagination/types.d.ts +10 -1
  36. package/lib/components/PinInput/types.d.ts +2 -0
  37. package/lib/components/Popover/Popover.d.ts +20 -0
  38. package/lib/components/Popover/index.d.ts +2 -0
  39. package/lib/components/Popover/styles.d.ts +67 -0
  40. package/lib/components/Popover/types.d.ts +131 -0
  41. package/lib/components/Ring/Ring.d.ts +8 -0
  42. package/lib/components/Ring/index.d.ts +3 -0
  43. package/lib/components/Ring/types.d.ts +75 -0
  44. package/lib/components/SegmentedControl/types.d.ts +8 -2
  45. package/lib/components/Select/Select.d.ts +0 -1
  46. package/lib/components/Select/Select.types.d.ts +33 -0
  47. package/lib/components/ShimmerText/ShimmerText.d.ts +1 -0
  48. package/lib/components/Spotlight/DirectSpotlightState.d.ts +1 -1
  49. package/lib/components/Spotlight/Spotlight.d.ts +2 -2
  50. package/lib/components/Spotlight/SpotlightController.d.ts +2 -1
  51. package/lib/components/Spotlight/types.d.ts +6 -2
  52. package/lib/components/Stepper/types.d.ts +10 -2
  53. package/lib/components/TextArea/styles.d.ts +3 -33
  54. package/lib/components/TextArea/types.d.ts +2 -1
  55. package/lib/components/TimePicker/TimePicker.d.ts +1 -3
  56. package/lib/components/TimePickerInput/TimePickerInput.d.ts +3 -0
  57. package/lib/components/TimePickerInput/index.d.ts +2 -2
  58. package/lib/components/TimePickerInput/types.d.ts +3 -0
  59. package/lib/components/Timeline/types.d.ts +10 -2
  60. package/lib/components/Toast/types.d.ts +2 -0
  61. package/lib/components/Tree/types.d.ts +7 -0
  62. package/lib/components/index.d.ts +10 -0
  63. package/lib/components/optimized.d.ts +5 -0
  64. package/lib/components/types.d.ts +3 -0
  65. package/lib/core/factory/factory.d.ts +3 -3
  66. package/lib/core/hooks/usePopoverPositioning.d.ts +2 -5
  67. package/lib/core/keyboard/selection.d.ts +42 -0
  68. package/lib/core/providers/KeyboardManagerProvider.d.ts +45 -0
  69. package/lib/core/providers/index.d.ts +3 -1
  70. package/lib/core/theme/PlatformBlocksProvider.d.ts +16 -2
  71. package/lib/core/theme/componentSize.d.ts +10 -0
  72. package/lib/core/theme/index.d.ts +1 -0
  73. package/lib/core/theme/sizes.d.ts +2 -1
  74. package/lib/core/theme/types.d.ts +4 -2
  75. package/lib/esm/index.js +5963 -2475
  76. package/lib/esm/index.js.map +1 -1
  77. package/lib/index.d.ts +15 -0
  78. package/lib/utils/optionalDependencies.d.ts +28 -0
  79. package/lib/utils/optionalModule.d.ts +16 -0
  80. package/package.json +38 -40
  81. package/lib/components/Select/types.d.ts +0 -25
@@ -0,0 +1,20 @@
1
+ import { View } from 'react-native';
2
+ import type { PopoverProps, PopoverTargetProps, PopoverDropdownProps } from './types';
3
+ declare const PopoverComponent: import("../../core/factory").PlatformBlocksComponent<{
4
+ props: PopoverProps;
5
+ ref: View;
6
+ }>;
7
+ declare const PopoverTarget: import("../../core/factory").PlatformBlocksComponent<{
8
+ props: PopoverTargetProps;
9
+ ref: View;
10
+ }>;
11
+ declare const PopoverDropdown: import("../../core/factory").PlatformBlocksComponent<{
12
+ props: PopoverDropdownProps;
13
+ ref: View;
14
+ }>;
15
+ type PopoverCompoundComponent = typeof PopoverComponent & {
16
+ Target: typeof PopoverTarget;
17
+ Dropdown: typeof PopoverDropdown;
18
+ };
19
+ declare const Popover: PopoverCompoundComponent;
20
+ export { Popover };
@@ -0,0 +1,2 @@
1
+ export { Popover } from './Popover';
2
+ export type { PopoverProps, PopoverTargetProps, PopoverDropdownProps } from './types';
@@ -0,0 +1,67 @@
1
+ import type { PlatformBlocksTheme } from '../../core/theme/types';
2
+ import type { RadiusValue } from '../../core/theme/radius';
3
+ import type { ShadowValue } from '../../core/theme/shadow';
4
+ interface CreateStylesParams {
5
+ radius?: RadiusValue | number;
6
+ shadow?: ShadowValue;
7
+ arrowSize: number;
8
+ }
9
+ export declare const createPopoverStyles: (theme: PlatformBlocksTheme) => (params: CreateStylesParams) => {
10
+ wrapper: {
11
+ boxShadow?: undefined;
12
+ shadowOffset?: undefined;
13
+ shadowRadius?: undefined;
14
+ shadowColor?: undefined;
15
+ shadowOpacity?: undefined;
16
+ elevation?: undefined;
17
+ position: "relative";
18
+ alignSelf: "flex-start";
19
+ overflow: "visible";
20
+ } | {
21
+ boxShadow: string;
22
+ shadowOffset?: undefined;
23
+ shadowRadius?: undefined;
24
+ shadowColor?: undefined;
25
+ shadowOpacity?: undefined;
26
+ elevation?: undefined;
27
+ position: "relative";
28
+ alignSelf: "flex-start";
29
+ overflow: "visible";
30
+ } | {
31
+ shadowOffset: {
32
+ width: number;
33
+ height: number;
34
+ };
35
+ shadowRadius: number;
36
+ shadowColor: string;
37
+ shadowOpacity: number;
38
+ elevation: number;
39
+ boxShadow?: undefined;
40
+ position: "relative";
41
+ alignSelf: "flex-start";
42
+ overflow: "visible";
43
+ };
44
+ dropdown: {
45
+ overflow: "hidden";
46
+ minWidth: number;
47
+ borderRadius: number;
48
+ borderTopLeftRadius: number;
49
+ borderTopRightRadius: number;
50
+ borderBottomLeftRadius: number;
51
+ borderBottomRightRadius: number;
52
+ backgroundColor: string;
53
+ borderColor: string;
54
+ borderWidth: number;
55
+ color: string;
56
+ };
57
+ arrow: {
58
+ position: "absolute";
59
+ width: number;
60
+ height: number;
61
+ backgroundColor: string;
62
+ transform: {
63
+ rotate: string;
64
+ }[];
65
+ };
66
+ };
67
+ export {};
@@ -0,0 +1,131 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ViewProps } from 'react-native';
3
+ import type { PlacementType, PositioningOptions } from '../../core/utils/positioning-enhanced';
4
+ import type { RadiusValue } from '../../core/theme/radius';
5
+ import type { ShadowValue } from '../../core/theme/shadow';
6
+ import type { SpacingProps } from '../../core/utils';
7
+ export type FloatingStrategy = 'absolute' | 'fixed';
8
+ export type ArrowPosition = 'center' | 'side';
9
+ export interface PopoverMiddlewares {
10
+ flip?: boolean | {
11
+ padding?: number;
12
+ };
13
+ shift?: boolean | {
14
+ padding?: number;
15
+ };
16
+ inline?: boolean;
17
+ }
18
+ export interface PopoverProps extends SpacingProps {
19
+ children: ReactNode;
20
+ /** Controlled open state */
21
+ opened?: boolean;
22
+ /** Initial open state in uncontrolled mode */
23
+ defaultOpened?: boolean;
24
+ /** Called when open state changes */
25
+ onChange?: (opened: boolean) => void;
26
+ /** Called when popover opens */
27
+ onOpen?: () => void;
28
+ /** Called when popover closes */
29
+ onClose?: () => void;
30
+ /** Called when popover is dismissed via outside click or escape */
31
+ onDismiss?: () => void;
32
+ /** Disable popover entirely */
33
+ disabled?: boolean;
34
+ /** Close when clicking outside */
35
+ closeOnClickOutside?: boolean;
36
+ /** Close when pressing Escape */
37
+ closeOnEscape?: boolean;
38
+ /** Events considered for outside click detection (web only) */
39
+ clickOutsideEvents?: string[];
40
+ /** Trap focus within dropdown (web only) */
41
+ trapFocus?: boolean;
42
+ /** Keep dropdown mounted when hidden */
43
+ keepMounted?: boolean;
44
+ /** Return focus to target after close */
45
+ returnFocus?: boolean;
46
+ /** Render dropdown within portal */
47
+ withinPortal?: boolean;
48
+ /** Render overlay/backdrop */
49
+ withOverlay?: boolean;
50
+ /** Overlay component props */
51
+ overlayProps?: Record<string, unknown>;
52
+ /** Dropdown width, number or 'target' to match target width */
53
+ width?: number | 'target';
54
+ /** Dropdown max-width */
55
+ maxWidth?: number;
56
+ /** Dropdown max-height */
57
+ maxHeight?: number;
58
+ /** Dropdown min-width */
59
+ minWidth?: number;
60
+ /** Dropdown min-height */
61
+ minHeight?: number;
62
+ /** Border radius */
63
+ radius?: RadiusValue | number;
64
+ /** Box shadow */
65
+ shadow?: ShadowValue;
66
+ /** Dropdown z-index */
67
+ zIndex?: number;
68
+ /** Popover position relative to target */
69
+ position?: PlacementType;
70
+ /** Offset from target */
71
+ offset?: number | {
72
+ mainAxis?: number;
73
+ crossAxis?: number;
74
+ };
75
+ /** Floating strategy for positioning */
76
+ floatingStrategy?: FloatingStrategy;
77
+ /** Custom positioning options */
78
+ middlewares?: PopoverMiddlewares;
79
+ /** Prevent flipping/shifting when visible */
80
+ preventPositionChangeWhenVisible?: boolean;
81
+ /** Hide dropdown when target becomes detached */
82
+ hideDetached?: boolean;
83
+ /** Override viewport padding */
84
+ viewport?: PositioningOptions['viewport'];
85
+ /** Whether positioning should avoid the on-screen keyboard */
86
+ keyboardAvoidance?: boolean;
87
+ /** Override fallback placements */
88
+ fallbackPlacements?: PlacementType[];
89
+ /** Override boundary padding */
90
+ boundary?: number;
91
+ /** Render ARIA roles */
92
+ withRoles?: boolean;
93
+ /** Unique id base for accessibility */
94
+ id?: string;
95
+ /** Render arrow */
96
+ withArrow?: boolean;
97
+ /** Arrow size */
98
+ arrowSize?: number;
99
+ /** Arrow border radius */
100
+ arrowRadius?: number;
101
+ /** Arrow offset */
102
+ arrowOffset?: number;
103
+ /** Arrow position for start/end placements */
104
+ arrowPosition?: ArrowPosition;
105
+ /** Called when dropdown position changes */
106
+ onPositionChange?: (placement: PlacementType) => void;
107
+ /** Test identifier */
108
+ testID?: string;
109
+ }
110
+ export interface PopoverTargetProps {
111
+ children: React.ReactElement;
112
+ popupType?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid';
113
+ refProp?: string;
114
+ /** Additional props merged onto target */
115
+ targetProps?: Record<string, unknown>;
116
+ }
117
+ export interface PopoverDropdownProps extends ViewProps {
118
+ children: ReactNode;
119
+ /** Whether dropdown content should trap focus (web only) */
120
+ trapFocus?: boolean;
121
+ /** Keep dropdown mounted */
122
+ keepMounted?: boolean;
123
+ }
124
+ export interface RegisteredDropdown {
125
+ content: ReactNode;
126
+ style?: PopoverDropdownProps['style'];
127
+ trapFocus: boolean;
128
+ keepMounted?: boolean;
129
+ testID?: string;
130
+ containerProps?: Omit<PopoverDropdownProps, 'children' | 'style' | 'trapFocus' | 'keepMounted' | 'testID'>;
131
+ }
@@ -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;
@@ -0,0 +1,3 @@
1
+ export { Ring } from './Ring';
2
+ export type { RingProps, RingColorStop, RingRenderContext } from './types';
3
+ export { Ring as default } from './Ring';
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ import { ViewStyle, TextStyle } from 'react-native';
3
+ import { SpacingProps } from '../../core/utils';
4
+ export interface RingColorStop {
5
+ /** Threshold (0-100) that determines when the color becomes active */
6
+ value: number;
7
+ /** Stroke color applied once the threshold is reached */
8
+ color: string;
9
+ }
10
+ export interface RingRenderContext {
11
+ /** Clamped value within the provided min/max range */
12
+ value: number;
13
+ /** Normalized percentage (0-100) for the current value */
14
+ percent: number;
15
+ /** Minimum bound used for normalization */
16
+ min: number;
17
+ /** Maximum bound used for normalization */
18
+ max: number;
19
+ }
20
+ export interface RingProps extends SpacingProps {
21
+ /** Current value represented by the ring */
22
+ value: number;
23
+ /** Lower bound for normalization. Defaults to 0. */
24
+ min?: number;
25
+ /** Upper bound for normalization. Defaults to 100. */
26
+ max?: number;
27
+ /** Diameter of the ring in pixels. Defaults to 100. */
28
+ size?: number;
29
+ /** Stroke thickness in pixels. Defaults to 12. */
30
+ thickness?: number;
31
+ /** Optional caption rendered beneath the ring */
32
+ caption?: React.ReactNode;
33
+ /** Main label rendered in the ring center */
34
+ label?: React.ReactNode;
35
+ /** Secondary label rendered below the main label */
36
+ subLabel?: React.ReactNode;
37
+ /** Displays the computed percentage when no label/subLabel is provided. Defaults to true. */
38
+ showValue?: boolean;
39
+ /** Formats the displayed value or percentage */
40
+ valueFormatter?: (value: number, percent: number) => React.ReactNode;
41
+ /** Track color behind the progress stroke */
42
+ trackColor?: string;
43
+ /** Progress stroke color or resolver */
44
+ progressColor?: string | ((value: number, percent: number) => string);
45
+ /** Optional color stops evaluated against the computed percent */
46
+ colorStops?: RingColorStop[];
47
+ /** Forces the ring into a neutral state, disabling the progress stroke */
48
+ neutral?: boolean;
49
+ /** Controls whether the progress stroke has rounded caps. Defaults to true. */
50
+ roundedCaps?: boolean;
51
+ /** Container style for the outer wrapper */
52
+ style?: ViewStyle;
53
+ /** Style applied to the ring wrapper */
54
+ ringStyle?: ViewStyle;
55
+ /** Style applied to the center content container */
56
+ contentStyle?: ViewStyle;
57
+ /** Style overrides for the main label */
58
+ labelStyle?: TextStyle;
59
+ /** Style overrides for the secondary label */
60
+ subLabelStyle?: TextStyle;
61
+ /** Style overrides for the caption */
62
+ captionStyle?: TextStyle;
63
+ /** Color override for the main label */
64
+ labelColor?: string;
65
+ /** Color override for the secondary label */
66
+ subLabelColor?: string;
67
+ /** Color override for the caption */
68
+ captionColor?: string;
69
+ /** Custom center content. Receives value info when passed as a function */
70
+ children?: React.ReactNode | ((context: RingRenderContext) => React.ReactNode);
71
+ /** Test identifier for end-to-end tests */
72
+ testID?: string;
73
+ /** Accessibility label describing the ring */
74
+ accessibilityLabel?: string;
75
+ }
@@ -37,7 +37,7 @@ export interface SegmentedControlProps extends SpacingProps, LayoutProps, Border
37
37
  disabled?: boolean;
38
38
  /** Prevent user interaction but keep visual state */
39
39
  readOnly?: boolean;
40
- /** Adjust text color automatically for filled variant */
40
+ /** Adjust text color automatically for filled/outline variants */
41
41
  autoContrast?: boolean;
42
42
  /** Render dividers between items */
43
43
  withItemsBorders?: boolean;
@@ -48,7 +48,7 @@ export interface SegmentedControlProps extends SpacingProps, LayoutProps, Border
48
48
  /** Optional radio group name hint */
49
49
  name?: string;
50
50
  /** Visual style variant */
51
- variant?: 'default' | 'filled';
51
+ variant?: 'default' | 'filled' | 'outline' | 'ghost';
52
52
  /** Custom style for indicator */
53
53
  indicatorStyle?: ViewStyle;
54
54
  /** Custom style applied to every item */
@@ -59,4 +59,10 @@ export interface SegmentedControlProps extends SpacingProps, LayoutProps, Border
59
59
  testID?: string;
60
60
  /** Accessibility label for the entire control */
61
61
  accessibilityLabel?: string;
62
+ /** Optional label rendered alongside the control */
63
+ label?: ReactNode;
64
+ /** Supplementary description text rendered with the label */
65
+ description?: ReactNode;
66
+ /** Placement of the label relative to the control */
67
+ labelPosition?: 'left' | 'right' | 'top' | 'bottom';
62
68
  }
@@ -3,4 +3,3 @@ export declare const Select: import("../../core/factory/factory").PlatformBlocks
3
3
  props: SelectProps;
4
4
  ref: any;
5
5
  }>;
6
- export default Select;
@@ -1,31 +1,64 @@
1
1
  import React from 'react';
2
2
  import { SizeValue } from '../../core/theme/sizes';
3
3
  import { LayoutProps, SpacingProps } from '../../core/utils';
4
+ /**
5
+ * Represents a single option exposed by the Select component.
6
+ */
4
7
  export interface SelectOption<T = any> {
8
+ /** Human-readable text displayed for the option. */
5
9
  label: string;
10
+ /** Value returned when the option is chosen. */
6
11
  value: T;
12
+ /** When true, the option renders but cannot be selected. */
7
13
  disabled?: boolean;
8
14
  }
15
+ /**
16
+ * Props accepted by the Select component. Inherits spacing and layout helpers
17
+ * for consistency with other inputs.
18
+ */
9
19
  export interface SelectProps<T = any> extends SpacingProps, LayoutProps {
20
+ /** Current value when the component is controlled. */
10
21
  value?: T | null;
22
+ /** Initial value when the component manages its own state. */
11
23
  defaultValue?: T | null;
24
+ /** Callback fired whenever the selection changes. */
12
25
  onChange?: (value: T | null, option?: SelectOption<T> | null) => void;
26
+ /** Collection of options available to choose from. */
13
27
  options: SelectOption<T>[];
28
+ /** Placeholder text shown when no value is selected. */
14
29
  placeholder?: string;
30
+ /** Size token controlling trigger height and typography. */
15
31
  size?: SizeValue;
32
+ /** Corner radius token applied to the trigger and dropdown. */
16
33
  radius?: any;
34
+ /** Disables the control when set to true. */
17
35
  disabled?: boolean;
36
+ /** Optional label rendered above the trigger. */
18
37
  label?: string;
19
38
  /** Optional short descriptive text shown directly under the label (above the field). */
20
39
  description?: string;
40
+ /** Helper copy displayed beneath the control. */
21
41
  helperText?: string;
42
+ /** Error message shown beneath the control in error state. */
22
43
  error?: string;
44
+ /** Enables client-side filtering of options. */
23
45
  searchable?: boolean;
46
+ /** Custom renderer for an individual option row. */
24
47
  renderOption?: (opt: SelectOption<T>, active: boolean, selected: boolean) => React.ReactNode;
48
+ /** Stretches the trigger to occupy the full width of its container. */
25
49
  fullWidth?: boolean;
50
+ /** Maximum height the dropdown may reach before it scrolls. */
26
51
  maxHeight?: number;
52
+ /** Whether the dropdown should close immediately after selection. */
27
53
  closeOnSelect?: boolean;
54
+ /** Allows the user to clear the current selection. */
28
55
  clearable?: boolean;
56
+ /** Accessible label announced for the clear button when present. */
29
57
  clearButtonLabel?: string;
58
+ /** Handler invoked after the selection is cleared. */
30
59
  onClear?: () => void;
60
+ /** Controls whether the trigger regains focus after selecting an option. */
61
+ refocusAfterSelect?: boolean;
62
+ /** Whether dropdown positioning should avoid the on-screen keyboard. */
63
+ keyboardAvoidance?: boolean;
31
64
  }
@@ -3,6 +3,7 @@ import { type TextProps } from '../Text';
3
3
  type ShimmerDirection = 'ltr' | 'rtl';
4
4
  export interface ShimmerTextProps extends Omit<TextProps, 'children' | 'color' | 'onLayout'> {
5
5
  children?: React.ReactNode;
6
+ /** Text to render with shimmer effect */
6
7
  text?: string;
7
8
  /** Base text color rendered underneath the shimmer */
8
9
  color?: string;
@@ -4,7 +4,7 @@
4
4
  * This hook bypasses the SpotlightProvider context and uses the global state directly.
5
5
  * This should be used in the GlobalSpotlight component to avoid provider re-mounting issues.
6
6
  */
7
- import { SpotlightState } from './SpotlightStore';
7
+ import type { SpotlightState } from './SpotlightStore';
8
8
  interface GlobalSpotlightState {
9
9
  opened: boolean;
10
10
  query: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { SpotlightProps, SpotlightRootProps, SpotlightSearchProps, SpotlightActionsListProps, SpotlightActionProps, SpotlightActionsGroupProps, SpotlightEmptyProps } from './types';
3
3
  declare function SpotlightRoot({ query, onQueryChange, children, opened, onClose, shortcut, style, }: SpotlightRootProps): React.JSX.Element;
4
- declare function SpotlightSearch({ value, onChangeText, leftSection, placeholder, onNavigateUp, onNavigateDown, onSelectAction, onClose, ...props }: SpotlightSearchProps): React.JSX.Element;
4
+ declare function SpotlightSearch({ value, onChangeText, leftSection, placeholder, onNavigateUp, onNavigateDown, onSelectAction, onClose, autoFocus, inputRef: forwardedRef, ...props }: SpotlightSearchProps): React.JSX.Element;
5
5
  declare function SpotlightActionsList({ children, scrollable, maxHeight, style, scrollRef, onScrollChange, }: SpotlightActionsListProps): React.JSX.Element;
6
- declare function SpotlightAction({ label, description, leftSection, rightSection, onPress, disabled, selected, children, style, innerRef, }: SpotlightActionProps): React.JSX.Element;
6
+ declare function SpotlightAction({ label, description, leftSection, rightSection, onPress, disabled, selected, children, style, innerRef, highlightQuery, }: SpotlightActionProps): React.JSX.Element;
7
7
  declare function SpotlightActionsGroup({ label, children, style, }: SpotlightActionsGroupProps): React.JSX.Element;
8
8
  declare function SpotlightEmpty({ children, style }: SpotlightEmptyProps): React.JSX.Element;
9
9
  export declare function Spotlight({ actions, nothingFound, highlightQuery, limit, scrollable, maxHeight, // Remove default - let it be calculated dynamically
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
+ import type { HighlightProps as HighlightComponentProps } from '../Highlight';
2
3
  interface SpotlightControllerProps {
3
4
  config?: {
4
5
  shortcut?: string | string[] | null;
5
6
  actions?: any[];
6
7
  alwaysMount?: boolean;
7
- highlightQuery?: boolean;
8
+ highlightQuery?: boolean | HighlightComponentProps['highlight'];
8
9
  limit?: number;
9
10
  placeholder?: string;
10
11
  };
@@ -1,10 +1,11 @@
1
- import { ViewStyle } from 'react-native';
1
+ import type { ViewStyle, TextInput } from 'react-native';
2
2
  import React from 'react';
3
3
  import { SpotlightItem } from './SpotlightTypes';
4
+ import type { HighlightProps as HighlightComponentProps } from '../Highlight';
4
5
  export interface SpotlightProps {
5
6
  actions: SpotlightItem[];
6
7
  nothingFound?: string;
7
- highlightQuery?: boolean;
8
+ highlightQuery?: boolean | HighlightComponentProps['highlight'];
8
9
  limit?: number;
9
10
  scrollable?: boolean;
10
11
  maxHeight?: number;
@@ -33,6 +34,8 @@ export interface SpotlightSearchProps {
33
34
  onNavigateDown?: () => void;
34
35
  onSelectAction?: () => void;
35
36
  onClose?: () => void;
37
+ autoFocus?: boolean;
38
+ inputRef?: React.RefObject<TextInput | null>;
36
39
  }
37
40
  export interface SpotlightActionsListProps {
38
41
  children: React.ReactNode;
@@ -54,6 +57,7 @@ export interface SpotlightActionProps {
54
57
  style?: ViewStyle;
55
58
  innerRef?: any;
56
59
  onLayout?: (e: any) => void;
60
+ highlightQuery?: HighlightComponentProps['highlight'];
57
61
  }
58
62
  export interface SpotlightActionsGroupProps {
59
63
  label: string;
@@ -1,4 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
+ import type { ComponentSizeValue } from '../../core/theme/componentSize';
3
+ export interface StepperMetrics {
4
+ iconSize: number;
5
+ fontSize: number;
6
+ spacing: number;
7
+ descriptionFontSize: number;
8
+ }
2
9
  export interface StepperStepProps {
3
10
  /** Step content */
4
11
  children?: ReactNode;
@@ -37,7 +44,7 @@ export interface StepperProps {
37
44
  /** Icon size */
38
45
  iconSize?: number;
39
46
  /** Component size */
40
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
47
+ size?: ComponentSizeValue;
41
48
  /** Component color */
42
49
  color?: string;
43
50
  /** Icon to display when step is completed */
@@ -61,7 +68,8 @@ export interface StepperContextValue {
61
68
  orientation: 'horizontal' | 'vertical';
62
69
  iconPosition: 'left' | 'right';
63
70
  iconSize: number;
64
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
71
+ size: ComponentSizeValue;
72
+ metrics: StepperMetrics;
65
73
  color: string;
66
74
  completedIcon?: ReactNode;
67
75
  allowNextStepsSelect: boolean;
@@ -56,40 +56,10 @@ export declare const useTextAreaStyles: (props: TextAreaProps & {
56
56
  textInput: any;
57
57
  };
58
58
  getSizeStyles: (size: SizeValue, rows?: number) => {
59
- fontSize: 12;
60
- padding: 4;
59
+ fontSize: number;
60
+ padding: number;
61
61
  minHeight: number;
62
- lineHeight: 16;
63
- } | {
64
- fontSize: 14;
65
- padding: 8;
66
- minHeight: number;
67
- lineHeight: 20;
68
- } | {
69
- fontSize: 16;
70
- padding: 12;
71
- minHeight: number;
72
- lineHeight: 24;
73
- } | {
74
- fontSize: 18;
75
- padding: 16;
76
- minHeight: number;
77
- lineHeight: 28;
78
- } | {
79
- fontSize: 20;
80
- padding: 20;
81
- minHeight: number;
82
- lineHeight: 32;
83
- } | {
84
- fontSize: 24;
85
- padding: 24;
86
- minHeight: number;
87
- lineHeight: 36;
88
- } | {
89
- fontSize: 30;
90
- padding: 32;
91
- minHeight: number;
92
- lineHeight: 42;
62
+ lineHeight: number;
93
63
  };
94
64
  };
95
65
  export {};
@@ -1,5 +1,6 @@
1
1
  import { TextInputProps } from 'react-native';
2
2
  import { BaseInputProps } from '../Input/types';
3
+ import { SizeValue } from '../../core/theme/types';
3
4
  export interface TextAreaProps extends BaseInputProps {
4
5
  /** Default value for uncontrolled mode */
5
6
  defaultValue?: string;
@@ -23,7 +24,7 @@ export interface TextAreaProps extends BaseInputProps {
23
24
  textInputProps?: Omit<TextInputProps, keyof BaseInputProps>;
24
25
  }
25
26
  export interface TextAreaStyleProps {
26
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
27
+ size: SizeValue;
27
28
  focused?: boolean;
28
29
  disabled?: boolean;
29
30
  error?: boolean;
@@ -1,3 +1 @@
1
- import React from 'react';
2
- import type { TimePickerProps } from './types';
3
- export declare const TimePicker: React.FC<TimePickerProps>;
1
+ export { TimePickerInput as TimePicker } from '../TimePickerInput/TimePickerInput';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { TimePickerInputProps } from './types';
3
+ export declare const TimePickerInput: React.FC<TimePickerInputProps>;
@@ -1,2 +1,2 @@
1
- export { TimePicker as TimePickerInput } from '../TimePicker/TimePicker';
2
- export type { TimePickerProps as TimePickerInputProps } from '../TimePicker/types';
1
+ export { TimePickerInput } from './TimePickerInput';
2
+ export type { TimePickerInputProps, TimePickerValue } from './types';
@@ -0,0 +1,3 @@
1
+ import type { TimePickerProps, TimePickerValue } from '../TimePicker/types';
2
+ export type TimePickerInputProps = TimePickerProps;
3
+ export type { TimePickerValue };
@@ -1,5 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ViewProps } from 'react-native';
3
+ import { type ComponentSizeValue } from '../../core/theme/componentSize';
4
+ export interface TimelineSizeMetrics {
5
+ bulletSize: number;
6
+ lineWidth: number;
7
+ fontSize: number;
8
+ spacing: number;
9
+ }
3
10
  export interface TimelineItemProps extends Omit<ViewProps, 'children'> {
4
11
  /** Item content */
5
12
  children?: ReactNode;
@@ -36,7 +43,7 @@ export interface TimelineProps extends Omit<ViewProps, 'children'> {
36
43
  /** Reverse active highlighting */
37
44
  reverseActive?: boolean;
38
45
  /** Component size */
39
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
46
+ size?: ComponentSizeValue;
40
47
  /** Center mode renders a single central spine allowing items on both sides via itemAlign prop */
41
48
  centerMode?: boolean;
42
49
  }
@@ -47,7 +54,8 @@ export interface TimelineContextValue {
47
54
  bulletSize: number;
48
55
  align: 'left' | 'right';
49
56
  reverseActive: boolean;
50
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
57
+ size: ComponentSizeValue;
58
+ metrics: TimelineSizeMetrics;
51
59
  /** Whether layout is split with centered vertical line */
52
60
  centerMode?: boolean;
53
61
  }
@@ -69,6 +69,8 @@ export interface ToastProps extends SpacingProps, BorderRadiusProps {
69
69
  maxWidth?: number;
70
70
  /** Persist toast until manually dismissed */
71
71
  persistent?: boolean;
72
+ /** Keep toast mounted in the tree when hidden */
73
+ keepMounted?: boolean;
72
74
  /** Animation configuration */
73
75
  animationConfig?: ToastAnimationConfig;
74
76
  /** Swipe to dismiss configuration */