@kungal/ui-vue 1.14.0 → 1.14.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,20 @@
1
1
  # @kungal/ui-vue
2
2
 
3
+ ## 1.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d0bce9: fix(vue): DatePicker / Autocomplete focus-on-open no longer risks scrolling the page
8
+
9
+ Hardens the two remaining popup components that still used a bare `.focus()`:
10
+ DatePicker (focus the root on open) and Autocomplete (refocus the input after
11
+ select / clear) now pass `{ preventScroll: true }`. The menu components already
12
+ did this; this brings the last two in line so a portaled-panel open can never
13
+ jump the page to the top. (The public `Autocomplete.focus()` method keeps the
14
+ default so the caller controls scroll intent.)
15
+
16
+ - @kungal/ui-core@1.14.1
17
+
3
18
  ## 1.14.0
4
19
 
5
20
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../src/components/DatePicker.vue"],"names":[],"mappings":"AAwWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AA+tBjD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../src/components/DatePicker.vue"],"names":[],"mappings":"AA0WA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAiuBjD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
package/dist/index.js CHANGED
@@ -636,7 +636,7 @@ var et = /* @__PURE__ */ "KunAccordion.KunAccordionItem.KunAlertProvider.KunAuto
636
636
  }
637
637
  K();
638
638
  }, Y = (e) => {
639
- e.disabled || (p.value = e.label, k.value = !1, m("select", e), G(), v(() => A.value?.focus()));
639
+ e.disabled || (p.value = e.label, k.value = !1, m("select", e), G(), v(() => A.value?.focus({ preventScroll: !0 })));
640
640
  }, ee = (e) => {
641
641
  p.value = e.target.value, k.value = !0, m("search", p.value), W(), E.value = H();
642
642
  }, te = (e) => {
@@ -662,7 +662,7 @@ var et = /* @__PURE__ */ "KunAccordion.KunAccordionItem.KunAlertProvider.KunAuto
662
662
  !d.allowCustomValue && p.value && !d.options.some((e) => e.label.toLowerCase() === p.value.toLowerCase()) && (p.value = "", m("search", ""));
663
663
  }, 120);
664
664
  }, re = () => {
665
- p.value = "", k.value = !0, m("search", ""), v(() => A.value?.focus()), W();
665
+ p.value = "", k.value = !0, m("search", ""), v(() => A.value?.focus({ preventScroll: !0 })), W();
666
666
  };
667
667
  return ye(M, (e) => {
668
668
  N.value?.contains(e.target) || G();
@@ -2443,7 +2443,7 @@ var et = /* @__PURE__ */ "KunAccordion.KunAccordionItem.KunAlertProvider.KunAuto
2443
2443
  break;
2444
2444
  }
2445
2445
  }, oe = o(() => a.mode === "single" ? a.modelValue ? te(new Date(a.modelValue), a.format) : "" : Array.isArray(a.modelValue) && a.modelValue.every((e) => e) ? `${te(new Date(a.modelValue[0]), a.format)} - ${te(new Date(a.modelValue[1]), a.format)}` : ""), ce = () => {
2446
- a.disabled || (g.value = !g.value, g.value && v(() => _.value?.focus()));
2446
+ a.disabled || (g.value = !g.value, g.value && v(() => _.value?.focus({ preventScroll: !0 })));
2447
2447
  }, le = (e) => {
2448
2448
  let t = ee(e);
2449
2449
  h("update:modelValue", t), (a.mode === "single" || Array.isArray(t) && t[1]) && (g.value = !1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-vue",
3
- "version": "1.14.0",
3
+ "version": "1.14.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": "1.14.0"
53
+ "@kungal/ui-core": "1.14.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": "1.14.0"
65
+ "@kungal/ui-tokens": "1.14.1"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "vite build && cp src/prose.css dist/prose.css && vue-tsc -p tsconfig.build.json",