@gears-frontx/ui-kit 0.4.7 → 0.4.9

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 (25) hide show
  1. package/dist/chunks/data-grid-portal-container-context.js +10 -0
  2. package/dist/chunks/data-grid-portal-container-context.js.map +1 -0
  3. package/dist/components/data-grid/data-grid-types.d.ts +10 -0
  4. package/dist/components/data-grid/data-grid-types.d.ts.map +1 -1
  5. package/dist/components/data-grid/data-grid.d.ts +1 -1
  6. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  7. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -1
  8. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -1
  9. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -1
  10. package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts.map +1 -1
  11. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -1
  12. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts +9 -0
  13. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts.map +1 -0
  14. package/dist/data-grid/actions-menu.js +99 -98
  15. package/dist/data-grid/actions-menu.js.map +1 -1
  16. package/dist/data-grid/filters.js +369 -366
  17. package/dist/data-grid/filters.js.map +1 -1
  18. package/dist/data-grid/order.js +111 -110
  19. package/dist/data-grid/order.js.map +1 -1
  20. package/dist/data-grid/table-configuration.js +49 -37
  21. package/dist/data-grid/table-configuration.js.map +1 -1
  22. package/dist/data-grid.js +462 -460
  23. package/dist/data-grid.js.map +1 -1
  24. package/dist/docs/data-grid.md +29 -4
  25. package/package.json +1 -1
@@ -290,6 +290,30 @@ sharing one still leave their landmarks indistinguishable. The label is a spoken
290
290
  (which identifies a grid's persisted state, and is not readable text), and it
291
291
  is never persisted.
292
292
 
293
+ ### `portalContainer`
294
+
295
+ The popups the grid and its plugins open render in a portal, on `<body>` by
296
+ default: the filter popovers and their narrow-screen panel, the All filters
297
+ panel, the sort and table configuration popovers, and the actions menu.
298
+ `portalContainer` moves them all to another node, the way `container` does on
299
+ a kit popup.
300
+
301
+ Pass it when `<body>` is not where the kit's styles or theme reach: a grid in a
302
+ shadow root whose CSS is injected into that root, or a grid under a
303
+ `data-theme` container that is not `<html>` or `<body>`. The node takes a
304
+ shadow root, an element or a ref.
305
+
306
+ ```tsx
307
+ <div data-theme="dark" ref={themedRef}>
308
+ <DataGrid name="users" load={loadUsers} columns={columns} portalContainer={themedRef}>
309
+ <DataGridFiltersPlugin entities={filters} />
310
+ </DataGrid>
311
+ </div>
312
+ ```
313
+
314
+ A popup that your own component opens inside the grid, such as a row actions
315
+ menu, is yours to place: pass it the same node as `container`.
316
+
293
317
  ## Empty state
294
318
 
295
319
  A grid with no records shows a centered `Empty` instead of the table: "No results
@@ -857,9 +881,10 @@ the last visible column is locked so the table is never empty, and a column's ow
857
881
  A choice applies at once. Which columns are hidden survives a reload only with
858
882
  `persistentColumnVisibility` on the grid; pins are not stored. A new `columns` array resets both.
859
883
 
860
- The panel renders in a portal, so set its two size hooks on `:root` or `body`, not on the grid
861
- (see CSS customization). It keeps inside the screen: its width floor gives way to the room there
862
- is on a narrow one, and a list longer than the room scrolls inside it.
884
+ The panel renders in a portal, so set its two size hooks on `:root` or `body`, or on the grid's
885
+ `portalContainer` when it has one (on `:host` when that is a shadow root), not on the grid (see CSS
886
+ customization). It keeps inside the screen: its width floor gives way to the room there is on a
887
+ narrow one, and a list longer than the room scrolls inside it.
863
888
 
864
889
  ### `DataGridRowSelectPlugin`
865
890
 
@@ -1213,7 +1238,7 @@ Set these on the grid or any ancestor:
1213
1238
  | `--data-grid-table-min-inline-size` | `max-content` | Floor for the table's width. Raise it for a narrow pane that starves flexible columns, set it to `0` for a grid that must fit its wrapper. |
1214
1239
  | `--data-grid-header-background` | `var(--card)` | Fill of the header cells while `stickyHeader` is on |
1215
1240
  | `--data-grid-text-search-inline-size` | `initial` | Width of the search box; a fixed value stops it shifting as the clear button appears |
1216
- | `--data-grid-table-configuration-min-inline-size` | `304px` | Minimum width of the table configuration panel. The panel renders in a portal: set it on `:root` or `body` |
1241
+ | `--data-grid-table-configuration-min-inline-size` | `304px` | Minimum width of the table configuration panel. The panel renders in a portal: set it on `:root`, `body` or the grid's `portalContainer` (`:host` when that is a shadow root) |
1217
1242
  | `--data-grid-table-configuration-content-max-block-size` | `500px` | Height at which the panel's column list scrolls. Set it where the panel's portal is under the cascade, like the width |
1218
1243
  | `--data-grid-drag-cursor` | `grab` | Cursor over a drag handle at rest. The row being dragged sets it to `grabbing` on itself, so a value set above it applies before and after a drag |
1219
1244
  | `--data-grid-pinned-background` | `var(--card)` | Fill of a pinned column's cells at rest. A pinned cell is painted with its row's own fill over it, so it follows hover and the other row states. Set `var(--background)` for a grid that sits on the page rather than on a card |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gears-frontx/ui-kit",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Standard React component base for FrontX templates - Base UI behavior, CSS Modules styling on semantic tokens, CVA variants",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",