@dloizides/ui-tables 1.3.0 → 1.4.0
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 +18 -0
- package/README.md +32 -0
- package/dist/index.d.mts +107 -4
- package/dist/index.d.ts +107 -4
- package/dist/index.js +95 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -46,42 +46,6 @@ var StatCard = memo(({ label, value, testID }) => {
|
|
|
46
46
|
);
|
|
47
47
|
});
|
|
48
48
|
StatCard.displayName = "StatCard";
|
|
49
|
-
|
|
50
|
-
// src/DataTable/constants.ts
|
|
51
|
-
var CARD_STACK_BREAKPOINT = 640;
|
|
52
|
-
var DEFAULT_PAGE_SIZE_OPTIONS = [25, 50, 100, 200];
|
|
53
|
-
var TABLE_TEST_IDS = {
|
|
54
|
-
root: "ui-data-table",
|
|
55
|
-
head: "ui-data-table-head",
|
|
56
|
-
/** Infix of a row's test id: `${tableTestID}-row-${key}`. */
|
|
57
|
-
rowInfix: "row",
|
|
58
|
-
/** Infix of an expanded row's detail panel: `${tableTestID}-row-detail-${key}`. */
|
|
59
|
-
rowDetailInfix: "row-detail",
|
|
60
|
-
filterBar: "ui-filters",
|
|
61
|
-
results: "ui-results",
|
|
62
|
-
pager: "ui-pager",
|
|
63
|
-
pagerInfo: "ui-pager-info",
|
|
64
|
-
pagerPrev: "ui-pager-prev",
|
|
65
|
-
pagerNext: "ui-pager-next"
|
|
66
|
-
};
|
|
67
|
-
var rowTestID = (tableTestID, key) => `${tableTestID}-${TABLE_TEST_IDS.rowInfix}-${key}`;
|
|
68
|
-
var rowDetailTestID = (tableTestID, key) => `${tableTestID}-${TABLE_TEST_IDS.rowDetailInfix}-${key}`;
|
|
69
|
-
var TABLE_I18N = {
|
|
70
|
-
loading: "uiTables.loading",
|
|
71
|
-
empty: "uiTables.empty",
|
|
72
|
-
rowLabel: "uiTables.rowLabel",
|
|
73
|
-
rowHint: "uiTables.rowHint",
|
|
74
|
-
/** Accessible name of the full-width detail panel under an expanded row. */
|
|
75
|
-
rowDetail: "uiTables.rowDetail",
|
|
76
|
-
results: "uiTables.results",
|
|
77
|
-
pagerInfo: "uiTables.pager.info",
|
|
78
|
-
pagerPrev: "uiTables.pager.prev",
|
|
79
|
-
pagerNext: "uiTables.pager.next",
|
|
80
|
-
pagerPrevHint: "uiTables.pager.prevHint",
|
|
81
|
-
pagerNextHint: "uiTables.pager.nextHint",
|
|
82
|
-
pagerRows: "uiTables.pager.rows",
|
|
83
|
-
pagerRowsOptionHint: "uiTables.pager.rowsOptionHint"
|
|
84
|
-
};
|
|
85
49
|
var BORDER_WIDTH = 1;
|
|
86
50
|
var BORDER_RADIUS = 12;
|
|
87
51
|
var COLUMN_GAP = 16;
|
|
@@ -141,11 +105,65 @@ var chromeStyles = StyleSheet.create({
|
|
|
141
105
|
sizePill: { paddingHorizontal: CONTROL_PAD_H, paddingVertical: CONTROL_PAD_V, borderRadius: PILL_RADIUS, borderWidth: BORDER_WIDTH },
|
|
142
106
|
sizePillText: { fontSize: HEAD_FONT, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
143
107
|
});
|
|
144
|
-
|
|
145
|
-
function DesktopCell({ column, row, textColor, testID }) {
|
|
108
|
+
function cellContent(column, row, textColor, overrides) {
|
|
146
109
|
const content = column.render(row);
|
|
147
|
-
|
|
110
|
+
if (typeof content === "string" || typeof content === "number") {
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
Text,
|
|
113
|
+
{
|
|
114
|
+
style: [
|
|
115
|
+
tableStyles.cell,
|
|
116
|
+
column.numeric ? tableStyles.numCell : null,
|
|
117
|
+
{ color: textColor },
|
|
118
|
+
overrides?.cell,
|
|
119
|
+
column.numeric ? overrides?.numCell : null
|
|
120
|
+
],
|
|
121
|
+
children: content
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return content;
|
|
148
126
|
}
|
|
127
|
+
function DesktopCell({ column, row, textColor, testID, styleOverrides }) {
|
|
128
|
+
return /* @__PURE__ */ jsx(View, { style: { flex: column.weight ?? 1, alignItems: column.numeric ? "flex-end" : "flex-start" }, testID, children: cellContent(column, row, textColor, styleOverrides) });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/DataTable/constants.ts
|
|
132
|
+
var CARD_STACK_BREAKPOINT = 640;
|
|
133
|
+
var DEFAULT_PAGE_SIZE_OPTIONS = [25, 50, 100, 200];
|
|
134
|
+
var TABLE_TEST_IDS = {
|
|
135
|
+
root: "ui-data-table",
|
|
136
|
+
head: "ui-data-table-head",
|
|
137
|
+
/** Infix of a row's test id: `${tableTestID}-row-${key}`. */
|
|
138
|
+
rowInfix: "row",
|
|
139
|
+
/** Infix of an expanded row's detail panel: `${tableTestID}-row-detail-${key}`. */
|
|
140
|
+
rowDetailInfix: "row-detail",
|
|
141
|
+
filterBar: "ui-filters",
|
|
142
|
+
results: "ui-results",
|
|
143
|
+
pager: "ui-pager",
|
|
144
|
+
pagerInfo: "ui-pager-info",
|
|
145
|
+
pagerPrev: "ui-pager-prev",
|
|
146
|
+
pagerNext: "ui-pager-next"
|
|
147
|
+
};
|
|
148
|
+
var rowTestID = (tableTestID, key) => `${tableTestID}-${TABLE_TEST_IDS.rowInfix}-${key}`;
|
|
149
|
+
var rowDetailTestID = (tableTestID, key) => `${tableTestID}-${TABLE_TEST_IDS.rowDetailInfix}-${key}`;
|
|
150
|
+
var TABLE_I18N = {
|
|
151
|
+
loading: "uiTables.loading",
|
|
152
|
+
empty: "uiTables.empty",
|
|
153
|
+
rowLabel: "uiTables.rowLabel",
|
|
154
|
+
rowHint: "uiTables.rowHint",
|
|
155
|
+
/** Accessible name of the full-width detail panel under an expanded row. */
|
|
156
|
+
rowDetail: "uiTables.rowDetail",
|
|
157
|
+
results: "uiTables.results",
|
|
158
|
+
pagerInfo: "uiTables.pager.info",
|
|
159
|
+
pagerPrev: "uiTables.pager.prev",
|
|
160
|
+
pagerNext: "uiTables.pager.next",
|
|
161
|
+
pagerPrevHint: "uiTables.pager.prevHint",
|
|
162
|
+
pagerNextHint: "uiTables.pager.nextHint",
|
|
163
|
+
pagerRows: "uiTables.pager.rows",
|
|
164
|
+
pagerRowsOptionHint: "uiTables.pager.rowsOptionHint"
|
|
165
|
+
};
|
|
166
|
+
var FIRST_ROW_INDEX = 0;
|
|
149
167
|
function DataTable(props) {
|
|
150
168
|
const {
|
|
151
169
|
columns,
|
|
@@ -161,6 +179,7 @@ function DataTable(props) {
|
|
|
161
179
|
emptyLabel,
|
|
162
180
|
renderRowDetail,
|
|
163
181
|
expandedRowKeys,
|
|
182
|
+
styleOverrides: o,
|
|
164
183
|
stackBreakpoint = CARD_STACK_BREAKPOINT,
|
|
165
184
|
testID = TABLE_TEST_IDS.root
|
|
166
185
|
} = props;
|
|
@@ -177,12 +196,9 @@ function DataTable(props) {
|
|
|
177
196
|
},
|
|
178
197
|
[rowTint, zebra, colors.background]
|
|
179
198
|
);
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (rows.length === 0) {
|
|
184
|
-
return /* @__PURE__ */ jsx(View, { style: [tableStyles.wrap, frame], testID, children: /* @__PURE__ */ jsx(View, { style: tableStyles.state, children: /* @__PURE__ */ jsx(Text, { style: [tableStyles.stateText, { color: colors.textSecondary }], children: emptyLabel ?? t(TABLE_I18N.empty) }) }) });
|
|
185
|
-
}
|
|
199
|
+
const stateView = (label) => /* @__PURE__ */ jsx(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, children: /* @__PURE__ */ jsx(View, { style: [tableStyles.state, o?.state], children: /* @__PURE__ */ jsx(Text, { style: [tableStyles.stateText, { color: colors.textSecondary }, o?.stateText], children: label }) }) });
|
|
200
|
+
if (loading) return stateView(loadingLabel ?? t(TABLE_I18N.loading));
|
|
201
|
+
if (rows.length === 0) return stateView(emptyLabel ?? t(TABLE_I18N.empty));
|
|
186
202
|
const rowID = (key) => rowTestID(testID, key);
|
|
187
203
|
const isExpandable = renderRowDetail !== void 0;
|
|
188
204
|
const isExpanded = (key) => isExpandable && (expandedRowKeys?.includes(key) ?? false);
|
|
@@ -203,7 +219,7 @@ function DataTable(props) {
|
|
|
203
219
|
{
|
|
204
220
|
accessibilityLabel: t(TABLE_I18N.rowDetail),
|
|
205
221
|
accessibilityRole: "summary",
|
|
206
|
-
style: [tableStyles.rowDetail, { borderTopColor: colors.border, backgroundColor: colors.background }],
|
|
222
|
+
style: [tableStyles.rowDetail, { borderTopColor: colors.border, backgroundColor: colors.background }, o?.rowDetail],
|
|
207
223
|
testID: rowDetailTestID(testID, key),
|
|
208
224
|
children: renderRowDetail(row)
|
|
209
225
|
}
|
|
@@ -211,7 +227,7 @@ function DataTable(props) {
|
|
|
211
227
|
] }, key);
|
|
212
228
|
};
|
|
213
229
|
if (stacked) {
|
|
214
|
-
return /* @__PURE__ */ jsx(View, { style: [tableStyles.wrap, frame], testID, children: rows.map((row, i) => {
|
|
230
|
+
return /* @__PURE__ */ jsx(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, children: rows.map((row, i) => {
|
|
215
231
|
const key = keyExtractor(row);
|
|
216
232
|
const bg = rowBackground(row, i);
|
|
217
233
|
return withRowDetail(
|
|
@@ -222,10 +238,10 @@ function DataTable(props) {
|
|
|
222
238
|
disabled: !onRowPress,
|
|
223
239
|
onPress: onRowPress ? () => onRowPress(row) : void 0,
|
|
224
240
|
...rowA11y(row, key),
|
|
225
|
-
style: [tableStyles.card, { borderTopColor: colors.border }, i === FIRST_ROW_INDEX ? { borderTopWidth: 0 } : null, bg ? { backgroundColor: bg } : null],
|
|
226
|
-
children: columns.map((col) => /* @__PURE__ */ jsxs(View, { style: tableStyles.cardLine, children: [
|
|
227
|
-
/* @__PURE__ */ jsx(Text, { style: [tableStyles.cardLabel, { color: colors.textSecondary }], children: col.header }),
|
|
228
|
-
/* @__PURE__ */ jsx(View, { style: tableStyles.cardValue, children: col.
|
|
241
|
+
style: [tableStyles.card, { borderTopColor: colors.border }, i === FIRST_ROW_INDEX ? { borderTopWidth: 0 } : null, bg ? { backgroundColor: bg } : null, o?.card],
|
|
242
|
+
children: columns.map((col) => /* @__PURE__ */ jsxs(View, { style: [tableStyles.cardLine, o?.cardLine], children: [
|
|
243
|
+
/* @__PURE__ */ jsx(Text, { style: [tableStyles.cardLabel, { color: colors.textSecondary }, o?.cardLabel], children: col.header }),
|
|
244
|
+
/* @__PURE__ */ jsx(View, { style: [tableStyles.cardValue, o?.cardValue], children: cellContent(col, row, colors.text, o) })
|
|
229
245
|
] }, col.key))
|
|
230
246
|
},
|
|
231
247
|
key
|
|
@@ -235,16 +251,16 @@ function DataTable(props) {
|
|
|
235
251
|
);
|
|
236
252
|
}) });
|
|
237
253
|
}
|
|
238
|
-
return /* @__PURE__ */ jsxs(View, { style: [tableStyles.wrap, frame], testID, children: [
|
|
254
|
+
return /* @__PURE__ */ jsxs(View, { style: [tableStyles.wrap, frame, o?.wrap], testID, children: [
|
|
239
255
|
/* @__PURE__ */ jsx(
|
|
240
256
|
View,
|
|
241
257
|
{
|
|
242
258
|
testID: TABLE_TEST_IDS.head,
|
|
243
|
-
style: [tableStyles.headRow, { backgroundColor: colors.background }, stickyHeader ? STICKY_HEADER_STYLE : null],
|
|
259
|
+
style: [tableStyles.headRow, { backgroundColor: colors.background }, stickyHeader ? STICKY_HEADER_STYLE : null, o?.headRow],
|
|
244
260
|
children: columns.map((col) => /* @__PURE__ */ jsx(
|
|
245
261
|
Text,
|
|
246
262
|
{
|
|
247
|
-
style: [tableStyles.headCell, { color: colors.textSecondary, flex: col.weight ?? 1, textAlign: col.numeric ? "right" : "left" }],
|
|
263
|
+
style: [tableStyles.headCell, { color: colors.textSecondary, flex: col.weight ?? 1, textAlign: col.numeric ? "right" : "left" }, o?.headCell],
|
|
248
264
|
children: col.header
|
|
249
265
|
},
|
|
250
266
|
col.key
|
|
@@ -262,8 +278,8 @@ function DataTable(props) {
|
|
|
262
278
|
disabled: !onRowPress,
|
|
263
279
|
onPress: onRowPress ? () => onRowPress(row) : void 0,
|
|
264
280
|
...rowA11y(row, key),
|
|
265
|
-
style: [tableStyles.row, { borderTopColor: colors.border }, bg ? { backgroundColor: bg } : null],
|
|
266
|
-
children: columns.map((col) => /* @__PURE__ */ jsx(DesktopCell, { column: col, row, textColor: colors.text, testID: `${rowID(key)}-${col.key}
|
|
281
|
+
style: [tableStyles.row, { borderTopColor: colors.border }, bg ? { backgroundColor: bg } : null, o?.row],
|
|
282
|
+
children: columns.map((col) => /* @__PURE__ */ jsx(DesktopCell, { column: col, row, textColor: colors.text, testID: `${rowID(key)}-${col.key}`, styleOverrides: o }, col.key))
|
|
267
283
|
},
|
|
268
284
|
key
|
|
269
285
|
),
|
|
@@ -273,30 +289,34 @@ function DataTable(props) {
|
|
|
273
289
|
})
|
|
274
290
|
] });
|
|
275
291
|
}
|
|
292
|
+
var RESULTS_COUNT_WEIGHT = "700";
|
|
276
293
|
function FilterBar({
|
|
277
294
|
children,
|
|
278
295
|
resultsCount,
|
|
279
296
|
resultsLabel,
|
|
280
297
|
actions,
|
|
298
|
+
styleOverrides: o,
|
|
281
299
|
testID = TABLE_TEST_IDS.filterBar
|
|
282
300
|
}) {
|
|
283
301
|
const { theme, t } = useUi();
|
|
284
302
|
const { colors } = theme;
|
|
285
303
|
const word = resultsLabel ?? t(TABLE_I18N.results);
|
|
286
|
-
return /* @__PURE__ */ jsxs(View, { style: [chromeStyles.filters, { backgroundColor: colors.surface, borderColor: colors.border }], testID, children: [
|
|
304
|
+
return /* @__PURE__ */ jsxs(View, { style: [chromeStyles.filters, { backgroundColor: colors.surface, borderColor: colors.border }, o?.filters], testID, children: [
|
|
287
305
|
children,
|
|
288
|
-
/* @__PURE__ */ jsx(View, { style: chromeStyles.filtersSpacer }),
|
|
289
|
-
typeof resultsCount === "number" && /* @__PURE__ */ jsxs(Text, { style: [chromeStyles.results, { color: colors.textSecondary }], testID: TABLE_TEST_IDS.results, children: [
|
|
290
|
-
/* @__PURE__ */ jsx(Text, { style: { color: colors.text, fontWeight:
|
|
306
|
+
/* @__PURE__ */ jsx(View, { style: [chromeStyles.filtersSpacer, o?.filtersSpacer] }),
|
|
307
|
+
typeof resultsCount === "number" && /* @__PURE__ */ jsxs(Text, { style: [chromeStyles.results, { color: colors.textSecondary }, o?.results], testID: TABLE_TEST_IDS.results, children: [
|
|
308
|
+
/* @__PURE__ */ jsx(Text, { style: { color: colors.text, fontWeight: RESULTS_COUNT_WEIGHT }, children: resultsCount.toLocaleString() }),
|
|
291
309
|
` ${word}`
|
|
292
310
|
] }),
|
|
293
|
-
!!actions && /* @__PURE__ */ jsx(View, { style: chromeStyles.filtersActions, children: actions })
|
|
311
|
+
!!actions && /* @__PURE__ */ jsx(View, { style: [chromeStyles.filtersActions, o?.filtersActions], children: actions })
|
|
294
312
|
] });
|
|
295
313
|
}
|
|
296
314
|
var FIRST_PAGE = 1;
|
|
297
315
|
var EN_DASH = "\u2013";
|
|
298
|
-
|
|
299
|
-
|
|
316
|
+
var DISABLED_OPACITY = 0.4;
|
|
317
|
+
var FULL_OPACITY = 1;
|
|
318
|
+
var TRANSPARENT = "transparent";
|
|
319
|
+
function NavButton({ label, hint, disabled, onPress, color, border, testID, styleOverrides: o }) {
|
|
300
320
|
return /* @__PURE__ */ jsx(
|
|
301
321
|
Pressable,
|
|
302
322
|
{
|
|
@@ -307,8 +327,8 @@ function NavButton({ label, hint, disabled, onPress, color, border, testID }) {
|
|
|
307
327
|
accessibilityState: { disabled },
|
|
308
328
|
disabled,
|
|
309
329
|
onPress,
|
|
310
|
-
style: [chromeStyles.control, { borderColor: border, opacity: disabled ? DISABLED_OPACITY :
|
|
311
|
-
children: /* @__PURE__ */ jsx(Text, { style: [chromeStyles.controlText, { color }], children: label })
|
|
330
|
+
style: [chromeStyles.control, { borderColor: border, opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }, o?.control],
|
|
331
|
+
children: /* @__PURE__ */ jsx(Text, { style: [chromeStyles.controlText, { color }, o?.controlText], children: label })
|
|
312
332
|
}
|
|
313
333
|
);
|
|
314
334
|
}
|
|
@@ -320,6 +340,7 @@ function Pager({
|
|
|
320
340
|
onPageSizeChange,
|
|
321
341
|
pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,
|
|
322
342
|
unitLabel,
|
|
343
|
+
styleOverrides: o,
|
|
323
344
|
testID = TABLE_TEST_IDS.pager
|
|
324
345
|
}) {
|
|
325
346
|
const { theme, t } = useUi();
|
|
@@ -332,11 +353,11 @@ function Pager({
|
|
|
332
353
|
const count = `${from.toLocaleString()}${EN_DASH}${to.toLocaleString()} ${t(TABLE_I18N.pagerInfo)} ${total.toLocaleString()}`;
|
|
333
354
|
const hasUnit = unitLabel !== void 0 && unitLabel !== "";
|
|
334
355
|
const info = hasUnit ? `${count} ${unitLabel}` : count;
|
|
335
|
-
return /* @__PURE__ */ jsxs(View, { style: chromeStyles.pager, testID, children: [
|
|
336
|
-
/* @__PURE__ */ jsx(Text, { style: [chromeStyles.pagerInfo, { color: colors.textSecondary }], testID: TABLE_TEST_IDS.pagerInfo, children: info }),
|
|
337
|
-
/* @__PURE__ */ jsxs(View, { style: chromeStyles.pagerNav, children: [
|
|
338
|
-
/* @__PURE__ */ jsx(Text, { style: [chromeStyles.pagerRowsLabel, { color: colors.textSecondary }], children: t(TABLE_I18N.pagerRows) }),
|
|
339
|
-
/* @__PURE__ */ jsx(View, { style: chromeStyles.sizeGroup, children: pageSizeOptions.map((size) => {
|
|
356
|
+
return /* @__PURE__ */ jsxs(View, { style: [chromeStyles.pager, o?.pager], testID, children: [
|
|
357
|
+
/* @__PURE__ */ jsx(Text, { style: [chromeStyles.pagerInfo, { color: colors.textSecondary }, o?.pagerInfo], testID: TABLE_TEST_IDS.pagerInfo, children: info }),
|
|
358
|
+
/* @__PURE__ */ jsxs(View, { style: [chromeStyles.pagerNav, o?.pagerNav], children: [
|
|
359
|
+
/* @__PURE__ */ jsx(Text, { style: [chromeStyles.pagerRowsLabel, { color: colors.textSecondary }, o?.pagerRowsLabel], children: t(TABLE_I18N.pagerRows) }),
|
|
360
|
+
/* @__PURE__ */ jsx(View, { style: [chromeStyles.sizeGroup, o?.sizeGroup], children: pageSizeOptions.map((size) => {
|
|
340
361
|
const active = size === pageSize;
|
|
341
362
|
return /* @__PURE__ */ jsx(
|
|
342
363
|
Pressable,
|
|
@@ -347,8 +368,8 @@ function Pager({
|
|
|
347
368
|
accessibilityHint: t(TABLE_I18N.pagerRowsOptionHint),
|
|
348
369
|
accessibilityState: { selected: active },
|
|
349
370
|
onPress: () => onPageSizeChange(size),
|
|
350
|
-
style: [chromeStyles.sizePill, { borderColor: active ? brand : colors.border, backgroundColor: active ? brand :
|
|
351
|
-
children: /* @__PURE__ */ jsx(Text, { style: [chromeStyles.sizePillText, { color: active ? colors.surface : colors.textSecondary }], children: size })
|
|
371
|
+
style: [chromeStyles.sizePill, { borderColor: active ? brand : colors.border, backgroundColor: active ? brand : TRANSPARENT }, o?.sizePill],
|
|
372
|
+
children: /* @__PURE__ */ jsx(Text, { style: [chromeStyles.sizePillText, { color: active ? colors.surface : colors.textSecondary }, o?.sizePillText], children: size })
|
|
352
373
|
},
|
|
353
374
|
size
|
|
354
375
|
);
|
|
@@ -362,6 +383,7 @@ function Pager({
|
|
|
362
383
|
onPress: () => onPageChange(safePage - 1),
|
|
363
384
|
color: colors.text,
|
|
364
385
|
border: colors.border,
|
|
386
|
+
styleOverrides: o,
|
|
365
387
|
testID: TABLE_TEST_IDS.pagerPrev
|
|
366
388
|
}
|
|
367
389
|
),
|
|
@@ -374,6 +396,7 @@ function Pager({
|
|
|
374
396
|
onPress: () => onPageChange(safePage + 1),
|
|
375
397
|
color: colors.text,
|
|
376
398
|
border: colors.border,
|
|
399
|
+
styleOverrides: o,
|
|
377
400
|
testID: TABLE_TEST_IDS.pagerNext
|
|
378
401
|
}
|
|
379
402
|
)
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/StatCard/StatCard.tsx","../src/DataTable/constants.ts","../src/DataTable/styles.ts","../src/DataTable/DataTable.tsx","../src/DataTable/FilterBar.tsx","../src/DataTable/Pager.tsx"],"names":["StyleSheet","jsx","View","Text","useUi","jsxs","React","Pressable"],"mappings":";;;;;;AASA,IAAM,YAAA,GAAe,EAAA;AACrB,IAAM,kBAAA,GAAqB,EAAA;AAC3B,IAAM,iBAAA,GAAoB,CAAA;AAC1B,IAAM,eAAA,GAAkB,EAAA;AACxB,IAAM,eAAA,GAAkB,EAAA;AACxB,IAAM,iBAAA,GAAoB,EAAA;AAE1B,IAAM,MAAA,GAAS,WAAW,MAAA,CAAO;AAAA,EAC/B,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,YAAA;AAAA,IACT,YAAA,EAAc,kBAAA;AAAA,IACd,WAAA,EAAa;AAAA,GACf;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY;AAAA,GACd;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY,KAAA;AAAA,IACZ,UAAA,EAAY;AAAA;AAEhB,CAAC,CAAA;AAQM,IAAM,WAAW,IAAA,CAAK,CAAC,EAAE,KAAA,EAAO,KAAA,EAAO,QAAO,KAAyC;AAC5F,EAAA,MAAM,EAAE,KAAA,EAAO,CAAA,EAAE,GAAI,KAAA,EAAM;AAC3B,EAAA,MAAM,EAAE,QAAO,GAAI,KAAA;AAEnB,EAAA,MAAM,cAAA,GAAiB,MAAM,cAAA,EAAe;AAE5C,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,iBAAA,EAAmB,CAAA,CAAE,oBAAA,EAAsB,KAAK,CAAA;AAAA,MAChD,kBAAA,EAAoB,CAAA,CAAE,yBAAA,EAA2B,KAAA,EAAO,cAAc,CAAA;A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AAA,GAAU,OAAO,aAAA,EAAe,GAAI,QAAA,EAAA,IAAA,EAAK;AAAA,WAAA;AAAA,UAT3F;AAAA,SAUP;AAAA,MAEJ,CAAC,CAAA,EACH,CAAA;AAAA,sBACAF,GAAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,CAAA,CAAE,UAAA,CAAW,SAAS,CAAA;AAAA,UAC7B,IAAA,EAAM,CAAA,CAAE,UAAA,CAAW,aAAa,CAAA;AAAA,UAChC,UAAU,QAAA,IAAY,UAAA;AAAA,UACtB,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,GAAW,CAAC,CAAA;AAAA,UACxC,OAAO,MAAA,CAAO,IAAA;AAAA,UACd,QAAQ,MAAA,CAAO,MAAA;AAAA,UACf,QAAQ,cAAA,CAAe;AAAA;AAAA,OACzB;AAAA,sBACAA,GAAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,CAAA,CAAE,UAAA,CAAW,SAAS,CAAA;AAAA,UAC7B,IAAA,EAAM,CAAA,CAAE,UAAA,CAAW,aAAa,CAAA;AAAA,UAChC,UAAU,QAAA,IAAY,QAAA;AAAA,UACtB,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,GAAW,CAAC,CAAA;AAAA,UACxC,OAAO,MAAA,CAAO,IAAA;AAAA,UACd,QAAQ,MAAA,CAAO,MAAA;AAAA,UACf,QAAQ,cAAA,CAAe;AAAA;AAAA;AACzB,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"index.mjs","sourcesContent":["/**\n * StatCard — a single labelled metric tile (label + formatted numeric value).\n */\nimport React, { memo } from 'react';\n\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nconst CARD_PADDING = 16;\nconst CARD_BORDER_RADIUS = 12;\nconst CARD_BORDER_WIDTH = 1;\nconst LABEL_FONT_SIZE = 14;\nconst VALUE_FONT_SIZE = 28;\nconst VALUE_LINE_HEIGHT = 36;\n\nconst styles = StyleSheet.create({\n card: {\n padding: CARD_PADDING,\n borderRadius: CARD_BORDER_RADIUS,\n borderWidth: CARD_BORDER_WIDTH,\n },\n label: {\n fontSize: LABEL_FONT_SIZE,\n fontWeight: '500',\n },\n value: {\n fontSize: VALUE_FONT_SIZE,\n fontWeight: '700',\n lineHeight: VALUE_LINE_HEIGHT,\n },\n});\n\nexport interface StatCardProps {\n label: string;\n value: number;\n testID: string;\n}\n\nexport const StatCard = memo(({ label, value, testID }: StatCardProps): React.ReactElement => {\n const { theme, t } = useUi();\n const { colors } = theme;\n\n const formattedValue = value.toLocaleString();\n\n return (\n <View\n accessibilityHint={t('analytics.statHint', label)}\n accessibilityLabel={t('analytics.statCardLabel', label, formattedValue)}\n accessibilityRole=\"text\"\n style={[styles.card, { backgroundColor: colors.surface, borderColor: colors.border }]}\n testID={testID}\n >\n <Text style={[styles.label, { color: colors.textSecondary }]}>\n {label}\n </Text>\n <Text style={[styles.value, { color: colors.text }]}>\n {formattedValue}\n </Text>\n </View>\n );\n});\n\nStatCard.displayName = 'StatCard';\n\nexport default StatCard;\n","/**\n * Shared constants for the DataTable family (DataTable / FilterBar / Pager).\n * Keeps every literal (test ids, i18n keys, layout numbers) in one place so the\n * components hold no magic numbers and no ad-hoc strings.\n */\n\n/** Default breakpoint (px): below this a row collapses to a label:value card. */\nexport const CARD_STACK_BREAKPOINT = 640;\n\n/** Default rows-per-page choices, matching the vanilla console's GRID.md pager. */\nexport const DEFAULT_PAGE_SIZE_OPTIONS: readonly number[] = [25, 50, 100, 200];\n\n/** Stable test ids so consumers/e2e can target the shared chrome. */\nexport const TABLE_TEST_IDS = {\n root: 'ui-data-table',\n head: 'ui-data-table-head',\n /** Infix of a row's test id: `${tableTestID}-row-${key}`. */\n rowInfix: 'row',\n /** Infix of an expanded row's detail panel: `${tableTestID}-row-detail-${key}`. */\n rowDetailInfix: 'row-detail',\n filterBar: 'ui-filters',\n results: 'ui-results',\n pager: 'ui-pager',\n pagerInfo: 'ui-pager-info',\n pagerPrev: 'ui-pager-prev',\n pagerNext: 'ui-pager-next',\n} as const;\n\n/** The test id of a row: `${tableTestID}-row-${key}` (key from `keyExtractor`). */\nexport const rowTestID = (tableTestID: string, key: string): string =>\n `${tableTestID}-${TABLE_TEST_IDS.rowInfix}-${key}`;\n\n/**\n * The test id of an expanded row's full-width detail panel:\n * `${tableTestID}-row-detail-${key}` (key from `keyExtractor`). Exported so\n * consumers and e2e specs target the panel without re-deriving the shape.\n */\nexport const rowDetailTestID = (tableTestID: string, key: string): string =>\n `${tableTestID}-${TABLE_TEST_IDS.rowDetailInfix}-${key}`;\n\n/**\n * Translation keys for every component-authored, user-facing string. Apps map\n * these in their UiProvider `t` (FM); the neutral default `t` returns the key, so\n * a host that forgets a key degrades to the key rather than a hardcoded literal.\n */\nexport const TABLE_I18N = {\n loading: 'uiTables.loading',\n empty: 'uiTables.empty',\n rowLabel: 'uiTables.rowLabel',\n rowHint: 'uiTables.rowHint',\n /** Accessible name of the full-width detail panel under an expanded row. */\n rowDetail: 'uiTables.rowDetail',\n results: 'uiTables.results',\n pagerInfo: 'uiTables.pager.info',\n pagerPrev: 'uiTables.pager.prev',\n pagerNext: 'uiTables.pager.next',\n pagerPrevHint: 'uiTables.pager.prevHint',\n pagerNextHint: 'uiTables.pager.nextHint',\n pagerRows: 'uiTables.pager.rows',\n pagerRowsOptionHint: 'uiTables.pager.rowsOptionHint',\n} as const;\n","/**\n * Shared StyleSheet for the DataTable family. All colours are applied inline from\n * `useUi().theme` at render time — nothing here carries a colour literal.\n */\nimport { StyleSheet, type ViewStyle } from 'react-native';\n\nconst BORDER_WIDTH = 1;\nconst BORDER_RADIUS = 12;\nconst COLUMN_GAP = 16;\nconst ROW_PAD_H = 14;\nconst ROW_PAD_V = 12;\nconst HEAD_PAD_V = 11;\nconst STATE_PAD_V = 34;\nconst HEAD_FONT = 12;\nconst CELL_FONT = 14;\nconst STATE_FONT = 14;\nconst CARD_LINE_PAD_V = 3;\nconst CARD_LINE_GAP = 12;\nconst PILL_RADIUS = 999;\nconst PAGER_GAP = 8;\nconst PAGER_SIZE_GAP = 6;\nconst CONTROL_PAD_H = 12;\nconst CONTROL_PAD_V = 6;\nconst CONTROL_FONT = 13;\nconst RESULTS_FONT = 13;\nconst HEAD_LETTER_SPACING = 0.4;\nconst LABEL_LETTER_SPACING = 0.3;\nconst STICKY_Z = 2;\nconst FULL_WIDTH = '100%' as const;\n\n/**\n * `position: 'sticky'` is a react-native-web-only value that RN's `ViewStyle`\n * type does not enumerate. Cast through `unknown` (never `any`) so the sticky\n * header stays typed without an eslint `no-explicit-any` violation.\n */\nexport const STICKY_HEADER_STYLE = {\n position: 'sticky',\n top: 0,\n zIndex: STICKY_Z,\n} as unknown as ViewStyle;\n\nexport const tableStyles = StyleSheet.create({\n wrap: { borderWidth: BORDER_WIDTH, borderRadius: BORDER_RADIUS, overflow: 'hidden' },\n headRow: { flexDirection: 'row', columnGap: COLUMN_GAP, paddingHorizontal: ROW_PAD_H, paddingVertical: HEAD_PAD_V },\n headCell: { fontSize: HEAD_FONT, fontWeight: '600', letterSpacing: HEAD_LETTER_SPACING, textTransform: 'uppercase' },\n row: { flexDirection: 'row', columnGap: COLUMN_GAP, alignItems: 'center', paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n cell: { fontSize: CELL_FONT, fontWeight: '400' },\n numCell: { fontVariant: ['tabular-nums'], textAlign: 'right' },\n state: { paddingVertical: STATE_PAD_V, alignItems: 'center' },\n stateText: { fontSize: STATE_FONT },\n /** Full-width panel under an expanded row — spans every column (the wrap is a column flexbox). */\n rowDetail: { width: FULL_WIDTH, paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n card: { paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n cardLine: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'baseline', paddingVertical: CARD_LINE_PAD_V, gap: CARD_LINE_GAP },\n cardLabel: { fontSize: HEAD_FONT, fontWeight: '600', textTransform: 'uppercase', letterSpacing: LABEL_LETTER_SPACING },\n cardValue: { flexShrink: 1, alignItems: 'flex-end' },\n});\n\nexport const chromeStyles = StyleSheet.create({\n filters: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'flex-end', columnGap: COLUMN_GAP, rowGap: PAGER_GAP, borderWidth: BORDER_WIDTH, borderRadius: BORDER_RADIUS, paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V },\n filtersSpacer: { flexGrow: 1 },\n results: { fontSize: RESULTS_FONT },\n filtersActions: { flexDirection: 'row', gap: PAGER_SIZE_GAP, alignItems: 'center' },\n pager: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between', gap: PAGER_GAP },\n pagerInfo: { fontSize: CONTROL_FONT, fontVariant: ['tabular-nums'] },\n pagerNav: { flexDirection: 'row', alignItems: 'center', gap: PAGER_SIZE_GAP, flexWrap: 'wrap' },\n pagerRowsLabel: { fontSize: HEAD_FONT, textTransform: 'uppercase', letterSpacing: LABEL_LETTER_SPACING },\n sizeGroup: { flexDirection: 'row', gap: PAGER_SIZE_GAP, alignItems: 'center' },\n control: { paddingHorizontal: CONTROL_PAD_H, paddingVertical: CONTROL_PAD_V, borderRadius: BORDER_RADIUS, borderWidth: BORDER_WIDTH },\n controlText: { fontSize: CONTROL_FONT, fontWeight: '600' },\n sizePill: { paddingHorizontal: CONTROL_PAD_H, paddingVertical: CONTROL_PAD_V, borderRadius: PILL_RADIUS, borderWidth: BORDER_WIDTH },\n sizePillText: { fontSize: HEAD_FONT, fontWeight: '600', fontVariant: ['tabular-nums'] },\n});\n","/**\n * DataTable — the shared, tokenized RN-web grid for every dloizides.com surface\n * (and the future AML v2 portal). Promoted from the POC draft; completes the\n * `wwwroot/shared/GRID.md` behavioural contract in the RN idiom:\n *\n * - columns + rows API (unchanged from the POC — it is the right shape).\n * - sticky header (`stickyHeader`), zebra striping (`zebra`), per-row tint.\n * - a responsive label:value **card-stack** below `stackBreakpoint` via\n * `useWindowDimensions` (the CSS `data-label` card-stack does not port).\n * - per-row `testID` + `accessibilityLabel`/`accessibilityHint` (kit standard).\n * - optional CONTROLLED expandable rows: `renderRowDetail` + `expandedRowKeys`\n * render a full-width detail panel between an expanded row and the next\n * (desktop and card-stack alike). Omit both and the table renders exactly as\n * it did before the feature existed.\n * - every colour from `useUi().theme`; every component-authored string via `t`.\n */\nimport React, { useCallback } from 'react';\nimport { Pressable, Text, View, useWindowDimensions } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { CARD_STACK_BREAKPOINT, TABLE_I18N, TABLE_TEST_IDS, rowDetailTestID, rowTestID } from './constants';\nimport { STICKY_HEADER_STYLE, tableStyles as s } from './styles';\nimport type { DataTableColumn, DataTableProps } from './types';\n\nconst FIRST_ROW_INDEX = 0;\n\n/**\n * The a11y props spread onto a row. The expanded state is emitted only when the\n * table is expandable, and via BOTH spellings: `accessibilityState` (RN native)\n * and `aria-expanded` (react-native-web ≥ 0.19 no longer maps the legacy prop).\n */\ninterface RowA11y {\n accessibilityLabel: string;\n accessibilityHint: string;\n accessibilityRole: 'button' | 'text';\n accessibilityState?: { expanded: boolean };\n 'aria-expanded'?: boolean;\n}\n\n/** A single desktop cell — renders `col.render(row)` exactly ONCE (POC bug fix). */\nfunction DesktopCell<T>({ column, row, textColor, testID }: { column: DataTableColumn<T>; row: T; textColor: string; testID: string }): React.ReactElement {\n const content = column.render(row);\n return (\n <View style={{ flex: column.weight ?? 1, alignItems: column.numeric ? 'flex-end' : 'flex-start' }} testID={testID}>\n {typeof content === 'string' ? (\n <Text style={[s.cell, column.numeric ? s.numCell : null, { color: textColor }]}>{content}</Text>\n ) : (\n content\n )}\n </View>\n );\n}\n\nexport function DataTable<T>(props: DataTableProps<T>): React.ReactElement {\n const {\n columns, rows, keyExtractor, rowTint, zebra, stickyHeader, onRowPress,\n getRowAccessibilityLabel, loading, loadingLabel, emptyLabel,\n renderRowDetail, expandedRowKeys,\n stackBreakpoint = CARD_STACK_BREAKPOINT, testID = TABLE_TEST_IDS.root,\n } = props;\n\n const { theme, t } = useUi();\n const { colors } = theme;\n const { width } = useWindowDimensions();\n const stacked = width < stackBreakpoint;\n const frame = { backgroundColor: colors.surface, borderColor: colors.border };\n\n const rowBackground = useCallback(\n (row: T, index: number): string | undefined => {\n const tint = rowTint?.(row);\n if (tint) return tint;\n return zebra && index % 2 === 1 ? colors.background : undefined;\n },\n [rowTint, zebra, colors.background],\n );\n\n if (loading) {\n return (\n <View style={[s.wrap, frame]} testID={testID}>\n <View style={s.state}>\n <Text style={[s.stateText, { color: colors.textSecondary }]}>{loadingLabel ?? t(TABLE_I18N.loading)}</Text>\n </View>\n </View>\n );\n }\n if (rows.length === 0) {\n return (\n <View style={[s.wrap, frame]} testID={testID}>\n <View style={s.state}>\n <Text style={[s.stateText, { color: colors.textSecondary }]}>{emptyLabel ?? t(TABLE_I18N.empty)}</Text>\n </View>\n </View>\n );\n }\n\n const rowID = (key: string): string => rowTestID(testID, key);\n const isExpandable = renderRowDetail !== undefined;\n const isExpanded = (key: string): boolean => isExpandable && (expandedRowKeys?.includes(key) ?? false);\n\n const rowA11y = (row: T, key: string): RowA11y => ({\n accessibilityLabel: getRowAccessibilityLabel?.(row) ?? t(TABLE_I18N.rowLabel),\n accessibilityHint: t(TABLE_I18N.rowHint),\n accessibilityRole: onRowPress ? 'button' : 'text',\n // Only an expandable table announces expanded/collapsed — a plain table's rows\n // keep exactly the props they had before this feature existed.\n ...(isExpandable ? { accessibilityState: { expanded: isExpanded(key) }, 'aria-expanded': isExpanded(key) } : null),\n });\n\n /**\n * Pairs a rendered row with its detail panel when that row is expanded. When\n * `renderRowDetail` is omitted the row element is returned untouched (no extra\n * wrapper, no extra node) — omitting the props is a no-op on the output.\n */\n const withRowDetail = (rowNode: React.ReactElement, row: T, key: string): React.ReactElement => {\n if (!isExpandable || !isExpanded(key)) return rowNode;\n return (\n <React.Fragment key={key}>\n {rowNode}\n <View\n accessibilityLabel={t(TABLE_I18N.rowDetail)}\n accessibilityRole=\"summary\"\n style={[s.rowDetail, { borderTopColor: colors.border, backgroundColor: colors.background }]}\n testID={rowDetailTestID(testID, key)}\n >\n {renderRowDetail(row)}\n </View>\n </React.Fragment>\n );\n };\n\n // --- mobile: label:value card-stack (GRID.md) ---\n if (stacked) {\n return (\n <View style={[s.wrap, frame]} testID={testID}>\n {rows.map((row, i) => {\n const key = keyExtractor(row);\n const bg = rowBackground(row, i);\n return withRowDetail(\n <Pressable\n key={key}\n testID={rowID(key)}\n disabled={!onRowPress}\n onPress={onRowPress ? () => onRowPress(row) : undefined}\n {...rowA11y(row, key)}\n style={[s.card, { borderTopColor: colors.border }, i === FIRST_ROW_INDEX ? { borderTopWidth: 0 } : null, bg ? { backgroundColor: bg } : null]}\n >\n {columns.map((col) => (\n <View key={col.key} style={s.cardLine}>\n <Text style={[s.cardLabel, { color: colors.textSecondary }]}>{col.header}</Text>\n <View style={s.cardValue}>{col.render(row)}</View>\n </View>\n ))}\n </Pressable>,\n row,\n key,\n );\n })}\n </View>\n );\n }\n\n // --- desktop: header + rows ---\n return (\n <View style={[s.wrap, frame]} testID={testID}>\n <View\n testID={TABLE_TEST_IDS.head}\n style={[s.headRow, { backgroundColor: colors.background }, stickyHeader ? STICKY_HEADER_STYLE : null]}\n >\n {columns.map((col) => (\n <Text\n key={col.key}\n style={[s.headCell, { color: colors.textSecondary, flex: col.weight ?? 1, textAlign: col.numeric ? 'right' : 'left' }]}\n >\n {col.header}\n </Text>\n ))}\n </View>\n {rows.map((row, i) => {\n const key = keyExtractor(row);\n const bg = rowBackground(row, i);\n return withRowDetail(\n <Pressable\n key={key}\n testID={rowID(key)}\n disabled={!onRowPress}\n onPress={onRowPress ? () => onRowPress(row) : undefined}\n {...rowA11y(row, key)}\n style={[s.row, { borderTopColor: colors.border }, bg ? { backgroundColor: bg } : null]}\n >\n {columns.map((col) => (\n <DesktopCell key={col.key} column={col} row={row} textColor={colors.text} testID={`${rowID(key)}-${col.key}`} />\n ))}\n </Pressable>,\n row,\n key,\n );\n })}\n </View>\n );\n}\n\nexport default DataTable;\n","/**\n * FilterBar — the shared filter-bar shell from GRID.md (`.ui-filters`): a themed,\n * wrapping row that holds the caller's filter fields, an optional live results\n * count (`<b>N</b> results`) and an optional actions slot (Apply / Export …).\n * Layout + theming only — the fields themselves come from the app (or @dloizides/\n * ui-forms), keeping this reusable across every grid rather than coverage-specific.\n */\nimport React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { TABLE_I18N, TABLE_TEST_IDS } from './constants';\nimport { chromeStyles as c } from './styles';\n\nexport interface FilterBarProps {\n /** The filter fields (labels + inputs), supplied by the app / ui-forms. */\n children?: React.ReactNode;\n /** Live count shown as `<b>{resultsCount}</b> {results}`. Omit to hide. */\n resultsCount?: number;\n /** Overrides the kit's translated \"results\" word (pass an app-translated string). */\n resultsLabel?: string;\n /** Right-aligned action buttons (Apply, Export CSV, …). */\n actions?: React.ReactNode;\n testID?: string;\n}\n\nexport function FilterBar({\n children,\n resultsCount,\n resultsLabel,\n actions,\n testID = TABLE_TEST_IDS.filterBar,\n}: FilterBarProps): React.ReactElement {\n const { theme, t } = useUi();\n const { colors } = theme;\n const word = resultsLabel ?? t(TABLE_I18N.results);\n\n return (\n <View style={[c.filters, { backgroundColor: colors.surface, borderColor: colors.border }]} testID={testID}>\n {children}\n <View style={c.filtersSpacer} />\n {typeof resultsCount === 'number' && (\n <Text style={[c.results, { color: colors.textSecondary }]} testID={TABLE_TEST_IDS.results}>\n <Text style={{ color: colors.text, fontWeight: '700' }}>{resultsCount.toLocaleString()}</Text>\n {` ${word}`}\n </Text>\n )}\n {!!actions && <View style={c.filtersActions}>{actions}</View>}\n </View>\n );\n}\n\nexport default FilterBar;\n","/**\n * Pager — the shared pagination control from GRID.md (`.ui-pager`): page-info on\n * the left (`from–to of N`), nav on the right (rows-per-page + Prev/Next). Sits ON\n * TOP of the grid (in the section header row), so every paged grid looks the same.\n * RN idiom: rows-per-page is a row of pressable pills (RN has no native `<select>`);\n * everything is themed from `useUi().theme` and labelled via the UiProvider `t`.\n */\nimport React from 'react';\nimport { Pressable, Text, View } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { DEFAULT_PAGE_SIZE_OPTIONS, TABLE_I18N, TABLE_TEST_IDS } from './constants';\nimport { chromeStyles as c } from './styles';\n\nconst FIRST_PAGE = 1;\nconst EN_DASH = '–';\n\nexport interface PagerProps {\n /** 1-based current page. */\n page: number;\n /** Rows per page. */\n pageSize: number;\n /** Total row count across all pages. */\n total: number;\n onPageChange: (page: number) => void;\n onPageSizeChange: (pageSize: number) => void;\n /** Rows-per-page choices. Default 25 / 50 / 100 / 200. */\n pageSizeOptions?: readonly number[];\n /**\n * Optional, already-translated unit noun appended to the count line, e.g.\n * `\"leadership terms\"` renders `1–50 of 3,023 leadership terms`. When omitted the\n * count line stays the generic `from–to of N` (byte-identical to prior behaviour).\n */\n unitLabel?: string;\n testID?: string;\n}\n\ninterface NavButtonProps {\n label: string;\n hint: string;\n disabled: boolean;\n onPress: () => void;\n color: string;\n border: string;\n testID: string;\n}\n\nfunction NavButton({ label, hint, disabled, onPress, color, border, testID }: NavButtonProps): React.ReactElement {\n const DISABLED_OPACITY = 0.4;\n return (\n <Pressable\n testID={testID}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n accessibilityHint={hint}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={onPress}\n style={[c.control, { borderColor: border, opacity: disabled ? DISABLED_OPACITY : 1 }]}\n >\n <Text style={[c.controlText, { color }]}>{label}</Text>\n </Pressable>\n );\n}\n\nexport function Pager({\n page,\n pageSize,\n total,\n onPageChange,\n onPageSizeChange,\n pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,\n unitLabel,\n testID = TABLE_TEST_IDS.pager,\n}: PagerProps): React.ReactElement {\n const { theme, t } = useUi();\n const { colors, palette } = theme;\n const brand = palette.primary['500'];\n\n const lastPage = Math.max(FIRST_PAGE, Math.ceil(total / pageSize));\n const safePage = Math.min(Math.max(page, FIRST_PAGE), lastPage);\n const from = total === 0 ? 0 : (safePage - 1) * pageSize + 1;\n const to = Math.min(safePage * pageSize, total);\n const count = `${from.toLocaleString()}${EN_DASH}${to.toLocaleString()} ${t(TABLE_I18N.pagerInfo)} ${total.toLocaleString()}`;\n const hasUnit = unitLabel !== undefined && unitLabel !== '';\n const info = hasUnit ? `${count} ${unitLabel}` : count;\n\n return (\n <View style={c.pager} testID={testID}>\n <Text style={[c.pagerInfo, { color: colors.textSecondary }]} testID={TABLE_TEST_IDS.pagerInfo}>{info}</Text>\n <View style={c.pagerNav}>\n <Text style={[c.pagerRowsLabel, { color: colors.textSecondary }]}>{t(TABLE_I18N.pagerRows)}</Text>\n <View style={c.sizeGroup}>\n {pageSizeOptions.map((size) => {\n const active = size === pageSize;\n return (\n <Pressable\n key={size}\n testID={`${testID}-size-${size}`}\n accessibilityRole=\"button\"\n accessibilityLabel={String(size)}\n accessibilityHint={t(TABLE_I18N.pagerRowsOptionHint)}\n accessibilityState={{ selected: active }}\n onPress={() => onPageSizeChange(size)}\n style={[c.sizePill, { borderColor: active ? brand : colors.border, backgroundColor: active ? brand : 'transparent' }]}\n >\n <Text style={[c.sizePillText, { color: active ? colors.surface : colors.textSecondary }]}>{size}</Text>\n </Pressable>\n );\n })}\n </View>\n <NavButton\n label={t(TABLE_I18N.pagerPrev)}\n hint={t(TABLE_I18N.pagerPrevHint)}\n disabled={safePage <= FIRST_PAGE}\n onPress={() => onPageChange(safePage - 1)}\n color={colors.text}\n border={colors.border}\n testID={TABLE_TEST_IDS.pagerPrev}\n />\n <NavButton\n label={t(TABLE_I18N.pagerNext)}\n hint={t(TABLE_I18N.pagerNextHint)}\n disabled={safePage >= lastPage}\n onPress={() => onPageChange(safePage + 1)}\n color={colors.text}\n border={colors.border}\n testID={TABLE_TEST_IDS.pagerNext}\n />\n </View>\n </View>\n );\n}\n\nexport default Pager;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/StatCard/StatCard.tsx","../src/DataTable/styles.ts","../src/DataTable/cells.tsx","../src/DataTable/constants.ts","../src/DataTable/DataTable.tsx","../src/DataTable/FilterBar.tsx","../src/DataTable/Pager.tsx"],"names":["StyleSheet","jsx","Text","View","useUi","jsxs","React","Pressable"],"mappings":";;;;;;AASA,IAAM,YAAA,GAAe,EAAA;AACrB,IAAM,kBAAA,GAAqB,EAAA;AAC3B,IAAM,iBAAA,GAAoB,CAAA;AAC1B,IAAM,eAAA,GAAkB,EAAA;AACxB,IAAM,eAAA,GAAkB,EAAA;AACxB,IAAM,iBAAA,GAAoB,EAAA;AAE1B,IAAM,MAAA,GAAS,WAAW,MAAA,CAAO;AAAA,EAC/B,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,YAAA;AAAA,IACT,YAAA,EAAc,kBAAA;AAAA,IACd,WAAA,EAAa;AAAA,GACf;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY;AAAA,GACd;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,eAAA;AAAA,IACV,UAAA,EAAY,KAAA;AAAA,IACZ,UAAA,EAAY;AAAA;AAEhB,CAAC,CAAA;AAQM,IAAM,WAAW,IAAA,CAAK,CAAC,EAAE,KAAA,EAAO,KAAA,EAAO,QAAO,KAAyC;AAC5F,EAAA,MAAM,EAAE,KAAA,EAAO,CAAA,EAAE,GAAI,KAAA,EAAM;AAC3B,EAAA,MAAM,EAAE,QAAO,GAAI,KAAA;AAEnB,EAAA,MAAM,cAAA,GAAiB,MAAM,cAAA,EAAe;AAE5C,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,iBAAA,EAAmB,CAAA,CAAE,oBAAA,EAAsB,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AAS,CAAA;AAAA,UAC7B,IAAA,EAAM,CAAA,CAAE,UAAA,CAAW,aAAa,CAAA;AAAA,UAChC,UAAU,QAAA,IAAY,UAAA;AAAA,UACtB,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,GAAW,CAAC,CAAA;AAAA,UACxC,OAAO,MAAA,CAAO,IAAA;AAAA,UACd,QAAQ,MAAA,CAAO,MAAA;AAAA,UACf,cAAA,EAAgB,CAAA;AAAA,UAChB,QAAQ,cAAA,CAAe;AAAA;AAAA,OACzB;AAAA,sBACAA,GAAAA;AAAA,QAAC,SAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,CAAA,CAAE,UAAA,CAAW,SAAS,CAAA;AAAA,UAC7B,IAAA,EAAM,CAAA,CAAE,UAAA,CAAW,aAAa,CAAA;AAAA,UAChC,UAAU,QAAA,IAAY,QAAA;AAAA,UACtB,OAAA,EAAS,MAAM,YAAA,CAAa,QAAA,GAAW,CAAC,CAAA;AAAA,UACxC,OAAO,MAAA,CAAO,IAAA;AAAA,UACd,QAAQ,MAAA,CAAO,MAAA;AAAA,UACf,cAAA,EAAgB,CAAA;AAAA,UAChB,QAAQ,cAAA,CAAe;AAAA;AAAA;AACzB,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"index.mjs","sourcesContent":["/**\n * StatCard — a single labelled metric tile (label + formatted numeric value).\n */\nimport React, { memo } from 'react';\n\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nconst CARD_PADDING = 16;\nconst CARD_BORDER_RADIUS = 12;\nconst CARD_BORDER_WIDTH = 1;\nconst LABEL_FONT_SIZE = 14;\nconst VALUE_FONT_SIZE = 28;\nconst VALUE_LINE_HEIGHT = 36;\n\nconst styles = StyleSheet.create({\n card: {\n padding: CARD_PADDING,\n borderRadius: CARD_BORDER_RADIUS,\n borderWidth: CARD_BORDER_WIDTH,\n },\n label: {\n fontSize: LABEL_FONT_SIZE,\n fontWeight: '500',\n },\n value: {\n fontSize: VALUE_FONT_SIZE,\n fontWeight: '700',\n lineHeight: VALUE_LINE_HEIGHT,\n },\n});\n\nexport interface StatCardProps {\n label: string;\n value: number;\n testID: string;\n}\n\nexport const StatCard = memo(({ label, value, testID }: StatCardProps): React.ReactElement => {\n const { theme, t } = useUi();\n const { colors } = theme;\n\n const formattedValue = value.toLocaleString();\n\n return (\n <View\n accessibilityHint={t('analytics.statHint', label)}\n accessibilityLabel={t('analytics.statCardLabel', label, formattedValue)}\n accessibilityRole=\"text\"\n style={[styles.card, { backgroundColor: colors.surface, borderColor: colors.border }]}\n testID={testID}\n >\n <Text style={[styles.label, { color: colors.textSecondary }]}>\n {label}\n </Text>\n <Text style={[styles.value, { color: colors.text }]}>\n {formattedValue}\n </Text>\n </View>\n );\n});\n\nStatCard.displayName = 'StatCard';\n\nexport default StatCard;\n","/**\n * Shared StyleSheet for the DataTable family. All colours are applied inline from\n * `useUi().theme` at render time — nothing here carries a colour literal.\n */\nimport { StyleSheet, type ViewStyle } from 'react-native';\n\nconst BORDER_WIDTH = 1;\nconst BORDER_RADIUS = 12;\nconst COLUMN_GAP = 16;\nconst ROW_PAD_H = 14;\nconst ROW_PAD_V = 12;\nconst HEAD_PAD_V = 11;\nconst STATE_PAD_V = 34;\nconst HEAD_FONT = 12;\nconst CELL_FONT = 14;\nconst STATE_FONT = 14;\nconst CARD_LINE_PAD_V = 3;\nconst CARD_LINE_GAP = 12;\nconst PILL_RADIUS = 999;\nconst PAGER_GAP = 8;\nconst PAGER_SIZE_GAP = 6;\nconst CONTROL_PAD_H = 12;\nconst CONTROL_PAD_V = 6;\nconst CONTROL_FONT = 13;\nconst RESULTS_FONT = 13;\nconst HEAD_LETTER_SPACING = 0.4;\nconst LABEL_LETTER_SPACING = 0.3;\nconst STICKY_Z = 2;\nconst FULL_WIDTH = '100%' as const;\n\n/**\n * `position: 'sticky'` is a react-native-web-only value that RN's `ViewStyle`\n * type does not enumerate. Cast through `unknown` (never `any`) so the sticky\n * header stays typed without an eslint `no-explicit-any` violation.\n */\nexport const STICKY_HEADER_STYLE = {\n position: 'sticky',\n top: 0,\n zIndex: STICKY_Z,\n} as unknown as ViewStyle;\n\nexport const tableStyles = StyleSheet.create({\n wrap: { borderWidth: BORDER_WIDTH, borderRadius: BORDER_RADIUS, overflow: 'hidden' },\n headRow: { flexDirection: 'row', columnGap: COLUMN_GAP, paddingHorizontal: ROW_PAD_H, paddingVertical: HEAD_PAD_V },\n headCell: { fontSize: HEAD_FONT, fontWeight: '600', letterSpacing: HEAD_LETTER_SPACING, textTransform: 'uppercase' },\n row: { flexDirection: 'row', columnGap: COLUMN_GAP, alignItems: 'center', paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n cell: { fontSize: CELL_FONT, fontWeight: '400' },\n numCell: { fontVariant: ['tabular-nums'], textAlign: 'right' },\n state: { paddingVertical: STATE_PAD_V, alignItems: 'center' },\n stateText: { fontSize: STATE_FONT },\n /** Full-width panel under an expanded row — spans every column (the wrap is a column flexbox). */\n rowDetail: { width: FULL_WIDTH, paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n card: { paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V, borderTopWidth: BORDER_WIDTH },\n cardLine: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'baseline', paddingVertical: CARD_LINE_PAD_V, gap: CARD_LINE_GAP },\n cardLabel: { fontSize: HEAD_FONT, fontWeight: '600', textTransform: 'uppercase', letterSpacing: LABEL_LETTER_SPACING },\n cardValue: { flexShrink: 1, alignItems: 'flex-end' },\n});\n\nexport const chromeStyles = StyleSheet.create({\n filters: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'flex-end', columnGap: COLUMN_GAP, rowGap: PAGER_GAP, borderWidth: BORDER_WIDTH, borderRadius: BORDER_RADIUS, paddingHorizontal: ROW_PAD_H, paddingVertical: ROW_PAD_V },\n filtersSpacer: { flexGrow: 1 },\n results: { fontSize: RESULTS_FONT },\n filtersActions: { flexDirection: 'row', gap: PAGER_SIZE_GAP, alignItems: 'center' },\n pager: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'space-between', gap: PAGER_GAP },\n pagerInfo: { fontSize: CONTROL_FONT, fontVariant: ['tabular-nums'] },\n pagerNav: { flexDirection: 'row', alignItems: 'center', gap: PAGER_SIZE_GAP, flexWrap: 'wrap' },\n pagerRowsLabel: { fontSize: HEAD_FONT, textTransform: 'uppercase', letterSpacing: LABEL_LETTER_SPACING },\n sizeGroup: { flexDirection: 'row', gap: PAGER_SIZE_GAP, alignItems: 'center' },\n control: { paddingHorizontal: CONTROL_PAD_H, paddingVertical: CONTROL_PAD_V, borderRadius: BORDER_RADIUS, borderWidth: BORDER_WIDTH },\n controlText: { fontSize: CONTROL_FONT, fontWeight: '600' },\n sizePill: { paddingHorizontal: CONTROL_PAD_H, paddingVertical: CONTROL_PAD_V, borderRadius: PILL_RADIUS, borderWidth: BORDER_WIDTH },\n sizePillText: { fontSize: HEAD_FONT, fontWeight: '600', fontVariant: ['tabular-nums'] },\n});\n","/**\n * The DataTable's cell renderers, shared by BOTH branches (desktop grid + card-stack).\n *\n * Every style array here ends with the consumer's `styleOverrides` slot so an override\n * beats the base StyleSheet AND the inline theme colour (colours are never in the\n * StyleSheet in this kit — they are applied inline at render time).\n */\nimport React from 'react';\nimport { Text, View } from 'react-native';\n\nimport { tableStyles as s } from './styles';\nimport type { DataTableColumn, DataTableStyleOverrides } from './types';\n\n/** The subset of the override slots a cell can consume. */\nexport type CellStyleOverrides = Pick<DataTableStyleOverrides, 'cell' | 'numCell'>;\n\n/**\n * A column's rendered content, safe to place inside a `<View>`.\n *\n * A bare string/number child of a `<View>` warns on RN-web (\"Unexpected text node\")\n * and THROWS on real React Native — and these apps ship as native, so raw text must\n * always be wrapped in `<Text>`. Used by BOTH the desktop cell and the card-stack\n * value (the stacked branch previously rendered `col.render(row)` unwrapped).\n */\nexport function cellContent<T>(\n column: DataTableColumn<T>,\n row: T,\n textColor: string,\n overrides?: CellStyleOverrides,\n): React.ReactNode {\n const content = column.render(row);\n if (typeof content === 'string' || typeof content === 'number') {\n return (\n <Text\n style={[\n s.cell,\n column.numeric ? s.numCell : null,\n { color: textColor },\n overrides?.cell,\n column.numeric ? overrides?.numCell : null,\n ]}\n >\n {content}\n </Text>\n );\n }\n return content;\n}\n\ninterface DesktopCellProps<T> {\n column: DataTableColumn<T>;\n row: T;\n textColor: string;\n testID: string;\n styleOverrides?: CellStyleOverrides;\n}\n\n/** A single desktop cell — renders `col.render(row)` exactly ONCE (POC bug fix). */\nexport function DesktopCell<T>({ column, row, textColor, testID, styleOverrides }: DesktopCellProps<T>): React.ReactElement {\n return (\n <View style={{ flex: column.weight ?? 1, alignItems: column.numeric ? 'flex-end' : 'flex-start' }} testID={testID}>\n {cellContent(column, row, textColor, styleOverrides)}\n </View>\n );\n}\n","/**\n * Shared constants for the DataTable family (DataTable / FilterBar / Pager).\n * Keeps every literal (test ids, i18n keys, layout numbers) in one place so the\n * components hold no magic numbers and no ad-hoc strings.\n */\n\n/** Default breakpoint (px): below this a row collapses to a label:value card. */\nexport const CARD_STACK_BREAKPOINT = 640;\n\n/** Default rows-per-page choices, matching the vanilla console's GRID.md pager. */\nexport const DEFAULT_PAGE_SIZE_OPTIONS: readonly number[] = [25, 50, 100, 200];\n\n/** Stable test ids so consumers/e2e can target the shared chrome. */\nexport const TABLE_TEST_IDS = {\n root: 'ui-data-table',\n head: 'ui-data-table-head',\n /** Infix of a row's test id: `${tableTestID}-row-${key}`. */\n rowInfix: 'row',\n /** Infix of an expanded row's detail panel: `${tableTestID}-row-detail-${key}`. */\n rowDetailInfix: 'row-detail',\n filterBar: 'ui-filters',\n results: 'ui-results',\n pager: 'ui-pager',\n pagerInfo: 'ui-pager-info',\n pagerPrev: 'ui-pager-prev',\n pagerNext: 'ui-pager-next',\n} as const;\n\n/** The test id of a row: `${tableTestID}-row-${key}` (key from `keyExtractor`). */\nexport const rowTestID = (tableTestID: string, key: string): string =>\n `${tableTestID}-${TABLE_TEST_IDS.rowInfix}-${key}`;\n\n/**\n * The test id of an expanded row's full-width detail panel:\n * `${tableTestID}-row-detail-${key}` (key from `keyExtractor`). Exported so\n * consumers and e2e specs target the panel without re-deriving the shape.\n */\nexport const rowDetailTestID = (tableTestID: string, key: string): string =>\n `${tableTestID}-${TABLE_TEST_IDS.rowDetailInfix}-${key}`;\n\n/**\n * Translation keys for every component-authored, user-facing string. Apps map\n * these in their UiProvider `t` (FM); the neutral default `t` returns the key, so\n * a host that forgets a key degrades to the key rather than a hardcoded literal.\n */\nexport const TABLE_I18N = {\n loading: 'uiTables.loading',\n empty: 'uiTables.empty',\n rowLabel: 'uiTables.rowLabel',\n rowHint: 'uiTables.rowHint',\n /** Accessible name of the full-width detail panel under an expanded row. */\n rowDetail: 'uiTables.rowDetail',\n results: 'uiTables.results',\n pagerInfo: 'uiTables.pager.info',\n pagerPrev: 'uiTables.pager.prev',\n pagerNext: 'uiTables.pager.next',\n pagerPrevHint: 'uiTables.pager.prevHint',\n pagerNextHint: 'uiTables.pager.nextHint',\n pagerRows: 'uiTables.pager.rows',\n pagerRowsOptionHint: 'uiTables.pager.rowsOptionHint',\n} as const;\n","/**\n * DataTable — the shared, tokenized RN-web grid for every dloizides.com surface\n * (and the future AML v2 portal). Promoted from the POC draft; completes the\n * `wwwroot/shared/GRID.md` behavioural contract in the RN idiom:\n *\n * - columns + rows API (unchanged from the POC — it is the right shape).\n * - sticky header (`stickyHeader`), zebra striping (`zebra`), per-row tint.\n * - a responsive label:value **card-stack** below `stackBreakpoint` via\n * `useWindowDimensions` (the CSS `data-label` card-stack does not port).\n * Pass `stackBreakpoint={0}` to keep the desktop grid at every width.\n * - per-row `testID` + `accessibilityLabel`/`accessibilityHint` (kit standard).\n * - optional CONTROLLED expandable rows: `renderRowDetail` + `expandedRowKeys`\n * render a full-width detail panel between an expanded row and the next\n * (desktop and card-stack alike). Omit both and the table renders exactly as\n * it did before the feature existed.\n * - optional per-slot `styleOverrides`, merged LAST so a consumer that needs to be\n * pixel-perfect beats both the base StyleSheet and the inline theme colour. The\n * shared defaults never change for anyone who does not opt in.\n * - every colour from `useUi().theme`; every component-authored string via `t`.\n */\nimport React, { useCallback } from 'react';\nimport { Pressable, Text, View, useWindowDimensions } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { DesktopCell, cellContent } from './cells';\nimport { CARD_STACK_BREAKPOINT, TABLE_I18N, TABLE_TEST_IDS, rowDetailTestID, rowTestID } from './constants';\nimport { STICKY_HEADER_STYLE, tableStyles as s } from './styles';\nimport type { DataTableProps } from './types';\n\nconst FIRST_ROW_INDEX = 0;\n\n/**\n * The a11y props spread onto a row. The expanded state is emitted only when the\n * table is expandable, and via BOTH spellings: `accessibilityState` (RN native)\n * and `aria-expanded` (react-native-web ≥ 0.19 no longer maps the legacy prop).\n */\ninterface RowA11y {\n accessibilityLabel: string;\n accessibilityHint: string;\n accessibilityRole: 'button' | 'text';\n accessibilityState?: { expanded: boolean };\n 'aria-expanded'?: boolean;\n}\n\nexport function DataTable<T>(props: DataTableProps<T>): React.ReactElement {\n const {\n columns, rows, keyExtractor, rowTint, zebra, stickyHeader, onRowPress,\n getRowAccessibilityLabel, loading, loadingLabel, emptyLabel,\n renderRowDetail, expandedRowKeys, styleOverrides: o,\n stackBreakpoint = CARD_STACK_BREAKPOINT, testID = TABLE_TEST_IDS.root,\n } = props;\n\n const { theme, t } = useUi();\n const { colors } = theme;\n const { width } = useWindowDimensions();\n const stacked = width < stackBreakpoint;\n const frame = { backgroundColor: colors.surface, borderColor: colors.border };\n\n const rowBackground = useCallback(\n (row: T, index: number): string | undefined => {\n const tint = rowTint?.(row);\n if (tint) return tint;\n return zebra && index % 2 === 1 ? colors.background : undefined;\n },\n [rowTint, zebra, colors.background],\n );\n\n /** Loading / empty share the frame + centred state block. */\n const stateView = (label: string): React.ReactElement => (\n <View style={[s.wrap, frame, o?.wrap]} testID={testID}>\n <View style={[s.state, o?.state]}>\n <Text style={[s.stateText, { color: colors.textSecondary }, o?.stateText]}>{label}</Text>\n </View>\n </View>\n );\n\n if (loading) return stateView(loadingLabel ?? t(TABLE_I18N.loading));\n if (rows.length === 0) return stateView(emptyLabel ?? t(TABLE_I18N.empty));\n\n const rowID = (key: string): string => rowTestID(testID, key);\n const isExpandable = renderRowDetail !== undefined;\n const isExpanded = (key: string): boolean => isExpandable && (expandedRowKeys?.includes(key) ?? false);\n\n const rowA11y = (row: T, key: string): RowA11y => ({\n accessibilityLabel: getRowAccessibilityLabel?.(row) ?? t(TABLE_I18N.rowLabel),\n accessibilityHint: t(TABLE_I18N.rowHint),\n accessibilityRole: onRowPress ? 'button' : 'text',\n // Only an expandable table announces expanded/collapsed — a plain table's rows\n // keep exactly the props they had before this feature existed.\n ...(isExpandable ? { accessibilityState: { expanded: isExpanded(key) }, 'aria-expanded': isExpanded(key) } : null),\n });\n\n /**\n * Pairs a rendered row with its detail panel when that row is expanded. When\n * `renderRowDetail` is omitted the row element is returned untouched (no extra\n * wrapper, no extra node) — omitting the props is a no-op on the output.\n */\n const withRowDetail = (rowNode: React.ReactElement, row: T, key: string): React.ReactElement => {\n if (!isExpandable || !isExpanded(key)) return rowNode;\n return (\n <React.Fragment key={key}>\n {rowNode}\n <View\n accessibilityLabel={t(TABLE_I18N.rowDetail)}\n accessibilityRole=\"summary\"\n style={[s.rowDetail, { borderTopColor: colors.border, backgroundColor: colors.background }, o?.rowDetail]}\n testID={rowDetailTestID(testID, key)}\n >\n {renderRowDetail(row)}\n </View>\n </React.Fragment>\n );\n };\n\n // --- mobile: label:value card-stack (GRID.md). Disabled by `stackBreakpoint={0}`. ---\n if (stacked) {\n return (\n <View style={[s.wrap, frame, o?.wrap]} testID={testID}>\n {rows.map((row, i) => {\n const key = keyExtractor(row);\n const bg = rowBackground(row, i);\n return withRowDetail(\n <Pressable\n key={key}\n testID={rowID(key)}\n disabled={!onRowPress}\n onPress={onRowPress ? () => onRowPress(row) : undefined}\n {...rowA11y(row, key)}\n style={[s.card, { borderTopColor: colors.border }, i === FIRST_ROW_INDEX ? { borderTopWidth: 0 } : null, bg ? { backgroundColor: bg } : null, o?.card]}\n >\n {columns.map((col) => (\n <View key={col.key} style={[s.cardLine, o?.cardLine]}>\n <Text style={[s.cardLabel, { color: colors.textSecondary }, o?.cardLabel]}>{col.header}</Text>\n <View style={[s.cardValue, o?.cardValue]}>{cellContent(col, row, colors.text, o)}</View>\n </View>\n ))}\n </Pressable>,\n row,\n key,\n );\n })}\n </View>\n );\n }\n\n // --- desktop: header + rows ---\n return (\n <View style={[s.wrap, frame, o?.wrap]} testID={testID}>\n <View\n testID={TABLE_TEST_IDS.head}\n style={[s.headRow, { backgroundColor: colors.background }, stickyHeader ? STICKY_HEADER_STYLE : null, o?.headRow]}\n >\n {columns.map((col) => (\n <Text\n key={col.key}\n style={[s.headCell, { color: colors.textSecondary, flex: col.weight ?? 1, textAlign: col.numeric ? 'right' : 'left' }, o?.headCell]}\n >\n {col.header}\n </Text>\n ))}\n </View>\n {rows.map((row, i) => {\n const key = keyExtractor(row);\n const bg = rowBackground(row, i);\n return withRowDetail(\n <Pressable\n key={key}\n testID={rowID(key)}\n disabled={!onRowPress}\n onPress={onRowPress ? () => onRowPress(row) : undefined}\n {...rowA11y(row, key)}\n style={[s.row, { borderTopColor: colors.border }, bg ? { backgroundColor: bg } : null, o?.row]}\n >\n {columns.map((col) => (\n <DesktopCell key={col.key} column={col} row={row} textColor={colors.text} testID={`${rowID(key)}-${col.key}`} styleOverrides={o} />\n ))}\n </Pressable>,\n row,\n key,\n );\n })}\n </View>\n );\n}\n\nexport default DataTable;\n","/**\n * FilterBar — the shared filter-bar shell from GRID.md (`.ui-filters`): a themed,\n * wrapping row that holds the caller's filter fields, an optional live results\n * count (`<b>N</b> results`) and an optional actions slot (Apply / Export …).\n * Layout + theming only — the fields themselves come from the app (or @dloizides/\n * ui-forms), keeping this reusable across every grid rather than coverage-specific.\n */\nimport React from 'react';\nimport { Text, View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { TABLE_I18N, TABLE_TEST_IDS } from './constants';\nimport { chromeStyles as c } from './styles';\n\nconst RESULTS_COUNT_WEIGHT = '700' as const;\n\n/**\n * Per-slot style overrides for the FilterBar, merged **LAST** into each slot's style\n * array so the consumer always wins — over the base StyleSheet AND over the inline\n * colours taken from `useUi().theme`. Omit for the shared defaults (nothing changes).\n */\nexport interface FilterBarStyleOverrides {\n /** The bordered, rounded filter shell. */\n filters?: StyleProp<ViewStyle>;\n /** The flex spacer that pushes the count + actions right. */\n filtersSpacer?: StyleProp<ViewStyle>;\n /** The `<b>N</b> results` count line. */\n results?: StyleProp<TextStyle>;\n /** The right-aligned actions cluster. */\n filtersActions?: StyleProp<ViewStyle>;\n}\n\nexport interface FilterBarProps {\n /** The filter fields (labels + inputs), supplied by the app / ui-forms. */\n children?: React.ReactNode;\n /** Live count shown as `<b>{resultsCount}</b> {results}`. Omit to hide. */\n resultsCount?: number;\n /** Overrides the kit's translated \"results\" word (pass an app-translated string). */\n resultsLabel?: string;\n /** Right-aligned action buttons (Apply, Export CSV, …). */\n actions?: React.ReactNode;\n /**\n * Per-slot style overrides, merged LAST so the consumer always wins — including over\n * the inline theme colours. Omit for the shared defaults.\n */\n styleOverrides?: FilterBarStyleOverrides;\n testID?: string;\n}\n\nexport function FilterBar({\n children,\n resultsCount,\n resultsLabel,\n actions,\n styleOverrides: o,\n testID = TABLE_TEST_IDS.filterBar,\n}: FilterBarProps): React.ReactElement {\n const { theme, t } = useUi();\n const { colors } = theme;\n const word = resultsLabel ?? t(TABLE_I18N.results);\n\n return (\n <View style={[c.filters, { backgroundColor: colors.surface, borderColor: colors.border }, o?.filters]} testID={testID}>\n {children}\n <View style={[c.filtersSpacer, o?.filtersSpacer]} />\n {typeof resultsCount === 'number' && (\n <Text style={[c.results, { color: colors.textSecondary }, o?.results]} testID={TABLE_TEST_IDS.results}>\n <Text style={{ color: colors.text, fontWeight: RESULTS_COUNT_WEIGHT }}>{resultsCount.toLocaleString()}</Text>\n {` ${word}`}\n </Text>\n )}\n {!!actions && <View style={[c.filtersActions, o?.filtersActions]}>{actions}</View>}\n </View>\n );\n}\n\nexport default FilterBar;\n","/**\n * Pager — the shared pagination control from GRID.md (`.ui-pager`): page-info on\n * the left (`from–to of N`), nav on the right (rows-per-page + Prev/Next). Sits ON\n * TOP of the grid (in the section header row), so every paged grid looks the same.\n * RN idiom: rows-per-page is a row of pressable pills (RN has no native `<select>`);\n * everything is themed from `useUi().theme` and labelled via the UiProvider `t`.\n */\nimport React from 'react';\nimport { Pressable, Text, View, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';\n\nimport { useUi } from '@dloizides/ui-feedback';\n\nimport { DEFAULT_PAGE_SIZE_OPTIONS, TABLE_I18N, TABLE_TEST_IDS } from './constants';\nimport { chromeStyles as c } from './styles';\n\nconst FIRST_PAGE = 1;\nconst EN_DASH = '–';\nconst DISABLED_OPACITY = 0.4;\nconst FULL_OPACITY = 1;\nconst TRANSPARENT = 'transparent';\n\n/**\n * Per-slot style overrides for the Pager, merged **LAST** into each slot's style array\n * so the consumer always wins — over the base StyleSheet AND over the inline colours\n * taken from `useUi().theme`. Omit for the shared defaults (nothing changes).\n */\nexport interface PagerStyleOverrides {\n /** The outer pager row. */\n pager?: StyleProp<ViewStyle>;\n /** The `from–to of N` count line. */\n pagerInfo?: StyleProp<TextStyle>;\n /** The right-hand nav cluster (rows-per-page + Prev/Next). */\n pagerNav?: StyleProp<ViewStyle>;\n /** The \"Rows\" caption before the size pills. */\n pagerRowsLabel?: StyleProp<TextStyle>;\n /** The rows-per-page pill group. */\n sizeGroup?: StyleProp<ViewStyle>;\n /** A Prev/Next button. */\n control?: StyleProp<ViewStyle>;\n /** A Prev/Next button's label. */\n controlText?: StyleProp<TextStyle>;\n /** A rows-per-page pill. */\n sizePill?: StyleProp<ViewStyle>;\n /** A rows-per-page pill's label. */\n sizePillText?: StyleProp<TextStyle>;\n}\n\nexport interface PagerProps {\n /** 1-based current page. */\n page: number;\n /** Rows per page. */\n pageSize: number;\n /** Total row count across all pages. */\n total: number;\n onPageChange: (page: number) => void;\n onPageSizeChange: (pageSize: number) => void;\n /** Rows-per-page choices. Default 25 / 50 / 100 / 200. */\n pageSizeOptions?: readonly number[];\n /**\n * Optional, already-translated unit noun appended to the count line, e.g.\n * `\"leadership terms\"` renders `1–50 of 3,023 leadership terms`. When omitted the\n * count line stays the generic `from–to of N` (byte-identical to prior behaviour).\n */\n unitLabel?: string;\n /**\n * Per-slot style overrides, merged LAST so the consumer always wins — including over\n * the inline theme colours. Omit for the shared defaults.\n */\n styleOverrides?: PagerStyleOverrides;\n testID?: string;\n}\n\ninterface NavButtonProps {\n label: string;\n hint: string;\n disabled: boolean;\n onPress: () => void;\n color: string;\n border: string;\n testID: string;\n styleOverrides?: Pick<PagerStyleOverrides, 'control' | 'controlText'>;\n}\n\nfunction NavButton({ label, hint, disabled, onPress, color, border, testID, styleOverrides: o }: NavButtonProps): React.ReactElement {\n return (\n <Pressable\n testID={testID}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n accessibilityHint={hint}\n accessibilityState={{ disabled }}\n disabled={disabled}\n onPress={onPress}\n style={[c.control, { borderColor: border, opacity: disabled ? DISABLED_OPACITY : FULL_OPACITY }, o?.control]}\n >\n <Text style={[c.controlText, { color }, o?.controlText]}>{label}</Text>\n </Pressable>\n );\n}\n\nexport function Pager({\n page,\n pageSize,\n total,\n onPageChange,\n onPageSizeChange,\n pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,\n unitLabel,\n styleOverrides: o,\n testID = TABLE_TEST_IDS.pager,\n}: PagerProps): React.ReactElement {\n const { theme, t } = useUi();\n const { colors, palette } = theme;\n const brand = palette.primary['500'];\n\n const lastPage = Math.max(FIRST_PAGE, Math.ceil(total / pageSize));\n const safePage = Math.min(Math.max(page, FIRST_PAGE), lastPage);\n const from = total === 0 ? 0 : (safePage - 1) * pageSize + 1;\n const to = Math.min(safePage * pageSize, total);\n const count = `${from.toLocaleString()}${EN_DASH}${to.toLocaleString()} ${t(TABLE_I18N.pagerInfo)} ${total.toLocaleString()}`;\n const hasUnit = unitLabel !== undefined && unitLabel !== '';\n const info = hasUnit ? `${count} ${unitLabel}` : count;\n\n return (\n <View style={[c.pager, o?.pager]} testID={testID}>\n <Text style={[c.pagerInfo, { color: colors.textSecondary }, o?.pagerInfo]} testID={TABLE_TEST_IDS.pagerInfo}>{info}</Text>\n <View style={[c.pagerNav, o?.pagerNav]}>\n <Text style={[c.pagerRowsLabel, { color: colors.textSecondary }, o?.pagerRowsLabel]}>{t(TABLE_I18N.pagerRows)}</Text>\n <View style={[c.sizeGroup, o?.sizeGroup]}>\n {pageSizeOptions.map((size) => {\n const active = size === pageSize;\n return (\n <Pressable\n key={size}\n testID={`${testID}-size-${size}`}\n accessibilityRole=\"button\"\n accessibilityLabel={String(size)}\n accessibilityHint={t(TABLE_I18N.pagerRowsOptionHint)}\n accessibilityState={{ selected: active }}\n onPress={() => onPageSizeChange(size)}\n style={[c.sizePill, { borderColor: active ? brand : colors.border, backgroundColor: active ? brand : TRANSPARENT }, o?.sizePill]}\n >\n <Text style={[c.sizePillText, { color: active ? colors.surface : colors.textSecondary }, o?.sizePillText]}>{size}</Text>\n </Pressable>\n );\n })}\n </View>\n <NavButton\n label={t(TABLE_I18N.pagerPrev)}\n hint={t(TABLE_I18N.pagerPrevHint)}\n disabled={safePage <= FIRST_PAGE}\n onPress={() => onPageChange(safePage - 1)}\n color={colors.text}\n border={colors.border}\n styleOverrides={o}\n testID={TABLE_TEST_IDS.pagerPrev}\n />\n <NavButton\n label={t(TABLE_I18N.pagerNext)}\n hint={t(TABLE_I18N.pagerNextHint)}\n disabled={safePage >= lastPage}\n onPress={() => onPageChange(safePage + 1)}\n color={colors.text}\n border={colors.border}\n styleOverrides={o}\n testID={TABLE_TEST_IDS.pagerNext}\n />\n </View>\n </View>\n );\n}\n\nexport default Pager;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dloizides/ui-tables",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Themable, brand-agnostic React Native (RN-web) table/stat components for the dloizides.com portfolio. Starts with StatCard; DataTable/StatGrid join when a 2nd consumer appears. Shares the @dloizides/ui-feedback UI context.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|