{"version":3,"file":"LoadingRows.cjs","names":[],"sources":["../../../src/components/DataTable/LoadingRows.tsx"],"sourcesContent":["import { Skeleton } from \"../Skeleton\";\nimport styles from \"./DataTable.module.css\";\n\n/** Props for {@link LoadingRows}. */\nexport interface LoadingRowsProps {\n    /** How many placeholder cells to draw per row. */\n    columns: number;\n    /** How many placeholder rows to draw. */\n    rows: number;\n}\n\n/**\n * Placeholder rows for a table that has nothing to show yet.\n *\n * A first load and an empty result are different statements, and the usual\n * shortcut — showing `emptyMessage` while the request is in flight — tells the\n * user \"there is nothing here\" and then contradicts itself a moment later.\n * Drawing rows at roughly the real height also keeps whatever sits below the\n * table from jumping when the data lands.\n *\n * The whole block is `aria-hidden`: it carries no information a screen reader can\n * use, and the busy state is already on the wrapper. It also stays out of\n * `role=\"status\"`, which the table's announcement region already occupies —\n * two status regions on one table means the second one is what gets ignored.\n *\n * @param props - Grid size to fill.\n * @returns The placeholder block.\n */\nexport function LoadingRows({ columns, rows }: LoadingRowsProps) {\n    return (\n        <div className={styles.loading} aria-hidden=\"true\">\n            {Array.from({ length: rows }, (_, rowIndex) => (\n                <div key={rowIndex} className={styles.loadingRow}>\n                    {Array.from({ length: Math.max(columns, 1) }, (_, cellIndex) => (\n                        <Skeleton key={cellIndex} variant=\"text\" />\n                    ))}\n                </div>\n            ))}\n        </div>\n    );\n}\n"],"mappings":"mHA4BA,SAAgB,EAAY,CAAE,UAAS,QAA0B,CAC7D,OACI,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAS,cAAY,OACvC,SAAA,MAAM,KAAK,CAAE,OAAQ,CAAK,GAAI,EAAG,KAC9B,EAAA,EAAA,IAAA,CAAC,MAAD,CAAoB,UAAW,EAAA,QAAO,WACjC,SAAA,MAAM,KAAK,CAAE,OAAQ,KAAK,IAAI,EAAS,CAAC,CAAE,GAAI,EAAG,KAC9C,EAAA,EAAA,IAAA,CAAC,EAAA,SAAD,CAA0B,QAAQ,MAAQ,EAA3B,CAA2B,CAC7C,CACA,EAJK,CAIL,CACR,CACA,CAAA,CAEb"}