@ankhorage/zora 2.4.4 → 2.4.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 9db4949: Add DataTable for typed app-facing tabular data with row actions, sorting state, loading, empty, and responsive layouts.
8
+
3
9
  ## 2.4.4
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { DataTableProps } from './types';
3
+ export declare const DataTable: <TRow extends object>(props: DataTableProps<TRow>) => React.ReactElement | null;
4
+ //# sourceMappingURL=DataTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAKV,cAAc,EAGf,MAAM,SAAS,CAAC;AA+WjB,eAAO,MAAM,SAAS,GAxCE,IAAI,SAAS,MAAM,2DAwCgB,CAAC"}
@@ -0,0 +1,207 @@
1
+ import React from 'react';
2
+ import { ScrollView } from 'react-native';
3
+ import { Box, Show, Stack } from '../../foundation';
4
+ import { EmptyState } from '../../patterns/empty-state';
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
+ import { Button } from '../button';
7
+ import { Card } from '../card';
8
+ import { IconButton } from '../icon-button';
9
+ import { DropdownMenu } from '../menu';
10
+ import { SkeletonList } from '../skeleton';
11
+ import { Text } from '../text';
12
+ function resolveTextAlign(align) {
13
+ switch (align) {
14
+ case 'center':
15
+ return 'center';
16
+ case 'end':
17
+ return 'right';
18
+ case 'start':
19
+ default:
20
+ return 'left';
21
+ }
22
+ }
23
+ function resolveCellJustify(align) {
24
+ switch (align) {
25
+ case 'center':
26
+ return 'center';
27
+ case 'end':
28
+ return 'flex-end';
29
+ case 'start':
30
+ default:
31
+ return 'flex-start';
32
+ }
33
+ }
34
+ function resolveCellStyle(column) {
35
+ return {
36
+ alignItems: resolveCellJustify(column.align),
37
+ flexGrow: column.width === undefined ? 1 : 0,
38
+ flexShrink: 0,
39
+ minWidth: column.minWidth ?? 140,
40
+ width: column.width,
41
+ };
42
+ }
43
+ function resolveRowPadding(density) {
44
+ return density === 'compact'
45
+ ? { px: 'm', py: 's' }
46
+ : { px: 'm', py: 'm' };
47
+ }
48
+ function resolveAccessorValue(row, column) {
49
+ if (column.accessor === undefined) {
50
+ return undefined;
51
+ }
52
+ return row[column.accessor];
53
+ }
54
+ function renderDefaultCell(value) {
55
+ if (value === null || value === undefined) {
56
+ return '—';
57
+ }
58
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
59
+ return String(value);
60
+ }
61
+ if (typeof value === 'bigint') {
62
+ return value.toString();
63
+ }
64
+ if (value instanceof Date) {
65
+ return value.toLocaleDateString();
66
+ }
67
+ return '—';
68
+ }
69
+ function createCellContext(column, row, rowIndex) {
70
+ return {
71
+ column,
72
+ row,
73
+ rowIndex,
74
+ value: resolveAccessorValue(row, column),
75
+ };
76
+ }
77
+ function renderCell(column, row, rowIndex) {
78
+ const context = createCellContext(column, row, rowIndex);
79
+ return column.renderCell ? column.renderCell(context) : renderDefaultCell(context.value);
80
+ }
81
+ function renderTableCell(column, row, rowIndex) {
82
+ if (column.renderCell) {
83
+ return column.renderCell(createCellContext(column, row, rowIndex));
84
+ }
85
+ return (<Text align={resolveTextAlign(column.align)} variant="bodySmall">
86
+ {renderDefaultCell(resolveAccessorValue(row, column))}
87
+ </Text>);
88
+ }
89
+ function resolveNextSortDirection(current) {
90
+ return current === 'asc' ? 'desc' : 'asc';
91
+ }
92
+ function mapRowActions(row, actions) {
93
+ return actions.map((action) => ({
94
+ description: action.description,
95
+ disabled: action.disabled,
96
+ icon: action.icon,
97
+ id: action.id,
98
+ intent: action.intent,
99
+ onPress: action.onPress ? () => action.onPress?.(row) : undefined,
100
+ title: action.title,
101
+ }));
102
+ }
103
+ function renderRowActions({ row, rowIndex, rowActions, testID, }) {
104
+ const actions = rowActions?.(row, rowIndex) ?? [];
105
+ if (actions.length === 0) {
106
+ return null;
107
+ }
108
+ return (<DropdownMenu actions={mapRowActions(row, actions)} trigger={<IconButton icon={{ name: 'ellipsis-horizontal' }} label="Row actions" size="s" variant="ghost"/>} testID={testID ? `${testID}-row-actions-${rowIndex}` : undefined}/>);
109
+ }
110
+ function DataTableHeader({ columns, sort, onSortChange, density, }) {
111
+ const padding = resolveRowPadding(density ?? 'comfortable');
112
+ return (<Box bg="subtle" borderColor="border" borderWidth={1} radius="m">
113
+ <Stack direction="row" align="center">
114
+ {columns.map((column) => {
115
+ const currentDirection = sort?.columnId === column.id ? sort.direction : undefined;
116
+ const sortable = Boolean(column.sortable && onSortChange);
117
+ const directionLabel = currentDirection === undefined ? '' : currentDirection === 'asc' ? ' ↑' : ' ↓';
118
+ return (<Box key={column.id} px={padding.px} py={padding.py} style={resolveCellStyle(column)}>
119
+ {sortable ? (<Button color="primary" onPress={() => onSortChange?.({
120
+ columnId: column.id,
121
+ direction: resolveNextSortDirection(currentDirection),
122
+ })} size="s" variant="ghost">
123
+ {column.header}
124
+ {directionLabel}
125
+ </Button>) : (<Text align={resolveTextAlign(column.align)} emphasis="muted" variant="caption" weight="semiBold">
126
+ {column.header}
127
+ </Text>)}
128
+ </Box>);
129
+ })}
130
+ <Box px={padding.px} py={padding.py} style={{ minWidth: 56, width: 56 }}>
131
+ <Text align="right" emphasis="muted" variant="caption" weight="semiBold">
132
+ Actions
133
+ </Text>
134
+ </Box>
135
+ </Stack>
136
+ </Box>);
137
+ }
138
+ function DataTableDesktop({ columns, rows, rowActions, rowId, sort, onSortChange, density, testID, }) {
139
+ const padding = resolveRowPadding(density ?? 'comfortable');
140
+ return (<ScrollView horizontal showsHorizontalScrollIndicator={false}>
141
+ <Box minWidth={720} style={{ width: '100%' }}>
142
+ <Stack gap="xs">
143
+ <DataTableHeader columns={columns} density={density} onSortChange={onSortChange} sort={sort}/>
144
+ <Stack gap="xs">
145
+ {rows.map((row, rowIndex) => (<Box bg="surface" borderColor="border" borderWidth={1} key={rowId(row, rowIndex)} radius="m" testID={testID ? `${testID}-row-${rowIndex}` : undefined}>
146
+ <Stack direction="row" align="center">
147
+ {columns.map((column) => (<Box key={column.id} px={padding.px} py={padding.py} style={resolveCellStyle(column)}>
148
+ {renderTableCell(column, row, rowIndex)}
149
+ </Box>))}
150
+ <Box px={padding.px} py={padding.py} style={{ alignItems: 'flex-end', minWidth: 56, width: 56 }}>
151
+ {renderRowActions({ row, rowActions, rowIndex, testID })}
152
+ </Box>
153
+ </Stack>
154
+ </Box>))}
155
+ </Stack>
156
+ </Stack>
157
+ </Box>
158
+ </ScrollView>);
159
+ }
160
+ function DataTableMobile({ columns, rows, rowActions, rowId, testID, }) {
161
+ const [primaryColumn, ...detailColumns] = columns;
162
+ return (<Stack gap="s">
163
+ {rows.map((row, rowIndex) => {
164
+ const title = primaryColumn
165
+ ? renderCell(primaryColumn, row, rowIndex)
166
+ : `Row ${rowIndex + 1}`;
167
+ const actions = renderRowActions({ row, rowActions, rowIndex, testID });
168
+ return (<Card actions={actions} compact key={rowId(row, rowIndex)} testID={testID ? `${testID}-card-${rowIndex}` : undefined} title={title}>
169
+ <Stack gap="s">
170
+ {detailColumns.map((column) => (<Stack gap="xxs" key={column.id}>
171
+ <Text emphasis="muted" variant="caption" weight="semiBold">
172
+ {column.header}
173
+ </Text>
174
+ {column.renderCell ? (renderCell(column, row, rowIndex)) : (<Text variant="bodySmall">
175
+ {renderDefaultCell(resolveAccessorValue(row, column))}
176
+ </Text>)}
177
+ </Stack>))}
178
+ </Stack>
179
+ </Card>);
180
+ })}
181
+ </Stack>);
182
+ }
183
+ function DataTableInner({ themeId: _themeId, mode: _mode, rows, loading = false, loadingRows = 5, emptyTitle = 'No data', emptyDescription = 'There are no rows to display.', testID, density = 'comfortable', ...props }) {
184
+ if (loading) {
185
+ return <SkeletonList rows={loadingRows} variant="card" testID={testID}/>;
186
+ }
187
+ if (rows.length === 0) {
188
+ return <EmptyState title={emptyTitle} description={emptyDescription}/>;
189
+ }
190
+ const tableProps = {
191
+ ...props,
192
+ density,
193
+ emptyDescription,
194
+ emptyTitle,
195
+ loading,
196
+ loadingRows,
197
+ rows,
198
+ testID,
199
+ };
200
+ return (<Box testID={testID}>
201
+ <Show when={{ base: false, md: true }} fallback={<DataTableMobile {...tableProps}/>}>
202
+ <DataTableDesktop {...tableProps}/>
203
+ </Show>
204
+ </Box>);
205
+ }
206
+ export const DataTable = withZoraThemeScope(DataTableInner);
207
+ //# sourceMappingURL=DataTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../../../src/components/data-table/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAmB,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAkB,MAAM,SAAS,CAAC;AAW/C,SAAS,gBAAgB,CAAC,KAAuC;IAC/D,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,KAAK;YACR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,KAAK,EACX,IAAI,EACJ,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,CAAC,EACf,UAAU,GAAG,SAAS,EACtB,gBAAgB,GAAG,+BAA+B,EAClD,MAAM,EACN,OAAO,GAAG,aAAa,EACvB,GAAG,KAAK,EACa;IACrB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAG,CAAC;IAC5E,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,EAAG,CAAC;IAC1E,CAAC;IAED,MAAM,UAAU,GAAyB;QACvC,GAAG,KAAK;QACR,OAAO;QACP,gBAAgB;QAChB,UAAU;QACV,OAAO;QACP,WAAW;QACX,IAAI;QACJ,MAAM;KACP,CAAC;IAEF,OAAO,CACL,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAClB;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAG,CAAC,CACnF;QAAA,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,EACnC;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { ScrollView, type ViewStyle } from 'react-native';\n\nimport { Box, Show, Stack } from '../../foundation';\nimport { EmptyState } from '../../patterns/empty-state';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Button } from '../button';\nimport { Card } from '../card';\nimport { IconButton } from '../icon-button';\nimport { DropdownMenu, type MenuAction } from '../menu';\nimport { SkeletonList } from '../skeleton';\nimport { Text, type TextAlign } from '../text';\nimport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n} from './types';\n\nfunction resolveTextAlign(align: DataTableColumnAlign | undefined): TextAlign {\n switch (align) {\n case 'center':\n return 'center';\n case 'end':\n return 'right';\n case 'start':\n default:\n return 'left';\n }\n}\n\nfunction resolveCellJustify(align: DataTableColumnAlign | undefined): ViewStyle['alignItems'] {\n switch (align) {\n case 'center':\n return 'center';\n case 'end':\n return 'flex-end';\n case 'start':\n default:\n return 'flex-start';\n }\n}\n\nfunction resolveCellStyle<TRow extends object>(column: DataTableColumn<TRow>): ViewStyle {\n return {\n alignItems: resolveCellJustify(column.align),\n flexGrow: column.width === undefined ? 1 : 0,\n flexShrink: 0,\n minWidth: column.minWidth ?? 140,\n width: column.width,\n };\n}\n\nfunction resolveRowPadding(density: DataTableDensity) {\n return density === 'compact'\n ? { px: 'm' as const, py: 's' as const }\n : { px: 'm' as const, py: 'm' as const };\n}\n\nfunction resolveAccessorValue<TRow extends object>(row: TRow, column: DataTableColumn<TRow>) {\n if (column.accessor === undefined) {\n return undefined;\n }\n\n return row[column.accessor];\n}\n\nfunction renderDefaultCell(value: unknown): React.ReactNode {\n if (value === null || value === undefined) {\n return '—';\n }\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n\n if (typeof value === 'bigint') {\n return value.toString();\n }\n\n if (value instanceof Date) {\n return value.toLocaleDateString();\n }\n\n return '—';\n}\n\nfunction createCellContext<TRow extends object>(\n column: DataTableColumn<TRow>,\n row: TRow,\n rowIndex: number,\n): DataTableCellContext<TRow> {\n return {\n column,\n row,\n rowIndex,\n value: resolveAccessorValue(row, column),\n };\n}\n\nfunction renderCell<TRow extends object>(\n column: DataTableColumn<TRow>,\n row: TRow,\n rowIndex: number,\n) {\n const context = createCellContext(column, row, rowIndex);\n return column.renderCell ? column.renderCell(context) : renderDefaultCell(context.value);\n}\n\nfunction renderTableCell<TRow extends object>(\n column: DataTableColumn<TRow>,\n row: TRow,\n rowIndex: number,\n) {\n if (column.renderCell) {\n return column.renderCell(createCellContext(column, row, rowIndex));\n }\n\n return (\n <Text align={resolveTextAlign(column.align)} variant=\"bodySmall\">\n {renderDefaultCell(resolveAccessorValue(row, column))}\n </Text>\n );\n}\n\nfunction resolveNextSortDirection(\n current: DataTableSortDirection | undefined,\n): DataTableSortDirection {\n return current === 'asc' ? 'desc' : 'asc';\n}\n\nfunction mapRowActions<TRow extends object>(\n row: TRow,\n actions: readonly DataTableRowAction<TRow>[],\n): readonly MenuAction[] {\n return actions.map((action) => ({\n description: action.description,\n disabled: action.disabled,\n icon: action.icon,\n id: action.id,\n intent: action.intent,\n onPress: action.onPress ? () => action.onPress?.(row) : undefined,\n title: action.title,\n }));\n}\n\nfunction renderRowActions<TRow extends object>({\n row,\n rowIndex,\n rowActions,\n testID,\n}: {\n row: TRow;\n rowIndex: number;\n rowActions: DataTableProps<TRow>['rowActions'];\n testID?: string;\n}) {\n const actions = rowActions?.(row, rowIndex) ?? [];\n\n if (actions.length === 0) {\n return null;\n }\n\n return (\n <DropdownMenu\n actions={mapRowActions(row, actions)}\n trigger={\n <IconButton\n icon={{ name: 'ellipsis-horizontal' }}\n label=\"Row actions\"\n size=\"s\"\n variant=\"ghost\"\n />\n }\n testID={testID ? `${testID}-row-actions-${rowIndex}` : undefined}\n />\n );\n}\n\nfunction DataTableHeader<TRow extends object>({\n columns,\n sort,\n onSortChange,\n density,\n}: Pick<DataTableProps<TRow>, 'columns' | 'density' | 'onSortChange' | 'sort'>) {\n const padding = resolveRowPadding(density ?? 'comfortable');\n\n return (\n <Box bg=\"subtle\" borderColor=\"border\" borderWidth={1} radius=\"m\">\n <Stack direction=\"row\" align=\"center\">\n {columns.map((column) => {\n const currentDirection = sort?.columnId === column.id ? sort.direction : undefined;\n const sortable = Boolean(column.sortable && onSortChange);\n const directionLabel =\n currentDirection === undefined ? '' : currentDirection === 'asc' ? ' ↑' : ' ↓';\n\n return (\n <Box key={column.id} px={padding.px} py={padding.py} style={resolveCellStyle(column)}>\n {sortable ? (\n <Button\n color=\"primary\"\n onPress={() =>\n onSortChange?.({\n columnId: column.id,\n direction: resolveNextSortDirection(currentDirection),\n })\n }\n size=\"s\"\n variant=\"ghost\"\n >\n {column.header}\n {directionLabel}\n </Button>\n ) : (\n <Text\n align={resolveTextAlign(column.align)}\n emphasis=\"muted\"\n variant=\"caption\"\n weight=\"semiBold\"\n >\n {column.header}\n </Text>\n )}\n </Box>\n );\n })}\n <Box px={padding.px} py={padding.py} style={{ minWidth: 56, width: 56 }}>\n <Text align=\"right\" emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n Actions\n </Text>\n </Box>\n </Stack>\n </Box>\n );\n}\n\nfunction DataTableDesktop<TRow extends object>({\n columns,\n rows,\n rowActions,\n rowId,\n sort,\n onSortChange,\n density,\n testID,\n}: DataTableProps<TRow>) {\n const padding = resolveRowPadding(density ?? 'comfortable');\n\n return (\n <ScrollView horizontal showsHorizontalScrollIndicator={false}>\n <Box minWidth={720} style={{ width: '100%' }}>\n <Stack gap=\"xs\">\n <DataTableHeader\n columns={columns}\n density={density}\n onSortChange={onSortChange}\n sort={sort}\n />\n <Stack gap=\"xs\">\n {rows.map((row, rowIndex) => (\n <Box\n bg=\"surface\"\n borderColor=\"border\"\n borderWidth={1}\n key={rowId(row, rowIndex)}\n radius=\"m\"\n testID={testID ? `${testID}-row-${rowIndex}` : undefined}\n >\n <Stack direction=\"row\" align=\"center\">\n {columns.map((column) => (\n <Box\n key={column.id}\n px={padding.px}\n py={padding.py}\n style={resolveCellStyle(column)}\n >\n {renderTableCell(column, row, rowIndex)}\n </Box>\n ))}\n <Box\n px={padding.px}\n py={padding.py}\n style={{ alignItems: 'flex-end', minWidth: 56, width: 56 }}\n >\n {renderRowActions({ row, rowActions, rowIndex, testID })}\n </Box>\n </Stack>\n </Box>\n ))}\n </Stack>\n </Stack>\n </Box>\n </ScrollView>\n );\n}\n\nfunction DataTableMobile<TRow extends object>({\n columns,\n rows,\n rowActions,\n rowId,\n testID,\n}: DataTableProps<TRow>) {\n const [primaryColumn, ...detailColumns] = columns;\n\n return (\n <Stack gap=\"s\">\n {rows.map((row, rowIndex) => {\n const title = primaryColumn\n ? renderCell(primaryColumn, row, rowIndex)\n : `Row ${rowIndex + 1}`;\n const actions = renderRowActions({ row, rowActions, rowIndex, testID });\n\n return (\n <Card\n actions={actions}\n compact\n key={rowId(row, rowIndex)}\n testID={testID ? `${testID}-card-${rowIndex}` : undefined}\n title={title}\n >\n <Stack gap=\"s\">\n {detailColumns.map((column) => (\n <Stack gap=\"xxs\" key={column.id}>\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {column.header}\n </Text>\n {column.renderCell ? (\n renderCell(column, row, rowIndex)\n ) : (\n <Text variant=\"bodySmall\">\n {renderDefaultCell(resolveAccessorValue(row, column))}\n </Text>\n )}\n </Stack>\n ))}\n </Stack>\n </Card>\n );\n })}\n </Stack>\n );\n}\n\nfunction DataTableInner<TRow extends object>({\n themeId: _themeId,\n mode: _mode,\n rows,\n loading = false,\n loadingRows = 5,\n emptyTitle = 'No data',\n emptyDescription = 'There are no rows to display.',\n testID,\n density = 'comfortable',\n ...props\n}: DataTableProps<TRow>) {\n if (loading) {\n return <SkeletonList rows={loadingRows} variant=\"card\" testID={testID} />;\n }\n\n if (rows.length === 0) {\n return <EmptyState title={emptyTitle} description={emptyDescription} />;\n }\n\n const tableProps: DataTableProps<TRow> = {\n ...props,\n density,\n emptyDescription,\n emptyTitle,\n loading,\n loadingRows,\n rows,\n testID,\n };\n\n return (\n <Box testID={testID}>\n <Show when={{ base: false, md: true }} fallback={<DataTableMobile {...tableProps} />}>\n <DataTableDesktop {...tableProps} />\n </Show>\n </Box>\n );\n}\n\nexport const DataTable = withZoraThemeScope(DataTableInner);\n"]}
@@ -0,0 +1,3 @@
1
+ export { DataTable } from './DataTable';
2
+ export type { DataTableCellContext, DataTableColumn, DataTableColumnAlign, DataTableDensity, DataTableProps, DataTableRowAction, DataTableSortDirection, DataTableSortState, } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { DataTable } from './DataTable';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/data-table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { DataTable } from './DataTable';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './types';\n"]}
@@ -0,0 +1,9 @@
1
+ export declare const dataTableMeta: {
2
+ readonly name: "DataTable";
3
+ readonly category: "component";
4
+ readonly directManifestNode: false;
5
+ readonly allowedChildren: readonly [];
6
+ readonly note: "Code-facing typed data table component; not represented as a manifest node in v1.";
7
+ readonly props: {};
8
+ };
9
+ //# sourceMappingURL=meta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;CAOY,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const dataTableMeta = {
2
+ name: 'DataTable',
3
+ category: 'component',
4
+ directManifestNode: false,
5
+ allowedChildren: [],
6
+ note: 'Code-facing typed data table component; not represented as a manifest node in v1.',
7
+ props: {},
8
+ };
9
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/data-table/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,mFAAmF;IACzF,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const dataTableMeta = {\n name: 'DataTable',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Code-facing typed data table component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -0,0 +1,51 @@
1
+ import type { ButtonIconSpec } from '@ankhorage/surface';
2
+ import type React from 'react';
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ import type { MenuActionIntent } from '../menu';
5
+ export type DataTableColumnAlign = 'start' | 'center' | 'end';
6
+ export type DataTableDensity = 'comfortable' | 'compact';
7
+ export type DataTableSortDirection = 'asc' | 'desc';
8
+ export interface DataTableSortState {
9
+ columnId: string;
10
+ direction: DataTableSortDirection;
11
+ }
12
+ export interface DataTableCellContext<TRow extends object> {
13
+ row: TRow;
14
+ rowIndex: number;
15
+ column: DataTableColumn<TRow>;
16
+ value: unknown;
17
+ }
18
+ export interface DataTableColumn<TRow extends object> {
19
+ id: string;
20
+ header: React.ReactNode;
21
+ accessor?: keyof TRow;
22
+ align?: DataTableColumnAlign;
23
+ width?: number;
24
+ minWidth?: number;
25
+ sortable?: boolean;
26
+ renderCell?: (context: DataTableCellContext<TRow>) => React.ReactNode;
27
+ }
28
+ export interface DataTableRowAction<TRow extends object> {
29
+ id: string;
30
+ title: React.ReactNode;
31
+ description?: React.ReactNode;
32
+ icon?: ButtonIconSpec;
33
+ intent?: MenuActionIntent;
34
+ disabled?: boolean;
35
+ onPress?: (row: TRow) => void;
36
+ }
37
+ export interface DataTableProps<TRow extends object> extends ZoraBaseProps {
38
+ columns: readonly DataTableColumn<TRow>[];
39
+ rows: readonly TRow[];
40
+ rowId: (row: TRow, index: number) => string;
41
+ rowActions?: (row: TRow, index: number) => readonly DataTableRowAction<TRow>[];
42
+ sort?: DataTableSortState;
43
+ onSortChange?: (sort: DataTableSortState) => void;
44
+ loading?: boolean;
45
+ loadingRows?: number;
46
+ emptyTitle?: React.ReactNode;
47
+ emptyDescription?: React.ReactNode;
48
+ density?: DataTableDensity;
49
+ testID?: string;
50
+ }
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/data-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,SAAS,CAAC;AACzD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,sBAAsB,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB,CAAC,IAAI,SAAS,M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AAK,EAAE,MAAM,KAAK,SAAS,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC/E,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/data-table/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { MenuActionIntent } from '../menu';\n\nexport type DataTableColumnAlign = 'start' | 'center' | 'end';\nexport type DataTableDensity = 'comfortable' | 'compact';\nexport type DataTableSortDirection = 'asc' | 'desc';\n\nexport interface DataTableSortState {\n columnId: string;\n direction: DataTableSortDirection;\n}\n\nexport interface DataTableCellContext<TRow extends object> {\n row: TRow;\n rowIndex: number;\n column: DataTableColumn<TRow>;\n value: unknown;\n}\n\nexport interface DataTableColumn<TRow extends object> {\n id: string;\n header: React.ReactNode;\n accessor?: keyof TRow;\n align?: DataTableColumnAlign;\n width?: number;\n minWidth?: number;\n sortable?: boolean;\n renderCell?: (context: DataTableCellContext<TRow>) => React.ReactNode;\n}\n\nexport interface DataTableRowAction<TRow extends object> {\n id: string;\n title: React.ReactNode;\n description?: React.ReactNode;\n icon?: ButtonIconSpec;\n intent?: MenuActionIntent;\n disabled?: boolean;\n onPress?: (row: TRow) => void;\n}\n\nexport interface DataTableProps<TRow extends object> extends ZoraBaseProps {\n columns: readonly DataTableColumn<TRow>[];\n rows: readonly TRow[];\n rowId: (row: TRow, index: number) => string;\n rowActions?: (row: TRow, index: number) => readonly DataTableRowAction<TRow>[];\n sort?: DataTableSortState;\n onSortChange?: (sort: DataTableSortState) => void;\n loading?: boolean;\n loadingRows?: number;\n emptyTitle?: React.ReactNode;\n emptyDescription?: React.ReactNode;\n density?: DataTableDensity;\n testID?: string;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -20,6 +20,8 @@ export type { ChipProps } from './components/chip';
20
20
  export { Chip } from './components/chip';
21
21
  export type { ChipGroupItem, ChipGroupProps } from './components/chip-group';
22
22
  export { ChipGroup } from './components/chip-group';
23
+ export type { DataTableCellContext, DataTableColumn, DataTableColumnAlign, DataTableDensity, DataTableProps, DataTableRowAction, DataTableSortDirection, DataTableSortState, } from './components/data-table';
24
+ export { DataTable } from './components/data-table';
23
25
  export type { DrawerProps } from './components/drawer';
24
26
  export { Drawer } from './components/drawer';
25
27
  export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldControlProps, FormFieldInputType, FormFieldProps, FormFieldValue, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from './components/form';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChF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Aa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ export { Card } from './components/card';
9
9
  export { Checkbox, CheckboxGroup } from './components/checkbox';
10
10
  export { Chip } from './components/chip';
11
11
  export { ChipGroup } from './components/chip-group';
12
+ export { DataTable } from './components/data-table';
12
13
  export { Drawer } from './components/drawer';
13
14
  export { Form, FormActions, FormError, FormField, hasRequiredRule, useFormController, validateField, validateFields, validateValue, } from './components/form';
14
15
  export { Heading } from './components/heading';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,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MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';\nexport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nexport type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './components/button-group';\nexport { ButtonGroup } from './components/button-group';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';\nexport { DropdownMenu, Menu } from './components/menu';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type {\n SkeletonCardProps,\n SkeletonDimension,\n SkeletonListProps,\n SkeletonListVariant,\n SkeletonProps,\n SkeletonRadius,\n SkeletonTextProps,\n} from './components/skeleton';\nexport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './internal/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './internal/colorModel';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './metadata';\nexport { ZORA_COMPONENT_META } from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelSide,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE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iB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';\nexport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nexport type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type {\n ButtonGroupAlign,\n ButtonGroupOrientation,\n ButtonGroupProps,\n} from './components/button-group';\nexport { ButtonGroup } from './components/button-group';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type {\n DataTableCellContext,\n DataTableColumn,\n DataTableColumnAlign,\n DataTableDensity,\n DataTableProps,\n DataTableRowAction,\n DataTableSortDirection,\n DataTableSortState,\n} from './components/data-table';\nexport { DataTable } from './components/data-table';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';\nexport { DropdownMenu, Menu } from './components/menu';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type {\n SkeletonCardProps,\n SkeletonDimension,\n SkeletonListProps,\n SkeletonListVariant,\n SkeletonProps,\n SkeletonRadius,\n SkeletonTextProps,\n} from './components/skeleton';\nexport { Skeleton, SkeletonCard, SkeletonList, SkeletonText } from './components/skeleton';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToastOptions, ToastProps, ToastProviderProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './internal/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './internal/colorModel';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './metadata';\nexport { ZORA_COMPONENT_META } from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelSide,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"componentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,mBAAmB,EAAE,yBA0FjC,CAAC"}
1
+ {"version":3,"file":"componentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,mBAAmB,EAAE,yBA2FjC,CAAC"}
@@ -9,6 +9,7 @@ import { cardMeta } from '../components/card/meta';
9
9
  import { checkboxGroupMeta, checkboxMeta } from '../components/checkbox/meta';
10
10
  import { chipMeta } from '../components/chip/meta';
11
11
  import { chipGroupMeta } from '../components/chip-group/meta';
12
+ import { dataTableMeta } from '../components/data-table/meta';
12
13
  import { drawerMeta } from '../components/drawer/meta';
13
14
  import { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';
14
15
  import { headingMeta } from '../components/heading/meta';
@@ -82,6 +83,7 @@ export const ZORA_COMPONENT_META = {
82
83
  CheckboxGroup: checkboxGroupMeta,
83
84
  Chip: chipMeta,
84
85
  ChipGroup: chipGroupMeta,
86
+ DataTable: dataTableMeta,
85
87
  Drawer: drawerMeta,
86
88
  DropdownMenu: dropdownMenuMeta,
87
89
  Form: formMeta,
@@ -1 +1 @@
1
- {"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO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B,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,iBAAiB,EAAE,qBAAqB;IACxC,UAAU,EAAE,cAAc;CAC3B,CAAC","sourcesContent":["import { actionSheetItemMeta, actionSheetMeta } from '../components/action-sheet/meta';\nimport { appBarMeta } from '../components/app-bar/meta';\nimport { avatarMeta } from '../components/avatar/meta';\nimport { avatarGroupMeta } from '../components/avatar-group/meta';\nimport { badgeMeta } from '../components/badge/meta';\nimport { buttonMeta } from '../components/button/meta';\nimport { buttonGroupMeta } from '../components/button-group/meta';\nimport { cardMeta } from '../components/card/meta';\nimport { checkboxGroupMeta, checkboxMeta } from '../components/checkbox/meta';\nimport { chipMeta } from '../components/chip/meta';\nimport { chipGroupMeta } from '../components/chip-group/meta';\nimport { drawerMeta } from '../components/drawer/meta';\nimport { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';\nimport { headingMeta } from '../components/heading/meta';\nimport { iconMeta } from '../components/icon/meta';\nimport { iconButtonMeta } from '../components/icon-button/meta';\nimport { imageMeta } from '../components/image/meta';\nimport { inputMeta } from '../components/input/meta';\nimport { mediaCardMeta } from '../components/media-card/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { metricCardMeta } from '../components/metric-card/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { navigationItemMeta } from '../components/navigation-item/meta';\nimport { navigationListMeta } from '../components/navigation-list/meta';\nimport { progressMeta } from '../components/progress/meta';\nimport { radioGroupMeta, radioMeta } from '../components/radio/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../components/skeleton/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { textMeta } from '../components/text/meta';\nimport { textareaMeta } from '../components/textarea/meta';\nimport { toastMeta, toastProviderMeta } from '../components/toast/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport {\n forgotPasswordFormMeta,\n otpFormMeta,\n signInFormMeta,\n signUpFormMeta,\n} from '../patterns/auth/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { disclosureSectionMeta } from '../patterns/disclosure-section/meta';\nimport { emptyStateMeta } from '../patterns/empty-state/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { heroMeta } from '../patterns/hero/meta';\nimport { imagePreviewMeta } from '../patterns/image-preview/meta';\nimport { imageUploadFieldMeta } from '../patterns/image-upload-field/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { postCardMeta } from '../patterns/post-card/meta';\nimport { responsivePanelMeta } from '../patterns/responsive-panel/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { zoraDrawerContentMeta } from '../patterns/zora-drawer-content/meta';\nimport { zoraTabBarMeta } from '../patterns/zora-tab-bar/meta';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {\n ...foundationMetas,\n ActionSheet: actionSheetMeta,\n ActionSheetItem: actionSheetItemMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n Drawer: drawerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n Input: inputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n NavigationItem: navigationItemMeta,\n NavigationList: navigationListMeta,\n Progress: progressMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n Textarea: textareaMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n DisclosureSection: disclosureSectionMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n ImagePreview: imagePreviewMeta,\n ImageUploadField: imageUploadFieldMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ResponsivePanel: responsivePanelMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n ZoraDrawerContent: zoraDrawerContentMeta,\n ZoraTabBar: zoraTabBarMeta,\n};\n"]}
1
+ {"version":3,"file":"componentMeta.js","sourceRoot":"","sources":["../../src/metadata/componentMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,i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gB;IAC9B,kBAAkB,EAAE,sBAAsB;IAC1C,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,cAAc;IAC1B,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,oBAAoB;IACtC,aAAa,EAAE,iBAAiB;IAChC,iBAAiB,EAAE,qBAAqB;IACxC,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,oBAAoB;IACtC,cAAc,EAAE,kBAAkB;IAClC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,eAAe,EAAE,mBAAmB;IACpC,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,iBAAiB,EAAE,qBAAqB;IACxC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,eAAe;IAC5B,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,iBAAiB,EAAE,qBAAqB;IACxC,UAAU,EAAE,cAAc;CAC3B,CAAC","sourcesContent":["import { actionSheetItemMeta, actionSheetMeta } from '../components/action-sheet/meta';\nimport { appBarMeta } from '../components/app-bar/meta';\nimport { avatarMeta } from '../components/avatar/meta';\nimport { avatarGroupMeta } from '../components/avatar-group/meta';\nimport { badgeMeta } from '../components/badge/meta';\nimport { buttonMeta } from '../components/button/meta';\nimport { buttonGroupMeta } from '../components/button-group/meta';\nimport { cardMeta } from '../components/card/meta';\nimport { checkboxGroupMeta, checkboxMeta } from '../components/checkbox/meta';\nimport { chipMeta } from '../components/chip/meta';\nimport { chipGroupMeta } from '../components/chip-group/meta';\nimport { dataTableMeta } from '../components/data-table/meta';\nimport { drawerMeta } from '../components/drawer/meta';\nimport { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';\nimport { headingMeta } from '../components/heading/meta';\nimport { iconMeta } from '../components/icon/meta';\nimport { iconButtonMeta } from '../components/icon-button/meta';\nimport { imageMeta } from '../components/image/meta';\nimport { inputMeta } from '../components/input/meta';\nimport { mediaCardMeta } from '../components/media-card/meta';\nimport { dropdownMenuMeta, menuMeta } from '../components/menu/meta';\nimport { metricCardMeta } from '../components/metric-card/meta';\nimport { modalMeta } from '../components/modal/meta';\nimport { navigationItemMeta } from '../components/navigation-item/meta';\nimport { navigationListMeta } from '../components/navigation-list/meta';\nimport { progressMeta } from '../components/progress/meta';\nimport { radioGroupMeta, radioMeta } from '../components/radio/meta';\nimport { ratingMeta } from '../components/rating/meta';\nimport { searchBarMeta } from '../components/search-bar/meta';\nimport { selectMeta } from '../components/select/meta';\nimport {\n skeletonCardMeta,\n skeletonListMeta,\n skeletonMeta,\n skeletonTextMeta,\n} from '../components/skeleton/meta';\nimport { tabsMeta } from '../components/tabs/meta';\nimport { textMeta } from '../components/text/meta';\nimport { textareaMeta } from '../components/textarea/meta';\nimport { toastMeta, toastProviderMeta } from '../components/toast/meta';\nimport { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';\nimport { foundationMetas } from '../foundation/meta';\nimport { appShellMeta } from '../layout/app-shell/meta';\nimport { screenMeta } from '../layout/screen/meta';\nimport { screenSectionMeta } from '../layout/screen-section/meta';\nimport { settingsLayoutMeta } from '../layout/settings-layout/meta';\nimport { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';\nimport { topbarLayoutMeta } from '../layout/topbar-layout/meta';\nimport {\n forgotPasswordFormMeta,\n otpFormMeta,\n signInFormMeta,\n signUpFormMeta,\n} from '../patterns/auth/meta';\nimport { chatListItemMeta } from '../patterns/chat-list-item/meta';\nimport { collectionEditorMeta } from '../patterns/collection-editor/meta';\nimport { confirmDialogMeta } from '../patterns/confirm-dialog/meta';\nimport { disclosureSectionMeta } from '../patterns/disclosure-section/meta';\nimport { emptyStateMeta } from '../patterns/empty-state/meta';\nimport { filterBarMeta } from '../patterns/filter-bar/meta';\nimport { heroMeta } from '../patterns/hero/meta';\nimport { imagePreviewMeta } from '../patterns/image-preview/meta';\nimport { imageUploadFieldMeta } from '../patterns/image-upload-field/meta';\nimport { inspectorFieldMeta } from '../patterns/inspector-field/meta';\nimport { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';\nimport { messageBubbleMeta } from '../patterns/message-bubble/meta';\nimport { noticeMeta } from '../patterns/notice/meta';\nimport { panelMeta } from '../patterns/panel/meta';\nimport { postCardMeta } from '../patterns/post-card/meta';\nimport { responsivePanelMeta } from '../patterns/responsive-panel/meta';\nimport { sectionHeaderMeta } from '../patterns/section-header/meta';\nimport { selectableItemMeta, selectionProviderMeta } from '../patterns/selection/meta';\nimport { settingsRowMeta } from '../patterns/settings-row/meta';\nimport { switchFieldMeta } from '../patterns/switch-field/meta';\nimport { themeComposerMeta } from '../patterns/theme-composer/meta';\nimport { paletteItemMeta, tileGridMeta } from '../patterns/tile-grid/meta';\nimport { timelineMeta } from '../patterns/timeline/meta';\nimport { treeItemMeta, treeViewMeta } from '../patterns/tree-view/meta';\nimport { zoraDrawerContentMeta } from '../patterns/zora-drawer-content/meta';\nimport { zoraTabBarMeta } from '../patterns/zora-tab-bar/meta';\nimport type { ZoraComponentMetaRegistry } from './types';\n\nexport const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {\n ...foundationMetas,\n ActionSheet: actionSheetMeta,\n ActionSheetItem: actionSheetItemMeta,\n AppBar: appBarMeta,\n Avatar: avatarMeta,\n AvatarGroup: avatarGroupMeta,\n Badge: badgeMeta,\n Button: buttonMeta,\n ButtonGroup: buttonGroupMeta,\n Card: cardMeta,\n Checkbox: checkboxMeta,\n CheckboxGroup: checkboxGroupMeta,\n Chip: chipMeta,\n ChipGroup: chipGroupMeta,\n DataTable: dataTableMeta,\n Drawer: drawerMeta,\n DropdownMenu: dropdownMenuMeta,\n Form: formMeta,\n FormActions: formActionsMeta,\n FormError: formErrorMeta,\n FormField: formFieldMeta,\n Heading: headingMeta,\n Icon: iconMeta,\n IconButton: iconButtonMeta,\n Image: imageMeta,\n Input: inputMeta,\n MediaCard: mediaCardMeta,\n Menu: menuMeta,\n MetricCard: metricCardMeta,\n Modal: modalMeta,\n NavigationItem: navigationItemMeta,\n NavigationList: navigationListMeta,\n Progress: progressMeta,\n Radio: radioMeta,\n RadioGroup: radioGroupMeta,\n Rating: ratingMeta,\n SearchBar: searchBarMeta,\n Select: selectMeta,\n Skeleton: skeletonMeta,\n SkeletonCard: skeletonCardMeta,\n SkeletonList: skeletonListMeta,\n SkeletonText: skeletonTextMeta,\n Tabs: tabsMeta,\n Text: textMeta,\n Textarea: textareaMeta,\n Toast: toastMeta,\n ToastProvider: toastProviderMeta,\n Toolbar: toolbarMeta,\n ToolbarAction: toolbarActionMeta,\n AppShell: appShellMeta,\n Screen: screenMeta,\n ScreenSection: screenSectionMeta,\n SettingsLayout: settingsLayoutMeta,\n SidebarLayout: sidebarLayoutMeta,\n TopbarLayout: topbarLayoutMeta,\n ForgotPasswordForm: forgotPasswordFormMeta,\n OtpForm: otpFormMeta,\n SignInForm: signInFormMeta,\n SignUpForm: signUpFormMeta,\n ChatListItem: chatListItemMeta,\n CollectionEditor: collectionEditorMeta,\n ConfirmDialog: confirmDialogMeta,\n DisclosureSection: disclosureSectionMeta,\n EmptyState: emptyStateMeta,\n FilterBar: filterBarMeta,\n Hero: heroMeta,\n ImagePreview: imagePreviewMeta,\n ImageUploadField: imageUploadFieldMeta,\n InspectorField: inspectorFieldMeta,\n List: listMeta,\n ListRow: listRowMeta,\n ListSection: listSectionMeta,\n MessageBubble: messageBubbleMeta,\n Notice: noticeMeta,\n Panel: panelMeta,\n PostCard: postCardMeta,\n ResponsivePanel: responsivePanelMeta,\n SectionHeader: sectionHeaderMeta,\n SelectableItem: selectableItemMeta,\n SelectionProvider: selectionProviderMeta,\n SettingsRow: settingsRowMeta,\n SwitchField: switchFieldMeta,\n ThemeComposer: themeComposerMeta,\n PaletteItem: paletteItemMeta,\n TileGrid: tileGridMeta,\n Timeline: timelineMeta,\n TreeItem: treeItemMeta,\n TreeView: treeViewMeta,\n ZoraDrawerContent: zoraDrawerContentMeta,\n ZoraTabBar: zoraTabBarMeta,\n};\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "2.4.4",
4
+ "version": "2.4.5",
5
5
  "description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
6
6
  "homepage": "https://github.com/ankhorage/zora#readme",
7
7
  "bugs": {
@@ -0,0 +1,388 @@
1
+ import React from 'react';
2
+ import { ScrollView, type ViewStyle } from 'react-native';
3
+
4
+ import { Box, Show, Stack } from '../../foundation';
5
+ import { EmptyState } from '../../patterns/empty-state';
6
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
7
+ import { Button } from '../button';
8
+ import { Card } from '../card';
9
+ import { IconButton } from '../icon-button';
10
+ import { DropdownMenu, type MenuAction } from '../menu';
11
+ import { SkeletonList } from '../skeleton';
12
+ import { Text, type TextAlign } from '../text';
13
+ import type {
14
+ DataTableCellContext,
15
+ DataTableColumn,
16
+ DataTableColumnAlign,
17
+ DataTableDensity,
18
+ DataTableProps,
19
+ DataTableRowAction,
20
+ DataTableSortDirection,
21
+ } from './types';
22
+
23
+ function resolveTextAlign(align: DataTableColumnAlign | undefined): TextAlign {
24
+ switch (align) {
25
+ case 'center':
26
+ return 'center';
27
+ case 'end':
28
+ return 'right';
29
+ case 'start':
30
+ default:
31
+ return 'left';
32
+ }
33
+ }
34
+
35
+ function resolveCellJustify(align: DataTableColumnAlign | undefined): ViewStyle['alignItems'] {
36
+ switch (align) {
37
+ case 'center':
38
+ return 'center';
39
+ case 'end':
40
+ return 'flex-end';
41
+ case 'start':
42
+ default:
43
+ return 'flex-start';
44
+ }
45
+ }
46
+
47
+ function resolveCellStyle<TRow extends object>(column: DataTableColumn<TRow>): ViewStyle {
48
+ return {
49
+ alignItems: resolveCellJustify(column.align),
50
+ flexGrow: column.width === undefined ? 1 : 0,
51
+ flexShrink: 0,
52
+ minWidth: column.minWidth ?? 140,
53
+ width: column.width,
54
+ };
55
+ }
56
+
57
+ function resolveRowPadding(density: DataTableDensity) {
58
+ return density === 'compact'
59
+ ? { px: 'm' as const, py: 's' as const }
60
+ : { px: 'm' as const, py: 'm' as const };
61
+ }
62
+
63
+ function resolveAccessorValue<TRow extends object>(row: TRow, column: DataTableColumn<TRow>) {
64
+ if (column.accessor === undefined) {
65
+ return undefined;
66
+ }
67
+
68
+ return row[column.accessor];
69
+ }
70
+
71
+ function renderDefaultCell(value: unknown): React.ReactNode {
72
+ if (value === null || value === undefined) {
73
+ return '—';
74
+ }
75
+
76
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
77
+ return String(value);
78
+ }
79
+
80
+ if (typeof value === 'bigint') {
81
+ return value.toString();
82
+ }
83
+
84
+ if (value instanceof Date) {
85
+ return value.toLocaleDateString();
86
+ }
87
+
88
+ return '—';
89
+ }
90
+
91
+ function createCellContext<TRow extends object>(
92
+ column: DataTableColumn<TRow>,
93
+ row: TRow,
94
+ rowIndex: number,
95
+ ): DataTableCellContext<TRow> {
96
+ return {
97
+ column,
98
+ row,
99
+ rowIndex,
100
+ value: resolveAccessorValue(row, column),
101
+ };
102
+ }
103
+
104
+ function renderCell<TRow extends object>(
105
+ column: DataTableColumn<TRow>,
106
+ row: TRow,
107
+ rowIndex: number,
108
+ ) {
109
+ const context = createCellContext(column, row, rowIndex);
110
+ return column.renderCell ? column.renderCell(context) : renderDefaultCell(context.value);
111
+ }
112
+
113
+ function renderTableCell<TRow extends object>(
114
+ column: DataTableColumn<TRow>,
115
+ row: TRow,
116
+ rowIndex: number,
117
+ ) {
118
+ if (column.renderCell) {
119
+ return column.renderCell(createCellContext(column, row, rowIndex));
120
+ }
121
+
122
+ return (
123
+ <Text align={resolveTextAlign(column.align)} variant="bodySmall">
124
+ {renderDefaultCell(resolveAccessorValue(row, column))}
125
+ </Text>
126
+ );
127
+ }
128
+
129
+ function resolveNextSortDirection(
130
+ current: DataTableSortDirection | undefined,
131
+ ): DataTableSortDirection {
132
+ return current === 'asc' ? 'desc' : 'asc';
133
+ }
134
+
135
+ function mapRowActions<TRow extends object>(
136
+ row: TRow,
137
+ actions: readonly DataTableRowAction<TRow>[],
138
+ ): readonly MenuAction[] {
139
+ return actions.map((action) => ({
140
+ description: action.description,
141
+ disabled: action.disabled,
142
+ icon: action.icon,
143
+ id: action.id,
144
+ intent: action.intent,
145
+ onPress: action.onPress ? () => action.onPress?.(row) : undefined,
146
+ title: action.title,
147
+ }));
148
+ }
149
+
150
+ function renderRowActions<TRow extends object>({
151
+ row,
152
+ rowIndex,
153
+ rowActions,
154
+ testID,
155
+ }: {
156
+ row: TRow;
157
+ rowIndex: number;
158
+ rowActions: DataTableProps<TRow>['rowActions'];
159
+ testID?: string;
160
+ }) {
161
+ const actions = rowActions?.(row, rowIndex) ?? [];
162
+
163
+ if (actions.length === 0) {
164
+ return null;
165
+ }
166
+
167
+ return (
168
+ <DropdownMenu
169
+ actions={mapRowActions(row, actions)}
170
+ trigger={
171
+ <IconButton
172
+ icon={{ name: 'ellipsis-horizontal' }}
173
+ label="Row actions"
174
+ size="s"
175
+ variant="ghost"
176
+ />
177
+ }
178
+ testID={testID ? `${testID}-row-actions-${rowIndex}` : undefined}
179
+ />
180
+ );
181
+ }
182
+
183
+ function DataTableHeader<TRow extends object>({
184
+ columns,
185
+ sort,
186
+ onSortChange,
187
+ density,
188
+ }: Pick<DataTableProps<TRow>, 'columns' | 'density' | 'onSortChange' | 'sort'>) {
189
+ const padding = resolveRowPadding(density ?? 'comfortable');
190
+
191
+ return (
192
+ <Box bg="subtle" borderColor="border" borderWidth={1} radius="m">
193
+ <Stack direction="row" align="center">
194
+ {columns.map((column) => {
195
+ const currentDirection = sort?.columnId === column.id ? sort.direction : undefined;
196
+ const sortable = Boolean(column.sortable && onSortChange);
197
+ const directionLabel =
198
+ currentDirection === undefined ? '' : currentDirection === 'asc' ? ' ↑' : ' ↓';
199
+
200
+ return (
201
+ <Box key={column.id} px={padding.px} py={padding.py} style={resolveCellStyle(column)}>
202
+ {sortable ? (
203
+ <Button
204
+ color="primary"
205
+ onPress={() =>
206
+ onSortChange?.({
207
+ columnId: column.id,
208
+ direction: resolveNextSortDirection(currentDirection),
209
+ })
210
+ }
211
+ size="s"
212
+ variant="ghost"
213
+ >
214
+ {column.header}
215
+ {directionLabel}
216
+ </Button>
217
+ ) : (
218
+ <Text
219
+ align={resolveTextAlign(column.align)}
220
+ emphasis="muted"
221
+ variant="caption"
222
+ weight="semiBold"
223
+ >
224
+ {column.header}
225
+ </Text>
226
+ )}
227
+ </Box>
228
+ );
229
+ })}
230
+ <Box px={padding.px} py={padding.py} style={{ minWidth: 56, width: 56 }}>
231
+ <Text align="right" emphasis="muted" variant="caption" weight="semiBold">
232
+ Actions
233
+ </Text>
234
+ </Box>
235
+ </Stack>
236
+ </Box>
237
+ );
238
+ }
239
+
240
+ function DataTableDesktop<TRow extends object>({
241
+ columns,
242
+ rows,
243
+ rowActions,
244
+ rowId,
245
+ sort,
246
+ onSortChange,
247
+ density,
248
+ testID,
249
+ }: DataTableProps<TRow>) {
250
+ const padding = resolveRowPadding(density ?? 'comfortable');
251
+
252
+ return (
253
+ <ScrollView horizontal showsHorizontalScrollIndicator={false}>
254
+ <Box minWidth={720} style={{ width: '100%' }}>
255
+ <Stack gap="xs">
256
+ <DataTableHeader
257
+ columns={columns}
258
+ density={density}
259
+ onSortChange={onSortChange}
260
+ sort={sort}
261
+ />
262
+ <Stack gap="xs">
263
+ {rows.map((row, rowIndex) => (
264
+ <Box
265
+ bg="surface"
266
+ borderColor="border"
267
+ borderWidth={1}
268
+ key={rowId(row, rowIndex)}
269
+ radius="m"
270
+ testID={testID ? `${testID}-row-${rowIndex}` : undefined}
271
+ >
272
+ <Stack direction="row" align="center">
273
+ {columns.map((column) => (
274
+ <Box
275
+ key={column.id}
276
+ px={padding.px}
277
+ py={padding.py}
278
+ style={resolveCellStyle(column)}
279
+ >
280
+ {renderTableCell(column, row, rowIndex)}
281
+ </Box>
282
+ ))}
283
+ <Box
284
+ px={padding.px}
285
+ py={padding.py}
286
+ style={{ alignItems: 'flex-end', minWidth: 56, width: 56 }}
287
+ >
288
+ {renderRowActions({ row, rowActions, rowIndex, testID })}
289
+ </Box>
290
+ </Stack>
291
+ </Box>
292
+ ))}
293
+ </Stack>
294
+ </Stack>
295
+ </Box>
296
+ </ScrollView>
297
+ );
298
+ }
299
+
300
+ function DataTableMobile<TRow extends object>({
301
+ columns,
302
+ rows,
303
+ rowActions,
304
+ rowId,
305
+ testID,
306
+ }: DataTableProps<TRow>) {
307
+ const [primaryColumn, ...detailColumns] = columns;
308
+
309
+ return (
310
+ <Stack gap="s">
311
+ {rows.map((row, rowIndex) => {
312
+ const title = primaryColumn
313
+ ? renderCell(primaryColumn, row, rowIndex)
314
+ : `Row ${rowIndex + 1}`;
315
+ const actions = renderRowActions({ row, rowActions, rowIndex, testID });
316
+
317
+ return (
318
+ <Card
319
+ actions={actions}
320
+ compact
321
+ key={rowId(row, rowIndex)}
322
+ testID={testID ? `${testID}-card-${rowIndex}` : undefined}
323
+ title={title}
324
+ >
325
+ <Stack gap="s">
326
+ {detailColumns.map((column) => (
327
+ <Stack gap="xxs" key={column.id}>
328
+ <Text emphasis="muted" variant="caption" weight="semiBold">
329
+ {column.header}
330
+ </Text>
331
+ {column.renderCell ? (
332
+ renderCell(column, row, rowIndex)
333
+ ) : (
334
+ <Text variant="bodySmall">
335
+ {renderDefaultCell(resolveAccessorValue(row, column))}
336
+ </Text>
337
+ )}
338
+ </Stack>
339
+ ))}
340
+ </Stack>
341
+ </Card>
342
+ );
343
+ })}
344
+ </Stack>
345
+ );
346
+ }
347
+
348
+ function DataTableInner<TRow extends object>({
349
+ themeId: _themeId,
350
+ mode: _mode,
351
+ rows,
352
+ loading = false,
353
+ loadingRows = 5,
354
+ emptyTitle = 'No data',
355
+ emptyDescription = 'There are no rows to display.',
356
+ testID,
357
+ density = 'comfortable',
358
+ ...props
359
+ }: DataTableProps<TRow>) {
360
+ if (loading) {
361
+ return <SkeletonList rows={loadingRows} variant="card" testID={testID} />;
362
+ }
363
+
364
+ if (rows.length === 0) {
365
+ return <EmptyState title={emptyTitle} description={emptyDescription} />;
366
+ }
367
+
368
+ const tableProps: DataTableProps<TRow> = {
369
+ ...props,
370
+ density,
371
+ emptyDescription,
372
+ emptyTitle,
373
+ loading,
374
+ loadingRows,
375
+ rows,
376
+ testID,
377
+ };
378
+
379
+ return (
380
+ <Box testID={testID}>
381
+ <Show when={{ base: false, md: true }} fallback={<DataTableMobile {...tableProps} />}>
382
+ <DataTableDesktop {...tableProps} />
383
+ </Show>
384
+ </Box>
385
+ );
386
+ }
387
+
388
+ export const DataTable = withZoraThemeScope(DataTableInner);
@@ -0,0 +1,11 @@
1
+ export { DataTable } from './DataTable';
2
+ export type {
3
+ DataTableCellContext,
4
+ DataTableColumn,
5
+ DataTableColumnAlign,
6
+ DataTableDensity,
7
+ DataTableProps,
8
+ DataTableRowAction,
9
+ DataTableSortDirection,
10
+ DataTableSortState,
11
+ } from './types';
@@ -0,0 +1,10 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const dataTableMeta = {
4
+ name: 'DataTable',
5
+ category: 'component',
6
+ directManifestNode: false,
7
+ allowedChildren: [],
8
+ note: 'Code-facing typed data table component; not represented as a manifest node in v1.',
9
+ props: {},
10
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,57 @@
1
+ import type { ButtonIconSpec } from '@ankhorage/surface';
2
+ import type React from 'react';
3
+
4
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
5
+ import type { MenuActionIntent } from '../menu';
6
+
7
+ export type DataTableColumnAlign = 'start' | 'center' | 'end';
8
+ export type DataTableDensity = 'comfortable' | 'compact';
9
+ export type DataTableSortDirection = 'asc' | 'desc';
10
+
11
+ export interface DataTableSortState {
12
+ columnId: string;
13
+ direction: DataTableSortDirection;
14
+ }
15
+
16
+ export interface DataTableCellContext<TRow extends object> {
17
+ row: TRow;
18
+ rowIndex: number;
19
+ column: DataTableColumn<TRow>;
20
+ value: unknown;
21
+ }
22
+
23
+ export interface DataTableColumn<TRow extends object> {
24
+ id: string;
25
+ header: React.ReactNode;
26
+ accessor?: keyof TRow;
27
+ align?: DataTableColumnAlign;
28
+ width?: number;
29
+ minWidth?: number;
30
+ sortable?: boolean;
31
+ renderCell?: (context: DataTableCellContext<TRow>) => React.ReactNode;
32
+ }
33
+
34
+ export interface DataTableRowAction<TRow extends object> {
35
+ id: string;
36
+ title: React.ReactNode;
37
+ description?: React.ReactNode;
38
+ icon?: ButtonIconSpec;
39
+ intent?: MenuActionIntent;
40
+ disabled?: boolean;
41
+ onPress?: (row: TRow) => void;
42
+ }
43
+
44
+ export interface DataTableProps<TRow extends object> extends ZoraBaseProps {
45
+ columns: readonly DataTableColumn<TRow>[];
46
+ rows: readonly TRow[];
47
+ rowId: (row: TRow, index: number) => string;
48
+ rowActions?: (row: TRow, index: number) => readonly DataTableRowAction<TRow>[];
49
+ sort?: DataTableSortState;
50
+ onSortChange?: (sort: DataTableSortState) => void;
51
+ loading?: boolean;
52
+ loadingRows?: number;
53
+ emptyTitle?: React.ReactNode;
54
+ emptyDescription?: React.ReactNode;
55
+ density?: DataTableDensity;
56
+ testID?: string;
57
+ }
package/src/index.ts CHANGED
@@ -24,6 +24,17 @@ export type { ChipProps } from './components/chip';
24
24
  export { Chip } from './components/chip';
25
25
  export type { ChipGroupItem, ChipGroupProps } from './components/chip-group';
26
26
  export { ChipGroup } from './components/chip-group';
27
+ export type {
28
+ DataTableCellContext,
29
+ DataTableColumn,
30
+ DataTableColumnAlign,
31
+ DataTableDensity,
32
+ DataTableProps,
33
+ DataTableRowAction,
34
+ DataTableSortDirection,
35
+ DataTableSortState,
36
+ } from './components/data-table';
37
+ export { DataTable } from './components/data-table';
27
38
  export type { DrawerProps } from './components/drawer';
28
39
  export { Drawer } from './components/drawer';
29
40
  export type {
@@ -9,6 +9,7 @@ import { cardMeta } from '../components/card/meta';
9
9
  import { checkboxGroupMeta, checkboxMeta } from '../components/checkbox/meta';
10
10
  import { chipMeta } from '../components/chip/meta';
11
11
  import { chipGroupMeta } from '../components/chip-group/meta';
12
+ import { dataTableMeta } from '../components/data-table/meta';
12
13
  import { drawerMeta } from '../components/drawer/meta';
13
14
  import { formActionsMeta, formErrorMeta, formFieldMeta, formMeta } from '../components/form/meta';
14
15
  import { headingMeta } from '../components/heading/meta';
@@ -94,6 +95,7 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = {
94
95
  CheckboxGroup: checkboxGroupMeta,
95
96
  Chip: chipMeta,
96
97
  ChipGroup: chipGroupMeta,
98
+ DataTable: dataTableMeta,
97
99
  Drawer: drawerMeta,
98
100
  DropdownMenu: dropdownMenuMeta,
99
101
  Form: formMeta,