@spark-ui/components 17.3.0 → 17.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/dropdown/index.js +1 -1
  2. package/dist/dropdown/index.js.map +1 -1
  3. package/dist/dropdown/index.mjs +10 -10
  4. package/dist/dropdown/index.mjs.map +1 -1
  5. package/dist/src/dropdown/DropdownItems.d.ts +3 -0
  6. package/dist/src/table/Table.d.ts +2 -45
  7. package/dist/src/table/TableBody.d.ts +8 -3
  8. package/dist/src/table/TableBulkBar.d.ts +9 -2
  9. package/dist/src/table/TableCell.d.ts +3 -4
  10. package/dist/src/table/TableColumn.d.ts +11 -5
  11. package/dist/src/table/TableHeader.d.ts +7 -4
  12. package/dist/src/table/TableRow.d.ts +8 -3
  13. package/dist/src/table/index.d.mts +1 -1
  14. package/dist/src/table/index.d.ts +1 -1
  15. package/dist/src/table/internal/ResizableTableContainer.d.ts +13 -0
  16. package/dist/src/table/{Table.styles.d.ts → internal/Table.styles.d.ts} +4 -1
  17. package/dist/src/table/internal/TableBodyCellRenderer.d.ts +10 -0
  18. package/dist/src/table/internal/TableBodyRowRenderer.d.ts +10 -0
  19. package/dist/src/table/internal/TableColumnHeader.d.ts +17 -0
  20. package/dist/src/table/internal/TableColumnResizer.d.ts +14 -0
  21. package/dist/src/table/{TableContext.d.ts → internal/TableContext.d.ts} +9 -2
  22. package/dist/src/table/internal/TableGrid.d.ts +12 -0
  23. package/dist/src/table/internal/TableHeaderRowRenderer.d.ts +15 -0
  24. package/dist/src/table/internal/TableHeaderSelectionCheckbox.d.ts +18 -0
  25. package/dist/src/table/internal/TableKeyboardModeContext.d.ts +2 -0
  26. package/dist/src/table/internal/TableRoot.d.ts +8 -0
  27. package/dist/src/table/internal/TableRootWrapper.d.ts +37 -0
  28. package/dist/src/table/internal/TableSelectionCheckbox.d.ts +18 -0
  29. package/dist/src/table/internal/table-keyboard.d.ts +26 -0
  30. package/dist/src/table/internal/table-utils.d.ts +8 -0
  31. package/dist/src/table/useTablePagination.d.ts +1 -1
  32. package/dist/src/table/useTableSort.d.ts +1 -1
  33. package/dist/table/index.js +1 -1
  34. package/dist/table/index.js.map +1 -1
  35. package/dist/table/index.mjs +695 -337
  36. package/dist/table/index.mjs.map +1 -1
  37. package/package.json +4 -4
  38. package/dist/src/table/ResizableTableContainer.d.ts +0 -9
  39. package/dist/src/table/TableHeaderSelectionCheckbox.d.ts +0 -13
  40. package/dist/src/table/TableSelectionCheckbox.d.ts +0 -7
  41. package/dist/src/table/table-utils.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/table/table-utils.ts","../../src/table/TableContext.tsx","../../src/table/ResizableTableContainer.tsx","../../src/table/Table.tsx","../../src/table/Table.styles.tsx","../../src/table/TableBody.tsx","../../src/table/TableBulkBar.tsx","../../src/table/TableCell.tsx","../../src/table/TableColumn.tsx","../../src/table/TableSelectionCheckbox.tsx","../../src/table/TableHeaderSelectionCheckbox.tsx","../../src/table/TableHeader.tsx","../../src/table/TableRow.tsx","../../src/table/useTableSort.ts","../../src/table/useTablePagination.ts","../../src/table/index.ts"],"sourcesContent":["/**\n * Selector for elements that have their own Space/Enter behavior (buttons, switches, inputs, etc.).\n * Used to avoid table row selection capturing these keys when focus is on an interactive cell content.\n */\nconst INTERACTIVE_SELECTOR =\n 'button, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"option\"], input:not([type=\"hidden\"]), select, textarea, [href]'\n\n/** Column resizer uses a hidden focusable input for keyboard resize (Enter to toggle, ArrowLeft/Right). Don't convert Enter to click there. */\nconst COLUMN_RESIZER_SELECTOR = '[data-resizable-direction]'\n\nexport function isInteractiveElement(element: EventTarget | null): element is Element {\n if (!element || !(element instanceof Element)) return false\n const el = element as Element\n\n return el.matches(INTERACTIVE_SELECTOR) || el.closest(INTERACTIVE_SELECTOR) !== null\n}\n\nexport function isColumnResizerElement(element: EventTarget | null): element is Element {\n if (!element || !(element instanceof Element)) return false\n\n return (element as Element).closest(COLUMN_RESIZER_SELECTOR) !== null\n}\n","import { createContext, useContext } from 'react'\nimport type { Selection } from 'react-aria-components'\nimport type { SortDescriptor } from 'react-aria-components'\n\nimport type { ResizableTableContainerProps } from './ResizableTableContainer'\n\nexport interface TableResizableContextValue {\n isResizable: boolean\n}\n\nexport const TableResizableContext = createContext<TableResizableContextValue>({\n isResizable: false,\n})\n\nexport function useTableResizableContext() {\n return useContext(TableResizableContext)\n}\n\n/** Values provided by Table (root) and consumed by Table.Grid and Table.BulkBar. */\nexport interface TableContextValue\n extends Pick<ResizableTableContainerProps, 'onResizeStart' | 'onResize' | 'onResizeEnd'> {\n // Selection (optional when table has no selection)\n selectionMode?: 'none' | 'single' | 'multiple'\n selectionBehavior?: 'toggle' | 'replace'\n selectedKeys?: Selection\n onSelectionChange?: (keys: Selection) => void\n // BulkBar: optional when not using BulkBar\n totalCount?: number\n hasMultiplePages?: boolean\n onSelectAll?: () => void\n // Derived for BulkBar (from selectedKeys + onSelectionChange)\n selectedCount: number\n onClearSelection: () => void\n // Layout / grid\n allowsResizing?: boolean\n maxHeight?: number | string\n onKeyDownCapture?: React.KeyboardEventHandler<Element>\n sortDescriptor?: SortDescriptor\n onSortChange?: (descriptor: SortDescriptor) => void\n className?: string\n // Pass-through for AriaTable (aria-label, etc.)\n [key: string]: unknown\n}\n\nconst defaultTableContextValue: TableContextValue = {\n selectedCount: 0,\n onClearSelection: () => {},\n}\n\nexport const TableContext = createContext<TableContextValue>(defaultTableContextValue)\n\nexport function useTableContext(): TableContextValue {\n return useContext(TableContext)\n}\n","import { cx } from 'class-variance-authority'\nimport type { ComponentProps } from 'react'\nimport { useLayoutEffect, useRef } from 'react'\nimport { ResizableTableContainer as AriaResizableTableContainer } from 'react-aria-components'\n\nimport { isColumnResizerElement, isInteractiveElement } from './table-utils'\nimport { TableResizableContext } from './TableContext'\n\nexport interface ResizableTableContainerProps\n extends Omit<ComponentProps<typeof AriaResizableTableContainer>, 'className'> {\n className?: string\n}\n\nexport function ResizableTableContainer({\n className,\n children,\n ...props\n}: ResizableTableContainerProps) {\n const containerRef = useRef<HTMLDivElement>(null)\n\n useLayoutEffect(() => {\n const el = containerRef.current\n if (!el) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key !== ' ' && e.key !== 'Enter') return\n if (!isInteractiveElement(e.target)) return\n if (!el.contains(e.target as Node)) return\n // Column resizer uses Enter to toggle keyboard resize mode (ArrowLeft/Right to resize). Do not convert to click.\n if (isColumnResizerElement(e.target)) return\n\n e.preventDefault()\n e.stopPropagation()\n e.stopImmediatePropagation()\n\n // Dispatch a click so the control (Switch, button, etc.) toggles/activates\n // as it would when Space/Enter is pressed natively (browser triggers click)\n const target = e.target as HTMLElement\n target.click()\n }\n\n el.addEventListener('keydown', handleKeyDown, true)\n\n return () => el.removeEventListener('keydown', handleKeyDown, true)\n }, [])\n\n return (\n <TableResizableContext.Provider value={{ isResizable: true }}>\n <AriaResizableTableContainer\n ref={containerRef}\n data-spark-component=\"resizable-table-container\"\n className={cx('relative w-full overflow-auto', className)}\n {...props}\n >\n {children}\n </AriaResizableTableContainer>\n </TableResizableContext.Provider>\n )\n}\n\nResizableTableContainer.displayName = 'ResizableTableContainer'\n","import { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { useLayoutEffect, useRef } from 'react'\nimport { Table as AriaTable, type TableProps as AriaTableProps } from 'react-aria-components'\n\nimport type { ResizableTableContainerProps } from './ResizableTableContainer'\nimport { ResizableTableContainer } from './ResizableTableContainer'\nimport { isColumnResizerElement, isInteractiveElement } from './table-utils'\nimport { TableContext, type TableContextValue, useTableContext } from './TableContext'\n\nexport interface TableProps\n extends Omit<AriaTableProps, 'className'>,\n Pick<ResizableTableContainerProps, 'onResizeStart' | 'onResize' | 'onResizeEnd'> {\n className?: string\n onKeyDownCapture?: React.KeyboardEventHandler<Element>\n /** When true (default), columns can be resized. Pass onResizeStart, onResize, onResizeEnd to react to resize events. */\n allowsResizing?: boolean\n /** Max height of the scroll container (number in px or CSS value). Applied so vertical and horizontal scrollbars share the same container. */\n maxHeight?: number | string\n /** For BulkBar: total number of items (e.g. for \"Select all X items\"). */\n totalCount?: number\n /** When true, BulkBar shows \"Clear all\" and \"Select all\" buttons. */\n hasMultiplePages?: boolean\n /**\n * Called when user clicks \"Clear all\" in BulkBar.\n * Useful with pagination selection models (e.g. `useTablePagination`) where clearing only the\n * current page would be incorrect.\n */\n onClearSelection?: () => void\n /** Called when user clicks \"Select all\" in BulkBar. */\n onSelectAll?: () => void\n}\n\nexport interface TableRootWrapperProps extends TableProps {\n children: ReactNode\n}\n\nexport function TableRootWrapper({\n children,\n className,\n selectedKeys,\n onSelectionChange,\n totalCount,\n hasMultiplePages,\n onClearSelection: onClearSelectionProp,\n onSelectAll,\n allowsResizing = true,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n ...restProps\n}: TableRootWrapperProps) {\n let selectedCount = 0\n\n if (selectedKeys === 'all') {\n selectedCount = totalCount ?? 0\n } else if (selectedKeys instanceof Set) {\n selectedCount = selectedKeys.size\n } else if (selectedKeys) {\n selectedCount = new Set(selectedKeys).size\n }\n const onClearSelection = onClearSelectionProp ?? (() => onSelectionChange?.(new Set()))\n\n const contextValue = {\n ...restProps,\n selectedKeys,\n onSelectionChange,\n totalCount,\n hasMultiplePages,\n onSelectAll,\n selectedCount,\n onClearSelection,\n allowsResizing,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n className,\n }\n\n return (\n <TableContext.Provider value={contextValue as TableContextValue}>\n <div className={cx('gap-md flex flex-col', className)}>{children}</div>\n </TableContext.Provider>\n )\n}\n\nTableRootWrapper.displayName = 'Table'\n\nexport const TableRoot = ({ className, onKeyDownCapture, ...props }: TableProps) => {\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n // Native capture-phase listener so we run BEFORE react-aria's native listeners\n // (which handle row selection on Space/Enter). Synthetic onKeyDownCapture runs\n // too late. When focus is on an interactive element (switch, button, etc.),\n // we consume the event and trigger a click so the control activates without\n // the row being selected.\n useLayoutEffect(() => {\n const el = wrapperRef.current\n if (!el) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key !== ' ' && e.key !== 'Enter') return\n if (!isInteractiveElement(e.target)) return\n if (!el.contains(e.target as Node)) return\n // Column resizer uses Enter to toggle keyboard resize mode (ArrowLeft/Right to resize). Do not convert to click.\n if (isColumnResizerElement(e.target)) return\n\n e.preventDefault()\n e.stopPropagation()\n e.stopImmediatePropagation()\n ;(e.target as HTMLElement).click()\n }\n\n el.addEventListener('keydown', handleKeyDown, true)\n\n return () => el.removeEventListener('keydown', handleKeyDown, true)\n }, [])\n\n return (\n <AriaTable\n ref={wrapperRef}\n data-spark-component=\"table\"\n className={cx(\n 'default:w-full',\n 'border-separate border-spacing-y-0',\n 'bg-surface',\n 'outline-none',\n 'text-body-1',\n 'forced-color-adjust-none',\n 'data-focus-visible:u-outline-inset',\n 'has-[>[data-empty]]:h-full',\n className\n )}\n {...(onKeyDownCapture ? { ...props, onKeyDownCapture } : props)}\n />\n )\n}\n\nTableRoot.displayName = 'Table.Grid.Inner'\n\nfunction toMaxHeightStyle(value: number | string): React.CSSProperties['maxHeight'] {\n return typeof value === 'number' ? `${value}px` : value\n}\n\nexport interface TableGridProps {\n /** Required for accessibility. */\n 'aria-label'?: string\n 'aria-labelledby'?: string\n className?: string\n children?: ReactNode\n}\n\nexport function TableGrid({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className: gridClassName,\n children,\n}: TableGridProps) {\n const ctx = useTableContext()\n const {\n allowsResizing = true,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n className: contextClassName,\n ...ariaTableProps\n } = ctx\n\n const scrollContainerStyle =\n maxHeight != null ? { maxHeight: toMaxHeightStyle(maxHeight) } : undefined\n const className = gridClassName ?? contextClassName\n\n const tableRootProps = {\n ...ariaTableProps,\n ...(ariaLabel != null && { 'aria-label': ariaLabel }),\n ...(ariaLabelledBy != null && { 'aria-labelledby': ariaLabelledBy }),\n sortDescriptor,\n onSortChange,\n onKeyDownCapture,\n className,\n }\n\n if (allowsResizing) {\n return (\n <ResizableTableContainer\n className={className}\n style={scrollContainerStyle}\n onResizeStart={onResizeStart}\n onResize={onResize}\n onResizeEnd={onResizeEnd}\n >\n <TableRoot {...tableRootProps}>{children}</TableRoot>\n </ResizableTableContainer>\n )\n }\n\n return (\n <div className=\"relative w-full overflow-auto\" style={scrollContainerStyle}>\n <TableRoot {...tableRootProps}>{children}</TableRoot>\n </div>\n )\n}\n\nTableGrid.displayName = 'Table.Grid'\n","import { cva, type VariantProps } from 'class-variance-authority'\n\nexport const columnStyles = cva(\n [\n 'h-sz-64 min-w-sz-64',\n 'relative group/column first:rounded-l-xl last:rounded-r-xl bg-neutral-container',\n 'px-lg py-sm text-left outline-none box-border',\n 'cursor-default',\n 'data-focus-visible:u-outline data-focus-visible:-outline-offset-2',\n ],\n {\n variants: {},\n defaultVariants: {},\n }\n)\n\nexport const columnHeaderContentStyles = cva(\n [\n 'flex flex-1 justify-between items-center gap-md',\n 'font-inherit text-left text-inherit',\n 'whitespace-nowrap text-ellipsis',\n 'border-transparent',\n 'data-focus-visible:u-outline data-focus-visible:outline-offset-2',\n ],\n {\n variants: {},\n defaultVariants: {},\n }\n)\n\nexport const tableBodyStyles = cva(\n ['empty:italic empty:text-center empty:text-body-2 empty:py-lg'],\n {\n variants: {},\n defaultVariants: {},\n }\n)\n\nexport const cellStyles = cva(\n [\n 'p-lg outline-none box-border default:overflow-hidden',\n 'border-b-sm border-outline [tr:last-child>&]:border-b-0',\n '[-webkit-tap-highlight-color:transparent]',\n 'data-focus-visible:u-outline-inset data-focus-visible:outline-dashed',\n ],\n {\n variants: {\n /** When true, matches width + padding of the TableSelectionCheckbox header column (w-sz-64, py-sm, no horizontal padding). Use cellCheckboxInnerStyles on the inner wrapper to fill height and center content. */\n checkbox: {\n true: ['w-sz-64 py-sm px-0 align-middle'],\n },\n },\n defaultVariants: {\n checkbox: false,\n },\n }\n)\n\n/** Spacer row: 16px (md) visual gap between header and first data row. Use as first child of tbody. */\nexport const tableBodySpacerRowStyles = cva(\n [\n 'pointer-events-none',\n '[&_td]:h-sz-16 [&_td]:p-0 [&_td]:border-0 [&_td]:border-b-0 [&_td]:bg-surface [&_td]:align-middle',\n ],\n { variants: {}, defaultVariants: {} }\n)\n\nexport type ColumnStylesProps = VariantProps<typeof columnStyles>\nexport type CellStylesProps = VariantProps<typeof cellStyles>\n","import { cx } from 'class-variance-authority'\nimport {\n TableBody as AriaTableBody,\n type TableBodyProps as AriaTableBodyProps,\n} from 'react-aria-components'\n\nimport { tableBodyStyles } from './Table.styles'\n\nexport interface TableBodyProps<T extends object = object>\n extends Omit<AriaTableBodyProps<T>, 'className'> {\n className?: string\n}\n\nexport function TableBody<T extends object>({\n className,\n renderEmptyState,\n ...props\n}: TableBodyProps<T>) {\n const wrappedRenderEmptyState: AriaTableBodyProps<T>['renderEmptyState'] =\n renderEmptyState != null\n ? renderProps => (\n <div data-spark-component=\"table-empty\" className=\"p-lg\">\n {renderEmptyState(renderProps)}\n </div>\n )\n : undefined\n\n return (\n <AriaTableBody\n data-spark-component=\"table-body\"\n className={cx(tableBodyStyles(), className)}\n renderEmptyState={wrappedRenderEmptyState}\n {...props}\n />\n )\n}\n\nTableBody.displayName = 'Table.Body'\n","import { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { createContext, useContext } from 'react'\n\nimport { Button, type ButtonProps } from '../button'\nimport { useTableContext } from './TableContext'\n\ninterface TableBulkBarContextValue {\n selectedCount: number\n totalCount?: number\n onClearSelection: () => void\n onSelectAll?: () => void\n /** When true, \"Clear all\" and \"Select all\" are shown (subject to their own conditions). */\n hasMultiplePages?: boolean\n}\n\nconst TableBulkBarContext = createContext<TableBulkBarContextValue | null>(null)\n\nfunction useTableBulkBarContext() {\n const ctx = useContext(TableBulkBarContext)\n\n if (!ctx) {\n throw new Error('Table.BulkBar subcomponents must be used within Table.BulkBar')\n }\n\n return ctx\n}\n\nexport interface TableBulkBarProps {\n children: ReactNode\n className?: string\n}\n\nfunction TableBulkBarRoot({ children, className }: TableBulkBarProps) {\n const { selectedCount, totalCount, onClearSelection, onSelectAll, hasMultiplePages } =\n useTableContext()\n\n const contextValue: TableBulkBarContextValue = {\n selectedCount,\n totalCount,\n onClearSelection,\n onSelectAll,\n hasMultiplePages,\n }\n\n return (\n <TableBulkBarContext.Provider value={contextValue}>\n <div\n role=\"toolbar\"\n aria-label=\"Table bulk actions\"\n data-spark-component=\"table-bulk-bar\"\n className={cx(\n 'gap-lg min-h-sz-64 flex w-full flex-wrap items-center justify-between',\n 'rounded-lg',\n 'bg-basic-container text-on-basic-container p-lg',\n className\n )}\n >\n {children}\n </div>\n </TableBulkBarContext.Provider>\n )\n}\n\nfunction TableBulkBarSelectedCount({ children }: { children: ReactNode }) {\n useTableBulkBarContext() // enforce usage within BulkBar\n\n return <span className=\"text-body-1 font-bold\">{children}</span>\n}\n\ntype BulkBarButtonProps = Omit<ButtonProps, 'onClick'>\n\nfunction TableBulkBarClearButton({ className, children, ...props }: BulkBarButtonProps) {\n const { selectedCount, onClearSelection, hasMultiplePages } = useTableBulkBarContext()\n\n if (!hasMultiplePages) {\n return null\n }\n\n const ariaDisabled = selectedCount === 0\n\n return (\n <Button\n size=\"sm\"\n design=\"ghost\"\n intent=\"support\"\n underline\n ariaDisabled={ariaDisabled}\n onClick={onClearSelection}\n className={cx('text-body-2', className)}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction TableBulkBarSelectAllButton({ className, children, ...props }: BulkBarButtonProps) {\n const { selectedCount, totalCount, onSelectAll, hasMultiplePages } = useTableBulkBarContext()\n\n if (!hasMultiplePages) {\n return null\n }\n\n const ariaDisabled = totalCount == null || onSelectAll == null || selectedCount >= totalCount\n\n return (\n <Button\n size=\"sm\"\n design=\"ghost\"\n intent=\"support\"\n underline\n ariaDisabled={ariaDisabled}\n onClick={onSelectAll}\n className={cx('text-body-2', className)}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nTableBulkBarRoot.displayName = 'Table.BulkBar'\n\nexport const TableBulkBar = TableBulkBarRoot\nTableBulkBar.displayName = 'Table.BulkBar'\n\nexport { TableBulkBarSelectedCount, TableBulkBarClearButton, TableBulkBarSelectAllButton }\nTableBulkBarSelectedCount.displayName = 'Table.BulkBarSelectedCount'\nTableBulkBarClearButton.displayName = 'Table.BulkBarClearButton'\nTableBulkBarSelectAllButton.displayName = 'Table.BulkBarSelectAllButton'\n","import { cx } from 'class-variance-authority'\nimport { Cell as AriaCell, type CellProps as AriaCellProps } from 'react-aria-components'\n\nimport { cellStyles } from './Table.styles'\nimport { isInteractiveElement } from './table-utils'\n\nexport interface CellProps extends Omit<AriaCellProps, 'className'> {\n className?: string\n /** When true, cell uses same width + padding as the TableSelectionCheckbox header column. */\n checkbox?: boolean\n}\n\nexport function Cell({ className, checkbox, onClick, onPointerDown, ...props }: CellProps) {\n const stopIfInteractive = (e: React.MouseEvent | React.PointerEvent) => {\n if (isInteractiveElement(e.target)) e.stopPropagation()\n }\n\n return (\n <AriaCell\n data-spark-component=\"table-cell\"\n className={cx(cellStyles({ checkbox }), className)}\n onClick={e => {\n stopIfInteractive(e)\n onClick?.(e)\n }}\n onPointerDown={e => {\n stopIfInteractive(e)\n onPointerDown?.(e)\n }}\n {...props}\n />\n )\n}\n\nCell.displayName = 'Table.Cell'\n","import { Icon } from '@spark-ui/components/icon'\nimport { ArrowUp } from '@spark-ui/icons/ArrowUp'\nimport { Sort } from '@spark-ui/icons/Sort'\nimport { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport {\n Column as AriaColumn,\n type ColumnProps as AriaColumnProps,\n type ColumnRenderProps,\n ColumnResizer,\n composeRenderProps,\n Group,\n} from 'react-aria-components'\n\nimport { columnStyles } from './Table.styles'\nimport { isInteractiveElement } from './table-utils'\nimport { useTableResizableContext } from './TableContext'\n\nexport interface ColumnProps extends Omit<AriaColumnProps, 'className'> {\n className?: string\n children?: AriaColumnProps['children']\n label: string\n /** When false, the column cannot be resized. When true or omitted, the column can be resized when the Table has allowsResizing. */\n allowsResizing?: boolean\n}\n\nexport function Column({\n className,\n label,\n children,\n allowsResizing = true,\n minWidth = 120,\n ...props\n}: ColumnProps) {\n const { isResizable } = useTableResizableContext()\n\n const childrenOrRenderFn = children as\n | ReactNode\n | ((renderProps: ColumnRenderProps & { defaultChildren?: ReactNode }) => ReactNode)\n\n return (\n <AriaColumn\n data-spark-component=\"table-column\"\n className={cx(columnStyles(), className)}\n minWidth={minWidth} // necessary to avoid resizing overlapping visual elements\n {...props}\n >\n {composeRenderProps(childrenOrRenderFn, (content, renderProps) => {\n const { allowsSorting, sortDirection } = renderProps\n\n const stopIfInteractive = (e: React.MouseEvent | React.PointerEvent) => {\n if (isInteractiveElement(e.target)) e.stopPropagation()\n }\n\n return (\n <>\n <Group\n role=\"presentation\"\n tabIndex={-1}\n className={cx(\n 'border-transparent',\n 'focus-visible:u-outline focus-visible:outline-offset-2',\n 'gap-sm box-border flex flex-1 items-center'\n )}\n onClick={stopIfInteractive}\n onPointerDown={stopIfInteractive}\n >\n <div className=\"gap-md flex min-w-0 shrink items-center\">\n <p className=\"truncate\">{label}</p>\n\n {children && (\n <div className=\"inline-flex shrink-0 items-center\">\n {typeof content === 'function'\n ? (\n content as (\n props: ColumnRenderProps & { defaultChildren?: ReactNode }\n ) => ReactNode\n )({ ...renderProps, defaultChildren: undefined })\n : content}\n </div>\n )}\n </div>\n\n {allowsSorting && (\n <span className=\"size-sz-32 ml-auto inline-flex shrink-0 cursor-pointer items-center justify-center rounded-full\">\n <Icon size=\"sm\" className={cx(sortDirection === 'descending' && 'rotate-180')}>\n {sortDirection ? <ArrowUp /> : <Sort />}\n </Icon>\n </span>\n )}\n </Group>\n\n {isResizable && allowsResizing && !props.width && (\n <ColumnResizer\n className={cx(\n 'z-raised absolute top-0 right-[-8px]',\n 'group-last/column:hidden',\n 'h-full w-[16px] touch-none',\n 'mx-0 cursor-col-resize',\n 'data-focus-visible:after:u-outline',\n 'data-resizing:after:bg-outline-high after:transition-transform after:duration-200 data-resizing:after:scale-125',\n 'after:h-sz-32 after:bg-outline after:absolute after:top-1/2 after:left-1/2 after:w-[2px] after:-translate-y-1/2'\n )}\n />\n )}\n </>\n )\n })}\n </AriaColumn>\n )\n}\n\nColumn.displayName = 'Table.Column'\n","import { forwardRef } from 'react'\nimport { CheckboxContext, useContextProps } from 'react-aria-components'\n\nimport { Checkbox } from '../checkbox'\n\n/**\n * Adapter that receives table selection state from React Aria's CheckboxContext\n * and renders Spark Checkbox. Used for row selection and \"select all\" in table header.\n */\nexport const TableSelectionCheckbox = forwardRef<\n HTMLButtonElement,\n React.ComponentProps<typeof Checkbox>\n>(function TableSelectionCheckbox(props, ref) {\n // Aria's CheckboxContext is typed for HTMLLabelElement; we render Spark Checkbox (button).\n // We only consume context props (isSelected, isIndeterminate, onChange), ref comes from our forwardRef.\n const [mergedProps, mergedRef] = useContextProps(\n { ...props, slot: 'selection' as const },\n ref,\n CheckboxContext as any\n )\n\n const { isSelected, isIndeterminate, onChange, ...rest } = mergedProps as typeof props & {\n isSelected?: boolean\n isIndeterminate?: boolean\n onChange?: (checked: boolean) => void\n }\n\n const checked = isIndeterminate === true ? 'indeterminate' : Boolean(isSelected)\n\n return (\n <span\n onClick={e => e.stopPropagation()}\n onPointerDown={e => e.stopPropagation()}\n className=\"flex h-full min-h-full items-center justify-center\"\n >\n <Checkbox\n ref={mergedRef as React.Ref<HTMLButtonElement>}\n checked={checked}\n onCheckedChange={onChange}\n {...rest}\n />\n </span>\n )\n})\n\nTableSelectionCheckbox.displayName = 'Table.SelectionCheckbox'\n","import type { Key } from '@react-types/shared'\nimport { useContext } from 'react'\nimport { TableStateContext } from 'react-aria-components'\n\nimport { Checkbox } from '../checkbox'\nimport { TableSelectionCheckbox } from './TableSelectionCheckbox'\n\n/**\n * Header \"select all\" checkbox that bases its checked/indeterminate state only\n * on the currently visible (rendered) rows. So when the user changes page in a\n * paginated table, the header shows unchecked instead of indeterminate when no\n * visible row is selected.\n *\n * Renders the Checkbox directly and calls selectionManager.toggleSelectAll() so\n * we fully control the displayed state instead of overriding React Aria's context.\n */\nexport function TableHeaderSelectionCheckbox() {\n const tableState = useContext(TableStateContext)\n\n if (!tableState) {\n return <TableSelectionCheckbox />\n }\n\n const { collection, selectionManager } = tableState\n const selectedKeys = selectionManager.selectedKeys\n\n // Visible row keys: only the body row keys (currently rendered rows).\n // TableCollection has a body node whose children are the rows.\n const collectionWithBody = collection as unknown as {\n body?: { key: Key }\n getChildren: (key: Key) => Iterable<{ key: Key }>\n getKeys: () => IterableIterator<Key>\n }\n const bodyNode = collectionWithBody.body\n const visibleRowKeys =\n bodyNode != null\n ? new Set<Key>([...collectionWithBody.getChildren(bodyNode.key)].map(node => node.key))\n : new Set<Key>(collection.getKeys())\n\n const keysSet = (selectedKeys as unknown) === 'all' ? visibleRowKeys : (selectedKeys as Set<Key>)\n const selectedVisibleCount = [...visibleRowKeys].filter(key => keysSet.has(key)).length\n const visibleCount = visibleRowKeys.size\n\n const isAllSelected = visibleCount > 0 && selectedVisibleCount === visibleCount\n const isIndeterminate = selectedVisibleCount > 0 && selectedVisibleCount < visibleCount\n\n const checked = isIndeterminate ? 'indeterminate' : isAllSelected\n\n return (\n <span\n onClick={e => e.stopPropagation()}\n onPointerDown={e => e.stopPropagation()}\n className=\"flex h-full min-h-full items-center justify-center\"\n >\n <Checkbox\n checked={checked}\n onCheckedChange={() => {\n selectionManager.toggleSelectAll()\n }}\n />\n </span>\n )\n}\n\nTableHeaderSelectionCheckbox.displayName = 'Table.HeaderSelectionCheckbox'\n","import { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport {\n Collection,\n Column as AriaColumn,\n TableHeader as AriaTableHeader,\n type TableHeaderProps as AriaTableHeaderProps,\n useTableOptions,\n} from 'react-aria-components'\n\nimport { columnStyles } from './Table.styles'\nimport { TableHeaderSelectionCheckbox } from './TableHeaderSelectionCheckbox'\n\nexport interface TableHeaderProps<T extends object = object>\n extends Omit<AriaTableHeaderProps<T>, 'className'> {\n className?: string\n /** When true (default), the header row is sticky with z-raised and top-0. */\n sticky?: boolean\n}\n\nexport function TableHeader<T extends object>({\n className,\n columns,\n children,\n sticky = true,\n ...props\n}: TableHeaderProps<T>) {\n const { selectionBehavior, selectionMode, allowsDragging } = useTableOptions()\n\n return (\n <AriaTableHeader\n data-spark-component=\"table-header\"\n className={cx(\n [\n sticky && 'z-raised sticky top-0',\n 'text-on-neutral-container text-body-1 font-semibold',\n 'after:pt-md after:block after:size-0',\n ],\n className\n )}\n columns={columns}\n {...props}\n >\n {allowsDragging && (\n <AriaColumn width={20} minWidth={20} className=\"w-sz-20 min-w-sz-20 box-border\" />\n )}\n {selectionBehavior === 'toggle' && (\n <AriaColumn width={56} minWidth={56} className={cx(columnStyles())}>\n {selectionMode === 'multiple' && <TableHeaderSelectionCheckbox />}\n </AriaColumn>\n )}\n {columns != null ? (\n <Collection items={columns}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </AriaTableHeader>\n )\n}\n\nTableHeader.displayName = 'Table.Header'\n","import { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport {\n Button,\n Collection,\n Row as AriaRow,\n type RowProps as AriaRowProps,\n useTableOptions,\n} from 'react-aria-components'\n\nimport { Cell } from './TableCell'\nimport { TableSelectionCheckbox } from './TableSelectionCheckbox'\n\nexport interface RowProps<T extends object = object> extends Omit<AriaRowProps<T>, 'className'> {\n className?: string\n}\n\nexport function Row<T extends object>({ id, columns, children, className, ...props }: RowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions()\n\n return (\n <AriaRow\n id={id}\n data-spark-component=\"table-row\"\n className={cx(\n 'group/row',\n 'h-sz-80', // first row: 96px so 16px gap (border-t) + 80px content\n 'group/row text-on-surface relative cursor-default select-none',\n '[-webkit-tap-highlight-color:transparent]',\n 'data-focus-visible:u-outline-inset outline-none data-focus-visible:outline-dashed',\n 'data-react-aria-pressable:hover:bg-surface-hovered data-react-aria-pressable:pressed:bg-surface-hovered',\n // Selected row styles\n 'data-selected:bg-basic-container data-selected:text-on-basic-container',\n 'data-selected:hover:bg-basic-container-hovered data-selected:data-pressed:bg-basic-container-hovered',\n // Disabled row styles\n 'data-disabled:text-on-surface/dim-3',\n // Href row styles\n 'data-href:cursor-pointer',\n className\n )}\n columns={columns}\n {...props}\n >\n {allowsDragging && (\n <Cell>\n <Button\n slot=\"drag\"\n className=\"w-sz-15 data-focus-visible:u-outline flex items-center justify-center text-center outline-none data-[focus-visible]:rounded-md\"\n >\n ≡\n </Button>\n </Cell>\n )}\n {selectionBehavior === 'toggle' && (\n <Cell checkbox>\n <TableSelectionCheckbox />\n </Cell>\n )}\n {columns != null ? (\n <Collection items={columns}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </AriaRow>\n )\n}\n\nRow.displayName = 'Table.Row'\n","import { useMemo, useState } from 'react'\nimport type { SortDescriptor } from 'react-aria-components'\n\nexport interface UseTableSortOptions<T extends object> {\n /** Initial sort column and direction. */\n initialSort?: {\n column: keyof T\n direction: 'ascending' | 'descending'\n }\n /**\n * Custom compare function. If not provided, a default comparator is used:\n * - numbers: numeric comparison\n * - other: localeCompare on string representation\n */\n compare?: (a: T, b: T, column: keyof T, direction: 'ascending' | 'descending') => number\n}\n\nfunction defaultCompare<T extends object>(\n a: T,\n b: T,\n column: keyof T,\n direction: 'ascending' | 'descending'\n): number {\n const aVal = a[column]\n const bVal = b[column]\n\n if (aVal === bVal) return 0\n\n let comparisonResult: number\n if (typeof aVal === 'number' && typeof bVal === 'number') {\n comparisonResult = aVal < bVal ? -1 : 1\n } else {\n comparisonResult = String(aVal).localeCompare(String(bVal))\n }\n\n return direction === 'descending' ? -comparisonResult : comparisonResult\n}\n\n/**\n * Hook to manage table sort state and derive sorted items from a list.\n * Use with Table's sortDescriptor and onSortChange props.\n *\n * @example\n * const { sortDescriptor, onSortChange, setSortDescriptor, sortedItems } = useTableSort(rows, {\n * initialSort: { column: 'name', direction: 'ascending' },\n * })\n * return (\n * <>\n * <Button onClick={() => setSortDescriptor({ column: 'name', direction: 'ascending' })}>Reset sort</Button>\n * <Table sortDescriptor={sortDescriptor} onSortChange={onSortChange}>\n * ...\n * </Table>\n * </>\n * )\n */\nexport function useTableSort<T extends object>(\n items: T[],\n options: UseTableSortOptions<T> = {}\n): {\n sortDescriptor: SortDescriptor\n onSortChange: (descriptor: SortDescriptor) => void\n /** Set sort from outside the table (e.g. a \"Reset sort\" button). */\n setSortDescriptor: (descriptor: SortDescriptor) => void\n sortedItems: T[]\n} {\n const { initialSort, compare } = options\n\n const [sortDescriptor, setSortDescriptor] = useState<SortDescriptor>(() =>\n initialSort\n ? { column: initialSort.column as string, direction: initialSort.direction }\n : { column: 'id', direction: 'ascending' }\n )\n\n const sortedItems = useMemo(() => {\n const column = sortDescriptor.column as keyof T\n if (!column) return [...items]\n\n const compareFn = compare ?? defaultCompare\n const direction = sortDescriptor.direction ?? 'ascending'\n\n return [...items].sort((a, b) => compareFn(a, b, column, direction))\n }, [items, sortDescriptor.column, sortDescriptor.direction, compare])\n\n return {\n sortDescriptor,\n onSortChange: setSortDescriptor,\n setSortDescriptor,\n sortedItems,\n }\n}\n","import { useEffect, useMemo, useState } from 'react'\nimport type { Key, Selection } from 'react-aria-components'\n\nexport interface UseTablePaginationOptions<T> {\n /** Number of items per page. */\n pageSize: number\n /** Initial page index (1-based). Defaults to 1. */\n initialPage?: number\n /**\n * Function to extract a stable key from each item.\n * Defaults to `item.id` if present.\n */\n getId?: (item: T) => Key\n}\n\nexport interface UseTablePaginationResult<T> {\n /** Current page (1-based). */\n page: number\n /** Update the current page manually. */\n setPage: (page: number) => void\n /** Items sliced to the current page. */\n pageItems: T[]\n /** Total number of items. */\n totalItems: number\n /** Total number of pages (at least 1). */\n totalPages: number\n /** All item keys across all pages. */\n allKeys: Set<Key>\n /**\n * Selection state across all pages.\n * Pass to Table (root) as `selectedKeys`.\n */\n selectedKeys: Set<Key>\n /**\n * Selection change handler that keeps selection across pages.\n * Pass to Table (root) as `onSelectionChange`.\n */\n onSelectionChange: (keys: Selection) => void\n /**\n * Convenience handler matching Pagination's `onPageChange` signature:\n * `onPageChange={({ page }) => ...}`.\n */\n onPageChange: (details: { page: number }) => void\n /** Clear selection across all pages. */\n clearSelection: () => void\n}\n\n/**\n * Hook to manage simple client-side pagination and multi-page selection for Table.\n * It slices the full item list to the current page, tracks page state, and merges\n * selection across pages so that rows selected on previous pages remain selected.\n *\n * @example\n * const { page, pageItems, totalItems, allKeys, selectedKeys, onSelectionChange, onPageChange } =\n * useTablePagination(allItems, { pageSize: 10 })\n *\n * return (\n * <Table\n * selectionMode=\"multiple\"\n * selectedKeys={selectedKeys}\n * onSelectionChange={onSelectionChange}\n * totalCount={totalItems}\n * hasMultiplePages={totalItems > 10}\n * onSelectAll={() => onSelectionChange(allKeys)}\n * >\n * <Table.BulkBar>...</Table.BulkBar>\n * <Table.Grid aria-label=\"Items\">\n * <Table.Body>\n * {pageItems.map(item => (\n * <Table.Row key={item.id} id={item.id}>...</Table.Row>\n * ))}\n * </Table.Body>\n * </Table.Grid>\n * <Pagination page={page} pageSize={10} count={totalItems} onPageChange={onPageChange} />\n * </Table>\n * )\n */\nexport function useTablePagination<T>(\n items: T[],\n options: UseTablePaginationOptions<T>\n): UseTablePaginationResult<T> {\n const { pageSize, initialPage = 1, getId } = options\n\n const [page, setPage] = useState(initialPage)\n const [selectedKeys, setSelectedKeys] = useState<Set<Key>>(() => new Set())\n\n const totalItems = items.length\n const totalPages = Math.max(1, Math.ceil(totalItems / pageSize))\n\n // Clamp current page when the total page count changes (e.g. items length shrinks).\n useEffect(() => {\n setPage(current => {\n if (current < 1) return 1\n if (current > totalPages) return totalPages\n\n return current\n })\n }, [totalPages])\n\n let effectivePage = page\n if (effectivePage < 1) {\n effectivePage = 1\n } else if (effectivePage > totalPages) {\n effectivePage = totalPages\n }\n\n const pageItems = useMemo(() => {\n const start = (effectivePage - 1) * pageSize\n const end = start + pageSize\n\n return items.slice(start, end)\n }, [items, effectivePage, pageSize])\n\n const allKeys = useMemo(() => {\n const resolveId =\n getId ??\n ((item: T) => {\n const candidate = (item as unknown as { id?: Key }).id\n\n if (candidate == null) {\n throw new Error(\n 'useTablePagination: item.id is undefined. Provide a `getId` option to extract a stable key.'\n )\n }\n\n return candidate\n })\n\n return new Set<Key>(items.map(item => resolveId(item)))\n }, [getId, items])\n\n const pageIds = useMemo(() => {\n const resolveId =\n getId ??\n ((item: T) => {\n const candidate = (item as unknown as { id?: Key }).id\n\n if (candidate == null) {\n throw new Error(\n 'useTablePagination: item.id is undefined. Provide a `getId` option to extract a stable key.'\n )\n }\n\n return candidate\n })\n\n return new Set<Key>(pageItems.map(item => resolveId(item)))\n }, [getId, pageItems])\n\n const handleSelectionChange = (keys: Selection) => {\n // React Aria uses \"all\" to represent \"select all\" in the current context.\n // For the table header checkbox, interpret \"all\" as \"all items on the current page\".\n const newPageSelection = keys === 'all' ? new Set<Key>(pageIds) : new Set(keys as Set<Key>)\n\n setSelectedKeys(prev => {\n const next = new Set<Key>(newPageSelection)\n\n // Keep selections from other pages.\n for (const key of prev) {\n if (!pageIds.has(key)) {\n next.add(key)\n }\n }\n\n return next\n })\n }\n\n const handlePageChange = (details: { page: number }) => {\n setPage(details.page)\n }\n\n const clearSelection = () => {\n setSelectedKeys(() => new Set())\n }\n\n return {\n page: effectivePage,\n setPage,\n pageItems,\n totalItems,\n totalPages,\n allKeys,\n selectedKeys,\n onSelectionChange: handleSelectionChange,\n onPageChange: handlePageChange,\n clearSelection,\n }\n}\n","import { TableGrid, TableRootWrapper } from './Table'\nimport { TableBody } from './TableBody'\nimport {\n TableBulkBar,\n TableBulkBarClearButton,\n TableBulkBarSelectAllButton,\n TableBulkBarSelectedCount,\n} from './TableBulkBar'\nimport { Cell } from './TableCell'\nimport { Column } from './TableColumn'\nimport { TableHeader } from './TableHeader'\nimport { Row } from './TableRow'\n\nexport const TableWithSubcomponents: typeof TableRootWrapper & {\n Grid: typeof TableGrid\n Header: typeof TableHeader\n Column: typeof Column\n Body: typeof TableBody\n Row: typeof Row\n Cell: typeof Cell\n BulkBar: typeof TableBulkBar\n BulkBarSelectedCount: typeof TableBulkBarSelectedCount\n BulkBarClearButton: typeof TableBulkBarClearButton\n BulkBarSelectAllButton: typeof TableBulkBarSelectAllButton\n} = Object.assign(TableRootWrapper, {\n Grid: TableGrid,\n Header: TableHeader,\n Column,\n Body: TableBody,\n Row,\n Cell,\n BulkBar: TableBulkBar,\n BulkBarSelectedCount: TableBulkBarSelectedCount,\n BulkBarClearButton: TableBulkBarClearButton,\n BulkBarSelectAllButton: TableBulkBarSelectAllButton,\n})\n\nTableWithSubcomponents.displayName = 'Table'\nTableHeader.displayName = 'Table.Header'\nColumn.displayName = 'Table.Column'\nTableBody.displayName = 'Table.Body'\nRow.displayName = 'Table.Row'\nCell.displayName = 'Table.Cell'\n\nexport { TableWithSubcomponents as Table }\n\nexport { useTableSort } from './useTableSort'\nexport { useTablePagination } from './useTablePagination'\nexport type { SortDescriptor } from 'react-aria-components'\nexport type { UseTableSortOptions } from './useTableSort'\nexport type { UseTablePaginationOptions, UseTablePaginationResult } from './useTablePagination'\nexport { type TableGridProps, type TableProps, type TableRootWrapperProps } from './Table'\nexport { type TableHeaderProps } from './TableHeader'\nexport { type ColumnProps } from './TableColumn'\nexport { type TableBodyProps } from './TableBody'\nexport { type RowProps } from './TableRow'\nexport { type CellProps } from './TableCell'\n"],"mappings":";;;;;;;;;;AAIA,IAAM,IACJ,gJAGI,KAA0B;AAEhC,SAAgB,EAAqB,GAAiD;AACpF,KAAI,CAAC,KAAW,EAAE,aAAmB,SAAU,QAAO;CACtD,IAAM,IAAK;AAEX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,EAAI,IACnB,EAAK,IAAI,EAAI;AAIjB,WAAO;KACP;;EAoBF,eAjBwB,MAA8B;AACtD,KAAQ,EAAQ,KAAK;;EAiBrB,sBAd2B;AAC3B,2BAAsB,IAAI,KAAK,CAAC;;EAcjC;;;;AC9KH,IAAa,IAWT,OAAO,OAAO,GAAkB;CAClC,MAAM;CACN,QAAQ;CACR,QAAA;CACA,MAAM;CACN,KAAA;CACA,MAAA;CACA,SAAS;CACT,sBAAsB;CACtB,oBAAoB;CACpB,wBAAwB;CACzB,CAAC;AAEF,EAAuB,cAAc,SACrC,EAAY,cAAc,gBAC1B,EAAO,cAAc,gBACrB,EAAU,cAAc,cACxB,EAAI,cAAc,aAClB,EAAK,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/table/internal/TableContext.tsx","../../src/table/internal/TableRootWrapper.tsx","../../src/table/internal/ResizableTableContainer.tsx","../../src/table/internal/Table.styles.tsx","../../src/table/internal/table-keyboard.ts","../../src/table/internal/table-utils.ts","../../src/table/internal/TableKeyboardModeContext.tsx","../../src/table/internal/TableSelectionCheckbox.tsx","../../src/table/internal/TableBodyCellRenderer.tsx","../../src/table/internal/TableBodyRowRenderer.tsx","../../src/table/internal/TableColumnResizer.tsx","../../src/table/internal/TableHeaderSelectionCheckbox.tsx","../../src/table/internal/TableColumnHeader.tsx","../../src/table/internal/TableHeaderRowRenderer.tsx","../../src/table/internal/TableRoot.tsx","../../src/table/internal/TableGrid.tsx","../../src/table/TableBody.tsx","../../src/table/TableBulkBar.tsx","../../src/table/TableCell.tsx","../../src/table/TableColumn.tsx","../../src/table/TableHeader.tsx","../../src/table/TableRow.tsx","../../src/table/useTableSort.ts","../../src/table/useTablePagination.ts","../../src/table/index.ts"],"sourcesContent":["import type { Selection } from '@react-types/shared'\nimport type { SortDescriptor } from '@react-types/shared'\nimport type { GridNode } from '@react-types/grid'\nimport { createContext, useContext } from 'react'\n\nimport type { ResizableTableContainerProps } from './ResizableTableContainer'\n\nexport interface TableResizableContextValue {\n isResizable: boolean\n tableWidth: number\n}\n\nexport const TableResizableContext = createContext<TableResizableContextValue>({\n isResizable: false,\n tableWidth: 0,\n})\n\nexport function useTableResizableContext() {\n return useContext(TableResizableContext)\n}\n\n/** Values provided by Table (root) and consumed by Table.Grid and Table.BulkBar. */\nexport interface TableContextValue {\n onResizeStart?: ResizableTableContainerProps['onResizeStart']\n onResize?: ResizableTableContainerProps['onResize']\n onResizeEnd?: ResizableTableContainerProps['onResizeEnd']\n // Selection (optional when table has no selection)\n selectionMode?: 'none' | 'single' | 'multiple'\n selectionBehavior?: 'toggle' | 'replace'\n selectedKeys?: Selection\n onSelectionChange?: (keys: Selection) => void\n // BulkBar: optional when not using BulkBar\n totalCount?: number\n hasMultiplePages?: boolean\n onSelectAll?: () => void\n // Derived for BulkBar (from selectedKeys + onSelectionChange)\n selectedCount: number\n onClearSelection: () => void\n // Layout / grid\n allowsResizing?: boolean\n /** `aria-label` for column resizer control. */\n resizeColumnAriaLabel?: string | ((column: GridNode<unknown>) => string)\n maxHeight?: number | string\n onKeyDownCapture?: React.KeyboardEventHandler<Element>\n sortDescriptor?: SortDescriptor\n onSortChange?: (descriptor: SortDescriptor) => void\n className?: string\n // Pass-through for AriaTable (aria-label, etc.)\n [key: string]: unknown\n}\n\nconst defaultTableContextValue: TableContextValue = {\n selectedCount: 0,\n onClearSelection: () => {},\n}\n\nexport const TableContext = createContext<TableContextValue>(defaultTableContextValue)\n\nexport function useTableContext(): TableContextValue {\n return useContext(TableContext)\n}\n","import type { Key, SelectionBehavior } from '@react-types/shared'\nimport type { GridNode } from '@react-types/grid'\nimport type { ColumnSize } from '@react-types/table'\nimport type { TableProps as AriaTableProps } from '@react-types/table'\nimport { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\n\nimport { TableContext, type TableContextValue } from './TableContext'\n\nexport interface TableProps extends Omit<AriaTableProps<object>, 'children' | 'className'> {\n className?: string\n selectionBehavior?: SelectionBehavior\n onKeyDownCapture?: React.KeyboardEventHandler<Element>\n /** When true (default), columns can be resized. Pass onResizeStart, onResize, onResizeEnd to react to resize events. */\n allowsResizing?: boolean\n /** `aria-label` for the column resize control (for i18n). */\n resizeColumnAriaLabel?: string | ((column: GridNode<unknown>) => string)\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void\n onResize?: (widths: Map<Key, ColumnSize>) => void\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n /** Max height of the scroll container (number in px or CSS value). Applied so vertical and horizontal scrollbars share the same container. */\n maxHeight?: number | string\n /** For BulkBar: total number of items (e.g. for \"Select all X items\"). */\n totalCount?: number\n /** When true, BulkBar shows \"Clear all\" and \"Select all\" buttons. */\n hasMultiplePages?: boolean\n /**\n * Called when user clicks \"Clear all\" in BulkBar.\n * Useful with pagination selection models (e.g. `useTablePagination`) where clearing only the\n * current page would be incorrect.\n */\n onClearSelection?: () => void\n /** Called when user clicks \"Select all\" in BulkBar. */\n onSelectAll?: () => void\n}\n\nexport interface TableRootWrapperProps extends TableProps {\n children: ReactNode\n}\n\nexport function TableRootWrapper({\n children,\n className,\n selectedKeys,\n onSelectionChange,\n totalCount,\n hasMultiplePages,\n onClearSelection: onClearSelectionProp,\n onSelectAll,\n allowsResizing = true,\n resizeColumnAriaLabel,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n ...restProps\n}: TableRootWrapperProps) {\n let selectedCount = 0\n\n if (selectedKeys === 'all') {\n selectedCount = totalCount ?? 0\n } else if (selectedKeys instanceof Set) {\n selectedCount = selectedKeys.size\n } else if (selectedKeys) {\n selectedCount = new Set(selectedKeys).size\n }\n const onClearSelection = onClearSelectionProp ?? (() => onSelectionChange?.(new Set()))\n\n const contextValue = {\n ...restProps,\n selectedKeys,\n onSelectionChange,\n totalCount,\n hasMultiplePages,\n onSelectAll,\n selectedCount,\n onClearSelection,\n allowsResizing,\n resizeColumnAriaLabel,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n className,\n }\n\n return (\n <TableContext.Provider value={contextValue as TableContextValue}>\n <div className={cx('gap-md flex flex-col', className)}>{children}</div>\n </TableContext.Provider>\n )\n}\n\nTableRootWrapper.displayName = 'Table'\n","import { useResizeObserver } from '@react-aria/utils'\nimport type { Key } from '@react-types/shared'\nimport type { ColumnSize } from '@react-types/table'\nimport { cx } from 'class-variance-authority'\nimport type { ComponentPropsWithoutRef } from 'react'\nimport { useLayoutEffect, useRef, useState } from 'react'\n\nimport { TableResizableContext } from './TableContext'\n\nexport interface ResizableTableContainerProps extends ComponentPropsWithoutRef<'div'> {\n className?: string\n onResizeStart?: (widths: Map<Key, ColumnSize>) => void\n onResize?: (widths: Map<Key, ColumnSize>) => void\n onResizeEnd?: (widths: Map<Key, ColumnSize>) => void\n}\n\nexport function ResizableTableContainer({\n className,\n children,\n ...props\n}: ResizableTableContainerProps) {\n const containerRef = useRef<HTMLDivElement>(null)\n const [tableWidth, setTableWidth] = useState(0)\n\n useLayoutEffect(() => {\n const el = containerRef.current\n if (!el) return\n\n const update = () => setTableWidth(el.clientWidth)\n update()\n }, [])\n\n useResizeObserver({\n ref: containerRef,\n onResize: () => {\n const el = containerRef.current\n if (!el) return\n setTableWidth(el.clientWidth)\n },\n })\n\n return (\n <TableResizableContext.Provider value={{ isResizable: true, tableWidth }}>\n <div\n ref={containerRef}\n data-spark-component=\"resizable-table-container\"\n className={cx('relative w-full overflow-auto', className)}\n {...props}\n >\n {children}\n </div>\n </TableResizableContext.Provider>\n )\n}\n\nResizableTableContainer.displayName = 'ResizableTableContainer'\n","import { cva, type VariantProps } from 'class-variance-authority'\n\nexport const columnStyles = cva(\n [\n 'h-sz-64 min-w-sz-64',\n 'relative group/column first:rounded-l-xl last:rounded-r-xl bg-neutral-container',\n 'pl-lg pr-lg py-sm text-left outline-none box-border',\n 'cursor-default',\n 'data-focus-visible:u-outline data-focus-visible:-outline-offset-2',\n ],\n {\n variants: {\n /** Selection-mode header checkbox column (first column). */\n checkbox: {\n true: ['w-sz-64 min-w-sz-64 max-w-sz-64', 'px-0 align-middle'],\n },\n /** When a header resizer is present, reserve more space on the right. */\n resizable: {\n true: ['pr-xl'],\n },\n },\n defaultVariants: {\n checkbox: false,\n resizable: false,\n },\n }\n)\n\nexport const columnHeaderContentStyles = cva(\n [\n 'flex flex-1 justify-between items-center gap-md',\n 'font-inherit text-left text-inherit',\n 'whitespace-nowrap text-ellipsis',\n 'border-transparent',\n 'data-focus-visible:u-outline data-focus-visible:outline-offset-2',\n ],\n {\n variants: {},\n defaultVariants: {},\n }\n)\n\nexport const tableBodyStyles = cva(\n ['empty:italic empty:text-center empty:text-body-2 empty:py-lg'],\n {\n variants: {},\n defaultVariants: {},\n }\n)\n\nexport const cellStyles = cva(\n [\n 'p-lg outline-none box-border default:overflow-hidden',\n 'border-b-sm border-outline [tr:last-child>&]:border-b-0',\n '[-webkit-tap-highlight-color:transparent]',\n 'data-focus-visible:u-outline-inset data-focus-visible:outline-dashed',\n ],\n {\n variants: {\n /** When true, matches width + padding of the TableSelectionCheckbox header column (w-sz-64, py-sm, no horizontal padding). Use cellCheckboxInnerStyles on the inner wrapper to fill height and center content. */\n checkbox: {\n true: ['w-sz-64 py-sm px-0 align-middle'],\n },\n },\n defaultVariants: {\n checkbox: false,\n },\n }\n)\n\n/** Spacer row: 16px (md) visual gap between header and first data row. Use as first child of tbody. */\nexport const tableBodySpacerRowStyles = cva(\n [\n 'pointer-events-none',\n '[&_td]:h-sz-16 [&_td]:p-0 [&_td]:border-0 [&_td]:border-b-0 [&_td]:bg-surface [&_td]:align-middle',\n ],\n { variants: {}, defaultVariants: {} }\n)\n\nexport type ColumnStylesProps = VariantProps<typeof columnStyles>\nexport type CellStylesProps = VariantProps<typeof cellStyles>\n","// oxlint-disable max-lines-per-function\nimport type { DOMAttributes, FocusableElement } from '@react-types/shared'\nimport type { FocusEventHandler, KeyboardEventHandler, PointerEventHandler, RefObject } from 'react'\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport { mergeProps } from 'react-aria'\n\ntype KeyboardMode = 'grid' | 'interaction'\n\n// Scope to body cells only so we do not affect header keyboard navigation.\nconst BODY_CELL_SELECTOR = '[data-spark-component=\"table-cell\"]'\n\n/**\n * Collapsible list widgets handle Arrow keys on the focused control (Downshift, native select).\n * - Capture: stopping propagation on the grid would prevent the event from reaching them.\n * - Bubble: useSelectableCollection's grid onKeyDown still runs (target is inside the table), so\n * we must not forward vertical arrows to the collection handler in that case.\n */\nexport function targetIsListboxLikeArrowKeyHandler(target: EventTarget | null): boolean {\n if (!target || !(target instanceof Element)) return false\n return Boolean(\n target.closest(\n '[role=\"combobox\"],select,[data-spark-component=\"dropdown-trigger\"],[data-spark-component=\"combobox-input\"]'\n )\n )\n}\n\n/**\n * Open combobox / dropdown consumes Escape to close the list first (APG pattern).\n * Grid uses onKeyDownCapture on the table element, which runs before the trigger's handlers,\n * so we must not exit interaction mode until aria-expanded is false.\n */\nexport function targetIsOpenComboboxConsumingEscape(target: EventTarget | null): boolean {\n if (!target || !(target instanceof Element)) return false\n const el = target.closest(\n '[role=\"combobox\"],[data-spark-component=\"dropdown-trigger\"],[data-spark-component=\"combobox-input\"]'\n )\n if (!el) return false\n return el.getAttribute('aria-expanded') === 'true'\n}\nconst FOCUSABLE_SELECTOR =\n 'a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]'\n\nfunction getCellFromTarget(target: EventTarget | null): HTMLElement | null {\n if (!target || !(target instanceof Element)) return null\n return (target as Element).closest(BODY_CELL_SELECTOR) as HTMLElement | null\n}\n\n/** Row selection column: checkbox should not switch the grid to interaction (edit) mode. */\nfunction isSelectionBodyCell(cell: HTMLElement): boolean {\n return cell.getAttribute('data-table-cell-kind') === 'selection'\n}\n\nfunction getFocusableDescendants(cell: HTMLElement): HTMLElement[] {\n return Array.from(cell.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).filter(el => {\n if (el === cell) return false\n if (el.hasAttribute('disabled')) return false\n if (el.getAttribute('aria-disabled') === 'true') return false\n if (el.getAttribute('hidden') !== null) return false\n return true\n })\n}\n\nfunction setDescendantsFocusable(cell: HTMLElement, enabled: boolean) {\n for (const el of getFocusableDescendants(cell)) {\n const key = 'data-prev-tabindex'\n if (!enabled) {\n if (!el.hasAttribute(key)) {\n el.setAttribute(key, el.getAttribute('tabindex') ?? '')\n }\n el.setAttribute('tabindex', '-1')\n } else {\n const prev = el.getAttribute(key)\n if (prev === null) continue\n el.removeAttribute(key)\n if (prev === '') el.removeAttribute('tabindex')\n else el.setAttribute('tabindex', prev)\n }\n }\n}\n\nfunction disableInCellFocusablesForGridMode(table: HTMLTableElement) {\n const cells = Array.from(table.querySelectorAll<HTMLElement>(BODY_CELL_SELECTOR))\n for (const cell of cells) {\n setDescendantsFocusable(cell, false)\n }\n}\n\nexport function useTableKeyboardModes<T extends Element>({\n ref,\n gridProps,\n onKeyDownCapture: userOnKeyDownCapture,\n onFocusCapture: userOnFocusCapture,\n}: {\n ref: RefObject<T | null>\n gridProps: DOMAttributes<FocusableElement> | Record<string, unknown>\n onKeyDownCapture?: KeyboardEventHandler<Element>\n onFocusCapture?: FocusEventHandler<Element>\n}): { gridProps: Record<string, unknown>; keyboardMode: KeyboardMode } {\n const [keyboardMode, setKeyboardMode] = useState<KeyboardMode>('grid')\n const keyboardModeRef = useRef<KeyboardMode>('grid')\n const activeCellRef = useRef<HTMLElement | null>(null)\n /** Pointer on a cell descendant: do not pull focus back to the `td` (grid mode). */\n const skipCellFocusRedirectRef = useRef(false)\n\n const mergedGridProps = useMemo(() => {\n const { onKeyDown: collectionOnKeyDown, ...gridPropsWithoutKeyDown } = gridProps as Record<\n string,\n unknown\n > & {\n onKeyDown?: KeyboardEventHandler<Element>\n }\n\n const enterInteractionModeForCell = (bodyCell: HTMLElement) => {\n activeCellRef.current = bodyCell\n keyboardModeRef.current = 'interaction'\n setKeyboardMode('interaction')\n setDescendantsFocusable(bodyCell, true)\n }\n\n const onBlurCapture: FocusEventHandler<Element> = e => {\n if (keyboardModeRef.current !== 'interaction') return\n const root = ref.current\n if (!root) return\n const next = e.relatedTarget\n if (next instanceof Node && root.contains(next)) return\n\n activeCellRef.current = null\n keyboardModeRef.current = 'grid'\n setKeyboardMode('grid')\n }\n\n const onPointerDownCapture: PointerEventHandler<Element> = e => {\n const cell = getCellFromTarget(e.target)\n if (!cell?.matches(BODY_CELL_SELECTOR)) return\n if (!(e.target instanceof Element)) return\n if (e.target !== cell && cell.contains(e.target)) {\n skipCellFocusRedirectRef.current = true\n }\n }\n\n const onFocusCapture: FocusEventHandler<Element> = e => {\n userOnFocusCapture?.(e)\n\n const skipRedirectFromPointerOnChild = skipCellFocusRedirectRef.current\n skipCellFocusRedirectRef.current = false\n\n const root = ref.current\n const cell = getCellFromTarget(e.target)\n\n if (keyboardModeRef.current === 'interaction' && activeCellRef.current && root) {\n const focusMovedToAnotherBodyCell = Boolean(cell && cell !== activeCellRef.current)\n const focusInsideTableButOutsideActiveCell =\n !cell &&\n e.target instanceof Element &&\n root.contains(e.target) &&\n !activeCellRef.current.contains(e.target)\n\n if (focusMovedToAnotherBodyCell || focusInsideTableButOutsideActiveCell) {\n keyboardModeRef.current = 'grid'\n setKeyboardMode('grid')\n if (focusInsideTableButOutsideActiveCell) {\n activeCellRef.current = null\n }\n }\n }\n\n if (!cell) return\n activeCellRef.current = cell\n\n const focusTarget = e.target instanceof Element ? e.target : null\n const isBodyCell = cell.matches(BODY_CELL_SELECTOR)\n const inGridMode = keyboardModeRef.current === 'grid'\n const focusOnCellDescendant = Boolean(\n focusTarget && focusTarget !== cell && cell.contains(focusTarget)\n )\n const hasInteractiveControls = getFocusableDescendants(cell).length > 0\n\n // Grid roving focus: keep focus on the `td` unless the user pointed at in-cell content.\n if (\n inGridMode &&\n isBodyCell &&\n focusOnCellDescendant &&\n hasInteractiveControls &&\n !skipRedirectFromPointerOnChild\n ) {\n queueMicrotask(() => cell.focus())\n }\n\n // Pointer placed focus on a control: match Enter — interaction mode for this cell.\n if (\n skipRedirectFromPointerOnChild &&\n inGridMode &&\n focusOnCellDescendant &&\n isBodyCell &&\n hasInteractiveControls &&\n !isSelectionBodyCell(cell)\n ) {\n enterInteractionModeForCell(cell)\n }\n }\n\n const onKeyDown: KeyboardEventHandler<Element> = e => {\n // In interaction mode, arrow keys should be handled by the focused control (or ignored),\n // not by the grid's roving focus. We gate on the currently focused element rather than\n // the event target so this still holds for composite controls.\n if (\n keyboardModeRef.current === 'interaction' &&\n (e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown')\n ) {\n const activeCell = activeCellRef.current\n const focused = document.activeElement\n if (activeCell && focused instanceof Node && activeCell.contains(focused)) {\n return\n }\n }\n if (\n keyboardModeRef.current === 'interaction' &&\n (e.key === 'ArrowUp' || e.key === 'ArrowDown') &&\n targetIsListboxLikeArrowKeyHandler(e.target) &&\n getCellFromTarget(e.target) === activeCellRef.current\n ) {\n return\n }\n collectionOnKeyDown?.(e)\n }\n\n const onKeyDownCapture: KeyboardEventHandler<Element> = e => {\n userOnKeyDownCapture?.(e)\n\n // In interaction mode, allow Tab to move between in-cell controls.\n // React Aria's grid tends to treat Tab as \"leave the grid\", so we stop propagation\n // so the browser can handle normal tabbing inside the active cell.\n if (keyboardModeRef.current === 'interaction' && e.key === 'Tab') {\n const cell = getCellFromTarget(e.target)\n if (cell && cell === activeCellRef.current) {\n e.stopPropagation()\n }\n return\n }\n\n if (\n targetIsListboxLikeArrowKeyHandler(e.target) &&\n keyboardModeRef.current === 'interaction' &&\n (e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown')\n ) {\n const cell = getCellFromTarget(e.target)\n if (cell && cell === activeCellRef.current) {\n return\n }\n }\n\n if (\n keyboardModeRef.current === 'interaction' &&\n (e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown')\n ) {\n const cell = getCellFromTarget(e.target)\n if (cell && cell === activeCellRef.current) {\n e.stopPropagation()\n return\n }\n }\n\n // In grid mode, ArrowRight on the last cell focuses the row (Spark behavior).\n if (keyboardModeRef.current === 'grid' && e.key === 'ArrowRight') {\n const cell = getCellFromTarget(e.target)\n if (cell) {\n const row = cell.closest('tr') as HTMLElement | null\n if (row) {\n const cells = Array.from(row.querySelectorAll<HTMLElement>(BODY_CELL_SELECTOR))\n const isLastCell = cells.length > 0 && cells[cells.length - 1] === cell\n if (isLastCell) {\n e.preventDefault()\n e.stopPropagation()\n row.focus()\n return\n }\n }\n }\n }\n\n if (keyboardModeRef.current === 'grid' && e.key === 'Enter') {\n const cell = getCellFromTarget(e.target)\n if (!cell) return\n if (isSelectionBodyCell(cell)) return\n\n const focusables = getFocusableDescendants(cell)\n if (focusables.length === 0) return\n\n e.preventDefault()\n e.stopPropagation()\n\n enterInteractionModeForCell(cell)\n focusables[0]?.focus()\n return\n }\n\n // APG grid pattern: F2 is an alternative to Enter to enter \"interaction\" mode.\n // It is also commonly used as a toggle (press again to restore grid navigation).\n if (keyboardModeRef.current === 'grid' && e.key === 'F2') {\n const cell = getCellFromTarget(e.target)\n if (!cell) return\n if (isSelectionBodyCell(cell)) return\n\n const focusables = getFocusableDescendants(cell)\n if (focusables.length === 0) return\n\n e.preventDefault()\n e.stopPropagation()\n\n enterInteractionModeForCell(cell)\n focusables[0]?.focus()\n return\n }\n\n if (keyboardModeRef.current === 'interaction' && e.key === 'Escape') {\n if (targetIsOpenComboboxConsumingEscape(e.target)) {\n return\n }\n\n const cell = activeCellRef.current\n if (!cell) return\n\n e.preventDefault()\n e.stopPropagation()\n\n keyboardModeRef.current = 'grid'\n setKeyboardMode('grid')\n cell.focus()\n }\n\n if (keyboardModeRef.current === 'interaction' && e.key === 'F2') {\n const cell = activeCellRef.current\n if (!cell) return\n\n e.preventDefault()\n e.stopPropagation()\n\n keyboardModeRef.current = 'grid'\n setKeyboardMode('grid')\n cell.focus()\n }\n }\n\n return mergeProps(gridPropsWithoutKeyDown, {\n onKeyDown,\n onKeyDownCapture,\n onBlurCapture,\n onFocusCapture,\n onPointerDownCapture,\n 'data-table-keyboard-mode': keyboardMode,\n })\n }, [gridProps, keyboardMode, ref, userOnFocusCapture, userOnKeyDownCapture])\n\n useEffect(() => {\n keyboardModeRef.current = keyboardMode\n const table = ref.current\n if (!table) return\n\n if (keyboardMode === 'grid') {\n disableInCellFocusablesForGridMode(table as unknown as HTMLTableElement)\n activeCellRef.current?.focus?.()\n return\n }\n\n disableInCellFocusablesForGridMode(table as unknown as HTMLTableElement)\n if (activeCellRef.current) {\n setDescendantsFocusable(activeCellRef.current, true)\n }\n }, [keyboardMode, ref])\n\n return { gridProps: mergedGridProps, keyboardMode }\n}\n","/**\n * Selector for elements that have their own Space/Enter behavior (buttons, switches, inputs, etc.).\n * Used to avoid table row selection capturing these keys when focus is on an interactive cell content.\n */\nconst INTERACTIVE_SELECTOR =\n 'button, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"option\"], input:not([type=\"hidden\"]), select, textarea, [href], [data-spark-component=\"dropdown-trigger\"], [data-spark-component=\"icon-button\"], [data-spark-component=\"switch\"], [data-spark-component=\"switch-input\"], [data-spark-component=\"combobox-input\"]'\n\n/** Matches table-keyboard `FOCUSABLE_SELECTOR` filtering (body cells with embedded controls). */\nconst TABLE_CELL_FOCUSABLE_DESCENDANT_SELECTOR =\n 'a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]'\n\n/**\n * Elements that are expected to \"activate\" on Space/Enter (and for which we may safely synthesize a click\n * when we intercept key events in capture phase).\n *\n * IMPORTANT: text entry controls (text inputs, textarea, select) are intentionally excluded so Space\n * keeps typing/behaving normally.\n */\nconst KEYBOARD_ACTIVATABLE_SELECTOR =\n 'button, [role=\"button\"], [role=\"switch\"], [role=\"checkbox\"], [href], input[type=\"checkbox\"], input[type=\"radio\"], input[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"]'\n\n/** Column resizer uses a hidden focusable input for keyboard resize (Enter to toggle, ArrowLeft/Right). Don't convert Enter to click there. */\nconst COLUMN_RESIZER_SELECTOR = '[data-resizable-direction]'\n\nexport function isInteractiveElement(element: EventTarget | null): element is Element {\n if (!element || !(element instanceof Element)) return false\n const el = element as Element\n\n return el.matches(INTERACTIVE_SELECTOR) || el.closest(INTERACTIVE_SELECTOR) !== null\n}\n\nexport function isKeyboardActivatableElement(element: EventTarget | null): element is Element {\n if (!element || !(element instanceof Element)) return false\n const el = element as Element\n\n return (\n el.matches(KEYBOARD_ACTIVATABLE_SELECTOR) || el.closest(KEYBOARD_ACTIVATABLE_SELECTOR) !== null\n )\n}\n\nexport function isColumnResizerElement(element: EventTarget | null): element is Element {\n if (!element || !(element instanceof Element)) return false\n\n return (element as Element).closest(COLUMN_RESIZER_SELECTOR) !== null\n}\n\nfunction elementFromEventTarget(target: EventTarget | null): Element | null {\n if (!target) return null\n if (target instanceof Element) return target\n if (target instanceof Text) return target.parentElement\n return null\n}\n\nfunction tableBodyCellHasInteractiveDescendants(cell: Element): boolean {\n for (const el of cell.querySelectorAll<HTMLElement>(TABLE_CELL_FOCUSABLE_DESCENDANT_SELECTOR)) {\n if (el === cell) continue\n if (el.hasAttribute('disabled')) continue\n if (el.getAttribute('aria-disabled') === 'true') continue\n if (el.getAttribute('hidden') !== null) continue\n return true\n }\n return false\n}\n\n/**\n * Skip React Aria row press/selection when the pointer target is inside in-cell controls\n * (or any \"interactive\" body cell — same heuristic as grid vs interaction keyboard mode).\n */\nexport function shouldSuppressRowSelectionFromPointerTarget(target: EventTarget | null): boolean {\n const el = elementFromEventTarget(target)\n if (!el) return false\n // Cast so the type guard's false-branch does not narrow `el` to `never` (Element ∧ ¬Element).\n if (isInteractiveElement(el as EventTarget)) return true\n\n const cell = el.closest('[data-spark-component=\"table-cell\"]')\n if (!cell || cell.getAttribute('data-table-cell-kind') === 'selection') return false\n\n return tableBodyCellHasInteractiveDescendants(cell)\n}\n","import { createContext } from 'react'\n\nexport type TableKeyboardMode = 'grid' | 'interaction'\n\nexport const TableKeyboardModeContext = createContext<TableKeyboardMode>('grid')\n","import type { AriaCheckboxProps } from '@react-types/checkbox'\n\nimport { Checkbox } from '../../checkbox'\n\nexport interface TableSelectionCheckboxProps {\n checkboxProps: AriaCheckboxProps\n className?: string\n /**\n * When true, marks inner controls as ignored by React Aria's focusable tree walker so Arrow keys\n * move to adjacent cells instead of trapping focus inside the checkbox (grid navigation mode).\n */\n suppressFocusWalker?: boolean\n}\n\n/**\n * Adapter that renders Spark `Checkbox` from React Aria checkbox props.\n * Used for row selection and \"select all\" in the table header.\n */\nexport function TableSelectionCheckbox({\n checkboxProps,\n className,\n suppressFocusWalker,\n}: TableSelectionCheckboxProps) {\n const { isSelected, isIndeterminate, isDisabled, onChange, ...domProps } = checkboxProps\n\n const checked = isIndeterminate === true ? 'indeterminate' : Boolean(isSelected)\n\n return (\n <span\n {...(suppressFocusWalker ? { 'data-react-aria-prevent-focus': true } : undefined)}\n onClick={e => e.stopPropagation()}\n onPointerDown={e => e.stopPropagation()}\n className={className ?? 'flex h-full min-h-full items-center justify-center'}\n >\n <Checkbox\n checked={checked}\n disabled={isDisabled}\n onCheckedChange={onChange}\n {...(domProps as any)}\n />\n </span>\n )\n}\n\nTableSelectionCheckbox.displayName = 'Table.SelectionCheckbox'\n","import { useTableSelectionCheckbox } from '@react-aria/table'\nimport type { TableState } from '@react-stately/table'\nimport type { GridNode } from '@react-types/grid'\nimport type { Key } from '@react-types/shared'\nimport { useCallback, useContext, useRef, type KeyboardEvent } from 'react'\nimport { mergeProps, useFocusRing, useTableCell } from 'react-aria'\n\nimport { cellStyles } from './Table.styles'\nimport { TableKeyboardModeContext } from './TableKeyboardModeContext'\nimport { TableSelectionCheckbox } from './TableSelectionCheckbox'\n\nexport function TableBodyCellRenderer({\n cell,\n state,\n resizeState,\n}: {\n cell: GridNode<unknown>\n state: TableState<unknown>\n resizeState: any\n}) {\n const ref = useRef<HTMLTableCellElement>(null)\n const { gridCellProps } = useTableCell({ node: cell }, state, ref)\n const { isFocusVisible, focusProps } = useFocusRing()\n const keyboardMode = useContext(TableKeyboardModeContext)\n\n const stopRowKeyboardSelectionInInteractionMode = useCallback(\n (e: KeyboardEvent<HTMLTableCellElement>) => {\n if (keyboardMode !== 'interaction') return\n if (e.key !== ' ' && e.key !== 'Enter') return\n e.stopPropagation()\n },\n [keyboardMode]\n )\n\n const { onKeyDownCapture: gridCellKeyDownCapture, ...gridCellPropsRest } = gridCellProps\n const gridCellCaptureWithListboxPassthrough = useCallback(\n (e: KeyboardEvent<HTMLTableCellElement>) => {\n // Arrow keys should not be handled by the cell-level capture handler:\n // - in grid mode, the table/grid roving focus handles navigation\n // - in interaction mode, the focused control should handle arrows (or ignore them)\n const overridenKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']\n\n if (overridenKeys.includes(e.key)) {\n return\n } else {\n gridCellKeyDownCapture?.(e)\n }\n },\n [gridCellKeyDownCapture]\n )\n\n const rowKey = (cell.parentKey ?? (cell as any).key) as Key\n const selectionCheckbox = useTableSelectionCheckbox({ key: rowKey }, state)\n const columnKey = (state.collection.columns[cell.index ?? 0]?.key ?? null) as Key | null\n const columnWidth = columnKey ? resizeState?.columnWidths?.get?.(columnKey) : undefined\n\n if ((cell.props as any)?.isSelectionCell) {\n return (\n <td\n {...mergeProps(\n gridCellPropsRest,\n { onKeyDownCapture: gridCellCaptureWithListboxPassthrough },\n focusProps,\n { onKeyDown: stopRowKeyboardSelectionInInteractionMode }\n )}\n ref={ref}\n data-spark-component=\"table-cell\"\n data-table-cell-kind=\"selection\"\n className={cellStyles({ checkbox: true })}\n data-focus-visible={isFocusVisible || undefined}\n >\n <TableSelectionCheckbox\n suppressFocusWalker={keyboardMode === 'grid'}\n checkboxProps={selectionCheckbox.checkboxProps}\n />\n </td>\n )\n }\n\n return (\n <td\n {...mergeProps(\n gridCellPropsRest,\n { onKeyDownCapture: gridCellCaptureWithListboxPassthrough },\n focusProps,\n { onKeyDown: stopRowKeyboardSelectionInInteractionMode }\n )}\n ref={ref}\n data-spark-component=\"table-cell\"\n className={cellStyles()}\n data-focus-visible={isFocusVisible || undefined}\n style={columnWidth ? { width: columnWidth } : undefined}\n >\n {cell.rendered}\n </td>\n )\n}\n\nTableBodyCellRenderer.displayName = 'Table.BodyCellRenderer'\n","import { getEventTarget } from '@react-aria/utils'\nimport type { TableState } from '@react-stately/table'\nimport type { GridNode } from '@react-types/grid'\nimport { cx } from 'class-variance-authority'\nimport { useRef, type SyntheticEvent } from 'react'\nimport { mergeProps, useFocusRing, useTableRow } from 'react-aria'\n\nimport { shouldSuppressRowSelectionFromPointerTarget } from './table-utils'\nimport { TableBodyCellRenderer } from './TableBodyCellRenderer'\n\nfunction chainUnlessInteractivePointer<E extends SyntheticEvent<unknown>>(\n handler: ((e: E) => void) | undefined\n): ((e: E) => void) | undefined {\n if (!handler) return undefined\n return (e: E) => {\n // `react-aria` types sometimes differ between `Event`/`MouseEvent` generics and DOM `Event`.\n // We only need a DOM `Event` to extract `target`.\n const eventTarget = getEventTarget(e.nativeEvent as any)\n if (shouldSuppressRowSelectionFromPointerTarget(eventTarget)) {\n return\n }\n handler(e)\n }\n}\n\nexport function TableBodyRowRenderer({\n item,\n state,\n resizeState,\n}: {\n item: GridNode<unknown>\n state: TableState<unknown>\n resizeState: any\n}) {\n const ref = useRef<HTMLTableRowElement>(null)\n const { rowProps, isSelected } = useTableRow({ node: item }, state, ref)\n const { isFocusVisible, focusProps } = useFocusRing()\n\n const { onClick, onPointerDown, onMouseDown, onPointerUp, onPointerCancel, ...restRowProps } =\n rowProps\n const rowClassName = cx(\n 'outline-none box-border data-focus-visible:u-outline-inset data-focus-visible:outline-dashed',\n (restRowProps as any).className,\n isSelected && 'bg-support-container text-on-support-container'\n )\n\n return (\n <tr\n {...mergeProps(restRowProps, focusProps)}\n onPointerDown={chainUnlessInteractivePointer(onPointerDown)}\n onMouseDown={chainUnlessInteractivePointer(onMouseDown)}\n onPointerUp={chainUnlessInteractivePointer(onPointerUp)}\n onPointerCancel={chainUnlessInteractivePointer(onPointerCancel)}\n onClick={chainUnlessInteractivePointer(onClick)}\n ref={ref}\n data-spark-component=\"table-row\"\n data-selected={isSelected || undefined}\n data-focus-visible={isFocusVisible || undefined}\n className={rowClassName}\n tabIndex={-1}\n >\n {[...item.childNodes].map(cell => (\n <TableBodyCellRenderer key={cell.key} cell={cell} state={state} resizeState={resizeState} />\n ))}\n </tr>\n )\n}\n\nTableBodyRowRenderer.displayName = 'Table.BodyRowRenderer'\n","import { useTableColumnResize } from '@react-aria/table'\nimport type { GridNode } from '@react-types/grid'\nimport { cx } from 'class-variance-authority'\nimport { useRef } from 'react'\n\nexport function TableColumnResizer({\n column,\n ariaLabel,\n resizeState,\n resizeCallbacks,\n}: {\n column: GridNode<unknown>\n ariaLabel?: string\n resizeState: any\n resizeCallbacks: {\n onResizeStart?: (widths: any) => void\n onResize?: (widths: any) => void\n onResizeEnd?: (widths: any) => void\n }\n}) {\n const resizeInputRef = useRef<HTMLInputElement>(null)\n const { resizerProps, inputProps, isResizing } = useTableColumnResize(\n {\n column,\n 'aria-label': ariaLabel ?? 'Resize column',\n onResizeStart: resizeCallbacks.onResizeStart,\n onResize: resizeCallbacks.onResize,\n onResizeEnd: resizeCallbacks.onResizeEnd,\n } as any,\n resizeState,\n resizeInputRef\n )\n\n return (\n <div\n role=\"presentation\"\n className={cx(\n // Visible resize handle on the right edge of the header.\n 'cursor-col-resize absolute inset-y-lg right-0 flex w-lg items-center justify-center',\n // Provide a visible affordance.\n 'after:block after:h-full after:w-[2px] after:bg-outline',\n // Focus visible when the hidden input is focused.\n 'has-[input:focus-visible]:after:u-outline has-[input:focus-visible]:after:outline-offset-2'\n )}\n data-resizable-direction=\"both\"\n {...resizerProps}\n >\n <input\n ref={resizeInputRef}\n // When not actively resizing, disable the input so grid keyboard navigation\n // cannot land on it (it remains programmatically focusable once enabled).\n disabled={!isResizing}\n {...inputProps}\n />\n </div>\n )\n}\n\nTableColumnResizer.displayName = 'Table.ColumnResizer'\n","import { useTableSelectAllCheckbox } from '@react-aria/table'\nimport type { TableState } from '@react-stately/table'\nimport type { Key } from '@react-types/shared'\nimport type { KeyboardEvent } from 'react'\n\nimport { TableSelectionCheckbox } from './TableSelectionCheckbox'\n\n/**\n * Header \"select all\" checkbox that bases its checked/indeterminate state only\n * on the currently visible (rendered) rows. So when the user changes page in a\n * paginated table, the header shows unchecked instead of indeterminate when no\n * visible row is selected.\n *\n * Keyboard: the column header `<th>` uses React Aria `usePress` for collection\n * selection; Space/Enter would bubble from the checkbox and toggle the wrong key.\n * We stop propagation on those keys and explicitly toggle on Enter (Radix checkbox\n * prevents default Enter on the button so it does not activate like Space).\n */\nexport function TableHeaderSelectionCheckbox({ state }: { state: TableState<unknown> }) {\n const { checkboxProps: selectAllAriaProps } = useTableSelectAllCheckbox(state)\n const { collection, selectionManager } = state\n const selectedKeys = selectionManager.selectedKeys\n\n // Visible row keys: only the body row keys (currently rendered rows).\n // TableCollection has a body node whose children are the rows.\n const collectionWithBody = collection as unknown as {\n body?: { key: Key }\n getChildren: (key: Key) => Iterable<{ key: Key }>\n getKeys: () => IterableIterator<Key>\n }\n const bodyNode = collectionWithBody.body\n const visibleRowKeys =\n bodyNode != null\n ? new Set<Key>([...collectionWithBody.getChildren(bodyNode.key)].map(node => node.key))\n : new Set<Key>(collection.getKeys())\n\n const keysSet = (selectedKeys as unknown) === 'all' ? visibleRowKeys : (selectedKeys as Set<Key>)\n const selectedVisibleCount = [...visibleRowKeys].filter(key => keysSet.has(key)).length\n const visibleCount = visibleRowKeys.size\n\n const isAllSelected = visibleCount > 0 && selectedVisibleCount === visibleCount\n const isIndeterminate = selectedVisibleCount > 0 && selectedVisibleCount < visibleCount\n\n const {\n isSelected: _ignoredSelected,\n isIndeterminate: _ignoredIndeterminate,\n onChange: toggleAllOnChange,\n ...selectAllRest\n } = selectAllAriaProps\n\n const onHeaderSelectAllKeyDown = (e: KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n e.stopPropagation()\n }\n if (e.key !== 'Enter') {\n return\n }\n e.preventDefault()\n if (!selectAllAriaProps.isDisabled) {\n toggleAllOnChange?.(!isAllSelected)\n }\n }\n\n return (\n <TableSelectionCheckbox\n checkboxProps={{\n ...selectAllRest,\n isSelected: isAllSelected,\n isIndeterminate,\n onChange: toggleAllOnChange,\n onKeyDown: onHeaderSelectAllKeyDown,\n }}\n />\n )\n}\n\nTableHeaderSelectionCheckbox.displayName = 'Table.HeaderSelectionCheckbox'\n","import type { TableState } from '@react-stately/table'\nimport type { GridNode } from '@react-types/grid'\nimport { ArrowDown } from '@spark-ui/icons/ArrowDown'\nimport { ArrowUp } from '@spark-ui/icons/ArrowUp'\nimport { Sort } from '@spark-ui/icons/Sort'\nimport { cx } from 'class-variance-authority'\nimport { useRef } from 'react'\nimport { mergeProps, useFocusRing, useTableColumnHeader } from 'react-aria'\n\nimport { Icon } from '../../icon'\nimport { columnHeaderContentStyles, columnStyles } from './Table.styles'\nimport { TableColumnResizer } from './TableColumnResizer'\nimport { TableHeaderSelectionCheckbox } from './TableHeaderSelectionCheckbox'\nimport { useTableContext } from './TableContext'\n\nexport function TableColumnHeader({\n column,\n state,\n resizeState,\n resizeCallbacks,\n isLastColumnInRow = false,\n}: {\n column: GridNode<unknown>\n state: TableState<unknown>\n resizeState: any\n resizeCallbacks: {\n onResizeStart?: (widths: any) => void\n onResize?: (widths: any) => void\n onResizeEnd?: (widths: any) => void\n }\n /** Rightmost header cell in this row. No resizer — nothing to resize against. */\n isLastColumnInRow?: boolean\n}) {\n const ref = useRef<HTMLTableCellElement>(null)\n const { resizeColumnAriaLabel } = useTableContext()\n const { columnHeaderProps } = useTableColumnHeader({ node: column }, state, ref)\n const { isFocusVisible, focusProps } = useFocusRing()\n const allowsResizing =\n (column.props as any)?.allowsResizing !== false && !isLastColumnInRow\n const columnWidth = resizeState?.columnWidths?.get?.(column.key)\n const hasResizer = Boolean(resizeState && allowsResizing)\n\n if ((column.props as any)?.isSelectionCell) {\n return (\n <th\n {...columnHeaderProps}\n ref={ref}\n role=\"columnheader\"\n className={columnStyles({ checkbox: true })}\n data-spark-component=\"table-column\"\n data-table-selection-columnheader\n data-focus-visible={isFocusVisible || undefined}\n >\n <TableHeaderSelectionCheckbox state={state} />\n </th>\n )\n }\n\n const allowsSorting = Boolean((column.props as any)?.allowsSorting)\n const isSorted = state.sortDescriptor?.column === column.key\n const direction = state.sortDescriptor?.direction ?? 'ascending'\n const sortIcon = (() => {\n if (!isSorted) return <Sort />\n return direction === 'descending' ? <ArrowDown /> : <ArrowUp />\n })()\n\n const handleSortingKeyDown = (e: React.KeyboardEvent) => {\n // Ensure keyboard sorting works even when column resizing is enabled.\n if (!allowsSorting) return\n if (e.key !== 'Enter' && e.key !== ' ') return\n e.preventDefault()\n e.stopPropagation()\n ;(state as any).sort?.(column.key)\n }\n\n return (\n <th\n {...mergeProps(columnHeaderProps, focusProps)}\n ref={ref}\n role=\"columnheader\"\n className={cx(columnStyles({ resizable: hasResizer }))}\n style={columnWidth ? { width: columnWidth } : undefined}\n data-spark-component=\"table-column\"\n data-focus-visible={isFocusVisible || undefined}\n onKeyDown={handleSortingKeyDown}\n >\n <div className={columnHeaderContentStyles()}>\n <button\n type=\"button\"\n className={cx(\n // Make the header title focusable so grid keyboard navigation lands here\n // instead of the resizer when resizing is enabled.\n 'gap-md flex min-w-0 flex-1 items-center text-left',\n 'focus-visible:u-outline outline-none',\n // Avoid default button styling impacting layout.\n 'bg-transparent p-0 border-0'\n )}\n onKeyDown={handleSortingKeyDown}\n >\n <span className=\"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap\">\n {column.rendered}\n </span>\n </button>\n {allowsSorting ? (\n <span\n aria-hidden=\"true\"\n className={cx(\n 'shrink-0 opacity-dim-2 group-hover/column:opacity-100',\n isSorted && 'opacity-100'\n )}\n >\n <Icon size=\"sm\">{sortIcon}</Icon>\n </span>\n ) : null}\n </div>\n {resizeState && allowsResizing ? (\n <TableColumnResizer\n column={column}\n ariaLabel={\n typeof resizeColumnAriaLabel === 'function'\n ? resizeColumnAriaLabel(column)\n : resizeColumnAriaLabel\n }\n resizeState={resizeState}\n resizeCallbacks={resizeCallbacks}\n />\n ) : null}\n </th>\n )\n}\n\nTableColumnHeader.displayName = 'Table.ColumnHeader'\n","import type { TableState } from '@react-stately/table'\nimport type { GridNode } from '@react-types/grid'\nimport { useRef } from 'react'\nimport { useTableHeaderRow } from 'react-aria'\n\nimport { TableColumnHeader } from './TableColumnHeader'\n\nexport function TableHeaderRowRenderer({\n item,\n state,\n resizeState,\n resizeCallbacks,\n}: {\n item: GridNode<unknown>\n state: TableState<unknown>\n resizeState: any\n resizeCallbacks: {\n onResizeStart?: (widths: any) => void\n onResize?: (widths: any) => void\n onResizeEnd?: (widths: any) => void\n }\n}) {\n const ref = useRef<HTMLTableRowElement>(null)\n const { rowProps } = useTableHeaderRow({ node: item }, state, ref)\n const columns = [...item.childNodes]\n return (\n <tr {...rowProps} ref={ref}>\n {columns.map((column, index) => (\n <TableColumnHeader\n key={column.key}\n column={column}\n state={state}\n resizeState={resizeState}\n resizeCallbacks={resizeCallbacks}\n isLastColumnInRow={index === columns.length - 1}\n />\n ))}\n </tr>\n )\n}\n\nTableHeaderRowRenderer.displayName = 'Table.HeaderRowRenderer'\n","import { filterDOMProps } from '@react-aria/utils'\nimport { useTableColumnResizeState } from '@react-stately/table'\nimport { useTableState } from '@react-stately/table'\nimport type { TableState } from '@react-stately/table'\nimport type { TableProps as AriaTableProps } from '@react-types/table'\nimport { cx } from 'class-variance-authority'\nimport type { ReactNode } from 'react'\nimport { useRef } from 'react'\nimport { mergeProps, useTable, useTableRowGroup } from 'react-aria'\n\nimport { tableBodySpacerRowStyles } from './Table.styles'\nimport { useTableKeyboardModes } from './table-keyboard'\nimport { TableBodyRowRenderer } from './TableBodyRowRenderer'\nimport { useTableResizableContext } from './TableContext'\nimport { TableHeaderRowRenderer } from './TableHeaderRowRenderer'\nimport { TableKeyboardModeContext } from './TableKeyboardModeContext'\n\nexport function TableRoot({\n className,\n children,\n ...props\n}: AriaTableProps<object> & { className?: string; children?: AriaTableProps<object>['children'] }) {\n const tableRef = useRef<HTMLTableElement>(null)\n const resizable = useTableResizableContext()\n const shouldUseFixedLayout = (props as any).selectionMode === 'multiple'\n\n const state = useTableState({\n ...(props as AriaTableProps<object>),\n showSelectionCheckboxes: (props as AriaTableProps<object>).selectionMode === 'multiple',\n children,\n })\n\n const columnResizeState = useTableColumnResizeState(\n { tableWidth: resizable.tableWidth },\n state as unknown as TableState<unknown>\n )\n const resizeState =\n resizable.isResizable && (props as any).allowsResizing !== false ? columnResizeState : null\n\n const { gridProps } = useTable({ ...(props as AriaTableProps<unknown>) }, state, tableRef)\n\n const headerRows = state.collection.headerRows\n const bodyRows = [...state.collection.body.childNodes]\n const emptyStateRenderer = (state.collection.body.props as any)?.renderEmptyState as\n | ((props: { isEmpty: boolean; isDropTarget?: boolean }) => ReactNode)\n | undefined\n\n const columnCount = state.collection.columns.length || 1\n const showBodySpacer = bodyRows.length > 0 || Boolean(emptyStateRenderer)\n\n const { rowGroupProps: theadProps } = useTableRowGroup()\n const { rowGroupProps: tbodyProps } = useTableRowGroup()\n\n const { gridProps: keyboardGridProps, keyboardMode } = useTableKeyboardModes({\n ref: tableRef,\n gridProps,\n onKeyDownCapture: (props as any).onKeyDownCapture,\n onFocusCapture: (props as any).onFocusCapture,\n })\n\n return (\n <TableKeyboardModeContext.Provider value={keyboardMode}>\n <table\n {...mergeProps(keyboardGridProps, filterDOMProps(props as any, { global: true }))}\n ref={tableRef}\n data-spark-component=\"table\"\n className={cx(\n 'default:w-full',\n shouldUseFixedLayout ? 'table-fixed' : undefined,\n 'border-separate border-spacing-y-0',\n 'bg-surface',\n 'outline-none',\n 'text-body-1',\n 'forced-color-adjust-none',\n 'data-focus-visible:u-outline-inset',\n 'has-[>[data-empty]]:h-full',\n className\n )}\n >\n <thead {...theadProps} data-spark-component=\"table-header\">\n {headerRows.map(headerRow => (\n <TableHeaderRowRenderer\n key={headerRow.key}\n item={headerRow}\n state={state as TableState<unknown>}\n resizeState={resizeState as any}\n resizeCallbacks={{\n onResizeStart: (props as any).onResizeStart,\n onResize: (props as any).onResize,\n onResizeEnd: (props as any).onResizeEnd,\n }}\n />\n ))}\n </thead>\n <tbody {...tbodyProps} data-spark-component=\"table-body\">\n {showBodySpacer ? (\n <tr\n aria-hidden=\"true\"\n className={tableBodySpacerRowStyles()}\n role=\"presentation\"\n data-spark-component=\"table-body-spacer\"\n >\n <td colSpan={columnCount} role=\"presentation\" />\n </tr>\n ) : null}\n {bodyRows.length === 0 && emptyStateRenderer ? (\n <tr data-empty>\n <td colSpan={columnCount}>\n {emptyStateRenderer({ isEmpty: true })}\n </td>\n </tr>\n ) : null}\n {bodyRows.map(row => (\n <TableBodyRowRenderer\n key={row.key}\n item={row}\n state={state as TableState<unknown>}\n resizeState={resizeState as any}\n />\n ))}\n </tbody>\n </table>\n </TableKeyboardModeContext.Provider>\n )\n}\n\nTableRoot.displayName = 'Table.Grid.Inner'\n","import type { TableProps as AriaTableProps } from '@react-types/table'\n\nimport { ResizableTableContainer } from './ResizableTableContainer'\nimport { useTableContext } from './TableContext'\nimport { TableRoot } from './TableRoot'\n\nfunction toMaxHeightStyle(value: number | string): React.CSSProperties['maxHeight'] {\n return typeof value === 'number' ? `${value}px` : value\n}\n\nexport interface TableGridProps {\n /** Required for accessibility. */\n 'aria-label'?: string\n 'aria-labelledby'?: string\n className?: string\n children?: AriaTableProps<object>['children']\n}\n\nexport function TableGrid({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className: gridClassName,\n children,\n}: TableGridProps) {\n const ctx = useTableContext()\n const {\n allowsResizing = true,\n maxHeight,\n onResizeStart,\n onResize,\n onResizeEnd,\n onKeyDownCapture,\n sortDescriptor,\n onSortChange,\n className: contextClassName,\n ...ariaTableProps\n } = ctx\n\n const scrollContainerStyle =\n maxHeight != null ? { maxHeight: toMaxHeightStyle(maxHeight) } : undefined\n const className = gridClassName ?? contextClassName\n\n const tableRootProps = {\n ...ariaTableProps,\n ...(ariaLabel != null && { 'aria-label': ariaLabel }),\n ...(ariaLabelledBy != null && { 'aria-labelledby': ariaLabelledBy }),\n sortDescriptor,\n onSortChange,\n onKeyDownCapture,\n className,\n }\n\n // React Aria's Table expects a tuple of [Header, Body] children.\n // We keep the public `Table.Grid` API flexible, so we intentionally type-erase at this boundary.\n const TableRootAny = TableRoot as any\n\n if (allowsResizing) {\n return (\n <ResizableTableContainer\n className={className}\n style={scrollContainerStyle}\n onResizeStart={onResizeStart}\n onResize={onResize}\n onResizeEnd={onResizeEnd}\n >\n <TableRootAny {...tableRootProps}>{children}</TableRootAny>\n </ResizableTableContainer>\n )\n }\n\n return (\n <div className=\"relative w-full overflow-auto\" style={scrollContainerStyle}>\n <TableRootAny {...tableRootProps}>{children}</TableRootAny>\n </div>\n )\n}\n\nTableGrid.displayName = 'Table.Grid'\n","import type { TableBodyProps as StatelyTableBodyProps } from '@react-stately/table'\nimport { TableBody as StatelyTableBody } from '@react-stately/table'\nimport type { ReactNode } from 'react'\n\nexport interface TableBodyProps<T extends object = object> extends StatelyTableBodyProps<T> {\n className?: string\n /** Spark-only: used to re-render body when external deps change (Storybook/demo convenience). */\n dependencies?: unknown[]\n /** Spark-only: empty state renderer (handled by Spark Table renderer). */\n renderEmptyState?: () => ReactNode\n}\n\nexport function TableBody<T extends object>(props: TableBodyProps<T>) {\n return <StatelyTableBody {...(props as unknown as StatelyTableBodyProps<T>)} />\n}\n\nTableBody.displayName = 'Table.Body'\n\n// Forward React Stately collection static for useTableState.\n;(TableBody as any).getCollectionNode = (StatelyTableBody as any).getCollectionNode\n","import { cx } from 'class-variance-authority'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport { createContext, useContext } from 'react'\n\nimport { Button, type ButtonProps } from '../button'\nimport { useTableContext } from './internal/TableContext'\n\ninterface TableBulkBarContextValue {\n selectedCount: number\n totalCount?: number\n onClearSelection: () => void\n onSelectAll?: () => void\n /** When true, \"Clear all\" and \"Select all\" are shown (subject to their own conditions). */\n hasMultiplePages?: boolean\n}\n\nconst TableBulkBarContext = createContext<TableBulkBarContextValue | null>(null)\n\nfunction useTableBulkBarContext() {\n const ctx = useContext(TableBulkBarContext)\n\n if (!ctx) {\n throw new Error('Table.BulkBar subcomponents must be used within Table.BulkBar')\n }\n\n return ctx\n}\n\nexport interface TableBulkBarProps {\n children: ReactNode\n className?: string\n /** `aria-label` for the toolbar (for i18n). Overrides `bulkBarAriaLabel` from `Table`. */\n 'aria-label'?: string\n /**\n * Additional props passed to the root element.\n * Note: `role` is fixed to \"toolbar\".\n */\n rootProps?: Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className' | 'role' | 'aria-label'>\n}\n\nfunction TableBulkBarRoot({ children, className, rootProps, ...props }: TableBulkBarProps) {\n const { selectedCount, totalCount, onClearSelection, onSelectAll, hasMultiplePages } = useTableContext()\n\n const contextValue: TableBulkBarContextValue = {\n selectedCount,\n totalCount,\n onClearSelection,\n onSelectAll,\n hasMultiplePages,\n }\n\n return (\n <TableBulkBarContext.Provider value={contextValue}>\n <div\n role=\"toolbar\"\n aria-label={props['aria-label'] ?? 'Table bulk actions'}\n data-spark-component=\"table-bulk-bar\"\n className={cx(\n 'gap-lg min-h-sz-64 flex w-full flex-wrap items-center justify-between',\n 'rounded-lg',\n 'bg-support-container text-on-support-container p-lg',\n className\n )}\n {...rootProps}\n >\n {children}\n </div>\n </TableBulkBarContext.Provider>\n )\n}\n\nfunction TableBulkBarSelectedCount({ children }: { children: ReactNode }) {\n useTableBulkBarContext() // enforce usage within BulkBar\n\n return <span className=\"text-body-1 font-bold\">{children}</span>\n}\n\ntype BulkBarButtonProps = Omit<ButtonProps, 'onClick'>\n\nfunction TableBulkBarClearButton({ className, children, ...props }: BulkBarButtonProps) {\n const { selectedCount, onClearSelection, hasMultiplePages } = useTableBulkBarContext()\n\n if (!hasMultiplePages) {\n return null\n }\n\n const ariaDisabled = selectedCount === 0\n\n return (\n <Button\n size=\"sm\"\n design=\"ghost\"\n intent=\"support\"\n underline\n ariaDisabled={ariaDisabled}\n onClick={onClearSelection}\n className={cx('text-body-2', className)}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction TableBulkBarSelectAllButton({ className, children, ...props }: BulkBarButtonProps) {\n const { selectedCount, totalCount, onSelectAll, hasMultiplePages } = useTableBulkBarContext()\n\n if (!hasMultiplePages) {\n return null\n }\n\n const ariaDisabled = totalCount == null || onSelectAll == null || selectedCount >= totalCount\n\n return (\n <Button\n size=\"sm\"\n design=\"ghost\"\n intent=\"support\"\n underline\n ariaDisabled={ariaDisabled}\n onClick={onSelectAll}\n className={cx('text-body-2', className)}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nTableBulkBarRoot.displayName = 'Table.BulkBar'\n\nexport const TableBulkBar = TableBulkBarRoot\nTableBulkBar.displayName = 'Table.BulkBar'\n\nexport { TableBulkBarSelectedCount, TableBulkBarClearButton, TableBulkBarSelectAllButton }\nTableBulkBarSelectedCount.displayName = 'Table.BulkBarSelectedCount'\nTableBulkBarClearButton.displayName = 'Table.BulkBarClearButton'\nTableBulkBarSelectAllButton.displayName = 'Table.BulkBarSelectAllButton'\n","import type { CellProps as StatelyCellProps } from '@react-stately/table'\nimport { Cell as StatelyCell } from '@react-stately/table'\n\nexport interface CellProps extends StatelyCellProps {\n className?: string\n checkbox?: boolean\n}\n\nexport function Cell(props: CellProps) {\n return <StatelyCell {...(props as unknown as StatelyCellProps)} />\n}\n\nCell.displayName = 'Table.Cell'\n\n// Forward React Stately collection static for useTableState.\n;(Cell as any).getCollectionNode = (StatelyCell as any).getCollectionNode\n","import type { PartialNode } from '@react-stately/collections'\nimport type { Key } from '@react-types/shared'\nimport type { ColumnProps as ReactTypesColumnProps } from '@react-types/table'\nimport React, { type ReactElement, type ReactNode } from 'react'\n\nexport interface ColumnProps<T extends object = object> extends Omit<\n ReactTypesColumnProps<T>,\n 'title' | 'children'\n> {\n /** Spark-only props. Stored on the column node and used by the renderer. */\n className?: string\n /** Stable key for the column (Spark API). */\n id?: Key\n /** Header label (Spark API). */\n label: string\n /** Optional header content (Spark API). */\n children?: ReactNode\n allowsResizing?: boolean\n}\n\nexport function Column<T extends object>({\n label,\n allowsResizing = true,\n ...props\n}: ColumnProps<T>) {\n // Collection component: does not render DOM.\n void label\n void allowsResizing\n void props\n return null\n}\n\nColumn.displayName = 'Table.Column'\n\n// React Stately collection static for useTableState, but with Spark's `id` support:\n// React Stately's CollectionBuilder derives keys from React element keys, not `props.id`,\n// so we explicitly set `key` from the `id` prop to preserve Spark's API and tests.\n;(Column as any).getCollectionNode = function* getCollectionNode<T>(\n columnProps: ReactTypesColumnProps<T> & { label?: string; allowsResizing?: boolean },\n context: any\n): Generator<PartialNode<T>, void, any> {\n const rendered =\n (columnProps as any).title ?? (columnProps as any).label ?? columnProps.children ?? null\n const textValue =\n (columnProps as any).textValue ||\n (typeof rendered === 'string' ? rendered : '') ||\n (columnProps as any)['aria-label']\n\n const idKey = (columnProps as any).id\n\n const fullNodes = (yield {\n type: 'column',\n key: idKey ?? null,\n hasChildNodes:\n !!(columnProps as any).childColumns ||\n (!!(columnProps as any).title && React.Children.count(columnProps.children) > 0),\n rendered,\n textValue,\n props: {\n ...(columnProps as any),\n title: (columnProps as any).title ?? (columnProps as any).label,\n allowsResizing: (columnProps as any).allowsResizing,\n },\n *childNodes() {\n if ((columnProps as any).childColumns) {\n for (const child of (columnProps as any).childColumns) {\n yield { type: 'column', value: child }\n }\n } else if ((columnProps as any).title) {\n const childColumns: PartialNode<T>[] = []\n React.Children.forEach(columnProps.children, child => {\n childColumns.push({\n type: 'column',\n element: child as ReactElement<ReactTypesColumnProps<T>>,\n })\n })\n yield* childColumns\n }\n },\n shouldInvalidate(newContext: any) {\n updateContext(newContext)\n return false\n },\n } as PartialNode<T>) as any\n\n const updateContext = (ctx: any) => {\n for (const node of fullNodes) {\n if (!node.hasChildNodes) {\n ctx.columns.push(node)\n }\n }\n }\n\n updateContext(context)\n}\n","import type { TableHeaderProps as StatelyTableHeaderProps } from '@react-stately/table'\nimport { TableHeader as StatelyTableHeader } from '@react-stately/table'\n\nexport interface TableHeaderProps<T extends object = object> extends StatelyTableHeaderProps<T> {\n /**\n * Spark-only props. They are stored on the collection node and used by the renderer.\n * (No DOM is rendered by `@react-stately/table` collection components.)\n */\n className?: string\n sticky?: boolean\n}\n\nexport function TableHeader<T extends object>(props: TableHeaderProps<T>) {\n return <StatelyTableHeader {...(props as unknown as StatelyTableHeaderProps<T>)} />\n}\n\nTableHeader.displayName = 'Table.Header'\n\n// Forward React Stately collection static for useTableState.\n;(TableHeader as any).getCollectionNode = (StatelyTableHeader as any).getCollectionNode\n","import type { PartialNode } from '@react-stately/collections'\nimport type { Key } from '@react-types/shared'\nimport type { RowProps as ReactTypesRowProps } from '@react-types/table'\nimport React, { type ReactElement } from 'react'\n\nexport interface RowProps<T extends object = object> extends ReactTypesRowProps<T> {\n className?: string\n /** Stable key for the row (Spark API). */\n id?: Key\n /** Called when the row is activated (e.g. Enter on a link row). */\n onAction?: () => void\n}\n\nexport function Row<T extends object>(props: RowProps<T>) {\n // Collection component: does not render DOM.\n void props\n return null\n}\n\nRow.displayName = 'Table.Row'\n\n// React Stately collection static for useTableState, but with Spark's `id` support:\n// CollectionBuilder derives keys from React element keys, not `props.id`, so we explicitly set `key`.\n;(Row as any).getCollectionNode = function* getCollectionNode<T extends object>(\n props: ReactTypesRowProps<T> & { UNSTABLE_childItems?: any[] },\n context: any\n): Generator<PartialNode<T>, void, any> {\n const { children, textValue, UNSTABLE_childItems } = props as any\n const idKey = (props as any).id\n\n yield {\n type: 'item',\n key: idKey ?? null,\n props,\n textValue,\n 'aria-label': (props as any)['aria-label'],\n hasChildNodes: true,\n *childNodes() {\n if (context.showDragButtons) {\n yield {\n type: 'cell',\n key: 'header-drag',\n props: { isDragButtonCell: true },\n }\n }\n\n if (context.showSelectionCheckboxes && context.selectionMode !== 'none') {\n yield {\n type: 'cell',\n key: 'header',\n props: { isSelectionCell: true },\n }\n }\n\n if (typeof children === 'function') {\n for (const column of context.columns) {\n yield {\n type: 'cell',\n element: children(column.key),\n key: column.key,\n }\n }\n\n if (UNSTABLE_childItems) {\n for (const child of UNSTABLE_childItems) {\n yield { type: 'item', value: child }\n }\n }\n } else {\n const cells: PartialNode<T>[] = []\n const childRows: PartialNode<T>[] = []\n let columnCount = 0\n\n React.Children.forEach(children, node => {\n if (!node) return\n if ((node as any).type === Row) {\n if (cells.length < context.columns.length) {\n throw new Error(\n \"All of a Row's child Cells must be positioned before any child Rows.\"\n )\n }\n\n childRows.push({ type: 'item', element: node as ReactElement<ReactTypesRowProps<T>> })\n } else {\n cells.push({ type: 'cell', element: node as any })\n columnCount += (node as any).props?.colSpan ?? 1\n }\n })\n\n if (columnCount !== context.columns.length) {\n throw new Error(\n `Cell count must match column count. Found ${columnCount} cells and ${context.columns.length} columns.`\n )\n }\n\n yield* cells\n yield* childRows\n }\n },\n shouldInvalidate(newContext: any) {\n return (\n newContext.columns.length !== context.columns.length ||\n newContext.columns.some((c: any, i: number) => c.key !== context.columns[i].key) ||\n newContext.showSelectionCheckboxes !== context.showSelectionCheckboxes ||\n newContext.showDragButtons !== context.showDragButtons ||\n newContext.selectionMode !== context.selectionMode\n )\n },\n } satisfies PartialNode<T>\n}\n","import type { SortDescriptor } from '@react-types/shared'\nimport { useMemo, useState } from 'react'\n\nexport interface UseTableSortOptions<T extends object> {\n /** Initial sort column and direction. */\n initialSort?: {\n column: keyof T\n direction: 'ascending' | 'descending'\n }\n /**\n * Custom compare function. If not provided, a default comparator is used:\n * - numbers: numeric comparison\n * - other: localeCompare on string representation\n */\n compare?: (a: T, b: T, column: keyof T, direction: 'ascending' | 'descending') => number\n}\n\nfunction defaultCompare<T extends object>(\n a: T,\n b: T,\n column: keyof T,\n direction: 'ascending' | 'descending'\n): number {\n const aVal = a[column]\n const bVal = b[column]\n\n if (aVal === bVal) return 0\n\n let comparisonResult: number\n if (typeof aVal === 'number' && typeof bVal === 'number') {\n comparisonResult = aVal < bVal ? -1 : 1\n } else {\n comparisonResult = String(aVal).localeCompare(String(bVal))\n }\n\n return direction === 'descending' ? -comparisonResult : comparisonResult\n}\n\n/**\n * Hook to manage table sort state and derive sorted items from a list.\n * Use with Table's sortDescriptor and onSortChange props.\n *\n * @example\n * const { sortDescriptor, onSortChange, setSortDescriptor, sortedItems } = useTableSort(rows, {\n * initialSort: { column: 'name', direction: 'ascending' },\n * })\n * return (\n * <>\n * <Button onClick={() => setSortDescriptor({ column: 'name', direction: 'ascending' })}>Reset sort</Button>\n * <Table sortDescriptor={sortDescriptor} onSortChange={onSortChange}>\n * ...\n * </Table>\n * </>\n * )\n */\nexport function useTableSort<T extends object>(\n items: T[],\n options: UseTableSortOptions<T> = {}\n): {\n sortDescriptor: SortDescriptor\n onSortChange: (descriptor: SortDescriptor) => void\n /** Set sort from outside the table (e.g. a \"Reset sort\" button). */\n setSortDescriptor: (descriptor: SortDescriptor) => void\n sortedItems: T[]\n} {\n const { initialSort, compare } = options\n\n const [sortDescriptor, setSortDescriptor] = useState<SortDescriptor>(() =>\n initialSort\n ? { column: initialSort.column as string, direction: initialSort.direction }\n : { column: 'id', direction: 'ascending' }\n )\n\n const sortedItems = useMemo(() => {\n const column = sortDescriptor.column as keyof T\n if (!column) return [...items]\n\n const compareFn = compare ?? defaultCompare\n const direction = sortDescriptor.direction ?? 'ascending'\n\n return [...items].sort((a, b) => compareFn(a, b, column, direction))\n }, [items, sortDescriptor.column, sortDescriptor.direction, compare])\n\n return {\n sortDescriptor,\n onSortChange: setSortDescriptor,\n setSortDescriptor,\n sortedItems,\n }\n}\n","import type { Key, Selection } from '@react-types/shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nexport interface UseTablePaginationOptions<T> {\n /** Number of items per page. */\n pageSize: number\n /** Initial page index (1-based). Defaults to 1. */\n initialPage?: number\n /**\n * Function to extract a stable key from each item.\n * Defaults to `item.id` if present.\n */\n getId?: (item: T) => Key\n}\n\nexport interface UseTablePaginationResult<T> {\n /** Current page (1-based). */\n page: number\n /** Update the current page manually. */\n setPage: (page: number) => void\n /** Items sliced to the current page. */\n pageItems: T[]\n /** Total number of items. */\n totalItems: number\n /** Total number of pages (at least 1). */\n totalPages: number\n /** All item keys across all pages. */\n allKeys: Set<Key>\n /**\n * Selection state across all pages.\n * Pass to Table (root) as `selectedKeys`.\n */\n selectedKeys: Set<Key>\n /**\n * Selection change handler that keeps selection across pages.\n * Pass to Table (root) as `onSelectionChange`.\n */\n onSelectionChange: (keys: Selection) => void\n /**\n * Convenience handler matching Pagination's `onPageChange` signature:\n * `onPageChange={({ page }) => ...}`.\n */\n onPageChange: (details: { page: number }) => void\n /** Clear selection across all pages. */\n clearSelection: () => void\n}\n\n/**\n * Hook to manage simple client-side pagination and multi-page selection for Table.\n * It slices the full item list to the current page, tracks page state, and merges\n * selection across pages so that rows selected on previous pages remain selected.\n *\n * @example\n * const { page, pageItems, totalItems, allKeys, selectedKeys, onSelectionChange, onPageChange } =\n * useTablePagination(allItems, { pageSize: 10 })\n *\n * return (\n * <Table\n * selectionMode=\"multiple\"\n * selectedKeys={selectedKeys}\n * onSelectionChange={onSelectionChange}\n * totalCount={totalItems}\n * hasMultiplePages={totalItems > 10}\n * onSelectAll={() => onSelectionChange(allKeys)}\n * >\n * <Table.BulkBar>...</Table.BulkBar>\n * <Table.Grid aria-label=\"Items\">\n * <Table.Body>\n * {pageItems.map(item => (\n * <Table.Row key={item.id} id={item.id}>...</Table.Row>\n * ))}\n * </Table.Body>\n * </Table.Grid>\n * <Pagination page={page} pageSize={10} count={totalItems} onPageChange={onPageChange} />\n * </Table>\n * )\n */\nexport function useTablePagination<T>(\n items: T[],\n options: UseTablePaginationOptions<T>\n): UseTablePaginationResult<T> {\n const { pageSize, initialPage = 1, getId } = options\n\n const [page, setPage] = useState(initialPage)\n const [selectedKeys, setSelectedKeys] = useState<Set<Key>>(() => new Set())\n\n const totalItems = items.length\n const totalPages = Math.max(1, Math.ceil(totalItems / pageSize))\n\n // Clamp current page when the total page count changes (e.g. items length shrinks).\n useEffect(() => {\n setPage(current => {\n if (current < 1) return 1\n if (current > totalPages) return totalPages\n\n return current\n })\n }, [totalPages])\n\n let effectivePage = page\n if (effectivePage < 1) {\n effectivePage = 1\n } else if (effectivePage > totalPages) {\n effectivePage = totalPages\n }\n\n const pageItems = useMemo(() => {\n const start = (effectivePage - 1) * pageSize\n const end = start + pageSize\n\n return items.slice(start, end)\n }, [items, effectivePage, pageSize])\n\n const allKeys = useMemo(() => {\n const resolveId =\n getId ??\n ((item: T) => {\n const candidate = (item as unknown as { id?: Key }).id\n\n if (candidate == null) {\n throw new Error(\n 'useTablePagination: item.id is undefined. Provide a `getId` option to extract a stable key.'\n )\n }\n\n return candidate\n })\n\n return new Set<Key>(items.map(item => resolveId(item)))\n }, [getId, items])\n\n const pageIds = useMemo(() => {\n const resolveId =\n getId ??\n ((item: T) => {\n const candidate = (item as unknown as { id?: Key }).id\n\n if (candidate == null) {\n throw new Error(\n 'useTablePagination: item.id is undefined. Provide a `getId` option to extract a stable key.'\n )\n }\n\n return candidate\n })\n\n return new Set<Key>(pageItems.map(item => resolveId(item)))\n }, [getId, pageItems])\n\n const handleSelectionChange = (keys: Selection) => {\n // React Aria uses \"all\" to represent \"select all\" in the current context.\n // For the table header checkbox, interpret \"all\" as \"all items on the current page\".\n const newPageSelection = keys === 'all' ? new Set<Key>(pageIds) : new Set(keys as Set<Key>)\n\n setSelectedKeys(prev => {\n const next = new Set<Key>(newPageSelection)\n\n // Keep selections from other pages.\n for (const key of prev) {\n if (!pageIds.has(key)) {\n next.add(key)\n }\n }\n\n return next\n })\n }\n\n const handlePageChange = (details: { page: number }) => {\n setPage(details.page)\n }\n\n const clearSelection = () => {\n setSelectedKeys(() => new Set())\n }\n\n return {\n page: effectivePage,\n setPage,\n pageItems,\n totalItems,\n totalPages,\n allKeys,\n selectedKeys,\n onSelectionChange: handleSelectionChange,\n onPageChange: handlePageChange,\n clearSelection,\n }\n}\n","import { TableGrid, TableRootWrapper } from './Table'\nimport { TableBody } from './TableBody'\nimport {\n TableBulkBar,\n TableBulkBarClearButton,\n TableBulkBarSelectAllButton,\n TableBulkBarSelectedCount,\n} from './TableBulkBar'\nimport { Cell } from './TableCell'\nimport { Column } from './TableColumn'\nimport { TableHeader } from './TableHeader'\nimport { Row } from './TableRow'\n\nexport const TableWithSubcomponents: typeof TableRootWrapper & {\n Grid: typeof TableGrid\n Header: typeof TableHeader\n Column: typeof Column\n Body: typeof TableBody\n Row: typeof Row\n Cell: typeof Cell\n BulkBar: typeof TableBulkBar\n BulkBarSelectedCount: typeof TableBulkBarSelectedCount\n BulkBarClearButton: typeof TableBulkBarClearButton\n BulkBarSelectAllButton: typeof TableBulkBarSelectAllButton\n} = Object.assign(TableRootWrapper, {\n Grid: TableGrid,\n Header: TableHeader,\n Column,\n Body: TableBody,\n Row,\n Cell,\n BulkBar: TableBulkBar,\n BulkBarSelectedCount: TableBulkBarSelectedCount,\n BulkBarClearButton: TableBulkBarClearButton,\n BulkBarSelectAllButton: TableBulkBarSelectAllButton,\n})\n\nTableWithSubcomponents.displayName = 'Table'\nTableHeader.displayName = 'Table.Header'\nColumn.displayName = 'Table.Column'\nTableBody.displayName = 'Table.Body'\nRow.displayName = 'Table.Row'\nCell.displayName = 'Table.Cell'\n\nexport { TableWithSubcomponents as Table }\n\nexport { useTableSort } from './useTableSort'\nexport { useTablePagination } from './useTablePagination'\nexport type { SortDescriptor } from '@react-types/shared'\nexport type { UseTableSortOptions } from './useTableSort'\nexport type { UseTablePaginationOptions, UseTablePaginationResult } from './useTablePagination'\nexport { type TableGridProps, type TableProps, type TableRootWrapperProps } from './Table'\nexport { type TableHeaderProps } from './TableHeader'\nexport { type ColumnProps } from './TableColumn'\nexport { type TableBodyProps } from './TableBody'\nexport { type RowProps } from './TableRow'\nexport { type CellProps } from './TableCell'\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAa,KAAwB,EAA0C;CAC7E,aAAa;CACb,YAAY;CACb,CAAC;AAEF,SAAgB,KAA2B;AACzC,QAAO,EAAW,GAAsB;;AAsC1C,IAAa,KAAe,EALwB;CAClD,eAAe;CACf,wBAAwB;CACzB,CAEqF;AAEtF,SAAgB,IAAqC;AACnD,QAAO,EAAW,GAAa;;;;ACnBjC,SAAgB,EAAiB,EAC/B,aACA,cACA,iBACA,sBACA,eACA,qBACA,kBAAkB,GAClB,gBACA,oBAAiB,IACjB,0BACA,cACA,kBACA,aACA,gBACA,qBACA,mBACA,iBACA,GAAG,KACqB;CACxB,IAAI,IAAgB;AAEpB,CAAI,MAAiB,QACnB,IAAgB,KAAc,IACrB,aAAwB,MACjC,IAAgB,EAAa,OACpB,MACT,IAAgB,IAAI,IAAI,EAAa,CAAC;CAExC,IAAM,IAAmB,YAA+B,oBAAoB,IAAI,KAAK,CAAC,GAEhF,IAAe;EACnB,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;AAED,QACE,kBAAC,GAAa,UAAd;EAAuB,OAAO;YAC5B,kBAAC,OAAD;GAAK,WAAW,EAAG,wBAAwB,EAAU;GAAG;GAAe,CAAA;EACjD,CAAA;;AAI5B,EAAiB,cAAc;;;ACnF/B,SAAgB,EAAwB,EACtC,cACA,aACA,GAAG,KAC4B;CAC/B,IAAM,IAAe,EAAuB,KAAK,EAC3C,CAAC,GAAY,KAAiB,EAAS,EAAE;AAmB/C,QAjBA,QAAsB;EACpB,IAAM,IAAK,EAAa;AACnB,OAEgB,EAAc,EAAG,YAAY;IAEjD,EAAE,CAAC,EAEN,EAAkB;EAChB,KAAK;EACL,gBAAgB;GACd,IAAM,IAAK,EAAa;AACnB,QACL,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17.3.2",
4
4
  "license": "MIT",
5
5
  "description": "Spark (Leboncoin design system) components.",
6
6
  "exports": {
@@ -53,9 +53,9 @@
53
53
  "@react-aria/toast": "^3.0.0-beta.18",
54
54
  "@react-stately/numberfield": "3.9.11",
55
55
  "@react-stately/toast": "^3.0.0-beta.7",
56
- "@spark-ui/hooks": "^17.3.0",
57
- "@spark-ui/icons": "^17.3.0",
58
- "@spark-ui/internal-utils": "^17.3.0",
56
+ "@spark-ui/hooks": "^17.3.2",
57
+ "@spark-ui/icons": "^17.3.2",
58
+ "@spark-ui/internal-utils": "^17.3.2",
59
59
  "@zag-js/pagination": "1.30.0",
60
60
  "@zag-js/react": "1.30.0",
61
61
  "class-variance-authority": "0.7.1",
@@ -1,9 +0,0 @@
1
- import { ComponentProps } from 'react';
2
- import { ResizableTableContainer as AriaResizableTableContainer } from 'react-aria-components';
3
- export interface ResizableTableContainerProps extends Omit<ComponentProps<typeof AriaResizableTableContainer>, 'className'> {
4
- className?: string;
5
- }
6
- export declare function ResizableTableContainer({ className, children, ...props }: ResizableTableContainerProps): import("react/jsx-runtime").JSX.Element;
7
- export declare namespace ResizableTableContainer {
8
- var displayName: string;
9
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Header "select all" checkbox that bases its checked/indeterminate state only
3
- * on the currently visible (rendered) rows. So when the user changes page in a
4
- * paginated table, the header shows unchecked instead of indeterminate when no
5
- * visible row is selected.
6
- *
7
- * Renders the Checkbox directly and calls selectionManager.toggleSelectAll() so
8
- * we fully control the displayed state instead of overriding React Aria's context.
9
- */
10
- export declare function TableHeaderSelectionCheckbox(): import("react/jsx-runtime").JSX.Element;
11
- export declare namespace TableHeaderSelectionCheckbox {
12
- var displayName: string;
13
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Adapter that receives table selection state from React Aria's CheckboxContext
3
- * and renders Spark Checkbox. Used for row selection and "select all" in table header.
4
- */
5
- export declare const TableSelectionCheckbox: import('react').ForwardRefExoticComponent<Omit<import('../checkbox/CheckboxInput').CheckboxInputProps & Pick<import('../checkbox/CheckboxGroupContext').CheckboxGroupContextState, "reverse"> & {
6
- ref?: import('react').Ref<HTMLButtonElement>;
7
- }, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,2 +0,0 @@
1
- export declare function isInteractiveElement(element: EventTarget | null): element is Element;
2
- export declare function isColumnResizerElement(element: EventTarget | null): element is Element;