@utilitywarehouse/hearth-react-native 0.36.1 → 0.36.3

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 (226) hide show
  1. package/SKILL.md +27 -16
  2. package/build/components/Accordion/Accordion.d.ts +4 -0
  3. package/build/components/Accordion/Accordion.js +4 -0
  4. package/build/components/Accordion/Accordion.props.d.ts +2 -0
  5. package/build/components/Alert/Alert.d.ts +4 -0
  6. package/build/components/Alert/Alert.js +4 -0
  7. package/build/components/Avatar/Avatar.d.ts +4 -0
  8. package/build/components/Avatar/Avatar.js +4 -0
  9. package/build/components/Badge/Badge.d.ts +4 -0
  10. package/build/components/Badge/Badge.js +4 -0
  11. package/build/components/Badge/Badge.props.d.ts +19 -0
  12. package/build/components/Banner/Banner.d.ts +5 -0
  13. package/build/components/Banner/Banner.js +5 -0
  14. package/build/components/Banner/BannerIllustration.d.ts +4 -0
  15. package/build/components/Banner/BannerIllustration.js +4 -0
  16. package/build/components/Banner/BannerImage.d.ts +4 -0
  17. package/build/components/Banner/BannerImage.js +4 -0
  18. package/build/components/BodyText/BodyText.d.ts +4 -0
  19. package/build/components/BodyText/BodyText.js +4 -0
  20. package/build/components/BottomSheet/BottomSheet.d.ts +6 -0
  21. package/build/components/BottomSheet/BottomSheet.js +6 -0
  22. package/build/components/BottomSheet/BottomSheet.props.d.ts +2 -0
  23. package/build/components/Box/Box.d.ts +4 -0
  24. package/build/components/Box/Box.js +4 -0
  25. package/build/components/Box/Box.props.d.ts +2 -0
  26. package/build/components/Button/Button.d.ts +4 -0
  27. package/build/components/Button/Button.js +4 -0
  28. package/build/components/Button/Button.props.d.ts +129 -0
  29. package/build/components/Card/Card.d.ts +4 -0
  30. package/build/components/Card/Card.js +4 -0
  31. package/build/components/Card/Card.props.d.ts +19 -1
  32. package/build/components/Card/CardAction/CardAction.d.ts +4 -0
  33. package/build/components/Card/CardAction/CardAction.js +4 -0
  34. package/build/components/Card/CardAction/CardAction.props.d.ts +23 -0
  35. package/build/components/Card/CardPressHandler.d.ts +8 -3
  36. package/build/components/Card/CardPressHandler.js +3 -0
  37. package/build/components/Carousel/Carousel.d.ts +3 -0
  38. package/build/components/Carousel/Carousel.js +3 -0
  39. package/build/components/Carousel/Carousel.props.d.ts +37 -0
  40. package/build/components/Center/Center.d.ts +3 -0
  41. package/build/components/Center/Center.js +3 -0
  42. package/build/components/Checkbox/Checkbox.d.ts +3 -0
  43. package/build/components/Checkbox/Checkbox.js +3 -0
  44. package/build/components/Checkbox/Checkbox.props.d.ts +20 -0
  45. package/build/components/Checkbox/CheckboxGroup.d.ts +3 -0
  46. package/build/components/Checkbox/CheckboxGroup.js +3 -0
  47. package/build/components/Checkbox/CheckboxGroup.props.d.ts +24 -0
  48. package/build/components/Combobox/Combobox.d.ts +3 -0
  49. package/build/components/Combobox/Combobox.js +3 -0
  50. package/build/components/Container/Container.d.ts +3 -0
  51. package/build/components/Container/Container.js +3 -0
  52. package/build/components/CurrencyInput/CurrencyInput.d.ts +3 -0
  53. package/build/components/CurrencyInput/CurrencyInput.js +3 -0
  54. package/build/components/CurrencyInput/CurrencyInput.props.d.ts +25 -0
  55. package/build/components/DateInput/DateInput.d.ts +4 -0
  56. package/build/components/DateInput/DateInput.js +4 -0
  57. package/build/components/DateInput/DateInput.props.d.ts +3 -0
  58. package/build/components/DatePicker/DatePicker.context.d.ts +1 -0
  59. package/build/components/DatePicker/DatePicker.d.ts +14 -0
  60. package/build/components/DatePicker/DatePicker.js +31 -0
  61. package/build/components/DatePicker/DatePicker.props.d.ts +78 -0
  62. package/build/components/DatePicker/DatePickerFooter.js +6 -2
  63. package/build/components/DatePickerInput/DatePickerInput.d.ts +5 -1
  64. package/build/components/DatePickerInput/DatePickerInput.js +15 -5
  65. package/build/components/DatePickerInput/DatePickerInput.props.d.ts +28 -0
  66. package/build/components/DescriptionList/DescriptionList.d.ts +4 -0
  67. package/build/components/DescriptionList/DescriptionList.js +4 -0
  68. package/build/components/DescriptionList/DescriptionList.props.d.ts +4 -0
  69. package/build/components/DetailText/DetailText.d.ts +4 -0
  70. package/build/components/DetailText/DetailText.js +4 -0
  71. package/build/components/Divider/Divider.d.ts +4 -0
  72. package/build/components/Divider/Divider.js +4 -0
  73. package/build/components/Divider/Divider.props.d.ts +10 -0
  74. package/build/components/Expandable/Expandable.d.ts +5 -0
  75. package/build/components/Expandable/Expandable.js +5 -0
  76. package/build/components/ExpandableCard/ExpandableCard.d.ts +4 -0
  77. package/build/components/ExpandableCard/ExpandableCard.js +4 -0
  78. package/build/components/Flex/Flex.d.ts +4 -0
  79. package/build/components/Flex/Flex.js +4 -0
  80. package/build/components/Flex/Flex.props.d.ts +20 -0
  81. package/build/components/FormField/FormField.d.ts +5 -0
  82. package/build/components/FormField/FormField.js +5 -0
  83. package/build/components/FormField/FormField.props.d.ts +24 -0
  84. package/build/components/Grid/Grid.d.ts +4 -0
  85. package/build/components/Grid/Grid.js +4 -0
  86. package/build/components/HTMLElements/ListItem.d.ts +5 -0
  87. package/build/components/HTMLElements/OrderedList.d.ts +10 -0
  88. package/build/components/HTMLElements/OrderedList.js +4 -0
  89. package/build/components/HTMLElements/UnorderedList.d.ts +10 -0
  90. package/build/components/HTMLElements/UnorderedList.js +4 -0
  91. package/build/components/Heading/Heading.d.ts +4 -0
  92. package/build/components/Heading/Heading.js +4 -0
  93. package/build/components/HighlightBanner/HighlightBanner.d.ts +5 -0
  94. package/build/components/HighlightBanner/HighlightBanner.js +5 -0
  95. package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
  96. package/build/components/HighlightBanner/HighlightBannerImage.d.ts +4 -0
  97. package/build/components/HighlightBanner/HighlightBannerImage.js +4 -0
  98. package/build/components/Icon/Icon.d.ts +4 -0
  99. package/build/components/Icon/Icon.js +4 -0
  100. package/build/components/Icon/Icon.props.d.ts +8 -0
  101. package/build/components/IconButton/IconButton.d.ts +5 -0
  102. package/build/components/IconButton/IconButton.js +5 -0
  103. package/build/components/IconButton/IconButton.props.d.ts +9 -0
  104. package/build/components/IconContainer/IconContainer.d.ts +4 -0
  105. package/build/components/IconContainer/IconContainer.js +4 -0
  106. package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
  107. package/build/components/IndicatorIconButton/IndicatorIconButton.js +6 -0
  108. package/build/components/InlineLink/InlineLink.d.ts +1 -0
  109. package/build/components/InlineLink/InlineLink.js +1 -0
  110. package/build/components/InlineLink/InlineLink.props.d.ts +4 -0
  111. package/build/components/Input/Input.d.ts +5 -0
  112. package/build/components/Input/Input.js +5 -0
  113. package/build/components/Input/Input.props.d.ts +54 -0
  114. package/build/components/Link/Link.d.ts +5 -0
  115. package/build/components/Link/Link.js +5 -0
  116. package/build/components/Link/Link.props.d.ts +15 -0
  117. package/build/components/List/List.d.ts +1 -0
  118. package/build/components/List/List.js +1 -0
  119. package/build/components/List/List.props.d.ts +8 -0
  120. package/build/components/Menu/Menu.d.ts +1 -0
  121. package/build/components/Menu/Menu.js +1 -0
  122. package/build/components/Modal/Modal.d.ts +5 -0
  123. package/build/components/Modal/Modal.js +5 -0
  124. package/build/components/Modal/Modal.props.d.ts +6 -0
  125. package/build/components/Modal/Modal.shared.types.d.ts +32 -0
  126. package/build/components/Modal/ModalImage.d.ts +1 -0
  127. package/build/components/Modal/ModalImage.js +1 -0
  128. package/build/components/NavModal/NavModal.d.ts +8 -0
  129. package/build/components/NavModal/NavModal.js +8 -0
  130. package/build/components/NavModal/NavModal.props.d.ts +10 -0
  131. package/build/components/Pagination/Pagination.d.ts +5 -0
  132. package/build/components/Pagination/Pagination.js +5 -0
  133. package/build/components/PillGroup/Pill.d.ts +1 -0
  134. package/build/components/PillGroup/Pill.js +1 -0
  135. package/build/components/PillGroup/PillGroup.d.ts +5 -0
  136. package/build/components/PillGroup/PillGroup.js +5 -0
  137. package/build/components/ProgressBar/ProgressBar.d.ts +5 -0
  138. package/build/components/ProgressBar/ProgressBar.js +5 -0
  139. package/build/components/ProgressBar/ProgressBar.props.d.ts +4 -0
  140. package/build/components/ProgressStepper/ProgressStep.d.ts +13 -0
  141. package/build/components/ProgressStepper/ProgressStep.js +5 -0
  142. package/build/components/ProgressStepper/ProgressStepper.d.ts +5 -0
  143. package/build/components/ProgressStepper/ProgressStepper.js +5 -0
  144. package/build/components/Radio/Radio.d.ts +5 -0
  145. package/build/components/Radio/Radio.js +5 -0
  146. package/build/components/Radio/Radio.props.d.ts +17 -0
  147. package/build/components/Radio/RadioGroup.d.ts +5 -0
  148. package/build/components/Radio/RadioGroup.js +5 -0
  149. package/build/components/Radio/RadioGroup.props.d.ts +25 -0
  150. package/build/components/RadioCard/RadioCard.d.ts +10 -0
  151. package/build/components/RadioCard/RadioCard.js +10 -0
  152. package/build/components/RadioCard/RadioCard.props.d.ts +14 -0
  153. package/build/components/RadioCard/RadioCardGroup.d.ts +4 -0
  154. package/build/components/RadioCard/RadioCardGroup.js +4 -0
  155. package/build/components/RadioCard/RadioCardGroup.props.d.ts +17 -0
  156. package/build/components/Rating/Rating.d.ts +5 -0
  157. package/build/components/Rating/Rating.js +5 -0
  158. package/build/components/Roundel/Roundel.d.ts +1 -0
  159. package/build/components/Roundel/Roundel.js +1 -0
  160. package/build/components/SectionHeader/SectionHeader.d.ts +1 -0
  161. package/build/components/SectionHeader/SectionHeader.js +1 -0
  162. package/build/components/SectionHeader/SectionHeader.props.d.ts +7 -0
  163. package/build/components/SegmentedControl/SegmentedControl.d.ts +5 -0
  164. package/build/components/SegmentedControl/SegmentedControl.js +5 -0
  165. package/build/components/Select/Select.d.ts +5 -0
  166. package/build/components/Select/Select.js +5 -0
  167. package/build/components/Skeleton/Skeleton.d.ts +1 -0
  168. package/build/components/Skeleton/Skeleton.js +1 -0
  169. package/build/components/Skeleton/Skeleton.props.d.ts +4 -0
  170. package/build/components/Spinner/Spinner.d.ts +4 -0
  171. package/build/components/Spinner/Spinner.js +8 -0
  172. package/build/components/Spinner/Spinner.props.d.ts +5 -0
  173. package/build/components/Spinner/Spinner.web.d.ts +4 -0
  174. package/build/components/Spinner/Spinner.web.js +8 -0
  175. package/build/components/StepperInput/StepperInput.d.ts +4 -0
  176. package/build/components/StepperInput/StepperInput.js +4 -0
  177. package/build/components/StepperInput/StepperInput.props.d.ts +44 -0
  178. package/build/components/Switch/Switch.d.ts +4 -0
  179. package/build/components/Switch/Switch.js +4 -0
  180. package/build/components/Switch/Switch.props.d.ts +5 -0
  181. package/build/components/Table/Table.d.ts +4 -0
  182. package/build/components/Table/Table.js +4 -0
  183. package/build/components/Table/Table.props.d.ts +6 -0
  184. package/build/components/Table/TableHeader.d.ts +3 -0
  185. package/build/components/Table/TableHeader.js +3 -0
  186. package/build/components/Table/TableHeaderCell.d.ts +6 -0
  187. package/build/components/Table/TableHeaderCell.js +3 -0
  188. package/build/components/Tabs/Tabs.d.ts +5 -0
  189. package/build/components/Tabs/Tabs.js +5 -0
  190. package/build/components/Textarea/Textarea.d.ts +6 -0
  191. package/build/components/Textarea/Textarea.js +6 -0
  192. package/build/components/Textarea/Textarea.props.d.ts +14 -0
  193. package/build/components/TimePicker/TimePicker.d.ts +5 -0
  194. package/build/components/TimePicker/TimePicker.js +14 -1
  195. package/build/components/TimePicker/TimePickerView.js +5 -19
  196. package/build/components/TimePicker/TimePickerWheel.web.js +11 -2
  197. package/build/components/TimePicker/utils.d.ts +9 -0
  198. package/build/components/TimePicker/utils.js +30 -0
  199. package/build/components/TimePicker/utils.test.d.ts +1 -0
  200. package/build/components/TimePicker/utils.test.js +31 -0
  201. package/build/components/TimePickerInput/TimePickerInput.d.ts +6 -1
  202. package/build/components/TimePickerInput/TimePickerInput.js +16 -5
  203. package/build/components/TimePickerInput/TimePickerInput.props.d.ts +35 -0
  204. package/build/components/Timeline/Timeline.d.ts +5 -0
  205. package/build/components/Timeline/Timeline.js +5 -0
  206. package/build/components/Timeline/TimelineItem.d.ts +4 -0
  207. package/build/components/Timeline/TimelineItem.js +4 -0
  208. package/build/components/Toast/Toast.context.d.ts +4 -0
  209. package/build/components/Toast/Toast.context.js +4 -0
  210. package/build/components/Toast/Toast.props.d.ts +7 -0
  211. package/build/components/ToggleButton/ToggleButton.d.ts +4 -0
  212. package/build/components/ToggleButton/ToggleButton.js +4 -0
  213. package/build/components/ToggleButton/ToggleButton.props.d.ts +6 -0
  214. package/build/components/ToggleButtonCard/ToggleButtonCard.d.ts +8 -0
  215. package/build/components/ToggleButtonCard/ToggleButtonCard.js +8 -0
  216. package/build/components/ToggleButtonCard/ToggleButtonCard.props.d.ts +9 -0
  217. package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.d.ts +15 -0
  218. package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +5 -0
  219. package/build/components/UnstyledIconButton/UnstyledIconButton.js +5 -0
  220. package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +17 -0
  221. package/build/components/VerificationInput/VerificationInput.d.ts +4 -0
  222. package/build/components/VerificationInput/VerificationInput.js +4 -0
  223. package/package.json +8 -5
  224. package/public/llms/components/date-picker.md +7 -1
  225. package/public/llms/components/time-picker.md +1 -0
  226. package/public/llms/docs/introduction.md +1 -1
@@ -1,4 +1,5 @@
1
1
  import SectionHeaderProps from './SectionHeader.props';
2
+ /** A heading row for a section or list, with an optional helper text, badge and trailing content. */
2
3
  declare const SectionHeader: {
3
4
  ({ heading, helperText, children, style, trailingContent, badge, invalidText, ...props }: SectionHeaderProps): import("react").JSX.Element;
4
5
  displayName: string;
@@ -8,6 +8,7 @@ import SectionHeaderTitle from './SectionHeaderHeading';
8
8
  import SectionHeaderHelperText from './SectionHeaderHelperText';
9
9
  import SectionHeaderTextContent from './SectionHeaderTextContent';
10
10
  import SectionHeaderTrailingContent from './SectionHeaderTrailingContent';
11
+ /** A heading row for a section or list, with an optional helper text, badge and trailing content. */
11
12
  const SectionHeader = ({ heading, helperText, children, style, trailingContent, badge, invalidText, ...props }) => {
12
13
  return (_jsx(View, { ...props, style: [styles.container, style], children: children ? (children) : (_jsxs(_Fragment, { children: [_jsxs(SectionHeaderTextContent, { children: [_jsx(SectionHeaderTitle, { children: heading }), !!helperText && _jsx(SectionHeaderHelperText, { children: helperText }), !!invalidText && (_jsx(Helper, { validationStatus: "invalid", showIcon: true, icon: ErrorCircleSmallIcon, text: invalidText || '' }))] }), !!badge && _jsx(Badge, { ...badge }), !!trailingContent && (_jsx(SectionHeaderTrailingContent, { children: trailingContent }))] })) }));
13
14
  };
@@ -2,9 +2,11 @@ import { Ref } from 'react';
2
2
  import type { View, ViewProps } from 'react-native';
3
3
  import BadgeProps from '../Badge/Badge.props';
4
4
  interface SectionHeaderBaseProps extends Omit<ViewProps, 'children'> {
5
+ /** Forwarded ref to the underlying view. */
5
6
  ref?: Ref<View>;
6
7
  }
7
8
  export interface SectionHeaderWithChildren extends SectionHeaderBaseProps {
9
+ /** Custom content rendered in place of the default heading, helper text, badge and trailing content. */
8
10
  children: ViewProps['children'];
9
11
  heading?: never;
10
12
  helperText?: never;
@@ -14,10 +16,15 @@ export interface SectionHeaderWithChildren extends SectionHeaderBaseProps {
14
16
  }
15
17
  export interface SectionHeaderWithoutChildren extends SectionHeaderBaseProps {
16
18
  children?: never;
19
+ /** The text to display in the heading of the section. */
17
20
  heading: string;
21
+ /** The helper text to display below the heading. */
18
22
  helperText?: string;
23
+ /** Optional content to display on the right side. */
19
24
  trailingContent?: React.ReactNode;
25
+ /** Optional badge to display next to the heading. */
20
26
  badge?: BadgeProps;
27
+ /** The invalid text to be displayed below the helper text. */
21
28
  invalidText?: string;
22
29
  }
23
30
  type SectionHeaderProps = SectionHeaderWithChildren | SectionHeaderWithoutChildren;
@@ -1,4 +1,9 @@
1
1
  import type SegmentedControlProps from './SegmentedControl.props';
2
+ /**
3
+ * Lets a user switch between a small set of mutually exclusive options rendered as
4
+ * `SegmentedControlOption` children, with an animated indicator tracking the current selection.
5
+ * @summary A single-choice, tab-like control for switching between a few options.
6
+ */
2
7
  declare const SegmentedControl: {
3
8
  ({ value: controlledValue, defaultValue, onValueChange, size, disabled, children, style, ...props }: SegmentedControlProps): import("react").JSX.Element;
4
9
  displayName: string;
@@ -7,6 +7,11 @@ import { useStyleProps } from '../../hooks';
7
7
  import { SegmentedControlContext } from './SegmentedControl.context';
8
8
  const Indicator = Animated.createAnimatedComponent(View);
9
9
  const GROUP_BORDER_WIDTH = 1;
10
+ /**
11
+ * Lets a user switch between a small set of mutually exclusive options rendered as
12
+ * `SegmentedControlOption` children, with an animated indicator tracking the current selection.
13
+ * @summary A single-choice, tab-like control for switching between a few options.
14
+ */
10
15
  const SegmentedControl = ({ value: controlledValue, defaultValue, onValueChange, size = 'sm', disabled = false, children, style, ...props }) => {
11
16
  const { computedStyles, remainingProps } = useStyleProps(props);
12
17
  const isReducedMotion = useReducedMotion();
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
2
  import SelectProps from './Select.props';
3
+ /**
4
+ * Lets a user pick a single value from a list of options presented in a bottom sheet. Use it in
5
+ * forms where the full set of options doesn't need to be visible at once, optionally with search.
6
+ * @summary A form field for picking one value from a bottom-sheet list of options.
7
+ */
3
8
  declare const Select: {
4
9
  ({ options, value, onValueChange, label, labelVariant, placeholder, disabled, leadingIcon: LeadingIcon, validationStatus, helperText, helperIcon, invalidText, validText, required, children, bottomSheetProps, menuHeading, readonly, emptyText, listProps, searchable, searchPlaceholder, testID, ...rest }: SelectProps): React.JSX.Element;
5
10
  displayName: string;
@@ -14,6 +14,11 @@ import { Input } from '../Input';
14
14
  import { SelectContext } from './Select.context';
15
15
  import { filterOptionsByLabel } from './Select.utils';
16
16
  import SelectOption from './SelectOption';
17
+ /**
18
+ * Lets a user pick a single value from a list of options presented in a bottom sheet. Use it in
19
+ * forms where the full set of options doesn't need to be visible at once, optionally with search.
20
+ * @summary A form field for picking one value from a bottom-sheet list of options.
21
+ */
17
22
  const Select = ({ options = [], value, onValueChange, label, labelVariant = 'body', placeholder = 'Select an option', disabled = false, leadingIcon: LeadingIcon, validationStatus = 'initial', helperText, helperIcon, invalidText, validText, required = true, children, bottomSheetProps, menuHeading, readonly = false, emptyText = 'No options available', listProps, searchable = false, searchPlaceholder = 'Search', testID, ...rest }) => {
18
23
  const formFieldContext = useFormFieldContext();
19
24
  const validationStatusFromContext = formFieldContext?.validationStatus ?? validationStatus;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type SkeletonProps from './Skeleton.props';
3
+ /** A pulsing placeholder block, shown in place of content while it loads. */
3
4
  declare const Skeleton: {
4
5
  ({ width, height, backgroundColor: bg, borderRadius, style, ...props }: SkeletonProps): React.JSX.Element;
5
6
  displayName: string;
@@ -5,6 +5,7 @@ import { StyleSheet } from 'react-native-unistyles';
5
5
  import { useTheme } from '../../hooks';
6
6
  import { getFlattenedColorValue } from '../../utils';
7
7
  import getStyleValue from '../../utils/getStyleValue';
8
+ /** A pulsing placeholder block, shown in place of content while it loads. */
8
9
  const Skeleton = ({ width, height, backgroundColor: bg, borderRadius, style, ...props }) => {
9
10
  const opacity = useSharedValue(1);
10
11
  const { components } = useTheme();
@@ -1,9 +1,13 @@
1
1
  import type { DimensionValue, ViewProps } from 'react-native';
2
2
  import type { ColorValue, BorderRadiusValue } from '../../types';
3
3
  interface SkeletonProps extends ViewProps {
4
+ /** The width of the skeleton. */
4
5
  width: DimensionValue;
6
+ /** The height of the skeleton. */
5
7
  height: DimensionValue;
8
+ /** The background color of the skeleton. Falls back to the theme's loading colour. */
6
9
  backgroundColor?: ColorValue;
10
+ /** The border radius of the skeleton. Falls back to the theme's `xs` border radius. */
7
11
  borderRadius?: BorderRadiusValue;
8
12
  }
9
13
  export default SkeletonProps;
@@ -1,3 +1,7 @@
1
1
  import type SpinnerProps from './Spinner.props';
2
+ /**
3
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
4
+ * another component, such as a `Button` or `Dialog`, while content is loading.
5
+ */
2
6
  declare const Spinner: import("react").ComponentType<SpinnerProps>;
3
7
  export default Spinner;
@@ -9,6 +9,10 @@ import { useTheme } from '../../hooks';
9
9
  import { getFlattenedColorValue } from '../../utils';
10
10
  const AnimatedSvg = Animated.createAnimatedComponent(Svg);
11
11
  const AnimatedCircle = Animated.createAnimatedComponent(Circle);
12
+ /**
13
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
14
+ * another component, such as a `Button` or `Dialog`, while content is loading.
15
+ */
12
16
  const SpinnerRoot = ({ size = 'md', color, ...props }) => {
13
17
  const { components } = useTheme();
14
18
  const width = components.spinner[size].size;
@@ -81,5 +85,9 @@ const styles = StyleSheet.create(theme => ({
81
85
  },
82
86
  },
83
87
  }));
88
+ /**
89
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
90
+ * another component, such as a `Button` or `Dialog`, while content is loading.
91
+ */
84
92
  const Spinner = createSpinner({ Root: SpinnerRoot });
85
93
  export default Spinner;
@@ -2,7 +2,12 @@ import { RefAttributes } from 'react';
2
2
  import { type ViewProps } from 'react-native';
3
3
  import { ColorValue } from '../../types';
4
4
  interface SpinnerProps extends ViewProps, RefAttributes<any> {
5
+ /**
6
+ * The size of the spinner.
7
+ * @default 'md'
8
+ */
5
9
  size?: 'xs' | 'sm' | 'md' | 'lg';
10
+ /** The color of the spinner. */
6
11
  color?: ColorValue;
7
12
  }
8
13
  export default SpinnerProps;
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import type SpinnerProps from './Spinner.props';
3
+ /**
4
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
5
+ * another component, such as a `Button` or `Dialog`, while content is loading.
6
+ */
3
7
  declare const Spinner: React.ComponentType<SpinnerProps>;
4
8
  export default Spinner;
@@ -10,6 +10,10 @@ import { useTheme } from '../../hooks';
10
10
  import { getFlattenedColorValue } from '../../utils';
11
11
  const AnimatedSvg = Animated.createAnimatedComponent(Svg);
12
12
  const AnimatedCircle = Animated.createAnimatedComponent(Circle);
13
+ /**
14
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
15
+ * another component, such as a `Button` or `Dialog`, while content is loading.
16
+ */
13
17
  const SpinnerRoot = ({ size = 'md', color, ...props }) => {
14
18
  const { components } = useTheme();
15
19
  const width = components.spinner[size].size;
@@ -77,5 +81,9 @@ const styles = StyleSheet.create(theme => ({
77
81
  },
78
82
  },
79
83
  }));
84
+ /**
85
+ * Indicates that an asynchronous process is ongoing. Use it on its own or inside
86
+ * another component, such as a `Button` or `Dialog`, while content is loading.
87
+ */
80
88
  const Spinner = createSpinner({ Root: SpinnerRoot });
81
89
  export default Spinner;
@@ -1,4 +1,8 @@
1
1
  import StepperInputProps from './StepperInput.props';
2
+ /**
3
+ * Combines a numeric text input with decrement and increment controls. Use it when a value should
4
+ * stay within a defined range but still needs direct text entry.
5
+ */
2
6
  declare const StepperInput: {
3
7
  ({ value, defaultValue, onChangeText, onChangeValue, min, max, step, focusInputOnStepPress, validationStatus, disabled, readonly, focused, inBottomSheet, required, label, labelVariant, helperText, helperIcon, validText, invalidText, style, decrementAccessibilityLabel, incrementAccessibilityLabel, onFocus, onBlur, ref, ...props }: StepperInputProps): import("react").JSX.Element;
4
8
  displayName: string;
@@ -8,6 +8,10 @@ import { FormField } from '../FormField';
8
8
  import { InputComponent, InputField } from '../Input/Input';
9
9
  import StepperButton from './StepperButton';
10
10
  import { clampValue, formatNumber, getDecimalPlaces, normalizeValue, parseValue, sanitizeValue, } from './StepperInput.utils';
11
+ /**
12
+ * Combines a numeric text input with decrement and increment controls. Use it when a value should
13
+ * stay within a defined range but still needs direct text entry.
14
+ */
11
15
  const StepperInput = ({ value, defaultValue, onChangeText, onChangeValue, min, max, step = 1, focusInputOnStepPress = false, validationStatus = 'initial', disabled = false, readonly = false, focused = false, inBottomSheet = false, required = true, label, labelVariant = 'body', helperText, helperIcon, validText, invalidText, style, decrementAccessibilityLabel = 'Decrease value', incrementAccessibilityLabel = 'Increase value', onFocus, onBlur, ref, ...props }) => {
12
16
  const inputRef = useRef(null);
13
17
  const isControlled = value !== undefined;
@@ -2,30 +2,74 @@ import type { ComponentType, Ref } from 'react';
2
2
  import type { TextInput, TextInputProps, ViewProps } from 'react-native';
3
3
  export interface StepperBaseProps {
4
4
  ref?: Ref<TextInput>;
5
+ /** Disables the input and both stepper buttons.
6
+ * @default false
7
+ */
5
8
  disabled?: boolean;
9
+ /** Validation styling for the input.
10
+ * @default 'initial'
11
+ */
6
12
  validationStatus?: 'initial' | 'valid' | 'invalid';
13
+ /** Prevents editing and disables both buttons.
14
+ * @default false
15
+ */
7
16
  readonly?: boolean;
17
+ /** Forces the focused visual state on the input.
18
+ * @default false
19
+ */
8
20
  focused?: boolean;
9
21
  placeholder?: string;
22
+ /** Renders using `BottomSheetTextInput` for use inside a bottom sheet.
23
+ * @default false
24
+ */
10
25
  inBottomSheet?: boolean;
26
+ /** Indicates the input is required.
27
+ * @default true
28
+ */
11
29
  required?: boolean;
30
+ /** Label shown above the stepper. */
12
31
  label?: string;
32
+ /** Typography variant used for the label.
33
+ * @default 'body'
34
+ */
13
35
  labelVariant?: 'heading' | 'body';
36
+ /** Helper text shown below the label. */
14
37
  helperText?: string;
38
+ /** Icon shown next to the helper text. */
15
39
  helperIcon?: ComponentType;
40
+ /** Validation text shown when `validationStatus` is `'valid'`. */
16
41
  validText?: string;
42
+ /** Validation text shown when `validationStatus` is `'invalid'`. */
17
43
  invalidText?: string;
44
+ /** Controlled value displayed in the input. */
18
45
  value?: number | string;
46
+ /** Initial value for uncontrolled usage. */
19
47
  defaultValue?: number;
48
+ /** Minimum allowed numeric value. */
20
49
  min?: number;
50
+ /** Maximum allowed numeric value. */
21
51
  max?: number;
52
+ /** Amount added or removed when a step button is pressed.
53
+ * @default 1
54
+ */
22
55
  step?: number;
56
+ /** Called whenever the current text can be parsed as a number. */
23
57
  onChangeValue?: (value: number) => void;
58
+ /** Moves focus to the text input after a step button updates the value.
59
+ * @default false
60
+ */
24
61
  focusInputOnStepPress?: boolean;
62
+ /** Accessibility label for the decrement button.
63
+ * @default 'Decrease value'
64
+ */
25
65
  decrementAccessibilityLabel?: string;
66
+ /** Accessibility label for the increment button.
67
+ * @default 'Increase value'
68
+ */
26
69
  incrementAccessibilityLabel?: string;
27
70
  }
28
71
  export type StepperInputProps = StepperBaseProps & Omit<TextInputProps, 'children' | 'value' | 'defaultValue' | 'onChangeText' | 'editable' | 'keyboardType'> & ViewProps & {
72
+ /** Called whenever the displayed string changes. */
29
73
  onChangeText?: (text: string) => void;
30
74
  };
31
75
  export default StepperInputProps;
@@ -1,3 +1,7 @@
1
1
  import SwitchProps from './Switch.props';
2
+ /**
3
+ * Toggles a single setting on or off. Use it to activate or deactivate an individual
4
+ * option, typically inside a form field or list item.
5
+ */
2
6
  declare const CustomSwitch: ({ value, onValueChange, disabled, size, ...accessibilityProps }: SwitchProps) => import("react").JSX.Element;
3
7
  export default CustomSwitch;
@@ -7,6 +7,10 @@ import { StyleSheet } from 'react-native-unistyles';
7
7
  import { useAnimatedTheme } from 'react-native-unistyles/reanimated';
8
8
  import { useTheme } from '../../hooks';
9
9
  import { Icon } from '../Icon';
10
+ /**
11
+ * Toggles a single setting on or off. Use it to activate or deactivate an individual
12
+ * option, typically inside a form field or list item.
13
+ */
10
14
  const CustomSwitch = ({ value = false, onValueChange, disabled = false, size = 'md', ...accessibilityProps }) => {
11
15
  const { components } = useTheme();
12
16
  const theme = useAnimatedTheme();
@@ -6,7 +6,12 @@ type SwitchSize = 'sm' | 'md';
6
6
  */
7
7
  type DeprecatedSwitchSize = 'small' | 'medium';
8
8
  interface SwitchProps extends PressableProps, AccessibilityProps {
9
+ /**
10
+ * The value of the switch.
11
+ * @default false
12
+ */
9
13
  value: boolean;
14
+ /** Called when the switch value changes. */
10
15
  onValueChange?: (value: boolean) => void;
11
16
  disabled?: boolean;
12
17
  /**
@@ -1,4 +1,8 @@
1
1
  import type { TableProps } from './Table.props';
2
+ /**
3
+ * Arranges structured data into rows and columns, with optional pagination beneath the rows.
4
+ * Scrolls horizontally when the columns need more space than the viewport allows.
5
+ */
2
6
  declare const Table: {
3
7
  ({ children, columnWidths, container, pagination, style, ...props }: TableProps): import("react").JSX.Element;
4
8
  displayName: string;
@@ -34,6 +34,10 @@ const getMaxColumnCount = (children) => {
34
34
  });
35
35
  return maxColumns;
36
36
  };
37
+ /**
38
+ * Arranges structured data into rows and columns, with optional pagination beneath the rows.
39
+ * Scrolls horizontally when the columns need more space than the viewport allows.
40
+ */
37
41
  const Table = ({ children, columnWidths = [], container = 'none', pagination, style, ...props }) => {
38
42
  const [containerWidth, setContainerWidth] = useState(0);
39
43
  const columnCount = getMaxColumnCount(children);
@@ -27,6 +27,7 @@ export interface TableBodyProps extends ViewProps {
27
27
  children: ReactNode;
28
28
  }
29
29
  export interface TableHeaderProps extends ViewProps {
30
+ /** TableHeaderCell elements rendered as the header row. */
30
31
  children: ReactNode;
31
32
  /**
32
33
  * Visual style for header cells.
@@ -41,7 +42,12 @@ export interface TableCellProps extends ViewProps {
41
42
  children?: ReactNode;
42
43
  }
43
44
  export interface TableHeaderCellProps extends ViewProps {
45
+ /** Cell content; strings and numbers are rendered as body text. */
44
46
  children?: ReactNode;
47
+ /**
48
+ * Visual style for the cell, normally set automatically by the parent TableHeader.
49
+ * @default 'white'
50
+ */
45
51
  color?: 'purple' | 'white';
46
52
  /**
47
53
  * Renders the header cell as a row header within the body.
@@ -1,4 +1,7 @@
1
1
  import { TableHeaderProps } from './Table.props';
2
+ /**
3
+ * Renders a row of TableHeaderCell elements as the header of a Table.
4
+ */
2
5
  declare const TableHeader: {
3
6
  ({ children, color, style, ...props }: TableHeaderProps): import("react").JSX.Element;
4
7
  displayName: string;
@@ -1,6 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children, cloneElement, isValidElement } from 'react';
3
3
  import { View } from 'react-native';
4
+ /**
5
+ * Renders a row of TableHeaderCell elements as the header of a Table.
6
+ */
4
7
  const TableHeader = ({ children, color = 'purple', style, ...props }) => {
5
8
  const items = Children.toArray(children);
6
9
  return (_jsx(View, { ...props, style: [styles.header, style], children: items.map((child, index) => {
@@ -1,8 +1,14 @@
1
1
  import type { TableHeaderCellProps } from './Table.props';
2
+ /**
3
+ * Renders a single header cell within a TableHeader row, or a row header when used with `row`.
4
+ */
2
5
  declare const TableHeaderCell: {
3
6
  ({ children, color, row, style, trailingContent, ...props }: TableHeaderCellProps & {
7
+ /** Zero-based index of this cell among its siblings, set automatically by TableHeader. */
4
8
  columnIndex?: number;
9
+ /** Whether this is the last cell in its row, set automatically by TableHeader. */
5
10
  isLast?: boolean;
11
+ /** Whether this cell belongs to the last body row, used to omit the bottom border. */
6
12
  isLastRow?: boolean;
7
13
  }): import("react").JSX.Element;
8
14
  displayName: string;
@@ -12,6 +12,9 @@ const renderContent = (children, weight = 'semibold', color = 'white') => {
12
12
  }
13
13
  return children;
14
14
  };
15
+ /**
16
+ * Renders a single header cell within a TableHeader row, or a row header when used with `row`.
17
+ */
15
18
  const TableHeaderCell = ({ children, color = 'white', row = false, style, trailingContent, ...props }) => {
16
19
  const { columnWidths, container, hasPagination } = useTableContext();
17
20
  const { columnIndex = 0, isLast, isLastRow, ...rest } = props;
@@ -1,4 +1,9 @@
1
1
  import type TabsProps from './Tabs.props';
2
+ /**
3
+ * Groups Tab components into a single tab bar, managing selection state and the animated
4
+ * active indicator. Use with TabPanel to link tabs to their corresponding content.
5
+ * @summary A tab bar for switching between related views.
6
+ */
2
7
  declare const Tabs: {
3
8
  ({ value: controlledValue, defaultValue, onValueChange, size, disabled, children, ...props }: TabsProps): import("react").JSX.Element;
4
9
  displayName: string;
@@ -3,6 +3,11 @@ import { Children, isValidElement, useCallback, useEffect, useMemo, useRef, useS
3
3
  import { View } from 'react-native';
4
4
  import { Easing, useSharedValue, withTiming } from 'react-native-reanimated';
5
5
  import { TabsContext } from './Tabs.context';
6
+ /**
7
+ * Groups Tab components into a single tab bar, managing selection state and the animated
8
+ * active indicator. Use with TabPanel to link tabs to their corresponding content.
9
+ * @summary A tab bar for switching between related views.
10
+ */
6
11
  const Tabs = ({ value: controlledValue, defaultValue, onValueChange, size = 'md', disabled, children, ...props }) => {
7
12
  // Collect child tab values
8
13
  const tabValues = useMemo(() => {
@@ -7,5 +7,11 @@ export declare const TextareaComponent: import("@gluestack-ui/textarea/lib/types
7
7
  };
8
8
  }, import("react-native").TextInputProps>;
9
9
  export declare const TextareaField: import("react").ForwardRefExoticComponent<import("react-native").TextInputProps & import("react").RefAttributes<import("react-native").TextInputProps> & import("@gluestack-ui/textarea/lib/typescript/types").IInputProps>;
10
+ /**
11
+ * A multi-line text field for entering longer form content, optionally resizable by dragging
12
+ * a handle. Renders as a form field with label, helper, and validation text, or as a plain
13
+ * container when used with children such as TextareaField.
14
+ * @summary A multi-line text input field.
15
+ */
10
16
  declare const Textarea: ({ validationStatus, children, resizable, defaultHeight, disabled, focused, readonly, label, labelVariant, helperText, validText, invalidText, required, helperIcon, onLayout, ...props }: TextareaProps) => import("react").JSX.Element;
11
17
  export default Textarea;
@@ -18,6 +18,12 @@ export const TextareaField = TextareaComponent.Input;
18
18
  const DEFAULT_TEXTAREA_HEIGHT = 96;
19
19
  const RESIZE_HANDLE_TOUCH_SIZE = 28;
20
20
  const RESIZE_HANDLE_ICON_SIZE = 9;
21
+ /**
22
+ * A multi-line text field for entering longer form content, optionally resizable by dragging
23
+ * a handle. Renders as a form field with label, helper, and validation text, or as a plain
24
+ * container when used with children such as TextareaField.
25
+ * @summary A multi-line text input field.
26
+ */
21
27
  const Textarea = ({ validationStatus = 'initial', children, resizable = false, defaultHeight, disabled, focused, readonly, label, labelVariant, helperText, validText, invalidText, required, helperIcon, onLayout, ...props }) => {
22
28
  const formFieldContext = useFormFieldContext();
23
29
  const hasMeasuredHeight = useRef(false);
@@ -41,16 +41,30 @@ export interface TextareaBaseProps {
41
41
  * ```
42
42
  */
43
43
  validationStatus?: 'initial' | 'valid' | 'invalid';
44
+ /** Makes the textarea read-only. */
44
45
  readonly?: boolean;
46
+ /** Sets focus on the textarea. */
45
47
  focused?: boolean;
48
+ /** Placeholder text shown when the textarea is empty. */
46
49
  placeholder?: string;
50
+ /** Label for the textarea. Only used when the textarea has no children. */
47
51
  label?: string;
52
+ /**
53
+ * Visual variant of the label text. Only used when the textarea has no children.
54
+ * @default 'body'
55
+ */
48
56
  labelVariant?: 'heading' | 'body';
57
+ /** Helper text shown below the textarea. Only used when the textarea has no children. */
49
58
  helperText?: string;
59
+ /** Icon shown alongside the helper text. Only used when the textarea has no children. */
50
60
  helperIcon?: React.ComponentType;
61
+ /** Text shown when `validationStatus` is `'valid'`. Only used when the textarea has no children. */
51
62
  validText?: string;
63
+ /** Text shown when `validationStatus` is `'invalid'`. */
52
64
  invalidText?: string;
65
+ /** Whether the textarea is required. Only used when the textarea has no children. */
53
66
  required?: boolean;
67
+ /** Adjusts styling when the textarea is rendered inside a bottom sheet. */
54
68
  isInBottomSheet?: boolean;
55
69
  }
56
70
  export interface TextareaWithChildrenProps extends TextareaBaseProps, ViewProps {
@@ -1,4 +1,9 @@
1
1
  import type { TimePickerProps } from './TimePicker.props';
2
+ /**
3
+ * Presents a wheel-based hour and minute selector inside a bottom sheet, opened imperatively
4
+ * via a ref. Supports 12-hour and 24-hour clocks and reports the picked time as a `Date`.
5
+ * @summary A bottom-sheet time picker.
6
+ */
2
7
  declare const TimePicker: {
3
8
  ({ timeZone, date, onChange, use12Hours, minuteInterval, hideFooter, style, ref, onCancel, }: TimePickerProps): import("react").JSX.Element;
4
9
  displayName: string;
@@ -13,6 +13,11 @@ dayjs.extend(timezone);
13
13
  const Footer = ({ onCancel, onConfirm }) => {
14
14
  return (_jsxs(RNView, { style: styles.footer, testID: "footer", children: [_jsx(Button, { variant: "ghost", colorScheme: "functional", onPress: onCancel, children: "Cancel" }), _jsx(Button, { variant: "ghost", colorScheme: "functional", onPress: onConfirm, children: "Ok" })] }));
15
15
  };
16
+ /**
17
+ * Presents a wheel-based hour and minute selector inside a bottom sheet, opened imperatively
18
+ * via a ref. Supports 12-hour and 24-hour clocks and reports the picked time as a `Date`.
19
+ * @summary A bottom-sheet time picker.
20
+ */
16
21
  const TimePicker = ({ timeZone, date, onChange, use12Hours, minuteInterval, hideFooter, style, ref, onCancel = () => { }, }) => {
17
22
  dayjs.tz.setDefault(timeZone);
18
23
  dayjs.locale('en');
@@ -22,6 +27,9 @@ const TimePicker = ({ timeZone, date, onChange, use12Hours, minuteInterval, hide
22
27
  const [currentDate, setCurrentDate] = useState(() => {
23
28
  return date ? dayjs.tz(date, timeZone) : dayjs().tz(timeZone);
24
29
  });
30
+ // Tracks whether a wheel change was made since the sheet last opened, so Ok
31
+ // doesn't re-emit onChange for a value it already just committed via the wheel.
32
+ const hasChangedRef = useRef(false);
25
33
  useEffect(() => {
26
34
  const nextDate = date ? dayjs.tz(date, timeZone) : dayjs().tz(timeZone);
27
35
  const isSameMinute = dayjs(currentDate).isSame(nextDate, 'minute');
@@ -34,6 +42,7 @@ const TimePicker = ({ timeZone, date, onChange, use12Hours, minuteInterval, hide
34
42
  }, []);
35
43
  const handleSelectDate = useCallback((selectedDate) => {
36
44
  const newDate = dayjs.tz(selectedDate ?? currentDate, timeZone);
45
+ hasChangedRef.current = true;
37
46
  if (!dayjs(currentDate).isSame(newDate, 'minute')) {
38
47
  setCurrentDate(newDate);
39
48
  }
@@ -44,10 +53,14 @@ const TimePicker = ({ timeZone, date, onChange, use12Hours, minuteInterval, hide
44
53
  closeTimePicker();
45
54
  }, [closeTimePicker, onCancel]);
46
55
  const handleConfirm = useCallback(() => {
56
+ if (!hasChangedRef.current) {
57
+ onChange?.({ date: currentDate ? dayjs(currentDate).toDate() : currentDate });
58
+ }
47
59
  closeTimePicker();
48
- }, [closeTimePicker]);
60
+ }, [currentDate, onChange, closeTimePicker]);
49
61
  const handleChange = useCallback((index) => {
50
62
  if (index > -1) {
63
+ hasChangedRef.current = false;
51
64
  setTimeout(() => {
52
65
  AccessibilityInfo.announceForAccessibility('Time picker opened.');
53
66
  const targetRef = pickerViewRef.current;
@@ -6,6 +6,7 @@ import { StyleSheet } from 'react-native-unistyles';
6
6
  import { BodyText } from '../BodyText';
7
7
  import { formatNumber, getParsedDate } from '../DatePicker/utils';
8
8
  import TimePickerWheel from './TimePickerWheel';
9
+ import { getClosestOption } from './utils';
9
10
  const createNumberList = (num, numerals, startFrom = 0) => {
10
11
  return Array.from({ length: num }, (_, i) => ({
11
12
  value: i + startFrom,
@@ -24,23 +25,6 @@ const createMinuteList = (interval, numerals) => {
24
25
  : `${formatNumber(value, numerals)}`,
25
26
  }));
26
27
  };
27
- const getClosestMinute = (value, options) => {
28
- if (!options.length)
29
- return value;
30
- const values = options.map(option => option.value);
31
- if (values.includes(value))
32
- return value;
33
- let closest = values[0] ?? value;
34
- let closestDiff = Math.abs(value - closest);
35
- values.forEach(optionValue => {
36
- const diff = Math.abs(value - optionValue);
37
- if (diff < closestDiff) {
38
- closestDiff = diff;
39
- closest = optionValue;
40
- }
41
- });
42
- return closest;
43
- };
44
28
  const TimePickerView = ({ currentDate, onSelectDate, timeZone, use12Hours, minuteInterval = 1, }) => {
45
29
  const hours = useMemo(() => createNumberList(use12Hours ? 12 : 24, 'latn', use12Hours ? 1 : 0), [use12Hours]);
46
30
  const minutes = useMemo(() => createMinuteList(minuteInterval, 'latn'), [minuteInterval]);
@@ -50,7 +34,9 @@ const TimePickerView = ({ currentDate, onSelectDate, timeZone, use12Hours, minut
50
34
  ], []);
51
35
  const baseDate = currentDate;
52
36
  const { hour, hour12, minute, period } = getParsedDate(baseDate);
53
- const minuteValue = useMemo(() => getClosestMinute(minute, minutes), [minute, minutes]);
37
+ const rawHour = use12Hours ? hour12 : hour;
38
+ const hourValue = useMemo(() => getClosestOption(rawHour, hours), [rawHour, hours]);
39
+ const minuteValue = useMemo(() => getClosestOption(minute, minutes), [minute, minutes]);
54
40
  const handleChangeHour = useCallback((value) => {
55
41
  let hour24 = value;
56
42
  if (use12Hours) {
@@ -85,7 +71,7 @@ const TimePickerView = ({ currentDate, onSelectDate, timeZone, use12Hours, minut
85
71
  const newDate = dayjs.tz(baseDate, timeZone).hour(newHour);
86
72
  onSelectDate(newDate);
87
73
  }, [baseDate, onSelectDate, timeZone, hour, hour12]);
88
- return (_jsxs(View, { style: styles.container, testID: "time-selector", children: [_jsxs(View, { style: styles.timePickerContainer, children: [_jsx(View, { style: styles.wheelContainer, children: _jsx(TimePickerWheel, { value: use12Hours ? hour12 : hour, items: hours, setValue: handleChangeHour }) }), _jsx(BodyText, { style: styles.timeSeparator, size: "lg", children: ":" }), _jsx(View, { style: styles.wheelContainer, children: _jsx(TimePickerWheel, { value: minuteValue, items: minutes, setValue: handleChangeMinute }) })] }), use12Hours && period ? (_jsx(View, { style: styles.periodContainer, children: _jsx(TimePickerWheel, { value: period, items: periodOptions, setValue: handlePeriodChange }) })) : null] }));
74
+ return (_jsxs(View, { style: styles.container, testID: "time-selector", children: [_jsxs(View, { style: styles.timePickerContainer, children: [_jsx(View, { style: styles.wheelContainer, children: _jsx(TimePickerWheel, { value: hourValue, items: hours, setValue: handleChangeHour }) }), _jsx(BodyText, { style: styles.timeSeparator, size: "lg", children: ":" }), _jsx(View, { style: styles.wheelContainer, children: _jsx(TimePickerWheel, { value: minuteValue, items: minutes, setValue: handleChangeMinute }) })] }), use12Hours && period ? (_jsx(View, { style: styles.periodContainer, children: _jsx(TimePickerWheel, { value: period, items: periodOptions, setValue: handlePeriodChange }) })) : null] }));
89
75
  };
90
76
  const styles = StyleSheet.create({
91
77
  container: {