{
  "version": 3,
  "sources": ["../../src/modules/table/components/TableEx/TableCellEx.tsx", "../../src/modules/table/components/TableEx/TableEx.tsx", "../../src/modules/table/components/TableEx/TableFooterEx.tsx", "../../src/modules/table/context/TableHeight/Context.ts", "../../src/modules/table/context/TableHeight/Provider.tsx", "../../src/modules/table/context/TableHeight/use.ts"],
  "sourcesContent": ["import type { TableCellProps } from '@mui/material'\nimport { styled, TableCell } from '@mui/material'\nimport type React from 'react'\n\n/** Props for {@link TableCellEx}. */\nexport interface TableCellExProps extends TableCellProps {\n  noBgColor?: boolean\n}\n\n/** Table cell with optional transparent background. */\nexport const TableCellEx: React.FC<TableCellExProps> = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: prop => prop !== 'noBgColor' })<TableCellExProps>(\n  ({ noBgColor = true }) => ({ ...(noBgColor && { backgroundColor: 'transparent' }) }),\n)\n", "import type { TableProps } from '@mui/material'\nimport { Table } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\n/** Props for {@link TableEx}. */\nexport interface TableExProps extends PropsWithChildren, TableProps {\n  variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = ({ children, ...props }) => {\n  return (\n    <Table {...props}>\n      {children}\n    </Table>\n  )\n}\n\nTableExInner.displayName = 'TableExInner'\n\n/** Extended MUI table that enables sticky headers in scrollable mode. */\nexport const TableExWithRef: React.FC<TableExProps> = ({\n  variant, children, ...props\n}) => {\n  return (\n    <TableExInner stickyHeader={variant === 'scrollable'} {...props}>\n      {children}\n    </TableExInner>\n  )\n}\n\nTableExWithRef.displayName = 'TableEx'\n\n/** Extended MUI table that enables sticky headers in scrollable mode. */\nexport const TableEx = TableExWithRef\n", "import type { TableFooterProps } from '@mui/material'\nimport { styled, TableFooter } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nconst TableFooterExRoot = styled(TableFooter, {\n  name: 'TableFooterEx',\n  shouldForwardProp: propName => propName !== 'scrollable',\n  slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n  backgroundColor: theme.vars.palette.background.default,\n  bottom: 'unset',\n  position: 'relative',\n  ...(variant === 'scrollable' && {\n    bottom: 0,\n    position: 'sticky',\n  }),\n}))\n\n/** Props for {@link TableFooterEx}. */\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n  variant?: TableExVariants\n}\n\n/** Table footer that sticks to the bottom when used with the scrollable variant. */\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n", "import { createContextEx } from '@ariestools/sdk-react/shared'\n\nimport type { TableHeightState } from './State.ts'\n\n/** React context for table height and visible row configuration. */\nexport const TableHeightContext = createContextEx<TableHeightState>()\n", "import { useResetState } from '@ariestools/sdk-react/hooks'\nimport type { ContextExProviderProps } from '@ariestools/sdk-react/shared'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context.ts'\nimport type { TableHeightState } from './State.ts'\n\n/** Props for {@link TableHeightProvider}. */\nexport interface TableHeightProviderProps extends ContextExProviderProps, PropsWithChildren {\n  /** @field Account for optional header and footer rows */\n  additionalRows?: number\n  defaultVisibleRows?: number\n  heightFormat?: string\n}\n\n/** Provides calculated table height based on row height and visible row count. */\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n  children,\n  additionalRows = 0,\n  defaultVisibleRows,\n  heightFormat = 'px',\n}) => {\n  const [visibleRows, setVisibleRows] = useResetState(defaultVisibleRows)\n  const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n  const height = useMemo(() => {\n    if (rowHeight !== undefined && visibleRows !== undefined) {\n      return rowHeight * (visibleRows + additionalRows)\n    }\n  }, [rowHeight, visibleRows, additionalRows])\n\n  const formattedHeight = useMemo(() => (height === undefined ? undefined : `${height}${heightFormat}`), [height, heightFormat])\n\n  const value: TableHeightState = useMemo(() => ({\n    height: formattedHeight, provided: true as const, rowHeight, setRowHeight, setVisibleRows, visibleRows,\n  }), [formattedHeight, rowHeight, setRowHeight, setVisibleRows, visibleRows])\n\n  return (\n    <TableHeightContext value={value}>\n      {children}\n    </TableHeightContext>\n  )\n}\n", "import { useContextEx } from '@ariestools/sdk-react/shared'\n\nimport { TableHeightContext } from './Context.ts'\n\n/** Consumes the table height context for visible row and height state. */\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],
  "mappings": ";AACA,SAAS,QAAQ,iBAAiB;AAS3B,IAAM,cAA0C,OAAO,WAAW,EAAE,MAAM,sBAAsB,mBAAmB,UAAQ,SAAS,YAAY,CAAC;AAAA,EACtJ,CAAC,EAAE,YAAY,KAAK,OAAO,EAAE,GAAI,aAAa,EAAE,iBAAiB,cAAc,EAAG;AACpF;;;ACXA,SAAS,aAAa;AAalB;AAFJ,IAAM,eAAuC,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACvE,SACE,oBAAC,SAAO,GAAG,OACR,UACH;AAEJ;AAEA,aAAa,cAAc;AAGpB,IAAM,iBAAyC,CAAC;AAAA,EACrD;AAAA,EAAS;AAAA,EAAU,GAAG;AACxB,MAAM;AACJ,SACE,oBAAC,gBAAa,cAAc,YAAY,cAAe,GAAG,OACvD,UACH;AAEJ;AAEA,eAAe,cAAc;AAGtB,IAAM,UAAU;;;ACnCvB,SAAS,UAAAA,SAAQ,mBAAmB;AA0BmD,gBAAAC,YAAA;AApBvF,IAAM,oBAAoBD,QAAO,aAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,cAAY,aAAa;AAAA,EAC5C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,KAAK,QAAQ,WAAW;AAAA,EAC/C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,GAAI,YAAY,gBAAgB;AAAA,IAC9B,QAA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