@xsolla/xui-table 0.151.0-pr273.1778117489 → 0.153.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/native/index.d.mts +11 -1
- package/native/index.d.ts +11 -1
- package/native/index.js +14 -0
- package/native/index.js.map +1 -1
- package/native/index.mjs +14 -0
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.d.mts +11 -1
- package/web/index.d.ts +11 -1
- package/web/index.js +14 -0
- package/web/index.js.map +1 -1
- package/web/index.mjs +14 -0
- package/web/index.mjs.map +1 -1
package/native/index.d.mts
CHANGED
|
@@ -76,7 +76,11 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
76
76
|
selected?: boolean;
|
|
77
77
|
/** Hide the bottom divider for this row. */
|
|
78
78
|
hideDivider?: boolean;
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Click handler. When provided, the row becomes interactive: it gains
|
|
81
|
+
* `tabIndex={0}` so it's reachable via keyboard, and Enter/Space
|
|
82
|
+
* activate it (mirroring native button behavior).
|
|
83
|
+
*/
|
|
80
84
|
onPress?: () => void;
|
|
81
85
|
/**
|
|
82
86
|
* Optional focus events. The Row uses these internally to track
|
|
@@ -86,6 +90,12 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
86
90
|
*/
|
|
87
91
|
onFocus?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
88
92
|
onBlur?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Optional key handler. When `onPress` is set, the Row also listens for
|
|
95
|
+
* Enter/Space to activate. Consumer handlers are invoked first; if they
|
|
96
|
+
* call `preventDefault`, the Row does not activate.
|
|
97
|
+
*/
|
|
98
|
+
onKeyDown?: (e: React.KeyboardEvent<Element>) => void;
|
|
89
99
|
}
|
|
90
100
|
interface TableCellProps extends Omit<BoxProps, "position">, ThemeOverrideProps {
|
|
91
101
|
children?: ReactNode;
|
package/native/index.d.ts
CHANGED
|
@@ -76,7 +76,11 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
76
76
|
selected?: boolean;
|
|
77
77
|
/** Hide the bottom divider for this row. */
|
|
78
78
|
hideDivider?: boolean;
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Click handler. When provided, the row becomes interactive: it gains
|
|
81
|
+
* `tabIndex={0}` so it's reachable via keyboard, and Enter/Space
|
|
82
|
+
* activate it (mirroring native button behavior).
|
|
83
|
+
*/
|
|
80
84
|
onPress?: () => void;
|
|
81
85
|
/**
|
|
82
86
|
* Optional focus events. The Row uses these internally to track
|
|
@@ -86,6 +90,12 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
86
90
|
*/
|
|
87
91
|
onFocus?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
88
92
|
onBlur?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Optional key handler. When `onPress` is set, the Row also listens for
|
|
95
|
+
* Enter/Space to activate. Consumer handlers are invoked first; if they
|
|
96
|
+
* call `preventDefault`, the Row does not activate.
|
|
97
|
+
*/
|
|
98
|
+
onKeyDown?: (e: React.KeyboardEvent<Element>) => void;
|
|
89
99
|
}
|
|
90
100
|
interface TableCellProps extends Omit<BoxProps, "position">, ThemeOverrideProps {
|
|
91
101
|
children?: ReactNode;
|
package/native/index.js
CHANGED
|
@@ -463,6 +463,7 @@ var TableRow = (0, import_react.forwardRef)(
|
|
|
463
463
|
onMouseLeave,
|
|
464
464
|
onFocus,
|
|
465
465
|
onBlur,
|
|
466
|
+
onKeyDown,
|
|
466
467
|
...props
|
|
467
468
|
}, ref) => {
|
|
468
469
|
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
@@ -507,6 +508,17 @@ var TableRow = (0, import_react.forwardRef)(
|
|
|
507
508
|
},
|
|
508
509
|
[onBlur]
|
|
509
510
|
);
|
|
511
|
+
const handleKeyDown = (0, import_react.useCallback)(
|
|
512
|
+
(e) => {
|
|
513
|
+
onKeyDown?.(e);
|
|
514
|
+
if (!onPress || e.defaultPrevented) return;
|
|
515
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
516
|
+
e.preventDefault();
|
|
517
|
+
onPress();
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
[onKeyDown, onPress]
|
|
521
|
+
);
|
|
510
522
|
const baseBg = selected ? theme.colors.background.secondary : theme.colors.background.primary;
|
|
511
523
|
const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;
|
|
512
524
|
const rowPaddingHorizontal = isHeaderRow ? sizing.headerRowPaddingHorizontal : sizing.rowPaddingHorizontal;
|
|
@@ -527,12 +539,14 @@ var TableRow = (0, import_react.forwardRef)(
|
|
|
527
539
|
hoverStyle: hoverable ? { backgroundColor: theme.colors.background.secondary } : void 0,
|
|
528
540
|
onPress,
|
|
529
541
|
role: "row",
|
|
542
|
+
tabIndex: onPress ? 0 : void 0,
|
|
530
543
|
"aria-selected": selected || void 0,
|
|
531
544
|
onMouseEnter: handleMouseEnter,
|
|
532
545
|
onMouseLeave: handleMouseLeave,
|
|
533
546
|
onFocus: handleFocus,
|
|
534
547
|
onBlur: handleBlur,
|
|
535
548
|
...props,
|
|
549
|
+
onKeyDown: handleKeyDown,
|
|
536
550
|
style,
|
|
537
551
|
children
|
|
538
552
|
}
|
package/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/Table.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx"],"sourcesContent":["export * from \"./Table\";\nexport * from \"./types\";\n","import React, {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, isNative } from \"@xsolla/xui-core\";\nimport { Sort } from \"@xsolla/xui-icons-base\";\nimport {\n TableBodyProps,\n TableCaptionProps,\n TableCellProps,\n TableFooterProps,\n TableHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from \"./types\";\n\n/**\n * Tracks which rowgroup the current <Table.Row> sits inside, so the row can\n * pick the right sizing (header rows are slightly taller / styled\n * differently per `theme.sizing.table`).\n */\ntype RowGroup = \"header\" | \"body\";\nconst TableRowGroupContext = createContext<RowGroup>(\"body\");\n\n/**\n * Tracks whether the parent <Table.Row> is hovered or has focus inside it.\n * Cells that opt into `revealOnHover` read this to decide whether to show\n * their content. Defaults to `true` so cells used outside a row (e.g. inside\n * <Table.Header>) are always visible.\n */\nconst RowRevealContext = createContext<{ revealed: boolean }>({\n revealed: true,\n});\n\n/**\n * Detects whether the device is hover-capable (desktop) vs touch-only (mobile).\n * On touch-only devices we always reveal action cells so they can be tapped —\n * matching the Figma spec (\"Right cell actions ... always visible on touch\n * devices\"). SSR-safe: returns `true` until mounted, which means actions stay\n * revealed on the server (no flash-of-hidden-actions on first paint).\n *\n * Table is web-only for now — on native this hook short-circuits and never\n * runs the media query.\n */\nconst useHoverCapable = (): boolean => {\n const [hoverCapable, setHoverCapable] = useState(true);\n useEffect(() => {\n if (isNative) return;\n if (typeof window === \"undefined\" || !window.matchMedia) return;\n const mq = window.matchMedia(\"(hover: hover)\");\n setHoverCapable(mq.matches);\n const onChange = (e: MediaQueryListEvent) => setHoverCapable(e.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n return hoverCapable;\n};\n\nconst Divider: React.FC<{ color: string }> = ({ color }) => (\n <Box\n width=\"100%\"\n height={1}\n backgroundColor={color}\n style={{ flexShrink: 0 }}\n />\n);\n\nconst TableRoot = forwardRef<any, TableProps>(\n ({ children, themeMode, themeProductContext }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n gap={sizing.containerGap}\n paddingVertical={sizing.containerPaddingVertical}\n backgroundColor={theme.colors.background.primary}\n borderRadius={sizing.containerRadius}\n width=\"100%\"\n role=\"table\"\n style={{\n color: theme.colors.content.primary,\n overflow: \"clip\",\n }}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableRoot.displayName = \"Table\";\n\nconst TableCaption = forwardRef<any, TableCaptionProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={sizing.headerRowPaddingHorizontal}\n width=\"100%\"\n // <caption> isn't a valid ARIA role; consumers can pass role=\"region\"\n // + aria-label via ...props if they want it announced.\n {...props}\n style={style}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n color={theme.colors.content.secondary}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCaption.displayName = \"Table.Caption\";\n\nconst TableHeader = forwardRef<any, TableHeaderProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n return (\n <TableRowGroupContext.Provider value=\"header\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n position: \"sticky\",\n top: 0,\n zIndex: 1,\n backgroundColor: theme.colors.background.primary,\n ...style,\n }}\n >\n {children}\n <Divider color={theme.colors.border.secondary} />\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableHeader.displayName = \"Table.Header\";\n\nconst TableBody = forwardRef<any, TableBodyProps>(\n (\n { children, style, minRows, themeMode, themeProductContext, ...props },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n // Each row paints a 1px divider after it (rendered as a sibling Box\n // inside Table.Row), except the very last row in the body which\n // hides its divider. So a fully filled body of N rows is\n // `N × rowHeight + (N - 1) × 1px`.\n const DIVIDER_HEIGHT = 1;\n const computedMinHeight = minRows\n ? minRows * sizing.rowHeight + (minRows - 1) * DIVIDER_HEIGHT\n : undefined;\n\n // Decide whether to auto-pad with placeholder slots. We only pad\n // when every direct child is a <Table.Row>; consumers using a\n // single non-row block (e.g. a custom \"no results\" panel) get just\n // the reserved min-height so they can stretch their content to fill.\n let renderedChildren: ReactNode = children;\n if (minRows) {\n const childArray = React.Children.toArray(children);\n const hasOnlyRowChildren =\n childArray.length > 0 &&\n childArray.every((c) => React.isValidElement(c) && c.type === TableRow);\n const realRowCount = hasOnlyRowChildren ? childArray.length : 0;\n const placeholderCount = hasOnlyRowChildren\n ? Math.max(0, minRows - realRowCount)\n : 0;\n\n if (placeholderCount > 0) {\n // Override the last real row's `hideDivider` so the body always\n // ends with a divider-less slot — matching how a full page hides\n // the last row's divider.\n const patchedRows = childArray.map((child, i) => {\n if (!React.isValidElement(child)) return child;\n const isLastRealRow = i === realRowCount - 1;\n return React.cloneElement(child, {\n hideDivider: isLastRealRow\n ? false\n : (child.props as any).hideDivider,\n } as any);\n });\n\n const placeholders = Array.from({ length: placeholderCount }).map(\n (_, i) => {\n const isLast = i === placeholderCount - 1;\n return (\n <Box\n key={`__table-body-placeholder-${i}`}\n aria-hidden\n style={{\n height: isLast\n ? sizing.rowHeight\n : sizing.rowHeight + DIVIDER_HEIGHT,\n flexShrink: 0,\n }}\n />\n );\n }\n );\n\n renderedChildren = (\n <>\n {patchedRows}\n {placeholders}\n </>\n );\n }\n }\n\n return (\n <TableRowGroupContext.Provider value=\"body\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n ...(computedMinHeight !== undefined && {\n minHeight: computedMinHeight,\n }),\n ...style,\n }}\n >\n {renderedChildren}\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableBody.displayName = \"Table.Body\";\n\nconst TableRow = forwardRef<any, TableRowProps>(\n (\n {\n children,\n hoverable: hoverableProp,\n selected,\n hideDivider: hideDividerProp,\n onPress,\n themeMode,\n themeProductContext,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const rowGroup = useContext(TableRowGroupContext);\n const hoverCapable = useHoverCapable();\n\n const isHeaderRow = rowGroup === \"header\";\n\n // Header rows are not hoverable by default and don't render a divider\n // (Header already paints its own top/bottom dividers).\n const hoverable = hoverableProp ?? !isHeaderRow;\n const hideDivider = hideDividerProp ?? isHeaderRow;\n\n // Track hover + focus-within so descendant <Table.Cell revealOnHover>\n // cells can decide whether to show themselves. Single re-render per\n // hover/focus change, scoped to this row only.\n const [hovered, setHovered] = useState(false);\n const [focusedWithin, setFocusedWithin] = useState(false);\n\n // On touch-only devices the reveal logic short-circuits to \"always\n // visible\" — matches the Figma spec.\n const revealed = hoverCapable ? hovered || focusedWithin : true;\n\n const handleMouseEnter = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(true);\n onMouseEnter?.(e);\n },\n [onMouseEnter]\n );\n const handleMouseLeave = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(false);\n onMouseLeave?.(e);\n },\n [onMouseLeave]\n );\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n setFocusedWithin(true);\n onFocus?.(e);\n },\n [onFocus]\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n // When focus moves between two children of this row the blur fires\n // here but the row is still focus-within — keep the state truthy.\n if (\n e.relatedTarget instanceof Node &&\n e.currentTarget.contains(e.relatedTarget)\n ) {\n onBlur?.(e);\n return;\n }\n setFocusedWithin(false);\n onBlur?.(e);\n },\n [onBlur]\n );\n\n const baseBg = selected\n ? theme.colors.background.secondary\n : theme.colors.background.primary;\n\n const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;\n const rowPaddingHorizontal = isHeaderRow\n ? sizing.headerRowPaddingHorizontal\n : sizing.rowPaddingHorizontal;\n\n const ctxValue = useMemo(() => ({ revealed }), [revealed]);\n\n return (\n <RowRevealContext.Provider value={ctxValue}>\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n height={rowHeight}\n paddingHorizontal={rowPaddingHorizontal}\n width=\"100%\"\n gap={sizing.cellGap}\n backgroundColor={baseBg}\n cursor={onPress ? \"pointer\" : undefined}\n hoverStyle={\n hoverable\n ? { backgroundColor: theme.colors.background.secondary }\n : undefined\n }\n onPress={onPress}\n role=\"row\"\n aria-selected={selected || undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n style={style}\n >\n {children}\n </Box>\n {!hideDivider && <Divider color={theme.colors.border.secondary} />}\n </RowRevealContext.Provider>\n );\n }\n);\n\nTableRow.displayName = \"Table.Row\";\n\nconst positionToFlex = (position: TableCellProps[\"position\"]) => {\n switch (position) {\n case \"left\":\n return { flexShrink: 0 };\n case \"right\":\n return { flexShrink: 0, marginLeft: \"auto\" };\n default:\n return {};\n }\n};\n\nconst alignToJustify = (align: TableCellProps[\"align\"]) => {\n switch (align) {\n case \"right\":\n return \"flex-end\" as const;\n case \"center\":\n return \"center\" as const;\n default:\n return \"flex-start\" as const;\n }\n};\n\nconst TableCell = forwardRef<any, TableCellProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n revealOnHover,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const { revealed } = useContext(RowRevealContext);\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n\n // Per Figma spec: hide via opacity + pointer-events (NOT visibility) so\n // keyboard Tab still focuses the descendants. Focusing a descendant flips\n // `revealed` to true via RowRevealContext, restoring pointer-events.\n const revealStyle: React.CSSProperties =\n revealOnHover && !revealed\n ? { opacity: 0, pointerEvents: \"none\" }\n : revealOnHover\n ? { opacity: 1, transition: \"opacity 0.15s ease\" }\n : {};\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={8}\n height=\"100%\"\n width={width}\n role=\"cell\"\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...revealStyle,\n ...style,\n }}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.cellFontSize}\n lineHeight={sizing.cellLineHeight}\n color={theme.colors.content.primary}\n // truncation\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n maxWidth: \"100%\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCell.displayName = \"Table.Cell\";\n\n/**\n * Sort indicator. Uses the `Sort` line icon from `@xsolla/xui-icons-base`\n * (matches the Figma spec — a stacked up/down chevron). The icon is the\n * same in all three states; opacity differentiates \"sortable but not\n * active\" (`none`, 40%) from \"active sort\" (`ascending` / `descending`,\n * 100%). Direction is communicated to assistive tech via `aria-sort` on\n * the parent <Table.Head>.\n */\nconst SortIcon: React.FC<{\n direction: \"ascending\" | \"descending\" | \"none\";\n color: string;\n size: number;\n}> = ({ direction, color, size }) => (\n <Box\n style={{\n flexShrink: 0,\n opacity: direction === \"none\" ? 0.4 : 1,\n transition: \"opacity 0.15s ease\",\n }}\n >\n <Sort variant=\"line\" size={size} color={color} aria-hidden />\n </Box>\n);\n\nconst TableHead = forwardRef<any, TableHeadProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n sort,\n onSortToggle,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n const sortable = sort != null;\n\n const ariaSort: \"ascending\" | \"descending\" | \"none\" | undefined = sortable\n ? sort\n : undefined;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={sizing.headerCellGap}\n height=\"100%\"\n width={width}\n role=\"columnheader\"\n aria-sort={ariaSort}\n cursor={sortable ? \"pointer\" : undefined}\n onPress={sortable ? onSortToggle : undefined}\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...style,\n }}\n >\n {sortable && (\n <SortIcon\n direction={sort}\n color={theme.colors.content.secondary}\n size={sizing.headerCellFontSize + 2}\n />\n )}\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.headerCellFontSize}\n lineHeight={sizing.headerCellLineHeight}\n color={theme.colors.content.secondary}\n fontWeight=\"500\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableHead.displayName = \"Table.Head\";\n\nconst TableFooter = forwardRef<any, TableFooterProps>(\n ({ children, style, ...props }, ref) => {\n const { theme } = useResolvedTheme();\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizing.paginationGap}\n paddingHorizontal={sizing.paginationPaddingHorizontal}\n width=\"100%\"\n {...props}\n style={style}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableFooter.displayName = \"Table.Footer\";\n\nexport const Table = Object.assign(TableRoot, {\n Caption: TableCaption,\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Row: TableRow,\n Head: TableHead,\n Cell: TableCell,\n});\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBASO;;;ACRP,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/Table.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx"],"sourcesContent":["export * from \"./Table\";\nexport * from \"./types\";\n","import React, {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, isNative } from \"@xsolla/xui-core\";\nimport { Sort } from \"@xsolla/xui-icons-base\";\nimport {\n TableBodyProps,\n TableCaptionProps,\n TableCellProps,\n TableFooterProps,\n TableHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from \"./types\";\n\n/**\n * Tracks which rowgroup the current <Table.Row> sits inside, so the row can\n * pick the right sizing (header rows are slightly taller / styled\n * differently per `theme.sizing.table`).\n */\ntype RowGroup = \"header\" | \"body\";\nconst TableRowGroupContext = createContext<RowGroup>(\"body\");\n\n/**\n * Tracks whether the parent <Table.Row> is hovered or has focus inside it.\n * Cells that opt into `revealOnHover` read this to decide whether to show\n * their content. Defaults to `true` so cells used outside a row (e.g. inside\n * <Table.Header>) are always visible.\n */\nconst RowRevealContext = createContext<{ revealed: boolean }>({\n revealed: true,\n});\n\n/**\n * Detects whether the device is hover-capable (desktop) vs touch-only (mobile).\n * On touch-only devices we always reveal action cells so they can be tapped —\n * matching the Figma spec (\"Right cell actions ... always visible on touch\n * devices\"). SSR-safe: returns `true` until mounted, which means actions stay\n * revealed on the server (no flash-of-hidden-actions on first paint).\n *\n * Table is web-only for now — on native this hook short-circuits and never\n * runs the media query.\n */\nconst useHoverCapable = (): boolean => {\n const [hoverCapable, setHoverCapable] = useState(true);\n useEffect(() => {\n if (isNative) return;\n if (typeof window === \"undefined\" || !window.matchMedia) return;\n const mq = window.matchMedia(\"(hover: hover)\");\n setHoverCapable(mq.matches);\n const onChange = (e: MediaQueryListEvent) => setHoverCapable(e.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n return hoverCapable;\n};\n\nconst Divider: React.FC<{ color: string }> = ({ color }) => (\n <Box\n width=\"100%\"\n height={1}\n backgroundColor={color}\n style={{ flexShrink: 0 }}\n />\n);\n\nconst TableRoot = forwardRef<any, TableProps>(\n ({ children, themeMode, themeProductContext }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n gap={sizing.containerGap}\n paddingVertical={sizing.containerPaddingVertical}\n backgroundColor={theme.colors.background.primary}\n borderRadius={sizing.containerRadius}\n width=\"100%\"\n role=\"table\"\n style={{\n color: theme.colors.content.primary,\n overflow: \"clip\",\n }}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableRoot.displayName = \"Table\";\n\nconst TableCaption = forwardRef<any, TableCaptionProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={sizing.headerRowPaddingHorizontal}\n width=\"100%\"\n // <caption> isn't a valid ARIA role; consumers can pass role=\"region\"\n // + aria-label via ...props if they want it announced.\n {...props}\n style={style}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n color={theme.colors.content.secondary}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCaption.displayName = \"Table.Caption\";\n\nconst TableHeader = forwardRef<any, TableHeaderProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n return (\n <TableRowGroupContext.Provider value=\"header\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n position: \"sticky\",\n top: 0,\n zIndex: 1,\n backgroundColor: theme.colors.background.primary,\n ...style,\n }}\n >\n {children}\n <Divider color={theme.colors.border.secondary} />\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableHeader.displayName = \"Table.Header\";\n\nconst TableBody = forwardRef<any, TableBodyProps>(\n (\n { children, style, minRows, themeMode, themeProductContext, ...props },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n // Each row paints a 1px divider after it (rendered as a sibling Box\n // inside Table.Row), except the very last row in the body which\n // hides its divider. So a fully filled body of N rows is\n // `N × rowHeight + (N - 1) × 1px`.\n const DIVIDER_HEIGHT = 1;\n const computedMinHeight = minRows\n ? minRows * sizing.rowHeight + (minRows - 1) * DIVIDER_HEIGHT\n : undefined;\n\n // Decide whether to auto-pad with placeholder slots. We only pad\n // when every direct child is a <Table.Row>; consumers using a\n // single non-row block (e.g. a custom \"no results\" panel) get just\n // the reserved min-height so they can stretch their content to fill.\n let renderedChildren: ReactNode = children;\n if (minRows) {\n const childArray = React.Children.toArray(children);\n const hasOnlyRowChildren =\n childArray.length > 0 &&\n childArray.every((c) => React.isValidElement(c) && c.type === TableRow);\n const realRowCount = hasOnlyRowChildren ? childArray.length : 0;\n const placeholderCount = hasOnlyRowChildren\n ? Math.max(0, minRows - realRowCount)\n : 0;\n\n if (placeholderCount > 0) {\n // Override the last real row's `hideDivider` so the body always\n // ends with a divider-less slot — matching how a full page hides\n // the last row's divider.\n const patchedRows = childArray.map((child, i) => {\n if (!React.isValidElement(child)) return child;\n const isLastRealRow = i === realRowCount - 1;\n return React.cloneElement(child, {\n hideDivider: isLastRealRow\n ? false\n : (child.props as any).hideDivider,\n } as any);\n });\n\n const placeholders = Array.from({ length: placeholderCount }).map(\n (_, i) => {\n const isLast = i === placeholderCount - 1;\n return (\n <Box\n key={`__table-body-placeholder-${i}`}\n aria-hidden\n style={{\n height: isLast\n ? sizing.rowHeight\n : sizing.rowHeight + DIVIDER_HEIGHT,\n flexShrink: 0,\n }}\n />\n );\n }\n );\n\n renderedChildren = (\n <>\n {patchedRows}\n {placeholders}\n </>\n );\n }\n }\n\n return (\n <TableRowGroupContext.Provider value=\"body\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n ...(computedMinHeight !== undefined && {\n minHeight: computedMinHeight,\n }),\n ...style,\n }}\n >\n {renderedChildren}\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableBody.displayName = \"Table.Body\";\n\nconst TableRow = forwardRef<any, TableRowProps>(\n (\n {\n children,\n hoverable: hoverableProp,\n selected,\n hideDivider: hideDividerProp,\n onPress,\n themeMode,\n themeProductContext,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const rowGroup = useContext(TableRowGroupContext);\n const hoverCapable = useHoverCapable();\n\n const isHeaderRow = rowGroup === \"header\";\n\n // Header rows are not hoverable by default and don't render a divider\n // (Header already paints its own top/bottom dividers).\n const hoverable = hoverableProp ?? !isHeaderRow;\n const hideDivider = hideDividerProp ?? isHeaderRow;\n\n // Track hover + focus-within so descendant <Table.Cell revealOnHover>\n // cells can decide whether to show themselves. Single re-render per\n // hover/focus change, scoped to this row only.\n const [hovered, setHovered] = useState(false);\n const [focusedWithin, setFocusedWithin] = useState(false);\n\n // On touch-only devices the reveal logic short-circuits to \"always\n // visible\" — matches the Figma spec.\n const revealed = hoverCapable ? hovered || focusedWithin : true;\n\n const handleMouseEnter = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(true);\n onMouseEnter?.(e);\n },\n [onMouseEnter]\n );\n const handleMouseLeave = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(false);\n onMouseLeave?.(e);\n },\n [onMouseLeave]\n );\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n setFocusedWithin(true);\n onFocus?.(e);\n },\n [onFocus]\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n // When focus moves between two children of this row the blur fires\n // here but the row is still focus-within — keep the state truthy.\n if (\n e.relatedTarget instanceof Node &&\n e.currentTarget.contains(e.relatedTarget)\n ) {\n onBlur?.(e);\n return;\n }\n setFocusedWithin(false);\n onBlur?.(e);\n },\n [onBlur]\n );\n\n // Rows opt into keyboard activation only when they are interactive\n // (i.e. consumer passed `onPress`). Enter/Space mirror native button\n // behavior; Space is preventDefault'd so the page doesn't scroll.\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<Element>) => {\n onKeyDown?.(e);\n if (!onPress || e.defaultPrevented) return;\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onPress();\n }\n },\n [onKeyDown, onPress]\n );\n\n const baseBg = selected\n ? theme.colors.background.secondary\n : theme.colors.background.primary;\n\n const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;\n const rowPaddingHorizontal = isHeaderRow\n ? sizing.headerRowPaddingHorizontal\n : sizing.rowPaddingHorizontal;\n\n const ctxValue = useMemo(() => ({ revealed }), [revealed]);\n\n return (\n <RowRevealContext.Provider value={ctxValue}>\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n height={rowHeight}\n paddingHorizontal={rowPaddingHorizontal}\n width=\"100%\"\n gap={sizing.cellGap}\n backgroundColor={baseBg}\n cursor={onPress ? \"pointer\" : undefined}\n hoverStyle={\n hoverable\n ? { backgroundColor: theme.colors.background.secondary }\n : undefined\n }\n onPress={onPress}\n role=\"row\"\n tabIndex={onPress ? 0 : undefined}\n aria-selected={selected || undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n onKeyDown={handleKeyDown}\n style={style}\n >\n {children}\n </Box>\n {!hideDivider && <Divider color={theme.colors.border.secondary} />}\n </RowRevealContext.Provider>\n );\n }\n);\n\nTableRow.displayName = \"Table.Row\";\n\nconst positionToFlex = (position: TableCellProps[\"position\"]) => {\n switch (position) {\n case \"left\":\n return { flexShrink: 0 };\n case \"right\":\n return { flexShrink: 0, marginLeft: \"auto\" };\n default:\n return {};\n }\n};\n\nconst alignToJustify = (align: TableCellProps[\"align\"]) => {\n switch (align) {\n case \"right\":\n return \"flex-end\" as const;\n case \"center\":\n return \"center\" as const;\n default:\n return \"flex-start\" as const;\n }\n};\n\nconst TableCell = forwardRef<any, TableCellProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n revealOnHover,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const { revealed } = useContext(RowRevealContext);\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n\n // Per Figma spec: hide via opacity + pointer-events (NOT visibility) so\n // keyboard Tab still focuses the descendants. Focusing a descendant flips\n // `revealed` to true via RowRevealContext, restoring pointer-events.\n const revealStyle: React.CSSProperties =\n revealOnHover && !revealed\n ? { opacity: 0, pointerEvents: \"none\" }\n : revealOnHover\n ? { opacity: 1, transition: \"opacity 0.15s ease\" }\n : {};\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={8}\n height=\"100%\"\n width={width}\n role=\"cell\"\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...revealStyle,\n ...style,\n }}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.cellFontSize}\n lineHeight={sizing.cellLineHeight}\n color={theme.colors.content.primary}\n // truncation\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n maxWidth: \"100%\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCell.displayName = \"Table.Cell\";\n\n/**\n * Sort indicator. Uses the `Sort` line icon from `@xsolla/xui-icons-base`\n * (matches the Figma spec — a stacked up/down chevron). The icon is the\n * same in all three states; opacity differentiates \"sortable but not\n * active\" (`none`, 40%) from \"active sort\" (`ascending` / `descending`,\n * 100%). Direction is communicated to assistive tech via `aria-sort` on\n * the parent <Table.Head>.\n */\nconst SortIcon: React.FC<{\n direction: \"ascending\" | \"descending\" | \"none\";\n color: string;\n size: number;\n}> = ({ direction, color, size }) => (\n <Box\n style={{\n flexShrink: 0,\n opacity: direction === \"none\" ? 0.4 : 1,\n transition: \"opacity 0.15s ease\",\n }}\n >\n <Sort variant=\"line\" size={size} color={color} aria-hidden />\n </Box>\n);\n\nconst TableHead = forwardRef<any, TableHeadProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n sort,\n onSortToggle,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n const sortable = sort != null;\n\n const ariaSort: \"ascending\" | \"descending\" | \"none\" | undefined = sortable\n ? sort\n : undefined;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={sizing.headerCellGap}\n height=\"100%\"\n width={width}\n role=\"columnheader\"\n aria-sort={ariaSort}\n cursor={sortable ? \"pointer\" : undefined}\n onPress={sortable ? onSortToggle : undefined}\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...style,\n }}\n >\n {sortable && (\n <SortIcon\n direction={sort}\n color={theme.colors.content.secondary}\n size={sizing.headerCellFontSize + 2}\n />\n )}\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.headerCellFontSize}\n lineHeight={sizing.headerCellLineHeight}\n color={theme.colors.content.secondary}\n fontWeight=\"500\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableHead.displayName = \"Table.Head\";\n\nconst TableFooter = forwardRef<any, TableFooterProps>(\n ({ children, style, ...props }, ref) => {\n const { theme } = useResolvedTheme();\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizing.paginationGap}\n paddingHorizontal={sizing.paginationPaddingHorizontal}\n width=\"100%\"\n {...props}\n style={style}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableFooter.displayName = \"Table.Footer\";\n\nexport const Table = Object.assign(TableRoot, {\n Caption: TableCaption,\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Row: TableRow,\n Head: TableHead,\n Cell: TableCell,\n});\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBASO;;;ACRP,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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aAAa,WACnD;AAAA,YAAC;AAAA;AAAA,cACC,UAAU,OAAO;AAAA,cACjB,YAAY,OAAO;AAAA,cACnB,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC5B,YAAW;AAAA,cACX,OAAO;AAAA,gBACL,UAAU;AAAA,gBACV,cAAc;AAAA,gBACd,YAAY;AAAA,cACd;AAAA,cAEC;AAAA;AAAA,UACH,IAEA;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;AAExB,IAAM,kBAAc;AAAA,EAClB,CAAC,EAAE,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AACtC,UAAM,EAAE,MAAM,QAAI,kCAAiB;AACnC,UAAM,SAAS,MAAM,OAAO;AAE5B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAc;AAAA,QACd,YAAW;AAAA,QACX,gBAAe;AAAA,QACf,KAAK,OAAO;AAAA,QACZ,mBAAmB,OAAO;AAAA,QAC1B,OAAM;AAAA,QACL,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAEnB,IAAM,QAAQ,OAAO,OAAO,WAAW;AAAA,EAC5C,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR,CAAC;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime","React"]}
|
package/native/index.mjs
CHANGED
|
@@ -442,6 +442,7 @@ var TableRow = forwardRef(
|
|
|
442
442
|
onMouseLeave,
|
|
443
443
|
onFocus,
|
|
444
444
|
onBlur,
|
|
445
|
+
onKeyDown,
|
|
445
446
|
...props
|
|
446
447
|
}, ref) => {
|
|
447
448
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
@@ -486,6 +487,17 @@ var TableRow = forwardRef(
|
|
|
486
487
|
},
|
|
487
488
|
[onBlur]
|
|
488
489
|
);
|
|
490
|
+
const handleKeyDown = useCallback(
|
|
491
|
+
(e) => {
|
|
492
|
+
onKeyDown?.(e);
|
|
493
|
+
if (!onPress || e.defaultPrevented) return;
|
|
494
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
495
|
+
e.preventDefault();
|
|
496
|
+
onPress();
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
[onKeyDown, onPress]
|
|
500
|
+
);
|
|
489
501
|
const baseBg = selected ? theme.colors.background.secondary : theme.colors.background.primary;
|
|
490
502
|
const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;
|
|
491
503
|
const rowPaddingHorizontal = isHeaderRow ? sizing.headerRowPaddingHorizontal : sizing.rowPaddingHorizontal;
|
|
@@ -506,12 +518,14 @@ var TableRow = forwardRef(
|
|
|
506
518
|
hoverStyle: hoverable ? { backgroundColor: theme.colors.background.secondary } : void 0,
|
|
507
519
|
onPress,
|
|
508
520
|
role: "row",
|
|
521
|
+
tabIndex: onPress ? 0 : void 0,
|
|
509
522
|
"aria-selected": selected || void 0,
|
|
510
523
|
onMouseEnter: handleMouseEnter,
|
|
511
524
|
onMouseLeave: handleMouseLeave,
|
|
512
525
|
onFocus: handleFocus,
|
|
513
526
|
onBlur: handleBlur,
|
|
514
527
|
...props,
|
|
528
|
+
onKeyDown: handleKeyDown,
|
|
515
529
|
style,
|
|
516
530
|
children
|
|
517
531
|
}
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Table.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx"],"sourcesContent":["import React, {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, isNative } from \"@xsolla/xui-core\";\nimport { Sort } from \"@xsolla/xui-icons-base\";\nimport {\n TableBodyProps,\n TableCaptionProps,\n TableCellProps,\n TableFooterProps,\n TableHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from \"./types\";\n\n/**\n * Tracks which rowgroup the current <Table.Row> sits inside, so the row can\n * pick the right sizing (header rows are slightly taller / styled\n * differently per `theme.sizing.table`).\n */\ntype RowGroup = \"header\" | \"body\";\nconst TableRowGroupContext = createContext<RowGroup>(\"body\");\n\n/**\n * Tracks whether the parent <Table.Row> is hovered or has focus inside it.\n * Cells that opt into `revealOnHover` read this to decide whether to show\n * their content. Defaults to `true` so cells used outside a row (e.g. inside\n * <Table.Header>) are always visible.\n */\nconst RowRevealContext = createContext<{ revealed: boolean }>({\n revealed: true,\n});\n\n/**\n * Detects whether the device is hover-capable (desktop) vs touch-only (mobile).\n * On touch-only devices we always reveal action cells so they can be tapped —\n * matching the Figma spec (\"Right cell actions ... always visible on touch\n * devices\"). SSR-safe: returns `true` until mounted, which means actions stay\n * revealed on the server (no flash-of-hidden-actions on first paint).\n *\n * Table is web-only for now — on native this hook short-circuits and never\n * runs the media query.\n */\nconst useHoverCapable = (): boolean => {\n const [hoverCapable, setHoverCapable] = useState(true);\n useEffect(() => {\n if (isNative) return;\n if (typeof window === \"undefined\" || !window.matchMedia) return;\n const mq = window.matchMedia(\"(hover: hover)\");\n setHoverCapable(mq.matches);\n const onChange = (e: MediaQueryListEvent) => setHoverCapable(e.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n return hoverCapable;\n};\n\nconst Divider: React.FC<{ color: string }> = ({ color }) => (\n <Box\n width=\"100%\"\n height={1}\n backgroundColor={color}\n style={{ flexShrink: 0 }}\n />\n);\n\nconst TableRoot = forwardRef<any, TableProps>(\n ({ children, themeMode, themeProductContext }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n gap={sizing.containerGap}\n paddingVertical={sizing.containerPaddingVertical}\n backgroundColor={theme.colors.background.primary}\n borderRadius={sizing.containerRadius}\n width=\"100%\"\n role=\"table\"\n style={{\n color: theme.colors.content.primary,\n overflow: \"clip\",\n }}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableRoot.displayName = \"Table\";\n\nconst TableCaption = forwardRef<any, TableCaptionProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={sizing.headerRowPaddingHorizontal}\n width=\"100%\"\n // <caption> isn't a valid ARIA role; consumers can pass role=\"region\"\n // + aria-label via ...props if they want it announced.\n {...props}\n style={style}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n color={theme.colors.content.secondary}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCaption.displayName = \"Table.Caption\";\n\nconst TableHeader = forwardRef<any, TableHeaderProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n return (\n <TableRowGroupContext.Provider value=\"header\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n position: \"sticky\",\n top: 0,\n zIndex: 1,\n backgroundColor: theme.colors.background.primary,\n ...style,\n }}\n >\n {children}\n <Divider color={theme.colors.border.secondary} />\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableHeader.displayName = \"Table.Header\";\n\nconst TableBody = forwardRef<any, TableBodyProps>(\n (\n { children, style, minRows, themeMode, themeProductContext, ...props },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n // Each row paints a 1px divider after it (rendered as a sibling Box\n // inside Table.Row), except the very last row in the body which\n // hides its divider. So a fully filled body of N rows is\n // `N × rowHeight + (N - 1) × 1px`.\n const DIVIDER_HEIGHT = 1;\n const computedMinHeight = minRows\n ? minRows * sizing.rowHeight + (minRows - 1) * DIVIDER_HEIGHT\n : undefined;\n\n // Decide whether to auto-pad with placeholder slots. We only pad\n // when every direct child is a <Table.Row>; consumers using a\n // single non-row block (e.g. a custom \"no results\" panel) get just\n // the reserved min-height so they can stretch their content to fill.\n let renderedChildren: ReactNode = children;\n if (minRows) {\n const childArray = React.Children.toArray(children);\n const hasOnlyRowChildren =\n childArray.length > 0 &&\n childArray.every((c) => React.isValidElement(c) && c.type === TableRow);\n const realRowCount = hasOnlyRowChildren ? childArray.length : 0;\n const placeholderCount = hasOnlyRowChildren\n ? Math.max(0, minRows - realRowCount)\n : 0;\n\n if (placeholderCount > 0) {\n // Override the last real row's `hideDivider` so the body always\n // ends with a divider-less slot — matching how a full page hides\n // the last row's divider.\n const patchedRows = childArray.map((child, i) => {\n if (!React.isValidElement(child)) return child;\n const isLastRealRow = i === realRowCount - 1;\n return React.cloneElement(child, {\n hideDivider: isLastRealRow\n ? false\n : (child.props as any).hideDivider,\n } as any);\n });\n\n const placeholders = Array.from({ length: placeholderCount }).map(\n (_, i) => {\n const isLast = i === placeholderCount - 1;\n return (\n <Box\n key={`__table-body-placeholder-${i}`}\n aria-hidden\n style={{\n height: isLast\n ? sizing.rowHeight\n : sizing.rowHeight + DIVIDER_HEIGHT,\n flexShrink: 0,\n }}\n />\n );\n }\n );\n\n renderedChildren = (\n <>\n {patchedRows}\n {placeholders}\n </>\n );\n }\n }\n\n return (\n <TableRowGroupContext.Provider value=\"body\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n ...(computedMinHeight !== undefined && {\n minHeight: computedMinHeight,\n }),\n ...style,\n }}\n >\n {renderedChildren}\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableBody.displayName = \"Table.Body\";\n\nconst TableRow = forwardRef<any, TableRowProps>(\n (\n {\n children,\n hoverable: hoverableProp,\n selected,\n hideDivider: hideDividerProp,\n onPress,\n themeMode,\n themeProductContext,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const rowGroup = useContext(TableRowGroupContext);\n const hoverCapable = useHoverCapable();\n\n const isHeaderRow = rowGroup === \"header\";\n\n // Header rows are not hoverable by default and don't render a divider\n // (Header already paints its own top/bottom dividers).\n const hoverable = hoverableProp ?? !isHeaderRow;\n const hideDivider = hideDividerProp ?? isHeaderRow;\n\n // Track hover + focus-within so descendant <Table.Cell revealOnHover>\n // cells can decide whether to show themselves. Single re-render per\n // hover/focus change, scoped to this row only.\n const [hovered, setHovered] = useState(false);\n const [focusedWithin, setFocusedWithin] = useState(false);\n\n // On touch-only devices the reveal logic short-circuits to \"always\n // visible\" — matches the Figma spec.\n const revealed = hoverCapable ? hovered || focusedWithin : true;\n\n const handleMouseEnter = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(true);\n onMouseEnter?.(e);\n },\n [onMouseEnter]\n );\n const handleMouseLeave = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(false);\n onMouseLeave?.(e);\n },\n [onMouseLeave]\n );\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n setFocusedWithin(true);\n onFocus?.(e);\n },\n [onFocus]\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n // When focus moves between two children of this row the blur fires\n // here but the row is still focus-within — keep the state truthy.\n if (\n e.relatedTarget instanceof Node &&\n e.currentTarget.contains(e.relatedTarget)\n ) {\n onBlur?.(e);\n return;\n }\n setFocusedWithin(false);\n onBlur?.(e);\n },\n [onBlur]\n );\n\n const baseBg = selected\n ? theme.colors.background.secondary\n : theme.colors.background.primary;\n\n const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;\n const rowPaddingHorizontal = isHeaderRow\n ? sizing.headerRowPaddingHorizontal\n : sizing.rowPaddingHorizontal;\n\n const ctxValue = useMemo(() => ({ revealed }), [revealed]);\n\n return (\n <RowRevealContext.Provider value={ctxValue}>\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n height={rowHeight}\n paddingHorizontal={rowPaddingHorizontal}\n width=\"100%\"\n gap={sizing.cellGap}\n backgroundColor={baseBg}\n cursor={onPress ? \"pointer\" : undefined}\n hoverStyle={\n hoverable\n ? { backgroundColor: theme.colors.background.secondary }\n : undefined\n }\n onPress={onPress}\n role=\"row\"\n aria-selected={selected || undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n style={style}\n >\n {children}\n </Box>\n {!hideDivider && <Divider color={theme.colors.border.secondary} />}\n </RowRevealContext.Provider>\n );\n }\n);\n\nTableRow.displayName = \"Table.Row\";\n\nconst positionToFlex = (position: TableCellProps[\"position\"]) => {\n switch (position) {\n case \"left\":\n return { flexShrink: 0 };\n case \"right\":\n return { flexShrink: 0, marginLeft: \"auto\" };\n default:\n return {};\n }\n};\n\nconst alignToJustify = (align: TableCellProps[\"align\"]) => {\n switch (align) {\n case \"right\":\n return \"flex-end\" as const;\n case \"center\":\n return \"center\" as const;\n default:\n return \"flex-start\" as const;\n }\n};\n\nconst TableCell = forwardRef<any, TableCellProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n revealOnHover,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const { revealed } = useContext(RowRevealContext);\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n\n // Per Figma spec: hide via opacity + pointer-events (NOT visibility) so\n // keyboard Tab still focuses the descendants. Focusing a descendant flips\n // `revealed` to true via RowRevealContext, restoring pointer-events.\n const revealStyle: React.CSSProperties =\n revealOnHover && !revealed\n ? { opacity: 0, pointerEvents: \"none\" }\n : revealOnHover\n ? { opacity: 1, transition: \"opacity 0.15s ease\" }\n : {};\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={8}\n height=\"100%\"\n width={width}\n role=\"cell\"\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...revealStyle,\n ...style,\n }}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.cellFontSize}\n lineHeight={sizing.cellLineHeight}\n color={theme.colors.content.primary}\n // truncation\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n maxWidth: \"100%\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCell.displayName = \"Table.Cell\";\n\n/**\n * Sort indicator. Uses the `Sort` line icon from `@xsolla/xui-icons-base`\n * (matches the Figma spec — a stacked up/down chevron). The icon is the\n * same in all three states; opacity differentiates \"sortable but not\n * active\" (`none`, 40%) from \"active sort\" (`ascending` / `descending`,\n * 100%). Direction is communicated to assistive tech via `aria-sort` on\n * the parent <Table.Head>.\n */\nconst SortIcon: React.FC<{\n direction: \"ascending\" | \"descending\" | \"none\";\n color: string;\n size: number;\n}> = ({ direction, color, size }) => (\n <Box\n style={{\n flexShrink: 0,\n opacity: direction === \"none\" ? 0.4 : 1,\n transition: \"opacity 0.15s ease\",\n }}\n >\n <Sort variant=\"line\" size={size} color={color} aria-hidden />\n </Box>\n);\n\nconst TableHead = forwardRef<any, TableHeadProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n sort,\n onSortToggle,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n const sortable = sort != null;\n\n const ariaSort: \"ascending\" | \"descending\" | \"none\" | undefined = sortable\n ? sort\n : undefined;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={sizing.headerCellGap}\n height=\"100%\"\n width={width}\n role=\"columnheader\"\n aria-sort={ariaSort}\n cursor={sortable ? \"pointer\" : undefined}\n onPress={sortable ? onSortToggle : undefined}\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...style,\n }}\n >\n {sortable && (\n <SortIcon\n direction={sort}\n color={theme.colors.content.secondary}\n size={sizing.headerCellFontSize + 2}\n />\n )}\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.headerCellFontSize}\n lineHeight={sizing.headerCellLineHeight}\n color={theme.colors.content.secondary}\n fontWeight=\"500\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableHead.displayName = \"Table.Head\";\n\nconst TableFooter = forwardRef<any, TableFooterProps>(\n ({ children, style, ...props }, ref) => {\n const { theme } = useResolvedTheme();\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizing.paginationGap}\n paddingHorizontal={sizing.paginationPaddingHorizontal}\n width=\"100%\"\n {...props}\n style={style}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableFooter.displayName = \"Table.Footer\";\n\nexport const Table = Object.assign(TableRoot, {\n Caption: TableCaption,\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Row: TableRow,\n Head: TableHead,\n Cell: TableCell,\n});\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n"],"mappings":";AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;;;ACRP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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A,EAC5C,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AACR,CAAC;","names":["jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Table.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx"],"sourcesContent":["import React, {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, isNative } from \"@xsolla/xui-core\";\nimport { Sort } from \"@xsolla/xui-icons-base\";\nimport {\n TableBodyProps,\n TableCaptionProps,\n TableCellProps,\n TableFooterProps,\n TableHeaderProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n} from \"./types\";\n\n/**\n * Tracks which rowgroup the current <Table.Row> sits inside, so the row can\n * pick the right sizing (header rows are slightly taller / styled\n * differently per `theme.sizing.table`).\n */\ntype RowGroup = \"header\" | \"body\";\nconst TableRowGroupContext = createContext<RowGroup>(\"body\");\n\n/**\n * Tracks whether the parent <Table.Row> is hovered or has focus inside it.\n * Cells that opt into `revealOnHover` read this to decide whether to show\n * their content. Defaults to `true` so cells used outside a row (e.g. inside\n * <Table.Header>) are always visible.\n */\nconst RowRevealContext = createContext<{ revealed: boolean }>({\n revealed: true,\n});\n\n/**\n * Detects whether the device is hover-capable (desktop) vs touch-only (mobile).\n * On touch-only devices we always reveal action cells so they can be tapped —\n * matching the Figma spec (\"Right cell actions ... always visible on touch\n * devices\"). SSR-safe: returns `true` until mounted, which means actions stay\n * revealed on the server (no flash-of-hidden-actions on first paint).\n *\n * Table is web-only for now — on native this hook short-circuits and never\n * runs the media query.\n */\nconst useHoverCapable = (): boolean => {\n const [hoverCapable, setHoverCapable] = useState(true);\n useEffect(() => {\n if (isNative) return;\n if (typeof window === \"undefined\" || !window.matchMedia) return;\n const mq = window.matchMedia(\"(hover: hover)\");\n setHoverCapable(mq.matches);\n const onChange = (e: MediaQueryListEvent) => setHoverCapable(e.matches);\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n return hoverCapable;\n};\n\nconst Divider: React.FC<{ color: string }> = ({ color }) => (\n <Box\n width=\"100%\"\n height={1}\n backgroundColor={color}\n style={{ flexShrink: 0 }}\n />\n);\n\nconst TableRoot = forwardRef<any, TableProps>(\n ({ children, themeMode, themeProductContext }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n gap={sizing.containerGap}\n paddingVertical={sizing.containerPaddingVertical}\n backgroundColor={theme.colors.background.primary}\n borderRadius={sizing.containerRadius}\n width=\"100%\"\n role=\"table\"\n style={{\n color: theme.colors.content.primary,\n overflow: \"clip\",\n }}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableRoot.displayName = \"Table\";\n\nconst TableCaption = forwardRef<any, TableCaptionProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingHorizontal={sizing.headerRowPaddingHorizontal}\n width=\"100%\"\n // <caption> isn't a valid ARIA role; consumers can pass role=\"region\"\n // + aria-label via ...props if they want it announced.\n {...props}\n style={style}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.captionFontSize}\n lineHeight={sizing.captionLineHeight}\n color={theme.colors.content.secondary}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCaption.displayName = \"Table.Caption\";\n\nconst TableHeader = forwardRef<any, TableHeaderProps>(\n ({ children, themeMode, themeProductContext, style, ...props }, ref) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n return (\n <TableRowGroupContext.Provider value=\"header\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n position: \"sticky\",\n top: 0,\n zIndex: 1,\n backgroundColor: theme.colors.background.primary,\n ...style,\n }}\n >\n {children}\n <Divider color={theme.colors.border.secondary} />\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableHeader.displayName = \"Table.Header\";\n\nconst TableBody = forwardRef<any, TableBodyProps>(\n (\n { children, style, minRows, themeMode, themeProductContext, ...props },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n // Each row paints a 1px divider after it (rendered as a sibling Box\n // inside Table.Row), except the very last row in the body which\n // hides its divider. So a fully filled body of N rows is\n // `N × rowHeight + (N - 1) × 1px`.\n const DIVIDER_HEIGHT = 1;\n const computedMinHeight = minRows\n ? minRows * sizing.rowHeight + (minRows - 1) * DIVIDER_HEIGHT\n : undefined;\n\n // Decide whether to auto-pad with placeholder slots. We only pad\n // when every direct child is a <Table.Row>; consumers using a\n // single non-row block (e.g. a custom \"no results\" panel) get just\n // the reserved min-height so they can stretch their content to fill.\n let renderedChildren: ReactNode = children;\n if (minRows) {\n const childArray = React.Children.toArray(children);\n const hasOnlyRowChildren =\n childArray.length > 0 &&\n childArray.every((c) => React.isValidElement(c) && c.type === TableRow);\n const realRowCount = hasOnlyRowChildren ? childArray.length : 0;\n const placeholderCount = hasOnlyRowChildren\n ? Math.max(0, minRows - realRowCount)\n : 0;\n\n if (placeholderCount > 0) {\n // Override the last real row's `hideDivider` so the body always\n // ends with a divider-less slot — matching how a full page hides\n // the last row's divider.\n const patchedRows = childArray.map((child, i) => {\n if (!React.isValidElement(child)) return child;\n const isLastRealRow = i === realRowCount - 1;\n return React.cloneElement(child, {\n hideDivider: isLastRealRow\n ? false\n : (child.props as any).hideDivider,\n } as any);\n });\n\n const placeholders = Array.from({ length: placeholderCount }).map(\n (_, i) => {\n const isLast = i === placeholderCount - 1;\n return (\n <Box\n key={`__table-body-placeholder-${i}`}\n aria-hidden\n style={{\n height: isLast\n ? sizing.rowHeight\n : sizing.rowHeight + DIVIDER_HEIGHT,\n flexShrink: 0,\n }}\n />\n );\n }\n );\n\n renderedChildren = (\n <>\n {patchedRows}\n {placeholders}\n </>\n );\n }\n }\n\n return (\n <TableRowGroupContext.Provider value=\"body\">\n <Box\n ref={ref}\n flexDirection=\"column\"\n alignItems=\"stretch\"\n width=\"100%\"\n role=\"rowgroup\"\n {...props}\n style={{\n ...(computedMinHeight !== undefined && {\n minHeight: computedMinHeight,\n }),\n ...style,\n }}\n >\n {renderedChildren}\n </Box>\n </TableRowGroupContext.Provider>\n );\n }\n);\n\nTableBody.displayName = \"Table.Body\";\n\nconst TableRow = forwardRef<any, TableRowProps>(\n (\n {\n children,\n hoverable: hoverableProp,\n selected,\n hideDivider: hideDividerProp,\n onPress,\n themeMode,\n themeProductContext,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const rowGroup = useContext(TableRowGroupContext);\n const hoverCapable = useHoverCapable();\n\n const isHeaderRow = rowGroup === \"header\";\n\n // Header rows are not hoverable by default and don't render a divider\n // (Header already paints its own top/bottom dividers).\n const hoverable = hoverableProp ?? !isHeaderRow;\n const hideDivider = hideDividerProp ?? isHeaderRow;\n\n // Track hover + focus-within so descendant <Table.Cell revealOnHover>\n // cells can decide whether to show themselves. Single re-render per\n // hover/focus change, scoped to this row only.\n const [hovered, setHovered] = useState(false);\n const [focusedWithin, setFocusedWithin] = useState(false);\n\n // On touch-only devices the reveal logic short-circuits to \"always\n // visible\" — matches the Figma spec.\n const revealed = hoverCapable ? hovered || focusedWithin : true;\n\n const handleMouseEnter = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(true);\n onMouseEnter?.(e);\n },\n [onMouseEnter]\n );\n const handleMouseLeave = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n setHovered(false);\n onMouseLeave?.(e);\n },\n [onMouseLeave]\n );\n const handleFocus = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n setFocusedWithin(true);\n onFocus?.(e);\n },\n [onFocus]\n );\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLElement>) => {\n // When focus moves between two children of this row the blur fires\n // here but the row is still focus-within — keep the state truthy.\n if (\n e.relatedTarget instanceof Node &&\n e.currentTarget.contains(e.relatedTarget)\n ) {\n onBlur?.(e);\n return;\n }\n setFocusedWithin(false);\n onBlur?.(e);\n },\n [onBlur]\n );\n\n // Rows opt into keyboard activation only when they are interactive\n // (i.e. consumer passed `onPress`). Enter/Space mirror native button\n // behavior; Space is preventDefault'd so the page doesn't scroll.\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<Element>) => {\n onKeyDown?.(e);\n if (!onPress || e.defaultPrevented) return;\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onPress();\n }\n },\n [onKeyDown, onPress]\n );\n\n const baseBg = selected\n ? theme.colors.background.secondary\n : theme.colors.background.primary;\n\n const rowHeight = isHeaderRow ? sizing.headerRowHeight : sizing.rowHeight;\n const rowPaddingHorizontal = isHeaderRow\n ? sizing.headerRowPaddingHorizontal\n : sizing.rowPaddingHorizontal;\n\n const ctxValue = useMemo(() => ({ revealed }), [revealed]);\n\n return (\n <RowRevealContext.Provider value={ctxValue}>\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n height={rowHeight}\n paddingHorizontal={rowPaddingHorizontal}\n width=\"100%\"\n gap={sizing.cellGap}\n backgroundColor={baseBg}\n cursor={onPress ? \"pointer\" : undefined}\n hoverStyle={\n hoverable\n ? { backgroundColor: theme.colors.background.secondary }\n : undefined\n }\n onPress={onPress}\n role=\"row\"\n tabIndex={onPress ? 0 : undefined}\n aria-selected={selected || undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n onKeyDown={handleKeyDown}\n style={style}\n >\n {children}\n </Box>\n {!hideDivider && <Divider color={theme.colors.border.secondary} />}\n </RowRevealContext.Provider>\n );\n }\n);\n\nTableRow.displayName = \"Table.Row\";\n\nconst positionToFlex = (position: TableCellProps[\"position\"]) => {\n switch (position) {\n case \"left\":\n return { flexShrink: 0 };\n case \"right\":\n return { flexShrink: 0, marginLeft: \"auto\" };\n default:\n return {};\n }\n};\n\nconst alignToJustify = (align: TableCellProps[\"align\"]) => {\n switch (align) {\n case \"right\":\n return \"flex-end\" as const;\n case \"center\":\n return \"center\" as const;\n default:\n return \"flex-start\" as const;\n }\n};\n\nconst TableCell = forwardRef<any, TableCellProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n revealOnHover,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n const { revealed } = useContext(RowRevealContext);\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n\n // Per Figma spec: hide via opacity + pointer-events (NOT visibility) so\n // keyboard Tab still focuses the descendants. Focusing a descendant flips\n // `revealed` to true via RowRevealContext, restoring pointer-events.\n const revealStyle: React.CSSProperties =\n revealOnHover && !revealed\n ? { opacity: 0, pointerEvents: \"none\" }\n : revealOnHover\n ? { opacity: 1, transition: \"opacity 0.15s ease\" }\n : {};\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={8}\n height=\"100%\"\n width={width}\n role=\"cell\"\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...revealStyle,\n ...style,\n }}\n >\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.cellFontSize}\n lineHeight={sizing.cellLineHeight}\n color={theme.colors.content.primary}\n // truncation\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n maxWidth: \"100%\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableCell.displayName = \"Table.Cell\";\n\n/**\n * Sort indicator. Uses the `Sort` line icon from `@xsolla/xui-icons-base`\n * (matches the Figma spec — a stacked up/down chevron). The icon is the\n * same in all three states; opacity differentiates \"sortable but not\n * active\" (`none`, 40%) from \"active sort\" (`ascending` / `descending`,\n * 100%). Direction is communicated to assistive tech via `aria-sort` on\n * the parent <Table.Head>.\n */\nconst SortIcon: React.FC<{\n direction: \"ascending\" | \"descending\" | \"none\";\n color: string;\n size: number;\n}> = ({ direction, color, size }) => (\n <Box\n style={{\n flexShrink: 0,\n opacity: direction === \"none\" ? 0.4 : 1,\n transition: \"opacity 0.15s ease\",\n }}\n >\n <Sort variant=\"line\" size={size} color={color} aria-hidden />\n </Box>\n);\n\nconst TableHead = forwardRef<any, TableHeadProps>(\n (\n {\n children,\n align = \"left\",\n position = \"default\",\n width,\n grow,\n sort,\n onSortToggle,\n themeMode,\n themeProductContext,\n style,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizing = theme.sizing.table;\n\n const positionStyle = useMemo(() => positionToFlex(position), [position]);\n const sortable = sort != null;\n\n const ariaSort: \"ascending\" | \"descending\" | \"none\" | undefined = sortable\n ? sort\n : undefined;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={alignToJustify(align)}\n gap={sizing.headerCellGap}\n height=\"100%\"\n width={width}\n role=\"columnheader\"\n aria-sort={ariaSort}\n cursor={sortable ? \"pointer\" : undefined}\n onPress={sortable ? onSortToggle : undefined}\n {...props}\n style={{\n flex: width != null ? \"0 0 auto\" : (grow ?? 1),\n minWidth: 0,\n ...positionStyle,\n ...style,\n }}\n >\n {sortable && (\n <SortIcon\n direction={sort}\n color={theme.colors.content.secondary}\n size={sizing.headerCellFontSize + 2}\n />\n )}\n {typeof children === \"string\" || typeof children === \"number\" ? (\n <Text\n fontSize={sizing.headerCellFontSize}\n lineHeight={sizing.headerCellLineHeight}\n color={theme.colors.content.secondary}\n fontWeight=\"500\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </Box>\n );\n }\n);\n\nTableHead.displayName = \"Table.Head\";\n\nconst TableFooter = forwardRef<any, TableFooterProps>(\n ({ children, style, ...props }, ref) => {\n const { theme } = useResolvedTheme();\n const sizing = theme.sizing.table;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizing.paginationGap}\n paddingHorizontal={sizing.paginationPaddingHorizontal}\n width=\"100%\"\n {...props}\n style={style}\n >\n {children}\n </Box>\n );\n }\n);\n\nTableFooter.displayName = \"Table.Footer\";\n\nexport const Table = Object.assign(TableRoot, {\n Caption: TableCaption,\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Row: TableRow,\n Head: TableHead,\n Cell: TableCell,\n});\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n"],"mappings":";AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;;;ACRP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.153.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-core": "0.
|
|
17
|
-
"@xsolla/xui-icons-base": "0.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.
|
|
16
|
+
"@xsolla/xui-core": "0.153.0",
|
|
17
|
+
"@xsolla/xui-icons-base": "0.153.0",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.153.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -76,7 +76,11 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
76
76
|
selected?: boolean;
|
|
77
77
|
/** Hide the bottom divider for this row. */
|
|
78
78
|
hideDivider?: boolean;
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Click handler. When provided, the row becomes interactive: it gains
|
|
81
|
+
* `tabIndex={0}` so it's reachable via keyboard, and Enter/Space
|
|
82
|
+
* activate it (mirroring native button behavior).
|
|
83
|
+
*/
|
|
80
84
|
onPress?: () => void;
|
|
81
85
|
/**
|
|
82
86
|
* Optional focus events. The Row uses these internally to track
|
|
@@ -86,6 +90,12 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
86
90
|
*/
|
|
87
91
|
onFocus?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
88
92
|
onBlur?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Optional key handler. When `onPress` is set, the Row also listens for
|
|
95
|
+
* Enter/Space to activate. Consumer handlers are invoked first; if they
|
|
96
|
+
* call `preventDefault`, the Row does not activate.
|
|
97
|
+
*/
|
|
98
|
+
onKeyDown?: (e: React.KeyboardEvent<Element>) => void;
|
|
89
99
|
}
|
|
90
100
|
interface TableCellProps extends Omit<BoxProps, "position">, ThemeOverrideProps {
|
|
91
101
|
children?: ReactNode;
|
package/web/index.d.ts
CHANGED
|
@@ -76,7 +76,11 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
76
76
|
selected?: boolean;
|
|
77
77
|
/** Hide the bottom divider for this row. */
|
|
78
78
|
hideDivider?: boolean;
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Click handler. When provided, the row becomes interactive: it gains
|
|
81
|
+
* `tabIndex={0}` so it's reachable via keyboard, and Enter/Space
|
|
82
|
+
* activate it (mirroring native button behavior).
|
|
83
|
+
*/
|
|
80
84
|
onPress?: () => void;
|
|
81
85
|
/**
|
|
82
86
|
* Optional focus events. The Row uses these internally to track
|
|
@@ -86,6 +90,12 @@ interface TableRowProps extends BoxProps, ThemeOverrideProps {
|
|
|
86
90
|
*/
|
|
87
91
|
onFocus?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
88
92
|
onBlur?: (e: React.FocusEvent<HTMLElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Optional key handler. When `onPress` is set, the Row also listens for
|
|
95
|
+
* Enter/Space to activate. Consumer handlers are invoked first; if they
|
|
96
|
+
* call `preventDefault`, the Row does not activate.
|
|
97
|
+
*/
|
|
98
|
+
onKeyDown?: (e: React.KeyboardEvent<Element>) => void;
|
|
89
99
|
}
|
|
90
100
|
interface TableCellProps extends Omit<BoxProps, "position">, ThemeOverrideProps {
|
|
91
101
|
children?: ReactNode;
|