@sparrowengg/twigs-mobile 0.1.0 → 0.1.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.
Files changed (167) hide show
  1. package/README.md +12 -1
  2. package/lib/commonjs/alert/helpers.js +1 -1
  3. package/lib/commonjs/avatar/avatar-group.js +1 -1
  4. package/lib/commonjs/avatar/avatar.js +1 -1
  5. package/lib/commonjs/bottom-sheet/bottom-sheet-header.js +1 -1
  6. package/lib/commonjs/dropdown/constants.js +1 -0
  7. package/lib/commonjs/dropdown/dropdown-context.js +1 -0
  8. package/lib/commonjs/dropdown/dropdown-menu-content.js +1 -0
  9. package/lib/commonjs/dropdown/dropdown-menu-item.js +1 -0
  10. package/lib/commonjs/dropdown/dropdown-menu-label.js +1 -0
  11. package/lib/commonjs/dropdown/dropdown-menu-separator.js +1 -0
  12. package/lib/commonjs/dropdown/dropdown-menu-trigger.js +1 -0
  13. package/lib/commonjs/dropdown/dropdown-menu.js +1 -0
  14. package/lib/commonjs/dropdown/helpers.js +1 -0
  15. package/lib/commonjs/dropdown/index.js +1 -0
  16. package/lib/commonjs/dropdown/styles.js +1 -0
  17. package/lib/commonjs/dropdown/types.js +1 -0
  18. package/lib/commonjs/flex/flex.js +1 -1
  19. package/lib/commonjs/index.js +1 -1
  20. package/lib/commonjs/loader/circle-loader.js +1 -1
  21. package/lib/commonjs/loader/line-loader.js +1 -1
  22. package/lib/commonjs/modal/helpers.js +1 -1
  23. package/lib/commonjs/stepper/constants.js +1 -0
  24. package/lib/commonjs/stepper/helpers.js +1 -0
  25. package/lib/commonjs/stepper/icons.js +1 -0
  26. package/lib/commonjs/stepper/index.js +1 -0
  27. package/lib/commonjs/stepper/stepper-connector.js +1 -0
  28. package/lib/commonjs/stepper/stepper-context.js +1 -0
  29. package/lib/commonjs/stepper/stepper-item.js +1 -0
  30. package/lib/commonjs/stepper/stepper-trigger.js +1 -0
  31. package/lib/commonjs/stepper/stepper.js +1 -0
  32. package/lib/commonjs/stepper/styles.js +1 -0
  33. package/lib/commonjs/stepper/types.js +1 -0
  34. package/lib/commonjs/tabs/constants.js +1 -0
  35. package/lib/commonjs/tabs/helpers.js +1 -0
  36. package/lib/commonjs/tabs/index.js +1 -0
  37. package/lib/commonjs/tabs/styles.js +1 -0
  38. package/lib/commonjs/tabs/tabs-content.js +1 -0
  39. package/lib/commonjs/tabs/tabs-context.js +1 -0
  40. package/lib/commonjs/tabs/tabs-list.js +1 -0
  41. package/lib/commonjs/tabs/tabs-trigger.js +1 -0
  42. package/lib/commonjs/tabs/tabs.js +1 -0
  43. package/lib/commonjs/tabs/types.js +1 -0
  44. package/lib/commonjs/text/constants.js +1 -0
  45. package/lib/commonjs/text/helpers.js +1 -0
  46. package/lib/commonjs/text/text.js +1 -1
  47. package/lib/commonjs/text-area/constants.js +1 -0
  48. package/lib/commonjs/text-area/index.js +1 -0
  49. package/lib/commonjs/text-area/styles.js +1 -0
  50. package/lib/commonjs/text-area/text-area.js +1 -0
  51. package/lib/commonjs/text-area/types.js +1 -0
  52. package/lib/commonjs/text-input/constants.js +1 -1
  53. package/lib/commonjs/text-input/styles.js +1 -1
  54. package/lib/commonjs/text-input/text-input.js +1 -1
  55. package/lib/commonjs/toast/helpers.js +1 -1
  56. package/lib/commonjs/toast/toast-item.js +1 -1
  57. package/lib/commonjs/tooltip/tooltip.js +1 -1
  58. package/lib/commonjs/utils/index.js +1 -1
  59. package/lib/module/alert/helpers.js +1 -1
  60. package/lib/module/avatar/avatar-group.js +1 -1
  61. package/lib/module/avatar/avatar.js +1 -1
  62. package/lib/module/bottom-sheet/bottom-sheet-header.js +1 -1
  63. package/lib/module/dropdown/constants.js +1 -0
  64. package/lib/module/dropdown/dropdown-context.js +1 -0
  65. package/lib/module/dropdown/dropdown-menu-content.js +1 -0
  66. package/lib/module/dropdown/dropdown-menu-item.js +1 -0
  67. package/lib/module/dropdown/dropdown-menu-label.js +1 -0
  68. package/lib/module/dropdown/dropdown-menu-separator.js +1 -0
  69. package/lib/module/dropdown/dropdown-menu-trigger.js +1 -0
  70. package/lib/module/dropdown/dropdown-menu.js +1 -0
  71. package/lib/module/dropdown/helpers.js +1 -0
  72. package/lib/module/dropdown/index.js +1 -0
  73. package/lib/module/dropdown/styles.js +1 -0
  74. package/lib/module/dropdown/types.js +1 -0
  75. package/lib/module/flex/flex.js +1 -1
  76. package/lib/module/index.js +1 -1
  77. package/lib/module/loader/circle-loader.js +1 -1
  78. package/lib/module/loader/line-loader.js +1 -1
  79. package/lib/module/modal/helpers.js +1 -1
  80. package/lib/module/stepper/constants.js +1 -0
  81. package/lib/module/stepper/helpers.js +1 -0
  82. package/lib/module/stepper/icons.js +1 -0
  83. package/lib/module/stepper/index.js +1 -0
  84. package/lib/module/stepper/stepper-connector.js +1 -0
  85. package/lib/module/stepper/stepper-context.js +1 -0
  86. package/lib/module/stepper/stepper-item.js +1 -0
  87. package/lib/module/stepper/stepper-trigger.js +1 -0
  88. package/lib/module/stepper/stepper.js +1 -0
  89. package/lib/module/stepper/styles.js +1 -0
  90. package/lib/module/stepper/types.js +1 -0
  91. package/lib/module/tabs/constants.js +1 -0
  92. package/lib/module/tabs/helpers.js +1 -0
  93. package/lib/module/tabs/index.js +1 -0
  94. package/lib/module/tabs/styles.js +1 -0
  95. package/lib/module/tabs/tabs-content.js +1 -0
  96. package/lib/module/tabs/tabs-context.js +1 -0
  97. package/lib/module/tabs/tabs-list.js +1 -0
  98. package/lib/module/tabs/tabs-trigger.js +1 -0
  99. package/lib/module/tabs/tabs.js +1 -0
  100. package/lib/module/tabs/types.js +1 -0
  101. package/lib/module/text/constants.js +1 -0
  102. package/lib/module/text/helpers.js +1 -0
  103. package/lib/module/text/text.js +1 -1
  104. package/lib/module/text-area/constants.js +1 -0
  105. package/lib/module/text-area/index.js +1 -0
  106. package/lib/module/text-area/styles.js +1 -0
  107. package/lib/module/text-area/text-area.js +1 -0
  108. package/lib/module/text-area/types.js +1 -0
  109. package/lib/module/text-input/constants.js +1 -1
  110. package/lib/module/text-input/styles.js +1 -1
  111. package/lib/module/text-input/text-input.js +1 -1
  112. package/lib/module/toast/helpers.js +1 -1
  113. package/lib/module/toast/toast-item.js +1 -1
  114. package/lib/module/tooltip/tooltip.js +1 -1
  115. package/lib/module/utils/index.js +1 -1
  116. package/lib/typescript/dropdown/constants.d.ts +23 -0
  117. package/lib/typescript/dropdown/dropdown-context.d.ts +18 -0
  118. package/lib/typescript/dropdown/dropdown-menu-content.d.ts +6 -0
  119. package/lib/typescript/dropdown/dropdown-menu-item.d.ts +5 -0
  120. package/lib/typescript/dropdown/dropdown-menu-label.d.ts +6 -0
  121. package/lib/typescript/dropdown/dropdown-menu-separator.d.ts +6 -0
  122. package/lib/typescript/dropdown/dropdown-menu-trigger.d.ts +6 -0
  123. package/lib/typescript/dropdown/dropdown-menu.d.ts +5 -0
  124. package/lib/typescript/dropdown/helpers.d.ts +11 -0
  125. package/lib/typescript/dropdown/index.d.ts +8 -0
  126. package/lib/typescript/dropdown/styles.d.ts +32 -0
  127. package/lib/typescript/dropdown/types.d.ts +54 -0
  128. package/lib/typescript/index.d.ts +8 -0
  129. package/lib/typescript/modal/types.d.ts +0 -2
  130. package/lib/typescript/separator/types.d.ts +0 -4
  131. package/lib/typescript/stepper/constants.d.ts +23 -0
  132. package/lib/typescript/stepper/helpers.d.ts +10 -0
  133. package/lib/typescript/stepper/icons.d.ts +8 -0
  134. package/lib/typescript/stepper/index.d.ts +5 -0
  135. package/lib/typescript/stepper/stepper-connector.d.ts +3 -0
  136. package/lib/typescript/stepper/stepper-context.d.ts +12 -0
  137. package/lib/typescript/stepper/stepper-item.d.ts +6 -0
  138. package/lib/typescript/stepper/stepper-trigger.d.ts +14 -0
  139. package/lib/typescript/stepper/stepper.d.ts +6 -0
  140. package/lib/typescript/stepper/styles.d.ts +51 -0
  141. package/lib/typescript/stepper/types.d.ts +25 -0
  142. package/lib/typescript/switch/types.d.ts +8 -2
  143. package/lib/typescript/tabs/constants.d.ts +18 -0
  144. package/lib/typescript/tabs/helpers.d.ts +13 -0
  145. package/lib/typescript/tabs/index.d.ts +6 -0
  146. package/lib/typescript/tabs/styles.d.ts +39 -0
  147. package/lib/typescript/tabs/tabs-content.d.ts +6 -0
  148. package/lib/typescript/tabs/tabs-context.d.ts +23 -0
  149. package/lib/typescript/tabs/tabs-list.d.ts +6 -0
  150. package/lib/typescript/tabs/tabs-trigger.d.ts +5 -0
  151. package/lib/typescript/tabs/tabs.d.ts +6 -0
  152. package/lib/typescript/tabs/types.d.ts +43 -0
  153. package/lib/typescript/text/constants.d.ts +2 -0
  154. package/lib/typescript/text/helpers.d.ts +10 -0
  155. package/lib/typescript/text/types.d.ts +12 -0
  156. package/lib/typescript/text-area/constants.d.ts +24 -0
  157. package/lib/typescript/text-area/index.d.ts +3 -0
  158. package/lib/typescript/text-area/styles.d.ts +37 -0
  159. package/lib/typescript/text-area/text-area.d.ts +6 -0
  160. package/lib/typescript/text-area/types.d.ts +37 -0
  161. package/lib/typescript/text-input/constants.d.ts +15 -2
  162. package/lib/typescript/text-input/styles.d.ts +20 -34
  163. package/lib/typescript/text-input/text-input.d.ts +1 -1
  164. package/lib/typescript/text-input/types.d.ts +22 -41
  165. package/lib/typescript/toast/toast-content.d.ts +1 -1
  166. package/lib/typescript/utils/index.d.ts +7 -0
  167. package/package.json +3 -2
@@ -0,0 +1,32 @@
1
+ export declare const styles: {
2
+ overlay: {
3
+ zIndex: number;
4
+ position: "absolute";
5
+ left: 0;
6
+ right: 0;
7
+ top: 0;
8
+ bottom: 0;
9
+ };
10
+ backdropPressable: {
11
+ position: "absolute";
12
+ left: 0;
13
+ right: 0;
14
+ top: 0;
15
+ bottom: 0;
16
+ };
17
+ contentWrapper: {
18
+ position: "absolute";
19
+ };
20
+ item: {
21
+ flexDirection: "row";
22
+ alignItems: "center";
23
+ gap: number;
24
+ };
25
+ itemTextContainer: {
26
+ flex: number;
27
+ };
28
+ label: {
29
+ justifyContent: "center";
30
+ };
31
+ };
32
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,54 @@
1
+ import type { ReactNode, ReactElement } from 'react';
2
+ import type { ViewProps, PressableProps } from 'react-native';
3
+ import type { CommonStyleProps, BaseAccessibilityProps } from '../utils';
4
+ /** Size variant for dropdown menu items. */
5
+ export type DropdownMenuSize = 'md' | 'lg';
6
+ /** Props for the root DropdownMenu compound component. */
7
+ export interface DropdownMenuProps {
8
+ /** Size variant applied to all menu items. */
9
+ size?: DropdownMenuSize;
10
+ /** Controlled open state. */
11
+ open?: boolean;
12
+ /** Default open state (uncontrolled). */
13
+ defaultOpen?: boolean;
14
+ /** Called when the open state changes. */
15
+ onOpenChange?: (open: boolean) => void;
16
+ /** Children (Trigger + Content). */
17
+ children: ReactNode;
18
+ }
19
+ /** Props for the dropdown trigger wrapper. */
20
+ export interface DropdownMenuTriggerProps extends Omit<PressableProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
21
+ /** Content to render as the trigger. */
22
+ children: ReactNode;
23
+ }
24
+ /** Props for the dropdown content container. */
25
+ export interface DropdownMenuContentProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
26
+ /** Menu items, labels, and separators. */
27
+ children: ReactNode;
28
+ }
29
+ /** Props for an individual dropdown menu item. */
30
+ export interface DropdownMenuItemProps extends Omit<PressableProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
31
+ /** Item label text or custom content. */
32
+ children: ReactNode;
33
+ /** Whether this item is disabled. */
34
+ disabled?: boolean;
35
+ /** Called when the item is selected (pressed). */
36
+ onSelect?: () => void;
37
+ /** Icon rendered before the label. */
38
+ leftElement?: ReactElement;
39
+ /** Icon rendered after the label. */
40
+ rightElement?: ReactElement;
41
+ /** String value for accessibility (used as accessibilityLabel fallback). */
42
+ textValue?: string;
43
+ }
44
+ /** Props for a dropdown menu section label. */
45
+ export interface DropdownMenuLabelProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
46
+ /** Label text or custom content. */
47
+ children: ReactNode;
48
+ }
49
+ /** Props for a dropdown menu separator. */
50
+ export interface DropdownMenuSeparatorProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
51
+ /** Custom separator color. */
52
+ color?: string;
53
+ }
54
+ //# sourceMappingURL=types.d.ts.map
@@ -16,6 +16,8 @@ export { IconButton } from './icon-button';
16
16
  export type { IconButtonProps, IconButtonSize, IconButtonColor, IconButtonVariant, IconButtonRounded, } from './icon-button';
17
17
  export { Chip } from './chip';
18
18
  export type { ChipProps, ChipSize, ChipColor, ChipRounded } from './chip';
19
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, } from './dropdown';
20
+ export type { DropdownMenuProps, DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuSize, } from './dropdown';
19
21
  export { Checkbox } from './checkbox';
20
22
  export type { CheckboxProps, CheckboxSize, CheckedState } from './checkbox';
21
23
  export { Flex } from './flex';
@@ -28,6 +30,10 @@ export { SegmentedButton } from './segmented-button';
28
30
  export type { SegmentedButtonProps, SegmentedButtonOption, SegmentedButtonRounded, } from './segmented-button';
29
31
  export { Separator } from './separator';
30
32
  export type { SeparatorProps, SeparatorOrientation } from './separator';
33
+ export { Stepper, StepperItem, StepperConnector } from './stepper';
34
+ export type { StepperProps, StepperItemProps } from './stepper';
35
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs';
36
+ export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsVariant, } from './tabs';
31
37
  export { Switch } from './switch';
32
38
  export type { SwitchProps, SwitchSize, SwitchColor } from './switch';
33
39
  export { Tooltip } from './tooltip';
@@ -36,6 +42,8 @@ export { Text } from './text';
36
42
  export type { TextProps } from './text';
37
43
  export { ToastProvider, toast, useToast } from './toast';
38
44
  export type { ToastOptions, ToastProviderProps, ToastVariant, ToastPosition, ToastState, ToastContextType, ToastItemProps, UseToastReturn, } from './toast';
45
+ export { TextArea } from './text-area';
46
+ export type { TextAreaProps, TextAreaSize, TextAreaVariant } from './text-area';
39
47
  export { TextInput } from './text-input';
40
48
  export type { TextInputProps, TextInputSize, TextInputVariant } from './text-input';
41
49
  export { BottomSheet, BottomSheetModal, BottomSheetHeader, BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetVirtualizedList, BottomSheetTextInput, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetFooterContainer, BottomSheetModalProvider, BottomSheetDraggableView, useBottomSheet, useBottomSheetModal, useBottomSheetSpringConfigs, useBottomSheetTimingConfigs, useBottomSheetInternal, useBottomSheetModalInternal, useScrollEventsHandlersDefault, useGestureEventsHandlersDefault, useBottomSheetGestureHandlers, useScrollHandler, useScrollableSetter, useBottomSheetScrollableCreator, createBottomSheetScrollableComponent, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, enableLogging, } from './bottom-sheet';
@@ -20,8 +20,6 @@ export interface ModalProps extends BaseAccessibilityProps {
20
20
  animationType?: ModalAnimationType;
21
21
  /** Modal content — typically a ModalContent with sub-components */
22
22
  children: ReactNode;
23
- /** Test ID for the overlay container */
24
- testID?: string;
25
23
  }
26
24
  /**
27
25
  * Props for the ModalContent component.
@@ -17,9 +17,5 @@ export interface SeparatorProps extends MarginProps, CommonStyleProps, BaseAcces
17
17
  * @default false
18
18
  */
19
19
  decorative?: boolean;
20
- /**
21
- * Test ID for testing purposes.
22
- */
23
- testID?: string;
24
20
  }
25
21
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,23 @@
1
+ /** Step counter circle dimensions. */
2
+ export declare const COUNTER_SIZE = 20;
3
+ export declare const COUNTER_BORDER_WIDTH = 1.5;
4
+ export declare const COUNTER_BORDER_RADIUS = 999;
5
+ /** Tick icon dimensions inside completed counter. */
6
+ export declare const TICK_ICON_SIZE = 11;
7
+ export declare const TICK_STROKE_WIDTH = 1.5;
8
+ /** Step item layout. */
9
+ export declare const ITEM_HEIGHT = 48;
10
+ export declare const ITEM_PADDING_HORIZONTAL = 8;
11
+ export declare const ITEM_GAP = 8;
12
+ /** Container layout. */
13
+ export declare const CONTAINER_PADDING_HORIZONTAL = 24;
14
+ export declare const CONTAINER_GAP = 16;
15
+ /** Connector dimensions. */
16
+ export declare const CONNECTOR_WIDTH = 24;
17
+ /** Active underline dimensions. */
18
+ export declare const UNDERLINE_HEIGHT = 1;
19
+ export declare const ACTIVE_UNDERLINE_HEIGHT = 2;
20
+ /** Typography. */
21
+ export declare const STEP_FONT_SIZE = 14;
22
+ export declare const STEP_LETTER_SPACING = 0.028;
23
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { ViewStyle, TextStyle } from 'react-native';
2
+ import type { TwigsTheme } from '../theme';
3
+ export type StepState = 'active' | 'completed' | 'inactive' | 'disabled';
4
+ export declare function getStepState(stepIndex: number, activeStep: number, allowClick: boolean): StepState;
5
+ export declare function getCounterStyles(theme: TwigsTheme, state: StepState): ViewStyle;
6
+ export declare function getCounterTextStyles(theme: TwigsTheme, state: StepState): TextStyle;
7
+ export declare function getLabelTextStyles(theme: TwigsTheme, state: StepState): TextStyle;
8
+ export declare function getContainerStyles(theme: TwigsTheme): ViewStyle;
9
+ export declare function getUnderlineStyles(theme: TwigsTheme): ViewStyle;
10
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const TickIcon: React.FC<{
3
+ color: string;
4
+ }>;
5
+ export declare const ArrowConnectorIcon: React.FC<{
6
+ color: string;
7
+ }>;
8
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1,5 @@
1
+ export { Stepper } from './stepper';
2
+ export { StepperItem } from './stepper-item';
3
+ export { StepperConnector } from './stepper-connector';
4
+ export type { StepperProps, StepperItemProps } from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const StepperConnector: React.FC;
3
+ //# sourceMappingURL=stepper-connector.d.ts.map
@@ -0,0 +1,12 @@
1
+ export interface StepperContextValue {
2
+ /** Index of the currently active step. */
3
+ activeStep: number;
4
+ /** Total number of steps. */
5
+ totalSteps: number;
6
+ /** Called when a step trigger is pressed. */
7
+ onStepPress: (step: number) => void;
8
+ }
9
+ declare const StepperContext: import("react").Context<StepperContextValue | null>;
10
+ export declare function useStepperContext(): StepperContextValue;
11
+ export { StepperContext };
12
+ //# sourceMappingURL=stepper-context.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { View } from 'react-native';
3
+ import type { StepperItemProps } from './types';
4
+ /** StepperItem is a declarative child — it does not render itself directly. */
5
+ export declare const StepperItem: React.ForwardRefExoticComponent<StepperItemProps & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=stepper-item.d.ts.map
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type StepState } from './helpers';
3
+ interface StepTriggerProps {
4
+ index: number;
5
+ label: string;
6
+ state: StepState;
7
+ isCompleted: boolean;
8
+ allowClick: boolean;
9
+ onPress: (step: number) => void;
10
+ onTriggerLayout?: (index: number, x: number, width: number) => void;
11
+ }
12
+ export declare const StepTrigger: React.FC<StepTriggerProps>;
13
+ export {};
14
+ //# sourceMappingURL=stepper-trigger.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { StepperProps } from './types';
4
+ /** Root Stepper component. Renders a trigger bar with step items and active content. */
5
+ export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=stepper.d.ts.map
@@ -0,0 +1,51 @@
1
+ export declare const styles: {
2
+ root: {
3
+ flexDirection: "column";
4
+ };
5
+ triggerContainer: {
6
+ flexGrow: number;
7
+ flexDirection: "row";
8
+ alignItems: "center";
9
+ justifyContent: "center";
10
+ paddingHorizontal: number;
11
+ gap: number;
12
+ };
13
+ triggerContainerFitted: {
14
+ flexDirection: "row";
15
+ alignItems: "center";
16
+ justifyContent: "center";
17
+ paddingHorizontal: number;
18
+ gap: number;
19
+ };
20
+ item: {
21
+ flex: number;
22
+ flexDirection: "row";
23
+ alignItems: "center";
24
+ justifyContent: "center";
25
+ height: number;
26
+ paddingHorizontal: number;
27
+ gap: number;
28
+ };
29
+ staticBorder: {
30
+ height: number;
31
+ };
32
+ activeUnderline: {
33
+ position: "absolute";
34
+ bottom: number;
35
+ height: number;
36
+ };
37
+ triggerWrapper: {
38
+ overflow: "hidden";
39
+ };
40
+ connector: {
41
+ width: number;
42
+ justifyContent: "center";
43
+ };
44
+ disabled: {
45
+ opacity: number;
46
+ };
47
+ content: {
48
+ flexGrow: number;
49
+ };
50
+ };
51
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { ViewProps, PressableProps } from 'react-native';
2
+ import type { CommonStyleProps, BaseAccessibilityProps } from '../utils';
3
+ /** Props for the root Stepper container. */
4
+ export interface StepperProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
5
+ /** Index of the currently active step (0-based). */
6
+ activeStep: number;
7
+ /** Called when a step trigger is pressed. */
8
+ onStepChange?: (step: number) => void;
9
+ /** Custom connector renderer between step triggers. */
10
+ renderConnector?: () => React.ReactNode;
11
+ /** Content to render — should be StepperItem elements. */
12
+ children: React.ReactNode;
13
+ /** Whether the step triggers can scroll horizontally (default: true). When false, steps share equal width and labels truncate. */
14
+ scrollable?: boolean;
15
+ }
16
+ /** Props for an individual step trigger within the Stepper. */
17
+ export interface StepperItemProps extends Omit<PressableProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
18
+ /** Text label displayed next to the step number. */
19
+ label: string;
20
+ /** Whether this step trigger is clickable. */
21
+ allowClick?: boolean;
22
+ /** Content rendered when this step is active. */
23
+ children?: React.ReactNode;
24
+ }
25
+ //# sourceMappingURL=types.d.ts.map
@@ -3,9 +3,15 @@ import type { BaseAccessibilityProps, CommonStyleProps } from '../utils';
3
3
  export type SwitchSize = 'sm' | 'md';
4
4
  export type SwitchColor = 'primary' | 'secondary';
5
5
  export interface SwitchProps extends Omit<PressableProps, 'onPress' | 'style'>, CommonStyleProps, BaseAccessibilityProps {
6
- /** Controlled toggle state (RN-style API). Alias for `checked`. */
6
+ /**
7
+ * Controlled toggle state (RN-style API). Alias for `checked`.
8
+ * @deprecated Use `checked` instead. Will be removed in a future major version.
9
+ */
7
10
  value?: boolean;
8
- /** Called with the next value when toggled (RN-style API). Alias for `onChange`. */
11
+ /**
12
+ * Called with the next value when toggled (RN-style API). Alias for `onChange`.
13
+ * @deprecated Use `onChange` instead. Will be removed in a future major version.
14
+ */
9
15
  onValueChange?: (value: boolean) => void;
10
16
  /** Controlled toggle state (web-style API). Takes precedence over `value`. */
11
17
  checked?: boolean;
@@ -0,0 +1,18 @@
1
+ import type { TabsSize, TabsVariant } from './types';
2
+ interface SizeConfig {
3
+ height: number;
4
+ paddingHorizontal: number;
5
+ fontSize: number;
6
+ lineHeight: number;
7
+ }
8
+ export declare const SIZE_CONFIG: Record<TabsSize, SizeConfig>;
9
+ export declare const DEFAULT_SIZE: TabsSize;
10
+ export declare const DEFAULT_VARIANT: TabsVariant;
11
+ export declare const INDICATOR_HEIGHT = 2;
12
+ export declare const SLIDE_DURATION = 200;
13
+ export declare const SLIDE_TIMING_CONFIG: {
14
+ readonly duration: 200;
15
+ readonly easing: import("react-native-reanimated").EasingFunction;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { ViewStyle, TextStyle } from 'react-native';
3
+ import type { TwigsTheme } from '../theme';
4
+ import type { TabsSize, TabsVariant } from './types';
5
+ export interface TriggerMeta {
6
+ value: string;
7
+ disabled: boolean;
8
+ }
9
+ export declare function getTriggerInfo(children: React.ReactNode): TriggerMeta[];
10
+ export declare const TRIGGER_SIZE_STYLES: Record<TabsSize, ViewStyle>;
11
+ export declare function getTriggerTextStyles(theme: TwigsTheme, variant: TabsVariant, isActive: boolean, disabled: boolean, size: TabsSize): TextStyle;
12
+ export declare function getIndicatorColorStyles(theme: TwigsTheme, variant: TabsVariant): ViewStyle;
13
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1,6 @@
1
+ export { Tabs } from './tabs';
2
+ export { TabsList } from './tabs-list';
3
+ export { TabsTrigger } from './tabs-trigger';
4
+ export { TabsContent } from './tabs-content';
5
+ export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsSize, TabsVariant, } from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ export declare const styles: {
2
+ root: {
3
+ flexDirection: "column";
4
+ };
5
+ list: {
6
+ width: "100%";
7
+ };
8
+ scrollContent: {
9
+ flexGrow: number;
10
+ };
11
+ inner: {
12
+ flexDirection: "row";
13
+ alignItems: "stretch";
14
+ position: "relative";
15
+ };
16
+ innerFitted: {
17
+ flexDirection: "row";
18
+ alignItems: "stretch";
19
+ position: "relative";
20
+ width: "100%";
21
+ };
22
+ trigger: {
23
+ flexDirection: "row";
24
+ alignItems: "center";
25
+ justifyContent: "center";
26
+ };
27
+ fittedTrigger: {
28
+ flex: number;
29
+ };
30
+ indicator: {
31
+ position: "absolute";
32
+ bottom: number;
33
+ left: number;
34
+ };
35
+ disabled: {
36
+ opacity: number;
37
+ };
38
+ };
39
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { TabsContentProps } from './types';
4
+ /** Content panel shown when its matching tab trigger is active. */
5
+ export declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=tabs-content.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { TabsSize, TabsVariant } from './types';
2
+ export interface TabsContextValue {
3
+ /** Currently active tab value. */
4
+ activeValue: string;
5
+ /** Called when a trigger is pressed. */
6
+ onSelect: (value: string) => void;
7
+ }
8
+ export interface TabsListContextValue {
9
+ /** Size variant applied to triggers. */
10
+ size: TabsSize;
11
+ /** Color variant applied to triggers and indicator. */
12
+ variant: TabsVariant;
13
+ /** Report measured width for indicator positioning. */
14
+ reportWidth: (value: string, width: number) => void;
15
+ /** Whether the tab list is scrollable. */
16
+ scrollable: boolean;
17
+ }
18
+ declare const TabsContext: import("react").Context<TabsContextValue | null>;
19
+ declare const TabsListContext: import("react").Context<TabsListContextValue | null>;
20
+ export declare function useTabsContext(): TabsContextValue;
21
+ export declare function useTabsListContext(): TabsListContextValue;
22
+ export { TabsContext, TabsListContext };
23
+ //# sourceMappingURL=tabs-context.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { TabsListProps } from './types';
4
+ /** Horizontal row of tab triggers with an animated active indicator. */
5
+ export declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=tabs-list.d.ts.map
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { TabsTriggerProps } from './types';
3
+ /** Individual tab button within a TabsList. */
4
+ export declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<import("react-native").View>>;
5
+ //# sourceMappingURL=tabs-trigger.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import type { TabsProps } from './types';
4
+ /** Root container for a tabbed interface. Manages active tab state. */
5
+ export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1,43 @@
1
+ import type { ViewProps, PressableProps } from 'react-native';
2
+ import type { CommonStyleProps, BaseAccessibilityProps } from '../utils';
3
+ /** Size variant for tab triggers. */
4
+ export type TabsSize = 'md' | 'lg';
5
+ /** Color variant for the active tab indicator and text. */
6
+ export type TabsVariant = 'primary' | 'dark';
7
+ /** Props for the root Tabs container. */
8
+ export interface TabsProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
9
+ /** Currently active tab value (controlled). */
10
+ value?: string;
11
+ /** Default active tab value (uncontrolled). */
12
+ defaultValue?: string;
13
+ /** Called when the active tab changes. */
14
+ onValueChange?: (value: string) => void;
15
+ }
16
+ /** Props for the TabsList container that holds tab triggers. */
17
+ export interface TabsListProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
18
+ /** Size variant for tab triggers. */
19
+ size?: TabsSize;
20
+ /** Color variant for the active indicator and text. */
21
+ variant?: TabsVariant;
22
+ /** Whether the tab triggers can scroll horizontally (default: true). When false, triggers share equal width. */
23
+ scrollable?: boolean;
24
+ }
25
+ /** Props for an individual tab trigger button. */
26
+ export interface TabsTriggerProps extends Omit<PressableProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
27
+ /** Unique value identifying this tab — must match a TabsContent value. */
28
+ value: string;
29
+ /** Whether this trigger is disabled. */
30
+ disabled?: boolean;
31
+ /** Content to render inside the trigger. */
32
+ children: React.ReactNode;
33
+ }
34
+ /** Props for a tab content panel. */
35
+ export interface TabsContentProps extends Omit<ViewProps, 'style'>, CommonStyleProps, BaseAccessibilityProps {
36
+ /** Value matching a TabsTrigger — panel is visible when this tab is active. */
37
+ value: string;
38
+ /** Whether to keep the content mounted when the tab is inactive. */
39
+ forceMount?: boolean;
40
+ /** Content to render inside the panel. */
41
+ children: React.ReactNode;
42
+ }
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_FONT_SIZE = 14;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { TextStyle } from 'react-native';
2
+ import type { ThemeFonts } from '../theme/default-theme';
3
+ import type { TextWeight, TextProps } from './types';
4
+ /** Priority: weight (theme alias) › fontFamily/fontWeight (explicit) › theme default. */
5
+ export declare const resolveFontStyle: (themeFonts: ThemeFonts, options: {
6
+ weight?: TextWeight;
7
+ fontFamily?: string;
8
+ fontWeight?: TextProps["fontWeight"];
9
+ }) => Pick<TextStyle, "fontFamily" | "fontWeight">;
10
+ //# sourceMappingURL=helpers.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AccessibilityRole, TextStyle } from 'react-native';
3
3
  import { MarginProps, PaddingProps } from '../utils';
4
+ export type TextWeight = 'regular' | 'medium' | 'bold';
4
5
  /**
5
6
  * Props for the Text component.
6
7
  * Extends `MarginProps` and `PaddingProps` for spacing shorthand.
@@ -12,9 +13,20 @@ export interface TextProps extends MarginProps, PaddingProps {
12
13
  css?: TextStyle;
13
14
  /** Text styles applied last for final overrides. */
14
15
  style?: TextStyle;
16
+ /**
17
+ * Used to locate this element in end-to-end tests.
18
+ * @see https://reactnative.dev/docs/text#testid
19
+ */
20
+ testID?: string;
15
21
  fontSize?: number;
16
22
  fontFamily?: string;
17
23
  color?: string;
24
+ /** Semantic font weight that maps to a theme font family. Takes precedence over `fontWeight`. */
25
+ weight?: TextWeight;
26
+ /**
27
+ * @deprecated Use `weight` instead. This prop only works reliably with the System font.
28
+ * Will be removed in a future major version.
29
+ */
18
30
  fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
19
31
  textAlign?: 'left' | 'center' | 'right' | 'justify';
20
32
  textDecoration?: 'none' | 'underline' | 'line-through' | 'underline line-through';
@@ -0,0 +1,24 @@
1
+ import type { TextAreaSize } from './types';
2
+ export interface TextAreaSizeConfig {
3
+ /** Border radius in dp. */
4
+ borderRadius: number;
5
+ /** Placeholder / input text font size in dp. */
6
+ fontSize: number;
7
+ /** Horizontal padding inside the textarea in dp. */
8
+ paddingHorizontal: number;
9
+ /** Vertical padding inside the textarea in dp. */
10
+ paddingVertical: number;
11
+ /** Font size for the label text above the textarea. */
12
+ labelFontSize: number;
13
+ /** Line height for label text. */
14
+ labelLineHeight: number;
15
+ /** Letter spacing for label text. */
16
+ labelLetterSpacing: number;
17
+ /** Line height for placeholder / input text. */
18
+ inputLineHeight: number;
19
+ }
20
+ /** Default number of visible text rows. */
21
+ export declare const DEFAULT_ROWS = 3;
22
+ /** Resolved size config for a given text-area size. */
23
+ export declare const getSizeConfig: (size: TextAreaSize) => TextAreaSizeConfig;
24
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { TextArea } from './text-area';
2
+ export type { TextAreaProps, TextAreaSize, TextAreaVariant } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,37 @@
1
+ /** Static layout styles — no theme colors here. Theme-dependent styles go in the component. */
2
+ export declare const styles: {
3
+ container: {
4
+ position: "relative";
5
+ width: "100%";
6
+ };
7
+ fullWidth: {
8
+ width: "100%";
9
+ };
10
+ inputWrapper: {
11
+ position: "relative";
12
+ width: "100%";
13
+ borderWidth: number;
14
+ borderStyle: "solid";
15
+ };
16
+ textInput: {
17
+ outlineStyle?: string | undefined;
18
+ outlineWidth?: number | undefined;
19
+ outlineColor?: string | undefined;
20
+ flex: number;
21
+ margin: number;
22
+ padding: number;
23
+ borderWidth: number;
24
+ backgroundColor: string;
25
+ textAlignVertical: "top";
26
+ };
27
+ labelRow: {
28
+ flexDirection: "row";
29
+ justifyContent: "space-between";
30
+ alignItems: "center";
31
+ };
32
+ labelWithIndicator: {
33
+ flexDirection: "row";
34
+ alignItems: "center";
35
+ };
36
+ };
37
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { TextInput as RNTextInput } from 'react-native';
3
+ import type { TextAreaProps } from './types';
4
+ /** Themed multi-line text area with auto-grow, label, error state, and character count. */
5
+ export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<RNTextInput>>;
6
+ //# sourceMappingURL=text-area.d.ts.map