eidos-ui 1.2.0 → 2.1.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 (225) hide show
  1. package/dist/Avatar.types-BY-C09Ke.d.cts +23 -0
  2. package/dist/Avatar.types-BY-C09Ke.d.ts +23 -0
  3. package/dist/{Header.types-BZi80bWz.d.cts → Header.types-B3QtuiL-.d.cts} +7 -3
  4. package/dist/{Header.types-DJt-q01P.d.ts → Header.types-C6w0FBY8.d.ts} +7 -3
  5. package/dist/Table.types-CPj-udMc.d.cts +278 -0
  6. package/dist/Table.types-CZZ7QWAI.d.ts +278 -0
  7. package/dist/Toolbar.types-DSk8z2iy.d.cts +38 -0
  8. package/dist/Toolbar.types-RN0klQzu.d.ts +38 -0
  9. package/dist/alert/index.cjs +4 -4
  10. package/dist/alert/index.d.cts +2 -1
  11. package/dist/alert/index.d.ts +2 -1
  12. package/dist/alert/index.js +3 -3
  13. package/dist/avatar/index.d.cts +3 -21
  14. package/dist/avatar/index.d.ts +3 -21
  15. package/dist/button/index.cjs +3 -3
  16. package/dist/button/index.js +2 -2
  17. package/dist/chip/index.cjs +3 -3
  18. package/dist/chip/index.js +2 -2
  19. package/dist/{chunk-KIXFSXIN.cjs → chunk-3E7TKBQI.cjs} +5 -3
  20. package/dist/chunk-3E7TKBQI.cjs.map +1 -0
  21. package/dist/{chunk-ZBKJ3EMK.cjs → chunk-442U3W6R.cjs} +3 -3
  22. package/dist/{chunk-ZBKJ3EMK.cjs.map → chunk-442U3W6R.cjs.map} +1 -1
  23. package/dist/{chunk-YQLCPKGV.js → chunk-5HUZYY54.js} +6 -4
  24. package/dist/chunk-5HUZYY54.js.map +1 -0
  25. package/dist/{chunk-G5IGADJI.cjs → chunk-5VM2256W.cjs} +7 -11
  26. package/dist/chunk-5VM2256W.cjs.map +1 -0
  27. package/dist/{chunk-Z4ZY7L7W.js → chunk-5ZL6PYU3.js} +3 -3
  28. package/dist/{chunk-A3NE2C7C.js → chunk-67RFMV6K.js} +2 -2
  29. package/dist/{chunk-2U7UJOOB.cjs → chunk-6HUHH6Y4.cjs} +17 -15
  30. package/dist/chunk-6HUHH6Y4.cjs.map +1 -0
  31. package/dist/{chunk-5WROPW7Z.js → chunk-A7WQINIG.js} +3 -3
  32. package/dist/{chunk-DKZTDYH5.cjs → chunk-AAA6TR5I.cjs} +3 -3
  33. package/dist/{chunk-DKZTDYH5.cjs.map → chunk-AAA6TR5I.cjs.map} +1 -1
  34. package/dist/{chunk-A7Z2QAFZ.cjs → chunk-APK5OQRV.cjs} +5 -5
  35. package/dist/{chunk-A7Z2QAFZ.cjs.map → chunk-APK5OQRV.cjs.map} +1 -1
  36. package/dist/{chunk-ISABZ2VX.cjs → chunk-AXBYJ2OY.cjs} +9 -9
  37. package/dist/{chunk-ISABZ2VX.cjs.map → chunk-AXBYJ2OY.cjs.map} +1 -1
  38. package/dist/{chunk-6RGJAQCU.cjs → chunk-B5G5XVFJ.cjs} +5 -5
  39. package/dist/{chunk-6RGJAQCU.cjs.map → chunk-B5G5XVFJ.cjs.map} +1 -1
  40. package/dist/{chunk-MW2S7PZ7.cjs → chunk-D5IY2HUV.cjs} +5 -5
  41. package/dist/{chunk-MW2S7PZ7.cjs.map → chunk-D5IY2HUV.cjs.map} +1 -1
  42. package/dist/{chunk-FMPXSF3H.cjs → chunk-DAXZRNNO.cjs} +4 -4
  43. package/dist/{chunk-FMPXSF3H.cjs.map → chunk-DAXZRNNO.cjs.map} +1 -1
  44. package/dist/{chunk-6DBCT5MK.js → chunk-EXITZVB2.js} +24 -9
  45. package/dist/chunk-EXITZVB2.js.map +1 -0
  46. package/dist/{chunk-AYMD4D4M.cjs → chunk-EZME5CLK.cjs} +3 -3
  47. package/dist/{chunk-AYMD4D4M.cjs.map → chunk-EZME5CLK.cjs.map} +1 -1
  48. package/dist/{chunk-IV4LM3MB.js → chunk-F26VIKNF.js} +9 -11
  49. package/dist/chunk-F26VIKNF.js.map +1 -0
  50. package/dist/{chunk-WPTMMOA6.cjs → chunk-G77YR73R.cjs} +10 -13
  51. package/dist/chunk-G77YR73R.cjs.map +1 -0
  52. package/dist/chunk-GEHL4LKK.cjs +32 -0
  53. package/dist/chunk-GEHL4LKK.cjs.map +1 -0
  54. package/dist/chunk-GGSII6Y2.cjs +921 -0
  55. package/dist/chunk-GGSII6Y2.cjs.map +1 -0
  56. package/dist/{chunk-3VRMTWUS.js → chunk-GHQ6SQPI.js} +7 -10
  57. package/dist/chunk-GHQ6SQPI.js.map +1 -0
  58. package/dist/{chunk-56B6RLOE.js → chunk-GI6VJYOS.js} +4 -4
  59. package/dist/{chunk-56B6RLOE.js.map → chunk-GI6VJYOS.js.map} +1 -1
  60. package/dist/{chunk-UGMONQGH.cjs → chunk-GR2PMCVN.cjs} +10 -12
  61. package/dist/chunk-GR2PMCVN.cjs.map +1 -0
  62. package/dist/{chunk-7AHZTHXR.cjs → chunk-GT22EGJP.cjs} +5 -5
  63. package/dist/{chunk-7AHZTHXR.cjs.map → chunk-GT22EGJP.cjs.map} +1 -1
  64. package/dist/{chunk-ALGX5X4N.js → chunk-IFVT5UCY.js} +3 -3
  65. package/dist/{chunk-5CLC3FJO.js → chunk-KBG77JHC.js} +13 -2
  66. package/dist/chunk-KBG77JHC.js.map +1 -0
  67. package/dist/{chunk-HLNKIAE5.cjs → chunk-KJZUYC4X.cjs} +5 -5
  68. package/dist/{chunk-HLNKIAE5.cjs.map → chunk-KJZUYC4X.cjs.map} +1 -1
  69. package/dist/{chunk-4BQM5F76.cjs → chunk-LFWPQYWX.cjs} +3 -3
  70. package/dist/{chunk-4BQM5F76.cjs.map → chunk-LFWPQYWX.cjs.map} +1 -1
  71. package/dist/{chunk-TKLWQWMT.cjs → chunk-LIFUHQH5.cjs} +35 -20
  72. package/dist/chunk-LIFUHQH5.cjs.map +1 -0
  73. package/dist/{chunk-PJC7NZUV.cjs → chunk-LUL6RZ4M.cjs} +3 -3
  74. package/dist/{chunk-PJC7NZUV.cjs.map → chunk-LUL6RZ4M.cjs.map} +1 -1
  75. package/dist/{chunk-4UJ7LG4W.cjs → chunk-N2IGZIEX.cjs} +3 -3
  76. package/dist/{chunk-4UJ7LG4W.cjs.map → chunk-N2IGZIEX.cjs.map} +1 -1
  77. package/dist/{chunk-3LHQUOGP.js → chunk-NGVOXM7P.js} +3 -3
  78. package/dist/{chunk-WTXASLBB.js → chunk-O5WEKLNF.js} +2 -2
  79. package/dist/{chunk-BOB5JJ7F.js → chunk-P7IQY5YH.js} +2 -2
  80. package/dist/{chunk-VZYLJSV5.js → chunk-R4PU2TBM.js} +2 -2
  81. package/dist/{chunk-P2GCAVUZ.js → chunk-RAZRQ57B.js} +2 -2
  82. package/dist/{chunk-K7IFNKMN.js → chunk-REVK7IGN.js} +2 -2
  83. package/dist/{chunk-6U2H26A4.cjs → chunk-RHOT7AEI.cjs} +3 -3
  84. package/dist/{chunk-6U2H26A4.cjs.map → chunk-RHOT7AEI.cjs.map} +1 -1
  85. package/dist/{chunk-P2ZHWFK4.js → chunk-RKA2OJRT.js} +228 -119
  86. package/dist/chunk-RKA2OJRT.js.map +1 -0
  87. package/dist/{chunk-JC4WLVBG.js → chunk-RWOX2NJN.js} +2 -2
  88. package/dist/{chunk-4LM33LDV.js → chunk-S3CT536K.js} +2 -2
  89. package/dist/{chunk-4M3LZLOH.js → chunk-SHYSLWQG.js} +2 -2
  90. package/dist/{chunk-EQEV7GPT.cjs → chunk-SKEWTQJ7.cjs} +5 -5
  91. package/dist/{chunk-EQEV7GPT.cjs.map → chunk-SKEWTQJ7.cjs.map} +1 -1
  92. package/dist/{chunk-6XB3QTHO.cjs → chunk-SKTDGCWJ.cjs} +268 -159
  93. package/dist/chunk-SKTDGCWJ.cjs.map +1 -0
  94. package/dist/{chunk-2BXCIWL7.js → chunk-SN6EWQDJ.js} +3 -3
  95. package/dist/{chunk-DW2YDWGN.js → chunk-TEJIPPZR.js} +2 -2
  96. package/dist/{chunk-OGKD5PLS.cjs → chunk-TRLBYA5G.cjs} +4 -4
  97. package/dist/{chunk-OGKD5PLS.cjs.map → chunk-TRLBYA5G.cjs.map} +1 -1
  98. package/dist/{chunk-WE5FTQGD.js → chunk-VHMOKXUT.js} +3 -7
  99. package/dist/chunk-VHMOKXUT.js.map +1 -0
  100. package/dist/{chunk-S77GR5YQ.cjs → chunk-VHQTDITV.cjs} +3 -3
  101. package/dist/{chunk-S77GR5YQ.cjs.map → chunk-VHQTDITV.cjs.map} +1 -1
  102. package/dist/{chunk-3HMKE2GJ.js → chunk-VSTQEHVZ.js} +6 -4
  103. package/dist/chunk-VSTQEHVZ.js.map +1 -0
  104. package/dist/{chunk-HNUTV3HR.cjs → chunk-WUBQJVB7.cjs} +3 -3
  105. package/dist/{chunk-HNUTV3HR.cjs.map → chunk-WUBQJVB7.cjs.map} +1 -1
  106. package/dist/{chunk-S7TWEVC3.js → chunk-Y53HCLGW.js} +2 -2
  107. package/dist/{chunk-WIE7HDIM.js → chunk-YJXZR7RL.js} +2 -2
  108. package/dist/{chunk-IJYYHBZC.cjs → chunk-Z4SLV6WG.cjs} +3 -3
  109. package/dist/{chunk-IJYYHBZC.cjs.map → chunk-Z4SLV6WG.cjs.map} +1 -1
  110. package/dist/chunk-ZEZK664O.js +921 -0
  111. package/dist/chunk-ZEZK664O.js.map +1 -0
  112. package/dist/{chunk-JMD3P4CY.js → chunk-ZHFPV43D.js} +2 -2
  113. package/dist/combobox/index.cjs +4 -4
  114. package/dist/combobox/index.js +3 -3
  115. package/dist/context-menu/index.cjs +4 -4
  116. package/dist/context-menu/index.js +3 -3
  117. package/dist/data-grid/index.cjs +13 -13
  118. package/dist/data-grid/index.d.cts +169 -51
  119. package/dist/data-grid/index.d.ts +169 -51
  120. package/dist/data-grid/index.js +12 -12
  121. package/dist/date-picker/index.cjs +6 -6
  122. package/dist/date-picker/index.js +5 -5
  123. package/dist/drawer/index.cjs +4 -4
  124. package/dist/drawer/index.d.cts +2 -1
  125. package/dist/drawer/index.d.ts +2 -1
  126. package/dist/drawer/index.js +3 -3
  127. package/dist/empty-state/index.d.cts +2 -2
  128. package/dist/empty-state/index.d.ts +2 -2
  129. package/dist/header/index.cjs +4 -4
  130. package/dist/header/index.d.cts +2 -2
  131. package/dist/header/index.d.ts +2 -2
  132. package/dist/header/index.js +3 -3
  133. package/dist/index.cjs +29 -29
  134. package/dist/index.css +318 -73
  135. package/dist/index.d.cts +6 -5
  136. package/dist/index.d.ts +6 -5
  137. package/dist/index.js +28 -28
  138. package/dist/inline-edit/index.cjs +4 -4
  139. package/dist/inline-edit/index.js +3 -3
  140. package/dist/input/index.cjs +3 -3
  141. package/dist/input/index.js +2 -2
  142. package/dist/menu/index.cjs +3 -3
  143. package/dist/menu/index.js +2 -2
  144. package/dist/modal/index.cjs +4 -4
  145. package/dist/modal/index.d.cts +2 -1
  146. package/dist/modal/index.d.ts +2 -1
  147. package/dist/modal/index.js +3 -3
  148. package/dist/navigation/index.cjs +4 -4
  149. package/dist/navigation/index.js +3 -3
  150. package/dist/page-layout/index.cjs +8 -8
  151. package/dist/page-layout/index.d.cts +3 -2
  152. package/dist/page-layout/index.d.ts +3 -2
  153. package/dist/page-layout/index.js +7 -7
  154. package/dist/pagination/index.cjs +6 -6
  155. package/dist/pagination/index.js +5 -5
  156. package/dist/popover/index.cjs +2 -2
  157. package/dist/popover/index.d.cts +2 -2
  158. package/dist/popover/index.d.ts +2 -2
  159. package/dist/popover/index.js +1 -1
  160. package/dist/segmented-control/index.cjs +3 -3
  161. package/dist/segmented-control/index.js +2 -2
  162. package/dist/select/index.cjs +4 -4
  163. package/dist/select/index.js +3 -3
  164. package/dist/snackbar/index.cjs +4 -4
  165. package/dist/snackbar/index.js +3 -3
  166. package/dist/split-button/index.cjs +4 -4
  167. package/dist/split-button/index.js +3 -3
  168. package/dist/table/index.cjs +11 -11
  169. package/dist/table/index.d.cts +5 -5
  170. package/dist/table/index.d.ts +5 -5
  171. package/dist/table/index.js +10 -10
  172. package/dist/tabs/index.cjs +3 -3
  173. package/dist/tabs/index.js +2 -2
  174. package/dist/tag-input/index.cjs +4 -4
  175. package/dist/tag-input/index.js +3 -3
  176. package/dist/textarea/index.cjs +3 -3
  177. package/dist/textarea/index.js +2 -2
  178. package/dist/toolbar/index.cjs +5 -5
  179. package/dist/toolbar/index.d.cts +3 -2
  180. package/dist/toolbar/index.d.ts +3 -2
  181. package/dist/toolbar/index.js +4 -4
  182. package/package.json +6 -5
  183. package/dist/Table.types-Bv9l7qxd.d.ts +0 -103
  184. package/dist/Table.types-DQ0ReOLj.d.cts +0 -103
  185. package/dist/Toolbar.types-BGD57Uhm.d.ts +0 -22
  186. package/dist/Toolbar.types-tQkLmPIu.d.cts +0 -22
  187. package/dist/chunk-2KO5ZCZC.js +0 -744
  188. package/dist/chunk-2KO5ZCZC.js.map +0 -1
  189. package/dist/chunk-2U7UJOOB.cjs.map +0 -1
  190. package/dist/chunk-3HMKE2GJ.js.map +0 -1
  191. package/dist/chunk-3VRMTWUS.js.map +0 -1
  192. package/dist/chunk-5CLC3FJO.js.map +0 -1
  193. package/dist/chunk-6DBCT5MK.js.map +0 -1
  194. package/dist/chunk-6XB3QTHO.cjs.map +0 -1
  195. package/dist/chunk-G5IGADJI.cjs.map +0 -1
  196. package/dist/chunk-GOR642KK.cjs +0 -21
  197. package/dist/chunk-GOR642KK.cjs.map +0 -1
  198. package/dist/chunk-IV4LM3MB.js.map +0 -1
  199. package/dist/chunk-KIXFSXIN.cjs.map +0 -1
  200. package/dist/chunk-NUK4NT5Q.cjs +0 -744
  201. package/dist/chunk-NUK4NT5Q.cjs.map +0 -1
  202. package/dist/chunk-P2ZHWFK4.js.map +0 -1
  203. package/dist/chunk-TKLWQWMT.cjs.map +0 -1
  204. package/dist/chunk-UGMONQGH.cjs.map +0 -1
  205. package/dist/chunk-WE5FTQGD.js.map +0 -1
  206. package/dist/chunk-WPTMMOA6.cjs.map +0 -1
  207. package/dist/chunk-YQLCPKGV.js.map +0 -1
  208. /package/dist/{chunk-Z4ZY7L7W.js.map → chunk-5ZL6PYU3.js.map} +0 -0
  209. /package/dist/{chunk-A3NE2C7C.js.map → chunk-67RFMV6K.js.map} +0 -0
  210. /package/dist/{chunk-5WROPW7Z.js.map → chunk-A7WQINIG.js.map} +0 -0
  211. /package/dist/{chunk-ALGX5X4N.js.map → chunk-IFVT5UCY.js.map} +0 -0
  212. /package/dist/{chunk-3LHQUOGP.js.map → chunk-NGVOXM7P.js.map} +0 -0
  213. /package/dist/{chunk-WTXASLBB.js.map → chunk-O5WEKLNF.js.map} +0 -0
  214. /package/dist/{chunk-BOB5JJ7F.js.map → chunk-P7IQY5YH.js.map} +0 -0
  215. /package/dist/{chunk-VZYLJSV5.js.map → chunk-R4PU2TBM.js.map} +0 -0
  216. /package/dist/{chunk-P2GCAVUZ.js.map → chunk-RAZRQ57B.js.map} +0 -0
  217. /package/dist/{chunk-K7IFNKMN.js.map → chunk-REVK7IGN.js.map} +0 -0
  218. /package/dist/{chunk-JC4WLVBG.js.map → chunk-RWOX2NJN.js.map} +0 -0
  219. /package/dist/{chunk-4LM33LDV.js.map → chunk-S3CT536K.js.map} +0 -0
  220. /package/dist/{chunk-4M3LZLOH.js.map → chunk-SHYSLWQG.js.map} +0 -0
  221. /package/dist/{chunk-2BXCIWL7.js.map → chunk-SN6EWQDJ.js.map} +0 -0
  222. /package/dist/{chunk-DW2YDWGN.js.map → chunk-TEJIPPZR.js.map} +0 -0
  223. /package/dist/{chunk-S7TWEVC3.js.map → chunk-Y53HCLGW.js.map} +0 -0
  224. /package/dist/{chunk-WIE7HDIM.js.map → chunk-YJXZR7RL.js.map} +0 -0
  225. /package/dist/{chunk-JMD3P4CY.js.map → chunk-ZHFPV43D.js.map} +0 -0
@@ -1,16 +1,18 @@
1
1
  import React__default from 'react';
2
2
  import { I as IconType } from '../renderIcon-C2lEMMzb.cjs';
3
+ import { R as RowKey, e as TableFilters, B as BulkAction } from '../Table.types-CPj-udMc.cjs';
4
+ export { a as BulkActionButton, b as BulkActionSplitButton, c as BulkActionSplitOption } from '../Table.types-CPj-udMc.cjs';
3
5
  import { C as ComboboxOption } from '../Combobox.types-B7ozlnA9.cjs';
4
6
  import { b as MenuItemType } from '../Menu.types-DwcuCZM7.cjs';
5
7
  import { S as SelectOption } from '../Select.types-CAkT2ACt.cjs';
6
8
  import { b as SegmentedOption, S as SegmentedControlColorProps } from '../SegmentedControl.types-Dm4SnwCK.cjs';
7
- import { d as TableFilters, B as BulkAction } from '../Table.types-DQ0ReOLj.cjs';
8
- export { a as BulkActionButton, b as BulkActionSplitButton, c as BulkActionSplitOption } from '../Table.types-DQ0ReOLj.cjs';
9
+ import '../Button.types-DZRCVqyN.cjs';
9
10
  import '../sizes-DM6Rrrgq.cjs';
10
11
  import '../Input.types-DFZNyJGF.cjs';
11
- import '../Button.types-DZRCVqyN.cjs';
12
12
 
13
- type DataGridCellType = 'text' | 'number' | 'select' | 'checkbox' | 'date' | 'readonly' | 'actions';
13
+ type DataGridCellType = 'text' | 'number' | 'select' | 'checkbox' | 'date' | 'readonly' | 'custom' | 'actions';
14
+ /** Cell types that address a row field, i.e. everything but the two escape hatches. */
15
+ type DataGridValueCellType = Exclude<DataGridCellType, 'custom' | 'actions'>;
14
16
  interface DataGridSelectOption {
15
17
  value: string;
16
18
  label: string;
@@ -22,9 +24,15 @@ interface DataGridSelectOption {
22
24
  * field (including ones you don't display), without hunting through column
23
25
  * definitions to find which ones set a filter flag.
24
26
  */
25
- interface DataGridFilterField {
26
- /** Row data key this filter reads/writes. Does not need to match a `columns` entry. */
27
- key: string;
27
+ interface DataGridFilterField<T extends object = Record<string, unknown>> {
28
+ /**
29
+ * Row data key this filter reads/writes. Does not need to match a `columns`
30
+ * entry - the decoupling from `columns` is intact, so filtering an
31
+ * undisplayed field still works. It does have to be a real field of `T`,
32
+ * because the filter evaluates `row[key]`: a name that isn't on the row
33
+ * type used to compile fine and then silently match nothing.
34
+ */
35
+ key: RowKey<T>;
28
36
  label: string;
29
37
  /** Filter UI type. @default 'text' */
30
38
  filterType?: 'text' | 'select' | 'date' | 'boolean';
@@ -40,9 +48,12 @@ interface DataGridFilterField {
40
48
  type DataGridQuickFilterSelectOption = Omit<SelectOption, 'id'>;
41
49
  type DataGridQuickFilterComboboxOption = Omit<ComboboxOption, 'id'>;
42
50
  type DataGridQuickFilterSegmentedOption = SegmentedOption;
43
- interface DataGridQuickFilterBase {
44
- /** Row data key this filter reads/writes. Does not need to match a `columns` entry. */
45
- key: string;
51
+ interface DataGridQuickFilterBase<T extends object = Record<string, unknown>> {
52
+ /**
53
+ * Row data key this filter reads/writes. Does not need to match a `columns`
54
+ * entry, but must be a real field of `T` - the filter evaluates `row[key]`.
55
+ */
56
+ key: RowKey<T>;
46
57
  /**
47
58
  * Short label for the control. The toolbar has no room for a visible field
48
59
  * label, so this is used as the control's placeholder and its accessible
@@ -63,7 +74,7 @@ interface DataGridQuickFilterBase {
63
74
  */
64
75
  defaultValue?: string | string[];
65
76
  }
66
- interface DataGridQuickFilterSelect extends DataGridQuickFilterBase {
77
+ interface DataGridQuickFilterSelect<T extends object = Record<string, unknown>> extends DataGridQuickFilterBase<T> {
67
78
  type: 'select';
68
79
  options: DataGridQuickFilterSelectOption[];
69
80
  /** Select several values at once - writes a `string[]` filter value. @default false */
@@ -73,7 +84,7 @@ interface DataGridQuickFilterSelect extends DataGridQuickFilterBase {
73
84
  /** Defaults to `label`. */
74
85
  placeholder?: string;
75
86
  }
76
- interface DataGridQuickFilterCombobox extends DataGridQuickFilterBase {
87
+ interface DataGridQuickFilterCombobox<T extends object = Record<string, unknown>> extends DataGridQuickFilterBase<T> {
77
88
  type: 'combobox';
78
89
  /** Optional so options can be supplied asynchronously via `onSearch`. */
79
90
  options?: DataGridQuickFilterComboboxOption[];
@@ -87,7 +98,7 @@ interface DataGridQuickFilterCombobox extends DataGridQuickFilterBase {
87
98
  loading?: boolean;
88
99
  loadingText?: string;
89
100
  }
90
- interface DataGridQuickFilterSegmented extends DataGridQuickFilterBase {
101
+ interface DataGridQuickFilterSegmented<T extends object = Record<string, unknown>> extends DataGridQuickFilterBase<T> {
91
102
  type: 'segmented';
92
103
  /**
93
104
  * Rendered after the reset segment, which the grid always prepends - a
@@ -104,7 +115,7 @@ interface DataGridQuickFilterSegmented extends DataGridQuickFilterBase {
104
115
  * `DataGridProps.quickFilters`. Discriminated on `type`, so each control only
105
116
  * accepts the props that actually apply to it.
106
117
  */
107
- type DataGridQuickFilter = DataGridQuickFilterSelect | DataGridQuickFilterCombobox | DataGridQuickFilterSegmented;
118
+ type DataGridQuickFilter<T extends object = Record<string, unknown>> = DataGridQuickFilterSelect<T> | DataGridQuickFilterCombobox<T> | DataGridQuickFilterSegmented<T>;
108
119
  /** A single entry in a `type: 'actions'` column's menu - see `DataGridColumn.actions`. */
109
120
  interface DataGridRowAction<T = Record<string, unknown>> {
110
121
  /** Defaults to `label` if omitted - only needs to be unique within this column's `actions`. */
@@ -118,24 +129,11 @@ interface DataGridRowAction<T = Record<string, unknown>> {
118
129
  /** Renders a separator directly above this item. */
119
130
  divider?: boolean;
120
131
  }
121
- interface DataGridColumn<T = Record<string, unknown>> {
122
- /** Matches the key in the data row object. Unused when `type: 'actions'`, but still required - any placeholder string works. */
123
- key: string;
132
+ /** Members every column variant shares, whether or not it addresses a row field. */
133
+ interface DataGridColumnCommon {
124
134
  header: string;
125
- /** @default 'text' */
126
- type?: DataGridCellType;
127
135
  width?: number | string;
128
136
  minWidth?: number | string;
129
- /** @default true */
130
- editable?: boolean;
131
- /** Show error if cell is left empty */
132
- required?: boolean;
133
- /** For type='select' */
134
- options?: DataGridSelectOption[];
135
- /** Return an error string or `true` if valid */
136
- validate?: (value: unknown) => string | true;
137
- renderCell?: (value: unknown, row: T, rowIndex: number) => React__default.ReactNode;
138
- renderEditor?: (value: unknown, onChange: (v: unknown) => void, row: T) => React__default.ReactNode;
139
137
  /** Enable click-to-sort on this column */
140
138
  sortable?: boolean;
141
139
  /**
@@ -149,6 +147,73 @@ interface DataGridColumn<T = Record<string, unknown>> {
149
147
  align?: 'left' | 'center' | 'right';
150
148
  /** Lock this column to the left or right edge on horizontal scroll */
151
149
  pin?: 'left' | 'right';
150
+ /**
151
+ * Render this column's value as the card's title instead of a label:value
152
+ * field row. Only the first column with `cardHeader` set is used - if
153
+ * several are marked, the rest are silently ignored.
154
+ */
155
+ cardHeader?: boolean;
156
+ /**
157
+ * Render this column's value as the card's subtitle, directly under the
158
+ * `cardHeader` value. Only the first column with `cardSubheader` set is
159
+ * used. Has no effect without a `cardHeader` column also being set.
160
+ */
161
+ cardSubheader?: boolean;
162
+ }
163
+ /**
164
+ * A column bound to the row field named by `key`, which is what makes `value`
165
+ * knowable: every callback below receives `T[K]` rather than `unknown`.
166
+ *
167
+ * Not used directly - `DataGridColumn` distributes this over `keyof T` so each
168
+ * entry in a `columns` array correlates its own `key` with its own value type.
169
+ */
170
+ interface DataGridValueColumn<T extends object, K extends RowKey<T>> extends DataGridColumnCommon {
171
+ /** Matches the key in the data row object. */
172
+ key: K;
173
+ /** @default 'text' */
174
+ type?: DataGridValueCellType;
175
+ /** @default true */
176
+ editable?: boolean;
177
+ /** Show error if cell is left empty */
178
+ required?: boolean;
179
+ /** For type='select' */
180
+ options?: DataGridSelectOption[];
181
+ /** Return an error string or `true` if valid */
182
+ validate?: (value: T[K]) => string | true;
183
+ renderCell?: (value: T[K], row: T, rowIndex: number) => React__default.ReactNode;
184
+ renderEditor?: (value: T[K], onChange: (v: T[K]) => void, row: T) => React__default.ReactNode;
185
+ }
186
+ /**
187
+ * A column that renders from the whole row rather than one field - a computed
188
+ * or composite value (`${row.first} ${row.last}`), a link, a status derived
189
+ * from several fields. `key` is free-form here because nothing reads
190
+ * `row[key]`: it's only an identity for React keys, sorting and `data-col-key`.
191
+ *
192
+ * This is the home for what used to be expressible by pointing `key` at a
193
+ * field that didn't exist. Not editable - there is no single field to write
194
+ * back to - so `editable`, `required`, `validate` and `renderEditor` are all
195
+ * absent by design.
196
+ */
197
+ interface DataGridCustomColumn<T extends object> extends DataGridColumnCommon {
198
+ /** Free-form - must only be unique within `columns`. */
199
+ key: string;
200
+ type: 'custom';
201
+ /**
202
+ * Required: a custom column has no field to fall back to rendering.
203
+ * `value` is always `undefined` and exists only to keep the parameter list
204
+ * aligned with `DataGridValueColumn.renderCell`, so `(_, row) => ...` reads
205
+ * the same on both.
206
+ */
207
+ renderCell: (value: undefined, row: T, rowIndex: number) => React__default.ReactNode;
208
+ }
209
+ /**
210
+ * The row-actions column. Addresses no field, so it needs no `key` at all -
211
+ * previously this had to carry a required placeholder string that nothing read.
212
+ */
213
+ interface DataGridActionsColumn<T extends object> extends DataGridColumnCommon {
214
+ /** Optional, and unused - only ever an identity for React keys. */
215
+ key?: string;
216
+ type: 'actions';
152
217
  /**
153
218
  * The menu items shown for this row. Required for the column to render
154
219
  * anything - a `type: 'actions'` column with no `actions` renders nothing.
@@ -169,24 +234,31 @@ interface DataGridColumn<T = Record<string, unknown>> {
169
234
  * ignored.
170
235
  */
171
236
  renderActions?: (row: T, index: number) => MenuItemType[];
172
- /**
173
- * Render this column's value as the card's title instead of a label:value
174
- * field row. Only the first column with `cardHeader` set is used - if
175
- * several are marked, the rest are silently ignored.
176
- */
177
- cardHeader?: boolean;
178
- /**
179
- * Render this column's value as the card's subtitle, directly under the
180
- * `cardHeader` value. Only the first column with `cardSubheader` set is
181
- * used. Has no effect without a `cardHeader` column also being set.
182
- */
183
- cardSubheader?: boolean;
184
237
  }
185
- interface DataGridProps<T extends Record<string, unknown> = Record<string, unknown>> {
238
+ /**
239
+ * One column definition. A union of three variants, discriminated on `type`:
240
+ *
241
+ * - **value column** (default, `type` omitted or a cell type) - `key` must be a
242
+ * field of `T`, and `renderCell`/`renderEditor`/`validate` receive that
243
+ * field's type instead of `unknown`.
244
+ * - **`type: 'custom'`** - renders from the whole row; `key` is free-form.
245
+ * - **`type: 'actions'`** - the row-actions menu; `key` is optional.
246
+ *
247
+ * The value variant is produced by distributing over `RowKey<T>`, which is
248
+ * what correlates `key` with the value type. Note this keeps a single public
249
+ * type parameter, so no consumer signature changes.
250
+ *
251
+ * With the untyped default `T`, `RowKey<T>` is `string` and `T[K]` is
252
+ * `unknown`, which is byte-identical to the pre-2.0 behaviour.
253
+ */
254
+ type DataGridColumn<T extends object = Record<string, unknown>> = {
255
+ [K in RowKey<T>]: DataGridValueColumn<T, K>;
256
+ }[RowKey<T>] | DataGridCustomColumn<T> | DataGridActionsColumn<T>;
257
+ interface DataGridProps<T extends object = Record<string, unknown>> {
186
258
  columns: DataGridColumn<T>[];
187
259
  data: T[];
188
260
  /** Field name used as React key. @default 'id' */
189
- rowKey?: string;
261
+ rowKey?: RowKey<T>;
190
262
  /** Called after each cell commit with the full updated dataset */
191
263
  onChange?: (data: T[]) => void;
192
264
  /** Returns a blank row object; if omitted, no Add-row button is shown */
@@ -206,11 +278,11 @@ interface DataGridProps<T extends Record<string, unknown> = Record<string, unkno
206
278
  onRowReorder?: (newData: T[]) => void;
207
279
  /** Controlled sort state. When provided, component is in server-side sort mode. */
208
280
  currentSort?: {
209
- key: string;
281
+ key: RowKey<T>;
210
282
  direction: 'asc' | 'desc';
211
283
  };
212
284
  /** Server-side sort callback. When omitted, sorting is handled client-side. */
213
- onSortChange?: (key: string, direction: 'asc' | 'desc') => void;
285
+ onSortChange?: (key: RowKey<T>, direction: 'asc' | 'desc') => void;
214
286
  /** Show the filter button in the toolbar. */
215
287
  showFilters?: boolean;
216
288
  /**
@@ -219,7 +291,7 @@ interface DataGridProps<T extends Record<string, unknown> = Record<string, unkno
219
291
  * (including ones that aren't rendered as a column at all), rather than
220
292
  * columns each carrying their own filter flag.
221
293
  */
222
- filterConfig?: DataGridFilterField[];
294
+ filterConfig?: DataGridFilterField<T>[];
223
295
  /** Controlled filter state (the current values, keyed by `filterConfig[].key`). When provided with onFiltersChange → server-side mode. */
224
296
  filters?: TableFilters;
225
297
  /** Filter change callback. When omitted, filtering is handled client-side. */
@@ -239,7 +311,7 @@ interface DataGridProps<T extends Record<string, unknown> = Record<string, unkno
239
311
  * Hidden while rows are selected - the selection count and bulk actions
240
312
  * occupy the same toolbar zone.
241
313
  */
242
- quickFilters?: DataGridQuickFilter[];
314
+ quickFilters?: DataGridQuickFilter<T>[];
243
315
  showPagination?: boolean;
244
316
  /** @default 10 */
245
317
  pageSize?: number;
@@ -252,7 +324,53 @@ interface DataGridProps<T extends Record<string, unknown> = Record<string, unkno
252
324
  /** Controlled selected row keys. */
253
325
  selectedRows?: string[];
254
326
  defaultSelectedRows?: string[];
327
+ /**
328
+ * Fires with every selected key, plus the row object for each of those keys.
329
+ *
330
+ * `selectedKeys` is authoritative; `selectedRows` is best-effort. The row
331
+ * for each selected key is cached, so a row selected on a previous page
332
+ * still comes back after `data` has moved on (which is what makes selection
333
+ * usable with server-side pagination) - but a key that was selected before
334
+ * the grid ever saw its row (seeded via `defaultSelectedRows`, say) has no
335
+ * row to hand back.
336
+ */
255
337
  onSelectionChange?: (selectedKeys: string[], selectedRows: T[]) => void;
338
+ /**
339
+ * What the select-all control acts on - the header checkbox in table mode,
340
+ * or the toolbar checkbox in card view (where there is no header row):
341
+ *
342
+ * - `'all'` - every row in `data`, across pages.
343
+ * - `'page'` - only the rows currently rendered.
344
+ *
345
+ * Either way it only ever adds to or removes from the rows in its own
346
+ * scope, so a selection made on another page survives.
347
+ *
348
+ * `'all'` can only reach the rows the grid actually holds. Under
349
+ * server-side pagination (`onPageChange` + `totalRows`) that is a single
350
+ * page: the grid cannot know the keys of rows it has never received, so
351
+ * "all" means "all 20 loaded", not "all 1000 matching", and it says so with
352
+ * a dev-only warning. Matches `Table.selectAllScope`.
353
+ *
354
+ * @default 'all'
355
+ */
356
+ selectAllScope?: 'all' | 'page';
357
+ /**
358
+ * Resolves the keys of **every** row matching the current query - the rows
359
+ * the grid cannot see, not just the loaded page. Supplying it adds a
360
+ * "Select all N" action to the toolbar once everything the grid does hold is
361
+ * selected, which is the only way to express "all 1000" when the grid only
362
+ * ever receives 20 of them.
363
+ *
364
+ * Called with no arguments and may be async (the action shows a loading
365
+ * state while it resolves); whatever it returns replaces the selection. It
366
+ * is up to you to apply the current filters/sort when resolving - the grid
367
+ * does not pass them, because in server-side mode you already own that
368
+ * query.
369
+ *
370
+ * Only rendered when the grid can tell it is holding a subset, i.e. when
371
+ * `totalRows` exceeds the number of loaded rows.
372
+ */
373
+ onSelectAllMatching?: () => string[] | Promise<string[]>;
256
374
  bulkActions?: BulkAction<T>[];
257
375
  /**
258
376
  * Renders a chevron column (table mode) / toolbar toggle (card mode) that
@@ -312,14 +430,14 @@ interface DataGridProps<T extends Record<string, unknown> = Record<string, unkno
312
430
  */
313
431
  cardMinWidth?: number;
314
432
  }
315
- type EditingCell = {
433
+ type EditingCell<T extends object = Record<string, unknown>> = {
316
434
  rowIndex: number;
317
- colKey: string;
435
+ colKey: RowKey<T>;
318
436
  } | null;
319
437
 
320
- declare function DataGridInner<T extends Record<string, unknown>>({ columns, data, rowKey, onChange, onRowAdd, editable, loading, emptyText, className, stickyHeader, maxHeight, showRowNumbers, draggableRows, onRowReorder, currentSort, onSortChange, showFilters, filterConfig, filters, onFiltersChange, quickFilters, showPagination, pageSize, pageSizeOptions, totalRows: totalRowsProp, onPageChange, selectable, selectedRows: controlledSelectedRows, defaultSelectedRows, onSelectionChange, bulkActions, expandable, renderExpandedContent, isRowExpandable, expandMultiple, expandedRows: controlledExpandedRows, defaultExpandedRows, onExpandedRowsChange, density, showDensity, hasCardView, cardViewBreakpoint, cardMinWidth, }: DataGridProps<T>): React__default.ReactElement;
438
+ declare function DataGridInner<T extends object>({ columns: columnsProp, data, rowKey, onChange, onRowAdd, editable, loading, emptyText, className, stickyHeader, maxHeight, showRowNumbers, draggableRows, onRowReorder, currentSort, onSortChange, showFilters, filterConfig, filters, onFiltersChange, quickFilters, showPagination, pageSize, pageSizeOptions, totalRows: totalRowsProp, onPageChange, selectable, selectedRows: controlledSelectedRows, defaultSelectedRows, onSelectionChange, selectAllScope, onSelectAllMatching, bulkActions, expandable, renderExpandedContent, isRowExpandable, expandMultiple, expandedRows: controlledExpandedRows, defaultExpandedRows, onExpandedRowsChange, density, showDensity, hasCardView, cardViewBreakpoint, cardMinWidth, }: DataGridProps<T>): React__default.ReactElement;
321
439
  declare const DataGrid: typeof DataGridInner & {
322
440
  displayName: string;
323
441
  };
324
442
 
325
- export { BulkAction, DataGrid, type DataGridCellType, type DataGridColumn, type DataGridFilterField, type DataGridProps, type DataGridQuickFilter, type DataGridQuickFilterCombobox, type DataGridQuickFilterComboboxOption, type DataGridQuickFilterSegmented, type DataGridQuickFilterSegmentedOption, type DataGridQuickFilterSelect, type DataGridQuickFilterSelectOption, type DataGridRowAction, type DataGridSelectOption, type EditingCell };
443
+ export { BulkAction, DataGrid, type DataGridActionsColumn, type DataGridCellType, type DataGridColumn, type DataGridCustomColumn, type DataGridFilterField, type DataGridProps, type DataGridQuickFilter, type DataGridQuickFilterCombobox, type DataGridQuickFilterComboboxOption, type DataGridQuickFilterSegmented, type DataGridQuickFilterSegmentedOption, type DataGridQuickFilterSelect, type DataGridQuickFilterSelectOption, type DataGridRowAction, type DataGridSelectOption, type DataGridValueCellType, type DataGridValueColumn, type EditingCell };