@veeqo/ui 9.8.0 → 9.9.1

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 (228) hide show
  1. package/dist/components/ActionMenu/ActionMenu.cjs +1 -0
  2. package/dist/components/ActionMenu/ActionMenu.cjs.map +1 -1
  3. package/dist/components/ActionMenu/ActionMenu.js +1 -0
  4. package/dist/components/ActionMenu/ActionMenu.js.map +1 -1
  5. package/dist/components/DataGrid/DataGrid.cjs +129 -0
  6. package/dist/components/DataGrid/DataGrid.cjs.map +1 -0
  7. package/dist/components/DataGrid/DataGrid.d.ts +21 -0
  8. package/dist/components/DataGrid/DataGrid.js +123 -0
  9. package/dist/components/DataGrid/DataGrid.js.map +1 -0
  10. package/dist/components/DataGrid/DataGrid.module.css.cjs +13 -0
  11. package/dist/components/DataGrid/DataGrid.module.css.cjs.map +1 -0
  12. package/dist/components/DataGrid/DataGrid.module.css.js +10 -0
  13. package/dist/components/DataGrid/DataGrid.module.css.js.map +1 -0
  14. package/dist/components/DataGrid/components/Body/Body.cjs +21 -0
  15. package/dist/components/DataGrid/components/Body/Body.cjs.map +1 -0
  16. package/dist/components/DataGrid/components/Body/Body.d.ts +23 -0
  17. package/dist/components/DataGrid/components/Body/Body.js +14 -0
  18. package/dist/components/DataGrid/components/Body/Body.js.map +1 -0
  19. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs +31 -0
  20. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs.map +1 -0
  21. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.d.ts +18 -0
  22. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js +25 -0
  23. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js.map +1 -0
  24. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.css.cjs +11 -0
  25. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.css.cjs.map +1 -0
  26. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.css.js +9 -0
  27. package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.css.js.map +1 -0
  28. package/dist/components/DataGrid/components/Body/BodyCell/index.d.ts +1 -0
  29. package/dist/components/DataGrid/components/Body/Row/Row.cjs +14 -0
  30. package/dist/components/DataGrid/components/Body/Row/Row.cjs.map +1 -0
  31. package/dist/components/DataGrid/components/Body/Row/Row.d.ts +18 -0
  32. package/dist/components/DataGrid/components/Body/Row/Row.js +8 -0
  33. package/dist/components/DataGrid/components/Body/Row/Row.js.map +1 -0
  34. package/dist/components/DataGrid/components/Body/Row/index.d.ts +1 -0
  35. package/dist/components/DataGrid/components/Body/index.d.ts +1 -0
  36. package/dist/components/DataGrid/components/CellContent/CellContent.cjs +21 -0
  37. package/dist/components/DataGrid/components/CellContent/CellContent.cjs.map +1 -0
  38. package/dist/components/DataGrid/components/CellContent/CellContent.d.ts +15 -0
  39. package/dist/components/DataGrid/components/CellContent/CellContent.js +15 -0
  40. package/dist/components/DataGrid/components/CellContent/CellContent.js.map +1 -0
  41. package/dist/components/DataGrid/components/CellContent/CellContent.module.css.cjs +11 -0
  42. package/dist/components/DataGrid/components/CellContent/CellContent.module.css.cjs.map +1 -0
  43. package/dist/components/DataGrid/components/CellContent/CellContent.module.css.js +9 -0
  44. package/dist/components/DataGrid/components/CellContent/CellContent.module.css.js.map +1 -0
  45. package/dist/components/DataGrid/components/CellContent/index.d.ts +1 -0
  46. package/dist/components/DataGrid/components/Columns/Columns.cjs +56 -0
  47. package/dist/components/DataGrid/components/Columns/Columns.cjs.map +1 -0
  48. package/dist/components/DataGrid/components/Columns/Columns.d.ts +17 -0
  49. package/dist/components/DataGrid/components/Columns/Columns.js +50 -0
  50. package/dist/components/DataGrid/components/Columns/Columns.js.map +1 -0
  51. package/dist/components/DataGrid/components/Columns/index.d.ts +1 -0
  52. package/dist/components/DataGrid/components/Footer/Footer.cjs +18 -0
  53. package/dist/components/DataGrid/components/Footer/Footer.cjs.map +1 -0
  54. package/dist/components/DataGrid/components/Footer/Footer.d.ts +15 -0
  55. package/dist/components/DataGrid/components/Footer/Footer.js +12 -0
  56. package/dist/components/DataGrid/components/Footer/Footer.js.map +1 -0
  57. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.cjs +33 -0
  58. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.cjs.map +1 -0
  59. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.d.ts +18 -0
  60. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.js +27 -0
  61. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.js.map +1 -0
  62. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css.cjs +11 -0
  63. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css.cjs.map +1 -0
  64. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css.js +9 -0
  65. package/dist/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css.js.map +1 -0
  66. package/dist/components/DataGrid/components/Footer/FooterCell/index.d.ts +1 -0
  67. package/dist/components/DataGrid/components/Footer/index.d.ts +1 -0
  68. package/dist/components/DataGrid/components/GridContainer/Container/Container.cjs +23 -0
  69. package/dist/components/DataGrid/components/GridContainer/Container/Container.cjs.map +1 -0
  70. package/dist/components/DataGrid/components/GridContainer/Container/Container.d.ts +21 -0
  71. package/dist/components/DataGrid/components/GridContainer/Container/Container.js +17 -0
  72. package/dist/components/DataGrid/components/GridContainer/Container/Container.js.map +1 -0
  73. package/dist/components/DataGrid/components/GridContainer/Container/Container.module.css.cjs +17 -0
  74. package/dist/components/DataGrid/components/GridContainer/Container/Container.module.css.cjs.map +1 -0
  75. package/dist/components/DataGrid/components/GridContainer/Container/Container.module.css.js +12 -0
  76. package/dist/components/DataGrid/components/GridContainer/Container/Container.module.css.js.map +1 -0
  77. package/dist/components/DataGrid/components/GridContainer/Container/index.d.ts +1 -0
  78. package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs +30 -0
  79. package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs.map +1 -0
  80. package/dist/components/DataGrid/components/GridContainer/GridContainer.d.ts +49 -0
  81. package/dist/components/DataGrid/components/GridContainer/GridContainer.js +24 -0
  82. package/dist/components/DataGrid/components/GridContainer/GridContainer.js.map +1 -0
  83. package/dist/components/DataGrid/components/GridContainer/GridContainer.module.css.cjs +11 -0
  84. package/dist/components/DataGrid/components/GridContainer/GridContainer.module.css.cjs.map +1 -0
  85. package/dist/components/DataGrid/components/GridContainer/GridContainer.module.css.js +9 -0
  86. package/dist/components/DataGrid/components/GridContainer/GridContainer.module.css.js.map +1 -0
  87. package/dist/components/DataGrid/components/GridContainer/index.d.ts +1 -0
  88. package/dist/components/DataGrid/components/Header/Header.cjs +20 -0
  89. package/dist/components/DataGrid/components/Header/Header.cjs.map +1 -0
  90. package/dist/components/DataGrid/components/Header/Header.d.ts +13 -0
  91. package/dist/components/DataGrid/components/Header/Header.js +14 -0
  92. package/dist/components/DataGrid/components/Header/Header.js.map +1 -0
  93. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs +64 -0
  94. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs.map +1 -0
  95. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.d.ts +22 -0
  96. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js +58 -0
  97. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js.map +1 -0
  98. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.css.cjs +19 -0
  99. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.css.cjs.map +1 -0
  100. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.css.js +13 -0
  101. package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.css.js.map +1 -0
  102. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/SortIcon.cjs +29 -0
  103. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/SortIcon.cjs.map +1 -0
  104. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/SortIcon.d.ts +10 -0
  105. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/SortIcon.js +23 -0
  106. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/SortIcon.js.map +1 -0
  107. package/dist/components/DataGrid/components/Header/HeaderCell/SortIcon/index.d.ts +1 -0
  108. package/dist/components/DataGrid/components/Header/HeaderCell/index.d.ts +1 -0
  109. package/dist/components/DataGrid/components/Header/Resizer/Resizer.cjs +25 -0
  110. package/dist/components/DataGrid/components/Header/Resizer/Resizer.cjs.map +1 -0
  111. package/dist/components/DataGrid/components/Header/Resizer/Resizer.d.ts +21 -0
  112. package/dist/components/DataGrid/components/Header/Resizer/Resizer.js +19 -0
  113. package/dist/components/DataGrid/components/Header/Resizer/Resizer.js.map +1 -0
  114. package/dist/components/DataGrid/components/Header/Resizer/Resizer.module.css.cjs +11 -0
  115. package/dist/components/DataGrid/components/Header/Resizer/Resizer.module.css.cjs.map +1 -0
  116. package/dist/components/DataGrid/components/Header/Resizer/Resizer.module.css.js +9 -0
  117. package/dist/components/DataGrid/components/Header/Resizer/Resizer.module.css.js.map +1 -0
  118. package/dist/components/DataGrid/components/Header/Resizer/index.d.ts +1 -0
  119. package/dist/components/DataGrid/components/Header/index.d.ts +1 -0
  120. package/dist/components/DataGrid/components/index.d.ts +5 -0
  121. package/dist/components/DataGrid/constants.cjs +12 -0
  122. package/dist/components/DataGrid/constants.cjs.map +1 -0
  123. package/dist/components/DataGrid/constants.d.ts +4 -0
  124. package/dist/components/DataGrid/constants.js +7 -0
  125. package/dist/components/DataGrid/constants.js.map +1 -0
  126. package/dist/components/DataGrid/hooks/index.d.ts +3 -0
  127. package/dist/components/DataGrid/hooks/usePinnedColumnLayout.cjs +39 -0
  128. package/dist/components/DataGrid/hooks/usePinnedColumnLayout.cjs.map +1 -0
  129. package/dist/components/DataGrid/hooks/usePinnedColumnLayout.d.ts +15 -0
  130. package/dist/components/DataGrid/hooks/usePinnedColumnLayout.js +37 -0
  131. package/dist/components/DataGrid/hooks/usePinnedColumnLayout.js.map +1 -0
  132. package/dist/components/DataGrid/hooks/usePinnedColumnStyles.cjs +22 -0
  133. package/dist/components/DataGrid/hooks/usePinnedColumnStyles.cjs.map +1 -0
  134. package/dist/components/DataGrid/hooks/usePinnedColumnStyles.d.ts +13 -0
  135. package/dist/components/DataGrid/hooks/usePinnedColumnStyles.js +20 -0
  136. package/dist/components/DataGrid/hooks/usePinnedColumnStyles.js.map +1 -0
  137. package/dist/components/DataGrid/hooks/useSortingState.cjs +40 -0
  138. package/dist/components/DataGrid/hooks/useSortingState.cjs.map +1 -0
  139. package/dist/components/DataGrid/hooks/useSortingState.d.ts +23 -0
  140. package/dist/components/DataGrid/hooks/useSortingState.js +38 -0
  141. package/dist/components/DataGrid/hooks/useSortingState.js.map +1 -0
  142. package/dist/components/DataGrid/index.d.ts +1 -0
  143. package/dist/components/DataGrid/types/AriaRoles.d.ts +4 -0
  144. package/dist/components/DataGrid/types/ColumnDefinition.d.ts +77 -0
  145. package/dist/components/DataGrid/types/DataGridProps.d.ts +85 -0
  146. package/dist/components/DataGrid/types/PinnedColumnState.d.ts +4 -0
  147. package/dist/components/DataGrid/types/SortState.d.ts +5 -0
  148. package/dist/components/DataGrid/types/declarations.d.ts +9 -0
  149. package/dist/components/DataGrid/types/enums.d.ts +3 -0
  150. package/dist/components/DataGrid/types/index.d.ts +6 -0
  151. package/dist/components/DataGrid/utils/ColumnMapper.cjs +96 -0
  152. package/dist/components/DataGrid/utils/ColumnMapper.cjs.map +1 -0
  153. package/dist/components/DataGrid/utils/ColumnMapper.d.ts +10 -0
  154. package/dist/components/DataGrid/utils/ColumnMapper.js +94 -0
  155. package/dist/components/DataGrid/utils/ColumnMapper.js.map +1 -0
  156. package/dist/components/DataGrid/utils/getAriaRoles.cjs +11 -0
  157. package/dist/components/DataGrid/utils/getAriaRoles.cjs.map +1 -0
  158. package/dist/components/DataGrid/utils/getAriaRoles.d.ts +2 -0
  159. package/dist/components/DataGrid/utils/getAriaRoles.js +9 -0
  160. package/dist/components/DataGrid/utils/getAriaRoles.js.map +1 -0
  161. package/dist/components/DataGrid/utils/index.d.ts +4 -0
  162. package/dist/components/DataGrid/utils/isLastColumn.cjs +11 -0
  163. package/dist/components/DataGrid/utils/isLastColumn.cjs.map +1 -0
  164. package/dist/components/DataGrid/utils/isLastColumn.d.ts +2 -0
  165. package/dist/components/DataGrid/utils/isLastColumn.js +9 -0
  166. package/dist/components/DataGrid/utils/isLastColumn.js.map +1 -0
  167. package/dist/components/DataGrid/utils/pinnedColumnUtils.cjs +33 -0
  168. package/dist/components/DataGrid/utils/pinnedColumnUtils.cjs.map +1 -0
  169. package/dist/components/DataGrid/utils/pinnedColumnUtils.d.ts +4 -0
  170. package/dist/components/DataGrid/utils/pinnedColumnUtils.js +30 -0
  171. package/dist/components/DataGrid/utils/pinnedColumnUtils.js.map +1 -0
  172. package/dist/components/DataTable/DataTable.cjs +5 -2
  173. package/dist/components/DataTable/DataTable.cjs.map +1 -1
  174. package/dist/components/DataTable/DataTable.js +5 -2
  175. package/dist/components/DataTable/DataTable.js.map +1 -1
  176. package/dist/components/DataTable/hooks/index.d.ts +0 -1
  177. package/dist/components/DataTable/index.d.ts +1 -1
  178. package/dist/components/FilterTag/FilterTag.cjs +1 -0
  179. package/dist/components/FilterTag/FilterTag.cjs.map +1 -1
  180. package/dist/components/FilterTag/FilterTag.js +1 -0
  181. package/dist/components/FilterTag/FilterTag.js.map +1 -1
  182. package/dist/components/SelectDropdown/ListItem/ListItem.cjs +1 -0
  183. package/dist/components/SelectDropdown/ListItem/ListItem.cjs.map +1 -1
  184. package/dist/components/SelectDropdown/ListItem/ListItem.js +1 -0
  185. package/dist/components/SelectDropdown/ListItem/ListItem.js.map +1 -1
  186. package/dist/components/VideoModal/VideoModal.cjs +1 -0
  187. package/dist/components/VideoModal/VideoModal.cjs.map +1 -1
  188. package/dist/components/VideoModal/VideoModal.js +1 -0
  189. package/dist/components/VideoModal/VideoModal.js.map +1 -1
  190. package/dist/components/View/View.cjs +1 -0
  191. package/dist/components/View/View.cjs.map +1 -1
  192. package/dist/components/View/View.js +1 -0
  193. package/dist/components/View/View.js.map +1 -1
  194. package/dist/components/ViewTab/ViewTab.cjs +1 -0
  195. package/dist/components/ViewTab/ViewTab.cjs.map +1 -1
  196. package/dist/components/ViewTab/ViewTab.js +1 -0
  197. package/dist/components/ViewTab/ViewTab.js.map +1 -1
  198. package/dist/components/index.d.ts +2 -1
  199. package/dist/hooks/index.d.ts +3 -0
  200. package/dist/{components/DataTable/hooks → hooks}/useDragToScroll.cjs +10 -2
  201. package/dist/hooks/useDragToScroll.cjs.map +1 -0
  202. package/dist/hooks/useDragToScroll.d.ts +12 -0
  203. package/dist/{components/DataTable/hooks → hooks}/useDragToScroll.js +10 -2
  204. package/dist/hooks/useDragToScroll.js.map +1 -0
  205. package/dist/hooks/useIntersectionObserver.cjs +57 -0
  206. package/dist/hooks/useIntersectionObserver.cjs.map +1 -0
  207. package/dist/hooks/useIntersectionObserver.d.ts +15 -0
  208. package/dist/hooks/useIntersectionObserver.js +51 -0
  209. package/dist/hooks/useIntersectionObserver.js.map +1 -0
  210. package/dist/hooks/useResizeObserver.cjs +67 -0
  211. package/dist/hooks/useResizeObserver.cjs.map +1 -0
  212. package/dist/hooks/useResizeObserver.d.ts +18 -0
  213. package/dist/hooks/useResizeObserver.js +61 -0
  214. package/dist/hooks/useResizeObserver.js.map +1 -0
  215. package/dist/index.cjs +8 -2
  216. package/dist/index.cjs.map +1 -1
  217. package/dist/index.js +4 -1
  218. package/dist/index.js.map +1 -1
  219. package/dist/theme/index.d.ts +1 -0
  220. package/dist/theme/modules/layers.cjs +1 -0
  221. package/dist/theme/modules/layers.cjs.map +1 -1
  222. package/dist/theme/modules/layers.d.ts +1 -0
  223. package/dist/theme/modules/layers.js +1 -0
  224. package/dist/theme/modules/layers.js.map +1 -1
  225. package/package.json +2 -1
  226. package/dist/components/DataTable/hooks/useDragToScroll.cjs.map +0 -1
  227. package/dist/components/DataTable/hooks/useDragToScroll.d.ts +0 -2
  228. package/dist/components/DataTable/hooks/useDragToScroll.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BodyCell.module.css.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.module.css"],"sourcesContent":[".bodyCell {\n composes: baseCell from '../../../DataGrid.module.css';\n\n background-color: white;\n\n color: var(--text-body-small-color);\n font-family: var(--text-body-small-font-family);\n font-size: var(--text-body-small-font-size);\n font-weight: var(--text-body-small-font-weight);\n line-height: var(--text-body-small-line-height);\n}\n\n:global(.data-grid-row.striped:nth-of-type(odd)) > .bodyCell {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n:global(.data-grid-row.selected) > .bodyCell {\n background-color: var(--colors-brand-blue-lightest);\n}\n\n:global(.data-grid-row + .data-grid-row) > .bodyCell {\n border-top: 1px solid var(--colors-neutral-grey-base);\n}\n"],"names":[],"mappings":";;AACA,MAAM,WAAW,GAAG,CAAC;AACrB,ijDAAijD,CAAC;AACljD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,QAAQ,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const cssContents = `._baseCell_13swz_1{box-sizing:border-box;position:relative;&:focus,&:focus-visible{box-shadow:inset var(--sizes-none) var(--sizes-none) var(--sizes-none) var(--sizes-line) var(--colors-secondary-blue-base);outline:var(--sizes-none)}}._pinnedColumnBase_13swz_12{&:after{bottom:-1px;box-sizing:border-box;content:"";pointer-events:none;position:absolute;top:var(--sizes-none);width:30px}}._pinnedColumnLeft_13swz_27{&:after{box-shadow:inset 10px 0 10px -8px rgba(0,0,0,.25);right:var(--sizes-none);transform:translate(100%)}}._pinnedColumnRight_13swz_39{&:after{box-shadow:inset -10px 0 10px -8px rgba(0,0,0,.25);left:var(--sizes-none);transform:translate(-100%)}}._bodyCell_w9phy_1{background-color:#fff;color:var(--text-body-small-color);font-family:var(--text-body-small-font-family);font-size:var(--text-body-small-font-size);font-weight:var(--text-body-small-font-weight);line-height:var(--text-body-small-line-height)}.data-grid-row.striped:nth-of-type(odd)>._bodyCell_w9phy_1{background-color:var(--colors-neutral-grey-lightest)}.data-grid-row.selected>._bodyCell_w9phy_1{background-color:var(--colors-brand-blue-lightest)}.data-grid-row+.data-grid-row>._bodyCell_w9phy_1{border-top:1px solid var(--colors-neutral-grey-base)}
2
+ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIjxubyBzb3VyY2U+IiwiQm9keUNlbGwubW9kdWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxtQkFBQSxzQkFBQSxrQkFBQSx3QkFBQSwySEFBQSwwQkFBQSxDQUFBLDRCQUFBLFFBQUEsWUFBQSxzQkFBQSxXQUFBLG9CQUFBLGtCQUFBLHNCQUFBLFdBQUEsQ0FBQSw0QkFBQSxRQUFBLGtEQUFBLHdCQUFBLDBCQUFBLENBQUEsNkJBQUEsUUFBQSxtREFBQSx1QkFBQSwyQkFBQSxDQUFBLEFDQUEsbUJBR0UscUJBQXVCLENBRXZCLGtDQUFtQyxDQUNuQyw4Q0FBK0MsQ0FDL0MsMENBQTJDLENBQzNDLDhDQUErQyxDQUMvQyw4Q0FDRixDQUVBLDJEQUNFLG9EQUNGLENBRUEsMkNBQ0Usa0RBQ0YsQ0FFQSxpREFDRSxvREFDRiIsImZpbGUiOiJCb2R5Q2VsbC5tb2R1bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOltudWxsLCIuYm9keUNlbGwge1xuICBjb21wb3NlczogYmFzZUNlbGwgZnJvbSAnLi4vLi4vLi4vRGF0YUdyaWQubW9kdWxlLmNzcyc7XG5cbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG5cbiAgY29sb3I6IHZhcigtLXRleHQtYm9keS1zbWFsbC1jb2xvcik7XG4gIGZvbnQtZmFtaWx5OiB2YXIoLS10ZXh0LWJvZHktc21hbGwtZm9udC1mYW1pbHkpO1xuICBmb250LXNpemU6IHZhcigtLXRleHQtYm9keS1zbWFsbC1mb250LXNpemUpO1xuICBmb250LXdlaWdodDogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtd2VpZ2h0KTtcbiAgbGluZS1oZWlnaHQ6IHZhcigtLXRleHQtYm9keS1zbWFsbC1saW5lLWhlaWdodCk7XG59XG5cbjpnbG9iYWwoLmRhdGEtZ3JpZC1yb3cuc3RyaXBlZDpudGgtb2YtdHlwZShvZGQpKSA+IC5ib2R5Q2VsbCB7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWNvbG9ycy1uZXV0cmFsLWdyZXktbGlnaHRlc3QpO1xufVxuXG46Z2xvYmFsKC5kYXRhLWdyaWQtcm93LnNlbGVjdGVkKSA+IC5ib2R5Q2VsbCB7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWNvbG9ycy1icmFuZC1ibHVlLWxpZ2h0ZXN0KTtcbn1cblxuOmdsb2JhbCguZGF0YS1ncmlkLXJvdyArIC5kYXRhLWdyaWQtcm93KSA+IC5ib2R5Q2VsbCB7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCB2YXIoLS1jb2xvcnMtbmV1dHJhbC1ncmV5LWJhc2UpO1xufVxuIl19 */`;
3
+ const style = document.createElement('style');
4
+ style.innerHTML = cssContents;
5
+ document.head.appendChild(style);
6
+ const bodyCell = '_bodyCell_w9phy_1 _baseCell_13swz_1';
7
+
8
+ export { bodyCell };
9
+ //# sourceMappingURL=BodyCell.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BodyCell.module.css.js","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.module.css"],"sourcesContent":[".bodyCell {\n composes: baseCell from '../../../DataGrid.module.css';\n\n background-color: white;\n\n color: var(--text-body-small-color);\n font-family: var(--text-body-small-font-family);\n font-size: var(--text-body-small-font-size);\n font-weight: var(--text-body-small-font-weight);\n line-height: var(--text-body-small-line-height);\n}\n\n:global(.data-grid-row.striped:nth-of-type(odd)) > .bodyCell {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n:global(.data-grid-row.selected) > .bodyCell {\n background-color: var(--colors-brand-blue-lightest);\n}\n\n:global(.data-grid-row + .data-grid-row) > .bodyCell {\n border-top: 1px solid var(--colors-neutral-grey-base);\n}\n"],"names":[],"mappings":"AACA,MAAM,WAAW,GAAG,CAAC;AACrB,ijDAAijD,CAAC;AACljD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,QAAQ,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ export { BodyCell } from './BodyCell';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var buildClassnames = require('../../../../../utils/buildClassnames.cjs');
5
+ require('uid/secure');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const Row = ({ row, striped, children }) => (React__default.default.createElement("tr", { className: buildClassnames.buildClassnames(['data-grid-row', striped ? 'striped' : undefined]), key: row.id, "aria-rowindex": row.index + 2 }, children));
12
+
13
+ exports.Row = Row;
14
+ //# sourceMappingURL=Row.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Row as RowItem } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\ntype RowProps = {\n /**\n * The row within the TanStack Table instance.\n */\n row: RowItem<any>;\n\n /**\n * Whether rows should be striped or not.\n */\n striped: boolean;\n\n /**\n * Child elements (table cells).\n */\n children: React.ReactNode;\n};\n\nexport const Row = ({ row, striped, children }: RowProps) => (\n <tr\n className={buildClassnames(['data-grid-row', striped ? 'striped' : undefined])}\n key={row.id}\n // 0-based index + header row.\n aria-rowindex={row.index + 2}\n >\n {children}\n </tr>\n);\n"],"names":["React","buildClassnames"],"mappings":";;;;;;;;;;MAuBa,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAY,MACtDA,sBACE,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAEC,+BAAe,CAAC,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC,EAC9E,GAAG,EAAE,GAAG,CAAC,EAAE,EAAA,eAAA,EAEI,GAAG,CAAC,KAAK,GAAG,CAAC,EAE3B,EAAA,QAAQ,CACN;;;;"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Row as RowItem } from '@tanstack/react-table';
3
+ type RowProps = {
4
+ /**
5
+ * The row within the TanStack Table instance.
6
+ */
7
+ row: RowItem<any>;
8
+ /**
9
+ * Whether rows should be striped or not.
10
+ */
11
+ striped: boolean;
12
+ /**
13
+ * Child elements (table cells).
14
+ */
15
+ children: React.ReactNode;
16
+ };
17
+ export declare const Row: ({ row, striped, children }: RowProps) => React.JSX.Element;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ import React__default from 'react';
2
+ import { buildClassnames } from '../../../../../utils/buildClassnames.js';
3
+ import 'uid/secure';
4
+
5
+ const Row = ({ row, striped, children }) => (React__default.createElement("tr", { className: buildClassnames(['data-grid-row', striped ? 'striped' : undefined]), key: row.id, "aria-rowindex": row.index + 2 }, children));
6
+
7
+ export { Row };
8
+ //# sourceMappingURL=Row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.js","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Row as RowItem } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\ntype RowProps = {\n /**\n * The row within the TanStack Table instance.\n */\n row: RowItem<any>;\n\n /**\n * Whether rows should be striped or not.\n */\n striped: boolean;\n\n /**\n * Child elements (table cells).\n */\n children: React.ReactNode;\n};\n\nexport const Row = ({ row, striped, children }: RowProps) => (\n <tr\n className={buildClassnames(['data-grid-row', striped ? 'striped' : undefined])}\n key={row.id}\n // 0-based index + header row.\n aria-rowindex={row.index + 2}\n >\n {children}\n </tr>\n);\n"],"names":["React"],"mappings":";;;;MAuBa,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAY,MACtDA,cACE,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,eAAe,CAAC,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC,EAC9E,GAAG,EAAE,GAAG,CAAC,EAAE,EAAA,eAAA,EAEI,GAAG,CAAC,KAAK,GAAG,CAAC,EAE3B,EAAA,QAAQ,CACN;;;;"}
@@ -0,0 +1 @@
1
+ export { Row } from './Row';
@@ -0,0 +1 @@
1
+ export { Body, MemoizedBody } from './Body';
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var buildClassnames = require('../../../../utils/buildClassnames.cjs');
5
+ require('uid/secure');
6
+ var CellContent_module = require('./CellContent.module.css.cjs');
7
+
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
+
12
+ const cellContentClassname = buildClassnames.buildClassnames([CellContent_module.cellContent, 'data-grid-cell-content']);
13
+ /**
14
+ * Wrapper for content displayed within a non-header cell in the grid.
15
+ */
16
+ const CellContent = ({ contentStyle, children }) => {
17
+ return (React__default.default.createElement("div", { "data-testid": "data-grid-cell-content", className: cellContentClassname, style: contentStyle }, children));
18
+ };
19
+
20
+ exports.CellContent = CellContent;
21
+ //# sourceMappingURL=CellContent.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContent.cjs","sources":["../../../../../src/components/DataGrid/components/CellContent/CellContent.tsx"],"sourcesContent":["import React from 'react';\n\nimport { buildClassnames } from '../../../../utils';\n\nimport { cellContent } from './CellContent.module.css';\n\nexport interface CellContentProps {\n /**\n * Styles to be applied to the cell content wrapper.\n */\n contentStyle: Pick<React.CSSProperties, 'marginLeft' | 'justifyContent' | 'textAlign'>;\n\n /**\n * Child elements.\n */\n children?: React.ReactNode;\n}\n\nconst cellContentClassname = buildClassnames([cellContent, 'data-grid-cell-content']);\n\n/**\n * Wrapper for content displayed within a non-header cell in the grid.\n */\nexport const CellContent = ({ contentStyle, children }: CellContentProps) => {\n return (\n <div data-testid=\"data-grid-cell-content\" className={cellContentClassname} style={contentStyle}>\n {children}\n </div>\n );\n};\n"],"names":["buildClassnames","cellContent","React"],"mappings":";;;;;;;;;;;AAkBA,MAAM,oBAAoB,GAAGA,+BAAe,CAAC,CAACC,8BAAW,EAAE,wBAAwB,CAAC,CAAC;AAErF;;AAEG;AACU,MAAA,WAAW,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAoB,KAAI;AAC1E,IAAA,QACEC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,wBAAwB,EAAC,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,EAAA,EAC3F,QAAQ,CACL;AAEV;;;;"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface CellContentProps {
3
+ /**
4
+ * Styles to be applied to the cell content wrapper.
5
+ */
6
+ contentStyle: Pick<React.CSSProperties, 'marginLeft' | 'justifyContent' | 'textAlign'>;
7
+ /**
8
+ * Child elements.
9
+ */
10
+ children?: React.ReactNode;
11
+ }
12
+ /**
13
+ * Wrapper for content displayed within a non-header cell in the grid.
14
+ */
15
+ export declare const CellContent: ({ contentStyle, children }: CellContentProps) => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React__default from 'react';
2
+ import { buildClassnames } from '../../../../utils/buildClassnames.js';
3
+ import 'uid/secure';
4
+ import { cellContent } from './CellContent.module.css.js';
5
+
6
+ const cellContentClassname = buildClassnames([cellContent, 'data-grid-cell-content']);
7
+ /**
8
+ * Wrapper for content displayed within a non-header cell in the grid.
9
+ */
10
+ const CellContent = ({ contentStyle, children }) => {
11
+ return (React__default.createElement("div", { "data-testid": "data-grid-cell-content", className: cellContentClassname, style: contentStyle }, children));
12
+ };
13
+
14
+ export { CellContent };
15
+ //# sourceMappingURL=CellContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContent.js","sources":["../../../../../src/components/DataGrid/components/CellContent/CellContent.tsx"],"sourcesContent":["import React from 'react';\n\nimport { buildClassnames } from '../../../../utils';\n\nimport { cellContent } from './CellContent.module.css';\n\nexport interface CellContentProps {\n /**\n * Styles to be applied to the cell content wrapper.\n */\n contentStyle: Pick<React.CSSProperties, 'marginLeft' | 'justifyContent' | 'textAlign'>;\n\n /**\n * Child elements.\n */\n children?: React.ReactNode;\n}\n\nconst cellContentClassname = buildClassnames([cellContent, 'data-grid-cell-content']);\n\n/**\n * Wrapper for content displayed within a non-header cell in the grid.\n */\nexport const CellContent = ({ contentStyle, children }: CellContentProps) => {\n return (\n <div data-testid=\"data-grid-cell-content\" className={cellContentClassname} style={contentStyle}>\n {children}\n </div>\n );\n};\n"],"names":["React"],"mappings":";;;;;AAkBA,MAAM,oBAAoB,GAAG,eAAe,CAAC,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC;AAErF;;AAEG;AACU,MAAA,WAAW,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAoB,KAAI;AAC1E,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,wBAAwB,EAAC,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE,YAAY,EAAA,EAC3F,QAAQ,CACL;AAEV;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const cssContents = `._cellContent_gaxlz_1{align-items:center;display:flex;gap:var(--sizes-sm);padding:var(--density)}
4
+ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNlbGxDb250ZW50Lm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsc0JBR0Usa0JBQW1CLENBRm5CLFlBQWEsQ0FHYixtQkFBb0IsQ0FGcEIsc0JBR0YiLCJmaWxlIjoiQ2VsbENvbnRlbnQubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5jZWxsQ29udGVudCB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIHBhZGRpbmc6IHZhcigtLWRlbnNpdHkpO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBnYXA6IHZhcigtLXNpemVzLXNtKTtcbn1cbiJdfQ== */`;
5
+ const style = document.createElement('style');
6
+ style.innerHTML = cssContents;
7
+ document.head.appendChild(style);
8
+ const cellContent = '_cellContent_gaxlz_1';
9
+
10
+ exports.cellContent = cellContent;
11
+ //# sourceMappingURL=CellContent.module.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContent.module.css.cjs","sources":["../../../../../src/components/DataGrid/components/CellContent/CellContent.module.css"],"sourcesContent":[".cellContent {\n display: flex;\n padding: var(--density);\n align-items: center;\n gap: var(--sizes-sm);\n}\n"],"names":[],"mappings":";;AACA,MAAM,WAAW,GAAG,CAAC;AACrB,icAAic,CAAC;AAClc,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,WAAW,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const cssContents = `._cellContent_gaxlz_1{align-items:center;display:flex;gap:var(--sizes-sm);padding:var(--density)}
2
+ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNlbGxDb250ZW50Lm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsc0JBR0Usa0JBQW1CLENBRm5CLFlBQWEsQ0FHYixtQkFBb0IsQ0FGcEIsc0JBR0YiLCJmaWxlIjoiQ2VsbENvbnRlbnQubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5jZWxsQ29udGVudCB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIHBhZGRpbmc6IHZhcigtLWRlbnNpdHkpO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBnYXA6IHZhcigtLXNpemVzLXNtKTtcbn1cbiJdfQ== */`;
3
+ const style = document.createElement('style');
4
+ style.innerHTML = cssContents;
5
+ document.head.appendChild(style);
6
+ const cellContent = '_cellContent_gaxlz_1';
7
+
8
+ export { cellContent };
9
+ //# sourceMappingURL=CellContent.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CellContent.module.css.js","sources":["../../../../../src/components/DataGrid/components/CellContent/CellContent.module.css"],"sourcesContent":[".cellContent {\n display: flex;\n padding: var(--density);\n align-items: center;\n gap: var(--sizes-sm);\n}\n"],"names":[],"mappings":"AACA,MAAM,WAAW,GAAG,CAAC;AACrB,icAAic,CAAC;AAClc,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,WAAW,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ export { CellContent } from './CellContent';
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ require('../../../../hooks/useFocusVisible.cjs');
5
+ require('uid/secure');
6
+ var useResizeObserver = require('../../../../hooks/useResizeObserver.cjs');
7
+ require('lodash.throttle');
8
+ var isLastColumn = require('../../utils/isLastColumn.cjs');
9
+ require('@tanstack/react-table');
10
+
11
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
+
15
+ /**
16
+ * Renders the colgroup and col's for the table, responsible for controlling the width of columns within the table, including
17
+ * handling situations where overflow may be necessary while resizing.
18
+ *
19
+ * Separated from the Header component to allow for better performance, since we can reliably memoize col's and limit updates only
20
+ * to when the table sizing state changes.
21
+ */
22
+ const Columns = ({ table }) => {
23
+ const headers = table.getLeafHeaders();
24
+ // Setup state and hook to observe the last column in the table. If the last column is larger than its
25
+ // default size, we allow it to render with `width: auto;` to ensure the table fills the container.
26
+ // If the last column is smaller than its default size, the table should start to 'overflow' its parent,
27
+ // so we switch to using a fixed width on the column instead.
28
+ const lastColumnRef = React.useRef(null);
29
+ const [lastColumnAuto, setLastColumnAuto] = React.useState(true);
30
+ useResizeObserver.useResizeObserver({
31
+ targetRef: lastColumnRef,
32
+ resizeHandler: ({ width }) => {
33
+ const lastHeader = headers[headers.length - 1];
34
+ if (width <= lastHeader.column.columnDef.size) {
35
+ setLastColumnAuto(false);
36
+ }
37
+ else {
38
+ setLastColumnAuto(true);
39
+ }
40
+ },
41
+ throttleMs: 10,
42
+ });
43
+ // Memoized columns.
44
+ const columns = React.useMemo(() => (React__default.default.createElement("colgroup", null, headers.map((header) => {
45
+ const lastColumn = isLastColumn.isLastColumn(table, header.column);
46
+ const columnWidth = lastColumn && lastColumnAuto ? 'auto' : `${header.column.getSize()}px`;
47
+ return (React__default.default.createElement("col", { ref: lastColumn ? lastColumnRef : undefined, key: header.column.id, style: { width: columnWidth, minWidth: header.column.columnDef.minSize } }));
48
+ }))),
49
+ // Dependencies here are as recommended by TanStack docs (https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant)
50
+ // eslint-disable-next-line react-hooks/exhaustive-deps
51
+ [table.getState().columnSizingInfo, table.getState().columnSizing, lastColumnAuto, headers]);
52
+ return columns;
53
+ };
54
+
55
+ exports.Columns = Columns;
56
+ //# sourceMappingURL=Columns.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Columns.cjs","sources":["../../../../../src/components/DataGrid/components/Columns/Columns.tsx"],"sourcesContent":["import React, { useMemo, useRef, useState } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { useResizeObserver } from '../../../../hooks';\nimport { isLastColumn } from '../../utils';\n\ntype ColumnsProps = {\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n};\n\n/**\n * Renders the colgroup and col's for the table, responsible for controlling the width of columns within the table, including\n * handling situations where overflow may be necessary while resizing.\n *\n * Separated from the Header component to allow for better performance, since we can reliably memoize col's and limit updates only\n * to when the table sizing state changes.\n */\nexport const Columns = ({ table }: ColumnsProps) => {\n const headers = table.getLeafHeaders();\n\n // Setup state and hook to observe the last column in the table. If the last column is larger than its\n // default size, we allow it to render with `width: auto;` to ensure the table fills the container.\n // If the last column is smaller than its default size, the table should start to 'overflow' its parent,\n // so we switch to using a fixed width on the column instead.\n const lastColumnRef = useRef<HTMLTableColElement>(null);\n const [lastColumnAuto, setLastColumnAuto] = useState(true);\n useResizeObserver({\n targetRef: lastColumnRef,\n resizeHandler: ({ width }) => {\n const lastHeader = headers[headers.length - 1];\n\n if (width <= lastHeader.column.columnDef.size!) {\n setLastColumnAuto(false);\n } else {\n setLastColumnAuto(true);\n }\n },\n throttleMs: 10,\n });\n\n // Memoized columns.\n const columns = useMemo(\n () => (\n <colgroup>\n {headers.map((header) => {\n const lastColumn = isLastColumn(table, header.column);\n const columnWidth =\n lastColumn && lastColumnAuto ? 'auto' : `${header.column.getSize()}px`;\n\n return (\n <col\n ref={lastColumn ? lastColumnRef : undefined}\n key={header.column.id}\n style={{ width: columnWidth, minWidth: header.column.columnDef.minSize }}\n />\n );\n })}\n </colgroup>\n ),\n // Dependencies here are as recommended by TanStack docs (https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [table.getState().columnSizingInfo, table.getState().columnSizing, lastColumnAuto, headers],\n );\n\n return columns;\n};\n"],"names":["useRef","useState","useResizeObserver","useMemo","React","isLastColumn"],"mappings":";;;;;;;;;;;;;;AAaA;;;;;;AAMG;MACU,OAAO,GAAG,CAAC,EAAE,KAAK,EAAgB,KAAI;AACjD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,EAAE;;;;;AAMtC,IAAA,MAAM,aAAa,GAAGA,YAAM,CAAsB,IAAI,CAAC;IACvD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAGC,cAAQ,CAAC,IAAI,CAAC;AAC1D,IAAAC,mCAAiB,CAAC;AAChB,QAAA,SAAS,EAAE,aAAa;AACxB,QAAA,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,KAAI;YAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAE9C,IAAI,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK,EAAE;gBAC9C,iBAAiB,CAAC,KAAK,CAAC;AACzB;AAAM,iBAAA;gBACL,iBAAiB,CAAC,IAAI,CAAC;AACxB;SACF;AACD,QAAA,UAAU,EAAE,EAAE;AACf,KAAA,CAAC;;AAGF,IAAA,MAAM,OAAO,GAAGC,aAAO,CACrB,OACEC,sBACG,CAAA,aAAA,CAAA,UAAA,EAAA,IAAA,EAAA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAI;QACtB,MAAM,UAAU,GAAGC,yBAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACrD,MAAM,WAAW,GACf,UAAU,IAAI,cAAc,GAAG,MAAM,GAAG,CAAA,EAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI;AAExE,QAAA,QACED,sBACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,EAC3C,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACrB,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,EAAA,CACxE;KAEL,CAAC,CACO,CACZ;;;AAGD,IAAA,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC,CAC5F;AAED,IAAA,OAAO,OAAO;AAChB;;;;"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Table } from '@tanstack/react-table';
3
+ type ColumnsProps = {
4
+ /**
5
+ * The TanStack Table instance.
6
+ */
7
+ table: Table<any>;
8
+ };
9
+ /**
10
+ * Renders the colgroup and col's for the table, responsible for controlling the width of columns within the table, including
11
+ * handling situations where overflow may be necessary while resizing.
12
+ *
13
+ * Separated from the Header component to allow for better performance, since we can reliably memoize col's and limit updates only
14
+ * to when the table sizing state changes.
15
+ */
16
+ export declare const Columns: ({ table }: ColumnsProps) => React.JSX.Element;
17
+ export {};
@@ -0,0 +1,50 @@
1
+ import React__default, { useRef, useState, useMemo } from 'react';
2
+ import '../../../../hooks/useFocusVisible.js';
3
+ import 'uid/secure';
4
+ import { useResizeObserver } from '../../../../hooks/useResizeObserver.js';
5
+ import 'lodash.throttle';
6
+ import { isLastColumn } from '../../utils/isLastColumn.js';
7
+ import '@tanstack/react-table';
8
+
9
+ /**
10
+ * Renders the colgroup and col's for the table, responsible for controlling the width of columns within the table, including
11
+ * handling situations where overflow may be necessary while resizing.
12
+ *
13
+ * Separated from the Header component to allow for better performance, since we can reliably memoize col's and limit updates only
14
+ * to when the table sizing state changes.
15
+ */
16
+ const Columns = ({ table }) => {
17
+ const headers = table.getLeafHeaders();
18
+ // Setup state and hook to observe the last column in the table. If the last column is larger than its
19
+ // default size, we allow it to render with `width: auto;` to ensure the table fills the container.
20
+ // If the last column is smaller than its default size, the table should start to 'overflow' its parent,
21
+ // so we switch to using a fixed width on the column instead.
22
+ const lastColumnRef = useRef(null);
23
+ const [lastColumnAuto, setLastColumnAuto] = useState(true);
24
+ useResizeObserver({
25
+ targetRef: lastColumnRef,
26
+ resizeHandler: ({ width }) => {
27
+ const lastHeader = headers[headers.length - 1];
28
+ if (width <= lastHeader.column.columnDef.size) {
29
+ setLastColumnAuto(false);
30
+ }
31
+ else {
32
+ setLastColumnAuto(true);
33
+ }
34
+ },
35
+ throttleMs: 10,
36
+ });
37
+ // Memoized columns.
38
+ const columns = useMemo(() => (React__default.createElement("colgroup", null, headers.map((header) => {
39
+ const lastColumn = isLastColumn(table, header.column);
40
+ const columnWidth = lastColumn && lastColumnAuto ? 'auto' : `${header.column.getSize()}px`;
41
+ return (React__default.createElement("col", { ref: lastColumn ? lastColumnRef : undefined, key: header.column.id, style: { width: columnWidth, minWidth: header.column.columnDef.minSize } }));
42
+ }))),
43
+ // Dependencies here are as recommended by TanStack docs (https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant)
44
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45
+ [table.getState().columnSizingInfo, table.getState().columnSizing, lastColumnAuto, headers]);
46
+ return columns;
47
+ };
48
+
49
+ export { Columns };
50
+ //# sourceMappingURL=Columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Columns.js","sources":["../../../../../src/components/DataGrid/components/Columns/Columns.tsx"],"sourcesContent":["import React, { useMemo, useRef, useState } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { useResizeObserver } from '../../../../hooks';\nimport { isLastColumn } from '../../utils';\n\ntype ColumnsProps = {\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n};\n\n/**\n * Renders the colgroup and col's for the table, responsible for controlling the width of columns within the table, including\n * handling situations where overflow may be necessary while resizing.\n *\n * Separated from the Header component to allow for better performance, since we can reliably memoize col's and limit updates only\n * to when the table sizing state changes.\n */\nexport const Columns = ({ table }: ColumnsProps) => {\n const headers = table.getLeafHeaders();\n\n // Setup state and hook to observe the last column in the table. If the last column is larger than its\n // default size, we allow it to render with `width: auto;` to ensure the table fills the container.\n // If the last column is smaller than its default size, the table should start to 'overflow' its parent,\n // so we switch to using a fixed width on the column instead.\n const lastColumnRef = useRef<HTMLTableColElement>(null);\n const [lastColumnAuto, setLastColumnAuto] = useState(true);\n useResizeObserver({\n targetRef: lastColumnRef,\n resizeHandler: ({ width }) => {\n const lastHeader = headers[headers.length - 1];\n\n if (width <= lastHeader.column.columnDef.size!) {\n setLastColumnAuto(false);\n } else {\n setLastColumnAuto(true);\n }\n },\n throttleMs: 10,\n });\n\n // Memoized columns.\n const columns = useMemo(\n () => (\n <colgroup>\n {headers.map((header) => {\n const lastColumn = isLastColumn(table, header.column);\n const columnWidth =\n lastColumn && lastColumnAuto ? 'auto' : `${header.column.getSize()}px`;\n\n return (\n <col\n ref={lastColumn ? lastColumnRef : undefined}\n key={header.column.id}\n style={{ width: columnWidth, minWidth: header.column.columnDef.minSize }}\n />\n );\n })}\n </colgroup>\n ),\n // Dependencies here are as recommended by TanStack docs (https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [table.getState().columnSizingInfo, table.getState().columnSizing, lastColumnAuto, headers],\n );\n\n return columns;\n};\n"],"names":["React"],"mappings":";;;;;;;;AAaA;;;;;;AAMG;MACU,OAAO,GAAG,CAAC,EAAE,KAAK,EAAgB,KAAI;AACjD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,EAAE;;;;;AAMtC,IAAA,MAAM,aAAa,GAAG,MAAM,CAAsB,IAAI,CAAC;IACvD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC1D,IAAA,iBAAiB,CAAC;AAChB,QAAA,SAAS,EAAE,aAAa;AACxB,QAAA,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,KAAI;YAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YAE9C,IAAI,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK,EAAE;gBAC9C,iBAAiB,CAAC,KAAK,CAAC;AACzB;AAAM,iBAAA;gBACL,iBAAiB,CAAC,IAAI,CAAC;AACxB;SACF;AACD,QAAA,UAAU,EAAE,EAAE;AACf,KAAA,CAAC;;AAGF,IAAA,MAAM,OAAO,GAAG,OAAO,CACrB,OACEA,cACG,CAAA,aAAA,CAAA,UAAA,EAAA,IAAA,EAAA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAI;QACtB,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACrD,MAAM,WAAW,GACf,UAAU,IAAI,cAAc,GAAG,MAAM,GAAG,CAAA,EAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI;AAExE,QAAA,QACEA,cACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,EAC3C,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EACrB,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,EAAA,CACxE;KAEL,CAAC,CACO,CACZ;;;AAGD,IAAA,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,OAAO,CAAC,CAC5F;AAED,IAAA,OAAO,OAAO;AAChB;;;;"}
@@ -0,0 +1 @@
1
+ export { Columns } from './Columns';
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var FooterCell = require('./FooterCell/FooterCell.cjs');
5
+
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
9
+
10
+ const Footer = ({ table, ariaRoles }) => {
11
+ // We're not making use of column grouping, so we only need the first footer group.
12
+ const [footer] = table.getFooterGroups();
13
+ return (React__default.default.createElement("tfoot", { className: "data-grid-footer" },
14
+ React__default.default.createElement("tr", { className: "data-grid-footer-row" }, footer.headers.map((header) => (React__default.default.createElement(FooterCell.FooterCell, { key: header.id, ariaRoles: ariaRoles, header: header }))))));
15
+ };
16
+
17
+ exports.Footer = Footer;
18
+ //# sourceMappingURL=Footer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.cjs","sources":["../../../../../src/components/DataGrid/components/Footer/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { AriaRoles } from '../../types';\nimport { FooterCell } from './FooterCell';\n\ntype FooterProps = {\n /**\n * The TanStack table instance.\n */\n table: Table<any>;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n};\n\nexport const Footer = ({ table, ariaRoles }: FooterProps) => {\n // We're not making use of column grouping, so we only need the first footer group.\n const [footer] = table.getFooterGroups();\n\n return (\n <tfoot className=\"data-grid-footer\">\n <tr className=\"data-grid-footer-row\">\n {footer.headers.map((header) => (\n <FooterCell key={header.id} ariaRoles={ariaRoles} header={header} />\n ))}\n </tr>\n </tfoot>\n );\n};\n"],"names":["React","FooterCell"],"mappings":";;;;;;;;;AAkBa,MAAA,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAe,KAAI;;IAE1D,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE;AAExC,IAAA,QACEA,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,SAAS,EAAC,kBAAkB,EAAA;AACjC,QAAAA,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,sBAAsB,EACjC,EAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MACzBA,qCAACC,qBAAU,EAAA,EAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA,CACrE,CAAC,CACC,CACC;AAEZ;;;;"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Table } from '@tanstack/react-table';
3
+ import { AriaRoles } from '../../types';
4
+ type FooterProps = {
5
+ /**
6
+ * The TanStack table instance.
7
+ */
8
+ table: Table<any>;
9
+ /**
10
+ * ARIA roles used in the grid.
11
+ */
12
+ ariaRoles: AriaRoles;
13
+ };
14
+ export declare const Footer: ({ table, ariaRoles }: FooterProps) => React.JSX.Element;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { FooterCell } from './FooterCell/FooterCell.js';
3
+
4
+ const Footer = ({ table, ariaRoles }) => {
5
+ // We're not making use of column grouping, so we only need the first footer group.
6
+ const [footer] = table.getFooterGroups();
7
+ return (React__default.createElement("tfoot", { className: "data-grid-footer" },
8
+ React__default.createElement("tr", { className: "data-grid-footer-row" }, footer.headers.map((header) => (React__default.createElement(FooterCell, { key: header.id, ariaRoles: ariaRoles, header: header }))))));
9
+ };
10
+
11
+ export { Footer };
12
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sources":["../../../../../src/components/DataGrid/components/Footer/Footer.tsx"],"sourcesContent":["import React from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { AriaRoles } from '../../types';\nimport { FooterCell } from './FooterCell';\n\ntype FooterProps = {\n /**\n * The TanStack table instance.\n */\n table: Table<any>;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n};\n\nexport const Footer = ({ table, ariaRoles }: FooterProps) => {\n // We're not making use of column grouping, so we only need the first footer group.\n const [footer] = table.getFooterGroups();\n\n return (\n <tfoot className=\"data-grid-footer\">\n <tr className=\"data-grid-footer-row\">\n {footer.headers.map((header) => (\n <FooterCell key={header.id} ariaRoles={ariaRoles} header={header} />\n ))}\n </tr>\n </tfoot>\n );\n};\n"],"names":["React"],"mappings":";;;AAkBa,MAAA,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAe,KAAI;;IAE1D,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE;AAExC,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,SAAS,EAAC,kBAAkB,EAAA;AACjC,QAAAA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAC,sBAAsB,EACjC,EAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MACzBA,6BAAC,UAAU,EAAA,EAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA,CACrE,CAAC,CACC,CACC;AAEZ;;;;"}
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactTable = require('@tanstack/react-table');
5
+ var buildClassnames = require('../../../../../utils/buildClassnames.cjs');
6
+ require('uid/secure');
7
+ var usePinnedColumnStyles = require('../../../hooks/usePinnedColumnStyles.cjs');
8
+ var CellContent = require('../../CellContent/CellContent.cjs');
9
+ var FooterCell_module = require('./FooterCell.module.css.cjs');
10
+
11
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
+
15
+ /**
16
+ * Renders a footer cell element, and its content, for a given column.
17
+ */
18
+ const FooterCell = ({ header, ariaRoles }) => {
19
+ const { justifyContent, textAlign } = header.column.columnDef.meta;
20
+ const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles.usePinnedColumnStyles({
21
+ column: header.column,
22
+ });
23
+ const footerCellClassname = buildClassnames.buildClassnames([
24
+ FooterCell_module.footerCell,
25
+ pinnedCellClassName,
26
+ 'data-grid-footer-cell',
27
+ ]);
28
+ return (React__default.default.createElement("th", { scope: "row", role: ariaRoles.cell, "aria-colindex": header.column.getIndex() + 1, className: footerCellClassname, style: pinnedCellStyles },
29
+ React__default.default.createElement(CellContent.CellContent, { contentStyle: { justifyContent, textAlign } }, reactTable.flexRender(header.column.columnDef.footer, header.getContext()))));
30
+ };
31
+
32
+ exports.FooterCell = FooterCell;
33
+ //# sourceMappingURL=FooterCell.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterCell.cjs","sources":["../../../../../../src/components/DataGrid/components/Footer/FooterCell/FooterCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { flexRender, Header } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { usePinnedColumnStyles } from '../../../hooks/usePinnedColumnStyles';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\n\nimport { footerCell } from './FooterCell.module.css';\n\ntype FooterCellProps = {\n /**\n * The Header within the TanStack Table instance.\n */\n header: Header<any, any>;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n};\n\n/**\n * Renders a footer cell element, and its content, for a given column.\n */\nexport const FooterCell = ({ header, ariaRoles }: FooterCellProps) => {\n const { justifyContent, textAlign } = header.column.columnDef.meta!;\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({\n column: header.column,\n });\n\n const footerCellClassname = buildClassnames([\n footerCell,\n pinnedCellClassName,\n 'data-grid-footer-cell',\n ]);\n\n return (\n <th\n scope=\"row\"\n role={ariaRoles.cell}\n aria-colindex={header.column.getIndex() + 1}\n className={footerCellClassname}\n style={pinnedCellStyles}\n >\n <CellContent contentStyle={{ justifyContent, textAlign } as React.CSSProperties}>\n {flexRender(header.column.columnDef.footer, header.getContext())}\n </CellContent>\n </th>\n );\n};\n"],"names":["usePinnedColumnStyles","buildClassnames","footerCell","React","CellContent","flexRender"],"mappings":";;;;;;;;;;;;;;AAyBA;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAmB,KAAI;AACnE,IAAA,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK;AAEnE,IAAA,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAGA,2CAAqB,CAAC;QACtE,MAAM,EAAE,MAAM,CAAC,MAAM;AACtB,KAAA,CAAC;IAEF,MAAM,mBAAmB,GAAGC,+BAAe,CAAC;QAC1CC,4BAAU;QACV,mBAAmB;QACnB,uBAAuB;AACxB,KAAA,CAAC;IAEF,QACEC,sBACE,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EACX,IAAI,EAAE,SAAS,CAAC,IAAI,EACL,eAAA,EAAA,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EAC3C,SAAS,EAAE,mBAAmB,EAC9B,KAAK,EAAE,gBAAgB,EAAA;AAEvB,QAAAA,sBAAA,CAAA,aAAA,CAACC,uBAAW,EAAA,EAAC,YAAY,EAAE,EAAE,cAAc,EAAE,SAAS,EAAyB,EAAA,EAC5EC,qBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CACpD,CACX;AAET;;;;"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Header } from '@tanstack/react-table';
3
+ import { AriaRoles } from '../../../types';
4
+ type FooterCellProps = {
5
+ /**
6
+ * The Header within the TanStack Table instance.
7
+ */
8
+ header: Header<any, any>;
9
+ /**
10
+ * ARIA roles used in the grid.
11
+ */
12
+ ariaRoles: AriaRoles;
13
+ };
14
+ /**
15
+ * Renders a footer cell element, and its content, for a given column.
16
+ */
17
+ export declare const FooterCell: ({ header, ariaRoles }: FooterCellProps) => React.JSX.Element;
18
+ export {};
@@ -0,0 +1,27 @@
1
+ import React__default from 'react';
2
+ import { flexRender } from '@tanstack/react-table';
3
+ import { buildClassnames } from '../../../../../utils/buildClassnames.js';
4
+ import 'uid/secure';
5
+ import { usePinnedColumnStyles } from '../../../hooks/usePinnedColumnStyles.js';
6
+ import { CellContent } from '../../CellContent/CellContent.js';
7
+ import { footerCell } from './FooterCell.module.css.js';
8
+
9
+ /**
10
+ * Renders a footer cell element, and its content, for a given column.
11
+ */
12
+ const FooterCell = ({ header, ariaRoles }) => {
13
+ const { justifyContent, textAlign } = header.column.columnDef.meta;
14
+ const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({
15
+ column: header.column,
16
+ });
17
+ const footerCellClassname = buildClassnames([
18
+ footerCell,
19
+ pinnedCellClassName,
20
+ 'data-grid-footer-cell',
21
+ ]);
22
+ return (React__default.createElement("th", { scope: "row", role: ariaRoles.cell, "aria-colindex": header.column.getIndex() + 1, className: footerCellClassname, style: pinnedCellStyles },
23
+ React__default.createElement(CellContent, { contentStyle: { justifyContent, textAlign } }, flexRender(header.column.columnDef.footer, header.getContext()))));
24
+ };
25
+
26
+ export { FooterCell };
27
+ //# sourceMappingURL=FooterCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterCell.js","sources":["../../../../../../src/components/DataGrid/components/Footer/FooterCell/FooterCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { flexRender, Header } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { usePinnedColumnStyles } from '../../../hooks/usePinnedColumnStyles';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\n\nimport { footerCell } from './FooterCell.module.css';\n\ntype FooterCellProps = {\n /**\n * The Header within the TanStack Table instance.\n */\n header: Header<any, any>;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n};\n\n/**\n * Renders a footer cell element, and its content, for a given column.\n */\nexport const FooterCell = ({ header, ariaRoles }: FooterCellProps) => {\n const { justifyContent, textAlign } = header.column.columnDef.meta!;\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({\n column: header.column,\n });\n\n const footerCellClassname = buildClassnames([\n footerCell,\n pinnedCellClassName,\n 'data-grid-footer-cell',\n ]);\n\n return (\n <th\n scope=\"row\"\n role={ariaRoles.cell}\n aria-colindex={header.column.getIndex() + 1}\n className={footerCellClassname}\n style={pinnedCellStyles}\n >\n <CellContent contentStyle={{ justifyContent, textAlign } as React.CSSProperties}>\n {flexRender(header.column.columnDef.footer, header.getContext())}\n </CellContent>\n </th>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;AAyBA;;AAEG;AACU,MAAA,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAmB,KAAI;AACnE,IAAA,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK;AAEnE,IAAA,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAG,qBAAqB,CAAC;QACtE,MAAM,EAAE,MAAM,CAAC,MAAM;AACtB,KAAA,CAAC;IAEF,MAAM,mBAAmB,GAAG,eAAe,CAAC;QAC1C,UAAU;QACV,mBAAmB;QACnB,uBAAuB;AACxB,KAAA,CAAC;IAEF,QACEA,cACE,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EACX,IAAI,EAAE,SAAS,CAAC,IAAI,EACL,eAAA,EAAA,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EAC3C,SAAS,EAAE,mBAAmB,EAC9B,KAAK,EAAE,gBAAgB,EAAA;AAEvB,QAAAA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAC,YAAY,EAAE,EAAE,cAAc,EAAE,SAAS,EAAyB,EAAA,EAC5E,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CACpD,CACX;AAET;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const cssContents = `._baseCell_13swz_1{box-sizing:border-box;position:relative;&:focus,&:focus-visible{box-shadow:inset var(--sizes-none) var(--sizes-none) var(--sizes-none) var(--sizes-line) var(--colors-secondary-blue-base);outline:var(--sizes-none)}}._pinnedColumnBase_13swz_12{&:after{bottom:-1px;box-sizing:border-box;content:"";pointer-events:none;position:absolute;top:var(--sizes-none);width:30px}}._pinnedColumnLeft_13swz_27{&:after{box-shadow:inset 10px 0 10px -8px rgba(0,0,0,.25);right:var(--sizes-none);transform:translate(100%)}}._pinnedColumnRight_13swz_39{&:after{box-shadow:inset -10px 0 10px -8px rgba(0,0,0,.25);left:var(--sizes-none);transform:translate(-100%)}}._footerCell_1jfhd_1{background-color:var(--colors-neutral-grey-lightest);border-top:var(--sizes-line) solid var(--colors-secondary-blue-base);color:var(--text-body-small-color);font-family:var(--text-body-small-font-family);font-style:var(--text-body-small-font-style);font-weight:var(--text-body-small-font-weight);line-height:var(--text-body-small-line-height)}
4
+ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIjxubyBzb3VyY2U+IiwiRm9vdGVyQ2VsbC5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG1CQUFBLHNCQUFBLGtCQUFBLHdCQUFBLDJIQUFBLDBCQUFBLENBQUEsNEJBQUEsUUFBQSxZQUFBLHNCQUFBLFdBQUEsb0JBQUEsa0JBQUEsc0JBQUEsV0FBQSxDQUFBLDRCQUFBLFFBQUEsa0RBQUEsd0JBQUEsMEJBQUEsQ0FBQSw2QkFBQSxRQUFBLG1EQUFBLHVCQUFBLDJCQUFBLENBQUEsQUNBQSxxQkFVRSxvREFBcUQsQ0FEckQsb0VBQXFFLENBTnJFLGtDQUFtQyxDQUNuQyw4Q0FBK0MsQ0FDL0MsNENBQTZDLENBQzdDLDhDQUErQyxDQUMvQyw4Q0FJRiIsImZpbGUiOiJGb290ZXJDZWxsLm1vZHVsZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6W251bGwsIi5mb290ZXJDZWxsIHtcbiAgY29tcG9zZXM6IGJhc2VDZWxsIGZyb20gJy4uLy4uLy4uL0RhdGFHcmlkLm1vZHVsZS5jc3MnO1xuXG4gIGNvbG9yOiB2YXIoLS10ZXh0LWJvZHktc21hbGwtY29sb3IpO1xuICBmb250LWZhbWlseTogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtZmFtaWx5KTtcbiAgZm9udC1zdHlsZTogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtc3R5bGUpO1xuICBmb250LXdlaWdodDogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtd2VpZ2h0KTtcbiAgbGluZS1oZWlnaHQ6IHZhcigtLXRleHQtYm9keS1zbWFsbC1saW5lLWhlaWdodCk7XG5cbiAgYm9yZGVyLXRvcDogdmFyKC0tc2l6ZXMtbGluZSkgc29saWQgdmFyKC0tY29sb3JzLXNlY29uZGFyeS1ibHVlLWJhc2UpO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvcnMtbmV1dHJhbC1ncmV5LWxpZ2h0ZXN0KTtcbn1cbiJdfQ== */`;
5
+ const style = document.createElement('style');
6
+ style.innerHTML = cssContents;
7
+ document.head.appendChild(style);
8
+ const footerCell = '_footerCell_1jfhd_1 _baseCell_13swz_1';
9
+
10
+ exports.footerCell = footerCell;
11
+ //# sourceMappingURL=FooterCell.module.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterCell.module.css.cjs","sources":["../../../../../../src/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css"],"sourcesContent":[".footerCell {\n composes: baseCell from '../../../DataGrid.module.css';\n\n color: var(--text-body-small-color);\n font-family: var(--text-body-small-font-family);\n font-style: var(--text-body-small-font-style);\n font-weight: var(--text-body-small-font-weight);\n line-height: var(--text-body-small-line-height);\n\n border-top: var(--sizes-line) solid var(--colors-secondary-blue-base);\n background-color: var(--colors-neutral-grey-lightest);\n}\n"],"names":[],"mappings":";;AACA,MAAM,WAAW,GAAG,CAAC;AACrB,6rCAA6rC,CAAC;AAC9rC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,UAAU,GAAG;;;;"}
@@ -0,0 +1,9 @@
1
+ const cssContents = `._baseCell_13swz_1{box-sizing:border-box;position:relative;&:focus,&:focus-visible{box-shadow:inset var(--sizes-none) var(--sizes-none) var(--sizes-none) var(--sizes-line) var(--colors-secondary-blue-base);outline:var(--sizes-none)}}._pinnedColumnBase_13swz_12{&:after{bottom:-1px;box-sizing:border-box;content:"";pointer-events:none;position:absolute;top:var(--sizes-none);width:30px}}._pinnedColumnLeft_13swz_27{&:after{box-shadow:inset 10px 0 10px -8px rgba(0,0,0,.25);right:var(--sizes-none);transform:translate(100%)}}._pinnedColumnRight_13swz_39{&:after{box-shadow:inset -10px 0 10px -8px rgba(0,0,0,.25);left:var(--sizes-none);transform:translate(-100%)}}._footerCell_1jfhd_1{background-color:var(--colors-neutral-grey-lightest);border-top:var(--sizes-line) solid var(--colors-secondary-blue-base);color:var(--text-body-small-color);font-family:var(--text-body-small-font-family);font-style:var(--text-body-small-font-style);font-weight:var(--text-body-small-font-weight);line-height:var(--text-body-small-line-height)}
2
+ /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIjxubyBzb3VyY2U+IiwiRm9vdGVyQ2VsbC5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG1CQUFBLHNCQUFBLGtCQUFBLHdCQUFBLDJIQUFBLDBCQUFBLENBQUEsNEJBQUEsUUFBQSxZQUFBLHNCQUFBLFdBQUEsb0JBQUEsa0JBQUEsc0JBQUEsV0FBQSxDQUFBLDRCQUFBLFFBQUEsa0RBQUEsd0JBQUEsMEJBQUEsQ0FBQSw2QkFBQSxRQUFBLG1EQUFBLHVCQUFBLDJCQUFBLENBQUEsQUNBQSxxQkFVRSxvREFBcUQsQ0FEckQsb0VBQXFFLENBTnJFLGtDQUFtQyxDQUNuQyw4Q0FBK0MsQ0FDL0MsNENBQTZDLENBQzdDLDhDQUErQyxDQUMvQyw4Q0FJRiIsImZpbGUiOiJGb290ZXJDZWxsLm1vZHVsZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6W251bGwsIi5mb290ZXJDZWxsIHtcbiAgY29tcG9zZXM6IGJhc2VDZWxsIGZyb20gJy4uLy4uLy4uL0RhdGFHcmlkLm1vZHVsZS5jc3MnO1xuXG4gIGNvbG9yOiB2YXIoLS10ZXh0LWJvZHktc21hbGwtY29sb3IpO1xuICBmb250LWZhbWlseTogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtZmFtaWx5KTtcbiAgZm9udC1zdHlsZTogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtc3R5bGUpO1xuICBmb250LXdlaWdodDogdmFyKC0tdGV4dC1ib2R5LXNtYWxsLWZvbnQtd2VpZ2h0KTtcbiAgbGluZS1oZWlnaHQ6IHZhcigtLXRleHQtYm9keS1zbWFsbC1saW5lLWhlaWdodCk7XG5cbiAgYm9yZGVyLXRvcDogdmFyKC0tc2l6ZXMtbGluZSkgc29saWQgdmFyKC0tY29sb3JzLXNlY29uZGFyeS1ibHVlLWJhc2UpO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvcnMtbmV1dHJhbC1ncmV5LWxpZ2h0ZXN0KTtcbn1cbiJdfQ== */`;
3
+ const style = document.createElement('style');
4
+ style.innerHTML = cssContents;
5
+ document.head.appendChild(style);
6
+ const footerCell = '_footerCell_1jfhd_1 _baseCell_13swz_1';
7
+
8
+ export { footerCell };
9
+ //# sourceMappingURL=FooterCell.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterCell.module.css.js","sources":["../../../../../../src/components/DataGrid/components/Footer/FooterCell/FooterCell.module.css"],"sourcesContent":[".footerCell {\n composes: baseCell from '../../../DataGrid.module.css';\n\n color: var(--text-body-small-color);\n font-family: var(--text-body-small-font-family);\n font-style: var(--text-body-small-font-style);\n font-weight: var(--text-body-small-font-weight);\n line-height: var(--text-body-small-line-height);\n\n border-top: var(--sizes-line) solid var(--colors-secondary-blue-base);\n background-color: var(--colors-neutral-grey-lightest);\n}\n"],"names":[],"mappings":"AACA,MAAM,WAAW,GAAG,CAAC;AACrB,6rCAA6rC,CAAC;AAC9rC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,KAAK,CAAC,SAAS,GAAG,WAAW;AAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,MAAC,UAAU,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ export { FooterCell } from './FooterCell';
@@ -0,0 +1 @@
1
+ export { Footer } from './Footer';
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var buildClassnames = require('../../../../../utils/buildClassnames.cjs');
5
+ require('uid/secure');
6
+ var Container_module = require('./Container.module.css.cjs');
7
+
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
+
12
+ const borderModeClassMap = {
13
+ full: Container_module.borderModeFull,
14
+ vertical: Container_module.borderModeVertical,
15
+ none: Container_module.borderModeNone,
16
+ };
17
+ /**
18
+ * A container element, which wraps the grid and applies a border and overflow.
19
+ */
20
+ const Container = React__default.default.forwardRef(({ borderMode, style, children }, ref) => (React__default.default.createElement("div", { ref: ref, className: buildClassnames.buildClassnames([Container_module.container, borderModeClassMap[borderMode]]), style: style }, children)));
21
+
22
+ exports.Container = Container;
23
+ //# sourceMappingURL=Container.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Container.cjs","sources":["../../../../../../src/components/DataGrid/components/GridContainer/Container/Container.tsx"],"sourcesContent":["import React from 'react';\n\nimport { buildClassnames } from '../../../../../utils';\nimport { BorderMode } from '../../../types/enums';\n\nimport {\n container,\n borderModeFull,\n borderModeVertical,\n borderModeNone,\n} from './Container.module.css';\n\ntype ContainerProps = {\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n style?: React.CSSProperties;\n\n /**\n * Child elements.\n */\n children: React.ReactNode;\n};\n\nconst borderModeClassMap = {\n full: borderModeFull,\n vertical: borderModeVertical,\n none: borderModeNone,\n};\n\n/**\n * A container element, which wraps the grid and applies a border and overflow.\n */\nexport const Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ borderMode, style, children }, ref) => (\n <div\n ref={ref}\n className={buildClassnames([container, borderModeClassMap[borderMode]])}\n style={style}\n >\n {children}\n </div>\n ),\n);\n"],"names":["borderModeFull","borderModeVertical","borderModeNone","React","buildClassnames","container"],"mappings":";;;;;;;;;;;AA6BA,MAAM,kBAAkB,GAAG;AACzB,IAAA,IAAI,EAAEA,+BAAc;AACpB,IAAA,QAAQ,EAAEC,mCAAkB;AAC5B,IAAA,IAAI,EAAEC,+BAAc;CACrB;AAED;;AAEG;MACU,SAAS,GAAGC,sBAAK,CAAC,UAAU,CACvC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,GAAG,MACnCA,sBACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EACR,SAAS,EAAEC,+BAAe,CAAC,CAACC,0BAAS,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,EACvE,KAAK,EAAE,KAAK,IAEX,QAAQ,CACL,CACP;;;;"}