@featherk/composables 0.12.2 → 0.12.4
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.d.ts +28 -0
- package/dist/docs-manifest.js +45 -0
- package/dist/featherk-composables.es.js +142 -142
- package/dist/featherk-composables.es.js.map +1 -1
- package/dist/featherk-composables.umd.js +1 -1
- package/dist/featherk-composables.umd.js.map +1 -1
- package/dist/menu/usePopupMenu.d.ts +2 -0
- package/docs/menu/usePopupMenu.md +1 -1
- package/package.json +8 -2
|
@@ -12,6 +12,8 @@ export type PopupMenuAnchorOptions = {
|
|
|
12
12
|
clipRoot?: MaybeRefOrGetter<Element | null>;
|
|
13
13
|
/** Closes the menu after its trigger leaves the clipping container. */
|
|
14
14
|
hideWhenAnchorClipped?: boolean;
|
|
15
|
+
/** Intersection ratio required to keep the anchor considered visible. Defaults to `0.5`. */
|
|
16
|
+
intersectionThreshold?: number | number[];
|
|
15
17
|
/** Overrides the trigger rect for pointer-positioned menus. */
|
|
16
18
|
getRect?: () => DOMRect | null;
|
|
17
19
|
};
|
|
@@ -247,7 +247,7 @@ See [UsePopupMenu.vue](https://github.com/NantHealth/featherk/blob/integration/d
|
|
|
247
247
|
- `manageMenuTriggerAria?: boolean`: Keeps `aria-expanded` in sync with `isOpen` on the resolved `triggerRef` element. Defaults to `true`. The consumer always owns the static `aria-haspopup="menu"` attribute and the baseline `aria-expanded="false"`; the composable only ever writes `aria-expanded` and never removes it. Set to `false` to own `aria-expanded` yourself too.
|
|
248
248
|
- `menuLabel?: MaybeRefOrGetter<string | null | undefined>`: Optional accessible name applied as `aria-label` to the rendered `ul[role="menubar"]`. Empty labels remove the managed attribute.
|
|
249
249
|
- `triggerMode: "button" | "row"`: Required. Declares the trigger semantics so a misrouted `triggerRef` (e.g. one that unexpectedly resolves to a `tr.k-table-row` while `triggerMode: "button"` is set) is never silently managed; a mismatch logs a `console.warn` and skips ARIA management for that resolution. Use `"row"` only when a `tr.k-table-row` owns the menu trigger. Neither mode adds `role`, `tabindex`, or keyboard behavior.
|
|
250
|
-
- `anchor?: true | PopupMenuAnchorOptions`: Enables document-relative `offset` tracking for dynamically retargeted Popups. `true` uses the resolved trigger's rectangle and nearest scrollable ancestor. `PopupMenuAnchorOptions` accepts `clipRoot`, `hideWhenAnchorClipped`, and `getRect` for pointer-positioned menus.
|
|
250
|
+
- `anchor?: true | PopupMenuAnchorOptions`: Enables document-relative `offset` tracking for dynamically retargeted Popups. `true` uses the resolved trigger's rectangle and nearest scrollable ancestor. `PopupMenuAnchorOptions` accepts `clipRoot`, `hideWhenAnchorClipped`, `intersectionThreshold`, and `getRect` for pointer-positioned menus. The threshold defaults to `0.5`; use `intersectionThreshold: 0` when any partially visible trigger should remain open. A fully clipped trigger closes with `"anchor-hidden"` without restoring focus.
|
|
251
251
|
|
|
252
252
|
`PopupMenuElementRef` accepts a normal `HTMLElement` ref or a Vue/Kendo component ref that exposes `$el`.
|
|
253
253
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featherk/composables",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"main": "dist/featherk-composables.umd.js",
|
|
5
5
|
"module": "dist/featherk-composables.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
"types": "./dist/id/index.d.ts",
|
|
65
65
|
"import": "./dist/featherk-composables.es.js",
|
|
66
66
|
"require": "./dist/featherk-composables.umd.js"
|
|
67
|
+
},
|
|
68
|
+
"./docs-manifest": {
|
|
69
|
+
"types": "./dist/docs-manifest.d.ts",
|
|
70
|
+
"import": "./dist/docs-manifest.js",
|
|
71
|
+
"default": "./dist/docs-manifest.js"
|
|
67
72
|
}
|
|
68
73
|
},
|
|
69
74
|
"files": [
|
|
@@ -71,8 +76,9 @@
|
|
|
71
76
|
"docs"
|
|
72
77
|
],
|
|
73
78
|
"scripts": {
|
|
74
|
-
"build": "vite build && npm run build:types",
|
|
79
|
+
"build": "vite build && npm run build:types && npm run build:docs-manifest",
|
|
75
80
|
"build:types": "vue-tsc --emitDeclarationOnly --declaration --declarationDir dist",
|
|
81
|
+
"build:docs-manifest": "node ../../scripts/generate-docs-manifest.mjs",
|
|
76
82
|
"test": "vitest --config vitest.config.ts",
|
|
77
83
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
78
84
|
"test:coverage": "vitest run --config vitest.config.ts --coverage",
|