@gears-frontx/ui-kit 0.4.0 → 0.4.2

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 (239) hide show
  1. package/NOTICE +1 -0
  2. package/README.md +2 -1
  3. package/dist/chunks/data-grid.DIkpRRaf.css +1 -0
  4. package/dist/chunks/deep-equal.js +15 -0
  5. package/dist/chunks/deep-equal.js.map +1 -0
  6. package/dist/chunks/messages.js +42 -0
  7. package/dist/chunks/messages.js.map +1 -0
  8. package/dist/chunks/order.D7Jg_Mg8.css +1 -0
  9. package/dist/chunks/page-header.72nfJNkg.css +1 -0
  10. package/dist/chunks/pagination.Cn8tIWMX.css +1 -0
  11. package/dist/chunks/plugins-helpers.js +41 -0
  12. package/dist/chunks/plugins-helpers.js.map +1 -0
  13. package/dist/chunks/segment.js +18 -0
  14. package/dist/chunks/segment.js.map +1 -0
  15. package/dist/chunks/text-search.BeZYac6V.css +1 -0
  16. package/dist/components/data-grid/components/data-grid-content.d.ts +3 -0
  17. package/dist/components/data-grid/components/data-grid-content.d.ts.map +1 -0
  18. package/dist/components/data-grid/components/data-grid-empty-state.d.ts +3 -0
  19. package/dist/components/data-grid/components/data-grid-empty-state.d.ts.map +1 -0
  20. package/dist/components/data-grid/components/data-grid-spinner.d.ts +16 -0
  21. package/dist/components/data-grid/components/data-grid-spinner.d.ts.map +1 -0
  22. package/dist/components/data-grid/components/load-controlled.d.ts +15 -0
  23. package/dist/components/data-grid/components/load-controlled.d.ts.map +1 -0
  24. package/dist/components/data-grid/components/segment.d.ts +15 -0
  25. package/dist/components/data-grid/components/segment.d.ts.map +1 -0
  26. package/dist/components/data-grid/create-data-grid.d.ts +4 -0
  27. package/dist/components/data-grid/create-data-grid.d.ts.map +1 -0
  28. package/dist/components/data-grid/data-grid-types.d.ts +142 -0
  29. package/dist/components/data-grid/data-grid-types.d.ts.map +1 -0
  30. package/dist/components/data-grid/data-grid.d.ts +3 -0
  31. package/dist/components/data-grid/data-grid.d.ts.map +1 -0
  32. package/dist/components/data-grid/messages.d.ts +39 -0
  33. package/dist/components/data-grid/messages.d.ts.map +1 -0
  34. package/dist/components/data-grid/plugins/empty-state/empty-state-plugin.d.ts +5 -0
  35. package/dist/components/data-grid/plugins/empty-state/empty-state-plugin.d.ts.map +1 -0
  36. package/dist/components/data-grid/plugins/empty-state/empty-state-types.d.ts +14 -0
  37. package/dist/components/data-grid/plugins/empty-state/empty-state-types.d.ts.map +1 -0
  38. package/dist/components/data-grid/plugins/empty-state/public.d.ts +3 -0
  39. package/dist/components/data-grid/plugins/empty-state/public.d.ts.map +1 -0
  40. package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts +3 -0
  41. package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts.map +1 -0
  42. package/dist/components/data-grid/plugins/order/components/data-grid-order-header-cell-label.d.ts +8 -0
  43. package/dist/components/data-grid/plugins/order/components/data-grid-order-header-cell-label.d.ts.map +1 -0
  44. package/dist/components/data-grid/plugins/order/components/data-grid-order-icon.d.ts +7 -0
  45. package/dist/components/data-grid/plugins/order/components/data-grid-order-icon.d.ts.map +1 -0
  46. package/dist/components/data-grid/plugins/order/order-plugin.d.ts +4 -0
  47. package/dist/components/data-grid/plugins/order/order-plugin.d.ts.map +1 -0
  48. package/dist/components/data-grid/plugins/order/order-types.d.ts +66 -0
  49. package/dist/components/data-grid/plugins/order/order-types.d.ts.map +1 -0
  50. package/dist/components/data-grid/plugins/order/public.d.ts +5 -0
  51. package/dist/components/data-grid/plugins/order/public.d.ts.map +1 -0
  52. package/dist/components/data-grid/plugins/order/services/order-labels.d.ts +8 -0
  53. package/dist/components/data-grid/plugins/order/services/order-labels.d.ts.map +1 -0
  54. package/dist/components/data-grid/plugins/order/services/order-option.d.ts +3 -0
  55. package/dist/components/data-grid/plugins/order/services/order-option.d.ts.map +1 -0
  56. package/dist/components/data-grid/plugins/pagination/components/data-grid-pagination.d.ts +3 -0
  57. package/dist/components/data-grid/plugins/pagination/components/data-grid-pagination.d.ts.map +1 -0
  58. package/dist/components/data-grid/plugins/pagination/components/pager.d.ts +22 -0
  59. package/dist/components/data-grid/plugins/pagination/components/pager.d.ts.map +1 -0
  60. package/dist/components/data-grid/plugins/pagination/pagination-plugin.d.ts +31 -0
  61. package/dist/components/data-grid/plugins/pagination/pagination-plugin.d.ts.map +1 -0
  62. package/dist/components/data-grid/plugins/pagination/public.d.ts +3 -0
  63. package/dist/components/data-grid/plugins/pagination/public.d.ts.map +1 -0
  64. package/dist/components/data-grid/plugins/pagination/services/pagination-items.d.ts +14 -0
  65. package/dist/components/data-grid/plugins/pagination/services/pagination-items.d.ts.map +1 -0
  66. package/dist/components/data-grid/plugins/text-search/components/data-grid-text-search.d.ts +3 -0
  67. package/dist/components/data-grid/plugins/text-search/components/data-grid-text-search.d.ts.map +1 -0
  68. package/dist/components/data-grid/plugins/text-search/public.d.ts +3 -0
  69. package/dist/components/data-grid/plugins/text-search/public.d.ts.map +1 -0
  70. package/dist/components/data-grid/plugins/text-search/text-search-plugin.d.ts +38 -0
  71. package/dist/components/data-grid/plugins/text-search/text-search-plugin.d.ts.map +1 -0
  72. package/dist/components/data-grid/public.d.ts +12 -0
  73. package/dist/components/data-grid/public.d.ts.map +1 -0
  74. package/dist/components/data-grid/services/columns/create-column-auto-size.d.ts +7 -0
  75. package/dist/components/data-grid/services/columns/create-column-auto-size.d.ts.map +1 -0
  76. package/dist/components/data-grid/services/core/core-service.d.ts +3 -0
  77. package/dist/components/data-grid/services/core/core-service.d.ts.map +1 -0
  78. package/dist/components/data-grid/services/core/core-types.d.ts +28 -0
  79. package/dist/components/data-grid/services/core/core-types.d.ts.map +1 -0
  80. package/dist/components/data-grid/services/core/data-grid-context.d.ts +17 -0
  81. package/dist/components/data-grid/services/core/data-grid-context.d.ts.map +1 -0
  82. package/dist/components/data-grid/services/hooked/hooked-types.d.ts +34 -0
  83. package/dist/components/data-grid/services/hooked/hooked-types.d.ts.map +1 -0
  84. package/dist/components/data-grid/services/hooked/hooked.d.ts +4 -0
  85. package/dist/components/data-grid/services/hooked/hooked.d.ts.map +1 -0
  86. package/dist/components/data-grid/services/internal/internal-helpers.d.ts +2 -0
  87. package/dist/components/data-grid/services/internal/internal-helpers.d.ts.map +1 -0
  88. package/dist/components/data-grid/services/layout/components/data-grid-layout-content.d.ts +7 -0
  89. package/dist/components/data-grid/services/layout/components/data-grid-layout-content.d.ts.map +1 -0
  90. package/dist/components/data-grid/services/layout/components/data-grid-layout-main-slot-selector.d.ts +4 -0
  91. package/dist/components/data-grid/services/layout/components/data-grid-layout-main-slot-selector.d.ts.map +1 -0
  92. package/dist/components/data-grid/services/layout/components/data-grid-layout-main.d.ts +3 -0
  93. package/dist/components/data-grid/services/layout/components/data-grid-layout-main.d.ts.map +1 -0
  94. package/dist/components/data-grid/services/layout/components/data-grid-layout-slot.d.ts +7 -0
  95. package/dist/components/data-grid/services/layout/components/data-grid-layout-slot.d.ts.map +1 -0
  96. package/dist/components/data-grid/services/layout/components/data-grid-layout-top-default.d.ts +3 -0
  97. package/dist/components/data-grid/services/layout/components/data-grid-layout-top-default.d.ts.map +1 -0
  98. package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts +3 -0
  99. package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -0
  100. package/dist/components/data-grid/services/layout/data-grid-view.d.ts +16 -0
  101. package/dist/components/data-grid/services/layout/data-grid-view.d.ts.map +1 -0
  102. package/dist/components/data-grid/services/layout/layout-service.d.ts +4 -0
  103. package/dist/components/data-grid/services/layout/layout-service.d.ts.map +1 -0
  104. package/dist/components/data-grid/services/layout/layout-slot-ids.d.ts +3 -0
  105. package/dist/components/data-grid/services/layout/layout-slot-ids.d.ts.map +1 -0
  106. package/dist/components/data-grid/services/layout/layout-types.d.ts +74 -0
  107. package/dist/components/data-grid/services/layout/layout-types.d.ts.map +1 -0
  108. package/dist/components/data-grid/services/load/load-instance.d.ts +4 -0
  109. package/dist/components/data-grid/services/load/load-instance.d.ts.map +1 -0
  110. package/dist/components/data-grid/services/load/load-service.d.ts +4 -0
  111. package/dist/components/data-grid/services/load/load-service.d.ts.map +1 -0
  112. package/dist/components/data-grid/services/load/load-types.d.ts +76 -0
  113. package/dist/components/data-grid/services/load/load-types.d.ts.map +1 -0
  114. package/dist/components/data-grid/services/load/use-data-grid-loading.d.ts +16 -0
  115. package/dist/components/data-grid/services/load/use-data-grid-loading.d.ts.map +1 -0
  116. package/dist/components/data-grid/services/persistent-state/persistent-state-service.d.ts +4 -0
  117. package/dist/components/data-grid/services/persistent-state/persistent-state-service.d.ts.map +1 -0
  118. package/dist/components/data-grid/services/persistent-state/persistent-state-types.d.ts +36 -0
  119. package/dist/components/data-grid/services/persistent-state/persistent-state-types.d.ts.map +1 -0
  120. package/dist/components/data-grid/services/plugins/plugins-helpers.d.ts +49 -0
  121. package/dist/components/data-grid/services/plugins/plugins-helpers.d.ts.map +1 -0
  122. package/dist/components/data-grid/services/plugins/plugins-service.d.ts +4 -0
  123. package/dist/components/data-grid/services/plugins/plugins-service.d.ts.map +1 -0
  124. package/dist/components/data-grid/services/plugins/plugins-types.d.ts +62 -0
  125. package/dist/components/data-grid/services/plugins/plugins-types.d.ts.map +1 -0
  126. package/dist/components/data-grid/services/storage/storage-helpers.d.ts +4 -0
  127. package/dist/components/data-grid/services/storage/storage-helpers.d.ts.map +1 -0
  128. package/dist/components/data-grid/services/storage/storage-service.d.ts +4 -0
  129. package/dist/components/data-grid/services/storage/storage-service.d.ts.map +1 -0
  130. package/dist/components/data-grid/services/storage/storage-types.d.ts +93 -0
  131. package/dist/components/data-grid/services/storage/storage-types.d.ts.map +1 -0
  132. package/dist/components/data-grid/services/table/components/data-grid-body-cell-content.d.ts +9 -0
  133. package/dist/components/data-grid/services/table/components/data-grid-body-cell-content.d.ts.map +1 -0
  134. package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts +57 -0
  135. package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -0
  136. package/dist/components/data-grid/services/table/components/data-grid-content.d.ts +7 -0
  137. package/dist/components/data-grid/services/table/components/data-grid-content.d.ts.map +1 -0
  138. package/dist/components/data-grid/services/table/components/data-grid-extra-body-columns.d.ts +8 -0
  139. package/dist/components/data-grid/services/table/components/data-grid-extra-body-columns.d.ts.map +1 -0
  140. package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts +12 -0
  141. package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -0
  142. package/dist/components/data-grid/services/table/components/data-grid-extra-header-columns.d.ts +10 -0
  143. package/dist/components/data-grid/services/table/components/data-grid-extra-header-columns.d.ts.map +1 -0
  144. package/dist/components/data-grid/services/table/components/data-grid-header-cell-content.d.ts +7 -0
  145. package/dist/components/data-grid/services/table/components/data-grid-header-cell-content.d.ts.map +1 -0
  146. package/dist/components/data-grid/services/table/components/data-grid-header-cell-label.d.ts +8 -0
  147. package/dist/components/data-grid/services/table/components/data-grid-header-cell-label.d.ts.map +1 -0
  148. package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts +11 -0
  149. package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -0
  150. package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts +10 -0
  151. package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -0
  152. package/dist/components/data-grid/services/table/components/data-grid-row.d.ts +8 -0
  153. package/dist/components/data-grid/services/table/components/data-grid-row.d.ts.map +1 -0
  154. package/dist/components/data-grid/services/table/components/data-grid-table-body.d.ts +3 -0
  155. package/dist/components/data-grid/services/table/components/data-grid-table-body.d.ts.map +1 -0
  156. package/dist/components/data-grid/services/table/components/data-grid-table-header.d.ts +3 -0
  157. package/dist/components/data-grid/services/table/components/data-grid-table-header.d.ts.map +1 -0
  158. package/dist/components/data-grid/services/table/components/data-grid-table-record.d.ts +8 -0
  159. package/dist/components/data-grid/services/table/components/data-grid-table-record.d.ts.map +1 -0
  160. package/dist/components/data-grid/services/table/components/data-grid-table-records.d.ts +8 -0
  161. package/dist/components/data-grid/services/table/components/data-grid-table-records.d.ts.map +1 -0
  162. package/dist/components/data-grid/services/table/components/data-grid-table-slot.d.ts +7 -0
  163. package/dist/components/data-grid/services/table/components/data-grid-table-slot.d.ts.map +1 -0
  164. package/dist/components/data-grid/services/table/components/data-grid-table.d.ts +3 -0
  165. package/dist/components/data-grid/services/table/components/data-grid-table.d.ts.map +1 -0
  166. package/dist/components/data-grid/services/table/data-grid-record-context.d.ts +5 -0
  167. package/dist/components/data-grid/services/table/data-grid-record-context.d.ts.map +1 -0
  168. package/dist/components/data-grid/services/table/ignore-row-click.d.ts +2 -0
  169. package/dist/components/data-grid/services/table/ignore-row-click.d.ts.map +1 -0
  170. package/dist/components/data-grid/services/table/resolve-body-cell-props.d.ts +21 -0
  171. package/dist/components/data-grid/services/table/resolve-body-cell-props.d.ts.map +1 -0
  172. package/dist/components/data-grid/services/table/resolve-column-style.d.ts +62 -0
  173. package/dist/components/data-grid/services/table/resolve-column-style.d.ts.map +1 -0
  174. package/dist/components/data-grid/services/table/table-columns-persistence.d.ts +19 -0
  175. package/dist/components/data-grid/services/table/table-columns-persistence.d.ts.map +1 -0
  176. package/dist/components/data-grid/services/table/table-columns.d.ts +15 -0
  177. package/dist/components/data-grid/services/table/table-columns.d.ts.map +1 -0
  178. package/dist/components/data-grid/services/table/table-context.d.ts +4 -0
  179. package/dist/components/data-grid/services/table/table-context.d.ts.map +1 -0
  180. package/dist/components/data-grid/services/table/table-extra-columns.d.ts +12 -0
  181. package/dist/components/data-grid/services/table/table-extra-columns.d.ts.map +1 -0
  182. package/dist/components/data-grid/services/table/table-header.d.ts +11 -0
  183. package/dist/components/data-grid/services/table/table-header.d.ts.map +1 -0
  184. package/dist/components/data-grid/services/table/table-helpers.d.ts +13 -0
  185. package/dist/components/data-grid/services/table/table-helpers.d.ts.map +1 -0
  186. package/dist/components/data-grid/services/table/table-min-content-width.d.ts +36 -0
  187. package/dist/components/data-grid/services/table/table-min-content-width.d.ts.map +1 -0
  188. package/dist/components/data-grid/services/table/table-service.d.ts +4 -0
  189. package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -0
  190. package/dist/components/data-grid/services/table/table-slots.d.ts +9 -0
  191. package/dist/components/data-grid/services/table/table-slots.d.ts.map +1 -0
  192. package/dist/components/data-grid/services/table/table-sticky.d.ts +35 -0
  193. package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -0
  194. package/dist/components/data-grid/services/table/table-store.d.ts +4 -0
  195. package/dist/components/data-grid/services/table/table-store.d.ts.map +1 -0
  196. package/dist/components/data-grid/services/table/table-types.d.ts +239 -0
  197. package/dist/components/data-grid/services/table/table-types.d.ts.map +1 -0
  198. package/dist/components/data-grid/utils/debounce.d.ts +7 -0
  199. package/dist/components/data-grid/utils/debounce.d.ts.map +1 -0
  200. package/dist/components/data-grid/utils/deep-equal.d.ts +7 -0
  201. package/dist/components/data-grid/utils/deep-equal.d.ts.map +1 -0
  202. package/dist/components/data-grid/utils/hooked.d.ts +17 -0
  203. package/dist/components/data-grid/utils/hooked.d.ts.map +1 -0
  204. package/dist/components/data-grid/utils/is-record.d.ts +3 -0
  205. package/dist/components/data-grid/utils/is-record.d.ts.map +1 -0
  206. package/dist/components/data-grid/utils/load-state.d.ts +22 -0
  207. package/dist/components/data-grid/utils/load-state.d.ts.map +1 -0
  208. package/dist/components/data-grid/utils/use-latest.d.ts +4 -0
  209. package/dist/components/data-grid/utils/use-latest.d.ts.map +1 -0
  210. package/dist/components/page-header/page-header.d.ts +50 -0
  211. package/dist/components/page-header/page-header.d.ts.map +1 -0
  212. package/dist/components/page-header/public.d.ts +2 -0
  213. package/dist/components/page-header/public.d.ts.map +1 -0
  214. package/dist/data-grid/empty-state.d.ts +1 -0
  215. package/dist/data-grid/empty-state.js +27 -0
  216. package/dist/data-grid/empty-state.js.map +1 -0
  217. package/dist/data-grid/order.d.ts +1 -0
  218. package/dist/data-grid/order.js +254 -0
  219. package/dist/data-grid/order.js.map +1 -0
  220. package/dist/data-grid/pagination.d.ts +1 -0
  221. package/dist/data-grid/pagination.js +215 -0
  222. package/dist/data-grid/pagination.js.map +1 -0
  223. package/dist/data-grid/text-search.d.ts +1 -0
  224. package/dist/data-grid/text-search.js +112 -0
  225. package/dist/data-grid/text-search.js.map +1 -0
  226. package/dist/data-grid.d.ts +1 -0
  227. package/dist/data-grid.js +1650 -0
  228. package/dist/data-grid.js.map +1 -0
  229. package/dist/docs/data-grid.md +588 -0
  230. package/dist/docs/page-header.md +266 -0
  231. package/dist/index.d.ts +6 -0
  232. package/dist/index.d.ts.map +1 -1
  233. package/dist/index.js +408 -381
  234. package/dist/index.js.map +1 -1
  235. package/dist/page-header.d.ts +1 -0
  236. package/dist/page-header.js +88 -0
  237. package/dist/page-header.js.map +1 -0
  238. package/llms.txt +21 -3
  239. package/package.json +4 -2
@@ -0,0 +1,239 @@
1
+ import { ComponentType, ReactNode } from 'react';
2
+ import { DataGridItem } from '../../data-grid-types';
3
+ export declare const TableLayouts: readonly ["fixed", "auto"];
4
+ export type DataGridTableLayout = (typeof TableLayouts)[number];
5
+ export declare const TableColumnOverflows: readonly ["wrap", "nowrap"];
6
+ export type DataGridTableColumnOverflow = (typeof TableColumnOverflows)[number];
7
+ export interface DataGridTableColumn<TItem extends DataGridItem = DataGridItem> {
8
+ id: string;
9
+ key?: string;
10
+ label: string | (() => string);
11
+ type?: 'string' | 'number' | 'date';
12
+ /**
13
+ * Column width. Under `tableLayout="fixed"` (default) this is the column's shared track — a
14
+ * proportional weight when every column has a `width`, an exact size when some columns are
15
+ * widthless. Under `tableLayout="auto"` it is a preferred size that also acts as a floor unless
16
+ * `minWidth` is set. A `%` string maps to `inline-size`; any other value maps to `width` +
17
+ * `min-inline-size`.
18
+ *
19
+ * `'min-content'` is a first-class value: it sizes the column to its own header content, in
20
+ * both layout modes -- the literal CSS keyword isn't honored by either table-layout algorithm
21
+ * as a sizing hint on its own, so `DataGridHeaderCell` measures the header cell's content and
22
+ * applies the result as a pixel width instead (the column's size under `auto`, its shared track
23
+ * under `fixed`). See `resolveColumnStyle`. For choosing a width strategy per column, see the
24
+ * decision guide in `data-grid.md` ("Choosing column widths").
25
+ */
26
+ width?: number | 'min-content' | (string & {});
27
+ /**
28
+ * Minimum column width in px. Under `tableLayout="auto"` this is an independent floor. Under
29
+ * `tableLayout="fixed"` the three width props collapse to a single track: a lone `minWidth`
30
+ * (no `width`, no `maxWidth`) aliases to the track, while combining it with `width` triggers a
31
+ * DEV-only console warning and `width` wins, since fixed layout cannot honor both.
32
+ */
33
+ minWidth?: number;
34
+ /**
35
+ * Maximum column width in px, enforced via a content-cap wrapper. Under `tableLayout="auto"`
36
+ * this is a real, independent cap. Under `tableLayout="fixed"` the three width props collapse
37
+ * to a single track: a lone `maxWidth` (no `width`, no `minWidth`) aliases to the track, while
38
+ * combining it with `width` triggers a DEV-only console warning and `width` wins, since fixed
39
+ * layout cannot honor both.
40
+ */
41
+ maxWidth?: number;
42
+ visible?: boolean;
43
+ sticky?: boolean;
44
+ visibleToggleDisabled?: boolean;
45
+ formatter?: (value: unknown) => string;
46
+ /**
47
+ * Header-only overflow handling. Default `'nowrap'` — the label stays on one line and clips
48
+ * with an ellipsis ("…") on overflow, auto-setting `title` with the full label for the default
49
+ * label renderer; when `headerComponent` is set the kit cannot supply that fallback and the
50
+ * consumer is responsible for it. `'wrap'` lets the label wrap across lines instead.
51
+ */
52
+ headerOverflow?: DataGridTableColumnOverflow;
53
+ /**
54
+ * Body-cell overflow handling. Default `'wrap'`: the value wraps across lines. `'nowrap'` keeps the value on one line and clips it with an ellipsis ("…") on
55
+ * overflow, auto-setting `title` with the formatted value for the default value renderer; when
56
+ * `component` or `render` is set the kit cannot supply that fallback and the consumer is
57
+ * responsible for it.
58
+ */
59
+ cellOverflow?: DataGridTableColumnOverflow;
60
+ /**
61
+ * @deprecated Use `headerOverflow: 'nowrap'` instead. Normalized to `headerOverflow` at
62
+ * column ingestion and kept working for one release with a dev-only deprecation warning.
63
+ */
64
+ headerTruncate?: boolean;
65
+ component?: ComponentType<{
66
+ item: TItem;
67
+ column: DataGridTableColumn<TItem>;
68
+ value: unknown;
69
+ }>;
70
+ headerComponent?: ComponentType<{
71
+ column: DataGridTableColumn<TItem>;
72
+ }>;
73
+ render?: ((item: TItem) => ReactNode) | ReactNode;
74
+ getClassName?: (item: TItem) => string | undefined;
75
+ groupId?: string;
76
+ }
77
+ export interface DataGridTableGroup<TItem extends DataGridItem = DataGridItem> {
78
+ id: string;
79
+ label: string | (() => string);
80
+ columns: DataGridTableColumn<TItem>[];
81
+ component?: ComponentType<{
82
+ group: DataGridTableGroup<TItem>;
83
+ }>;
84
+ visible?: boolean;
85
+ sticky?: boolean;
86
+ }
87
+ export declare function isTableGroup<TItem extends DataGridItem>(item: DataGridTableColumn<TItem> | DataGridTableGroup<TItem>): item is DataGridTableGroup<TItem>;
88
+ export type TableSlotName = 'subheader' | 'footer' | 'header-cell-end';
89
+ export interface TableSlot {
90
+ id: string;
91
+ name: TableSlotName;
92
+ component: ComponentType<any>;
93
+ order: number;
94
+ }
95
+ export interface TableSlotOption {
96
+ component: ComponentType<any>;
97
+ order?: number;
98
+ }
99
+ export interface TableSlotOptions {
100
+ subheader: TableSlotOption;
101
+ footer: TableSlotOption;
102
+ 'header-cell-end': TableSlotOption;
103
+ }
104
+ export type ExtraColumnPosition = 'start' | 'end';
105
+ export interface ExtraColumn {
106
+ id: string;
107
+ header?: ComponentType;
108
+ body?: ComponentType;
109
+ position: ExtraColumnPosition;
110
+ order: number;
111
+ /**
112
+ * Any CSS length, applied as the column's width. A pinned `end` column's contribution to the
113
+ * offsets of the columns pinned inside it is read from this only while the header has not been
114
+ * measured yet, and only when the value is a plain px length -- anything else contributes `0`
115
+ * until the measurement lands.
116
+ */
117
+ width?: string;
118
+ /**
119
+ * Pins the column to the table's inline-end edge, so it stays reachable while the rows scroll
120
+ * sideways. Read only for `end` columns; a `start` extra column is not pinned by it, and is not
121
+ * pinned by the table's own sticky columns either -- it only offsets them. Setting it on a
122
+ * `start` column logs a DEV-only warning. Defaults to unpinned.
123
+ */
124
+ sticky?: boolean;
125
+ /**
126
+ * When `true`, the rendered header and body cells for this column carry
127
+ * `data-grid-row-ignore-click`, so a plugin that reacts to row clicks can skip clicks
128
+ * anywhere in the cell (including its padding, not just the inner content).
129
+ */
130
+ ignoreRowClick?: boolean;
131
+ }
132
+ export type ExtraColumnOption = Partial<ExtraColumn>;
133
+ export type TableComponentName = 'row' | 'header-cell' | 'header-cell-label' | 'header-group' | 'body-cell-content' | 'content';
134
+ /**
135
+ * How the registry stores a component registered under a `TableComponentName`. Each name takes its
136
+ * own props, so the registry holds them as taking none it could name: every function component
137
+ * (a `memo`, `forwardRef` or `lazy` one too) is assignable to `ComponentType<never>`, and
138
+ * `useComponent` hands one back as the props its caller renders. A class component is not: its
139
+ * instance carries its props (`this.props`), which `never` cannot hold. So this is the stored
140
+ * form only; the public `registerComponent` still takes `ComponentType<any>` and asserts a class
141
+ * component into it.
142
+ */
143
+ export type RegisteredTableComponent = ComponentType<never>;
144
+ export interface TableHeaderCell<TItem extends DataGridItem = DataGridItem> {
145
+ type: 'group' | 'column';
146
+ item: DataGridTableGroup<TItem> | DataGridTableColumn<TItem>;
147
+ component: RegisteredTableComponent;
148
+ colspan?: number;
149
+ rowspan?: number;
150
+ }
151
+ export interface TableStore<TItem extends DataGridItem = DataGridItem> {
152
+ columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];
153
+ flatColumns: DataGridTableColumn<TItem>[];
154
+ columnVisibility: Map<string, boolean>;
155
+ columnSticky: Map<string, boolean>;
156
+ groupSticky: Map<string, boolean>;
157
+ columnWidths: Map<string, number>;
158
+ /**
159
+ * Measured pixel width of `tableLayout="auto"` columns with `width: 'min-content'` -- see
160
+ * `table-min-content-width.ts`. Kept separate from `columnWidths` above: that one is read-only
161
+ * telemetry off a cell's already-rendered width (for sticky-offset math) and never feeds back
162
+ * into that cell's own size, so it never needs a dedup guard. This one directly drives the
163
+ * column's own CSS width, so it must dedupe writes to avoid a measure -> apply -> relayout ->
164
+ * re-measure loop.
165
+ */
166
+ minContentWidths: Map<string, number>;
167
+ extraColumnsStart: ExtraColumn[];
168
+ extraColumnsEnd: ExtraColumn[];
169
+ slots: Map<TableSlotName, TableSlot[]>;
170
+ components: Map<TableComponentName, RegisteredTableComponent>;
171
+ tableLayout: DataGridTableLayout;
172
+ /** Mirrors `DataGrid`'s `stickyHeader` prop; read by the header renderers. */
173
+ stickyHeader: boolean;
174
+ }
175
+ export interface ConfigurationColumn {
176
+ id: string;
177
+ label: string;
178
+ visible: boolean;
179
+ sticky: boolean;
180
+ visibleToggleDisabled: boolean;
181
+ }
182
+ export interface ConfigurationGroup {
183
+ id: string;
184
+ label: string;
185
+ visible: boolean;
186
+ sticky: boolean;
187
+ columns: ConfigurationColumn[];
188
+ }
189
+ export type ConfigurationEntry = ConfigurationColumn | ConfigurationGroup;
190
+ export declare function isConfigurationGroup(entry: ConfigurationEntry): entry is ConfigurationGroup;
191
+ export interface TablePublicApi<TItem extends DataGridItem = DataGridItem> {
192
+ registerTableSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;
193
+ registerExtraColumn: (options: ExtraColumnOption) => void;
194
+ updateExtraColumnWidth: (columnId: string, width: string) => void;
195
+ updateExtraColumnOrder: (columnId: string, order: number) => void;
196
+ updateExtraColumnSticky: (columnId: string, sticky: boolean) => void;
197
+ registerComponent: (name: TableComponentName, component: ComponentType<any>) => void;
198
+ updateColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => void;
199
+ updateColumnVisibility: (columnId: string, visible: boolean) => void;
200
+ updateColumnSticky: (id: string, sticky: boolean) => void;
201
+ updateTableLayout: (tableLayout: DataGridTableLayout) => void;
202
+ updateStickyHeader: (stickyHeader: boolean) => void;
203
+ }
204
+ export interface TableService<TItem extends DataGridItem = DataGridItem> extends TablePublicApi<TItem> {
205
+ registerSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;
206
+ useSlots: <T extends TableSlotName>(name: T) => TableSlot[];
207
+ useComponent: <TProps = unknown>(name: TableComponentName) => ComponentType<TProps>;
208
+ useExtraColumns: (position: ExtraColumnPosition) => ExtraColumn[];
209
+ initializeColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {
210
+ columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];
211
+ flatColumns: DataGridTableColumn<TItem>[];
212
+ columnVisibility: Map<string, boolean>;
213
+ };
214
+ useVisibleColumns: () => DataGridTableColumn<TItem>[];
215
+ initializeStickyState: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {
216
+ columnSticky: Map<string, boolean>;
217
+ groupSticky: Map<string, boolean>;
218
+ };
219
+ getOrderedColumnsWithSticky: (visibleColumns: DataGridTableColumn<TItem>[], columnSticky: Map<string, boolean>) => DataGridTableColumn<TItem>[];
220
+ onResizeColumn: (columnId: string, width: number) => void;
221
+ isColumnSticky: (columnId: string) => boolean;
222
+ isGroupSticky: (groupId: string) => boolean;
223
+ useColumnStickyOffset: (columnId: string) => number | undefined;
224
+ useColumnEndStickyOffset: (columnId: string) => number | undefined;
225
+ useGroupStickyOffset: (groupId: string) => number | undefined;
226
+ useHasGroups: () => boolean;
227
+ useFirstRowHeaderCells: () => TableHeaderCell<TItem>[];
228
+ useSecondRowHeaderColumns: () => DataGridTableColumn<TItem>[];
229
+ useConfigurationColumns: () => ConfigurationEntry[];
230
+ useTableLayout: () => DataGridTableLayout;
231
+ useStickyHeader: () => boolean;
232
+ /**
233
+ * Measured pixel width for a `tableLayout="auto"` column with `width: 'min-content'` -- see
234
+ * `table-min-content-width.ts` and `DataGridHeaderCell`'s measurement effect.
235
+ */
236
+ useMinContentWidth: (columnId: string) => number | undefined;
237
+ setMinContentWidth: (columnId: string, width: number) => void;
238
+ }
239
+ //# sourceMappingURL=table-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/table/table-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,YAAY,4BAA6B,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,oBAAoB,6BAA8B,CAAC;AAChE,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,MAAM,WAAW,mBAAmB,CAAC,KAAK,SAAS,YAAY,GAAG,YAAY;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;IACvC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;;OAGG;IACH,cAA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AC,EAAE,EAC5C,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;IAClC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAChE,wBAAwB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACnE,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAE9D,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,sBAAsB,EAAE,MAAM,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IACvD,yBAAyB,EAAE,MAAM,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;IAE9D,uBAAuB,EAAE,MAAM,kBAAkB,EAAE,CAAC;IACpD,cAAc,EAAE,MAAM,mBAAmB,CAAC;IAC1C,eAAe,EAAE,MAAM,OAAO,CAAC;IAE/B;;;OAGG;IACH,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC7D,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D"}
@@ -0,0 +1,7 @@
1
+ export interface Debounced<Args extends unknown[], Result> {
2
+ (...args: Args): Result | undefined;
3
+ cancel: () => void;
4
+ flush: () => Result | undefined;
5
+ }
6
+ export declare function debounce<Args extends unknown[], Result>(fn: (...args: Args) => Result, waitMs: number): Debounced<Args, Result>;
7
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/debounce.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,SAAS,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM;IACvD,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,wBAAgB,QAAQ,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,EACrD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,EAC7B,MAAM,EAAE,MAAM,GACb,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAmCzB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Structural equality for plain data: same keys, same values, recursively. Not a general
3
+ * comparator: it is used to decide whether a plugin's configuration props really changed, so it
4
+ * does not look at prototypes, dates or cycles.
5
+ */
6
+ export declare function isDeepEqual(a: unknown, b: unknown): boolean;
7
+ //# sourceMappingURL=deep-equal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep-equal.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/deep-equal.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAS3D"}
@@ -0,0 +1,17 @@
1
+ type HookName<THooks> = keyof THooks & string;
2
+ type HookArgs<THooks, Name extends keyof THooks> = THooks[Name] extends (...args: infer Args) => unknown ? Args : never;
3
+ type HookReturn<THooks, Name extends keyof THooks> = THooks[Name] extends (...args: never[]) => infer Return ? Return : never;
4
+ export type HookFn<THooks, Name extends keyof THooks> = (...args: HookArgs<THooks, Name>) => HookReturn<THooks, Name> | Promise<HookReturn<THooks, Name>>;
5
+ export interface Hooked<THooks> {
6
+ /** Registers a handler. Returns the function that removes it again. */
7
+ hook: <Name extends HookName<THooks>>(name: Name, fn: HookFn<THooks, Name>) => () => void;
8
+ /** Runs the handlers one after another, each after the previous one settled. */
9
+ callHook: <Name extends HookName<THooks>>(name: Name, ...args: HookArgs<THooks, Name>) => Promise<HookReturn<THooks, Name>[]>;
10
+ /** Runs all the handlers at once. */
11
+ callHookParallel: <Name extends HookName<THooks>>(name: Name, ...args: HookArgs<THooks, Name>) => Promise<HookReturn<THooks, Name>[]>;
12
+ /** Runs the handlers synchronously and returns their results. */
13
+ callHookSync: <Name extends HookName<THooks>>(name: Name, ...args: HookArgs<THooks, Name>) => HookReturn<THooks, Name>[];
14
+ }
15
+ export declare function createHooked<THooks>(): Hooked<THooks>;
16
+ export {};
17
+ //# sourceMappingURL=hooked.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooked.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/hooked.ts"],"names":[],"mappings":"AAWA,KAAK,QAAQ,CAAC,MAAM,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC;AAE9C,KAAK,QAAQ,CAAC,MAAM,EAAE,IAAI,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CACtE,GAAG,IAAI,EAAE,MAAM,IAAI,KAChB,OAAO,GACR,IAAI,GACJ,KAAK,CAAC;AAEV,KAAK,UAAU,CAAC,MAAM,EAAE,IAAI,SAAS,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CACxE,GAAG,IAAI,EAAE,KAAK,EAAE,KACb,MAAM,MAAM,GACb,MAAM,GACN,KAAK,CAAC;AAEV,MAAM,MAAM,MAAM,CAAC,MAAM,EAAE,IAAI,SAAS,MAAM,MAAM,IAAI,CACtD,GAAG,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAC5B,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAElE,MAAM,WAAW,MAAM,CAAC,MAAM;IAC5B,uEAAuE;IACvE,IAAI,EAAE,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC;IAC1F,gFAAgF;IAChF,QAAQ,EAAE,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EACtC,IAAI,EAAE,IAAI,EACV,GAAG,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAC5B,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACzC,qCAAqC;IACrC,gBAAgB,EAAE,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EAC9C,IAAI,EAAE,IAAI,EACV,GAAG,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAC5B,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACzC,iEAAiE;IACjE,YAAY,EAAE,CAAC,IAAI,SAAS,QAAQ,CAAC,MAAM,CAAC,EAC1C,IAAI,EAAE,IAAI,EACV,GAAG,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAC5B,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;CACjC;AAID,wBAAgB,YAAY,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,CAuDrD"}
@@ -0,0 +1,3 @@
1
+ /** Any non-null object, arrays included: the shape a value must have to be read by key. */
2
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
3
+ //# sourceMappingURL=is-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-record.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/is-record.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
@@ -0,0 +1,22 @@
1
+ import { StoreApi, UseBoundStore } from 'zustand';
2
+ export type LoadState = 'blank' | 'loading' | 'error' | 'loaded';
3
+ export interface LoadStateStore {
4
+ loadState: LoadState;
5
+ }
6
+ export type UseLoadStateStore = UseBoundStore<StoreApi<LoadStateStore>>;
7
+ export interface LoadStateManager {
8
+ useLoadState: UseLoadStateStore;
9
+ setLoading: () => void;
10
+ setLoaded: () => void;
11
+ setError: () => void;
12
+ setBlank: () => void;
13
+ /** Back to idle, and detaches the `loadPromise` in flight so its outcome no longer writes. */
14
+ reset: () => void;
15
+ loadPromise: <T>(promise: Promise<T>) => Promise<T>;
16
+ }
17
+ /**
18
+ * A zustand store holding a `blank -> loading -> loaded | error` state, plus the helpers that move
19
+ * it. `loadPromise` follows a promise: loading while it is pending, then loaded or error.
20
+ */
21
+ export declare function createLoadStateManager(): LoadStateManager;
22
+ //# sourceMappingURL=load-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-state.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/load-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGvD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;AAExE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,iBAAiB,CAAC;IAChC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8FAA8F;IAC9F,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAoDzD"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ /** A ref that always holds the value of the latest committed render. */
3
+ export declare function useLatest<T>(value: T): import('react').RefObject<T>;
4
+ //# sourceMappingURL=use-latest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-latest.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/utils/use-latest.ts"],"names":[],"mappings":";AAEA,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,gCAUpC"}
@@ -0,0 +1,50 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { ComponentProps } from 'react';
4
+ declare const pageHeaderVariants: (props?: ({
5
+ size?: "default" | "sm" | "lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface PageHeaderProps extends ComponentProps<'header'>, VariantProps<typeof pageHeaderVariants> {
8
+ /** Draws the rule under the header. `false` paints it transparent rather
9
+ * than dropping it, so a header without the rule keeps the height and
10
+ * the text position of one with it. A flag, not a variant value: it is
11
+ * anatomy, the way Badge's `dot` is. */
12
+ border?: boolean;
13
+ }
14
+ /** `size` is the drawn minimum height: `sm` 56, `default` 64, `lg` 80. */
15
+ export declare function PageHeader({ className, size, border, ...props }: PageHeaderProps): import("react").JSX.Element;
16
+ export type PageHeaderLeadingProps = ComponentProps<'div'>;
17
+ /** A control before the text: a back link, a view switch. */
18
+ export declare function PageHeaderLeading({ className, ...props }: PageHeaderLeadingProps): import("react").JSX.Element;
19
+ export type PageHeaderContentProps = ComponentProps<'div'>;
20
+ /** The text block: eyebrow, title, the content beside the title and the
21
+ * description. Each part takes its own grid area, so where it lands does
22
+ * not depend on which of the others are present. */
23
+ export declare function PageHeaderContent({ className, ...props }: PageHeaderContentProps): import("react").JSX.Element;
24
+ export type PageHeaderEyebrowProps = ComponentProps<'div'>;
25
+ /** A line above the title - typically a link to the parent the page
26
+ * belongs to. */
27
+ export declare function PageHeaderEyebrow({ className, ...props }: PageHeaderEyebrowProps): import("react").JSX.Element;
28
+ declare const pageHeaderTitleVariants: (props?: ({
29
+ typography?: "heading" | "display" | null | undefined;
30
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
31
+ export interface PageHeaderTitleProps extends useRender.ComponentProps<'h1'>, VariantProps<typeof pageHeaderTitleVariants> {
32
+ }
33
+ /** The page's heading: an `h1` unless `render` names another level, such
34
+ * as `render={<h2 />}` for a section under the page's own header.
35
+ * `typography` picks the ramp role - `heading` (20/28) or `display`
36
+ * (26/32), independent of the header's height. */
37
+ export declare function PageHeaderTitle({ className, typography, render, ...props }: PageHeaderTitleProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
38
+ export type PageHeaderMetaProps = ComponentProps<'div'>;
39
+ /** Content beside the title: a badge, a status, section navigation, a
40
+ * small action. */
41
+ export declare function PageHeaderMeta({ className, ...props }: PageHeaderMetaProps): import("react").JSX.Element;
42
+ export type PageHeaderDescriptionProps = ComponentProps<'div'>;
43
+ /** A short line under the title. */
44
+ export declare function PageHeaderDescription({ className, ...props }: PageHeaderDescriptionProps): import("react").JSX.Element;
45
+ export type PageHeaderActionsProps = ComponentProps<'div'>;
46
+ /** The row at the end of the header: buttons, menus, anything the page
47
+ * acts with. */
48
+ export declare function PageHeaderActions({ className, ...props }: PageHeaderActionsProps): import("react").JSX.Element;
49
+ export {};
50
+ //# sourceMappingURL=page-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAkB5C,QAAA,MAAM,kBAAkB;;8EAWtB,CAAC;AAEH,MAAM,WAAW,eACf,SAAQ,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzE;;;4CAGwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAa,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAOvF;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAEhF;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;oDAEoD;AACpD,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAEhF;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;iBACiB;AACjB,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAEhF;AAED,QAAA,MAAM,uBAAuB;;8EAU3B,CAAC;AAEH,MAAM,WAAW,oBACf,SAAQ,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,uBAAuB,CAAC;CAAG;AAEzF;;;kDAGkD;AAClD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,8FAMhG;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAExD;mBACmB;AACnB,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAE1E;AAED,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D,oCAAoC;AACpC,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,+BAExF;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;gBACgB;AAChB,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAEhF"}
@@ -0,0 +1,2 @@
1
+ export { PageHeader, type PageHeaderProps, PageHeaderActions, type PageHeaderActionsProps, PageHeaderContent, type PageHeaderContentProps, PageHeaderDescription, type PageHeaderDescriptionProps, PageHeaderEyebrow, type PageHeaderEyebrowProps, PageHeaderLeading, type PageHeaderLeadingProps, PageHeaderMeta, type PageHeaderMetaProps, PageHeaderTitle, type PageHeaderTitleProps, } from './page-header.js';
2
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,cAAc,EACd,KAAK,mBAAmB,EACxB,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from '../components/data-grid/plugins/empty-state/public.js'
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import { create as c } from "zustand";
4
+ import { c as a } from "../chunks/plugins-helpers.js";
5
+ const i = "empty_state", f = a("emptyState", (n) => {
6
+ const o = c(() => ({
7
+ component: null
8
+ }));
9
+ return n.registerSlot("empty", {
10
+ id: i,
11
+ component: p
12
+ }), {
13
+ useComponent: () => o((t) => t.component),
14
+ onPropsChange: e
15
+ };
16
+ function e(t) {
17
+ o.setState({ component: t.component });
18
+ }
19
+ function p() {
20
+ const t = o((m) => m.component);
21
+ return t ? /* @__PURE__ */ r(t, {}) : null;
22
+ }
23
+ });
24
+ export {
25
+ f as DataGridEmptyStatePlugin
26
+ };
27
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","sources":["../../src/components/data-grid/plugins/empty-state/empty-state-plugin.tsx"],"sourcesContent":["// Load-bearing: a plugin is rendered as a child of <DataGrid>, so a Server Component can import\n// and render it, and the component it returns calls hooks. This directive puts the banner on the\n// plugin's own entry chunk (dist/data-grid/<plugin>.js). client-boundaries.test.ts only scans a\n// component's top-level files, so scripts/verify-consumer.sh is what checks the built banner of\n// every plugin entry.\n'use client';\n\nimport { create } from 'zustand';\nimport type { DataGridItem } from '../../data-grid-types';\nimport { createDataGridPlugin } from '../../services/plugins/plugins-helpers';\nimport type { DataGridEmptyStatePluginApi, DataGridEmptyStatePluginProps } from './empty-state-types';\n\nexport type { DataGridEmptyStatePluginApi, DataGridEmptyStatePluginProps };\n\nexport const EMPTY_STATE_LAYOUT_SLOT_ID = 'empty_state';\n\ninterface EmptyStateStore {\n component: React.ComponentType | null;\n}\n\nexport const DataGridEmptyStatePlugin = createDataGridPlugin<\n DataGridItem,\n 'emptyState',\n DataGridEmptyStatePluginProps\n>('emptyState', (context) => {\n const useStore = create<EmptyStateStore>(() => ({\n component: null,\n }));\n\n context.registerSlot('empty', {\n id: EMPTY_STATE_LAYOUT_SLOT_ID,\n component: EmptyStateSlot,\n });\n\n const api: DataGridEmptyStatePluginApi = {\n useComponent: () => useStore((s) => s.component),\n onPropsChange,\n };\n\n return api;\n\n function onPropsChange(props: DataGridEmptyStatePluginProps) {\n useStore.setState({ component: props.component });\n }\n\n // Renders nothing until onPropsChange lands the component in the store: the slot is registered\n // during setup, so falling back to the built-in copy here would flash \"No results found\" on the\n // first paint of the very state this plugin exists to replace.\n function EmptyStateSlot() {\n const Component = useStore((s) => s.component);\n\n return Component ? <Component /> : null;\n }\n});\n"],"names":["EMPTY_STATE_LAYOUT_SLOT_ID","DataGridEmptyStatePlugin","createDataGridPlugin","context","useStore","create","EmptyStateSlot","s","onPropsChange","props","Component","jsx"],"mappings":";;;;AAcO,MAAMA,IAA6B,eAM7BC,IAA2BC,EAItC,cAAc,CAACC,MAAY;AAC3B,QAAMC,IAAWC,EAAwB,OAAO;AAAA,IAC9C,WAAW;AAAA,EAAA,EACX;AAEF,SAAAF,EAAQ,aAAa,SAAS;AAAA,IAC5B,IAAIH;AAAA,IACJ,WAAWM;AAAA,EAAA,CACZ,GAEwC;AAAA,IACvC,cAAc,MAAMF,EAAS,CAACG,MAAMA,EAAE,SAAS;AAAA,IAC/C,eAAAC;AAAA,EAAA;AAKF,WAASA,EAAcC,GAAsC;AAC3D,IAAAL,EAAS,SAAS,EAAE,WAAWK,EAAM,WAAW;AAAA,EAClD;AAKA,WAASH,IAAiB;AACxB,UAAMI,IAAYN,EAAS,CAACG,MAAMA,EAAE,SAAS;AAE7C,WAAOG,IAAY,gBAAAC,EAACD,GAAA,CAAA,CAAU,IAAK;AAAA,EACrC;AACF,CAAC;"}
@@ -0,0 +1 @@
1
+ export * from '../components/data-grid/plugins/order/public.js'