@midas-ds/components 17.0.2 → 17.1.0
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 +11 -0
- package/assets/ComboBox.css +1 -1
- package/assets/ListBoxEmptyState.css +1 -0
- package/chunks/ComboBox-DnqZjAqe.js +102 -0
- package/chunks/ListBoxEmptyState-_Cn38cQ6.js +30 -0
- package/combobox/ComboBox.d.ts +3 -1
- package/combobox/index.js +1 -1
- package/index.js +41 -40
- package/list-box/ListBox.d.ts +2 -2
- package/list-box/index.d.ts +1 -0
- package/list-box/index.js +7 -6
- package/list-box/list-box-empty-state/ListBoxEmptyState.d.ts +2 -0
- package/list-box/list-box-empty-state/index.d.ts +1 -0
- package/package.json +1 -1
- package/chunks/ComboBox-XaJDIr5h.js +0 -101
- package/chunks/ListBoxPopover-DOmhA5xx.js +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 17.1.0 (2026-02-18)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components, combobox:** add new prop listBoxProps ([#1061](https://github.com/migrationsverket/midas/pull/1061))
|
|
6
|
+
|
|
7
|
+
### 🧪 Tests updated
|
|
8
|
+
|
|
9
|
+
- **components:** setup custom render wrapper ([527bc0edf4](https://github.com/migrationsverket/midas/commit/527bc0edf4))
|
|
10
|
+
- **components:** make browser tests pass in headed Playwright mode ([22e76b8727](https://github.com/migrationsverket/midas/commit/22e76b8727))
|
|
11
|
+
|
|
1
12
|
## 17.0.2 (2026-02-17)
|
|
2
13
|
|
|
3
14
|
### 🩹 Fixes
|
package/assets/ComboBox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._combobox_1awtk_1{font-family:var(--midas-typography-font-family);display:flex;flex-direction:column}._combobox_1awtk_1[data-invalid] ._inputField_1awtk_6{border:.125rem solid var(--midas-support-border-warning)}._inputField_1awtk_6{box-sizing:border-box;width:-webkit-fill-available;padding-left:1rem;border:none;border-bottom:1px solid var(--midas-border-color-primary);border-radius:0;font-size:1rem;color:var(--midas-text-primary);height:var(--midas-size-150);background-color:var(--midas-field-01-base)}@media(forced-colors:active){._inputField_1awtk_6{border:1px solid}}._inputField_1awtk_6._medium_1awtk_27{height:var(--midas-size-130)}._inputField_1awtk_6[data-hovered],._inputField_1awtk_6:has(+[data-hovered]){background-color:var(--midas-field-01-hover)}._inputField_1awtk_6::placeholder{color:var(--midas-text-placeholder)}._inputField_1awtk_6:focus-visible,._inputField_1awtk_6[data-focus-visible]{outline:none}._inputField_1awtk_6[data-focused],._inputField_1awtk_6[data-focus-visible]{box-shadow:var(--midas-state-focus)}@media(forced-colors:active){._inputField_1awtk_6[data-focused],._inputField_1awtk_6[data-focus-visible]{outline:3px solid highlight;outline-offset:2px}}._inputField_1awtk_6[data-disabled]{color:var(--midas-text-disabled);background:var(--midas-field-disabled);box-shadow:none;border-bottom:.063rem solid var(--midas-border-color-disabled);cursor:not-allowed}._inputField_1awtk_6[data-readonly]{background-color:transparent;border-color:var(--midas-border-color-subtle)}._inputField_1awtk_6[data-readonly][data-focused],._inputField_1awtk_6[data-readonly][data-focus-visible]{box-shadow:none}._text_1awtk_74{font-size:.875rem;margin-bottom:.5rem}._wrap_1awtk_79{grid-area:Input;position:relative;gap:.5rem}._button_1awtk_85{display:flex;align-items:center;border:none;padding:var(--midas-size-70);color:var(--midas-icon-primary);background-color:transparent;position:absolute;top:0;right:0;height:var(--midas-size-150);transition:transform .3s ease}._button_1awtk_85._medium_1awtk_27{height:var(--midas-size-130);padding:var(--midas-size-50) var(--midas-size-70)}._button_1awtk_85[aria-expanded=true]{transform:rotate(180deg)}._button_1awtk_85[data-disabled]{cursor:not-allowed;color:var(--midas-icon-disabled)}[data-readonly] ._button_1awtk_85[data-disabled]{color:var(--midas-icon-read-only)}._button_1awtk_85[data-hovered]{cursor:pointer}._icon_1awtk_121{display:flex;align-items:center;transition:transform .3s ease}@media(prefers-reduced-motion){._button_1awtk_85,._icon_1awtk_121{transition:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._listBoxEmptyState_18j20_1{display:block;line-height:var(--midas-typography-line-height-30);padding:var(--midas-size-80) var(--midas-size-80) var(--midas-size-60) var(--midas-size-80)}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import L from "react";
|
|
4
|
+
import { ComboBox as F, Input as v, Button as R } from "react-aria-components";
|
|
5
|
+
import { c as s } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import { a as y, L as B } from "./Label-6GZmmff9.js";
|
|
7
|
+
import { T as k } from "./Text-BuXvuoqM.js";
|
|
8
|
+
import { F as u } from "./FieldError-BMTrvSof.js";
|
|
9
|
+
import { L as C } from "./ListBox-D5BBeZWL.js";
|
|
10
|
+
import { a as N, L as g } from "./ListBoxEmptyState-_Cn38cQ6.js";
|
|
11
|
+
import { C as E } from "./chevron-down-BBFYYzZq.js";
|
|
12
|
+
import { u as S } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
13
|
+
import '../assets/ComboBox.css';const T = "_combobox_1awtk_1", j = "_inputField_1awtk_6", I = "_medium_1awtk_27", O = "_wrap_1awtk_79", U = "_button_1awtk_85", z = "_icon_1awtk_121", t = {
|
|
14
|
+
combobox: T,
|
|
15
|
+
inputField: j,
|
|
16
|
+
medium: I,
|
|
17
|
+
wrap: O,
|
|
18
|
+
button: U,
|
|
19
|
+
icon: z
|
|
20
|
+
}, D = { showList: "Show list", noResultsFound: "No results found" }, M = { showList: "Visa lista", noResultsFound: "Inga träffar" }, V = {
|
|
21
|
+
en: D,
|
|
22
|
+
sv: M
|
|
23
|
+
};
|
|
24
|
+
function Y({
|
|
25
|
+
label: a,
|
|
26
|
+
description: i,
|
|
27
|
+
errorMessage: r,
|
|
28
|
+
children: p,
|
|
29
|
+
items: f,
|
|
30
|
+
className: _,
|
|
31
|
+
errorPosition: n = "top",
|
|
32
|
+
size: m = "large",
|
|
33
|
+
popover: h,
|
|
34
|
+
listBoxProps: b,
|
|
35
|
+
...e
|
|
36
|
+
}) {
|
|
37
|
+
const d = L.useRef(null), l = S(V), w = (x) => {
|
|
38
|
+
x.currentTarget.value && d.current?.select();
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ c(
|
|
41
|
+
F,
|
|
42
|
+
{
|
|
43
|
+
className: s(t.combobox, _),
|
|
44
|
+
...e,
|
|
45
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ o(y, { popover: h, children: a && /* @__PURE__ */ o(B, { children: a }) }),
|
|
48
|
+
i && /* @__PURE__ */ o(k, { slot: "description", children: i }),
|
|
49
|
+
n === "top" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: r }),
|
|
50
|
+
/* @__PURE__ */ c("div", { className: t.wrap, children: [
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
v,
|
|
53
|
+
{
|
|
54
|
+
className: s(t.inputField, {
|
|
55
|
+
[t.medium]: m === "medium"
|
|
56
|
+
}),
|
|
57
|
+
"data-readonly": e.isReadOnly || void 0,
|
|
58
|
+
onMouseUp: w,
|
|
59
|
+
ref: d
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ o(
|
|
63
|
+
R,
|
|
64
|
+
{
|
|
65
|
+
className: s(t.button, {
|
|
66
|
+
[t.medium]: m === "medium"
|
|
67
|
+
}),
|
|
68
|
+
"aria-label": l.format("showList"),
|
|
69
|
+
children: /* @__PURE__ */ o(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: t.icon,
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
children: /* @__PURE__ */ o(
|
|
75
|
+
E,
|
|
76
|
+
{
|
|
77
|
+
size: 20,
|
|
78
|
+
"aria-hidden": !0
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] }),
|
|
86
|
+
n === "bottom" && /* @__PURE__ */ o(u, { "data-testid": "fieldError", children: r }),
|
|
87
|
+
/* @__PURE__ */ o(N, { offset: 4, children: /* @__PURE__ */ o(
|
|
88
|
+
C,
|
|
89
|
+
{
|
|
90
|
+
items: f,
|
|
91
|
+
renderEmptyState: () => /* @__PURE__ */ o(g, { children: l.format("noResultsFound") }),
|
|
92
|
+
...b,
|
|
93
|
+
children: p
|
|
94
|
+
}
|
|
95
|
+
) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
Y as C
|
|
102
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "./clsx-AexbMWKp.js";
|
|
3
|
+
import { Popover as r } from "react-aria-components";
|
|
4
|
+
import { s as a } from "./ListBox-D5BBeZWL.js";
|
|
5
|
+
import { T as p } from "./Text-BuXvuoqM.js";
|
|
6
|
+
import '../assets/ListBoxEmptyState.css';const n = ({
|
|
7
|
+
className: t,
|
|
8
|
+
children: o,
|
|
9
|
+
...e
|
|
10
|
+
}) => /* @__PURE__ */ s(
|
|
11
|
+
r,
|
|
12
|
+
{
|
|
13
|
+
className: m(t, a.listBoxPopover),
|
|
14
|
+
offset: 0,
|
|
15
|
+
...e,
|
|
16
|
+
children: o
|
|
17
|
+
}
|
|
18
|
+
), i = "_listBoxEmptyState_18j20_1", x = {
|
|
19
|
+
listBoxEmptyState: i
|
|
20
|
+
}, E = ({ className: t, ...o }) => /* @__PURE__ */ s(
|
|
21
|
+
p,
|
|
22
|
+
{
|
|
23
|
+
className: m(t, x.listBoxEmptyState),
|
|
24
|
+
...o
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
export {
|
|
28
|
+
E as L,
|
|
29
|
+
n as a
|
|
30
|
+
};
|
package/combobox/ComboBox.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { ComboBoxProps as AriaComboBoxProps, ValidationResult } from 'react-aria-components';
|
|
3
3
|
import { InfoPopoverProps } from '../label';
|
|
4
4
|
import { Size } from '../common/types';
|
|
5
|
+
import { ListBoxProps } from '../list-box';
|
|
5
6
|
export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children'> {
|
|
6
7
|
label?: string;
|
|
7
8
|
description?: string;
|
|
@@ -15,5 +16,6 @@ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<
|
|
|
15
16
|
* */
|
|
16
17
|
size?: Size;
|
|
17
18
|
popover?: InfoPopoverProps;
|
|
19
|
+
listBoxProps?: ListBoxProps<T>;
|
|
18
20
|
}
|
|
19
|
-
export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, size, popover, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ComboBox<T extends object>({ label, description, errorMessage, children, items, className, errorPosition, size, popover, listBoxProps, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
package/combobox/index.js
CHANGED
package/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import { B as m, a as i } from "./chunks/BadgeContainer-CKVsfTlF.js";
|
|
|
4
4
|
import { B as n, a as d } from "./chunks/Breadcrumb-CHldDcyz.js";
|
|
5
5
|
import { B as c } from "./chunks/Button-CaLOUTDO.js";
|
|
6
6
|
import { B as u } from "./chunks/ButtonGroup-Dr6HOBo2.js";
|
|
7
|
-
import { C, R as
|
|
8
|
-
import { C as
|
|
7
|
+
import { C as B, R as C } from "./chunks/RangeCalendar-DIMxoHhy.js";
|
|
8
|
+
import { C as b, a as S, b as D, c as I, d as R, e as G, f as P } from "./chunks/Card-DMSnokPn.js";
|
|
9
9
|
import { C as v } from "./chunks/CharacterCounter-Dgnv-orm.js";
|
|
10
10
|
import { C as M } from "./chunks/Checkbox-CRLj7_Ox.js";
|
|
11
11
|
import { C as h } from "./chunks/CheckboxGroup-DooCBqUG.js";
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
12
|
+
import { C as y } from "./chunks/ColorSchemeSwitch-DOQ0yjtt.js";
|
|
13
|
+
import { C as N } from "./chunks/ComboBox-DnqZjAqe.js";
|
|
14
14
|
import { D as z } from "./chunks/DateField-6CclHfL2.js";
|
|
15
15
|
import { D as Q, a as V, b as Z } from "./chunks/DateInputDivider-DwopMIb9.js";
|
|
16
16
|
import { D as q, a as J } from "./chunks/DateRangePicker-BoL-sn9u.js";
|
|
@@ -23,16 +23,16 @@ import { I as so } from "./chunks/InfoBanner-C4HnaXQO.js";
|
|
|
23
23
|
import { L as xo } from "./chunks/Label-6GZmmff9.js";
|
|
24
24
|
import { H as io, L as fo, N as no, S as To, a as co } from "./chunks/Layout-CFhqS9ej.js";
|
|
25
25
|
import { L as uo } from "./chunks/Link-rqGQvFQq.js";
|
|
26
|
-
import { L as
|
|
27
|
-
import { L as
|
|
26
|
+
import { L as Bo } from "./chunks/LinkButton-B1zayj7k.js";
|
|
27
|
+
import { L as Lo } from "./chunks/Logo-CCxPAmgw.js";
|
|
28
28
|
import { M as So } from "./chunks/Dialog-BHxDzbf8.js";
|
|
29
29
|
import { P as Io } from "./chunks/Popover-BcEtFiU1.js";
|
|
30
30
|
import { P as Go } from "./chunks/ProgressBar-Dg0JMQ71.js";
|
|
31
31
|
import { R as ko, a as vo } from "./chunks/Radio-CAIyBgBp.js";
|
|
32
32
|
import { S as Mo } from "./chunks/SearchField-zJUxVnR1.js";
|
|
33
33
|
import { S as ho } from "./chunks/Select-CzmgPK8V.js";
|
|
34
|
-
import { S as
|
|
35
|
-
import { S as
|
|
34
|
+
import { S as yo } from "./chunks/Skeleton-DqIHQLQl.js";
|
|
35
|
+
import { S as No } from "./chunks/Spinner-CfKMn18u.js";
|
|
36
36
|
import { C as zo, a as Oo, R as Qo, T as Vo, b as Zo, c as jo } from "./chunks/Table-UbdCFrkS.js";
|
|
37
37
|
import { T as Jo, a as Ko, b as Uo, c as Wo } from "./chunks/TabList-BaR443mu.js";
|
|
38
38
|
import { T as Yo, a as _o } from "./chunks/Tag-C7VZ0T0o.js";
|
|
@@ -41,15 +41,15 @@ import { I as ra, T as ea, a as ta, b as sa } from "./chunks/TextArea-BAMrTLDJ.j
|
|
|
41
41
|
import { G as xa, T as ma, a as ia, b as fa, t as na } from "./chunks/Toast-UPM-1ipu.js";
|
|
42
42
|
import { T as Ta, a as ca } from "./chunks/ToggleButtonGroup-CXKTrLbb.js";
|
|
43
43
|
import { T as ua, a as ga } from "./chunks/Tooltip-rDmOkGmX.js";
|
|
44
|
-
import { L as
|
|
45
|
-
import { L as
|
|
46
|
-
import { L as Pa } from "./chunks/
|
|
47
|
-
import { M as
|
|
48
|
-
import { c as
|
|
49
|
-
import { DialogTrigger as
|
|
50
|
-
import { u as
|
|
51
|
-
import { useToastState as
|
|
52
|
-
const o = "17.0
|
|
44
|
+
import { L as Ca } from "./chunks/ListBox-D5BBeZWL.js";
|
|
45
|
+
import { L as ba, a as Sa, b as Da, c as Ia, d as Ra } from "./chunks/ListBoxHeader-CL9bFH22.js";
|
|
46
|
+
import { L as Pa, a as ka } from "./chunks/ListBoxEmptyState-_Cn38cQ6.js";
|
|
47
|
+
import { M as Fa, a as Ma, b as Aa, c as ha, S as Ha } from "./chunks/Separator-XIzn8lsq.js";
|
|
48
|
+
import { c as Ea } from "./chunks/clsx-AexbMWKp.js";
|
|
49
|
+
import { DialogTrigger as wa, MenuTrigger as za, RouterProvider as Oa } from "react-aria-components";
|
|
50
|
+
import { u as Va } from "./chunks/useLocalizedStringFormatter-BHvsRxDk.js";
|
|
51
|
+
import { useToastState as ja } from "react-stately";
|
|
52
|
+
const o = "17.1.0", a = {
|
|
53
53
|
version: o
|
|
54
54
|
}, r = a.version;
|
|
55
55
|
export {
|
|
@@ -61,8 +61,8 @@ export {
|
|
|
61
61
|
d as Breadcrumbs,
|
|
62
62
|
c as Button,
|
|
63
63
|
u as ButtonGroup,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
B as Calendar,
|
|
65
|
+
b as Card,
|
|
66
66
|
S as CardActionArea,
|
|
67
67
|
D as CardActions,
|
|
68
68
|
I as CardContent,
|
|
@@ -73,16 +73,16 @@ export {
|
|
|
73
73
|
v as CharacterCounter,
|
|
74
74
|
M as Checkbox,
|
|
75
75
|
h as CheckboxGroup,
|
|
76
|
-
|
|
76
|
+
y as ColorSchemeSwitch,
|
|
77
77
|
Oo as Column,
|
|
78
|
-
|
|
78
|
+
N as ComboBox,
|
|
79
79
|
z as DateField,
|
|
80
80
|
Q as DateInput,
|
|
81
81
|
V as DateInputDivider,
|
|
82
82
|
q as DatePicker,
|
|
83
83
|
J as DateRangePicker,
|
|
84
84
|
Z as DateSegment,
|
|
85
|
-
|
|
85
|
+
wa as DialogTrigger,
|
|
86
86
|
X as DropZone,
|
|
87
87
|
U as FieldError,
|
|
88
88
|
Y as FileTrigger,
|
|
@@ -96,36 +96,37 @@ export {
|
|
|
96
96
|
xo as Label,
|
|
97
97
|
fo as Layout,
|
|
98
98
|
uo as Link,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
Bo as LinkButton,
|
|
100
|
+
Ca as ListBox,
|
|
101
|
+
ba as ListBoxButton,
|
|
102
|
+
Pa as ListBoxEmptyState,
|
|
102
103
|
Sa as ListBoxHeader,
|
|
103
104
|
Da as ListBoxItem,
|
|
104
105
|
Ia as ListBoxLoadMoreItem,
|
|
105
|
-
|
|
106
|
+
ka as ListBoxPopover,
|
|
106
107
|
Ra as ListBoxSection,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
Lo as Logo,
|
|
109
|
+
Fa as Menu,
|
|
110
|
+
Ma as MenuItem,
|
|
111
|
+
Aa as MenuPopover,
|
|
112
|
+
ha as MenuSection,
|
|
113
|
+
za as MenuTrigger,
|
|
113
114
|
So as Modal,
|
|
114
115
|
no as Navbar,
|
|
115
116
|
Io as Popover,
|
|
116
117
|
Go as ProgressBar,
|
|
117
118
|
ko as Radio,
|
|
118
119
|
vo as RadioGroup,
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
C as RangeCalendar,
|
|
121
|
+
Oa as RouterProvider,
|
|
121
122
|
Qo as Row,
|
|
122
123
|
Mo as SearchField,
|
|
123
124
|
ho as Select,
|
|
124
|
-
|
|
125
|
+
Ha as Separator,
|
|
125
126
|
To as Sidebar,
|
|
126
127
|
co as SidebarLink,
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
yo as Skeleton,
|
|
129
|
+
No as Spinner,
|
|
129
130
|
Jo as Tab,
|
|
130
131
|
Ko as TabList,
|
|
131
132
|
Uo as TabPanel,
|
|
@@ -147,8 +148,8 @@ export {
|
|
|
147
148
|
ua as Tooltip,
|
|
148
149
|
ga as TooltipTrigger,
|
|
149
150
|
r as VERSION,
|
|
150
|
-
|
|
151
|
+
Ea as clsx,
|
|
151
152
|
na as toastQueue,
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
Va as useLocalizedStringFormatter,
|
|
154
|
+
ja as useToastState
|
|
154
155
|
};
|
package/list-box/ListBox.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ListBoxProps } from 'react-aria-components';
|
|
2
|
-
|
|
3
|
-
export declare const ListBox: <T extends object
|
|
2
|
+
export type { ListBoxProps };
|
|
3
|
+
export declare const ListBox: <T extends object>({ className, children, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/list-box/index.d.ts
CHANGED
package/list-box/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { L as s } from "../chunks/ListBox-D5BBeZWL.js";
|
|
2
|
-
import { L
|
|
3
|
-
import { L as m } from "../chunks/
|
|
2
|
+
import { L, a as e, b as x, c as i, d as r } from "../chunks/ListBoxHeader-CL9bFH22.js";
|
|
3
|
+
import { L as m, a as p } from "../chunks/ListBoxEmptyState-_Cn38cQ6.js";
|
|
4
4
|
export {
|
|
5
5
|
s as ListBox,
|
|
6
|
-
|
|
6
|
+
L as ListBoxButton,
|
|
7
|
+
m as ListBoxEmptyState,
|
|
7
8
|
e as ListBoxHeader,
|
|
8
9
|
x as ListBoxItem,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
i as ListBoxLoadMoreItem,
|
|
11
|
+
p as ListBoxPopover,
|
|
12
|
+
r as ListBoxSection
|
|
12
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListBoxEmptyState';
|
package/package.json
CHANGED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import y from "react";
|
|
4
|
-
import { ComboBox as F, Input as w, Button as v } from "react-aria-components";
|
|
5
|
-
import { c as s } from "./clsx-AexbMWKp.js";
|
|
6
|
-
import { a as R, L as N } from "./Label-6GZmmff9.js";
|
|
7
|
-
import { T as u } from "./Text-BuXvuoqM.js";
|
|
8
|
-
import { F as p } from "./FieldError-BMTrvSof.js";
|
|
9
|
-
import { L as S } from "./ListBox-D5BBeZWL.js";
|
|
10
|
-
import { L as B } from "./ListBoxPopover-DOmhA5xx.js";
|
|
11
|
-
import { C } from "./chevron-down-BBFYYzZq.js";
|
|
12
|
-
import { u as g } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
13
|
-
import '../assets/ComboBox.css';const E = "_combobox_1m9te_1", T = "_inputField_1m9te_6", j = "_medium_1m9te_27", I = "_wrap_1m9te_79", O = "_button_1m9te_85", U = "_icon_1m9te_121", z = "_emptyState_1m9te_127", o = {
|
|
14
|
-
combobox: E,
|
|
15
|
-
inputField: T,
|
|
16
|
-
medium: j,
|
|
17
|
-
wrap: I,
|
|
18
|
-
button: O,
|
|
19
|
-
icon: U,
|
|
20
|
-
emptyState: z
|
|
21
|
-
}, D = { showList: "Show list", noResultsFound: "No results found" }, M = { showList: "Visa lista", noResultsFound: "Inga träffar" }, V = {
|
|
22
|
-
en: D,
|
|
23
|
-
sv: M
|
|
24
|
-
};
|
|
25
|
-
function X({
|
|
26
|
-
label: r,
|
|
27
|
-
description: i,
|
|
28
|
-
errorMessage: a,
|
|
29
|
-
children: f,
|
|
30
|
-
items: _,
|
|
31
|
-
className: h,
|
|
32
|
-
errorPosition: n = "top",
|
|
33
|
-
size: m = "large",
|
|
34
|
-
popover: b,
|
|
35
|
-
...e
|
|
36
|
-
}) {
|
|
37
|
-
const d = y.useRef(null), c = g(V), x = (L) => {
|
|
38
|
-
L.currentTarget.value && d.current?.select();
|
|
39
|
-
};
|
|
40
|
-
return /* @__PURE__ */ l(
|
|
41
|
-
F,
|
|
42
|
-
{
|
|
43
|
-
className: s(o.combobox, h),
|
|
44
|
-
...e,
|
|
45
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ t(R, { popover: b, children: r && /* @__PURE__ */ t(N, { children: r }) }),
|
|
48
|
-
i && /* @__PURE__ */ t(u, { slot: "description", children: i }),
|
|
49
|
-
n === "top" && /* @__PURE__ */ t(p, { "data-testid": "fieldError", children: a }),
|
|
50
|
-
/* @__PURE__ */ l("div", { className: o.wrap, children: [
|
|
51
|
-
/* @__PURE__ */ t(
|
|
52
|
-
w,
|
|
53
|
-
{
|
|
54
|
-
className: s(o.inputField, {
|
|
55
|
-
[o.medium]: m === "medium"
|
|
56
|
-
}),
|
|
57
|
-
"data-readonly": e.isReadOnly || void 0,
|
|
58
|
-
onMouseUp: x,
|
|
59
|
-
ref: d
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ t(
|
|
63
|
-
v,
|
|
64
|
-
{
|
|
65
|
-
className: s(o.button, {
|
|
66
|
-
[o.medium]: m === "medium"
|
|
67
|
-
}),
|
|
68
|
-
"aria-label": c.format("showList"),
|
|
69
|
-
children: /* @__PURE__ */ t(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
className: o.icon,
|
|
73
|
-
"aria-hidden": "true",
|
|
74
|
-
children: /* @__PURE__ */ t(
|
|
75
|
-
C,
|
|
76
|
-
{
|
|
77
|
-
size: 20,
|
|
78
|
-
"aria-hidden": !0
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] }),
|
|
86
|
-
n === "bottom" && /* @__PURE__ */ t(p, { "data-testid": "fieldError", children: a }),
|
|
87
|
-
/* @__PURE__ */ t(B, { offset: 4, children: /* @__PURE__ */ t(
|
|
88
|
-
S,
|
|
89
|
-
{
|
|
90
|
-
items: _,
|
|
91
|
-
renderEmptyState: () => /* @__PURE__ */ t(u, { className: o.emptyState, children: c.format("noResultsFound") }),
|
|
92
|
-
children: f
|
|
93
|
-
}
|
|
94
|
-
) })
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
export {
|
|
100
|
-
X as C
|
|
101
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "./clsx-AexbMWKp.js";
|
|
3
|
-
import { Popover as e } from "react-aria-components";
|
|
4
|
-
import { s as p } from "./ListBox-D5BBeZWL.js";
|
|
5
|
-
const c = ({
|
|
6
|
-
className: o,
|
|
7
|
-
children: r,
|
|
8
|
-
...s
|
|
9
|
-
}) => /* @__PURE__ */ t(
|
|
10
|
-
e,
|
|
11
|
-
{
|
|
12
|
-
className: m(o, p.listBoxPopover),
|
|
13
|
-
offset: 0,
|
|
14
|
-
...s,
|
|
15
|
-
children: r
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
export {
|
|
19
|
-
c as L
|
|
20
|
-
};
|