@oslokommune/punkt-react 19.16.1 → 19.16.2

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.
@@ -24,18 +24,17 @@ var e = (e) => {
24
24
  }
25
25
  }
26
26
  let a = i.find((e) => e.dataset.selected === "true");
27
- if (a) {
28
- e(a);
29
- return;
30
- }
31
- if (r.includeSearch && !(document.activeElement instanceof HTMLInputElement)) {
32
- let e = n.querySelector("[role=\"searchbox\"]");
33
- if (e) {
34
- window.setTimeout(() => e.focus(), 0);
35
- return;
27
+ if (a) e(a);
28
+ else {
29
+ if (r.includeSearch && !(document.activeElement instanceof HTMLInputElement)) {
30
+ let e = n.querySelector("[role=\"searchbox\"]");
31
+ if (e) {
32
+ window.setTimeout(() => e.focus(), 0);
33
+ return;
34
+ }
36
35
  }
36
+ i[0] && e(i[0]);
37
37
  }
38
- i[0] && e(i[0]);
39
38
  };
40
39
  //#endregion
41
40
  export { e as focusAndScrollIntoView, i as focusFirstOption, a as focusFirstOrSelectedOption, n as focusNextOption, r as focusPreviousOption, t as getOptionElements };
@@ -1,2 +1 @@
1
- import { trapTabInside as e } from "../focus-trap/index.js";
2
- export { e as trapTabInside };
1
+ export { trapTabInside } from "../focus-trap/index.js";
@@ -13,7 +13,7 @@ var e = "is-scroll-locked", t = 0, n = 0, r = () => typeof document < "u" && typ
13
13
  }, o = () => {
14
14
  r() && (t += 1, t === 1 && i());
15
15
  }, s = () => {
16
- !r() || t === 0 || (--t, t === 0 && a());
16
+ r() && t !== 0 && (--t, t === 0 && a());
17
17
  }, c = () => ({ locked: !1 }), l = (e, t) => {
18
18
  e.locked !== t && (e.locked = t, t ? o() : s());
19
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "19.16.1",
3
+ "version": "19.16.2",
4
4
  "description": "React komponentbibliotek til Punkt, designsystem for Oslo kommune",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo kommune",
@@ -42,7 +42,7 @@
42
42
  "@eslint/eslintrc": "^3.3.5",
43
43
  "@eslint/js": "^10.0.1",
44
44
  "@oslokommune/punkt-assets": "^19.14.2",
45
- "@oslokommune/punkt-css": "^19.15.3",
45
+ "@oslokommune/punkt-css": "^19.16.2",
46
46
  "@testing-library/jest-dom": "^6.9.1",
47
47
  "@testing-library/react": "^16.3.2",
48
48
  "@testing-library/user-event": "^14.6.1",
@@ -102,5 +102,5 @@
102
102
  "url": "https://github.com/oslokommune/punkt/issues"
103
103
  },
104
104
  "license": "MIT",
105
- "gitHead": "1993393adcd70a3f8ee48c7645e546dd78f127e6"
105
+ "gitHead": "feb42fbaff11316e83d1d588b58d8a5cad459e00"
106
106
  }