@utilitywarehouse/hearth-react-native 0.36.0 → 0.36.2

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 (219) 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.d.ts +14 -0
  59. package/build/components/DatePicker/DatePicker.js +4 -0
  60. package/build/components/DatePicker/DatePicker.props.d.ts +78 -0
  61. package/build/components/DatePickerInput/DatePickerInput.d.ts +4 -0
  62. package/build/components/DatePickerInput/DatePickerInput.js +4 -0
  63. package/build/components/DatePickerInput/DatePickerInput.props.d.ts +21 -0
  64. package/build/components/DescriptionList/DescriptionList.d.ts +4 -0
  65. package/build/components/DescriptionList/DescriptionList.js +4 -0
  66. package/build/components/DescriptionList/DescriptionList.props.d.ts +4 -0
  67. package/build/components/DetailText/DetailText.d.ts +4 -0
  68. package/build/components/DetailText/DetailText.js +4 -0
  69. package/build/components/Divider/Divider.d.ts +4 -0
  70. package/build/components/Divider/Divider.js +4 -0
  71. package/build/components/Divider/Divider.props.d.ts +10 -0
  72. package/build/components/Expandable/Expandable.d.ts +5 -0
  73. package/build/components/Expandable/Expandable.js +5 -0
  74. package/build/components/ExpandableCard/ExpandableCard.d.ts +4 -0
  75. package/build/components/ExpandableCard/ExpandableCard.js +4 -0
  76. package/build/components/Flex/Flex.d.ts +4 -0
  77. package/build/components/Flex/Flex.js +4 -0
  78. package/build/components/Flex/Flex.props.d.ts +20 -0
  79. package/build/components/FormField/FormField.d.ts +5 -0
  80. package/build/components/FormField/FormField.js +5 -0
  81. package/build/components/FormField/FormField.props.d.ts +24 -0
  82. package/build/components/Grid/Grid.d.ts +4 -0
  83. package/build/components/Grid/Grid.js +4 -0
  84. package/build/components/HTMLElements/ListItem.d.ts +5 -0
  85. package/build/components/HTMLElements/OrderedList.d.ts +10 -0
  86. package/build/components/HTMLElements/OrderedList.js +4 -0
  87. package/build/components/HTMLElements/UnorderedList.d.ts +10 -0
  88. package/build/components/HTMLElements/UnorderedList.js +4 -0
  89. package/build/components/Heading/Heading.d.ts +4 -0
  90. package/build/components/Heading/Heading.js +4 -0
  91. package/build/components/HighlightBanner/HighlightBanner.d.ts +5 -0
  92. package/build/components/HighlightBanner/HighlightBanner.js +5 -0
  93. package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
  94. package/build/components/HighlightBanner/HighlightBannerImage.d.ts +4 -0
  95. package/build/components/HighlightBanner/HighlightBannerImage.js +4 -0
  96. package/build/components/Icon/Icon.d.ts +4 -0
  97. package/build/components/Icon/Icon.js +4 -0
  98. package/build/components/Icon/Icon.props.d.ts +8 -0
  99. package/build/components/IconButton/IconButton.d.ts +5 -0
  100. package/build/components/IconButton/IconButton.js +5 -0
  101. package/build/components/IconButton/IconButton.props.d.ts +9 -0
  102. package/build/components/IconContainer/IconContainer.d.ts +4 -0
  103. package/build/components/IconContainer/IconContainer.js +4 -0
  104. package/build/components/IndicatorIconButton/IndicatorIconButton.d.ts +6 -0
  105. package/build/components/IndicatorIconButton/IndicatorIconButton.js +6 -0
  106. package/build/components/InlineLink/InlineLink.d.ts +1 -0
  107. package/build/components/InlineLink/InlineLink.js +1 -0
  108. package/build/components/InlineLink/InlineLink.props.d.ts +4 -0
  109. package/build/components/Input/Input.d.ts +5 -0
  110. package/build/components/Input/Input.js +5 -0
  111. package/build/components/Input/Input.props.d.ts +54 -0
  112. package/build/components/Link/Link.d.ts +5 -0
  113. package/build/components/Link/Link.js +5 -0
  114. package/build/components/Link/Link.props.d.ts +15 -0
  115. package/build/components/List/List.d.ts +1 -0
  116. package/build/components/List/List.js +1 -0
  117. package/build/components/List/List.props.d.ts +8 -0
  118. package/build/components/Menu/Menu.d.ts +1 -0
  119. package/build/components/Menu/Menu.js +1 -0
  120. package/build/components/Modal/Modal.d.ts +5 -0
  121. package/build/components/Modal/Modal.js +5 -1
  122. package/build/components/Modal/Modal.props.d.ts +6 -0
  123. package/build/components/Modal/Modal.shared.types.d.ts +32 -0
  124. package/build/components/Modal/ModalImage.d.ts +1 -0
  125. package/build/components/Modal/ModalImage.js +1 -0
  126. package/build/components/NavModal/NavModal.d.ts +8 -0
  127. package/build/components/NavModal/NavModal.js +8 -0
  128. package/build/components/NavModal/NavModal.props.d.ts +10 -0
  129. package/build/components/Pagination/Pagination.d.ts +5 -0
  130. package/build/components/Pagination/Pagination.js +5 -0
  131. package/build/components/PillGroup/Pill.d.ts +1 -0
  132. package/build/components/PillGroup/Pill.js +1 -0
  133. package/build/components/PillGroup/PillGroup.d.ts +5 -0
  134. package/build/components/PillGroup/PillGroup.js +5 -0
  135. package/build/components/ProgressBar/ProgressBar.d.ts +5 -0
  136. package/build/components/ProgressBar/ProgressBar.js +5 -0
  137. package/build/components/ProgressBar/ProgressBar.props.d.ts +4 -0
  138. package/build/components/ProgressStepper/ProgressStep.d.ts +13 -0
  139. package/build/components/ProgressStepper/ProgressStep.js +5 -0
  140. package/build/components/ProgressStepper/ProgressStepper.d.ts +5 -0
  141. package/build/components/ProgressStepper/ProgressStepper.js +5 -0
  142. package/build/components/Radio/Radio.d.ts +5 -0
  143. package/build/components/Radio/Radio.js +5 -0
  144. package/build/components/Radio/Radio.props.d.ts +17 -0
  145. package/build/components/Radio/RadioGroup.d.ts +5 -0
  146. package/build/components/Radio/RadioGroup.js +5 -0
  147. package/build/components/Radio/RadioGroup.props.d.ts +25 -0
  148. package/build/components/RadioCard/RadioCard.d.ts +10 -0
  149. package/build/components/RadioCard/RadioCard.js +10 -0
  150. package/build/components/RadioCard/RadioCard.props.d.ts +14 -0
  151. package/build/components/RadioCard/RadioCardGroup.d.ts +4 -0
  152. package/build/components/RadioCard/RadioCardGroup.js +4 -0
  153. package/build/components/RadioCard/RadioCardGroup.props.d.ts +17 -0
  154. package/build/components/Rating/Rating.d.ts +5 -0
  155. package/build/components/Rating/Rating.js +5 -0
  156. package/build/components/Roundel/Roundel.d.ts +1 -0
  157. package/build/components/Roundel/Roundel.js +1 -0
  158. package/build/components/SectionHeader/SectionHeader.d.ts +1 -0
  159. package/build/components/SectionHeader/SectionHeader.js +1 -0
  160. package/build/components/SectionHeader/SectionHeader.props.d.ts +7 -0
  161. package/build/components/SegmentedControl/SegmentedControl.d.ts +5 -0
  162. package/build/components/SegmentedControl/SegmentedControl.js +5 -0
  163. package/build/components/Select/Select.d.ts +5 -0
  164. package/build/components/Select/Select.js +5 -0
  165. package/build/components/Skeleton/Skeleton.d.ts +1 -0
  166. package/build/components/Skeleton/Skeleton.js +1 -0
  167. package/build/components/Skeleton/Skeleton.props.d.ts +4 -0
  168. package/build/components/Spinner/Spinner.d.ts +4 -0
  169. package/build/components/Spinner/Spinner.js +8 -0
  170. package/build/components/Spinner/Spinner.props.d.ts +5 -0
  171. package/build/components/Spinner/Spinner.web.d.ts +4 -0
  172. package/build/components/Spinner/Spinner.web.js +8 -0
  173. package/build/components/StepperInput/StepperInput.d.ts +4 -0
  174. package/build/components/StepperInput/StepperInput.js +4 -0
  175. package/build/components/StepperInput/StepperInput.props.d.ts +44 -0
  176. package/build/components/Switch/Switch.d.ts +4 -0
  177. package/build/components/Switch/Switch.js +4 -0
  178. package/build/components/Switch/Switch.props.d.ts +5 -0
  179. package/build/components/Table/Table.d.ts +4 -0
  180. package/build/components/Table/Table.js +4 -0
  181. package/build/components/Table/Table.props.d.ts +6 -0
  182. package/build/components/Table/TableHeader.d.ts +3 -0
  183. package/build/components/Table/TableHeader.js +3 -0
  184. package/build/components/Table/TableHeaderCell.d.ts +6 -0
  185. package/build/components/Table/TableHeaderCell.js +3 -0
  186. package/build/components/Tabs/Tabs.d.ts +5 -0
  187. package/build/components/Tabs/Tabs.js +5 -0
  188. package/build/components/Textarea/Textarea.d.ts +6 -0
  189. package/build/components/Textarea/Textarea.js +6 -0
  190. package/build/components/Textarea/Textarea.props.d.ts +14 -0
  191. package/build/components/TimePicker/TimePicker.d.ts +5 -0
  192. package/build/components/TimePicker/TimePicker.js +5 -0
  193. package/build/components/TimePickerInput/TimePickerInput.d.ts +5 -0
  194. package/build/components/TimePickerInput/TimePickerInput.js +5 -0
  195. package/build/components/TimePickerInput/TimePickerInput.props.d.ts +28 -0
  196. package/build/components/Timeline/Timeline.d.ts +5 -0
  197. package/build/components/Timeline/Timeline.js +5 -0
  198. package/build/components/Timeline/TimelineItem.d.ts +4 -0
  199. package/build/components/Timeline/TimelineItem.js +4 -0
  200. package/build/components/Toast/Toast.context.d.ts +4 -0
  201. package/build/components/Toast/Toast.context.js +4 -0
  202. package/build/components/Toast/Toast.props.d.ts +7 -0
  203. package/build/components/ToggleButton/ToggleButton.d.ts +4 -0
  204. package/build/components/ToggleButton/ToggleButton.js +4 -0
  205. package/build/components/ToggleButton/ToggleButton.props.d.ts +6 -0
  206. package/build/components/ToggleButtonCard/ToggleButtonCard.d.ts +8 -0
  207. package/build/components/ToggleButtonCard/ToggleButtonCard.js +8 -0
  208. package/build/components/ToggleButtonCard/ToggleButtonCard.props.d.ts +9 -0
  209. package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.d.ts +15 -0
  210. package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +5 -0
  211. package/build/components/UnstyledIconButton/UnstyledIconButton.js +5 -0
  212. package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +17 -0
  213. package/build/components/VerificationInput/VerificationInput.d.ts +4 -0
  214. package/build/components/VerificationInput/VerificationInput.js +4 -0
  215. package/package.json +8 -5
  216. package/public/llms/components/checkbox.md +6 -1
  217. package/public/llms/components/expandable-card.md +2 -2
  218. package/public/llms/components/modal.md +4 -0
  219. package/public/llms/docs/introduction.md +1 -1
@@ -1,13 +1,27 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  import CardProps from '../Card/Card.props';
3
3
  interface HighlightBannerProps extends Omit<CardProps, 'noPadding' | 'variant' | 'space' | 'gap' | 'rowGap' | 'columnGap' | 'flexDirection' | 'flexWrap' | 'alignItems' | 'justifyContent' | 'colorScheme'> {
4
+ /** The heading text displayed at the top with a coloured background. */
4
5
  heading?: string;
6
+ /** The semantic colour scheme for the heading background. */
5
7
  headingColor?: 'pig' | 'energy' | 'broadband' | 'mobile' | 'insurance' | 'cashback' | 'highlight';
8
+ /**
9
+ * Visual style variant with strong or subtle borders.
10
+ * @default 'emphasis'
11
+ */
6
12
  variant?: 'emphasis' | 'subtle';
13
+ /** The image component to be displayed in the banner. */
7
14
  image?: ReactNode;
15
+ /**
16
+ * Height of the image container in pixels.
17
+ * @default 200
18
+ */
8
19
  imageContainerHeight?: number;
20
+ /** Description text displayed below the image. */
9
21
  description?: string;
22
+ /** Optional Link component displayed below the description. */
10
23
  link?: ReactElement;
24
+ /** Optional Button component displayed below the description. */
11
25
  button?: ReactElement;
12
26
  }
13
27
  export default HighlightBannerProps;
@@ -1,4 +1,8 @@
1
1
  import { ImageProps } from 'react-native';
2
2
  import { ThemedImageProps } from '../ThemedImage';
3
+ /**
4
+ * Use HighlightBannerImage to render the image inside a HighlightBanner. Pass either standard
5
+ * `Image` props, or `light`/`dark` sources to render a theme-aware image.
6
+ */
3
7
  declare const HighlightBannerImage: (props: ImageProps | ThemedImageProps) => import("react").JSX.Element;
4
8
  export default HighlightBannerImage;
@@ -3,6 +3,10 @@ import { Image } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { isThemedImageProps } from '../../utils';
5
5
  import { ThemedImage } from '../ThemedImage';
6
+ /**
7
+ * Use HighlightBannerImage to render the image inside a HighlightBanner. Pass either standard
8
+ * `Image` props, or `light`/`dark` sources to render a theme-aware image.
9
+ */
6
10
  const HighlightBannerImage = (props) => {
7
11
  if (isThemedImageProps(props)) {
8
12
  return _jsx(ThemedImage, { ...props, style: [styles.image, props.style] });
@@ -1,4 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type IconProps from './Icon.props';
3
+ /**
4
+ * Use Icon to render an SVG icon component (from `@utilitywarehouse/hearth-react-native-icons`
5
+ * or a custom SVG) with consistent sizing and theme-aware colouring.
6
+ */
3
7
  export declare const Icon: React.ForwardRefExoticComponent<IconProps>;
4
8
  export default Icon;
@@ -38,6 +38,10 @@ const PrimitiveIcon = withUnistyles(({ height, width, fill, color, size, stroke,
38
38
  return _jsx(Svg, { height: height, width: width, strokeWidth: 0, ...colorProps, ...props });
39
39
  });
40
40
  PrimitiveIcon.displayName = 'PrimitiveIcon';
41
+ /**
42
+ * Use Icon to render an SVG icon component (from `@utilitywarehouse/hearth-react-native-icons`
43
+ * or a custom SVG) with consistent sizing and theme-aware colouring.
44
+ */
41
45
  export const Icon = createIcon({
42
46
  Root: PrimitiveIcon,
43
47
  });
@@ -3,13 +3,21 @@ import type { SvgProps } from 'react-native-svg';
3
3
  import type { ColorValue } from '../../types';
4
4
  import { ComponentType } from 'react';
5
5
  interface IconProps extends SvgProps {
6
+ /** The height of the icon. */
6
7
  height?: number | string;
8
+ /** The width of the icon. */
7
9
  width?: number | string;
10
+ /** The fill color applied to the icon's SVG paths. */
8
11
  fill?: string;
12
+ /** The color of the icon. */
9
13
  color?: ColorValue;
14
+ /** Sets both the height and width of the icon. */
10
15
  size?: number | string;
16
+ /** The stroke color applied to the icon's SVG paths. */
11
17
  stroke?: string;
18
+ /** The icon component to render. */
12
19
  as?: ComponentType;
20
+ /** Style applied to the icon's root SVG element. */
13
21
  style?: SvgProps['style'] & {
14
22
  color?: RNColorValue;
15
23
  };
@@ -1,4 +1,9 @@
1
1
  import { IconButtonProps } from './IconButton.props';
2
+ /**
3
+ * Use IconButton to trigger an action or event, such as opening a dialog, cancelling an
4
+ * action, or performing a delete operation, when only an icon is needed rather than a
5
+ * labelled button.
6
+ */
2
7
  declare const IconButton: {
3
8
  ({ icon, disabled, pressed, ...props }: IconButtonProps): import("react").JSX.Element;
4
9
  displayName: string;
@@ -15,6 +15,11 @@ const IconButtonSpinner = IconButtonComponent.Spinner;
15
15
  const IconButtonIcon = IconButtonComponent.Icon;
16
16
  IconButtonSpinner.displayName = 'IconButtonSpinner';
17
17
  IconButtonIcon.displayName = 'IconButtonIcon';
18
+ /**
19
+ * Use IconButton to trigger an action or event, such as opening a dialog, cancelling an
20
+ * action, or performing a delete operation, when only an icon is needed rather than a
21
+ * labelled button.
22
+ */
18
23
  const IconButton = ({ icon, disabled = false, pressed, ...props }) => {
19
24
  const { disabled: groupDisabled, loading: groupLoading } = useButtonGroupContext();
20
25
  const { loading } = props;
@@ -4,11 +4,20 @@ import { ViewProps } from 'react-native-svg/lib/typescript/fabric/utils';
4
4
  import { ColorValue } from '../../types';
5
5
  import { ButtonVariants } from '../Button/Button.props';
6
6
  export type IconButtonProps = {
7
+ /**
8
+ * Disables the button.
9
+ * @default false
10
+ */
7
11
  disabled?: boolean;
12
+ /** The size of the button. */
8
13
  size?: 'sm' | 'md';
14
+ /** Changes the button to a pressed state. */
9
15
  pressed?: boolean;
16
+ /** The icon component to display on the button. */
10
17
  icon: ComponentType;
18
+ /** Changes the button to a loading state. */
11
19
  loading?: boolean;
20
+ /** Content rendered inside the button. */
12
21
  children?: ViewProps['children'];
13
22
  /**
14
23
  * Custom background color override.
@@ -1,4 +1,8 @@
1
1
  import type IconContainerProps from './IconContainer.props';
2
+ /**
3
+ * Use IconContainer to give a standalone icon a consistent background and sizing, with
4
+ * semantic colour families and subtle/emphasis variants.
5
+ */
2
6
  declare const IconContainer: {
3
7
  ({ icon: IconComp, size, radiusNone, variant, color, style, ...props }: IconContainerProps): import("react").JSX.Element;
4
8
  displayName: string;
@@ -2,6 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { Icon } from '../Icon';
5
+ /**
6
+ * Use IconContainer to give a standalone icon a consistent background and sizing, with
7
+ * semantic colour families and subtle/emphasis variants.
8
+ */
5
9
  const IconContainer = ({ icon: IconComp, size = 'md', radiusNone = false, variant = 'subtle', color = 'pig', style, ...props }) => {
6
10
  styles.useVariants({ size, radiusNone, variant, color });
7
11
  return (_jsx(View, { style: [styles.container, style], ...props, children: IconComp ? _jsx(Icon, { as: IconComp, style: styles.icon }) : null }));
@@ -1,5 +1,11 @@
1
1
  import React from 'react';
2
2
  import { IndicatorIconButtonProps } from './IndicatorIconButton.props';
3
+ /**
4
+ * Triggers an action or event, such as opening a dialog or navigating to another screen. Extends
5
+ * `UnstyledIconButton` with an optional red dot indicator in the top-right corner, for showing
6
+ * notifications or unread status.
7
+ * @summary An icon button with an optional notification indicator.
8
+ */
3
9
  declare const IndicatorIconButton: {
4
10
  ({ indicator, ...props }: IndicatorIconButtonProps): React.JSX.Element;
5
11
  displayName: string;
@@ -2,6 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { UnstyledIconButton } from '../UnstyledIconButton';
5
+ /**
6
+ * Triggers an action or event, such as opening a dialog or navigating to another screen. Extends
7
+ * `UnstyledIconButton` with an optional red dot indicator in the top-right corner, for showing
8
+ * notifications or unread status.
9
+ * @summary An icon button with an optional notification indicator.
10
+ */
5
11
  const IndicatorIconButton = ({ indicator = false, ...props }) => {
6
12
  return (_jsxs(View, { style: styles.container, children: [_jsx(UnstyledIconButton, { size: "md", ...props }), indicator && _jsx(View, { style: styles.indicator })] }));
7
13
  };
@@ -1,4 +1,5 @@
1
1
  import type { InlineLinkProps } from './InlineLink.props';
2
+ /** Use InlineLink to embed a hyperlink within a sentence or paragraph of body text, inheriting the surrounding typography style. */
2
3
  declare const InlineLink: {
3
4
  ({ children, disabled, target, rel, ...props }: InlineLinkProps): import("react").JSX.Element;
4
5
  displayName: string;
@@ -5,6 +5,7 @@ const InlineLinkComponent = createLink({
5
5
  Root: InlineLinkRoot,
6
6
  Text: () => null,
7
7
  });
8
+ /** Use InlineLink to embed a hyperlink within a sentence or paragraph of body text, inheriting the surrounding typography style. */
8
9
  const InlineLink = ({ children, disabled = false, target = '_self', rel, ...props }) => {
9
10
  const InlineLinkAny = InlineLinkComponent;
10
11
  // `@gluestack-ui/link`'s `useLink` only ever applies `target`/`rel` via a ref
@@ -1,9 +1,13 @@
1
1
  import { TextProps } from 'react-native';
2
2
  export interface InlineLinkProps extends TextProps {
3
+ /** The URL to navigate to. */
3
4
  href?: string;
5
+ /** The target of the link.
6
+ * @default '_self' */
4
7
  target?: '_blank' | '_self' | '_parent' | '_top';
5
8
  /** Defaults to `noopener noreferrer` when `target` is `_blank`. */
6
9
  rel?: string;
10
+ /** Invert the link colours for purple backgrounds. */
7
11
  inverted?: boolean;
8
12
  disabled?: boolean;
9
13
  }
@@ -23,5 +23,10 @@ export declare const InputIcon: import("react").ForwardRefExoticComponent<import
23
23
  }> & import("..").IconProps & {
24
24
  as?: ComponentType;
25
25
  }>;
26
+ /**
27
+ * Use Input for a text field that lets users enter text, numbers, or other data, commonly in forms and search fields.
28
+ * Renders as a plain, password, or search field, or accepts children for a fully custom layout built from `InputField`, `InputSlot`, and `InputIcon`.
29
+ * @summary A configurable text field for forms and search.
30
+ */
26
31
  declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<TextInput>>;
27
32
  export default Input;
@@ -20,6 +20,11 @@ export const InputComponent = createInput({
20
20
  export const InputSlot = InputComponent.Slot;
21
21
  export const InputField = InputComponent.Input;
22
22
  export const InputIcon = InputComponent.Icon;
23
+ /**
24
+ * Use Input for a text field that lets users enter text, numbers, or other data, commonly in forms and search fields.
25
+ * Renders as a plain, password, or search field, or accepts children for a fully custom layout built from `InputField`, `InputSlot`, and `InputIcon`.
26
+ * @summary A configurable text field for forms and search.
27
+ */
23
28
  const Input = forwardRef(({ validationStatus = 'initial', children, disabled, focused, readonly, leadingIcon, trailingIcon, type, showPasswordToggle = true, onClear, loading, clearable = false, required = true, inBottomSheet = false, style, label, labelVariant, helperText, helperIcon, validText, invalidText, prefix, suffix, ...props }, ref) => {
24
29
  const formFieldContext = useFormFieldContext();
25
30
  const inputLabel = label ?? formFieldContext?.label;
@@ -22,65 +22,119 @@ export interface InputBaseProps {
22
22
  * ```
23
23
  */
24
24
  validationStatus?: 'initial' | 'valid' | 'invalid';
25
+ /** Makes the input read-only. */
25
26
  readonly?: boolean;
27
+ /** Sets focus on the input. */
26
28
  focused?: boolean;
29
+ /** The placeholder text for the input. */
27
30
  placeholder?: string;
31
+ /** Indicates the input is rendered inside a bottom sheet.
32
+ * @default false */
28
33
  inBottomSheet?: boolean;
34
+ /** The label for the input; only used when the input has no children. */
29
35
  label?: string;
36
+ /** The text variant used for the label; only used when the input has no children. */
30
37
  labelVariant?: 'heading' | 'body';
38
+ /** Helper text displayed below the input; only used when the input has no children. */
31
39
  helperText?: string;
40
+ /** Icon displayed alongside the helper text; only used when the input has no children. */
32
41
  helperIcon?: ComponentType;
42
+ /** Text shown when the validation status is `valid`. */
33
43
  validText?: string;
44
+ /** Text shown when the validation status is `invalid`. */
34
45
  invalidText?: string;
46
+ /** Indicates the input is required.
47
+ * @default true */
35
48
  required?: boolean;
36
49
  }
37
50
  export interface InputWithChildrenProps extends InputBaseProps, ViewProps {
51
+ /** Custom content rendered inside the input, in place of the built-in field and icon slots. */
38
52
  children: ViewProps['children'];
53
+ /** Not applicable when the input has children. */
39
54
  type?: undefined;
55
+ /** Not applicable when the input has children. */
40
56
  showPasswordToggle?: never;
57
+ /** Reserved for future use; not currently used by any input type. */
41
58
  format?: never;
59
+ /** Not applicable when the input has children. */
42
60
  loading?: never;
61
+ /** Not applicable when the input has children. */
43
62
  clearable?: never;
63
+ /** Not applicable when the input has children. */
44
64
  onClear?: never;
65
+ /** Not applicable when the input has children. */
45
66
  leadingIcon?: never;
67
+ /** Not applicable when the input has children. */
46
68
  trailingIcon?: never;
69
+ /** Not applicable when the input has children. */
47
70
  prefix?: never;
71
+ /** Not applicable when the input has children. */
48
72
  suffix?: never;
49
73
  }
50
74
  interface InputWithoutChildrenBaseProps extends InputBaseProps, Omit<TextInputProps, 'children'> {
51
75
  children?: never;
76
+ /** Icon displayed at the start of the input. */
52
77
  leadingIcon?: ComponentType;
78
+ /** Icon displayed at the end of the input. */
53
79
  trailingIcon?: ComponentType;
80
+ /** Indicates the input is required.
81
+ * @default true */
54
82
  required?: boolean;
83
+ /** Content displayed before the input field. */
55
84
  prefix?: string | number | React.ReactNode;
85
+ /** Content displayed after the input field. */
56
86
  suffix?: string | number | React.ReactNode;
57
87
  }
58
88
  interface TextInputSpecificProps extends InputWithoutChildrenBaseProps {
89
+ /** The input type; renders as plain text. */
59
90
  type?: 'text';
91
+ /** Not applicable to the text input type. */
60
92
  showPasswordToggle?: never;
93
+ /** Reserved for future use; not currently used by any input type. */
61
94
  format?: never;
95
+ /** Not applicable to the text input type. */
62
96
  loading?: never;
97
+ /** Not applicable to the text input type. */
63
98
  clearable?: never;
99
+ /** Not applicable to the text input type. */
64
100
  onClear?: never;
65
101
  }
66
102
  interface PasswordInputSpecificProps extends InputWithoutChildrenBaseProps {
103
+ /** The input type; renders as a password field with masked text. */
67
104
  type: 'password';
105
+ /** Shows a toggle to reveal or hide the password text.
106
+ * @default true */
68
107
  showPasswordToggle?: boolean;
108
+ /** Reserved for future use; not currently used by any input type. */
69
109
  format?: never;
110
+ /** Not applicable to the password input type. */
70
111
  loading?: never;
112
+ /** Not applicable to the password input type. */
71
113
  clearable?: never;
114
+ /** Not applicable to the password input type. */
72
115
  onClear?: never;
116
+ /** Not applicable to the password input type. */
73
117
  prefix?: never;
118
+ /** Not applicable to the password input type. */
74
119
  suffix?: never;
75
120
  }
76
121
  interface SearchInputSpecificProps extends InputWithoutChildrenBaseProps {
122
+ /** The input type; renders as a search field with a search icon. */
77
123
  type: 'search';
124
+ /** Shows a loading spinner in the search input. */
78
125
  loading?: boolean;
126
+ /** Shows a clear button that empties the search input.
127
+ * @default false */
79
128
  clearable?: boolean;
129
+ /** Called when the clear button is pressed. */
80
130
  onClear?: () => void;
131
+ /** Not applicable to the search input type. */
81
132
  showPasswordToggle?: never;
133
+ /** Reserved for future use; not currently used by any input type. */
82
134
  format?: never;
135
+ /** Not applicable to the search input type. */
83
136
  prefix?: never;
137
+ /** Not applicable to the search input type. */
84
138
  suffix?: never;
85
139
  }
86
140
  export type InputWithoutChildrenProps = TextInputSpecificProps | PasswordInputSpecificProps | SearchInputSpecificProps;
@@ -1,5 +1,10 @@
1
1
  import type { LinkProps } from './Link.props';
2
2
  export declare const LinkText: import("react").ForwardRefExoticComponent<import("react-native").TextProps & import("react").RefAttributes<import("react-native").TextProps>>;
3
+ /**
4
+ * Navigates a user to another screen or website, another place on the same page, or opens a link
5
+ * in a new tab.
6
+ * @summary A navigational link with an optional icon.
7
+ */
3
8
  declare const Link: {
4
9
  ({ children, icon, disabled, target, rel, iconPosition, showIcon, textStyle, iconStyle, ...props }: LinkProps): import("react").JSX.Element;
5
10
  displayName: string;
@@ -10,6 +10,11 @@ const LinkComponent = createLink({
10
10
  });
11
11
  export const LinkText = LinkComponent.Text;
12
12
  LinkText.displayName = 'LinkText';
13
+ /**
14
+ * Navigates a user to another screen or website, another place on the same page, or opens a link
15
+ * in a new tab.
16
+ * @summary A navigational link with an optional icon.
17
+ */
13
18
  const Link = ({ children, icon = ChevronRightSmallIcon, disabled = false, target = '_self', rel, iconPosition = 'right', showIcon = true, textStyle, iconStyle, ...props }) => {
14
19
  const LinkAny = LinkComponent;
15
20
  // `@gluestack-ui/link`'s `useLink` only ever applies `target`/`rel` via a ref
@@ -2,17 +2,32 @@ import { ComponentType } from 'react';
2
2
  import { PressableProps, TextProps } from 'react-native';
3
3
  import { IconProps } from '../Icon';
4
4
  export interface LinkProps extends Omit<PressableProps, 'children'> {
5
+ /** The text or content rendered inside the link. */
5
6
  children: TextProps['children'];
7
+ /** The URL to navigate to. */
6
8
  href?: string;
9
+ /** The target of the link.
10
+ * @default '_self' */
7
11
  target?: '_blank' | '_self' | '_parent' | '_top';
8
12
  /** Defaults to `noopener noreferrer` when `target` is `_blank`. */
9
13
  rel?: string;
14
+ /** Invert the link colours for purple backgrounds. */
10
15
  inverted?: boolean;
16
+ /** Disable the link.
17
+ * @default false */
11
18
  disabled?: boolean;
19
+ /** Icon displayed next to the link text.
20
+ * @default ChevronRightSmallIcon */
12
21
  icon?: ComponentType;
22
+ /** Position of the icon relative to the link text.
23
+ * @default 'right' */
13
24
  iconPosition?: 'left' | 'right';
25
+ /** Shows the icon next to the link text.
26
+ * @default true */
14
27
  showIcon?: boolean;
28
+ /** Additional style applied to the link text. */
15
29
  textStyle?: TextProps['style'];
30
+ /** Additional style applied to the icon. */
16
31
  iconStyle?: IconProps['style'];
17
32
  }
18
33
  export default LinkProps;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type ListProps from './List.props';
3
+ /** Use List to group `ListItem` and `ListAction` components under an optional heading, with a shared container style and disabled/loading state. */
3
4
  declare const List: {
4
5
  ({ children, heading, helperText, headerTrailingContent, invalidText, ...props }: ListProps): React.JSX.Element;
5
6
  displayName: string;
@@ -5,6 +5,7 @@ import { StyleSheet } from 'react-native-unistyles';
5
5
  import { Card } from '../Card';
6
6
  import { SectionHeader } from '../SectionHeader';
7
7
  import { ListContext } from './List.context';
8
+ /** Use List to group `ListItem` and `ListAction` components under an optional heading, with a shared container style and disabled/loading state. */
8
9
  const List = ({ children, heading, helperText, headerTrailingContent, invalidText, ...props }) => {
9
10
  const { loading, disabled, container = 'none', testID, style, accessibilityRole, ...rest } = props;
10
11
  const orderRef = useRef([]);
@@ -1,11 +1,19 @@
1
1
  import type { ViewProps } from 'react-native';
2
2
  interface ListProps extends ViewProps {
3
+ /** The container style of the list.
4
+ * @default 'none' */
3
5
  container?: 'none' | 'subtleWhite' | 'emphasisWhite' | 'subtleWarmWhite' | 'emphasisWarmWhite';
6
+ /** The text to display in the heading of the list. */
4
7
  heading?: string;
8
+ /** The supporting text to display in the heading of the list. */
5
9
  helperText?: string;
10
+ /** Optional content to display on the right side of the header. */
6
11
  headerTrailingContent?: React.ReactNode;
12
+ /** Whether to disable the list. */
7
13
  disabled?: boolean;
14
+ /** Whether to show the list items in loading state. */
8
15
  loading?: boolean;
16
+ /** Validation error text to display in the heading of the list. */
9
17
  invalidText?: string;
10
18
  }
11
19
  export default ListProps;
@@ -1,4 +1,5 @@
1
1
  import type MenuProps from './Menu.props';
2
2
  import type { MenuMethods } from './Menu.props';
3
+ /** Use Menu to show a bottom sheet of contextual actions or options, built from `MenuItem` children and opened via `MenuTrigger`. */
3
4
  declare const Menu: import("react").ForwardRefExoticComponent<Omit<MenuProps, "ref"> & import("react").RefAttributes<MenuMethods>>;
4
5
  export default Menu;
@@ -4,6 +4,7 @@ import { StyleSheet } from 'react-native-unistyles';
4
4
  import { BodyText } from '../BodyText';
5
5
  import { BottomSheetModal, BottomSheetScrollView } from '../BottomSheet';
6
6
  import { MenuContext } from './Menu.context';
7
+ /** Use Menu to show a bottom sheet of contextual actions or options, built from `MenuItem` children and opened via `MenuTrigger`. */
7
8
  const Menu = forwardRef(({ heading, children, ...props }, ref) => {
8
9
  const bottomSheetModalRef = useRef(null);
9
10
  useImperativeHandle(ref, () => ({
@@ -3,5 +3,10 @@ import ModalProps from './Modal.props';
3
3
  type Modal<T = any> = BottomSheetModalMethods<T> & {
4
4
  triggerCloseAnimation?: () => void;
5
5
  };
6
+ /**
7
+ * Use Modal for a dialog that slides up from the bottom of the screen, with pre-configured layouts for headers, content, and action buttons.
8
+ * Built on `BottomSheetModal`; use it to display important information, collect input, or present choices without navigating away from the current screen. Use `NavModal` instead inside a React Navigation modal screen.
9
+ * @summary A bottom-sheet dialog for confirmations, input, and choices.
10
+ */
6
11
  declare const Modal: ({ ref, children, heading, description, showCloseButton, primaryButtonText, secondaryButtonText, onPressPrimaryButton, onPressCloseButton, onPressSecondaryButton, closeOnPrimaryButtonPress, closeOnSecondaryButtonPress, loading, loadingHeading, loadingDescription, fullscreen, image, footer, footerStyle, primaryButtonProps, secondaryButtonProps, closeButtonProps, stickyFooter, testID, ...props }: ModalProps) => import("react").JSX.Element;
7
12
  export default Modal;
@@ -12,6 +12,11 @@ import { Button } from '../Button';
12
12
  import { Heading } from '../Heading';
13
13
  import { Spinner } from '../Spinner';
14
14
  import { UnstyledIconButton } from '../UnstyledIconButton';
15
+ /**
16
+ * Use Modal for a dialog that slides up from the bottom of the screen, with pre-configured layouts for headers, content, and action buttons.
17
+ * Built on `BottomSheetModal`; use it to display important information, collect input, or present choices without navigating away from the current screen. Use `NavModal` instead inside a React Navigation modal screen.
18
+ * @summary A bottom-sheet dialog for confirmations, input, and choices.
19
+ */
15
20
  const Modal = ({ ref, children, heading, description, showCloseButton = true, primaryButtonText, secondaryButtonText, onPressPrimaryButton, onPressCloseButton, onPressSecondaryButton, closeOnPrimaryButtonPress = true, closeOnSecondaryButtonPress = true, loading, loadingHeading = 'Loading...', loadingDescription, fullscreen = false, image, footer, footerStyle, primaryButtonProps, secondaryButtonProps, closeButtonProps, stickyFooter = true, testID, ...props }) => {
16
21
  const theme = useTheme();
17
22
  const bottomSheetModalRef = useRef(null);
@@ -137,7 +142,6 @@ const styles = StyleSheet.create((theme, rt) => ({
137
142
  {
138
143
  noButtons: true,
139
144
  useSafeAreaInsets: true,
140
- stickyFooter: false,
141
145
  styles: {
142
146
  paddingBottom: rt.insets.bottom +
143
147
  theme.components.modal.padding +
@@ -1,10 +1,16 @@
1
1
  import { BottomSheetProps } from '../BottomSheet';
2
2
  import { ModalButtonFooterProps, ModalCommonBaseProps, ModalCustomFooterProps } from './Modal.shared.types';
3
3
  type ModalBaseProps = Omit<BottomSheetProps, 'children'> & ModalCommonBaseProps & {
4
+ /** Whether the modal should take up the full screen height.
5
+ * @default false */
4
6
  fullscreen?: boolean;
5
7
  };
6
8
  type ModalProps = (ModalBaseProps & ModalButtonFooterProps & {
9
+ /** Whether to automatically close the modal when the primary button is pressed.
10
+ * @default true */
7
11
  closeOnPrimaryButtonPress?: boolean;
12
+ /** Whether to automatically close the modal when the secondary button is pressed.
13
+ * @default true */
8
14
  closeOnSecondaryButtonPress?: boolean;
9
15
  }) | (ModalBaseProps & ModalCustomFooterProps & {
10
16
  closeOnPrimaryButtonPress?: never;
@@ -3,37 +3,69 @@ import { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
3
  import { ButtonWithoutChildrenProps } from '../Button/Button.props';
4
4
  import { UnstyledIconButtonProps } from '../UnstyledIconButton';
5
5
  export interface ModalCommonBaseProps {
6
+ /** Applied to the modal content container, useful for locating the modal in e2e tests. */
6
7
  testID?: string;
8
+ /** Whether to show a loading state with a spinner.
9
+ * @default false */
7
10
  loading?: boolean;
11
+ /** Image to display in the modal, shown as centered content with text below. */
8
12
  image?: ReactNode;
13
+ /** Whether to show the close button in the top-right corner.
14
+ * @default true */
9
15
  showCloseButton?: boolean;
16
+ /** The heading text displayed at the top of the modal. */
10
17
  heading?: string;
18
+ /** The heading text shown while `loading` is true, instead of the regular heading.
19
+ * @default 'Loading...' */
11
20
  loadingHeading?: string;
21
+ /** The description text shown while `loading` is true, instead of the regular description. */
12
22
  loadingDescription?: string;
23
+ /** The description content displayed below the heading; pass a string for the default styling, or JSX for custom content. */
13
24
  description?: ReactNode;
25
+ /** Whether the footer stays fixed to the bottom of the modal while content scrolls.
26
+ * @default true */
14
27
  stickyFooter?: boolean;
28
+ /** Custom content to display in the modal body. */
15
29
  children?: ViewProps['children'];
30
+ /** Called when the close button is pressed. */
16
31
  onPressCloseButton?: () => void;
32
+ /** Additional props passed to the close button. */
17
33
  closeButtonProps?: Omit<UnstyledIconButtonProps, 'children'>;
18
34
  }
19
35
  export interface ModalButtonFooterProps {
36
+ /** Called when the primary button is pressed. */
20
37
  onPressPrimaryButton?: () => void;
38
+ /** Text for the primary action button. */
21
39
  primaryButtonText?: string;
40
+ /** Called when the secondary button is pressed. */
22
41
  onPressSecondaryButton?: () => void;
42
+ /** Text for the secondary action button. */
23
43
  secondaryButtonText?: string;
44
+ /** Additional props passed to the primary button; `colorScheme` defaults to `highlight`, `variant` to `solid`. */
24
45
  primaryButtonProps?: Omit<ButtonWithoutChildrenProps, 'children'>;
46
+ /** Additional props passed to the secondary button; `colorScheme` defaults to `functional`, `variant` to `outline`. */
25
47
  secondaryButtonProps?: Omit<ButtonWithoutChildrenProps, 'children'>;
48
+ /** Not applicable when using the built-in primary/secondary action buttons. */
26
49
  footer?: never;
50
+ /** Styles applied to the footer container, useful for sticky footer shadows or custom spacing. */
27
51
  footerStyle?: StyleProp<ViewStyle>;
28
52
  }
29
53
  export interface ModalCustomFooterProps {
54
+ /** Custom footer content that replaces the built-in action buttons. */
30
55
  footer: ReactNode;
56
+ /** Styles applied to the footer container, useful for sticky footer shadows or custom spacing. */
31
57
  footerStyle?: StyleProp<ViewStyle>;
58
+ /** Not applicable when a custom `footer` is provided. */
32
59
  onPressPrimaryButton?: never;
60
+ /** Not applicable when a custom `footer` is provided. */
33
61
  primaryButtonText?: never;
62
+ /** Not applicable when a custom `footer` is provided. */
34
63
  onPressSecondaryButton?: never;
64
+ /** Not applicable when a custom `footer` is provided. */
35
65
  secondaryButtonText?: never;
66
+ /** Not applicable when a custom `footer` is provided. */
36
67
  primaryButtonProps?: never;
68
+ /** Not applicable when a custom `footer` is provided. */
37
69
  secondaryButtonProps?: never;
38
70
  }
39
71
  export type ModalCommonProps = ModalCommonBaseProps & (ModalButtonFooterProps | ModalCustomFooterProps);
@@ -1,4 +1,5 @@
1
1
  import { ImageProps } from 'react-native';
2
2
  import { ThemedImageProps } from '../ThemedImage';
3
+ /** Use ModalImage to display an image within a `Modal`, with support for separate light and dark mode sources via `ThemedImage`. */
3
4
  declare const ModalImage: (props: ImageProps | ThemedImageProps) => import("react").JSX.Element;
4
5
  export default ModalImage;
@@ -3,6 +3,7 @@ import { Image } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
  import { isThemedImageProps } from '../../utils';
5
5
  import { ThemedImage } from '../ThemedImage';
6
+ /** Use ModalImage to display an image within a `Modal`, with support for separate light and dark mode sources via `ThemedImage`. */
6
7
  const ModalImage = (props) => {
7
8
  if (isThemedImageProps(props)) {
8
9
  return _jsx(ThemedImage, { ...props, style: [styles.image, props.style] });
@@ -1,3 +1,11 @@
1
1
  import NavModalProps from './NavModal.props';
2
+ /**
3
+ * Use NavModal for the screen-based modal layout for React Navigation flows, when a screen
4
+ * is already presented with `presentation: 'modal'` or `presentation: 'fullScreenModal'`.
5
+ * Provides Hearth's modal structure and action buttons plus the Android close animation, but
6
+ * does not manage its own dismissal: your screen or navigator owns closing behavior. Use
7
+ * `Modal` instead for a bottom-sheet modal presented via a ref.
8
+ * @summary The screen-based modal layout for navigation flows.
9
+ */
2
10
  declare const NavModal: ({ ref, children, heading, description, showCloseButton, primaryButtonText, secondaryButtonText, onPressPrimaryButton, onPressCloseButton, onPressSecondaryButton, loading, loadingHeading, loadingDescription, image, footer, footerStyle, primaryButtonProps, secondaryButtonProps, closeButtonProps, stickyFooter, background, scrollable, presentation, scrollViewProps, useSafeAreaInsets, ...props }: NavModalProps) => import("react").JSX.Element;
3
11
  export default NavModal;