@utilitywarehouse/hearth-react-native 0.27.3 → 0.28.0-testid-fix-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/.turbo/turbo-build.log +5 -4
  2. package/.turbo/turbo-lint.log +70 -69
  3. package/CHANGELOG.md +110 -0
  4. package/build/components/Combobox/Combobox.context.d.ts +13 -0
  5. package/build/components/Combobox/Combobox.context.js +9 -0
  6. package/build/components/Combobox/Combobox.d.ts +6 -0
  7. package/build/components/Combobox/Combobox.js +246 -0
  8. package/build/components/Combobox/Combobox.props.d.ts +180 -0
  9. package/build/components/Combobox/Combobox.props.js +1 -0
  10. package/build/components/Combobox/ComboboxOption.d.ts +6 -0
  11. package/build/components/Combobox/ComboboxOption.js +56 -0
  12. package/build/components/Combobox/index.d.ts +4 -0
  13. package/build/components/Combobox/index.js +3 -0
  14. package/build/components/DatePicker/TimePicker.d.ts +3 -0
  15. package/build/components/DatePicker/TimePicker.js +84 -0
  16. package/build/components/DatePicker/time-picker/animated-math.d.ts +4 -0
  17. package/build/components/DatePicker/time-picker/animated-math.js +19 -0
  18. package/build/components/DatePicker/time-picker/period-native.d.ts +6 -0
  19. package/build/components/DatePicker/time-picker/period-native.js +17 -0
  20. package/build/components/DatePicker/time-picker/period-picker.d.ts +6 -0
  21. package/build/components/DatePicker/time-picker/period-picker.js +10 -0
  22. package/build/components/DatePicker/time-picker/period-web.d.ts +6 -0
  23. package/build/components/DatePicker/time-picker/period-web.js +21 -0
  24. package/build/components/DatePicker/time-picker/wheel-native.d.ts +8 -0
  25. package/build/components/DatePicker/time-picker/wheel-native.js +19 -0
  26. package/build/components/DatePicker/time-picker/wheel-picker/index.d.ts +2 -0
  27. package/build/components/DatePicker/time-picker/wheel-picker/index.js +2 -0
  28. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker-item.d.ts +16 -0
  29. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker-item.js +97 -0
  30. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker.d.ts +21 -0
  31. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker.js +88 -0
  32. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker.style.d.ts +23 -0
  33. package/build/components/DatePicker/time-picker/wheel-picker/wheel-picker.style.js +21 -0
  34. package/build/components/DatePicker/time-picker/wheel-web.d.ts +8 -0
  35. package/build/components/DatePicker/time-picker/wheel-web.js +146 -0
  36. package/build/components/DatePicker/time-picker/wheel.d.ts +8 -0
  37. package/build/components/DatePicker/time-picker/wheel.js +10 -0
  38. package/build/components/Modal/Modal.js +26 -42
  39. package/build/components/Modal/Modal.web.js +3 -3
  40. package/build/components/Pagination/Pagination.d.ts +6 -0
  41. package/build/components/Pagination/Pagination.js +125 -0
  42. package/build/components/Pagination/Pagination.props.d.ts +26 -0
  43. package/build/components/Pagination/Pagination.props.js +1 -0
  44. package/build/components/Pagination/Pagination.utils.d.ts +2 -0
  45. package/build/components/Pagination/Pagination.utils.js +20 -0
  46. package/build/components/Pagination/Pagination.utils.test.d.ts +1 -0
  47. package/build/components/Pagination/Pagination.utils.test.js +16 -0
  48. package/build/components/Pagination/index.d.ts +2 -0
  49. package/build/components/Pagination/index.js +1 -0
  50. package/build/components/SafeAreaView/SafeAreaView.d.ts +5 -0
  51. package/build/components/SafeAreaView/SafeAreaView.js +117 -0
  52. package/build/components/SafeAreaView/SafeAreaView.props.d.ts +17 -0
  53. package/build/components/SafeAreaView/SafeAreaView.props.js +1 -0
  54. package/build/components/SafeAreaView/index.d.ts +2 -0
  55. package/build/components/SafeAreaView/index.js +1 -0
  56. package/build/components/Select/Select.d.ts +1 -1
  57. package/build/components/Select/Select.js +6 -5
  58. package/build/components/Select/Select.props.d.ts +4 -0
  59. package/build/components/Select/SelectOption.d.ts +1 -1
  60. package/build/components/Select/SelectOption.js +2 -2
  61. package/build/components/Table/Table.context.d.ts +12 -0
  62. package/build/components/Table/Table.context.js +9 -0
  63. package/build/components/Table/Table.d.ts +6 -0
  64. package/build/components/Table/Table.js +71 -0
  65. package/build/components/Table/Table.props.d.ts +56 -0
  66. package/build/components/Table/Table.props.js +1 -0
  67. package/build/components/Table/Table.utils.d.ts +5 -0
  68. package/build/components/Table/Table.utils.js +48 -0
  69. package/build/components/Table/Table.utils.test.d.ts +1 -0
  70. package/build/components/Table/Table.utils.test.js +71 -0
  71. package/build/components/Table/TableBody.d.ts +6 -0
  72. package/build/components/Table/TableBody.js +16 -0
  73. package/build/components/Table/TableCell.d.ts +10 -0
  74. package/build/components/Table/TableCell.js +44 -0
  75. package/build/components/Table/TableHeader.d.ts +6 -0
  76. package/build/components/Table/TableHeader.js +24 -0
  77. package/build/components/Table/TableHeaderCell.d.ts +10 -0
  78. package/build/components/Table/TableHeaderCell.js +97 -0
  79. package/build/components/Table/TablePagination.d.ts +6 -0
  80. package/build/components/Table/TablePagination.js +7 -0
  81. package/build/components/Table/TableRow.d.ts +8 -0
  82. package/build/components/Table/TableRow.js +25 -0
  83. package/build/components/Table/index.d.ts +8 -0
  84. package/build/components/Table/index.js +7 -0
  85. package/build/components/Timeline/Timeline.d.ts +6 -0
  86. package/build/components/Timeline/Timeline.js +34 -0
  87. package/build/components/Timeline/Timeline.props.d.ts +47 -0
  88. package/build/components/Timeline/Timeline.props.js +1 -0
  89. package/build/components/Timeline/TimelineItem.d.ts +6 -0
  90. package/build/components/Timeline/TimelineItem.js +235 -0
  91. package/build/components/Timeline/index.d.ts +3 -0
  92. package/build/components/Timeline/index.js +2 -0
  93. package/build/components/VerificationInput/VerificationInput.js +3 -3
  94. package/build/components/index.d.ts +5 -0
  95. package/build/components/index.js +5 -0
  96. package/build/tokens/components/dark/timeline.d.ts +2 -2
  97. package/build/tokens/components/dark/timeline.js +2 -2
  98. package/docs/components/AllComponents.web.tsx +106 -23
  99. package/docs/llm-docs/unistyles-llms-full.txt +1132 -534
  100. package/docs/llm-docs/unistyles-llms-small.txt +37 -37
  101. package/package.json +4 -4
  102. package/src/components/Combobox/Combobox.context.ts +26 -0
  103. package/src/components/Combobox/Combobox.docs.mdx +277 -0
  104. package/src/components/Combobox/Combobox.figma.tsx +60 -0
  105. package/src/components/Combobox/Combobox.props.ts +187 -0
  106. package/src/components/Combobox/Combobox.stories.tsx +233 -0
  107. package/src/components/Combobox/Combobox.tsx +446 -0
  108. package/src/components/Combobox/ComboboxOption.tsx +100 -0
  109. package/src/components/Combobox/index.ts +9 -0
  110. package/src/components/Modal/Modal.tsx +52 -74
  111. package/src/components/Modal/Modal.web.tsx +3 -3
  112. package/src/components/Pagination/Pagination.docs.mdx +99 -0
  113. package/src/components/Pagination/Pagination.figma.tsx +20 -0
  114. package/src/components/Pagination/Pagination.props.ts +28 -0
  115. package/src/components/Pagination/Pagination.stories.tsx +88 -0
  116. package/src/components/Pagination/Pagination.tsx +248 -0
  117. package/src/components/Pagination/Pagination.utils.test.ts +20 -0
  118. package/src/components/Pagination/Pagination.utils.ts +37 -0
  119. package/src/components/Pagination/index.ts +2 -0
  120. package/src/components/SafeAreaView/SafeAreaView.props.ts +20 -0
  121. package/src/components/SafeAreaView/SafeAreaView.tsx +173 -0
  122. package/src/components/SafeAreaView/index.ts +2 -0
  123. package/src/components/Select/Select.props.ts +4 -0
  124. package/src/components/Select/Select.tsx +35 -28
  125. package/src/components/Select/SelectOption.tsx +2 -0
  126. package/src/components/Table/Table.context.tsx +23 -0
  127. package/src/components/Table/Table.docs.mdx +239 -0
  128. package/src/components/Table/Table.figma.tsx +65 -0
  129. package/src/components/Table/Table.props.ts +65 -0
  130. package/src/components/Table/Table.stories.tsx +399 -0
  131. package/src/components/Table/Table.tsx +127 -0
  132. package/src/components/Table/Table.utils.test.ts +82 -0
  133. package/src/components/Table/Table.utils.ts +72 -0
  134. package/src/components/Table/TableBody.tsx +25 -0
  135. package/src/components/Table/TableCell.tsx +67 -0
  136. package/src/components/Table/TableHeader.tsx +41 -0
  137. package/src/components/Table/TableHeaderCell.tsx +136 -0
  138. package/src/components/Table/TablePagination.tsx +10 -0
  139. package/src/components/Table/TableRow.tsx +42 -0
  140. package/src/components/Table/index.ts +16 -0
  141. package/src/components/Timeline/Timeline.docs.mdx +177 -0
  142. package/src/components/Timeline/Timeline.figma.tsx +89 -0
  143. package/src/components/Timeline/Timeline.props.ts +51 -0
  144. package/src/components/Timeline/Timeline.stories.tsx +102 -0
  145. package/src/components/Timeline/Timeline.tsx +48 -0
  146. package/src/components/Timeline/TimelineItem.tsx +293 -0
  147. package/src/components/Timeline/index.ts +9 -0
  148. package/src/components/VerificationInput/VerificationInput.tsx +3 -0
  149. package/src/components/index.ts +5 -0
  150. package/src/tokens/components/dark/timeline.ts +2 -2
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { View } from 'react-native';
3
+ import { StyleSheet } from 'react-native-unistyles';
4
+ import { BodyText } from '../BodyText';
5
+ import { useTableContext } from './Table.context';
6
+ import { getColumnStyle } from './Table.utils';
7
+ const renderContent = (children, weight = 'regular') => {
8
+ if (typeof children === 'string' || typeof children === 'number') {
9
+ return (_jsx(BodyText, { size: "md", weight: weight, children: children }));
10
+ }
11
+ return children;
12
+ };
13
+ const TableCell = ({ children, style, ...props }) => {
14
+ const { columnWidths, container, hasPagination } = useTableContext();
15
+ const { columnIndex = 0, isLast, isLastRow, ...rest } = props;
16
+ const removeBottomBorder = Boolean(isLastRow && container !== 'none' && !hasPagination);
17
+ const columnStyle = getColumnStyle(columnWidths[columnIndex], 120);
18
+ return (_jsx(View, { ...rest, style: [
19
+ styles.cell,
20
+ columnStyle,
21
+ isLast && styles.lastCell,
22
+ removeBottomBorder && styles.lastRowCell,
23
+ style,
24
+ ], children: renderContent(children) }));
25
+ };
26
+ TableCell.displayName = 'TableCell';
27
+ const styles = StyleSheet.create(theme => ({
28
+ cell: {
29
+ minHeight: theme.components.table.cell.minHeight,
30
+ justifyContent: 'center',
31
+ padding: theme.components.table.cell.padding,
32
+ borderRightWidth: theme.components.table.cell.borderWidth,
33
+ borderBottomWidth: theme.components.table.cell.borderWidth,
34
+ borderColor: theme.color.border.subtle,
35
+ backgroundColor: theme.color.surface.neutral.strong,
36
+ },
37
+ lastCell: {
38
+ borderRightWidth: 0,
39
+ },
40
+ lastRowCell: {
41
+ borderBottomWidth: 0,
42
+ },
43
+ }));
44
+ export default TableCell;
@@ -0,0 +1,6 @@
1
+ import { TableHeaderProps } from './Table.props';
2
+ declare const TableHeader: {
3
+ ({ children, color, style, ...props }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default TableHeader;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Children, cloneElement, isValidElement } from 'react';
3
+ import { View } from 'react-native';
4
+ const TableHeader = ({ children, color = 'purple', style, ...props }) => {
5
+ const items = Children.toArray(children);
6
+ return (_jsx(View, { ...props, style: [styles.header, style], children: items.map((child, index) => {
7
+ if (!isValidElement(child)) {
8
+ return child;
9
+ }
10
+ return cloneElement(child, {
11
+ color,
12
+ columnIndex: index,
13
+ isLast: index === items.length - 1,
14
+ });
15
+ }) }));
16
+ };
17
+ TableHeader.displayName = 'TableHeader';
18
+ const styles = {
19
+ header: {
20
+ flexDirection: 'row',
21
+ width: '100%',
22
+ },
23
+ };
24
+ export default TableHeader;
@@ -0,0 +1,10 @@
1
+ import type { TableHeaderCellProps } from './Table.props';
2
+ declare const TableHeaderCell: {
3
+ ({ children, color, row, style, trailingContent, ...props }: TableHeaderCellProps & {
4
+ columnIndex?: number;
5
+ isLast?: boolean;
6
+ isLastRow?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ export default TableHeaderCell;
@@ -0,0 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cloneElement, isValidElement } from 'react';
3
+ import { View } from 'react-native';
4
+ import { StyleSheet } from 'react-native-unistyles';
5
+ import { BodyText } from '../BodyText';
6
+ import { useTableContext } from './Table.context';
7
+ import { getColumnStyle } from './Table.utils';
8
+ const renderContent = (children, weight = 'semibold', color = 'white') => {
9
+ if (typeof children === 'string' || typeof children === 'number') {
10
+ return (_jsx(BodyText, { size: "md", weight: weight, style: styles.text, inverted: color === 'purple', children: children }));
11
+ }
12
+ return children;
13
+ };
14
+ const TableHeaderCell = ({ children, color = 'white', row = false, style, trailingContent, ...props }) => {
15
+ const { columnWidths, container, hasPagination } = useTableContext();
16
+ const { columnIndex = 0, isLast, isLastRow, ...rest } = props;
17
+ const removeBottomBorder = Boolean(row && isLastRow && container !== 'none' && !hasPagination);
18
+ const columnStyle = getColumnStyle(columnWidths[columnIndex], 120);
19
+ styles.useVariants({ color, row });
20
+ const trailingElement = trailingContent && isValidElement(trailingContent)
21
+ ? trailingContent
22
+ : null;
23
+ const resolvedTrailingContent = trailingElement && !row && 'inverted' in (trailingElement.props ?? {})
24
+ ? cloneElement(trailingElement, {
25
+ inverted: color === 'purple',
26
+ })
27
+ : trailingContent;
28
+ return (_jsx(View, { ...rest, style: [
29
+ styles.cell,
30
+ columnStyle,
31
+ isLast && styles.lastCell,
32
+ removeBottomBorder && styles.lastRowCell,
33
+ style,
34
+ ], children: _jsxs(View, { style: styles.content, children: [renderContent(children, 'semibold', color), resolvedTrailingContent ? (_jsx(View, { style: styles.trailing, children: resolvedTrailingContent })) : null] }) }));
35
+ };
36
+ TableHeaderCell.displayName = 'TableHeaderCell';
37
+ const styles = StyleSheet.create(theme => ({
38
+ cell: {
39
+ minHeight: theme.components.table.headerCell.height,
40
+ justifyContent: 'center',
41
+ paddingHorizontal: theme.components.table.headerCell.paddingHorizontal,
42
+ paddingVertical: theme.components.table.headerCell.paddingVertical,
43
+ borderRightWidth: theme.components.table.headerCell.borderWidth,
44
+ borderBottomWidth: theme.components.table.headerCell.borderWidth,
45
+ borderColor: theme.color.border.subtle,
46
+ backgroundColor: theme.color.surface.neutral.strong,
47
+ variants: {
48
+ color: {
49
+ purple: {
50
+ borderColor: theme.color.interactive.brand.foreground.strong,
51
+ backgroundColor: theme.color.surface.brand.default,
52
+ },
53
+ white: {
54
+ borderColor: theme.color.border.subtle,
55
+ backgroundColor: theme.color.surface.neutral.strong,
56
+ },
57
+ },
58
+ row: {
59
+ true: {
60
+ minHeight: theme.components.table.cell.minHeight,
61
+ paddingHorizontal: theme.components.table.cell.padding,
62
+ paddingVertical: theme.components.table.cell.padding,
63
+ borderRightWidth: theme.components.table.cell.borderWidth,
64
+ borderBottomWidth: theme.components.table.cell.borderWidth,
65
+ borderColor: theme.color.border.subtle,
66
+ backgroundColor: theme.color.surface.neutral.strong,
67
+ },
68
+ },
69
+ },
70
+ },
71
+ lastCell: {
72
+ borderRightWidth: 0,
73
+ },
74
+ lastRowCell: {
75
+ borderBottomWidth: 0,
76
+ },
77
+ content: {
78
+ flexDirection: 'row',
79
+ alignItems: 'center',
80
+ justifyContent: 'space-between',
81
+ gap: theme.components.table.headerCell.gap,
82
+ },
83
+ trailing: {
84
+ flexShrink: 0,
85
+ },
86
+ text: {
87
+ flexShrink: 1,
88
+ variants: {
89
+ row: {
90
+ true: {
91
+ color: theme.color.text.primary,
92
+ },
93
+ },
94
+ },
95
+ },
96
+ }));
97
+ export default TableHeaderCell;
@@ -0,0 +1,6 @@
1
+ import type { TablePaginationProps } from './Table.props';
2
+ declare const TablePagination: {
3
+ (props: TablePaginationProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default TablePagination;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Pagination } from '../Pagination';
3
+ const TablePagination = (props) => {
4
+ return _jsx(Pagination, { ...props });
5
+ };
6
+ TablePagination.displayName = 'TablePagination';
7
+ export default TablePagination;
@@ -0,0 +1,8 @@
1
+ import { TableRowProps } from './Table.props';
2
+ declare const TableRow: {
3
+ ({ children, ...props }: TableRowProps & {
4
+ isLastRow?: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ export default TableRow;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Children, cloneElement, isValidElement } from 'react';
3
+ import { View } from 'react-native';
4
+ const TableRow = ({ children, ...props }) => {
5
+ const items = Children.toArray(children);
6
+ const { isLastRow = false, ...rest } = props;
7
+ return (_jsx(View, { ...rest, style: [styles.row, rest.style], children: items.map((child, index) => {
8
+ if (!isValidElement(child)) {
9
+ return child;
10
+ }
11
+ return cloneElement(child, {
12
+ isLast: index === items.length - 1,
13
+ columnIndex: index,
14
+ isLastRow,
15
+ });
16
+ }) }));
17
+ };
18
+ TableRow.displayName = 'TableRow';
19
+ const styles = {
20
+ row: {
21
+ flexDirection: 'row',
22
+ width: '100%',
23
+ },
24
+ };
25
+ export default TableRow;
@@ -0,0 +1,8 @@
1
+ export { default as Table } from './Table';
2
+ export type { TableBodyProps, TableCellProps, TableHeaderCellProps, TableHeaderProps, TablePaginationProps, TableProps, TableRowProps, } from './Table.props';
3
+ export { default as TableBody } from './TableBody';
4
+ export { default as TableCell } from './TableCell';
5
+ export { default as TableHeader } from './TableHeader';
6
+ export { default as TableHeaderCell } from './TableHeaderCell';
7
+ export { default as TablePagination } from './TablePagination';
8
+ export { default as TableRow } from './TableRow';
@@ -0,0 +1,7 @@
1
+ export { default as Table } from './Table';
2
+ export { default as TableBody } from './TableBody';
3
+ export { default as TableCell } from './TableCell';
4
+ export { default as TableHeader } from './TableHeader';
5
+ export { default as TableHeaderCell } from './TableHeaderCell';
6
+ export { default as TablePagination } from './TablePagination';
7
+ export { default as TableRow } from './TableRow';
@@ -0,0 +1,6 @@
1
+ import type { TimelineProps } from './Timeline.props';
2
+ declare const Timeline: {
3
+ ({ children, variant, style, ...rest }: TimelineProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default Timeline;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { View } from 'react-native';
4
+ import { StyleSheet } from 'react-native-unistyles';
5
+ const getItemPosition = (index, count) => {
6
+ if (count <= 1) {
7
+ return 'single';
8
+ }
9
+ if (index === 0) {
10
+ return 'start';
11
+ }
12
+ if (index === count - 1) {
13
+ return 'end';
14
+ }
15
+ return 'middle';
16
+ };
17
+ const Timeline = ({ children, variant = 'static', style, ...rest }) => {
18
+ const childElements = React.Children.toArray(children).filter(React.isValidElement);
19
+ return (_jsx(View, { accessibilityRole: "list", style: [styles.root, style], ...rest, children: childElements.map((child, index) => {
20
+ const position = getItemPosition(index, childElements.length);
21
+ return React.cloneElement(child, {
22
+ key: child.key ?? `timeline-item-${index}`,
23
+ position,
24
+ variant,
25
+ });
26
+ }) }));
27
+ };
28
+ Timeline.displayName = 'Timeline';
29
+ const styles = StyleSheet.create(() => ({
30
+ root: {
31
+ width: '100%',
32
+ },
33
+ }));
34
+ export default Timeline;
@@ -0,0 +1,47 @@
1
+ import { ViewProps } from 'react-native';
2
+ export type TimelineVariant = 'static' | 'progress';
3
+ export type TimelineItemState = 'complete' | 'active' | 'incomplete';
4
+ export type TimelineItemPosition = 'single' | 'start' | 'middle' | 'end';
5
+ export interface TimelineProps extends ViewProps {
6
+ /**
7
+ * Child TimelineItem components.
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * Controls the indicator style used by all child timeline items.
12
+ * @default 'static'
13
+ */
14
+ variant?: TimelineVariant;
15
+ }
16
+ export interface TimelineItemProps extends ViewProps {
17
+ /**
18
+ * The primary label for the timeline item.
19
+ */
20
+ label: string;
21
+ /**
22
+ * Optional supporting text displayed beneath the label.
23
+ */
24
+ helperText?: string;
25
+ /**
26
+ * Visual state for progress timelines.
27
+ * @default 'incomplete'
28
+ */
29
+ state?: TimelineItemState;
30
+ /**
31
+ * Optional custom content rendered beneath the text content.
32
+ */
33
+ children?: React.ReactNode;
34
+ /**
35
+ * The timeline variant used when the item is rendered standalone.
36
+ * Items inside Timeline receive this automatically.
37
+ * @default 'static'
38
+ */
39
+ variant?: TimelineVariant;
40
+ /**
41
+ * The item's position in the timeline used to draw connectors.
42
+ * Items inside Timeline receive this automatically.
43
+ * @default 'single'
44
+ */
45
+ position?: TimelineItemPosition;
46
+ }
47
+ export default TimelineProps;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { TimelineItemProps } from './Timeline.props';
2
+ declare const TimelineItem: {
3
+ ({ children, helperText, label, position, state, style, variant, accessibilityLabel: accessibilityLabelProp, accessible: accessibleProp, ...rest }: TimelineItemProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default TimelineItem;
@@ -0,0 +1,235 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
3
+ import { View } from 'react-native';
4
+ import { StyleSheet } from 'react-native-unistyles';
5
+ import { BodyText } from '../BodyText';
6
+ import { Icon } from '../Icon';
7
+ const TimelineItem = ({ children, helperText, label, position = 'single', state = 'incomplete', style, variant = 'static', accessibilityLabel: accessibilityLabelProp, accessible: accessibleProp, ...rest }) => {
8
+ styles.useVariants({ position, state, variant });
9
+ const hasCustomContent = Boolean(children);
10
+ const computedAccessibilityLabel = [
11
+ label,
12
+ helperText,
13
+ variant === 'progress' ? `Step ${state}` : undefined,
14
+ ]
15
+ .filter(Boolean)
16
+ .join(', ');
17
+ return (_jsxs(View, { style: [styles.item, style], ...rest, accessible: accessibleProp ?? !hasCustomContent, accessibilityLabel: (accessibleProp ?? !hasCustomContent)
18
+ ? (accessibilityLabelProp ?? computedAccessibilityLabel)
19
+ : undefined, children: [_jsxs(View, { style: styles.indicatorColumn, children: [(position === 'middle' || position === 'end') && _jsx(View, { style: styles.topConnector }), _jsx(View, { style: styles.circle, children: variant === 'progress' && state === 'complete' ? (_jsx(Icon, { as: TickSmallIcon, width: 20, height: 20, style: styles.completeIcon })) : variant === 'progress' && state === 'active' ? (_jsx(View, { style: styles.activeInnerDot })) : null }), (position === 'start' || position === 'middle') && _jsx(View, { style: styles.bottomConnector })] }), _jsxs(View, { style: styles.content, children: [_jsxs(View, { style: styles.textContent, accessible: hasCustomContent, accessibilityLabel: hasCustomContent ? (accessibilityLabelProp ?? computedAccessibilityLabel) : undefined, children: [_jsx(BodyText, { size: "md", weight: "semibold", style: styles.label, children: label }), helperText ? (_jsx(BodyText, { size: "md", style: styles.helperText, children: helperText })) : null] }), children ? _jsx(View, { style: styles.customContent, children: children }) : null] })] }));
20
+ };
21
+ TimelineItem.displayName = 'TimelineItem';
22
+ const styles = StyleSheet.create(theme => ({
23
+ item: {
24
+ flexDirection: 'row',
25
+ gap: theme.components.timeline.gap,
26
+ width: '100%',
27
+ },
28
+ indicatorColumn: {
29
+ alignItems: 'center',
30
+ variants: {
31
+ variant: {
32
+ static: {
33
+ width: theme.components.timeline.static.circle.width,
34
+ },
35
+ progress: {
36
+ width: theme.components.timeline.progress.circle.width,
37
+ },
38
+ },
39
+ },
40
+ },
41
+ topConnector: {
42
+ width: theme.components.timeline.bar.width,
43
+ variants: {
44
+ variant: {
45
+ static: {
46
+ height: theme.components.timeline.static.circle.height / 2,
47
+ backgroundColor: theme.color.surface.brand.default,
48
+ },
49
+ progress: {
50
+ height: 0,
51
+ },
52
+ },
53
+ state: {
54
+ complete: {},
55
+ active: {},
56
+ incomplete: {},
57
+ },
58
+ },
59
+ compoundVariants: [
60
+ {
61
+ variant: 'progress',
62
+ state: 'complete',
63
+ styles: {
64
+ backgroundColor: theme.color.surface.brand.default,
65
+ },
66
+ },
67
+ {
68
+ variant: 'progress',
69
+ state: 'active',
70
+ styles: {
71
+ backgroundColor: theme.color.surface.brand.default,
72
+ },
73
+ },
74
+ {
75
+ variant: 'progress',
76
+ state: 'incomplete',
77
+ styles: {
78
+ backgroundColor: theme.color.border.subtle,
79
+ },
80
+ },
81
+ ],
82
+ },
83
+ bottomConnector: {
84
+ flex: 1,
85
+ minHeight: theme.components.timeline.content.paddingBottom,
86
+ width: theme.components.timeline.bar.width,
87
+ variants: {
88
+ variant: {
89
+ static: {
90
+ backgroundColor: theme.color.surface.brand.default,
91
+ },
92
+ progress: {},
93
+ },
94
+ state: {
95
+ complete: {},
96
+ active: {},
97
+ incomplete: {},
98
+ },
99
+ },
100
+ compoundVariants: [
101
+ {
102
+ variant: 'progress',
103
+ state: 'complete',
104
+ styles: {
105
+ backgroundColor: theme.color.surface.brand.default,
106
+ },
107
+ },
108
+ {
109
+ variant: 'progress',
110
+ state: 'active',
111
+ styles: {
112
+ backgroundColor: theme.color.border.subtle,
113
+ },
114
+ },
115
+ {
116
+ variant: 'progress',
117
+ state: 'incomplete',
118
+ styles: {
119
+ backgroundColor: theme.color.border.subtle,
120
+ },
121
+ },
122
+ ],
123
+ },
124
+ circle: {
125
+ borderRadius: theme.borderRadius.full,
126
+ alignItems: 'center',
127
+ justifyContent: 'center',
128
+ padding: 2,
129
+ variants: {
130
+ variant: {
131
+ static: {
132
+ width: theme.components.timeline.static.circle.width,
133
+ height: theme.components.timeline.static.circle.height,
134
+ backgroundColor: theme.color.surface.brand.default,
135
+ },
136
+ progress: {
137
+ width: theme.components.timeline.progress.circle.width,
138
+ height: theme.components.timeline.progress.circle.height,
139
+ },
140
+ },
141
+ state: {
142
+ complete: {},
143
+ active: {},
144
+ incomplete: {},
145
+ },
146
+ },
147
+ compoundVariants: [
148
+ {
149
+ variant: 'progress',
150
+ state: 'complete',
151
+ styles: {
152
+ backgroundColor: theme.color.surface.brand.default,
153
+ },
154
+ },
155
+ {
156
+ variant: 'progress',
157
+ state: 'active',
158
+ styles: {
159
+ backgroundColor: theme.color.surface.neutral.subtle,
160
+ borderWidth: theme.borderWidth[2],
161
+ borderColor: theme.color.surface.brand.default,
162
+ },
163
+ },
164
+ {
165
+ variant: 'progress',
166
+ state: 'incomplete',
167
+ styles: {
168
+ backgroundColor: theme.color.surface.neutral.subtle,
169
+ borderWidth: theme.borderWidth[2],
170
+ borderColor: theme.color.border.subtle,
171
+ },
172
+ },
173
+ ],
174
+ },
175
+ activeInnerDot: {
176
+ width: '100%',
177
+ height: '100%',
178
+ borderRadius: theme.borderRadius.full,
179
+ backgroundColor: theme.color.surface.brand.default,
180
+ },
181
+ completeIcon: {
182
+ color: theme.color.text.inverted,
183
+ },
184
+ content: {
185
+ flex: 1,
186
+ minWidth: 0,
187
+ gap: theme.components.timeline.content.gap,
188
+ variants: {
189
+ position: {
190
+ single: {
191
+ paddingBottom: 0,
192
+ },
193
+ start: {
194
+ paddingBottom: theme.components.timeline.content.paddingBottom,
195
+ },
196
+ middle: {
197
+ paddingBottom: theme.components.timeline.content.paddingBottom,
198
+ },
199
+ end: {
200
+ paddingBottom: 0,
201
+ },
202
+ },
203
+ variant: {
204
+ static: {
205
+ paddingTop: 0,
206
+ },
207
+ progress: {
208
+ paddingTop: theme.components.timeline.content.paddingTop,
209
+ },
210
+ },
211
+ },
212
+ compoundVariants: [
213
+ {
214
+ position: 'start',
215
+ variant: 'static',
216
+ styles: {
217
+ marginTop: -6,
218
+ },
219
+ },
220
+ ],
221
+ },
222
+ textContent: {
223
+ width: '100%',
224
+ },
225
+ label: {
226
+ color: theme.color.text.primary,
227
+ },
228
+ helperText: {
229
+ color: theme.color.text.secondary,
230
+ },
231
+ customContent: {
232
+ width: '100%',
233
+ },
234
+ }));
235
+ export default TimelineItem;
@@ -0,0 +1,3 @@
1
+ export { default as Timeline } from './Timeline';
2
+ export { default as TimelineItem } from './TimelineItem';
3
+ export type { TimelineItemPosition, TimelineItemProps, TimelineItemState, TimelineProps, TimelineVariant, } from './Timeline.props';
@@ -0,0 +1,2 @@
1
+ export { default as Timeline } from './Timeline';
2
+ export { default as TimelineItem } from './TimelineItem';
@@ -5,7 +5,7 @@ import { StyleSheet } from 'react-native-unistyles';
5
5
  import { FormField } from '../FormField';
6
6
  import { getNextIndexFromValueChange } from './VerificationInput.utils';
7
7
  import { VerificationInputSlot } from './VerificationInputSlot';
8
- const VerificationInput = forwardRef(({ value = '', onChangeText, label, labelVariant = 'body', helperText, helperIcon, validationStatus = 'initial', validText, invalidText, disabled = false, readonly = false, secureTextEntry = false, autoFocus = false, style, ...props }, ref) => {
8
+ const VerificationInput = forwardRef(({ value = '', onChangeText, label, labelVariant = 'body', helperText, helperIcon, validationStatus = 'initial', validText, invalidText, disabled = false, readonly = false, secureTextEntry = false, autoFocus = false, style, testID, ...props }, ref) => {
9
9
  const length = 6;
10
10
  const inputRef = useRef(null);
11
11
  const latestValueRef = useRef(value);
@@ -160,7 +160,7 @@ const VerificationInput = forwardRef(({ value = '', onChangeText, label, labelVa
160
160
  latestSelectionRef.current = nextSelection;
161
161
  setSelection(nextSelection);
162
162
  setFocusedIndex(Math.min(nextSelection.start, length - 1));
163
- }, onFocus: handleFocus, onBlur: handleBlur, selection: selection, keyboardType: "number-pad", textContentType: "oneTimeCode", autoComplete: "sms-otp", secureTextEntry: secureTextEntry, maxLength: length, caretHidden: true, style: styles.hiddenInput }), slots.map(index => {
163
+ }, onFocus: handleFocus, onBlur: handleBlur, selection: selection, keyboardType: "number-pad", textContentType: "oneTimeCode", autoComplete: "sms-otp", secureTextEntry: secureTextEntry, maxLength: length, caretHidden: true, style: styles.hiddenInput, testID: testID }), slots.map(index => {
164
164
  const char = displayValue[index] || '';
165
165
  const isActive = focusedIndex === index;
166
166
  const displayChar = secureTextEntry && char ? '*' : char;
@@ -168,7 +168,7 @@ const VerificationInput = forwardRef(({ value = '', onChangeText, label, labelVa
168
168
  pendingFocusIndexRef.current = index;
169
169
  inputRef.current?.focus();
170
170
  setSelectionIndex(index);
171
- } }, index));
171
+ }, testID: testID ? `${testID}-${index}` : undefined }, index));
172
172
  })] }) }));
173
173
  });
174
174
  const styles = StyleSheet.create(theme => ({
@@ -11,6 +11,7 @@ export * from './Card';
11
11
  export * from './Carousel';
12
12
  export * from './Center';
13
13
  export * from './Checkbox';
14
+ export * from './Combobox';
14
15
  export * from './Container';
15
16
  export * from './CurrencyInput';
16
17
  export * from './DateInput';
@@ -39,20 +40,24 @@ export * from './Link';
39
40
  export * from './List';
40
41
  export * from './Menu';
41
42
  export * from './Modal';
43
+ export * from './Pagination';
42
44
  export * from './PillGroup';
43
45
  export * from './ProgressBar';
44
46
  export * from './ProgressStepper';
45
47
  export * from './Radio';
46
48
  export * from './RadioCard';
49
+ export * from './SafeAreaView';
47
50
  export * from './SectionHeader';
48
51
  export * from './SegmentedControl';
49
52
  export * from './Select';
50
53
  export * from './Skeleton';
51
54
  export * from './Spinner';
52
55
  export * from './Switch';
56
+ export * from './Table';
53
57
  export * from './Tabs';
54
58
  export * from './Textarea';
55
59
  export * from './ThemedImage';
60
+ export * from './Timeline';
56
61
  export * from './TimePicker';
57
62
  export * from './TimePickerInput';
58
63
  export * from './Toast';