@kungal/ui-vue 2.1.0 → 2.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @kungal/ui-vue
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c3f4c91: fix(vue): KunPopover restores focus to the trigger on every close
8
+
9
+ Hardens focus handling found while stress-testing hover menus: if focus was
10
+ inside the panel when it closed via a path that doesn't restore it itself —
11
+ e.g. a hover `group` sibling stealing the open menu — focus is now pulled back to
12
+ the trigger instead of being orphaned on the detached panel node. Covers all
13
+ close paths (group steal, click-outside, programmatic).
14
+
15
+ - @kungal/ui-core@2.1.1
16
+
3
17
  ## 2.1.0
4
18
 
5
19
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.vue.d.ts","sourceRoot":"","sources":["../../src/components/Popover.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAmO9C,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAShD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Popover.vue.d.ts","sourceRoot":"","sources":["../../src/components/Popover.vue"],"names":[],"mappings":"AAyLA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAiP9C,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAShD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
package/dist/index.js CHANGED
@@ -4552,7 +4552,11 @@ var Ho = { class: "relative inline-block" }, Uo = ["aria-expanded", "aria-contro
4552
4552
  closeDelay: r.closeDelay,
4553
4553
  group: r.group
4554
4554
  });
4555
- return Se(m, (e) => {
4555
+ return U(p, (e) => {
4556
+ if (e) return;
4557
+ let t = h.value;
4558
+ !t || !t.contains(document.activeElement) || m.value?.querySelector("button,a[href],input:not([disabled]),select,textarea,[tabindex]:not([tabindex=\"-1\"])")?.focus({ preventScroll: !0 });
4559
+ }), Se(m, (e) => {
4556
4560
  h.value?.contains(e.target) || k(!1);
4557
4561
  }), Te("keydown", (e) => {
4558
4562
  e.key === "Escape" && p.value && k();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-vue",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "KunUI Vue 3 component layer — Nuxt-decoupled. Works in any Vue app; pairs with @kungal/ui-nuxt for Nuxt sugar.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -50,7 +50,7 @@
50
50
  "date-fns": "^4.1.0",
51
51
  "focus-trap": "^8.2.1",
52
52
  "vue-advanced-cropper": "^2.8.9",
53
- "@kungal/ui-core": "2.1.0"
53
+ "@kungal/ui-core": "2.1.1"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "vue": "^3.5.0"
@@ -62,7 +62,7 @@
62
62
  "vite": "^8.0.16",
63
63
  "vue": "^3.5.35",
64
64
  "vue-tsc": "^3.3.3",
65
- "@kungal/ui-tokens": "2.1.0"
65
+ "@kungal/ui-tokens": "2.1.1"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "vite build && cp src/prose.css dist/prose.css && vue-tsc -p tsconfig.build.json",