@oslokommune/punkt-react 20.1.3 → 20.1.5
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 +16 -0
- package/dist/components/combobox/Listbox.js +3 -3
- package/dist/punkt-react.cjs +1 -1
- package/package.json +2 -2
- package/src/components/combobox/Combobox.core.test.tsx +13 -0
- package/src/components/combobox/Combobox.interaction.test.tsx +35 -0
- package/src/components/combobox/Listbox.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [20.1.5](https://github.com/oslokommune/punkt/compare/20.1.4...20.1.5) (2026-11-12)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
* Legg til tester for "valueAdded"-streng i combobox.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [20.1.4](https://github.com/oslokommune/punkt/compare/20.1.3...20.1.4) (2026-11-12)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
* Combobox, "tom liste" blir ikke vist om strengen er tom (#3824).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
|
|
8
24
|
## [20.1.3](https://github.com/oslokommune/punkt/compare/20.1.2...20.1.3) (2026-11-11)
|
|
9
25
|
|
|
10
26
|
### Bug Fixes
|
|
@@ -6,7 +6,7 @@ import { withStableKeys as r } from "../../utils/stableKeys.js";
|
|
|
6
6
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
// src/components/combobox/Listbox.tsx
|
|
8
8
|
var s = ({ state: s }) => {
|
|
9
|
-
let c = n(["listbox"], s.strings), { listboxId: l, label: u, isOpen: d, options: f, filteredOptions: p, multiple: m, disabled: h, maxIsReached: g, maxlength: _, includeSearch: v, allowUserInput: y, addValueText: b, userInfoMessage: x, searchPlaceholder: S, searchValue: C, handleOptionClick: w, handleOptionKeydown: T, handleSearchInput: E, handleSearchKeydown: D, handleNewOptionClick: O, handleNewOptionKeydown: k, listboxRef: A } = s, j = p.filter((e) => e.selected).length, M = m && j > 0 && _ != null && _ > 0, N = y && b && !g, P = !!x, F = [
|
|
9
|
+
let c = n(["listbox"], s.strings), { listboxId: l, label: u, isOpen: d, options: f, filteredOptions: p, multiple: m, disabled: h, maxIsReached: g, maxlength: _, includeSearch: v, allowUserInput: y, addValueText: b, userInfoMessage: x, searchPlaceholder: S, searchValue: C, handleOptionClick: w, handleOptionKeydown: T, handleSearchInput: E, handleSearchKeydown: D, handleNewOptionClick: O, handleNewOptionKeydown: k, listboxRef: A } = s, j = p.filter((e) => e.selected).length, M = m && j > 0 && _ != null && _ > 0, N = y && b && !g, P = !!x, F = !!c.listbox.empty && f.length === 0 && p.length === 0 && !P, I = [
|
|
10
10
|
"pkt-listbox",
|
|
11
11
|
d && "pkt-listbox__open",
|
|
12
12
|
"pkt-txt-16-light"
|
|
@@ -14,7 +14,7 @@ var s = ({ state: s }) => {
|
|
|
14
14
|
return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("div", {
|
|
15
15
|
ref: A,
|
|
16
16
|
id: l,
|
|
17
|
-
className:
|
|
17
|
+
className: I,
|
|
18
18
|
role: p.length > 0 ? "listbox" : void 0,
|
|
19
19
|
"aria-label": p.length > 0 ? `Liste: ${u || ""}` : void 0,
|
|
20
20
|
"aria-multiselectable": p.length > 0 && m ? "true" : void 0,
|
|
@@ -68,7 +68,7 @@ var s = ({ state: s }) => {
|
|
|
68
68
|
name: "plus-sign"
|
|
69
69
|
}), e(c.listbox.addValue, { value: b })]
|
|
70
70
|
}),
|
|
71
|
-
|
|
71
|
+
F && /* @__PURE__ */ o("div", {
|
|
72
72
|
className: "pkt-listbox__banner pkt-listbox__banner--empty",
|
|
73
73
|
children: [/* @__PURE__ */ a(t, {
|
|
74
74
|
className: "pkt-listbox__banner-icon",
|