@praxisui/table 9.0.5-rc.8 → 9.0.5

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.
package/README.md CHANGED
@@ -11,8 +11,11 @@ the backend-authored refresh policy after success. Hosts should not recreate the
11
11
  button labels, HTTP methods, or local version-field aliases.
12
12
 
13
13
  Collection workflow actions follow the same contract and are materialized in the toolbar. The
14
- table enforces the published selection limit, maps selected identities through `idsField`, and,
15
- for `SELECTION_MAP` concurrency, maps the backend-issued opaque tokens exposed by
14
+ table requires a row selection only when the action publishes `selection.idsField` or uses
15
+ `SELECTION_MAP`; an unrelated current selection is never injected into a selection-independent
16
+ collection command, remains selected after completion, and the lifecycle is emitted as a
17
+ `toolbarAction` rather than a bulk operation. For selection-bound actions it enforces the published limit, maps selected
18
+ identities through `idsField`, and, for `SELECTION_MAP` concurrency, maps the backend-issued opaque tokens exposed by
16
19
  `preconditions.resourceVersionField` through `versionsField`. Partial (`PER_ITEM`) outcomes keep
17
20
  only failed rows selected for correction, while successful execution follows the governed refresh
18
21
  policy. Missing identity or version metadata fails visibly instead of silently degrading
@@ -137,6 +140,8 @@ Optional collection operations such as export are not implied by a base route. E
137
140
 
138
141
  When the collection response exposes `_links.create` or a collection `capabilities` snapshot with create support, `PraxisTable` can materialize the canonical `create` toolbar action without requiring each host screen to duplicate labels, disabled state, schema URLs, or submit URLs. If the host provides `surface.open`, the action opens the create form as a governed collection surface; otherwise the table emits `toolbarAction` with the enriched action metadata for the composed host to handle.
139
142
 
143
+ Selector and lookup surfaces can keep the same remote `resourcePath`, schema, pagination and read capabilities while opting out of collection action materialization with `actions.collection.discovery.enabled = false`. The policy suppresses only collection actions discovered from HATEOAS/capabilities, including canonical create and collection workflows. Explicit toolbar actions and configured row actions remain unchanged. Omission preserves the default enabled behavior.
144
+
140
145
  ## Runtime Inputs And Outputs
141
146
 
142
147
  Common inputs:
@@ -216,6 +221,8 @@ Use `behavior.emptyState` for table-owned no-data copy and presentation. `messag
216
221
 
217
222
  When the host does not provide `behavior.emptyState` or legacy `messages.states` copy, the table uses localized runtime defaults for the initial empty collection and for the filtered/search no-results state. Context-specific entries in `behavior.emptyState.contexts.initial`, `behavior.emptyState.contexts.filtered`, and `behavior.emptyState.contexts.searched` still override the base empty state for those modes.
218
223
 
224
+ For related resources, the generated empty state is informational and does not repeat the capability-governed CREATE action already kept stable in the toolbar. Declare `behavior.emptyState.actions` only when the journey intentionally needs a distinct contextual action; explicit host actions are preserved. Empty-state and toolbar actions share the public `--praxis-action-control-*` geometry, while `toolbar.appearance.tokens.actionSize` and `actionRadius` remain the stronger per-table overrides.
225
+
219
226
  ```ts
220
227
  const config: TableConfig = {
221
228
  behavior: {
@@ -244,6 +251,44 @@ const config: TableConfig = {
244
251
  };
245
252
  ```
246
253
 
254
+ ### Adaptive toolbar composition
255
+
256
+ `PraxisTableToolbar` materializes the toolbar as semantic regions rather than one wrapping row:
257
+
258
+ - **identity** — title, subtitle and table context;
259
+ - **scope** — a small, mutually exclusive and removable set of governed quick filters;
260
+ - **query** — always-visible dynamic filters and projected query shortcuts;
261
+ - **commands** — collection/business actions, table utilities and authoring entrypoints.
262
+
263
+ The runtime owns the responsive composition through container queries. This is important when a table
264
+ is rendered inside a drawer, split pane or dashboard card: behavior follows the width actually available
265
+ to the table, not only the browser viewport. At wide widths, identity and commands share the first band,
266
+ while scope and query share a stable second band. At compact widths, the regions move as complete units and
267
+ commands are consolidated under one localized `Mais ações` entrypoint without losing export, column or
268
+ density controls. At narrow widths the first band preserves identity and commands before the scope and
269
+ query bands, so keyboard focus follows the same reading order presented visually.
270
+
271
+ Authoring guidance:
272
+
273
+ - use `toolbar.filters.quickFilters` for a small governed scope switch, not as a substitute for every filter;
274
+ one quick filter can be active at a time, and activating the current item again restores the previous criteria;
275
+ - use `advancedFilters.settings.alwaysVisibleFields` for frequent editable criteria;
276
+ - keep one clear collection/business action primary; export, columns and density are utilities;
277
+ - project custom shortcuts through the toolbar slots, but do not target internal layout classes from the host;
278
+ - validate the component container at `1440`, `1024`, `768`, `480` and `320` px, including long localized labels, zoom and keyboard focus.
279
+
280
+ Adding supported filters or actions never requires a host breakpoint. When the command set grows, the compact
281
+ menu preserves capability parity and keyboard order. Projected query shortcuts are grouped by the runtime,
282
+ receive a bounded width budget and wrap as one semantic cluster; projected controls must remain intrinsically
283
+ shrinkable and must not declare a fixed minimum width larger than their slot. Hosts must not rely on internal
284
+ selectors to position them. The query region remains independently scroll-free at the page level.
285
+
286
+ The existing `toolbar.layout` fields are materialized by the same runtime: `alignment` aligns the identity
287
+ and command regions, `padding` and `backgroundColor` project governed chrome, `height` defines the minimum
288
+ toolbar height, and `showSeparator` adds the boundary with the data surface. `toolbar.appearance.tokens.bg`
289
+ remains the most specific background override, followed by `toolbar.layout.backgroundColor` and the legacy
290
+ `actionsBackgroundColor` projection.
291
+
247
292
  ## Filtering And Row Actions
248
293
 
249
294
  The package exports both the table runtime and `PraxisFilter` integration surfaces.
@@ -256,6 +301,11 @@ The package exports both the table runtime and `PraxisFilter` integration surfac
256
301
  availability; transient errors and missing discovered operations fail closed. Actions with an
257
302
  explicit `globalAction` or `recordSurface` remain governed by that declared execution contract.
258
303
  - `visibleWhen` and `disabledWhen` use canonical JSON Logic.
304
+ - Toolbar actions that are unavailable because of selection cardinality, `disabledWhen`, or an explicit
305
+ disabled state remain visually recognizable and keyboard focusable in the full toolbar. They expose
306
+ `aria-disabled="true"`, keep execution fail-closed, and announce the contextual disabled reason before
307
+ the configured operation tooltip. In the compact overflow menu, the same reason is rendered inline so
308
+ understanding the unavailable command never depends on hovering or focusing a native disabled menu item.
259
309
  - Inline and overflow actions preserve their actionable origin. Overflow menus finish closing and restore the trigger before emitting the action, allowing dialogs and drawers with `restoreFocus` to return keyboard focus to the correct table control.
260
310
 
261
311
  The filter field manager follows the compact inline visual language and can be themed by hosts through