@12-apps/ui 6.38.0 → 6.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/dist/_internal/components/data-display/DataGrid/DataGrid.body.js +3 -2
  2. package/dist/_internal/components/data-display/DataGrid/DataGrid.cells.js +2 -1
  3. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +4 -4
  4. package/dist/_internal/components/data-display/DataGrid/DataGrid.model.js +2 -1
  5. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +19 -19
  6. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +26 -26
  7. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +5 -5
  8. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +4 -4
  9. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +3 -3
  10. package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -5
  11. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +2 -2
  12. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +3 -3
  13. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +2 -2
  14. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +8 -8
  15. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +1 -1
  16. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +16 -16
  17. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +1 -1
  18. package/dist/_internal/components/data-display/DataViews/data-views-overflow-costs.js +4 -3
  19. package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +3 -2
  20. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
  21. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +6 -6
  22. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -6
  23. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +5 -5
  24. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
  25. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
  26. package/dist/_internal/components/data-display/FleetMap/FleetBody.js +9 -9
  27. package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +8 -8
  28. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +10 -10
  29. package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
  30. package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
  31. package/dist/_internal/components/data-display/MapPreview/MapPreview.js +7 -7
  32. package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
  33. package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
  34. package/dist/_internal/components/data-display/MapPreview/mapProjection.js +3 -3
  35. package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
  36. package/dist/_internal/components/data-display/Table/Table.helpers.js +5 -3
  37. package/dist/_internal/components/data-display/Table/Table.hooks.js +2 -1
  38. package/dist/_internal/components/data-display/Table/Table.js +4 -4
  39. package/dist/_internal/components/data-display/Table/TableParts.hooks.js +4 -2
  40. package/dist/_internal/components/data-display/Table/TableParts.js +4 -2
  41. package/dist/_internal/components/data-display/index.js +18 -18
  42. package/dist/_internal/components/form/Calendar/Calendar.js +5 -4
  43. package/dist/_internal/components/form/Calendar/CalendarDay.js +2 -1
  44. package/dist/_internal/components/form/Calendar/CalendarDayCell.js +3 -2
  45. package/dist/_internal/components/form/Calendar/CalendarMonth.js +4 -3
  46. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +5 -5
  47. package/dist/_internal/components/form/Switch/Switch.js +4 -4
  48. package/dist/_internal/components/form/Switch/Switch.metrics.js +5 -1
  49. package/dist/_internal/components/form/Switch/Switch.parts.js +3 -3
  50. package/dist/_internal/components/form/Switch/Switch.styles.js +2 -2
  51. package/dist/_internal/components/form/index.js +9 -9
  52. package/dist/_internal/components/index.js +37 -37
  53. package/dist/_internal/components/layout/CardGrid/CardGrid.js +2 -1
  54. package/dist/_internal/components/layout/Resizable/Resizable.helpers.js +8 -3
  55. package/dist/_internal/components/layout/Resizable/Resizable.hooks.js +3 -2
  56. package/dist/_internal/components/layout/Resizable/Resizable.js +4 -3
  57. package/dist/_internal/components/layout/ScrollArea/ScrollArea.helpers.js +1 -1
  58. package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +2 -2
  59. package/dist/_internal/components/layout/index.js +5 -5
  60. package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.hooks.js +1 -1
  61. package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.js +4 -3
  62. package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.parts.js +2 -1
  63. package/dist/_internal/components/utility/VirtualList/VirtualList.hooks.js +6 -3
  64. package/dist/_internal/components/utility/VirtualList/VirtualList.js +3 -2
  65. package/dist/_internal/components/utility/index.js +5 -5
  66. package/dist/{chunk-J2DAQQQH.js → chunk-222HN7GK.js} +33 -64
  67. package/dist/chunk-222HN7GK.js.map +1 -0
  68. package/dist/{chunk-MR2HKBHS.js → chunk-27LOJVR3.js} +2 -2
  69. package/dist/{chunk-S3D5VBHW.js → chunk-3YOXVNO4.js} +7 -7
  70. package/dist/{chunk-CZIX4BW2.js → chunk-4ALF5PB5.js} +3 -3
  71. package/dist/{chunk-XJPJ6ESI.js → chunk-4OAKGKK5.js} +3 -3
  72. package/dist/{chunk-4CHROSWR.js → chunk-5ETBB2DG.js} +2 -2
  73. package/dist/{chunk-ATSHKSSD.js → chunk-5KNDAC24.js} +20 -7
  74. package/dist/chunk-5KNDAC24.js.map +1 -0
  75. package/dist/{chunk-ULTOQ6ZV.js → chunk-5LWB4BYX.js} +80 -89
  76. package/dist/chunk-5LWB4BYX.js.map +1 -0
  77. package/dist/{chunk-46UPILLK.js → chunk-5NT2M2JI.js} +2 -2
  78. package/dist/{chunk-H5BEWPEY.js → chunk-6N2EDWMG.js} +2 -2
  79. package/dist/{chunk-GJQYM3PM.js → chunk-6PU3JYVY.js} +2 -2
  80. package/dist/{chunk-PUBPZOQJ.js → chunk-AG3DY5TH.js} +8 -5
  81. package/dist/chunk-AG3DY5TH.js.map +1 -0
  82. package/dist/{chunk-PPRV4LTM.js → chunk-BWHOCNGW.js} +4 -4
  83. package/dist/chunk-BWHOCNGW.js.map +1 -0
  84. package/dist/{chunk-TUBCN4DJ.js → chunk-CB6DTWD5.js} +7 -7
  85. package/dist/chunk-CB6DTWD5.js.map +1 -0
  86. package/dist/{chunk-ZAY6OA6F.js → chunk-D4FZ3ANG.js} +15 -5
  87. package/dist/chunk-D4FZ3ANG.js.map +1 -0
  88. package/dist/{chunk-Y7F5JBAT.js → chunk-DDRKYNPB.js} +2 -2
  89. package/dist/{chunk-DLJGBJZW.js → chunk-DGMDQHMI.js} +16 -9
  90. package/dist/chunk-DGMDQHMI.js.map +1 -0
  91. package/dist/{chunk-IAGOUTI6.js → chunk-DNT5PZLF.js} +21 -12
  92. package/dist/chunk-DNT5PZLF.js.map +1 -0
  93. package/dist/{chunk-DZA7RSLX.js → chunk-DVSO3EG6.js} +19 -11
  94. package/dist/chunk-DVSO3EG6.js.map +1 -0
  95. package/dist/{chunk-OS6KPL4D.js → chunk-EHYI2WCJ.js} +4 -4
  96. package/dist/{chunk-NB3FGWU4.js → chunk-EQXIW5MQ.js} +2 -2
  97. package/dist/{chunk-C66RGVAS.js → chunk-ERY6D2OV.js} +6 -4
  98. package/dist/chunk-ERY6D2OV.js.map +1 -0
  99. package/dist/{chunk-M2JTIH5M.js → chunk-F44R7US6.js} +2 -2
  100. package/dist/{chunk-AROBXRC5.js → chunk-F7JTIHV5.js} +18 -7
  101. package/dist/chunk-F7JTIHV5.js.map +1 -0
  102. package/dist/{chunk-XJJXBUPN.js → chunk-FX26DAFF.js} +2 -2
  103. package/dist/{chunk-R6SN73RX.js → chunk-GLHNMTP6.js} +7 -7
  104. package/dist/{chunk-YU26GBNX.js → chunk-H3AQQOTI.js} +9 -4
  105. package/dist/chunk-H3AQQOTI.js.map +1 -0
  106. package/dist/{chunk-HTZNB6IV.js → chunk-H5ZTIELC.js} +23 -8
  107. package/dist/chunk-H5ZTIELC.js.map +1 -0
  108. package/dist/{chunk-GSFNH4C5.js → chunk-HBP2OU4Q.js} +15 -8
  109. package/dist/chunk-HBP2OU4Q.js.map +1 -0
  110. package/dist/{chunk-I4QA2F4L.js → chunk-HBRQPG7H.js} +5 -5
  111. package/dist/{chunk-HGMBY5LP.js → chunk-HQWJUHR4.js} +18 -11
  112. package/dist/chunk-HQWJUHR4.js.map +1 -0
  113. package/dist/{chunk-CNQUCNEA.js → chunk-I3F4C5SS.js} +3 -3
  114. package/dist/{chunk-UFJYJHQI.js → chunk-J5VWGQSR.js} +2 -2
  115. package/dist/{chunk-MTFCPPZ5.js → chunk-JWZJSXI5.js} +3 -2
  116. package/dist/chunk-JWZJSXI5.js.map +1 -0
  117. package/dist/{chunk-4JFL62K3.js → chunk-K7FSTB2K.js} +3 -3
  118. package/dist/{chunk-FFCJ7NR2.js → chunk-KRQUPE4K.js} +4 -4
  119. package/dist/{chunk-2OYFTSG4.js → chunk-KXLUMEDX.js} +2 -2
  120. package/dist/{chunk-DVAAUWTC.js → chunk-LCHCE2G5.js} +2 -2
  121. package/dist/{chunk-G4HBNILE.js → chunk-LEHMWJNZ.js} +3 -3
  122. package/dist/{chunk-P6TNXBDA.js → chunk-MYKWJCR7.js} +9 -9
  123. package/dist/chunk-MYKWJCR7.js.map +1 -0
  124. package/dist/{chunk-TQ6FPOPD.js → chunk-ODW2D5PN.js} +39 -30
  125. package/dist/chunk-ODW2D5PN.js.map +1 -0
  126. package/dist/{chunk-RZYSKQTS.js → chunk-PCBZYORN.js} +3 -3
  127. package/dist/{chunk-5OBXEMQO.js → chunk-PRIBOWX4.js} +3 -3
  128. package/dist/{chunk-F42MJOHM.js → chunk-PVM7XTLZ.js} +64 -62
  129. package/dist/chunk-PVM7XTLZ.js.map +1 -0
  130. package/dist/{chunk-3TDVGZZN.js → chunk-QBTBRJ2Q.js} +37 -13
  131. package/dist/chunk-QBTBRJ2Q.js.map +1 -0
  132. package/dist/{chunk-2WFDHFK4.js → chunk-QNCWSDXE.js} +26 -11
  133. package/dist/chunk-QNCWSDXE.js.map +1 -0
  134. package/dist/{chunk-PQECNGDE.js → chunk-QSRZOXQI.js} +2 -2
  135. package/dist/{chunk-RHIDWUK7.js → chunk-QUWK7SYN.js} +1 -2
  136. package/dist/chunk-QUWK7SYN.js.map +1 -0
  137. package/dist/{chunk-UN5INW6K.js → chunk-R53ZOW4B.js} +8 -4
  138. package/dist/chunk-R53ZOW4B.js.map +1 -0
  139. package/dist/{chunk-DCJSHYE5.js → chunk-RSDYS5B3.js} +4 -4
  140. package/dist/{chunk-N5GVW6RO.js → chunk-S6IWKDWT.js} +2 -2
  141. package/dist/{chunk-TKC6WHGB.js → chunk-SBIZXZPP.js} +2 -2
  142. package/dist/{chunk-D5SZXH7Q.js → chunk-TNBJ4DK4.js} +7 -3
  143. package/dist/chunk-TNBJ4DK4.js.map +1 -0
  144. package/dist/{chunk-PMOEG36E.js → chunk-XZJM6EPC.js} +8 -6
  145. package/dist/chunk-XZJM6EPC.js.map +1 -0
  146. package/dist/{chunk-QF6LTUCE.js → chunk-Y2X7LYIN.js} +4 -4
  147. package/dist/chunk-Y2X7LYIN.js.map +1 -0
  148. package/dist/{chunk-UEVHI62V.js → chunk-YCCY77W5.js} +2 -2
  149. package/dist/{chunk-DF4K5XVW.js → chunk-YZVR5ROE.js} +14 -6
  150. package/dist/chunk-YZVR5ROE.js.map +1 -0
  151. package/dist/{chunk-AUSUCZYR.js → chunk-ZBVU2YWV.js} +5 -5
  152. package/dist/chunk-ZBVU2YWV.js.map +1 -0
  153. package/dist/{chunk-VZIB5W5L.js → chunk-ZGCPDA3F.js} +2 -2
  154. package/dist/data-display/DataGrid.js +4 -4
  155. package/dist/data-display/DataViews.js +29 -29
  156. package/dist/data-display/FleetMap.js +10 -10
  157. package/dist/data-display/MapPreview.js +7 -7
  158. package/dist/data-display/Table.js +4 -4
  159. package/dist/form/Calendar.js +5 -4
  160. package/dist/form/DateRangePicker.js +5 -5
  161. package/dist/form/Switch.js +4 -4
  162. package/dist/layout/CardGrid.js +2 -1
  163. package/dist/layout/Resizable.js +4 -3
  164. package/dist/layout/ScrollArea.js +2 -2
  165. package/dist/native/form/Switch.js +3 -1
  166. package/dist/native/form/Switch.js.map +1 -1
  167. package/dist/types/components/data-display/DataGrid/DataGrid.body.d.ts.map +1 -1
  168. package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts +4 -2
  169. package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts.map +1 -1
  170. package/dist/types/components/data-display/DataGrid/DataGrid.model.d.ts +7 -1
  171. package/dist/types/components/data-display/DataGrid/DataGrid.model.d.ts.map +1 -1
  172. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +10 -4
  173. package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
  174. package/dist/types/components/data-display/DataViews/data-views-columns.d.ts.map +1 -1
  175. package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts +2 -0
  176. package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts.map +1 -1
  177. package/dist/types/components/data-display/DataViews/data-views-layout-context.d.ts +7 -3
  178. package/dist/types/components/data-display/DataViews/data-views-layout-context.d.ts.map +1 -1
  179. package/dist/types/components/data-display/DataViews/data-views-overflow-costs.d.ts +19 -9
  180. package/dist/types/components/data-display/DataViews/data-views-overflow-costs.d.ts.map +1 -1
  181. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
  182. package/dist/types/components/data-display/MapPreview/MapTiles.d.ts.map +1 -1
  183. package/dist/types/components/data-display/MapPreview/mapProjection.d.ts +6 -1
  184. package/dist/types/components/data-display/MapPreview/mapProjection.d.ts.map +1 -1
  185. package/dist/types/components/data-display/Table/Table.helpers.d.ts +6 -0
  186. package/dist/types/components/data-display/Table/Table.helpers.d.ts.map +1 -1
  187. package/dist/types/components/data-display/Table/Table.hooks.d.ts +9 -1
  188. package/dist/types/components/data-display/Table/Table.hooks.d.ts.map +1 -1
  189. package/dist/types/components/data-display/Table/Table.types.d.ts +6 -2
  190. package/dist/types/components/data-display/Table/Table.types.d.ts.map +1 -1
  191. package/dist/types/components/data-display/Table/TableParts.d.ts +2 -0
  192. package/dist/types/components/data-display/Table/TableParts.d.ts.map +1 -1
  193. package/dist/types/components/form/Calendar/Calendar.d.ts.map +1 -1
  194. package/dist/types/components/form/Calendar/CalendarDay.d.ts.map +1 -1
  195. package/dist/types/components/form/Calendar/CalendarMonth.d.ts.map +1 -1
  196. package/dist/types/components/form/Switch/Switch.metrics.d.ts +13 -3
  197. package/dist/types/components/form/Switch/Switch.metrics.d.ts.map +1 -1
  198. package/dist/types/components/form/Switch/Switch.styles.d.ts.map +1 -1
  199. package/dist/types/components/layout/CardGrid/CardGrid.d.ts +9 -7
  200. package/dist/types/components/layout/CardGrid/CardGrid.d.ts.map +1 -1
  201. package/dist/types/components/layout/Resizable/Resizable.d.ts.map +1 -1
  202. package/dist/types/components/layout/Resizable/Resizable.helpers.d.ts +21 -9
  203. package/dist/types/components/layout/Resizable/Resizable.helpers.d.ts.map +1 -1
  204. package/dist/types/components/layout/Resizable/Resizable.hooks.d.ts +13 -3
  205. package/dist/types/components/layout/Resizable/Resizable.hooks.d.ts.map +1 -1
  206. package/dist/types/components/layout/Resizable/Resizable.types.d.ts +10 -0
  207. package/dist/types/components/layout/Resizable/Resizable.types.d.ts.map +1 -1
  208. package/dist/types/components/layout/ScrollArea/ScrollArea.d.ts.map +1 -1
  209. package/dist/types/components/layout/ScrollArea/ScrollArea.helpers.d.ts +1 -1
  210. package/dist/types/components/layout/ScrollArea/ScrollArea.helpers.d.ts.map +1 -1
  211. package/dist/types/components/layout/ScrollArea/ScrollArea.types.d.ts +4 -1
  212. package/dist/types/components/layout/ScrollArea/ScrollArea.types.d.ts.map +1 -1
  213. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
  214. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.hooks.d.ts +3 -2
  215. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.hooks.d.ts.map +1 -1
  216. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts +3 -2
  217. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.parts.d.ts.map +1 -1
  218. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts +9 -0
  219. package/dist/types/components/utility/InfiniteScroll/InfiniteScroll.types.d.ts.map +1 -1
  220. package/dist/types/components/utility/VirtualList/VirtualList.d.ts.map +1 -1
  221. package/dist/types/components/utility/VirtualList/VirtualList.hooks.d.ts +24 -28
  222. package/dist/types/components/utility/VirtualList/VirtualList.hooks.d.ts.map +1 -1
  223. package/dist/types/components/utility/VirtualList/VirtualList.types.d.ts +17 -0
  224. package/dist/types/components/utility/VirtualList/VirtualList.types.d.ts.map +1 -1
  225. package/dist/types-native/components/form/Switch/Switch.metrics.d.ts +13 -3
  226. package/dist/types-native/components/form/Switch/Switch.metrics.d.ts.map +1 -1
  227. package/dist/utility/InfiniteScroll.js +4 -3
  228. package/dist/utility/VirtualList.js +3 -2
  229. package/package.json +1 -1
  230. package/src/components/data-display/DataGrid/DataGrid.body.tsx +27 -7
  231. package/src/components/data-display/DataGrid/DataGrid.cells.tsx +33 -9
  232. package/src/components/data-display/DataGrid/DataGrid.model.ts +24 -11
  233. package/src/components/data-display/DataGrid/DataGrid.types.ts +12 -6
  234. package/src/components/data-display/DataViews/data-views-columns.ts +14 -3
  235. package/src/components/data-display/DataViews/data-views-grid-helpers.tsx +5 -3
  236. package/src/components/data-display/DataViews/data-views-layout-context.tsx +12 -9
  237. package/src/components/data-display/DataViews/data-views-overflow-costs.ts +32 -14
  238. package/src/components/data-display/DataViews/data-views-overflow.ts +40 -26
  239. package/src/components/data-display/MapPreview/MapTiles.tsx +16 -9
  240. package/src/components/data-display/MapPreview/mapProjection.ts +10 -5
  241. package/src/components/data-display/Table/Table.helpers.ts +7 -1
  242. package/src/components/data-display/Table/Table.hooks.ts +16 -5
  243. package/src/components/data-display/Table/Table.types.ts +6 -2
  244. package/src/components/data-display/Table/TableParts.tsx +38 -42
  245. package/src/components/form/Calendar/Calendar.tsx +4 -2
  246. package/src/components/form/Calendar/CalendarDay.tsx +6 -3
  247. package/src/components/form/Calendar/CalendarMonth.tsx +6 -3
  248. package/src/components/form/Switch/Switch.metrics.ts +19 -5
  249. package/src/components/form/Switch/Switch.styles.ts +5 -3
  250. package/src/components/layout/CardGrid/CardGrid.tsx +37 -24
  251. package/src/components/layout/Resizable/Resizable.helpers.ts +43 -21
  252. package/src/components/layout/Resizable/Resizable.hooks.ts +17 -9
  253. package/src/components/layout/Resizable/Resizable.md +9 -5
  254. package/src/components/layout/Resizable/Resizable.tsx +20 -8
  255. package/src/components/layout/Resizable/Resizable.types.ts +10 -0
  256. package/src/components/layout/ScrollArea/ScrollArea.helpers.ts +0 -2
  257. package/src/components/layout/ScrollArea/ScrollArea.tsx +5 -3
  258. package/src/components/layout/ScrollArea/ScrollArea.types.ts +4 -1
  259. package/src/components/utility/InfiniteScroll/InfiniteScroll.hooks.ts +5 -4
  260. package/src/components/utility/InfiniteScroll/InfiniteScroll.parts.tsx +29 -12
  261. package/src/components/utility/InfiniteScroll/InfiniteScroll.tsx +11 -5
  262. package/src/components/utility/InfiniteScroll/InfiniteScroll.types.ts +10 -2
  263. package/src/components/utility/VirtualList/VirtualList.hooks.ts +101 -112
  264. package/src/components/utility/VirtualList/VirtualList.tsx +36 -65
  265. package/src/components/utility/VirtualList/VirtualList.types.ts +20 -3
  266. package/dist/chunk-2WFDHFK4.js.map +0 -1
  267. package/dist/chunk-3TDVGZZN.js.map +0 -1
  268. package/dist/chunk-AROBXRC5.js.map +0 -1
  269. package/dist/chunk-ATSHKSSD.js.map +0 -1
  270. package/dist/chunk-AUSUCZYR.js.map +0 -1
  271. package/dist/chunk-C66RGVAS.js.map +0 -1
  272. package/dist/chunk-D5SZXH7Q.js.map +0 -1
  273. package/dist/chunk-DF4K5XVW.js.map +0 -1
  274. package/dist/chunk-DLJGBJZW.js.map +0 -1
  275. package/dist/chunk-DZA7RSLX.js.map +0 -1
  276. package/dist/chunk-F42MJOHM.js.map +0 -1
  277. package/dist/chunk-GSFNH4C5.js.map +0 -1
  278. package/dist/chunk-HGMBY5LP.js.map +0 -1
  279. package/dist/chunk-HTZNB6IV.js.map +0 -1
  280. package/dist/chunk-IAGOUTI6.js.map +0 -1
  281. package/dist/chunk-J2DAQQQH.js.map +0 -1
  282. package/dist/chunk-MTFCPPZ5.js.map +0 -1
  283. package/dist/chunk-P6TNXBDA.js.map +0 -1
  284. package/dist/chunk-PMOEG36E.js.map +0 -1
  285. package/dist/chunk-PPRV4LTM.js.map +0 -1
  286. package/dist/chunk-PUBPZOQJ.js.map +0 -1
  287. package/dist/chunk-QF6LTUCE.js.map +0 -1
  288. package/dist/chunk-RHIDWUK7.js.map +0 -1
  289. package/dist/chunk-TQ6FPOPD.js.map +0 -1
  290. package/dist/chunk-TUBCN4DJ.js.map +0 -1
  291. package/dist/chunk-ULTOQ6ZV.js.map +0 -1
  292. package/dist/chunk-UN5INW6K.js.map +0 -1
  293. package/dist/chunk-YU26GBNX.js.map +0 -1
  294. package/dist/chunk-ZAY6OA6F.js.map +0 -1
  295. /package/dist/{chunk-MR2HKBHS.js.map → chunk-27LOJVR3.js.map} +0 -0
  296. /package/dist/{chunk-S3D5VBHW.js.map → chunk-3YOXVNO4.js.map} +0 -0
  297. /package/dist/{chunk-CZIX4BW2.js.map → chunk-4ALF5PB5.js.map} +0 -0
  298. /package/dist/{chunk-XJPJ6ESI.js.map → chunk-4OAKGKK5.js.map} +0 -0
  299. /package/dist/{chunk-4CHROSWR.js.map → chunk-5ETBB2DG.js.map} +0 -0
  300. /package/dist/{chunk-46UPILLK.js.map → chunk-5NT2M2JI.js.map} +0 -0
  301. /package/dist/{chunk-H5BEWPEY.js.map → chunk-6N2EDWMG.js.map} +0 -0
  302. /package/dist/{chunk-GJQYM3PM.js.map → chunk-6PU3JYVY.js.map} +0 -0
  303. /package/dist/{chunk-Y7F5JBAT.js.map → chunk-DDRKYNPB.js.map} +0 -0
  304. /package/dist/{chunk-OS6KPL4D.js.map → chunk-EHYI2WCJ.js.map} +0 -0
  305. /package/dist/{chunk-NB3FGWU4.js.map → chunk-EQXIW5MQ.js.map} +0 -0
  306. /package/dist/{chunk-M2JTIH5M.js.map → chunk-F44R7US6.js.map} +0 -0
  307. /package/dist/{chunk-XJJXBUPN.js.map → chunk-FX26DAFF.js.map} +0 -0
  308. /package/dist/{chunk-R6SN73RX.js.map → chunk-GLHNMTP6.js.map} +0 -0
  309. /package/dist/{chunk-I4QA2F4L.js.map → chunk-HBRQPG7H.js.map} +0 -0
  310. /package/dist/{chunk-CNQUCNEA.js.map → chunk-I3F4C5SS.js.map} +0 -0
  311. /package/dist/{chunk-UFJYJHQI.js.map → chunk-J5VWGQSR.js.map} +0 -0
  312. /package/dist/{chunk-4JFL62K3.js.map → chunk-K7FSTB2K.js.map} +0 -0
  313. /package/dist/{chunk-FFCJ7NR2.js.map → chunk-KRQUPE4K.js.map} +0 -0
  314. /package/dist/{chunk-2OYFTSG4.js.map → chunk-KXLUMEDX.js.map} +0 -0
  315. /package/dist/{chunk-DVAAUWTC.js.map → chunk-LCHCE2G5.js.map} +0 -0
  316. /package/dist/{chunk-G4HBNILE.js.map → chunk-LEHMWJNZ.js.map} +0 -0
  317. /package/dist/{chunk-RZYSKQTS.js.map → chunk-PCBZYORN.js.map} +0 -0
  318. /package/dist/{chunk-5OBXEMQO.js.map → chunk-PRIBOWX4.js.map} +0 -0
  319. /package/dist/{chunk-PQECNGDE.js.map → chunk-QSRZOXQI.js.map} +0 -0
  320. /package/dist/{chunk-DCJSHYE5.js.map → chunk-RSDYS5B3.js.map} +0 -0
  321. /package/dist/{chunk-N5GVW6RO.js.map → chunk-S6IWKDWT.js.map} +0 -0
  322. /package/dist/{chunk-TKC6WHGB.js.map → chunk-SBIZXZPP.js.map} +0 -0
  323. /package/dist/{chunk-UEVHI62V.js.map → chunk-YCCY77W5.js.map} +0 -0
  324. /package/dist/{chunk-VZIB5W5L.js.map → chunk-ZGCPDA3F.js.map} +0 -0
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  GridRow,
3
3
  HeaderCell
4
- } from "./chunk-AROBXRC5.js";
4
+ } from "./chunk-F7JTIHV5.js";
5
+ import {
6
+ rem
7
+ } from "./chunk-YKCAJ2TN.js";
5
8
 
6
9
  // src/components/data-display/DataGrid/DataGrid.body.tsx
7
10
  import Checkbox from "@mui/material/Checkbox/index.js";
@@ -47,7 +50,9 @@ function rowIdOf(props, row, index) {
47
50
  }
48
51
  function GridHeader(section) {
49
52
  const { model, props } = section;
50
- const { sorting = {}, stickyHeader = true, headerHeight = 56 } = props;
53
+ const theme = useTheme();
54
+ const { sorting = {}, stickyHeader = true } = props;
55
+ const headerHeight = rem(theme, props.headerHeight ?? 56);
51
56
  const sortable = sorting.mode === "client" || sorting.mode === "server";
52
57
  return /* @__PURE__ */ jsx(TableHead, { "data-slot": "header", children: /* @__PURE__ */ jsxs(TableRow, { "data-slot": "header-row", role: "row", children: [
53
58
  /* @__PURE__ */ jsx(HeaderControls, { ...section }),
@@ -65,16 +70,26 @@ function GridHeader(section) {
65
70
  ))
66
71
  ] }) });
67
72
  }
68
- function Spacer({ height, colSpan }) {
69
- if (height <= 0) return null;
70
- return /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan, sx: { height, border: "none", p: 0 } }) });
73
+ function Spacer({
74
+ rows,
75
+ rowHeight,
76
+ colSpan
77
+ }) {
78
+ if (rows <= 0) return null;
79
+ return /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
80
+ TableCell,
81
+ {
82
+ colSpan,
83
+ sx: { height: `calc(${rows} * ${rowHeight})`, border: "none", p: 0 }
84
+ }
85
+ ) });
71
86
  }
72
87
  function GridBody(section) {
73
88
  const { model, props, totalColumns } = section;
74
89
  const { start, end } = model.visibleRange;
75
90
  const trailing = model.virtualized ? model.processedRows.length - end : 0;
76
91
  return /* @__PURE__ */ jsxs(TableBody, { "data-slot": "body", children: [
77
- model.virtualized ? /* @__PURE__ */ jsx(Spacer, { height: start * model.rowHeight, colSpan: totalColumns }) : null,
92
+ model.virtualized ? /* @__PURE__ */ jsx(Spacer, { rows: start, rowHeight: model.rowHeight, colSpan: totalColumns }) : null,
78
93
  model.visibleRows.map((row, offset) => {
79
94
  const index = model.virtualized ? start + offset : offset;
80
95
  const rowId = rowIdOf(props, row, index);
@@ -93,7 +108,7 @@ function GridBody(section) {
93
108
  rowId
94
109
  );
95
110
  }),
96
- model.virtualized ? /* @__PURE__ */ jsx(Spacer, { height: trailing * model.rowHeight, colSpan: totalColumns }) : null
111
+ model.virtualized ? /* @__PURE__ */ jsx(Spacer, { rows: trailing, rowHeight: model.rowHeight, colSpan: totalColumns }) : null
97
112
  ] });
98
113
  }
99
114
 
@@ -102,4 +117,4 @@ export {
102
117
  GridHeader,
103
118
  GridBody
104
119
  };
105
- //# sourceMappingURL=chunk-HTZNB6IV.js.map
120
+ //# sourceMappingURL=chunk-H5ZTIELC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataGrid/DataGrid.body.tsx"],"sourcesContent":["/**\n * The DataGrid's `<thead>` and `<tbody>`.\n *\n * Split from the shell so each stays inside the size budget and so the\n * virtualization spacers — which are pure layout, not data — sit next to the\n * rows they pad rather than in the middle of the component that owns the paper.\n */\nimport Checkbox from '@mui/material/Checkbox/index.js';\nimport TableBody from '@mui/material/TableBody/index.js';\nimport TableCell from '@mui/material/TableCell/index.js';\nimport TableHead from '@mui/material/TableHead/index.js';\nimport TableRow from '@mui/material/TableRow/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport type React from 'react';\n\nimport { rem } from '../../../tokens/relative';\n\nimport { GridRow, HeaderCell } from './DataGrid.cells';\nimport type { DataGridModel } from './DataGrid.model';\nimport type { DataGridProps } from './DataGrid.types';\n\nexport interface GridSectionProps<T extends Record<string, unknown>> {\n model: DataGridModel<T>;\n props: DataGridProps<T>;\n totalColumns: number;\n}\n\n/** The leading header cells for the selection / expansion columns. */\nfunction HeaderControls<T extends Record<string, unknown>>({\n model,\n props,\n}: GridSectionProps<T>): React.JSX.Element {\n const theme = useTheme();\n const { selection = { mode: 'none' }, expansion, stickyHeader = true } = props;\n const sticky = {\n position: stickyHeader ? ('sticky' as const) : ('static' as const),\n top: 0,\n zIndex: 1,\n backgroundColor: theme.palette.background.paper,\n };\n const total = model.processedRows.length;\n const picked = model.selectedRowIds.length;\n return (\n <>\n {selection.mode !== 'none' && (\n <TableCell padding=\"checkbox\" sx={sticky}>\n {selection.mode === 'multi' && (\n <Checkbox\n indeterminate={picked > 0 && picked < total}\n checked={total > 0 && picked === total}\n onChange={(event) =>\n model.setSelectedRowIds(\n event.target.checked\n ? model.processedRows.map((row, index) => rowIdOf(props, row, index))\n : [],\n )\n }\n inputProps={{ 'aria-label': 'Select all rows' }}\n />\n )}\n </TableCell>\n )}\n {expansion && <TableCell padding=\"checkbox\" sx={sticky} />}\n </>\n );\n}\n\n/** The caller's `getRowId`, or the row's own `id`, or its index. */\nexport function rowIdOf<T extends Record<string, unknown>>(\n props: DataGridProps<T>,\n row: T,\n index: number,\n): string | number {\n if (props.getRowId) return props.getRowId(row, index);\n const candidate = (row as { id?: string | number }).id;\n return candidate ?? index;\n}\n\nexport function GridHeader<T extends Record<string, unknown>>(\n section: GridSectionProps<T>,\n): React.JSX.Element {\n const { model, props } = section;\n const theme = useTheme();\n const { sorting = {}, stickyHeader = true } = props;\n // 56 design px unless the caller says, drawn through the type scale.\n const headerHeight = rem(theme, props.headerHeight ?? 56);\n const sortable = sorting.mode === 'client' || sorting.mode === 'server';\n return (\n <TableHead data-slot=\"header\">\n <TableRow data-slot=\"header-row\" role=\"row\">\n <HeaderControls {...section} />\n {model.visibleColumns.map((column) => (\n <HeaderCell\n key={column.id}\n column={column}\n sort={model.sortBy.find((entry) => entry.id === column.id)}\n sortable={column.enableSort !== false && sortable}\n stickyHeader={stickyHeader}\n headerHeight={headerHeight}\n onSort={model.onSort}\n />\n ))}\n </TableRow>\n </TableHead>\n );\n}\n\n/**\n * An invisible row standing in for `rows` rows the window is not rendering —\n * that many times the row's own CSS height, so the spacer and the rows it\n * replaces are the same length by construction.\n */\nfunction Spacer({\n rows,\n rowHeight,\n colSpan,\n}: {\n rows: number;\n rowHeight: string;\n colSpan: number;\n}): React.JSX.Element | null {\n if (rows <= 0) return null;\n return (\n <TableRow>\n <TableCell\n colSpan={colSpan}\n sx={{ height: `calc(${rows} * ${rowHeight})`, border: 'none', p: 0 }}\n />\n </TableRow>\n );\n}\n\nexport function GridBody<T extends Record<string, unknown>>(\n section: GridSectionProps<T>,\n): React.JSX.Element {\n const { model, props, totalColumns } = section;\n const { start, end } = model.visibleRange;\n const trailing = model.virtualized ? model.processedRows.length - end : 0;\n return (\n <TableBody data-slot=\"body\">\n {model.virtualized ? (\n <Spacer rows={start} rowHeight={model.rowHeight} colSpan={totalColumns} />\n ) : null}\n {model.visibleRows.map((row, offset) => {\n const index = model.virtualized ? start + offset : offset;\n const rowId = rowIdOf(props, row, index);\n return (\n <GridRow\n key={rowId}\n row={row}\n index={index}\n rowId={rowId}\n isSelected={model.selectedRowIdsSet.has(rowId)}\n isExpanded={model.expandedRowIdsSet.has(rowId)}\n totalColumns={totalColumns}\n model={model}\n props={props}\n />\n );\n })}\n {model.virtualized ? (\n <Spacer rows={trailing} rowHeight={model.rowHeight} colSpan={totalColumns} />\n ) : null}\n </TableBody>\n );\n}\n"],"mappings":";;;;;;;;;AAOA,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,SAAS,gBAAgB;AA+BrB,mBAIQ,KAJR;AAfJ,SAAS,eAAkD;AAAA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;AAAA,MASP;AAAA,IAEJ,CAAC;AAAA,IACA,MAAM,cACL,oBAAC,UAAO,MAAM,UAAU,WAAW,MAAM,WAAW,SAAS,cAAc,IACzE;AAAA,KACN;AAEJ;","names":[]}
@@ -3,21 +3,26 @@ import {
3
3
  DefaultError,
4
4
  DefaultLoader,
5
5
  containerStyles
6
- } from "./chunk-ATSHKSSD.js";
6
+ } from "./chunk-5KNDAC24.js";
7
7
  import {
8
8
  useLoadMore,
9
9
  useSentinel
10
- } from "./chunk-QF6LTUCE.js";
10
+ } from "./chunk-Y2X7LYIN.js";
11
+ import {
12
+ rem,
13
+ remPx
14
+ } from "./chunk-YKCAJ2TN.js";
11
15
 
12
16
  // src/components/utility/InfiniteScroll/InfiniteScroll.tsx
13
17
  import Box from "@mui/material/Box/index.js";
18
+ import { useTheme } from "@mui/material/styles/index.js";
14
19
  import { jsx, jsxs } from "react/jsx-runtime";
15
20
  var InfiniteScroll = ({
16
21
  children,
17
22
  variant = "default",
18
23
  hasMore,
19
24
  loading,
20
- threshold = 150,
25
+ threshold,
21
26
  loadMore,
22
27
  loader,
23
28
  loadingText,
@@ -33,7 +38,9 @@ var InfiniteScroll = ({
33
38
  testMode = false,
34
39
  testTriggerRef
35
40
  }) => {
36
- const { sentinelRef, isIntersecting } = useSentinel({ testMode, threshold, scrollableTarget });
41
+ const theme = useTheme();
42
+ const rootMargin = `${remPx(theme, threshold ?? 150)}px`;
43
+ const { sentinelRef, isIntersecting } = useSentinel({ testMode, rootMargin, scrollableTarget });
37
44
  useLoadMore({
38
45
  hasMore,
39
46
  loading,
@@ -54,8 +61,8 @@ var InfiniteScroll = ({
54
61
  ref: sentinelRef,
55
62
  "data-testid": "infinite-scroll-sentinel",
56
63
  style: {
57
- height: variant === "horizontal" ? "100%" : "1px",
58
- width: variant === "horizontal" ? "1px" : "100%"
64
+ height: variant === "horizontal" ? "100%" : rem(theme, 1),
65
+ width: variant === "horizontal" ? rem(theme, 1) : "100%"
59
66
  }
60
67
  }
61
68
  );
@@ -65,7 +72,7 @@ var InfiniteScroll = ({
65
72
  {
66
73
  className,
67
74
  sx: {
68
- ...containerStyles(variant, width),
75
+ ...containerStyles(theme, variant, width),
69
76
  ...style
70
77
  },
71
78
  children: [
@@ -81,4 +88,4 @@ var InfiniteScroll = ({
81
88
  export {
82
89
  InfiniteScroll
83
90
  };
84
- //# sourceMappingURL=chunk-GSFNH4C5.js.map
91
+ //# sourceMappingURL=chunk-HBP2OU4Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/utility/InfiniteScroll/InfiniteScroll.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { rem, remPx } from '../../../tokens/relative';\n\nimport { useLoadMore, useSentinel } from './InfiniteScroll.hooks';\nimport {\n containerStyles,\n DefaultEndMessage,\n DefaultError,\n DefaultLoader,\n} from './InfiniteScroll.parts';\nimport type { InfiniteScrollProps } from './InfiniteScroll.types';\n\nexport const InfiniteScroll: React.FC<InfiniteScrollProps> = ({\n children,\n variant = 'default',\n hasMore,\n loading,\n threshold,\n loadMore,\n loader,\n loadingText,\n endText,\n endMessage,\n error,\n errorComponent,\n onError,\n className,\n style,\n width,\n scrollableTarget,\n testMode = false,\n testTriggerRef,\n}) => {\n const theme = useTheme();\n // 150 design px unless the caller says; `rootMargin` only takes px.\n const rootMargin = `${remPx(theme, threshold ?? 150)}px`;\n const { sentinelRef, isIntersecting } = useSentinel({ testMode, rootMargin, scrollableTarget });\n\n useLoadMore({\n hasMore,\n loading,\n error,\n loadMore,\n onError,\n isIntersecting,\n testMode,\n testTriggerRef,\n });\n\n // The tail of the list is one of four things: the end message, an error, a\n // spinner, or the sentinel that asks for the next page.\n const renderSentinel = () => {\n if (!hasMore) return endMessage || <DefaultEndMessage endText={endText} />;\n if (error) return errorComponent || <DefaultError error={error} />;\n if (loading) return loader || <DefaultLoader loadingText={loadingText} />;\n\n return (\n <div\n ref={sentinelRef}\n data-testid=\"infinite-scroll-sentinel\"\n style={{\n height: variant === 'horizontal' ? '100%' : rem(theme, 1),\n width: variant === 'horizontal' ? rem(theme, 1) : '100%',\n }}\n />\n );\n };\n\n return (\n <Box\n className={className}\n sx={{\n ...containerStyles(theme, variant, width),\n ...style,\n }}\n >\n {variant === 'reverse' && renderSentinel()}\n\n {variant === 'horizontal' ? (\n <Box sx={{ display: 'flex', flexDirection: 'row' }}>{children}</Box>\n ) : (\n children\n )}\n\n {variant !== 'reverse' && renderSentinel()}\n\n {variant === 'horizontal' && renderSentinel()}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,SAAS,gBAAgB;AAsDc,cAiBnC,YAjBmC;AAxChC,IAAM,iBAAgD,CAAC;AAAA,EAC5D;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AACF,MAAM;AACJ,QAAM,QAAQ,SAAS;AAEvB,QAAM,aAAa,GAAG,MAAM,OAAO,aAAa,GAAG,CAAC;AACpD,QAAM,EAAE,aAAa,eAAe,IAAI,YAAY,EAAE,UAAU,YAAY,iBAAiB,CAAC;AAE9F,cAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAID,QAAM,iBAAiB,MAAM;AAC3B,QAAI,CAAC,QAAS,QAAO,cAAc,oBAAC,qBAAkB,SAAkB;AACxE,QAAI,MAAO,QAAO,kBAAkB,oBAAC,gBAAa,OAAc;AAChE,QAAI,QAAS,QAAO,UAAU,oBAAC,iBAAc,aAA0B;AAEvE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,eAAY;AAAA,QACZ,OAAO;AAAA,UACL,QAAQ,YAAY,eAAe,SAAS,IAAI,OAAO,CAAC;AAAA,UACxD,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,IAAI;AAAA,QACpD;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,QACF,GAAG,gBAAgB,OAAO,SAAS,KAAK;AAAA,QACxC,GAAG;AAAA,MACL;AAAA,MAEC;AAAA,oBAAY,aAAa,eAAe;AAAA,QAExC,YAAY,eACX,oBAAC,OAAI,IAAI,EAAE,SAAS,QAAQ,eAAe,MAAM,GAAI,UAAS,IAE9D;AAAA,QAGD,YAAY,aAAa,eAAe;AAAA,QAExC,YAAY,gBAAgB,eAAe;AAAA;AAAA;AAAA,EAC9C;AAEJ;","names":[]}
@@ -9,23 +9,23 @@ import {
9
9
  } from "./chunk-O5UGAL2V.js";
10
10
  import {
11
11
  cardGridTracks
12
- } from "./chunk-PPRV4LTM.js";
12
+ } from "./chunk-BWHOCNGW.js";
13
13
  import {
14
14
  ListCardGroup
15
- } from "./chunk-NB3FGWU4.js";
15
+ } from "./chunk-EQXIW5MQ.js";
16
16
  import {
17
17
  DENSITY_BOARD_SCALE,
18
18
  DENSITY_ROW_PADDING,
19
19
  cardScaleForZoom,
20
20
  cardTargetWidthFor,
21
21
  useDataViewsLayout
22
- } from "./chunk-PMOEG36E.js";
22
+ } from "./chunk-XZJM6EPC.js";
23
23
  import {
24
24
  useDataViewsCopy
25
25
  } from "./chunk-KHG57NAE.js";
26
26
  import {
27
27
  DataGrid
28
- } from "./chunk-G4HBNILE.js";
28
+ } from "./chunk-LEHMWJNZ.js";
29
29
  import {
30
30
  default as default2
31
31
  } from "./chunk-6DPAWXZ3.js";
@@ -273,4 +273,4 @@ function GridMain(props) {
273
273
  export {
274
274
  GridMain
275
275
  };
276
- //# sourceMappingURL=chunk-I4QA2F4L.js.map
276
+ //# sourceMappingURL=chunk-HBRQPG7H.js.map
@@ -2,19 +2,24 @@ import {
2
2
  tileBackground
3
3
  } from "./chunk-X6AIKCAV.js";
4
4
  import {
5
- TILE_SIZE
6
- } from "./chunk-TUBCN4DJ.js";
5
+ TILE_WORLD_UNITS
6
+ } from "./chunk-CB6DTWD5.js";
7
+ import {
8
+ rem
9
+ } from "./chunk-YKCAJ2TN.js";
7
10
 
8
11
  // src/components/data-display/MapPreview/MapTiles.tsx
9
12
  import { alpha, useTheme } from "@mui/material/styles/index.js";
10
13
  import { jsx } from "react/jsx-runtime";
11
- var VISIBLE_TILES = Math.ceil(800 / TILE_SIZE) + 2;
14
+ var VISIBLE_TILES = Math.ceil(800 / TILE_WORLD_UNITS) + 2;
12
15
  var LABEL_MIN_ZOOM = 10;
13
16
  var MapTiles = ({ origin, zoom, mapType, panOffset }) => {
14
17
  const theme = useTheme();
15
18
  const borderOpacity = theme.palette.mode === "dark" ? 0.15 : 0.1;
16
19
  const background = tileBackground(mapType, theme);
17
20
  const half = Math.floor(VISIBLE_TILES / 2);
21
+ const tile = rem(theme, TILE_WORLD_UNITS);
22
+ const grid = rem(theme, TILE_WORLD_UNITS * VISIBLE_TILES);
18
23
  return /* @__PURE__ */ jsx(
19
24
  "div",
20
25
  {
@@ -22,12 +27,14 @@ var MapTiles = ({ origin, zoom, mapType, panOffset }) => {
22
27
  position: "absolute",
23
28
  top: "50%",
24
29
  left: "50%",
30
+ // The pan is pointer pixels dragged, so it stays px: the grid follows
31
+ // the cursor exactly, whatever the type scale.
25
32
  transform: `translate(calc(-50% + ${panOffset.x}px), calc(-50% + ${panOffset.y}px))`,
26
- width: TILE_SIZE * VISIBLE_TILES,
27
- height: TILE_SIZE * VISIBLE_TILES,
33
+ width: grid,
34
+ height: grid,
28
35
  display: "grid",
29
- gridTemplateColumns: `repeat(${VISIBLE_TILES}, ${TILE_SIZE}px)`,
30
- gridTemplateRows: `repeat(${VISIBLE_TILES}, ${TILE_SIZE}px)`,
36
+ gridTemplateColumns: `repeat(${VISIBLE_TILES}, ${tile})`,
37
+ gridTemplateRows: `repeat(${VISIBLE_TILES}, ${tile})`,
31
38
  transition: "transform 0.1s ease-out"
32
39
  },
33
40
  children: Array.from({ length: VISIBLE_TILES * VISIBLE_TILES }).map((_, index) => {
@@ -37,14 +44,14 @@ var MapTiles = ({ origin, zoom, mapType, panOffset }) => {
37
44
  "div",
38
45
  {
39
46
  style: {
40
- width: TILE_SIZE,
41
- height: TILE_SIZE,
47
+ width: tile,
48
+ height: tile,
42
49
  border: `1px solid ${alpha(theme.palette.divider, borderOpacity)}`,
43
50
  background,
44
51
  display: "flex",
45
52
  alignItems: "center",
46
53
  justifyContent: "center",
47
- fontSize: "10px",
54
+ fontSize: rem(theme, 10),
48
55
  color: alpha(theme.palette.text.secondary, 0.3),
49
56
  fontFamily: "monospace",
50
57
  userSelect: "none"
@@ -61,4 +68,4 @@ var MapTiles = ({ origin, zoom, mapType, panOffset }) => {
61
68
  export {
62
69
  MapTiles
63
70
  };
64
- //# sourceMappingURL=chunk-HGMBY5LP.js.map
71
+ //# sourceMappingURL=chunk-HQWJUHR4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/MapPreview/MapTiles.tsx"],"sourcesContent":["import { alpha, useTheme } from '@mui/material/styles/index.js';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport { rem } from '../../../tokens/relative';\n\nimport { TILE_WORLD_UNITS } from './mapProjection';\nimport { tileBackground } from './mapSurface';\nimport type { MapType } from './MapPreview.types';\n\n// Two extra rows and columns so panning does not expose an edge.\nconst VISIBLE_TILES = Math.ceil(800 / TILE_WORLD_UNITS) + 2;\n// Tile coordinates are only legible once the grid is reasonably fine.\nconst LABEL_MIN_ZOOM = 10;\n\nexport interface MapTilesProps {\n origin: { x: number; y: number } | null;\n zoom: number;\n mapType: MapType;\n panOffset: { x: number; y: number };\n}\n\nexport const MapTiles: FC<MapTilesProps> = ({ origin, zoom, mapType, panOffset }) => {\n const theme = useTheme();\n const borderOpacity = theme.palette.mode === 'dark' ? 0.15 : 0.1;\n const background = tileBackground(mapType, theme);\n const half = Math.floor(VISIBLE_TILES / 2);\n // A tile is drawn at one design px per world unit, through the type scale.\n const tile = rem(theme, TILE_WORLD_UNITS);\n const grid = rem(theme, TILE_WORLD_UNITS * VISIBLE_TILES);\n\n return (\n <div\n style={{\n position: 'absolute',\n top: '50%',\n left: '50%',\n // The pan is pointer pixels dragged, so it stays px: the grid follows\n // the cursor exactly, whatever the type scale.\n transform: `translate(calc(-50% + ${panOffset.x}px), calc(-50% + ${panOffset.y}px))`,\n width: grid,\n height: grid,\n display: 'grid',\n gridTemplateColumns: `repeat(${VISIBLE_TILES}, ${tile})`,\n gridTemplateRows: `repeat(${VISIBLE_TILES}, ${tile})`,\n transition: 'transform 0.1s ease-out',\n }}\n >\n {Array.from({ length: VISIBLE_TILES * VISIBLE_TILES }).map((_, index) => {\n // The grid is centred on the origin tile, so indices run from -half.\n const tileX = (origin?.x || 0) + (index % VISIBLE_TILES) - half;\n const tileY = (origin?.y || 0) + Math.floor(index / VISIBLE_TILES) - half;\n\n return (\n <div\n key={`tile-${tileX}-${tileY}`}\n style={{\n width: tile,\n height: tile,\n border: `1px solid ${alpha(theme.palette.divider, borderOpacity)}`,\n background,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: rem(theme, 10),\n color: alpha(theme.palette.text.secondary, 0.3),\n fontFamily: 'monospace',\n userSelect: 'none',\n }}\n >\n {zoom > LABEL_MIN_ZOOM && `${tileX},${tileY}`}\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,OAAO,gBAAgB;AAsDtB;AA3CV,IAAM,gBAAgB,KAAK,KAAK,MAAM,gBAAgB,IAAI;AAE1D,IAAM,iBAAiB;AAShB,IAAM,WAA8B,CAAC,EAAE,QAAQ,MAAM,SAAS,UAAU,MAAM;AACnF,QAAM,QAAQ,SAAS;AACvB,QAAM,g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;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  DataViewsDisplayPanel
3
- } from "./chunk-Y7F5JBAT.js";
3
+ } from "./chunk-DDRKYNPB.js";
4
4
  import {
5
5
  DataViewsExportMenu
6
6
  } from "./chunk-6N4AA2Y7.js";
7
7
  import {
8
8
  renderBulkActions
9
- } from "./chunk-PPRV4LTM.js";
9
+ } from "./chunk-BWHOCNGW.js";
10
10
  import {
11
11
  useDataViewsCopy
12
12
  } from "./chunk-KHG57NAE.js";
@@ -136,4 +136,4 @@ function GridToolbar(props) {
136
136
  export {
137
137
  GridToolbar
138
138
  };
139
- //# sourceMappingURL=chunk-CNQUCNEA.js.map
139
+ //# sourceMappingURL=chunk-I3F4C5SS.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FleetBody
3
- } from "./chunk-TKC6WHGB.js";
3
+ } from "./chunk-SBIZXZPP.js";
4
4
  import {
5
5
  FLEET_DEFAULT_LAGGING_AFTER_SECONDS,
6
6
  FLEET_DEFAULT_STALE_AFTER_SECONDS,
@@ -117,4 +117,4 @@ export {
117
117
  FleetMap,
118
118
  FleetMap_default
119
119
  };
120
- //# sourceMappingURL=chunk-UFJYJHQI.js.map
120
+ //# sourceMappingURL=chunk-J5VWGQSR.js.map
@@ -1,4 +1,5 @@
1
1
  // src/components/data-display/Table/Table.helpers.ts
2
+ var tableRowHeight = (rowHeight) => rowHeight ?? 52;
2
3
  var TABLE_DEFAULTS = {
3
4
  variant: "default",
4
5
  stripeColor: "neutral",
@@ -12,7 +13,6 @@ var TABLE_DEFAULTS = {
12
13
  selectedRows: [],
13
14
  sortable: false,
14
15
  virtualScrolling: false,
15
- rowHeight: 52,
16
16
  overscan: 5,
17
17
  responsive: false,
18
18
  showColumnToggle: true
@@ -22,7 +22,8 @@ var definedProps = (props) => Object.fromEntries(
22
22
  );
23
23
 
24
24
  export {
25
+ tableRowHeight,
25
26
  TABLE_DEFAULTS,
26
27
  definedProps
27
28
  };
28
- //# sourceMappingURL=chunk-MTFCPPZ5.js.map
29
+ //# sourceMappingURL=chunk-JWZJSXI5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Table/Table.helpers.ts"],"sourcesContent":["import type { TableProps } from './Table.types';\n\n/**\n * A virtualised row's height in design px: the caller's `rowHeight`, else 52.\n * Resolved here rather than in {@link TABLE_DEFAULTS} so the one number is read\n * where it is drawn (`rem`) and where the window is positioned with it (`remPx`).\n */\nexport const tableRowHeight = (rowHeight: number | undefined): number => rowHeight ?? 52;\n\nexport const TABLE_DEFAULTS: Partial<TableProps> = {\n variant: 'default',\n stripeColor: 'neutral',\n glow: false,\n pulse: false,\n hoverable: false,\n loading: false,\n density: 'normal',\n stickyHeader: false,\n selectable: false,\n selectedRows: [],\n sortable: false,\n virtualScrolling: false,\n overscan: 5,\n responsive: false,\n showColumnToggle: true,\n};\n\n// Strips explicitly-undefined props before the merge, so `prop={undefined}` still\n// falls back to the default as a destructuring default would. Eighteen separate\n// destructuring defaults were most of this component's branch count.\nexport const definedProps = (props: TableProps): Partial<TableProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<TableProps>;\n\n// The container + styled table + optional header, shared by the loading, empty\n// and populated renders.\n"],"mappings":";AAOO,IAAM,iBAAiB,CAAC,cAA0C,aAAa;AAE/E,IAAM,iBAAsC;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,EACP,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AAAA,EACT,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA,EACf,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,kBAAkB;AACpB;AAKO,IAAM,eAAe,CAAC,UAC3B,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;","names":[]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  onTrackInk,
3
3
  switchSx
4
- } from "./chunk-AUSUCZYR.js";
4
+ } from "./chunk-ZBVU2YWV.js";
5
5
  import {
6
6
  LABEL_GAP_UNITS,
7
7
  SWITCH_ICON_SIZES,
8
8
  TAP_TARGET_MIN
9
- } from "./chunk-D5SZXH7Q.js";
9
+ } from "./chunk-TNBJ4DK4.js";
10
10
  import {
11
11
  sxRem
12
12
  } from "./chunk-YKCAJ2TN.js";
@@ -220,4 +220,4 @@ export {
220
220
  SwitchHelper,
221
221
  SwitchRow
222
222
  };
223
- //# sourceMappingURL=chunk-4JFL62K3.js.map
223
+ //# sourceMappingURL=chunk-K7FSTB2K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  STACK_BREAK
3
- } from "./chunk-M2JTIH5M.js";
3
+ } from "./chunk-F44R7US6.js";
4
4
  import {
5
5
  CARD_RADIUS,
6
6
  cardSurfaceStyles,
@@ -16,10 +16,10 @@ import {
16
16
  RAIL_GAP,
17
17
  railsTemplateFor,
18
18
  useListRails
19
- } from "./chunk-NB3FGWU4.js";
19
+ } from "./chunk-EQXIW5MQ.js";
20
20
  import {
21
21
  DENSITY_ROW_PADDING
22
- } from "./chunk-PMOEG36E.js";
22
+ } from "./chunk-XZJM6EPC.js";
23
23
  import {
24
24
  rem
25
25
  } from "./chunk-YKCAJ2TN.js";
@@ -189,4 +189,4 @@ export {
189
189
  actionProps,
190
190
  rowStyles
191
191
  };
192
- //# sourceMappingURL=chunk-FFCJ7NR2.js.map
192
+ //# sourceMappingURL=chunk-KRQUPE4K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SaveViewModal
3
- } from "./chunk-MR2HKBHS.js";
3
+ } from "./chunk-27LOJVR3.js";
4
4
  import {
5
5
  ManageViewsDialog
6
6
  } from "./chunk-QA2ZGCRL.js";
@@ -121,4 +121,4 @@ export {
121
121
  ViewsMenuSlot,
122
122
  ViewDialogs
123
123
  };
124
- //# sourceMappingURL=chunk-2OYFTSG4.js.map
124
+ //# sourceMappingURL=chunk-KXLUMEDX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MapPreview
3
- } from "./chunk-XJPJ6ESI.js";
3
+ } from "./chunk-4OAKGKK5.js";
4
4
 
5
5
  // src/components/data-display/FleetMap/FleetCanvas.tsx
6
6
  import Box from "@mui/material/Box/index.js";
@@ -38,4 +38,4 @@ function FleetCanvas({
38
38
  export {
39
39
  FleetCanvas
40
40
  };
41
- //# sourceMappingURL=chunk-DVAAUWTC.js.map
41
+ //# sourceMappingURL=chunk-LCHCE2G5.js.map
@@ -5,11 +5,11 @@ import {
5
5
  } from "./chunk-EARWC6PD.js";
6
6
  import {
7
7
  useDataGridModel
8
- } from "./chunk-DLJGBJZW.js";
8
+ } from "./chunk-DGMDQHMI.js";
9
9
  import {
10
10
  GridBody,
11
11
  GridHeader
12
- } from "./chunk-HTZNB6IV.js";
12
+ } from "./chunk-H5ZTIELC.js";
13
13
 
14
14
  // src/components/data-display/DataGrid/DataGrid.tsx
15
15
  import Paper from "@mui/material/Paper/index.js";
@@ -117,4 +117,4 @@ export {
117
117
  DataGrid,
118
118
  GRID_ONLY_PROPS
119
119
  };
120
- //# sourceMappingURL=chunk-G4HBNILE.js.map
120
+ //# sourceMappingURL=chunk-LEHMWJNZ.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  resizedTo
3
- } from "./chunk-3TDVGZZN.js";
3
+ } from "./chunk-QBTBRJ2Q.js";
4
4
 
5
5
  // src/components/layout/Resizable/Resizable.hooks.ts
6
6
  import React, { useCallback, useRef, useState } from "react";
7
- var useResize = ({ width, height, bounds, disabled, onResize }) => {
8
- const [size, setSize] = useState({ width, height });
7
+ var useResize = ({ start, bounds, pxPerDesignPx, disabled, onResize }) => {
8
+ const [size, setSize] = useState(start);
9
9
  const [isResizing, setIsResizing] = useState(false);
10
10
  const startPos = useRef({ x: 0, y: 0 });
11
11
  const startSize = useRef({ width: 0, height: 0 });
12
12
  const activeHandle = useRef(null);
13
13
  React.useEffect(() => {
14
- setSize({ width, height });
15
- }, [width, height]);
14
+ setSize(start);
15
+ }, [start]);
16
16
  const handleMouseDown = useCallback(
17
17
  (e, handle) => {
18
18
  if (disabled) return;
@@ -21,7 +21,7 @@ var useResize = ({ width, height, bounds, disabled, onResize }) => {
21
21
  setIsResizing(true);
22
22
  activeHandle.current = handle;
23
23
  startPos.current = { x: e.clientX, y: e.clientY };
24
- startSize.current = { width: size.width, height: size.height };
24
+ startSize.current = size;
25
25
  const handleMouseMove = (move) => {
26
26
  const delta = {
27
27
  x: move.clientX - startPos.current.x,
@@ -29,7 +29,7 @@ var useResize = ({ width, height, bounds, disabled, onResize }) => {
29
29
  };
30
30
  const next = resizedTo(handle, delta, startSize.current, bounds);
31
31
  setSize(next);
32
- onResize?.(next.width, next.height);
32
+ onResize?.(next.width / pxPerDesignPx, next.height / pxPerDesignPx);
33
33
  };
34
34
  const handleMouseUp = () => {
35
35
  setIsResizing(false);
@@ -40,7 +40,7 @@ var useResize = ({ width, height, bounds, disabled, onResize }) => {
40
40
  document.addEventListener("mousemove", handleMouseMove);
41
41
  document.addEventListener("mouseup", handleMouseUp);
42
42
  },
43
- [disabled, size, bounds, onResize]
43
+ [disabled, size, bounds, pxPerDesignPx, onResize]
44
44
  );
45
45
  return { size, isResizing, activeHandle, handleMouseDown };
46
46
  };
@@ -48,4 +48,4 @@ var useResize = ({ width, height, bounds, disabled, onResize }) => {
48
48
  export {
49
49
  useResize
50
50
  };
51
- //# sourceMappingURL=chunk-P6TNXBDA.js.map
51
+ //# sourceMappingURL=chunk-MYKWJCR7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/layout/Resizable/Resizable.hooks.ts"],"sourcesContent":["import React, { useCallback, useRef, useState } from 'react';\n\nimport type { Bounds } from './Resizable.helpers';\nimport { resizedTo } from './Resizable.helpers';\nimport type { ResizeHandle } from './Resizable.types';\n\ninterface ResizeArgs {\n /** Where the box starts, in px (`startSizePx`); a new object re-seats the box. */\n start: { width: number; height: number };\n /** The clamp, in px (`axisPx` per axis). */\n bounds: Bounds;\n /** Rendered px per design px (`remPx(theme, 1)`) — `onResize` reports design px. */\n pxPerDesignPx: number;\n disabled: boolean;\n onResize?: (width: number, height: number) => void;\n}\n\n/**\n * Tracks the box's size across a drag. The listeners live on the document rather\n * than the handle, so the pointer can leave the handle — or the component — mid\n * drag without the resize sticking.\n *\n * The live size is px, because a drag is pointer pixels. What `onResize`\n * reports is design px — the unit the consumer's `width`/`height` are in — so a\n * controlled box (`onResize` feeding `width`) stays put at any type scale.\n */\nexport const useResize = ({ start, bounds, pxPerDesignPx, disabled, onResize }: ResizeArgs) => {\n const [size, setSize] = useState(start);\n const [isResizing, setIsResizing] = useState(false);\n const startPos = useRef({ x: 0, y: 0 });\n const startSize = useRef({ width: 0, height: 0 });\n const activeHandle = useRef<ResizeHandle | null>(null);\n\n React.useEffect(() => {\n setSize(start);\n }, [start]);\n\n const handleMouseDown = useCallback(\n (e: React.MouseEvent, handle: ResizeHandle) => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n setIsResizing(true);\n activeHandle.current = handle;\n startPos.current = { x: e.clientX, y: e.clientY };\n // State is replaced on every change, never mutated, so holding it is a snapshot.\n startSize.current = size;\n\n const handleMouseMove = (move: globalThis.MouseEvent) => {\n const delta = {\n x: move.clientX - startPos.current.x,\n y: move.clientY - startPos.current.y,\n };\n const next = resizedTo(handle, delta, startSize.current, bounds);\n\n setSize(next);\n onResize?.(next.width / pxPerDesignPx, next.height / pxPerDesignPx);\n };\n\n const handleMouseUp = () => {\n setIsResizing(false);\n activeHandle.current = null;\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n },\n [disabled, size, bounds, pxPerDesignPx, on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