@flipdish/ui-library 0.69.0 → 0.71.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 (415) hide show
  1. package/README.md +3 -3
  2. package/dist/components/__internal__/controlFill/controlFill.context.cjs +13 -0
  3. package/dist/components/__internal__/controlFill/controlFill.context.cjs.map +1 -0
  4. package/dist/components/__internal__/controlFill/controlFill.context.d.ts +7 -0
  5. package/dist/components/__internal__/controlFill/controlFill.context.d.ts.map +1 -0
  6. package/dist/components/__internal__/controlFill/controlFill.context.js +11 -0
  7. package/dist/components/__internal__/controlFill/controlFill.context.js.map +1 -0
  8. package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs +13 -0
  9. package/dist/components/__internal__/focusHandOff/focusHandOff.context.cjs.map +1 -0
  10. package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts +8 -0
  11. package/dist/components/__internal__/focusHandOff/focusHandOff.context.d.ts.map +1 -0
  12. package/dist/components/__internal__/focusHandOff/focusHandOff.context.js +11 -0
  13. package/dist/components/__internal__/focusHandOff/focusHandOff.context.js.map +1 -0
  14. package/dist/components/atoms/Buttons/Button/hooks/useLoadingLinkPress.d.ts +1 -1
  15. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs +1 -1
  16. package/dist/components/atoms/Buttons/IconButton/IconButton.cjs.map +1 -1
  17. package/dist/components/atoms/Buttons/IconButton/IconButton.d.ts.map +1 -1
  18. package/dist/components/atoms/Buttons/IconButton/IconButton.js +1 -1
  19. package/dist/components/atoms/Buttons/IconButton/IconButton.js.map +1 -1
  20. package/dist/components/atoms/LiveStatus/index.cjs +18 -0
  21. package/dist/components/atoms/LiveStatus/index.cjs.map +1 -0
  22. package/dist/components/atoms/LiveStatus/index.d.ts +17 -0
  23. package/dist/components/atoms/LiveStatus/index.d.ts.map +1 -0
  24. package/dist/components/atoms/LiveStatus/index.js +16 -0
  25. package/dist/components/atoms/LiveStatus/index.js.map +1 -0
  26. package/dist/components/forms/Form/index.cjs +1 -1
  27. package/dist/components/forms/Form/index.js +1 -1
  28. package/dist/components/molecules/Dropdown/index.d.ts +2 -2
  29. package/dist/components/molecules/EmptyState/index.cjs +9 -1
  30. package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
  31. package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
  32. package/dist/components/molecules/EmptyState/index.js +11 -3
  33. package/dist/components/molecules/EmptyState/index.js.map +1 -1
  34. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs +13 -0
  35. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.cjs.map +1 -1
  36. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts +8 -0
  37. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.d.ts.map +1 -1
  38. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js +13 -1
  39. package/dist/components/molecules/EmptyState/utilities/emptyState.utils.js.map +1 -1
  40. package/dist/components/molecules/Modals/Modal/Modal.cjs +6 -5
  41. package/dist/components/molecules/Modals/Modal/Modal.cjs.map +1 -1
  42. package/dist/components/molecules/Modals/Modal/Modal.d.ts.map +1 -1
  43. package/dist/components/molecules/Modals/Modal/Modal.js +6 -5
  44. package/dist/components/molecules/Modals/Modal/Modal.js.map +1 -1
  45. package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.cjs +1 -1
  46. package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts +1 -1
  47. package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.d.ts.map +1 -1
  48. package/dist/components/molecules/Paginations/utilities/paginationScroll.utils.js +1 -1
  49. package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts +1 -1
  50. package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts.map +1 -1
  51. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +4 -1
  52. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -1
  53. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  54. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +5 -2
  55. package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -1
  56. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs +11 -6
  57. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.cjs.map +1 -1
  58. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts +4 -2
  59. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.d.ts.map +1 -1
  60. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js +12 -7
  61. package/dist/components/organisms/FilterBar/components/FilterDropdownMenu.js.map +1 -1
  62. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs +53 -0
  63. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.cjs.map +1 -0
  64. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts +41 -0
  65. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.d.ts.map +1 -0
  66. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js +51 -0
  67. package/dist/components/organisms/FilterBar/hooks/useFilterDraft.js.map +1 -0
  68. package/dist/components/organisms/FilterBar/index.cjs +19 -7
  69. package/dist/components/organisms/FilterBar/index.cjs.map +1 -1
  70. package/dist/components/organisms/FilterBar/index.d.ts +1 -0
  71. package/dist/components/organisms/FilterBar/index.d.ts.map +1 -1
  72. package/dist/components/organisms/FilterBar/index.js +18 -7
  73. package/dist/components/organisms/FilterBar/index.js.map +1 -1
  74. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.cjs +2 -0
  75. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.cjs.map +1 -1
  76. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.d.ts +10 -0
  77. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.d.ts.map +1 -1
  78. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.js +2 -0
  79. package/dist/components/organisms/SlideoutMenu/hooks/useSlideoutState.js.map +1 -1
  80. package/dist/components/organisms/SlideoutMenu/index.cjs +3 -1
  81. package/dist/components/organisms/SlideoutMenu/index.cjs.map +1 -1
  82. package/dist/components/organisms/SlideoutMenu/index.d.ts.map +1 -1
  83. package/dist/components/organisms/SlideoutMenu/index.js +3 -1
  84. package/dist/components/organisms/SlideoutMenu/index.js.map +1 -1
  85. package/dist/components/organisms/Table/index.cjs +14 -244
  86. package/dist/components/organisms/Table/index.cjs.map +1 -1
  87. package/dist/components/organisms/Table/index.d.ts +29 -124
  88. package/dist/components/organisms/Table/index.d.ts.map +1 -1
  89. package/dist/components/organisms/Table/index.js +13 -243
  90. package/dist/components/organisms/Table/index.js.map +1 -1
  91. package/dist/components/organisms/Tables/Table/Table.cjs +305 -0
  92. package/dist/components/organisms/Tables/Table/Table.cjs.map +1 -0
  93. package/dist/components/organisms/Tables/Table/Table.d.ts +146 -0
  94. package/dist/components/organisms/Tables/Table/Table.d.ts.map +1 -0
  95. package/dist/components/organisms/Tables/Table/Table.js +301 -0
  96. package/dist/components/organisms/Tables/Table/Table.js.map +1 -0
  97. package/dist/components/organisms/Tables/Table/Table.styles.cjs +29 -0
  98. package/dist/components/organisms/Tables/Table/Table.styles.cjs.map +1 -0
  99. package/dist/components/organisms/Tables/Table/Table.styles.d.ts +16 -0
  100. package/dist/components/organisms/Tables/Table/Table.styles.d.ts.map +1 -0
  101. package/dist/components/organisms/Tables/Table/Table.styles.js +27 -0
  102. package/dist/components/organisms/Tables/Table/Table.styles.js.map +1 -0
  103. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.cjs +2 -2
  104. package/dist/components/organisms/Tables/Table/components/TableCardList.cjs.map +1 -0
  105. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.d.ts +1 -1
  106. package/dist/components/organisms/Tables/Table/components/TableCardList.d.ts.map +1 -0
  107. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardList.js +2 -2
  108. package/dist/components/organisms/Tables/Table/components/TableCardList.js.map +1 -0
  109. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.cjs +10 -5
  110. package/dist/components/organisms/Tables/Table/components/TableCardRow.cjs.map +1 -0
  111. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.d.ts +1 -1
  112. package/dist/components/organisms/Tables/Table/components/TableCardRow.d.ts.map +1 -0
  113. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardRow.js +11 -6
  114. package/dist/components/organisms/Tables/Table/components/TableCardRow.js.map +1 -0
  115. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.cjs +2 -2
  116. package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.cjs.map +1 -0
  117. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.d.ts +3 -1
  118. package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.d.ts.map +1 -0
  119. package/dist/components/organisms/{Table → Tables/Table}/components/TableCardsSelectAll.js +2 -2
  120. package/dist/components/organisms/Tables/Table/components/TableCardsSelectAll.js.map +1 -0
  121. package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs +17 -0
  122. package/dist/components/organisms/Tables/Table/components/TableEmptyState.cjs.map +1 -0
  123. package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts +5 -0
  124. package/dist/components/organisms/Tables/Table/components/TableEmptyState.d.ts.map +1 -0
  125. package/dist/components/organisms/Tables/Table/components/TableEmptyState.js +15 -0
  126. package/dist/components/organisms/Tables/Table/components/TableEmptyState.js.map +1 -0
  127. package/dist/components/organisms/Tables/Table/components/TableFallbackCard.cjs.map +1 -0
  128. package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.d.ts +1 -1
  129. package/dist/components/organisms/Tables/Table/components/TableFallbackCard.d.ts.map +1 -0
  130. package/dist/components/organisms/Tables/Table/components/TableFallbackCard.js.map +1 -0
  131. package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.cjs +6 -5
  132. package/dist/components/organisms/Tables/Table/components/TableRowCard.cjs.map +1 -0
  133. package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.d.ts +1 -1
  134. package/dist/components/organisms/Tables/Table/components/TableRowCard.d.ts.map +1 -0
  135. package/dist/components/organisms/{Table → Tables/Table}/components/TableRowCard.js +6 -5
  136. package/dist/components/organisms/Tables/Table/components/TableRowCard.js.map +1 -0
  137. package/dist/components/organisms/Tables/Table/components/TableSortIcon.cjs.map +1 -0
  138. package/dist/components/organisms/Tables/Table/components/TableSortIcon.d.ts.map +1 -0
  139. package/dist/components/organisms/Tables/Table/components/TableSortIcon.js.map +1 -0
  140. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.cjs +22 -0
  141. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.cjs.map +1 -0
  142. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.d.ts +12 -0
  143. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.d.ts.map +1 -0
  144. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.js +20 -0
  145. package/dist/components/organisms/Tables/Table/hooks/useBusyCount.js.map +1 -0
  146. package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.cjs +1 -1
  147. package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.cjs.map +1 -0
  148. package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.d.ts.map +1 -0
  149. package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.js +1 -1
  150. package/dist/components/organisms/Tables/Table/hooks/useFirstSortDirection.js.map +1 -0
  151. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.cjs +42 -0
  152. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.cjs.map +1 -0
  153. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.d.ts +14 -0
  154. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.d.ts.map +1 -0
  155. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.js +40 -0
  156. package/dist/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.js.map +1 -0
  157. package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.cjs +8 -11
  158. package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.cjs.map +1 -0
  159. package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.d.ts +10 -3
  160. package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.d.ts.map +1 -0
  161. package/dist/components/organisms/{Table → Tables/Table}/hooks/usePlaceholderRows.js +9 -12
  162. package/dist/components/organisms/Tables/Table/hooks/usePlaceholderRows.js.map +1 -0
  163. package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.cjs.map +1 -0
  164. package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.d.ts +1 -1
  165. package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.d.ts.map +1 -0
  166. package/dist/components/organisms/Tables/Table/hooks/useSelectableRowRegistry.js.map +1 -0
  167. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs +83 -0
  168. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.cjs.map +1 -0
  169. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts +23 -0
  170. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.d.ts.map +1 -0
  171. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js +81 -0
  172. package/dist/components/organisms/Tables/Table/hooks/useTableFocusHandOff.js.map +1 -0
  173. package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.cjs +12 -4
  174. package/dist/components/organisms/Tables/Table/hooks/useTableSelection.cjs.map +1 -0
  175. package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.d.ts +5 -3
  176. package/dist/components/organisms/Tables/Table/hooks/useTableSelection.d.ts.map +1 -0
  177. package/dist/components/organisms/{Table → Tables/Table}/hooks/useTableSelection.js +12 -4
  178. package/dist/components/organisms/Tables/Table/hooks/useTableSelection.js.map +1 -0
  179. package/dist/components/organisms/Tables/Table/providers/Table.context.cjs.map +1 -0
  180. package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.d.ts +14 -2
  181. package/dist/components/organisms/Tables/Table/providers/Table.context.d.ts.map +1 -0
  182. package/dist/components/organisms/Tables/Table/providers/Table.context.js.map +1 -0
  183. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs +55 -0
  184. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.cjs.map +1 -0
  185. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts +25 -0
  186. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.d.ts.map +1 -0
  187. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js +51 -0
  188. package/dist/components/organisms/Tables/Table/utilities/tableFocusHandOff.utils.js.map +1 -0
  189. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.cjs +57 -0
  190. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.cjs.map +1 -0
  191. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.d.ts +66 -0
  192. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.d.ts.map +1 -0
  193. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.js +52 -0
  194. package/dist/components/organisms/Tables/Table/utilities/tableLoading.utils.js.map +1 -0
  195. package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.cjs +21 -21
  196. package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.cjs.map +1 -0
  197. package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.d.ts +29 -19
  198. package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.d.ts.map +1 -0
  199. package/dist/components/organisms/{Table → Tables/Table}/utilities/tableSelection.utils.js +20 -21
  200. package/dist/components/organisms/Tables/Table/utilities/tableSelection.utils.js.map +1 -0
  201. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs +34 -0
  202. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.cjs.map +1 -0
  203. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts +37 -0
  204. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.d.ts.map +1 -0
  205. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js +32 -0
  206. package/dist/components/organisms/Tables/TableLayoutToggle/TableLayoutToggle.js.map +1 -0
  207. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs +32 -0
  208. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.cjs.map +1 -0
  209. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts +21 -0
  210. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.d.ts.map +1 -0
  211. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js +30 -0
  212. package/dist/components/organisms/Tables/TableLayoutToggle/hooks/useTableLayoutToggle.js.map +1 -0
  213. package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.cjs +12 -5
  214. package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.cjs.map +1 -0
  215. package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.d.ts +47 -0
  216. package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.d.ts.map +1 -0
  217. package/dist/components/organisms/{Table/components → Tables/TableSortMenu}/TableSortMenu.js +12 -5
  218. package/dist/components/organisms/Tables/TableSortMenu/TableSortMenu.js.map +1 -0
  219. package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.cjs.map +1 -0
  220. package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.d.ts.map +1 -0
  221. package/dist/components/organisms/Tables/hooks/useIsAtLeastMd.js.map +1 -0
  222. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs +84 -0
  223. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.cjs.map +1 -0
  224. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts +20 -0
  225. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.d.ts.map +1 -0
  226. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js +81 -0
  227. package/dist/components/organisms/Tables/hooks/useStoredTableLayout.js.map +1 -0
  228. package/dist/components/organisms/Tables/index.cjs +14 -0
  229. package/dist/components/organisms/Tables/index.cjs.map +1 -0
  230. package/dist/components/organisms/Tables/index.d.ts +19 -0
  231. package/dist/components/organisms/Tables/index.d.ts.map +1 -0
  232. package/dist/components/organisms/Tables/index.js +4 -0
  233. package/dist/components/organisms/Tables/index.js.map +1 -0
  234. package/dist/components/organisms/{Table/table.types.d.ts → Tables/tables.types.d.ts} +12 -2
  235. package/dist/components/organisms/Tables/tables.types.d.ts.map +1 -0
  236. package/dist/components/organisms/Tables/utilities/tableCard.utils.cjs.map +1 -0
  237. package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.d.ts +2 -2
  238. package/dist/components/organisms/Tables/utilities/tableCard.utils.d.ts.map +1 -0
  239. package/dist/components/organisms/Tables/utilities/tableCard.utils.js.map +1 -0
  240. package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.cjs +7 -4
  241. package/dist/components/organisms/Tables/utilities/tableChildren.utils.cjs.map +1 -0
  242. package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.d.ts +5 -3
  243. package/dist/components/organisms/Tables/utilities/tableChildren.utils.d.ts.map +1 -0
  244. package/dist/components/organisms/{Table → Tables}/utilities/tableChildren.utils.js +7 -4
  245. package/dist/components/organisms/Tables/utilities/tableChildren.utils.js.map +1 -0
  246. package/dist/components/organisms/Tables/utilities/tableIterable.utils.cjs +23 -0
  247. package/dist/components/organisms/Tables/utilities/tableIterable.utils.cjs.map +1 -0
  248. package/dist/components/organisms/Tables/utilities/tableIterable.utils.d.ts +8 -0
  249. package/dist/components/organisms/Tables/utilities/tableIterable.utils.d.ts.map +1 -0
  250. package/dist/components/organisms/Tables/utilities/tableIterable.utils.js +21 -0
  251. package/dist/components/organisms/Tables/utilities/tableIterable.utils.js.map +1 -0
  252. package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.cjs +1 -1
  253. package/dist/components/organisms/Tables/utilities/tableSort.utils.cjs.map +1 -0
  254. package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.d.ts +1 -1
  255. package/dist/components/organisms/Tables/utilities/tableSort.utils.d.ts.map +1 -0
  256. package/dist/components/organisms/{Table → Tables}/utilities/tableSort.utils.js +1 -1
  257. package/dist/components/organisms/Tables/utilities/tableSort.utils.js.map +1 -0
  258. package/dist/hooks/useFocusAfterRetry/index.cjs +21 -19
  259. package/dist/hooks/useFocusAfterRetry/index.cjs.map +1 -1
  260. package/dist/hooks/useFocusAfterRetry/index.d.ts +15 -5
  261. package/dist/hooks/useFocusAfterRetry/index.d.ts.map +1 -1
  262. package/dist/hooks/useFocusAfterRetry/index.js +21 -19
  263. package/dist/hooks/useFocusAfterRetry/index.js.map +1 -1
  264. package/dist/hooks/useFocusHandOff/index.cjs +67 -0
  265. package/dist/hooks/useFocusHandOff/index.cjs.map +1 -0
  266. package/dist/hooks/useFocusHandOff/index.d.ts +17 -0
  267. package/dist/hooks/useFocusHandOff/index.d.ts.map +1 -0
  268. package/dist/hooks/useFocusHandOff/index.js +65 -0
  269. package/dist/hooks/useFocusHandOff/index.js.map +1 -0
  270. package/dist/hooks/useListQueryParams/index.cjs +238 -0
  271. package/dist/hooks/useListQueryParams/index.cjs.map +1 -0
  272. package/dist/hooks/useListQueryParams/index.d.ts +77 -0
  273. package/dist/hooks/useListQueryParams/index.d.ts.map +1 -0
  274. package/dist/hooks/useListQueryParams/index.js +236 -0
  275. package/dist/hooks/useListQueryParams/index.js.map +1 -0
  276. package/dist/hooks/useLoadState/index.cjs +69 -0
  277. package/dist/hooks/useLoadState/index.cjs.map +1 -0
  278. package/dist/hooks/useLoadState/index.d.ts +44 -0
  279. package/dist/hooks/useLoadState/index.d.ts.map +1 -0
  280. package/dist/hooks/useLoadState/index.js +67 -0
  281. package/dist/hooks/useLoadState/index.js.map +1 -0
  282. package/dist/hooks/usePagedList/index.cjs +61 -0
  283. package/dist/hooks/usePagedList/index.cjs.map +1 -0
  284. package/dist/hooks/usePagedList/index.d.ts +56 -0
  285. package/dist/hooks/usePagedList/index.d.ts.map +1 -0
  286. package/dist/hooks/usePagedList/index.js +59 -0
  287. package/dist/hooks/usePagedList/index.js.map +1 -0
  288. package/dist/native/components/atoms/LiveStatus/index.d.ts +12 -0
  289. package/dist/native/components/organisms/Tables/index.d.ts +12 -0
  290. package/dist/native/hooks/useFocusHandOff/index.d.ts +12 -0
  291. package/dist/native/hooks/useListQueryParams/index.d.ts +12 -0
  292. package/dist/native/hooks/useLoadState/index.d.ts +12 -0
  293. package/dist/native/hooks/usePagedList/index.d.ts +12 -0
  294. package/dist/native/utilities/listQueryUtils/index.d.ts +12 -0
  295. package/dist/styles.css +12 -0
  296. package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.cjs +9 -0
  297. package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.cjs.map +1 -0
  298. package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.d.ts +8 -0
  299. package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.d.ts.map +1 -0
  300. package/dist/{components/forms/Form/utilities → utilities/__internal__/focusUtils}/focusFromCode.utils.js +9 -1
  301. package/dist/utilities/__internal__/focusUtils/focusFromCode.utils.js.map +1 -0
  302. package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs +47 -0
  303. package/dist/utilities/__internal__/listStateUtils/listState.utils.cjs.map +1 -0
  304. package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts +51 -0
  305. package/dist/utilities/__internal__/listStateUtils/listState.utils.d.ts.map +1 -0
  306. package/dist/utilities/__internal__/listStateUtils/listState.utils.js +43 -0
  307. package/dist/utilities/__internal__/listStateUtils/listState.utils.js.map +1 -0
  308. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs +67 -0
  309. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.cjs.map +1 -0
  310. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts +27 -0
  311. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.d.ts.map +1 -0
  312. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js +64 -0
  313. package/dist/utilities/__internal__/stableKeyUtils/stableKey.utils.js.map +1 -0
  314. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs +28 -0
  315. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.cjs.map +1 -1
  316. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts +10 -0
  317. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.d.ts.map +1 -1
  318. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js +28 -1
  319. package/dist/utilities/__internal__/webStorageUtils/webStorage.utils.js.map +1 -1
  320. package/dist/utilities/listQueryUtils/index.cjs +59 -0
  321. package/dist/utilities/listQueryUtils/index.cjs.map +1 -0
  322. package/dist/utilities/listQueryUtils/index.d.ts +46 -0
  323. package/dist/utilities/listQueryUtils/index.d.ts.map +1 -0
  324. package/dist/utilities/listQueryUtils/index.js +55 -0
  325. package/dist/utilities/listQueryUtils/index.js.map +1 -0
  326. package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs +2 -0
  327. package/dist/utilities/localStorageUtils/localStorageUtils.constants.cjs.map +1 -1
  328. package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts +2 -0
  329. package/dist/utilities/localStorageUtils/localStorageUtils.constants.d.ts.map +1 -1
  330. package/dist/utilities/localStorageUtils/localStorageUtils.constants.js +2 -0
  331. package/dist/utilities/localStorageUtils/localStorageUtils.constants.js.map +1 -1
  332. package/package.json +9 -9
  333. package/dist/components/forms/Form/utilities/focusFromCode.utils.cjs.map +0 -1
  334. package/dist/components/forms/Form/utilities/focusFromCode.utils.d.ts.map +0 -1
  335. package/dist/components/forms/Form/utilities/focusFromCode.utils.js.map +0 -1
  336. package/dist/components/organisms/Table/components/TableCardList.cjs.map +0 -1
  337. package/dist/components/organisms/Table/components/TableCardList.d.ts.map +0 -1
  338. package/dist/components/organisms/Table/components/TableCardList.js.map +0 -1
  339. package/dist/components/organisms/Table/components/TableCardRow.cjs.map +0 -1
  340. package/dist/components/organisms/Table/components/TableCardRow.d.ts.map +0 -1
  341. package/dist/components/organisms/Table/components/TableCardRow.js.map +0 -1
  342. package/dist/components/organisms/Table/components/TableCardsSelectAll.cjs.map +0 -1
  343. package/dist/components/organisms/Table/components/TableCardsSelectAll.d.ts.map +0 -1
  344. package/dist/components/organisms/Table/components/TableCardsSelectAll.js.map +0 -1
  345. package/dist/components/organisms/Table/components/TableFallbackCard.cjs.map +0 -1
  346. package/dist/components/organisms/Table/components/TableFallbackCard.d.ts.map +0 -1
  347. package/dist/components/organisms/Table/components/TableFallbackCard.js.map +0 -1
  348. package/dist/components/organisms/Table/components/TableFocusGuard.cjs +0 -23
  349. package/dist/components/organisms/Table/components/TableFocusGuard.cjs.map +0 -1
  350. package/dist/components/organisms/Table/components/TableFocusGuard.d.ts +0 -2
  351. package/dist/components/organisms/Table/components/TableFocusGuard.d.ts.map +0 -1
  352. package/dist/components/organisms/Table/components/TableFocusGuard.js +0 -21
  353. package/dist/components/organisms/Table/components/TableFocusGuard.js.map +0 -1
  354. package/dist/components/organisms/Table/components/TableLayoutToggle.cjs +0 -27
  355. package/dist/components/organisms/Table/components/TableLayoutToggle.cjs.map +0 -1
  356. package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts +0 -17
  357. package/dist/components/organisms/Table/components/TableLayoutToggle.d.ts.map +0 -1
  358. package/dist/components/organisms/Table/components/TableLayoutToggle.js +0 -25
  359. package/dist/components/organisms/Table/components/TableLayoutToggle.js.map +0 -1
  360. package/dist/components/organisms/Table/components/TableRowCard.cjs.map +0 -1
  361. package/dist/components/organisms/Table/components/TableRowCard.d.ts.map +0 -1
  362. package/dist/components/organisms/Table/components/TableRowCard.js.map +0 -1
  363. package/dist/components/organisms/Table/components/TableSortIcon.cjs.map +0 -1
  364. package/dist/components/organisms/Table/components/TableSortIcon.d.ts.map +0 -1
  365. package/dist/components/organisms/Table/components/TableSortIcon.js.map +0 -1
  366. package/dist/components/organisms/Table/components/TableSortMenu.cjs.map +0 -1
  367. package/dist/components/organisms/Table/components/TableSortMenu.d.ts +0 -35
  368. package/dist/components/organisms/Table/components/TableSortMenu.d.ts.map +0 -1
  369. package/dist/components/organisms/Table/components/TableSortMenu.js.map +0 -1
  370. package/dist/components/organisms/Table/hooks/useFirstSortDirection.cjs.map +0 -1
  371. package/dist/components/organisms/Table/hooks/useFirstSortDirection.d.ts.map +0 -1
  372. package/dist/components/organisms/Table/hooks/useFirstSortDirection.js.map +0 -1
  373. package/dist/components/organisms/Table/hooks/useIsAtLeastMd.cjs.map +0 -1
  374. package/dist/components/organisms/Table/hooks/useIsAtLeastMd.d.ts.map +0 -1
  375. package/dist/components/organisms/Table/hooks/useIsAtLeastMd.js.map +0 -1
  376. package/dist/components/organisms/Table/hooks/usePlaceholderRows.cjs.map +0 -1
  377. package/dist/components/organisms/Table/hooks/usePlaceholderRows.d.ts.map +0 -1
  378. package/dist/components/organisms/Table/hooks/usePlaceholderRows.js.map +0 -1
  379. package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.cjs.map +0 -1
  380. package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.d.ts.map +0 -1
  381. package/dist/components/organisms/Table/hooks/useSelectableRowRegistry.js.map +0 -1
  382. package/dist/components/organisms/Table/hooks/useTableSelection.cjs.map +0 -1
  383. package/dist/components/organisms/Table/hooks/useTableSelection.d.ts.map +0 -1
  384. package/dist/components/organisms/Table/hooks/useTableSelection.js.map +0 -1
  385. package/dist/components/organisms/Table/providers/Table.context.cjs.map +0 -1
  386. package/dist/components/organisms/Table/providers/Table.context.d.ts.map +0 -1
  387. package/dist/components/organisms/Table/providers/Table.context.js.map +0 -1
  388. package/dist/components/organisms/Table/table.types.d.ts.map +0 -1
  389. package/dist/components/organisms/Table/utilities/tableCard.utils.cjs.map +0 -1
  390. package/dist/components/organisms/Table/utilities/tableCard.utils.d.ts.map +0 -1
  391. package/dist/components/organisms/Table/utilities/tableCard.utils.js.map +0 -1
  392. package/dist/components/organisms/Table/utilities/tableChildren.utils.cjs.map +0 -1
  393. package/dist/components/organisms/Table/utilities/tableChildren.utils.d.ts.map +0 -1
  394. package/dist/components/organisms/Table/utilities/tableChildren.utils.js.map +0 -1
  395. package/dist/components/organisms/Table/utilities/tableSelection.utils.cjs.map +0 -1
  396. package/dist/components/organisms/Table/utilities/tableSelection.utils.d.ts.map +0 -1
  397. package/dist/components/organisms/Table/utilities/tableSelection.utils.js.map +0 -1
  398. package/dist/components/organisms/Table/utilities/tableSort.utils.cjs.map +0 -1
  399. package/dist/components/organisms/Table/utilities/tableSort.utils.d.ts.map +0 -1
  400. package/dist/components/organisms/Table/utilities/tableSort.utils.js.map +0 -1
  401. /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.cjs +0 -0
  402. /package/dist/components/organisms/{Table → Tables/Table}/components/TableFallbackCard.js +0 -0
  403. /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.cjs +0 -0
  404. /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.d.ts +0 -0
  405. /package/dist/components/organisms/{Table → Tables/Table}/components/TableSortIcon.js +0 -0
  406. /package/dist/components/organisms/{Table → Tables/Table}/hooks/useFirstSortDirection.d.ts +0 -0
  407. /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.cjs +0 -0
  408. /package/dist/components/organisms/{Table → Tables/Table}/hooks/useSelectableRowRegistry.js +0 -0
  409. /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.cjs +0 -0
  410. /package/dist/components/organisms/{Table → Tables/Table}/providers/Table.context.js +0 -0
  411. /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.cjs +0 -0
  412. /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.d.ts +0 -0
  413. /package/dist/components/organisms/{Table → Tables}/hooks/useIsAtLeastMd.js +0 -0
  414. /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.cjs +0 -0
  415. /package/dist/components/organisms/{Table → Tables}/utilities/tableCard.utils.js +0 -0
@@ -1,19 +1,20 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { isProductionBuild } from '@flipdish/ui-library/utilities/renderUtils';
3
- import { forwardRef, useContext, useEffect } from 'react';
3
+ import { mergeRefs } from '@react-aria/utils';
4
+ import { forwardRef, useContext, useMemo, useEffect } from 'react';
4
5
  import { GridListItem } from 'react-aria-components';
5
- import { warnOnce } from '../../../../utilities/__internal__/logUtils/log.utils.js';
6
+ import { warnOnce } from '../../../../../utilities/__internal__/logUtils/log.utils.js';
7
+ import { fallbackCardSlots, spannedColumnCountOf, fallbackCardWarningOf, cardRowNameOf, cardTitleOf, rowTestIdOf, cardRowPropsOf, cellSpanOf, isCardRowInteractive } from '../../utilities/tableCard.utils.js';
8
+ import { splitRowChildren } from '../../utilities/tableChildren.utils.js';
6
9
  import { useRegisterPlaceholderRow } from '../hooks/usePlaceholderRows.js';
7
10
  import { useRegisterSelectableRow } from '../hooks/useSelectableRowRegistry.js';
8
11
  import { TableContext, TableRowCardContext } from '../providers/Table.context.js';
9
- import { fallbackCardSlots, spannedColumnCountOf, fallbackCardWarningOf, cardRowNameOf, cardTitleOf, rowTestIdOf, cardRowPropsOf, cellSpanOf, isCardRowInteractive } from '../utilities/tableCard.utils.js';
10
- import { splitRowChildren } from '../utilities/tableChildren.utils.js';
11
12
  import { TableFallbackCard } from './TableFallbackCard.js';
12
13
  import { TableRowCardSkeleton, isRowCardElement, TableRowCardHeader } from './TableRowCard.js';
13
14
 
14
15
  const TableCardRowBase = (
15
16
  // `className`, `style`, `render` and `size` are written for the table and never reach a card.
16
- { children, columns, className, style, render: _tableRowRender, size, highlightSelectedRow = true, isHighlighted = false, textValue, 'data-testid': dataTestId, ...props }, ref) => {
17
+ { children, columns, className, style, render: _tableRowRender, size, highlightSelectedRow = true, isHighlighted = false, color, textValue, 'data-testid': dataTestId, ...props }, ref) => {
17
18
  const context = useContext(TableContext);
18
19
  const tableColumns = context.columns ?? [];
19
20
  const { card, cardCount, cells } = splitRowChildren(children, columns, isRowCardElement);
@@ -23,6 +24,9 @@ const TableCardRowBase = (
23
24
  const isRowDisabled = isDisabled || isPlaceholder;
24
25
  useRegisterSelectableRow(context.registerRow, id, isRowDisabled);
25
26
  useRegisterPlaceholderRow(context.registerPlaceholder, id, isPlaceholder);
27
+ // As the table's row: a loading card is no place to land focus, and the merge is kept so a card on screen never spends a hand-off.
28
+ const focusTargetRef = isPlaceholder ? undefined : context.focusHandOff?.rowRef;
29
+ const cardRowRef = useMemo(() => (focusTargetRef ? mergeRefs(ref, focusTargetRef) : ref), [ref, focusTargetRef]);
26
30
  // Only the fallback card pairs cells with columns, by the column each starts in, so only it can put a value under the wrong label.
27
31
  const fallback = card ? undefined : fallbackCardSlots(tableColumns, cells, cellSpanOf);
28
32
  const spannedColumns = spannedColumnCountOf(cells);
@@ -61,11 +65,12 @@ const TableCardRowBase = (
61
65
  isFocusVisible: state.isFocusVisible,
62
66
  showsSelection: state.selectionMode !== 'none' && state.selectionBehavior === 'toggle',
63
67
  isPlaceholder,
68
+ color: isPlaceholder ? undefined : color,
64
69
  testId: rowTestId,
65
70
  };
66
71
  return jsx(TableRowCardContext.Provider, { value: rowCard, children: cardNode });
67
72
  };
68
- return (jsx(GridListItem, { ...cardRowPropsOf(props), ref: ref,
73
+ return (jsx(GridListItem, { ...cardRowPropsOf(props), ref: cardRowRef,
69
74
  // The row's name is its title, as the table names a row by its row-header cell; react-aria sets it as `aria-label`.
70
75
  textValue: name || undefined, isDisabled: isRowDisabled, onAction: isPlaceholder ? undefined : onAction, href: isPlaceholder ? undefined : href, "data-testid": rowTestId, "data-highlighted": isHighlighted || undefined,
71
76
  // Equal columns from `md`, so a column's cards line up and react-aria's grid finds the card below; see Breakpoints.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCardRow.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardRow.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,gBAAgB,GAAG;AACvB;AACA,EACE,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EAAE,eAAe,EACvB,IAAI,EACJ,oBAAoB,GAAG,IAAI,EAC3B,aAAa,GAAG,KAAK,EACrB,KAAK,EACL,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACS,EACnB,GAAiC,KAC/B;AACF,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC;AACxC,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE;AAC1C,IAAA,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC;IACxF,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK;;AAGhD,IAAA,MAAM,aAAa,GAAG,IAAI,EAAE,IAAI,KAAK,oBAAoB;AACzD,IAAA,MAAM,aAAa,GAAG,UAAU,IAAI,aAAa;IACjD,wBAAwB,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,EAAE,aAAa,CAAC;IAChE,yBAAyB,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,EAAE,aAAa,CAAC;;A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EAAE,OAAO,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAgC;AAChG,IAAA,CAAC;IAED,QACEA,GAAA,CAAC,YAAY,EAAA,EAAA,GACP,cAAc,CAAC,KAAK,CAAC,EACzB,GAAG,EAAE,UAAU;;AAEf,QAAA,SAAS,EAAE,IAAI,IAAI,SAAS,EAC5B,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,EAC9C,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,EAAA,aAAA,EACzB,SAAS,EAAA,kBAAA,EACJ,aAAa,IAAI,SAAS;;AAE5C,QAAA,SAAS,EAAC,kLAAkL,EAAA,QAAA,EAE3L,UAAU,EAAA,CACE;AAEnB,CAAC;AAED;MACa,YAAY,GAAG,UAAU,CAAC,gBAAgB;;"}
@@ -6,10 +6,10 @@ var React = require('react');
6
6
  var tableSelection_utils = require('../utilities/tableSelection.utils.cjs');
7
7
 
8
8
  // A card list has no header row, so `Table` draws the header's select-all checkbox above the cards itself.
9
- const TableCardsSelectAll = ({ registry, selectedKeys, onSelectionChange, disabledKeys, disallowEmptySelection, 'data-testid': dataTestId, }) => {
9
+ const TableCardsSelectAll = ({ registry, selectedKeys, onSelectionChange, disabledKeys, isPlaceholderPage, disallowEmptySelection, 'data-testid': dataTestId, }) => {
10
10
  // Re-renders as rows join or leave, which changes what "all" covers.
11
11
  React.useSyncExternalStore(registry.subscribe, registry.getVersion, registry.getVersion);
12
- const { isSelected, isIndeterminate, isDisabled } = tableSelection_utils.selectAllStateOf(selectedKeys, registry.rowIds.current, disabledKeys);
12
+ const { isSelected, isIndeterminate, isDisabled } = tableSelection_utils.selectAllStateOf(selectedKeys, registry.rowIds.current, disabledKeys, isPlaceholderPage);
13
13
  const toggleAll = () => {
14
14
  const selection = tableSelection_utils.selectAllToggleOf(isSelected, disallowEmptySelection);
15
15
  if (selection)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCardsSelectAll.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardsSelectAll.tsx"],"sourcesContent":[null],"names":["useSyncExternalStore","selectAllStateOf","selectAllToggleOf","_jsx","Checkbox"],"mappings":";;;;;;;AAmBA;MACa,mBAAmB,GAAG,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EAAE,UAAU,GACA,KAAI;;AAE7B,IAAAA,0BAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;IAClF,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,GAAGC,qCAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,CAAC;IAE5I,MAAM,SAAS,GAAG,MAAK;QACrB,MAAM,SAAS,GAAGC,sCAAiB,CAAC,UAAU,EAAE,sBAAsB,CAAC;AACvE,QAAA,IAAI,SAAS;YAAE,iBAAiB,CAAC,SAAS,CAAC;AAC7C,IAAA,CAAC;IAED;;AAEE,IAAAC,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAC1CA,eAACC,mBAAQ,EAAA,EACP,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,YAAY,EAClB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,SAAS,EAAA,aAAA,EACN,UAAU,EAAA,CACvB,EAAA,CACE;AAEV;;"}
@@ -5,9 +5,11 @@ interface TableCardsSelectAllProps {
5
5
  selectedKeys: 'all' | Iterable<Key>;
6
6
  onSelectionChange: (selection: Selection) => void;
7
7
  disabledKeys?: Iterable<Key>;
8
+ /** The table's page is placeholders, as the header's select all reads it, so this one is off at once too. */
9
+ isPlaceholderPage?: boolean;
8
10
  disallowEmptySelection?: boolean;
9
11
  'data-testid'?: string;
10
12
  }
11
- export declare const TableCardsSelectAll: ({ registry, selectedKeys, onSelectionChange, disabledKeys, disallowEmptySelection, "data-testid": dataTestId, }: TableCardsSelectAllProps) => import("react").JSX.Element;
13
+ export declare const TableCardsSelectAll: ({ registry, selectedKeys, onSelectionChange, disabledKeys, isPlaceholderPage, disallowEmptySelection, "data-testid": dataTestId, }: TableCardsSelectAllProps) => import("react").JSX.Element;
12
14
  export {};
13
15
  //# sourceMappingURL=TableCardsSelectAll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCardsSelectAll.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardsSelectAll.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG/E,UAAU,wBAAwB;IAChC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,YAAY,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpC,iBAAiB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,6GAA6G;IAC7G,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,eAAO,MAAM,mBAAmB,GAAI,oIAQjC,wBAAwB,gCAwB1B,CAAC"}
@@ -4,10 +4,10 @@ import { useSyncExternalStore } from 'react';
4
4
  import { selectAllStateOf, selectAllToggleOf } from '../utilities/tableSelection.utils.js';
5
5
 
6
6
  // A card list has no header row, so `Table` draws the header's select-all checkbox above the cards itself.
7
- const TableCardsSelectAll = ({ registry, selectedKeys, onSelectionChange, disabledKeys, disallowEmptySelection, 'data-testid': dataTestId, }) => {
7
+ const TableCardsSelectAll = ({ registry, selectedKeys, onSelectionChange, disabledKeys, isPlaceholderPage, disallowEmptySelection, 'data-testid': dataTestId, }) => {
8
8
  // Re-renders as rows join or leave, which changes what "all" covers.
9
9
  useSyncExternalStore(registry.subscribe, registry.getVersion, registry.getVersion);
10
- const { isSelected, isIndeterminate, isDisabled } = selectAllStateOf(selectedKeys, registry.rowIds.current, disabledKeys);
10
+ const { isSelected, isIndeterminate, isDisabled } = selectAllStateOf(selectedKeys, registry.rowIds.current, disabledKeys, isPlaceholderPage);
11
11
  const toggleAll = () => {
12
12
  const selection = selectAllToggleOf(isSelected, disallowEmptySelection);
13
13
  if (selection)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCardsSelectAll.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableCardsSelectAll.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAmBA;MACa,mBAAmB,GAAG,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EAAE,UAAU,GACA,KAAI;;AAE7B,IAAA,oBAAoB,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC;IAClF,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,CAAC;IAE5I,MAAM,SAAS,GAAG,MAAK;QACrB,MAAM,SAAS,GAAG,iBAAiB,CAAC,UAAU,EAAE,sBAAsB,CAAC;AACvE,QAAA,IAAI,SAAS;YAAE,iBAAiB,CAAC,SAAS,CAAC;AAC7C,IAAA,CAAC;IAED;;AAEE,IAAAA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6BAA6B,EAAA,QAAA,EAC1CA,IAAC,QAAQ,EAAA,EACP,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,YAAY,EAClB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,SAAS,EAAA,aAAA,EACN,UAAU,EAAA,CACvB,EAAA,CACE;AAEV;;"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+ var focusHandOff_context = require('../../../../__internal__/focusHandOff/focusHandOff.context.cjs');
6
+ var Table_context = require('../providers/Table.context.cjs');
7
+
8
+ // Around what `renderEmptyState` returns, in both layouts; `contents`, so the empty state lays out as if it were not there.
9
+ const TableEmptyState = ({ children }) => {
10
+ const { focusHandOff } = React.useContext(Table_context.TableContext);
11
+ if (!focusHandOff)
12
+ return children;
13
+ return (jsxRuntime.jsx(focusHandOff_context.FocusHandOffTargetContext.Provider, { value: focusHandOff.titleRef, children: jsxRuntime.jsx("div", { className: "contents", ...focusHandOff.scopeProps, children: children }) }));
14
+ };
15
+
16
+ exports.TableEmptyState = TableEmptyState;
17
+ //# sourceMappingURL=TableEmptyState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableEmptyState.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableEmptyState.tsx"],"sourcesContent":[null],"names":["useContext","TableContext","_jsx","FocusHandOffTargetContext"],"mappings":";;;;;;;AAMA;MACa,eAAe,GAAG,CAAC,EAAE,QAAQ,EAA2B,KAAI;IACvE,MAAM,EAAE,YAAY,EAAE,GAAGA,gBAAU,CAACC,0BAAY,CAAC;AACjD,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,QAAQ;IAElC,QACEC,cAAA,CAACC,8CAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAA,QAAA,EAC9DD,wBAAK,SAAS,EAAC,UAAU,EAAA,GAAK,YAAY,CAAC,UAAU,EAAA,QAAA,EAClD,QAAQ,EAAA,CACL,EAAA,CAC6B;AAEzC;;"}
@@ -0,0 +1,5 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare const TableEmptyState: ({ children }: {
3
+ children: ReactNode;
4
+ }) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
5
+ //# sourceMappingURL=TableEmptyState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableEmptyState.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableEmptyState.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKnD,eAAO,MAAM,eAAe,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gUAWpE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useContext } from 'react';
3
+ import { FocusHandOffTargetContext } from '../../../../__internal__/focusHandOff/focusHandOff.context.js';
4
+ import { TableContext } from '../providers/Table.context.js';
5
+
6
+ // Around what `renderEmptyState` returns, in both layouts; `contents`, so the empty state lays out as if it were not there.
7
+ const TableEmptyState = ({ children }) => {
8
+ const { focusHandOff } = useContext(TableContext);
9
+ if (!focusHandOff)
10
+ return children;
11
+ return (jsx(FocusHandOffTargetContext.Provider, { value: focusHandOff.titleRef, children: jsx("div", { className: "contents", ...focusHandOff.scopeProps, children: children }) }));
12
+ };
13
+
14
+ export { TableEmptyState };
15
+ //# sourceMappingURL=TableEmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableEmptyState.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableEmptyState.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAMA;MACa,eAAe,GAAG,CAAC,EAAE,QAAQ,EAA2B,KAAI;IACvE,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC;AACjD,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,QAAQ;IAElC,QACEA,GAAA,CAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAA,QAAA,EAC9DA,aAAK,SAAS,EAAC,UAAU,EAAA,GAAK,YAAY,CAAC,UAAU,EAAA,QAAA,EAClD,QAAQ,EAAA,CACL,EAAA,CAC6B;AAEzC;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFallbackCard.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableFallbackCard.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","TableRowCard","TableRowCardHeader"],"mappings":";;;;;AAMA;AACA,MAAM,UAAU,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAA+B,MACpEA,yBAAe,SAAS,EAAC,gCAAgC,EAAA,QAAA,EAAA,CACtD,KAAK,IAAIC,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,2CAA2C,YAAE,KAAK,EAAA,CAAQ,EACpFA,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2DAA2D,YAAE,KAAK,EAAA,CAAO,KAFhF,GAAG,CAGP,CACP;AAED;AACO,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAA2C,MAC9GD,eAAA,CAACE,yBAAY,EAAA,EAAA,QAAA,EAAA,CACXD,cAAA,CAACE,+BAAkB,EAAA,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,SAAS,EAAA,CAAI,EACtF,KAAK,CAAC,MAAM,GAAG,CAAC,IAAIF,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,oCAAoC,YAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAA,CAAO,CAAA,EAAA,CACzF;;"}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FallbackCardSlots } from '../utilities/tableCard.utils';
2
+ import type { FallbackCardSlots } from '../../utilities/tableCard.utils';
3
3
  export declare const TableFallbackCard: ({ slots: { title, trailing, lines } }: {
4
4
  slots: FallbackCardSlots<ReactNode>;
5
5
  }) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFallbackCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableFallbackCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAoB,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAY3F,eAAO,MAAM,iBAAiB,GAAI,uCAAuC;IAAE,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;CAAE,gCAK/G,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFallbackCard.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableFallbackCard.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;AAMA;AACA,MAAM,UAAU,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAA+B,MACpEA,cAAe,SAAS,EAAC,gCAAgC,EAAA,QAAA,EAAA,CACtD,KAAK,IAAIC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,2CAA2C,YAAE,KAAK,EAAA,CAAQ,EACpFA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2DAA2D,YAAE,KAAK,EAAA,CAAO,KAFhF,GAAG,CAGP,CACP;AAED;AACO,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAA2C,MAC9GD,IAAA,CAAC,YAAY,EAAA,EAAA,QAAA,EAAA,CACXC,GAAA,CAAC,kBAAkB,EAAA,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,SAAS,EAAA,CAAI,EACtF,KAAK,CAAC,MAAM,GAAG,CAAC,IAAIA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,oCAAoC,YAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAA,CAAO,CAAA,EAAA,CACzF;;"}
@@ -7,10 +7,11 @@ var cx = require('@flipdish/ui-library/utilities/cx');
7
7
  var renderUtils = require('@flipdish/ui-library/utilities/renderUtils');
8
8
  var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
9
9
  var React = require('react');
10
- var children_utils = require('../../../../utilities/__internal__/childrenUtils/children.utils.cjs');
11
- var log_utils = require('../../../../utilities/__internal__/logUtils/log.utils.cjs');
10
+ var children_utils = require('../../../../../utilities/__internal__/childrenUtils/children.utils.cjs');
11
+ var log_utils = require('../../../../../utilities/__internal__/logUtils/log.utils.cjs');
12
+ var tableCard_utils = require('../../utilities/tableCard.utils.cjs');
12
13
  var Table_context = require('../providers/Table.context.cjs');
13
- var tableCard_utils = require('../utilities/tableCard.utils.cjs');
14
+ var Table_styles = require('../Table.styles.cjs');
14
15
 
15
16
  // The row's own selection checkbox, react-aria's `selection` slot, centred on the title's 20px line.
16
17
  const TableRowCardSelectionCheckbox = ({ rowTestId, isPlaceholder }) => (jsxRuntime.jsx("div", { className: "flex h-5 shrink-0 items-center", children: isPlaceholder ? (
@@ -39,8 +40,8 @@ const TableRowCard = ({ children, className, 'data-testid': dataTestId }) => {
39
40
  return (jsxRuntime.jsx(Table_context.TableRowCardSurfaceContext.Provider, { value: true, children: jsxRuntime.jsxs("div", { "data-testid": dataTestId ?? (row.testId ? testIdUtils.joinTestId(row.testId, 'card') : undefined), className: cx.cx(
40
41
  // `flex-1` fills a row of cards to the height of the tallest.
41
42
  'flex flex-1 flex-col overflow-hidden rounded-xl border border-secondary bg-primary text-left outline-focus-ring transition-colors duration-100 ease-linear', row.isInteractive ? 'cursor-pointer' : 'cursor-default',
42
- // Before the states, so a tinted card still shows hover, press and highlight.
43
- className, row.isHovered && 'bg-primary_hover', row.isPressed && 'bg-secondary_hover',
43
+ // Before the states, so a tinted card still shows hover, press and highlight; the row's tint goes first, so a class wins over it.
44
+ row.color && Table_styles.styles.rowColors[row.color], row.color && Table_styles.styles.cardBorders[row.color], className, row.isHovered && 'bg-primary_hover', row.isPressed && 'bg-secondary_hover',
44
45
  // `_alt` is brand-50 in light, like `bg-brand-primary`, and stays a surface in dark, where `bg-brand-primary` is solid brand-500.
45
46
  row.isHighlighted && 'border-brand bg-brand-primary_alt', row.isFocusVisible && 'outline-2 outline-offset-2'), children: [row.showsSelection && headerIndex === -1 && (jsxRuntime.jsx("div", { className: "flex px-4 pt-4 last:pb-4", children: jsxRuntime.jsx(TableRowCardSelectionCheckbox, { rowTestId: row.testId, isPlaceholder: row.isPlaceholder }) })), parts.map(renderPart)] }) }));
46
47
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableRowCard.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableRowCard.tsx"],"sourcesContent":[null],"names":["_jsx","Skeleton","Checkbox","joinTestId","useContext","TableContext","TableRowCardContext","TableRowCardSurfaceContext","useEffect","isProductionBuild","warnOnce","flattenChildren","isValidElement","TableRowCardHeaderCheckboxContext","_jsxs","cx","styles","isSlotShown"],"mappings":";;;;;;;;;;;;;;;AAcA;AACA,MAAM,6BAA6B,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,EAAmD,MAClHA,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gCAAgC,YAC5C,aAAa;;AAEZ,IAAAA,cAAA,CAACC,iBAAQ,EAAA,EAAC,KAAK,EAAE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K,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,EAAA,CAAG,EAC/CD,eAACC,iBAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,GAAG,EAC/CD,cAAA,CAACC,iBAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,MAAM,EAAA,CAAG,CAAA,EAAA,CAC7B,EACtBD,cAAA,CAAC,kBAAkB,EAAA,EAAC,KAAK,EAAEA,cAAA,CAACC,iBAAQ,IAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,GAAG,EAAE,GAAG,EAAED,cAAA,CAACC,iBAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,EAAA,CAAG,EAAA,CAAI,IACpI,CACJ,EAAA,CACY;AAEjB,oBAAoB,CAAC,WAAW,GAAG,sBAAsB;AAEzD;;;;AAIG;MACU,gBAAgB,GAAG,CAAC,OAAqB,KAAK,OAAO,CAAC,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,IAAI,KAAK;;;;;;;"}
@@ -2,7 +2,7 @@ import { type ReactElement, type ReactNode } from 'react';
2
2
  export interface TableRowCardProps {
3
3
  /** The card's parts: `Table.RowCard.Header`, `Table.RowCard.Content` and `Table.RowCard.Footer`, in that order. */
4
4
  children: ReactNode;
5
- /** Classes for the card's surface. A row's own `className` never reaches its card, so a tinted row repeats its tint here. */
5
+ /** Classes for the card's surface. A row's own `className` never reaches its card; its `color` does, so a tinted row needs nothing here. */
6
6
  className?: string;
7
7
  /** Overrides the derived `data-testid` (defaults to `<row>--card`). */
8
8
  'data-testid'?: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableRowCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/T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AAC,EAAE,SAAS,CAAC;CACtB;AAED,iHAAiH;AACjH,eAAO,MAAM,oBAAoB;mBAAkB,yBAAyB;;CAkB3E,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,YAAY,YAA2E,CAAC"}
@@ -5,10 +5,11 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
5
5
  import { isProductionBuild } from '@flipdish/ui-library/utilities/renderUtils';
6
6
  import { joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
7
7
  import { useContext, useEffect, isValidElement } from 'react';
8
- import { flattenChildren } from '../../../../utilities/__internal__/childrenUtils/children.utils.js';
9
- import { warnOnce } from '../../../../utilities/__internal__/logUtils/log.utils.js';
8
+ import { flattenChildren } from '../../../../../utilities/__internal__/childrenUtils/children.utils.js';
9
+ import { warnOnce } from '../../../../../utilities/__internal__/logUtils/log.utils.js';
10
+ import { isSlotShown } from '../../utilities/tableCard.utils.js';
10
11
  import { TableContext, TableRowCardContext, TableRowCardSurfaceContext, TableRowCardHeaderCheckboxContext } from '../providers/Table.context.js';
11
- import { isSlotShown } from '../utilities/tableCard.utils.js';
12
+ import { styles } from '../Table.styles.js';
12
13
 
13
14
  // The row's own selection checkbox, react-aria's `selection` slot, centred on the title's 20px line.
14
15
  const TableRowCardSelectionCheckbox = ({ rowTestId, isPlaceholder }) => (jsx("div", { className: "flex h-5 shrink-0 items-center", children: isPlaceholder ? (
@@ -37,8 +38,8 @@ const TableRowCard = ({ children, className, 'data-testid': dataTestId }) => {
37
38
  return (jsx(TableRowCardSurfaceContext.Provider, { value: true, children: jsxs("div", { "data-testid": dataTestId ?? (row.testId ? joinTestId(row.testId, 'card') : undefined), className: cx(
38
39
  // `flex-1` fills a row of cards to the height of the tallest.
39
40
  'flex flex-1 flex-col overflow-hidden rounded-xl border border-secondary bg-primary text-left outline-focus-ring transition-colors duration-100 ease-linear', row.isInteractive ? 'cursor-pointer' : 'cursor-default',
40
- // Before the states, so a tinted card still shows hover, press and highlight.
41
- className, row.isHovered && 'bg-primary_hover', row.isPressed && 'bg-secondary_hover',
41
+ // Before the states, so a tinted card still shows hover, press and highlight; the row's tint goes first, so a class wins over it.
42
+ row.color && styles.rowColors[row.color], row.color && styles.cardBorders[row.color], className, row.isHovered && 'bg-primary_hover', row.isPressed && 'bg-secondary_hover',
42
43
  // `_alt` is brand-50 in light, like `bg-brand-primary`, and stays a surface in dark, where `bg-brand-primary` is solid brand-500.
43
44
  row.isHighlighted && 'border-brand bg-brand-primary_alt', row.isFocusVisible && 'outline-2 outline-offset-2'), children: [row.showsSelection && headerIndex === -1 && (jsx("div", { className: "flex px-4 pt-4 last:pb-4", children: jsx(TableRowCardSelectionCheckbox, { rowTestId: row.testId, isPlaceholder: row.isPlaceholder }) })), parts.map(renderPart)] }) }));
44
45
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableRowCard.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableRowCard.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAcA;AACA,MAAM,6BAA6B,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,EAAmD,MAClHA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gCAAgC,YAC5C,aAAa;;AAEZ,IAAAA,GAAA,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,GAAG;;AAG/C,IAAAA,GAAA,CAAC,QAAQ,EAAA,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,UAAU,iBAAc,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,SAAS,EAAA,CAAI,CACtI,EAAA,CACG,CACP;AAWD;AACO,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAqB,KAAI;IACpG,MAAM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AAG,EAAE,GAAG,EAAEA,GAAA,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAC,IAAI,EAAA,CAAG,EAAA,CAAI,IACpI,CACJ,EAAA,CACY;AAEjB,oBAAoB,CAAC,WAAW,GAAG,sBAAsB;AAEzD;;;;AAIG;MACU,gBAAgB,GAAG,CAAC,OAAqB,KAAK,OAAO,CAAC,IAAI,KAAK,YAAY,IAAI,OAAO,CAAC,IAAI,KAAK;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSortIcon.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableSortIcon.tsx"],"sourcesContent":[null],"names":["_jsx","ChevronSelectorVertical","ArrowDown","cx"],"mappings":";;;;;;MAKa,aAAa,GAAG,CAAC,EAAE,aAAa,EAAkD,KAAI;IACjG,IAAI,CAAC,aAAa,EAAE;AAClB,QAAA,OAAOA,cAAA,CAACC,+BAAuB,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAC,oBAAoB,GAAG;IAC7F;AAEA,IAAA,OAAOD,eAACE,iBAAS,EAAA,EAAC,SAAS,EAAEC,KAAE,CAAC,wCAAwC,EAAE,aAAa,KAAK,WAAW,IAAI,YAAY,CAAC,GAAI;AAC9H;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSortIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableSortIcon.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,GAAI,mBAAmB;IAAE,aAAa,CAAC,EAAE,WAAW,GAAG,YAAY,CAAA;CAAE,gCAM9F,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSortIcon.js","sources":["../../../../../../src/components/organisms/Tables/Table/components/TableSortIcon.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;MAKa,aAAa,GAAG,CAAC,EAAE,aAAa,EAAkD,KAAI;IACjG,IAAI,CAAC,aAAa,EAAE;AAClB,QAAA,OAAOA,GAAA,CAAC,uBAAuB,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAC,oBAAoB,GAAG;IAC7F;AAEA,IAAA,OAAOA,IAAC,SAAS,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,aAAa,KAAK,WAAW,IAAI,YAAY,CAAC,GAAI;AAC9H;;"}
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ /**
6
+ * Counts the tables loading inside one `TableCard.Root`, so the card stays busy until the last of them is done, whichever
7
+ * order they finish in.
8
+ *
9
+ * @returns `isBusy`, `true` while any table is registered, and `registerBusy`, which a loading table calls and whose
10
+ * cleanup lets it go.
11
+ */
12
+ const useBusyCount = () => {
13
+ const [count, setCount] = React.useState(0);
14
+ const registerBusy = React.useCallback(() => {
15
+ setCount((current) => current + 1);
16
+ return () => setCount((current) => current - 1);
17
+ }, []);
18
+ return { isBusy: count > 0, registerBusy };
19
+ };
20
+
21
+ exports.useBusyCount = useBusyCount;
22
+ //# sourceMappingURL=useBusyCount.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBusyCount.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useBusyCount.ts"],"sourcesContent":[null],"names":["useState","useCallback"],"mappings":";;;;AAIA;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,MAAK;IAC/B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,CAAC,CAAC;AAErC,IAAA,MAAM,YAAY,GAAGC,iBAAW,CAAC,MAAK;QACpC,QAAQ,CAAC,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,CAAC;AAClC,QAAA,OAAO,MAAM,QAAQ,CAAC,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,YAAY,EAAE;AAC5C;;"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Counts the tables loading inside one `TableCard.Root`, so the card stays busy until the last of them is done, whichever
3
+ * order they finish in.
4
+ *
5
+ * @returns `isBusy`, `true` while any table is registered, and `registerBusy`, which a loading table calls and whose
6
+ * cleanup lets it go.
7
+ */
8
+ export declare const useBusyCount: () => {
9
+ isBusy: boolean;
10
+ registerBusy: () => () => void;
11
+ };
12
+ //# sourceMappingURL=useBusyCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBusyCount.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useBusyCount.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;CASxB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { useState, useCallback } from 'react';
2
+
3
+ /**
4
+ * Counts the tables loading inside one `TableCard.Root`, so the card stays busy until the last of them is done, whichever
5
+ * order they finish in.
6
+ *
7
+ * @returns `isBusy`, `true` while any table is registered, and `registerBusy`, which a loading table calls and whose
8
+ * cleanup lets it go.
9
+ */
10
+ const useBusyCount = () => {
11
+ const [count, setCount] = useState(0);
12
+ const registerBusy = useCallback(() => {
13
+ setCount((current) => current + 1);
14
+ return () => setCount((current) => current - 1);
15
+ }, []);
16
+ return { isBusy: count > 0, registerBusy };
17
+ };
18
+
19
+ export { useBusyCount };
20
+ //# sourceMappingURL=useBusyCount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBusyCount.js","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useBusyCount.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIA;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,MAAK;IAC/B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAErC,IAAA,MAAM,YAAY,GAAG,WAAW,CAAC,MAAK;QACpC,QAAQ,CAAC,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,CAAC;AAClC,QAAA,OAAO,MAAM,QAAQ,CAAC,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,YAAY,EAAE;AAC5C;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var tableSort_utils = require('../utilities/tableSort.utils.cjs');
4
+ var tableSort_utils = require('../../utilities/tableSort.utils.cjs');
5
5
 
6
6
  /**
7
7
  * Remembers the direction the sorted column first landed on, so a press can tell its second direction, which the next press
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFirstSortDirection.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useFirstSortDirection.ts"],"sourcesContent":[null],"names":["useState","firstSortOf"],"mappings":";;;;;AAMA;;;;;;;;AAQG;MACU,qBAAqB,GAAG,CACnC,cAA0C,EAC1C,qBAAsC,KACT;IAC7B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAC,MAAMC,2BAAW,CAAC,SAAS,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC;IAC/G,MAAM,aAAa,GAAGA,2BAAW,CAAC,SAAS,EAAE,cAAc,EAAE,qBAAqB,CAAC;;IAEnF,IAAI,aAAa,KAAK,SAAS;QAAE,YAAY,CAAC,aAAa,CAAC;IAC5D,OAAO,aAAa,EAAE,SAAS;AACjC;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFirstSortDirection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useFirstSortDirection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3E;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,gBAAgB,cAAc,GAAG,SAAS,EAC1C,wBAAwB,cAAc,KACrC,aAAa,GAAG,SAMlB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useState } from 'react';
2
- import { firstSortOf } from '../utilities/tableSort.utils.js';
2
+ import { firstSortOf } from '../../utilities/tableSort.utils.js';
3
3
 
4
4
  /**
5
5
  * Remembers the direction the sorted column first landed on, so a press can tell its second direction, which the next press
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFirstSortDirection.js","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useFirstSortDirection.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAMA;;;;;;;;AAQG;MACU,qBAAqB,GAAG,CACnC,cAA0C,EAC1C,qBAAsC,KACT;IAC7B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC;IAC/G,MAAM,aAAa,GAAG,WAAW,CAAC,SAAS,EAAE,cAAc,EAAE,qBAAqB,CAAC;;IAEnF,IAAI,aAAa,KAAK,SAAS;QAAE,YAAY,CAAC,aAAa,CAAC;IAC5D,OAAO,aAAa,EAAE,SAAS;AACjC;;"}
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var tableIterable_utils = require('../../utilities/tableIterable.utils.cjs');
5
+ var tableSelection_utils = require('../utilities/tableSelection.utils.cjs');
6
+
7
+ /**
8
+ * Reports whether the table's page is placeholders, as `isPlaceholderPage` decides, updating as rows join or leave. Select
9
+ * all reads it in both layouts: on such a page it is off, and a select all from the keyboard is ignored.
10
+ *
11
+ * @param isLoading The table's `isLoading`, which answers on the first render, before any row has registered.
12
+ * @param rows The table's selectable-row registry.
13
+ * @param placeholders The table's placeholder-row registry, from `usePlaceholderRows`.
14
+ * @param disabledKeys Rows the table disables.
15
+ * @returns `true` only for a page of placeholders; `false` before any row registers, and on the server unless loading.
16
+ */
17
+ const useIsPlaceholderPage = (isLoading, rows, placeholders, disabledKeys) => {
18
+ const { subscribe: subscribeToRows } = rows;
19
+ const { subscribe: subscribeToPlaceholders } = placeholders;
20
+ const subscribe = React.useCallback((listener) => {
21
+ const stopRows = subscribeToRows(listener);
22
+ const stopPlaceholders = subscribeToPlaceholders(listener);
23
+ return () => {
24
+ stopRows();
25
+ stopPlaceholders();
26
+ };
27
+ }, [subscribeToRows, subscribeToPlaceholders]);
28
+ // Read on every snapshot, of which React takes several, so a one-shot iterator is read once and every snapshot agrees.
29
+ const reusableDisabledKeys = tableIterable_utils.reusableIterableOf(disabledKeys);
30
+ // A boolean, so the table re-renders only when the answer flips, not on every row that joins.
31
+ const getSnapshot = () => tableSelection_utils.isPlaceholderPage({
32
+ isLoading,
33
+ rowKeys: rows.rowIds.current,
34
+ placeholderKeys: placeholders.rowIds.current,
35
+ disabledKeys: reusableDisabledKeys,
36
+ });
37
+ const getServerSnapshot = () => isLoading;
38
+ return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
39
+ };
40
+
41
+ exports.useIsPlaceholderPage = useIsPlaceholderPage;
42
+ //# sourceMappingURL=useIsPlaceholderPage.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsPlaceholderPage.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.ts"],"sourcesContent":[null],"names":["useCallback","reusableIterableOf","isPlaceholderPage","useSyncExternalStore"],"mappings":";;;;;;AAQA;;;;;;;;;AASG;AACI,MAAM,oBAAoB,GAAG,CAClC,SAAkB,EAClB,IAA2B,EAC3B,YAAmC,EACnC,YAA8B,KAC5B;AACF,IAAA,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI;AAC3C,IAAA,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,GAAG,YAAY;AAC3D,IAAA,MAAM,SAAS,GAAGA,iBAAW,CAC3B,CAAC,QAAoB,KAAI;AACvB,QAAA,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;AAC1C,QAAA,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,QAAQ,CAAC;AAC1D,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,EAAE;AACV,YAAA,gBAAgB,EAAE;AACpB,QAAA,CAAC;AACH,IAAA,CAAC,EACD,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAC3C;;AAED,IAAA,MAAM,oBAAoB,GAAGC,sCAAkB,CAAC,YAAY,CAAC;;AAE7D,IAAA,MAAM,WAAW,GAAG,MAClBC,sCAAiB,CAAC;QAChB,SAAS;AACT,QAAA,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;AAC5B,QAAA,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;AAC5C,QAAA,YAAY,EAAE,oBAAoB;AACnC,KAAA,CAAC;AACJ,IAAA,MAAM,iBAAiB,GAAG,MAAM,SAAS;IAEzC,OAAOC,0BAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,iBAAiB,CAAC;AACxE;;"}
@@ -0,0 +1,14 @@
1
+ import type { RowId } from '../../tables.types';
2
+ import type { SelectableRowRegistry } from './useSelectableRowRegistry';
3
+ /**
4
+ * Reports whether the table's page is placeholders, as `isPlaceholderPage` decides, updating as rows join or leave. Select
5
+ * all reads it in both layouts: on such a page it is off, and a select all from the keyboard is ignored.
6
+ *
7
+ * @param isLoading The table's `isLoading`, which answers on the first render, before any row has registered.
8
+ * @param rows The table's selectable-row registry.
9
+ * @param placeholders The table's placeholder-row registry, from `usePlaceholderRows`.
10
+ * @param disabledKeys Rows the table disables.
11
+ * @returns `true` only for a page of placeholders; `false` before any row registers, and on the server unless loading.
12
+ */
13
+ export declare const useIsPlaceholderPage: (isLoading: boolean, rows: SelectableRowRegistry, placeholders: SelectableRowRegistry, disabledKeys?: Iterable<RowId>) => boolean;
14
+ //# sourceMappingURL=useIsPlaceholderPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsPlaceholderPage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAC/B,WAAW,OAAO,EAClB,MAAM,qBAAqB,EAC3B,cAAc,qBAAqB,EACnC,eAAe,QAAQ,CAAC,KAAK,CAAC,YA4B/B,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { useCallback, useSyncExternalStore } from 'react';
2
+ import { reusableIterableOf } from '../../utilities/tableIterable.utils.js';
3
+ import { isPlaceholderPage } from '../utilities/tableSelection.utils.js';
4
+
5
+ /**
6
+ * Reports whether the table's page is placeholders, as `isPlaceholderPage` decides, updating as rows join or leave. Select
7
+ * all reads it in both layouts: on such a page it is off, and a select all from the keyboard is ignored.
8
+ *
9
+ * @param isLoading The table's `isLoading`, which answers on the first render, before any row has registered.
10
+ * @param rows The table's selectable-row registry.
11
+ * @param placeholders The table's placeholder-row registry, from `usePlaceholderRows`.
12
+ * @param disabledKeys Rows the table disables.
13
+ * @returns `true` only for a page of placeholders; `false` before any row registers, and on the server unless loading.
14
+ */
15
+ const useIsPlaceholderPage = (isLoading, rows, placeholders, disabledKeys) => {
16
+ const { subscribe: subscribeToRows } = rows;
17
+ const { subscribe: subscribeToPlaceholders } = placeholders;
18
+ const subscribe = useCallback((listener) => {
19
+ const stopRows = subscribeToRows(listener);
20
+ const stopPlaceholders = subscribeToPlaceholders(listener);
21
+ return () => {
22
+ stopRows();
23
+ stopPlaceholders();
24
+ };
25
+ }, [subscribeToRows, subscribeToPlaceholders]);
26
+ // Read on every snapshot, of which React takes several, so a one-shot iterator is read once and every snapshot agrees.
27
+ const reusableDisabledKeys = reusableIterableOf(disabledKeys);
28
+ // A boolean, so the table re-renders only when the answer flips, not on every row that joins.
29
+ const getSnapshot = () => isPlaceholderPage({
30
+ isLoading,
31
+ rowKeys: rows.rowIds.current,
32
+ placeholderKeys: placeholders.rowIds.current,
33
+ disabledKeys: reusableDisabledKeys,
34
+ });
35
+ const getServerSnapshot = () => isLoading;
36
+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
37
+ };
38
+
39
+ export { useIsPlaceholderPage };
40
+ //# sourceMappingURL=useIsPlaceholderPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsPlaceholderPage.js","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/useIsPlaceholderPage.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAQA;;;;;;;;;AASG;AACI,MAAM,oBAAoB,GAAG,CAClC,SAAkB,EAClB,IAA2B,EAC3B,YAAmC,EACnC,YAA8B,KAC5B;AACF,IAAA,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI;AAC3C,IAAA,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,GAAG,YAAY;AAC3D,IAAA,MAAM,SAAS,GAAG,WAAW,CAC3B,CAAC,QAAoB,KAAI;AACvB,QAAA,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;AAC1C,QAAA,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,QAAQ,CAAC;AAC1D,QAAA,OAAO,MAAK;AACV,YAAA,QAAQ,EAAE;AACV,YAAA,gBAAgB,EAAE;AACpB,QAAA,CAAC;AACH,IAAA,CAAC,EACD,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAC3C;;AAED,IAAA,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,YAAY,CAAC;;AAE7D,IAAA,MAAM,WAAW,GAAG,MAClB,iBAAiB,CAAC;QAChB,SAAS;AACT,QAAA,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;AAC5B,QAAA,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO;AAC5C,QAAA,YAAY,EAAE,oBAAoB;AACnC,KAAA,CAAC;AACJ,IAAA,MAAM,iBAAiB,GAAG,MAAM,SAAS;IAEzC,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,iBAAiB,CAAC;AACxE;;"}
@@ -1,30 +1,27 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var useSelectableRowRegistry = require('./useSelectableRowRegistry.cjs');
4
5
 
5
6
  /**
6
7
  * Keeps the table's row action off placeholder rows. A placeholder row is disabled, but `disabledBehavior="selection"`
7
8
  * leaves a disabled row's action on, so the card list's `onAction` checks this set as well.
8
9
  *
9
10
  * @param onRowAction The table's `onRowAction`, or `undefined` when it has none.
10
- * @returns `register`, which a placeholder row calls with its id and whose cleanup drops it, and `onAction`, the row
11
- * action to give the card list: it skips a registered placeholder, and is `undefined` when the table has no row action.
11
+ * @returns `register`, which a placeholder row calls with its id and whose cleanup drops it; `onAction`, the row action to
12
+ * give the card list, which skips a registered placeholder and is `undefined` when the table has no row action; and
13
+ * `registry`, the placeholders' ids with a subscription, for a part that must follow them as they join or leave.
12
14
  */
13
15
  const usePlaceholderRows = (onRowAction) => {
14
- const placeholderIds = React.useRef(new Set());
15
- const register = React.useCallback((id) => {
16
- placeholderIds.current.add(id);
17
- return () => {
18
- placeholderIds.current.delete(id);
19
- };
20
- }, []);
16
+ // The same id registry selectable rows use, so select all can subscribe to placeholders too.
17
+ const registry = useSelectableRowRegistry.useSelectableRowRegistry();
21
18
  const onAction = onRowAction
22
19
  ? (key) => {
23
- if (!placeholderIds.current.has(key))
20
+ if (!registry.rowIds.current.has(key))
24
21
  onRowAction(key);
25
22
  }
26
23
  : undefined;
27
- return { register, onAction };
24
+ return { register: registry.register, onAction, registry };
28
25
  };
29
26
  /**
30
27
  * Joins one placeholder row to the table's placeholder set while it carries `Table.RowCard.Skeleton`, in either layout.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePlaceholderRows.cjs","sources":["../../../../../../src/components/organisms/Tables/Table/hooks/usePlaceholderRows.ts"],"sourcesContent":[null],"names":["useSelectableRowRegistry","useEffect"],"mappings":";;;;;AAMA;;;;;;;;AAQG;AACI,MAAM,kBAAkB,GAAG,CAAC,WAA+C,KAAI;;AAEpF,IAAA,MAAM,QAAQ,GAAGA,iDAAwB,EAAE;IAE3C,MAAM,QAAQ,GAAG;AACf,UAAE,CAAC,GAAU,KAAI;YACb,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,WAAW,CAAC,GAAG,CAAC;QACzD;UACA,SAAS;IAEb,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;AAC5D;AAEA;;;;;;;AAOG;AACI,MAAM,yBAAyB,GAAG,CAAC,QAAiD,EAAE,EAAqB,EAAE,aAAsB,KAAI;AAC5I,IAAAC,eAAS,CAAC,OAAO,aAAa,IAAI,EAAE,KAAK,SAAS,GAAG,QAAQ,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;AAClH;;;"}