@featherk/ui 0.13.1 → 0.13.3
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/dist/docs-manifest.js +4 -4
- package/docs/table/useActionCellMenu.md +21 -13
- package/package.json +1 -1
package/dist/docs-manifest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by scripts/generate-docs-manifest.mjs. Do not edit.
|
|
2
2
|
export const packageName = "@featherk/ui";
|
|
3
3
|
|
|
4
|
-
export const version = "0.13.
|
|
4
|
+
export const version = "0.13.3";
|
|
5
5
|
|
|
6
6
|
export const paths = {
|
|
7
7
|
ActionCell: "table/ActionCell.md",
|
|
@@ -10,9 +10,9 @@ export const paths = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export const docs = {
|
|
13
|
-
ActionCell: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.
|
|
14
|
-
USAddress: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.
|
|
15
|
-
useActionCellMenu: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.
|
|
13
|
+
ActionCell: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.3/docs/table/ActionCell.md",
|
|
14
|
+
USAddress: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.3/docs/address/USAddress.md",
|
|
15
|
+
useActionCellMenu: "https://cdn.jsdelivr.net/npm/@featherk/ui@0.13.3/docs/table/useActionCellMenu.md",
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const docUrl = (name, host = "https://cdn.jsdelivr.net/npm") =>
|
|
@@ -113,19 +113,19 @@ const actionCellMenu = useActionCellMenu({
|
|
|
113
113
|
|
|
114
114
|
## API
|
|
115
115
|
|
|
116
|
-
| Option | Required | Description
|
|
117
|
-
| ------------------------------ | -------- |
|
|
118
|
-
| `config` | Yes | `ActionCellConfig`-shaped trigger configuration, passed straight through to every `ActionCell`.
|
|
119
|
-
| `rows` | Yes | Current row list (ref, getter, or plain array); used to resolve the active row from its registry id.
|
|
120
|
-
| `getRowId` | Yes | Derives a stable row id used to build the default `"<trigger.key>:<rowId>"` registry id.
|
|
121
|
-
| `getTriggerId` | No | Overrides registry ID formatting, but must preserve `<trigger.key>:<rowId>` semantics because active row and trigger resolution parse the ID.
|
|
122
|
-
| `menuRef` | Yes | Ref to the single shared Kendo `Menu` instance.
|
|
123
|
-
| `triggerMode` | No | Forwarded to `usePopupMenu`. Defaults to `"button"`.
|
|
124
|
-
| `anchor` | No | Forwarded to `usePopupMenu` for offset positioning. Defaults to `true` because the shared popup targets dynamically resolved ActionCell triggers.
|
|
125
|
-
| `resolveFocusTarget` | No | Forwarded to `usePopupMenu` for keyboard-close focus restoration.
|
|
126
|
-
| `focusTargetContainerSelector` | No | Forwarded to `usePopupMenu`; focuses the trigger's closest matching ancestor after a keyboard-driven close.
|
|
127
|
-
| `group` | No | A `useExclusiveGroup()` instance that deactivates other registered members before this menu opens.
|
|
128
|
-
| `onActionSelected` | Yes |
|
|
116
|
+
| Option | Required | Description |
|
|
117
|
+
| ------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
118
|
+
| `config` | Yes | `ActionCellConfig`-shaped trigger configuration, passed straight through to every `ActionCell`. |
|
|
119
|
+
| `rows` | Yes | Current row list (ref, getter, or plain array); used to resolve the active row from its registry id. |
|
|
120
|
+
| `getRowId` | Yes | Derives a stable row id used to build the default `"<trigger.key>:<rowId>"` registry id. |
|
|
121
|
+
| `getTriggerId` | No | Overrides registry ID formatting, but must preserve `<trigger.key>:<rowId>` semantics because active row and trigger resolution parse the ID. |
|
|
122
|
+
| `menuRef` | Yes | Ref to the single shared Kendo `Menu` instance. |
|
|
123
|
+
| `triggerMode` | No | Forwarded to `usePopupMenu`. Defaults to `"button"`. |
|
|
124
|
+
| `anchor` | No | Forwarded to `usePopupMenu` for offset positioning. Defaults to `true` because the shared popup targets dynamically resolved ActionCell triggers. |
|
|
125
|
+
| `resolveFocusTarget` | No | Forwarded to `usePopupMenu` for keyboard-close focus restoration. |
|
|
126
|
+
| `focusTargetContainerSelector` | No | Forwarded to `usePopupMenu`; focuses the trigger's closest matching ancestor after a keyboard-driven close. |
|
|
127
|
+
| `group` | No | A `useExclusiveGroup()` instance that deactivates other registered members before this menu opens. |
|
|
128
|
+
| `onActionSelected` | Yes | For menu items, runs synchronously after popup close is requested, with the original `(item, row, trigger)` captured before registry deactivation. Direct actions pass `undefined` as `item`. |
|
|
129
129
|
|
|
130
130
|
Each trigger in `config.triggers` may also define an optional `title?: (dataItem) => string`.
|
|
131
131
|
When set, the resolved string is exposed via the returned `activeTitle` — it is _not_ mixed
|
|
@@ -191,3 +191,11 @@ require defining lookup lifecycle/re-render behavior before changing the public
|
|
|
191
191
|
- **Coexisting with a sibling menu (e.g. a row-level context menu) requires a shared
|
|
192
192
|
`useExclusiveGroup`.** Register the sibling registry with the group; `useActionCellMenu`
|
|
193
193
|
registers its own registry automatically, so opening either menu deactivates the other.
|
|
194
|
+
- **When the shared ActionCell popup needs a focus trap, pair it with `usePopupTrap` using
|
|
195
|
+
the same registry**. `useActionCellMenu` already owns the registry / trigger lifecycle; the
|
|
196
|
+
trap should use `menuController.registry.isActive` and `menuController.registry.activeElement`
|
|
197
|
+
rather than inventing a second source of truth. Keep `returnFocusToTrigger: false` and
|
|
198
|
+
`focusTrapOptions.returnFocusOnDeactivate: false` to avoid fighting `usePopupMenu`'s close
|
|
199
|
+
and focus-restoration rules. If multiple popups are mounted in one page, resolve the specific
|
|
200
|
+
target popup element by `id` (`resolvePopupEl: () => document.getElementById("action-cell-popup")`).
|
|
201
|
+
This is the same pattern documented for shared popup orchestration in the menu docs.
|