{"version":3,"file":"tableLayout.cjs","sources":["../../../../../../src/components/ui/tables/utils/tableLayout.ts"],"sourcesContent":["/**\n * Layout helpers for the table scroll container.\n */\n\n/** Floor applied to a consumer-supplied `maxHeight` unless they opt out. */\nexport const DEFAULT_TABLE_MIN_HEIGHT = \"360px\";\n\nconst DISABLED_MIN_HEIGHT_VALUES = new Set([\"\", \"0\", \"0px\", \"none\", \"auto\"]);\n\n/**\n * Resolve the CSS `max-height` for the scroll container.\n *\n * Consumers commonly pass a viewport-relative value such as\n * `calc(100vh - 340px)`. On a short screen that collapses to a few rows with\n * a nested scrollbar, which is what users report as \"the table is tiny\".\n * Wrapping it in CSS `max()` guarantees the container never drops below\n * `minHeight`; the page scrolls instead.\n *\n * Returns undefined when no `maxHeight` is set, so the table grows freely.\n */\nexport const resolveScrollMaxHeight = (\n  maxHeight: string | undefined,\n  minHeight: string | undefined\n): string | undefined => {\n  if (!maxHeight) return undefined;\n\n  const floor = (minHeight ?? \"\").trim();\n  if (DISABLED_MIN_HEIGHT_VALUES.has(floor)) return maxHeight;\n\n  return `max(${maxHeight}, ${floor})`;\n};\n"],"names":["DISABLED_MIN_HEIGHT_VALUES","Set","maxHeight","minHeight","floor","trim","has","concat"],"mappings":"oEAKO,IAEDA,EAA6B,IAAIC,IAAI,CAAC,GAAI,IAAK,MAAO,OAAQ,0CAF5B,uCAeF,SACpCC,EACAC,GAEA,GAAKD,EAAL,CAEA,IAAME,GAASD,QAAAA,EAAa,IAAIE,OAChC,OAAIL,EAA2BM,IAAIF,GAAeF,EAElD,OAAAK,OAAcL,EAASK,MAAAA,OAAKH,EAAK,IALD,CAMlC"}