@vc-shell/framework 2.6.0-rc.0-pr353.bd5718a → 2.6.0-rc.0-pr356.4dee172
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/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-Br3yK8D5.js → VcScheduler.vue_vue_type_script_setup_true_lang-dbUBuyX1.js} +1540 -1545
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-dbUBuyX1.js.map +1 -0
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-BFmpC0MN.js.map +1 -1
- package/dist/core/utilities/focus.d.ts +23 -0
- package/dist/core/utilities/focus.d.ts.map +1 -1
- package/dist/framework.js +117 -117
- package/dist/index.css +1 -1
- package/dist/shell/_internal/notifications/components/notification-container/index.d.ts +2 -2
- package/dist/shell/components/user-dropdown-button/_internal/user-info.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-environment-banner/vc-environment-banner.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableHead.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/cells/CellDateAgo.vue.d.ts.map +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-Br3yK8D5.js.map +0 -1
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focuses `getTarget()` — but only if nothing meaningful holds focus by then.
|
|
3
|
+
*
|
|
4
|
+
* Use it where the shell changes context (a route change, a panel opening, a control
|
|
5
|
+
* being replaced) and focus would otherwise be left on `<body>`, making the next Tab
|
|
6
|
+
* restart from the top of the document (WCAG 2.4.3 Focus Order).
|
|
7
|
+
*
|
|
8
|
+
* Two details make this a shared helper rather than an inline `focus()` call:
|
|
9
|
+
*
|
|
10
|
+
* - **The check must happen after the DOM is patched.** At call time the node the
|
|
11
|
+
* user interacted with is usually still focused *and still connected*, and only
|
|
12
|
+
* becomes detached during the patch that follows. Testing "was focus lost?" any
|
|
13
|
+
* earlier answers "no", so the call is skipped — and focus drops to `<body>` a tick
|
|
14
|
+
* later.
|
|
15
|
+
* - **It must decline when focus is held.** A view that autofocuses a field keeps it,
|
|
16
|
+
* and a user who has already moved on is not interrupted. This repairs lost focus;
|
|
17
|
+
* it does not dictate focus.
|
|
18
|
+
*
|
|
19
|
+
* For deliberately taking focus (opening a menu, entering an editor) call `focus()`
|
|
20
|
+
* directly — this helper will refuse.
|
|
21
|
+
*
|
|
22
|
+
* `getTarget` is a callback because the target often does not exist yet at call time.
|
|
23
|
+
*/
|
|
1
24
|
export declare function focusIfLoose(getTarget: () => HTMLElement | null | undefined): void;
|
|
2
25
|
/**
|
|
3
26
|
* The region focus falls back to when nothing more specific is available —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../core/utilities/focus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../core/utilities/focus.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAWlF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,GAAG,IAAI,CAExD"}
|