ferns-ui 1.2.2 → 1.2.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.
package/dist/Accordion.js CHANGED
@@ -2,37 +2,33 @@ import FontAwesome6 from "@expo/vector-icons/FontAwesome6";
2
2
  import React, { useEffect, useState } from "react";
3
3
  import { Pressable, View } from "react-native";
4
4
  import { Heading } from "./Heading";
5
- import { Modal } from "./Modal";
5
+ import { InfoModalIcon } from "./InfoModalIcon";
6
6
  import { Text } from "./Text";
7
7
  import { useTheme } from "./Theme";
8
8
  export const Accordion = ({ children, isCollapsed = false, title, subtitle, includeInfoModal = false, infoModalChildren, infoModalSubtitle, infoModalText, infoModalTitle, }) => {
9
9
  const { theme } = useTheme();
10
10
  const [collapsed, setCollapsed] = useState(false);
11
- const [infoModalVisibleState, setInfoModalVisibleState] = useState(false);
12
11
  // The external collapse state should override the internal collapse state.
13
12
  useEffect(() => {
14
13
  setCollapsed(isCollapsed);
15
14
  }, [isCollapsed]);
16
- return (React.createElement(React.Fragment, null,
17
- React.createElement(Modal, { primaryButtonOnClick: () => setInfoModalVisibleState(false), primaryButtonText: "Close", size: "md", subtitle: infoModalSubtitle, text: infoModalText, title: infoModalTitle, visible: infoModalVisibleState, onDismiss: () => setInfoModalVisibleState(false) }, infoModalChildren),
18
- React.createElement(View, { style: {
19
- padding: 16,
20
- borderBottomColor: theme.border.default,
21
- borderTopColor: theme.border.default,
22
- borderTopWidth: 2,
23
- borderBottomWidth: 2,
24
- width: "100%",
25
- } },
26
- React.createElement(View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" } },
27
- React.createElement(View, { style: { flexDirection: "column", gap: 4 } },
28
- React.createElement(View, { style: { flexDirection: "row", alignItems: "center" } },
29
- React.createElement(Heading, null, title),
30
- includeInfoModal && infoModalTitle && (React.createElement(Pressable, { "aria-role": "button", hitSlop: { top: 10, bottom: 10, left: 10, right: 10 }, style: { marginLeft: 8 }, onPress: () => setInfoModalVisibleState(true) },
31
- React.createElement(Heading, { color: "secondaryLight", size: "sm" }, "\u24D8")))),
32
- subtitle && React.createElement(Text, null, subtitle)),
33
- React.createElement(View, null,
34
- React.createElement(Pressable, { "aria-role": "button", hitSlop: { top: 20, bottom: 20, left: 20, right: 20 }, onPress: () => setCollapsed(!collapsed) },
35
- React.createElement(FontAwesome6, { color: theme.text.link, name: collapsed ? "chevron-down" : "chevron-up", selectable: undefined, size: 16 })))),
36
- collapsed ? null : React.createElement(View, { style: { marginTop: 8 } }, children))));
15
+ return (React.createElement(View, { style: {
16
+ padding: 16,
17
+ borderBottomColor: theme.border.default,
18
+ borderTopColor: theme.border.default,
19
+ borderTopWidth: 2,
20
+ borderBottomWidth: 2,
21
+ width: "100%",
22
+ } },
23
+ React.createElement(View, { style: { flexDirection: "row", justifyContent: "space-between", alignItems: "center" } },
24
+ React.createElement(View, { style: { flexDirection: "column", gap: 4 } },
25
+ React.createElement(View, { style: { flexDirection: "row", alignItems: "center" } },
26
+ React.createElement(Heading, null, title),
27
+ includeInfoModal && infoModalTitle && (React.createElement(InfoModalIcon, { infoModalChildren: infoModalChildren, infoModalSubtitle: infoModalSubtitle, infoModalText: infoModalText, infoModalTitle: infoModalTitle }))),
28
+ subtitle && React.createElement(Text, null, subtitle)),
29
+ React.createElement(View, null,
30
+ React.createElement(Pressable, { "aria-role": "button", hitSlop: { top: 20, bottom: 20, left: 20, right: 20 }, onPress: () => setCollapsed(!collapsed) },
31
+ React.createElement(FontAwesome6, { color: theme.text.link, name: collapsed ? "chevron-down" : "chevron-up", selectable: undefined, size: 16 })))),
32
+ collapsed ? null : React.createElement(View, { style: { marginTop: 8 } }, children)));
37
33
  };
38
34
  //# sourceMappingURL=Accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAK,SAAS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AC,cAAc,CAAC,CAAC,CAAC,YAAY,EAC/C,UAAU,EAAE,SAAS,EACrB,IAAI,EAAE,EAAE,GACR,CACQ,CACP,CACF;QACN,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,EAAC,SAAS,EAAE,CAAC,EAAC,IAAG,QAAQ,CAAQ,CAC7D,CACR,CAAC;AACJ,CAAC,CAAC"}
package/dist/Common.d.ts CHANGED
@@ -5,16 +5,7 @@ import { DimensionValue } from "react-native/Libraries/StyleSheet/StyleSheetType
5
5
  import { Styles } from "react-native-google-places-autocomplete";
6
6
  import { SvgProps } from "react-native-svg";
7
7
  import { FontAwesome6BrandNames, FontAwesome6RegularNames, FontAwesome6SolidNames } from "./CommonIconTypes";
8
- export interface AccordionProps {
9
- /**
10
- * The content to be displayed inside the accordion.
11
- */
12
- children: React.ReactNode;
13
- /**
14
- * If true, an information modal will be included.
15
- * @default false
16
- */
17
- includeInfoModal?: boolean;
8
+ export interface InfoModalIconProps {
18
9
  /**
19
10
  * The content of the information modal.
20
11
  */
@@ -31,6 +22,17 @@ export interface AccordionProps {
31
22
  * The title of the information modal.
32
23
  */
33
24
  infoModalTitle?: ModalProps["title"];
25
+ }
26
+ export interface AccordionProps extends InfoModalIconProps {
27
+ /**
28
+ * The content to be displayed inside the accordion.
29
+ */
30
+ children: React.ReactNode;
31
+ /**
32
+ * If true, an information modal will be included.
33
+ * @default false
34
+ */
35
+ includeInfoModal?: boolean;
34
36
  /**
35
37
  * If true, the accordion will be collapsed.
36
38
  * @default true
@@ -1588,6 +1590,67 @@ export interface PaginationProps {
1588
1590
  setPage: (page: number) => void;
1589
1591
  totalPages: number;
1590
1592
  }
1593
+ /**
1594
+ * Data Table
1595
+ */
1596
+ export type DataTableCellData = {
1597
+ value: any;
1598
+ highlight?: SurfaceColor;
1599
+ textSize?: "sm" | "md" | "lg";
1600
+ };
1601
+ export type DataTableCustomComponentMap = Record<string, React.ComponentType<{
1602
+ column: DataTableColumn;
1603
+ cellData: DataTableCellData;
1604
+ }>>;
1605
+ export interface DataTableColumn {
1606
+ title: string;
1607
+ columnType: "text" | "number" | "date" | "boolean" | string;
1608
+ width: number;
1609
+ highlight?: SurfaceColor;
1610
+ sortable?: boolean;
1611
+ infoModalText?: string;
1612
+ }
1613
+ export interface DataTableProps {
1614
+ data: {
1615
+ value: any;
1616
+ highlight?: SurfaceColor;
1617
+ textSize?: "sm" | "md" | "lg";
1618
+ }[][];
1619
+ columns: DataTableColumn[];
1620
+ alternateRowBackground?: boolean;
1621
+ totalPages?: number;
1622
+ page?: number;
1623
+ setPage?: (page: number) => void;
1624
+ pinnedColumns?: number;
1625
+ sortColumn?: ColumnSortInterface;
1626
+ setSortColumn?: (sortColumn?: ColumnSortInterface) => void;
1627
+ rowHeight?: number;
1628
+ defaultTextSize?: "sm" | "md" | "lg";
1629
+ /**
1630
+ * When tapping the eye icon, a modal is shown with more info about the row.
1631
+ */
1632
+ moreContentComponent?: React.ComponentType<{
1633
+ column: DataTableColumn;
1634
+ rowData: any[];
1635
+ rowIndex: number;
1636
+ }>;
1637
+ moreContentExtraData?: any[];
1638
+ customColumnComponentMap?: DataTableCustomComponentMap;
1639
+ }
1640
+ export interface DataTableCellProps {
1641
+ value: any;
1642
+ columnDef: DataTableColumn;
1643
+ colIndex: number;
1644
+ isPinnedHorizontal: boolean;
1645
+ isPinnedRow?: boolean;
1646
+ pinnedColumns: number;
1647
+ columnWidths: number[];
1648
+ backgroundColor: string;
1649
+ highlight?: SurfaceColor;
1650
+ customColumnComponentMap?: DataTableCustomComponentMap;
1651
+ height: number;
1652
+ textSize?: "sm" | "md" | "lg";
1653
+ }
1591
1654
  export interface TableHeaderProps {
1592
1655
  /**
1593
1656
  * Must be an instance of TableRow.
@@ -1605,7 +1668,7 @@ export interface TableHeaderProps {
1605
1668
  sticky?: boolean;
1606
1669
  color?: BoxColor;
1607
1670
  }
1608
- export interface TableHeaderCellProps {
1671
+ export interface TableHeaderCellProps extends InfoModalIconProps {
1609
1672
  /**
1610
1673
  * The content of the table header cell.
1611
1674
  */
@@ -1624,6 +1687,11 @@ export interface TableHeaderCellProps {
1624
1687
  * wrap the text yourself. Alignments will match between the cell and the title.
1625
1688
  */
1626
1689
  title?: string;
1690
+ /**
1691
+ * If provided, a tooltip icon will be shown and a tooltip will be shown when hovering over the
1692
+ * icon.
1693
+ */
1694
+ infoText?: string;
1627
1695
  }
1628
1696
  export interface TableRowProps {
1629
1697
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Common.js","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AAqXA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,OAAqB;IAC9C,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,WAAW,CAAC,OAAyB,CAAC,CAAC;AAChD,CAAC;AAqBD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAe,EAAE,EAAE;IAClD,OAAO;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,EAAE;KACV,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;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AK,EAAE,EAAE;KACV,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AAiRF,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,GAAG;IACZ,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,QAAkB;IAC5C,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { DataTableProps } from "./Common";
3
+ export declare const DataTable: React.FC<DataTableProps>;
@@ -0,0 +1,218 @@
1
+ import { FontAwesome6 } from "@expo/vector-icons";
2
+ import React, { useCallback, useMemo, useRef, useState } from "react";
3
+ import { Pressable, ScrollView, View } from "react-native";
4
+ // @ts-ignore
5
+ import Markdown from "react-native-markdown-display";
6
+ import { Box } from "./Box";
7
+ import { Icon } from "./Icon";
8
+ import { InfoModalIcon } from "./InfoModalIcon";
9
+ import { Modal } from "./Modal";
10
+ import { Pagination } from "./Pagination";
11
+ import { TableTitle } from "./table/TableTitle";
12
+ import { Text } from "./Text";
13
+ import { useTheme } from "./Theme";
14
+ // TODO: Add permanent horizontal scroll bar so users with only a mouse can scroll left/right
15
+ // easily.
16
+ const TextCell = ({ cellData }) => {
17
+ return (React.createElement(Box, { flex: "grow", justifyContent: "center", paddingX: 2 },
18
+ React.createElement(Text, { size: cellData.textSize || "md" }, cellData.value)));
19
+ };
20
+ const CheckedCell = ({ cellData, }) => {
21
+ return (React.createElement(Box, { flex: "grow", justifyContent: "center", width: "100%" },
22
+ React.createElement(Icon, { color: cellData.value ? "success" : "secondaryDark", iconName: cellData.value ? "check" : "x" })));
23
+ };
24
+ const DataTableCell = ({ value, columnDef, colIndex, isPinnedHorizontal, pinnedColumns, columnWidths, customColumnComponentMap, backgroundColor, height, textSize = "md", }) => {
25
+ const { theme } = useTheme();
26
+ const isLastPinnedColumn = isPinnedHorizontal && colIndex === pinnedColumns - 1;
27
+ // Default to TextCell
28
+ let Component = TextCell;
29
+ if (customColumnComponentMap === null || customColumnComponentMap === void 0 ? void 0 : customColumnComponentMap[columnDef.columnType]) {
30
+ Component = customColumnComponentMap[columnDef.columnType];
31
+ }
32
+ else if (columnDef.columnType === "boolean") {
33
+ Component = CheckedCell;
34
+ }
35
+ return (React.createElement(View, { style: Object.assign(Object.assign({ padding: 16, justifyContent: "center", height, width: columnDef.width, backgroundColor, overflow: "hidden", position: "relative", zIndex: 1, borderBottomWidth: 1, borderBottomColor: theme.border.default }, (isPinnedHorizontal && {
36
+ position: "absolute",
37
+ // Position each pinned column by summing widths of all previous columns
38
+ left: columnWidths.slice(0, colIndex).reduce((sum, width) => sum + width, 0),
39
+ // Higher z-index keeps pinned columns above scrollable ones, decreasing by column index
40
+ zIndex: 10 - colIndex,
41
+ })), (isLastPinnedColumn && {
42
+ borderRightWidth: 3,
43
+ borderRightColor: theme.border.default,
44
+ })) },
45
+ React.createElement(Component, { cellData: Object.assign(Object.assign({}, value), { textSize }), column: columnDef })));
46
+ };
47
+ const DataTableRow = ({ rowData, rowIndex, columns, pinnedColumns, columnWidths, alternateRowBackground, customColumnComponentMap, rowHeight, }) => {
48
+ const { theme } = useTheme();
49
+ const backgroundColor = alternateRowBackground && rowIndex % 2 === 1 ? theme.surface.neutralLight : theme.surface.base;
50
+ return (React.createElement(View, { style: {
51
+ flexDirection: "row",
52
+ height: rowHeight,
53
+ borderBottomWidth: 1,
54
+ borderBottomColor: theme.border.default,
55
+ } }, rowData.map((cell, colIndex) => (React.createElement(DataTableCell, { key: colIndex, backgroundColor: cell.highlight ? theme.surface[cell.highlight] : backgroundColor, colIndex: colIndex, columnDef: columns[colIndex], columnWidths: columnWidths, customColumnComponentMap: customColumnComponentMap, height: rowHeight, isPinnedHorizontal: colIndex < pinnedColumns, pinnedColumns: pinnedColumns, textSize: cell.textSize, value: cell })))));
56
+ };
57
+ const MoreButtonCell = ({ rowIndex, alternateRowBackground, onClick, rowHeight, }) => {
58
+ const { theme } = useTheme();
59
+ return (React.createElement(View, { style: {
60
+ width: 48,
61
+ height: rowHeight !== null && rowHeight !== void 0 ? rowHeight : 54,
62
+ justifyContent: "center",
63
+ alignItems: "center",
64
+ backgroundColor: alternateRowBackground && rowIndex % 2 === 1
65
+ ? theme.surface.neutralLight
66
+ : theme.surface.base,
67
+ borderBottomWidth: 1,
68
+ borderBottomColor: theme.border.default,
69
+ } },
70
+ React.createElement(Pressable, { accessibilityHint: "View details", accessibilityLabel: "Open modal", accessibilityRole: "button", style: {
71
+ borderRadius: theme.radius.rounded,
72
+ backgroundColor: alternateRowBackground && rowIndex % 2 === 1
73
+ ? theme.surface.base
74
+ : theme.surface.neutralLight,
75
+ width: 32,
76
+ height: 32,
77
+ justifyContent: "center",
78
+ alignItems: "center",
79
+ }, onPress: () => onClick(rowIndex) },
80
+ React.createElement(Icon, { color: "secondaryDark", iconName: "info", size: "md" }))));
81
+ };
82
+ const DataTableHeaderCell = ({ column, index, isPinnedHorizontal, columnWidths, sortColumn, onSort, rowHeight, }) => {
83
+ const { theme } = useTheme();
84
+ const sort = (sortColumn === null || sortColumn === void 0 ? void 0 : sortColumn.column) === index ? sortColumn.direction : undefined;
85
+ return (React.createElement(View, { style: Object.assign({ padding: 16, flexDirection: "row", alignItems: "center", justifyContent: "space-between", height: rowHeight !== null && rowHeight !== void 0 ? rowHeight : 54, width: column.width, backgroundColor: theme.surface.base, borderBottomWidth: 1, borderBottomColor: theme.border.default }, (isPinnedHorizontal && {
86
+ position: "absolute",
87
+ left: columnWidths.slice(0, index).reduce((sum, width) => sum + width, 0),
88
+ zIndex: 10 - index,
89
+ })) },
90
+ Boolean(column.title) && React.createElement(TableTitle, { align: "left", title: column.title }),
91
+ React.createElement(View, { style: { flexDirection: "row", alignItems: "center" } },
92
+ column.infoModalText && (React.createElement(InfoModalIcon, { infoModalChildren: React.createElement(Markdown, null, column.infoModalText) })),
93
+ column.sortable && (React.createElement(Pressable, { hitSlop: 16, onPress: () => onSort(index) },
94
+ React.createElement(View, { style: {
95
+ alignItems: "center",
96
+ backgroundColor: sort ? theme.surface.primary : theme.surface.neutralLight,
97
+ borderRadius: theme.radius.rounded,
98
+ justifyContent: "center",
99
+ height: 16,
100
+ width: 16,
101
+ marginLeft: 8,
102
+ } },
103
+ React.createElement(FontAwesome6, { color: theme.text.inverted, name: sort === "asc" ? "arrow-down" : sort === "desc" ? "arrow-up" : "arrows-up-down", selectable: undefined, size: 10, solid: true })))))));
104
+ };
105
+ const DataTableHeader = ({ columns, hasMoreContent, pinnedColumns, columnWidths, headerScrollRef, sortColumn, onSort, onScroll, rowHeight, }) => {
106
+ const { theme } = useTheme();
107
+ return (React.createElement(View, { style: { flexDirection: "row", position: "relative" } },
108
+ hasMoreContent && (React.createElement(View, { style: {
109
+ width: 48,
110
+ height: rowHeight !== null && rowHeight !== void 0 ? rowHeight : 54,
111
+ backgroundColor: theme.surface.base,
112
+ borderBottomWidth: 1,
113
+ borderBottomColor: theme.border.default,
114
+ zIndex: 11,
115
+ } })),
116
+ pinnedColumns > 0 && (React.createElement(View, { style: {
117
+ position: "absolute",
118
+ // Offset left position if there's a "more" content button
119
+ left: hasMoreContent ? 48 : 0,
120
+ top: 0,
121
+ zIndex: 10,
122
+ } }, columns.slice(0, pinnedColumns).map((column, index) => (React.createElement(DataTableHeaderCell, { key: `pinned-header-${index}`, column: column, columnWidths: columnWidths, index: index, isPinnedHorizontal: true, rowHeight: rowHeight, sortColumn: sortColumn, onSort: onSort }))))),
123
+ React.createElement(ScrollView, { ref: headerScrollRef, horizontal: true, scrollEventThrottle: 16, showsHorizontalScrollIndicator: false, style: {
124
+ // Offset scrollable area by total width of pinned columns
125
+ marginLeft: columnWidths.slice(0, pinnedColumns).reduce((sum, width) => sum + width, 0),
126
+ }, onScroll: (e) => onScroll(e, true) }, columns.slice(pinnedColumns).map((column, index) => (React.createElement(DataTableHeaderCell, { key: `scrollable-header-${index + pinnedColumns}`, column: column, columnWidths: columnWidths, index: index + pinnedColumns, isPinnedHorizontal: false, rowHeight: rowHeight, sortColumn: sortColumn, onSort: onSort }))))));
127
+ };
128
+ const DataTableContent = ({ data, columns, pinnedColumns, alternateRowBackground, columnWidths, bodyScrollRef, onScroll, customColumnComponentMap, moreContentComponent: MoreContentContent, moreContentExtraData, moreContentSize = "md", rowHeight, }) => {
129
+ var _a;
130
+ const [modalRow, setModalRow] = useState(null);
131
+ const { theme } = useTheme();
132
+ return (React.createElement(React.Fragment, null,
133
+ React.createElement(ScrollView, { style: { flex: 1 } },
134
+ React.createElement(View, { style: {
135
+ flexDirection: "row",
136
+ position: "relative",
137
+ } },
138
+ Boolean(MoreContentContent) && (React.createElement(View, { style: {
139
+ position: "absolute",
140
+ left: 0,
141
+ top: 0,
142
+ width: 48,
143
+ zIndex: 1,
144
+ backgroundColor: theme.surface.base,
145
+ } }, data.map((_, rowIndex) => (React.createElement(MoreButtonCell, { key: `expand-${rowIndex}`, alternateRowBackground: alternateRowBackground, column: columns[0], rowHeight: rowHeight, rowIndex: rowIndex, onClick: setModalRow }))))),
146
+ pinnedColumns > 0 && (React.createElement(View, { style: {
147
+ position: "absolute",
148
+ left: Boolean(MoreContentContent) ? 48 : 0,
149
+ top: 0,
150
+ zIndex: 10,
151
+ } }, data.map((row, rowIndex) => (React.createElement(DataTableRow, { key: `pinned-${rowIndex}`, alternateRowBackground: alternateRowBackground, columnWidths: columnWidths, columns: columns.slice(0, pinnedColumns), customColumnComponentMap: customColumnComponentMap, pinnedColumns: pinnedColumns, rowData: row.slice(0, pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex }))))),
152
+ React.createElement(ScrollView, { ref: bodyScrollRef, horizontal: true, scrollEventThrottle: 16, showsHorizontalScrollIndicator: true, style: {
153
+ flex: 1,
154
+ marginLeft: columnWidths.slice(0, pinnedColumns).reduce((sum, width) => sum + width, 0) +
155
+ (Boolean(MoreContentContent) ? 48 : 0),
156
+ }, onScroll: (e) => onScroll(e, false) },
157
+ React.createElement(View, null, data.map((row, rowIndex) => (React.createElement(DataTableRow, { key: `scrollable-${rowIndex}`, alternateRowBackground: alternateRowBackground, columnWidths: columnWidths, columns: columns.slice(pinnedColumns), customColumnComponentMap: customColumnComponentMap, pinnedColumns: 0, rowData: row.slice(pinnedColumns), rowHeight: rowHeight, rowIndex: rowIndex }))))))),
158
+ MoreContentContent && (React.createElement(Modal, { size: moreContentSize, visible: modalRow !== null, onDismiss: () => setModalRow(null) },
159
+ React.createElement(MoreContentContent, Object.assign({ column: columns[0], rowData: data[modalRow], rowIndex: modalRow }, ((_a = moreContentExtraData === null || moreContentExtraData === void 0 ? void 0 : moreContentExtraData[modalRow]) !== null && _a !== void 0 ? _a : {})))))));
160
+ };
161
+ export const DataTable = ({ data, columns, alternateRowBackground = true, totalPages = 1, page = 0, setPage, pinnedColumns = 0, sortColumn, setSortColumn, moreContentComponent, moreContentExtraData, customColumnComponentMap, rowHeight = 54, defaultTextSize = "md", }) => {
162
+ const { theme } = useTheme();
163
+ const headerScrollRef = useRef(null);
164
+ const bodyScrollRef = useRef(null);
165
+ const columnWidths = useMemo(() => columns.map((col) => col.width), [columns]);
166
+ const handleScroll = useCallback((event, isHeader) => {
167
+ const scrollX = event.nativeEvent.contentOffset.x;
168
+ if (isHeader && bodyScrollRef.current) {
169
+ bodyScrollRef.current.scrollTo({ x: scrollX, animated: false });
170
+ }
171
+ else if (!isHeader && headerScrollRef.current) {
172
+ headerScrollRef.current.scrollTo({ x: scrollX, animated: false });
173
+ }
174
+ }, []);
175
+ const handleSort = useCallback((columnIndex) => {
176
+ if (!setSortColumn || !columns[columnIndex].sortable) {
177
+ return;
178
+ }
179
+ if ((sortColumn === null || sortColumn === void 0 ? void 0 : sortColumn.column) === columnIndex) {
180
+ if (sortColumn.direction === "asc") {
181
+ setSortColumn({
182
+ column: columnIndex,
183
+ direction: "desc",
184
+ });
185
+ }
186
+ else {
187
+ setSortColumn(undefined);
188
+ }
189
+ }
190
+ else {
191
+ setSortColumn({
192
+ column: columnIndex,
193
+ direction: "asc",
194
+ });
195
+ }
196
+ }, [sortColumn, setSortColumn, columns]);
197
+ const processedData = useMemo(() => {
198
+ return data.map((row) => row.map((cell) => (Object.assign(Object.assign({}, cell), { textSize: cell.textSize || defaultTextSize }))));
199
+ }, [data, defaultTextSize]);
200
+ return (React.createElement(View, { style: { height: "100%", display: "flex", flexDirection: "column" } },
201
+ React.createElement(View, { style: {
202
+ flex: 1,
203
+ minHeight: 0,
204
+ borderWidth: 1,
205
+ borderColor: theme.border.default,
206
+ height: "100%",
207
+ } },
208
+ React.createElement(DataTableHeader, { columnWidths: columnWidths, columns: columns, hasMoreContent: Boolean(moreContentComponent), headerScrollRef: headerScrollRef, pinnedColumns: pinnedColumns, rowHeight: rowHeight, sortColumn: sortColumn, onScroll: handleScroll, onSort: handleSort }),
209
+ React.createElement(View, { style: { flex: 1, minHeight: 0 } },
210
+ React.createElement(DataTableContent, { alternateRowBackground: alternateRowBackground, bodyScrollRef: bodyScrollRef, columnWidths: columnWidths, columns: columns, customColumnComponentMap: customColumnComponentMap, data: processedData, moreContentComponent: moreContentComponent, moreContentExtraData: moreContentExtraData, pinnedColumns: pinnedColumns, rowHeight: rowHeight, onScroll: handleScroll }))),
211
+ Boolean(setPage && totalPages > 1) && (React.createElement(View, { style: {
212
+ height: 60,
213
+ padding: 16,
214
+ alignItems: "center",
215
+ } },
216
+ React.createElement(Pagination, { page: page, setPage: setPage, totalPages: totalPages })))));
217
+ };
218
+ //# sourceMappingURL=DataTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../src/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,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const InfoModalIcon: FC<InfoModalIconProps>;
@@ -0,0 +1,12 @@
1
+ import React, { useState } from "react";
2
+ import { Pressable } from "react-native";
3
+ import { Heading } from "./Heading";
4
+ import { Modal } from "./Modal";
5
+ export const InfoModalIcon = ({ infoModalChildren, infoModalSubtitle, infoModalText, infoModalTitle, }) => {
6
+ const [infoModalVisibleState, setInfoModalVisibleState] = useState(false);
7
+ return (React.createElement(React.Fragment, null,
8
+ React.createElement(Modal, { primaryButtonOnClick: () => setInfoModalVisibleState(false), primaryButtonText: "Close", size: "md", subtitle: infoModalSubtitle, text: infoModalText, title: infoModalTitle, visible: infoModalVisibleState, onDismiss: () => setInfoModalVisibleState(false) }, infoModalChildren),
9
+ React.createElement(Pressable, { "aria-role": "button", hitSlop: { top: 10, bottom: 10, left: 10, right: 10 }, style: { marginLeft: 8 }, onPress: () => setInfoModalVisibleState(true) },
10
+ React.createElement(Heading, { color: "secondaryLight", size: "sm" }, "\u24D8"))));
11
+ };
12
+ //# sourceMappingURL=InfoModalIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoModalIcon.js","sourceRoot":"","sources":["../src/InfoModalIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAK,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EACpD,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,EAAE,EAAE;IACH,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1E,OAAO,CACL;QACE,oBAAC,KAAK,IACJ,oBAAoB,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAC3D,iBAAiB,EAAC,OAAO,EACzB,IAAI,EAAC,IAAI,EACT,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,KAAK,CAAC,IAE/C,iBAAiB,CACZ;QACR,oBAAC,SAAS,iBACE,QAAQ,EAClB,OAAO,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAC,EACnD,KAAK,EAAE,EAAC,UAAU,EAAE,CAAC,EAAC,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC;YAE7C,oBAAC,OAAO,IAAC,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAC,IAAI,aAE/B,CACA,CACX,CACJ,CAAC;AACJ,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from "./CheckBox";
13
13
  export * from "./Common";
14
14
  export * from "./Constants";
15
15
  export * from "./CustomSelectField";
16
+ export * from "./DataTable";
16
17
  export * from "./DateTimeActionSheet";
17
18
  export * from "./DateTimeField";
18
19
  export * from "./DateUtilities";
@@ -30,6 +31,7 @@ export * from "./Icon";
30
31
  export * from "./IconButton";
31
32
  export * from "./Image";
32
33
  export * from "./ImageBackground";
34
+ export * from "./InfoModalIcon";
33
35
  export * from "./InfoTooltipButton";
34
36
  export * from "./Link";
35
37
  export * from "./MediaQuery";
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ export * from "./CheckBox";
13
13
  export * from "./Common";
14
14
  export * from "./Constants";
15
15
  export * from "./CustomSelectField";
16
+ export * from "./DataTable";
16
17
  export * from "./DateTimeActionSheet";
17
18
  export * from "./DateTimeField";
18
19
  export * from "./DateUtilities";
@@ -30,6 +31,7 @@ export * from "./Icon";
30
31
  export * from "./IconButton";
31
32
  export * from "./Image";
32
33
  export * from "./ImageBackground";
34
+ export * from "./InfoModalIcon";
33
35
  export * from "./InfoTooltipButton";
34
36
  export * from "./Link";
35
37
  export * from "./MediaQuery";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,C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B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ferns-ui",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "main": "dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "scripts": {
@@ -158,6 +158,7 @@
158
158
  "react-native-drawer-layout": "^3.3.2",
159
159
  "react-native-gesture-handler": "~2.16.1",
160
160
  "react-native-google-places-autocomplete": "^2.5.6",
161
+ "react-native-markdown-display": "^7.0.2",
161
162
  "react-native-modalize": "^2.1.1",
162
163
  "react-native-permissions": "^4.1.5",
163
164
  "react-native-picker-select": "^9.1.3",