@midas-ds/components 17.18.0 → 17.19.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/chunks/{combobox-Ids5V9io.js → combobox-UjxDfSoD.js} +1 -1
- package/chunks/{list-box-BozMU8so.js → list-box-DvX6VTa1.js} +10 -7
- package/chunks/{select-Dlp6n8oE.js → select-DneAUko_.js} +12 -11
- package/combobox/ComboBox.stories.d.ts +1 -0
- package/combobox/index.js +1 -1
- package/index.js +4 -4
- package/list-box/ListBox.d.ts +6 -3
- package/list-box/ListBox.stories.d.ts +2 -1
- package/list-box/index.js +1 -1
- package/package.json +1 -1
- package/select/Select.d.ts +6 -1
- package/select/Select.stories.d.ts +1 -0
- package/select/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 17.19.0 (2026-08-13)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **components,list-box:** add virtualized opt-out to ListBox/Select/ComboBox ([fc140394ec9](https://github.com/migrationsverket/midas/commit/fc140394ec9))
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **components,combobox:** stop relying on ArrowDown to open in CI ([9b40aeb068a](https://github.com/migrationsverket/midas/commit/9b40aeb068a))
|
|
10
|
+
- **components,combobox:** fix flaky virtualized opt-out test in CI ([8b4f9bffe21](https://github.com/migrationsverket/midas/commit/8b4f9bffe21))
|
|
11
|
+
|
|
1
12
|
## 17.18.0 (2026-08-13)
|
|
2
13
|
|
|
3
14
|
### 🚀 Features
|
|
@@ -5,7 +5,7 @@ import { t as n } from "./useLocalizedStringFormatter-bRLuRzVD.js";
|
|
|
5
5
|
import { t as r } from "./text-mAeDlv5N.js";
|
|
6
6
|
import { t as i } from "./field-error-DYp2kgFr.js";
|
|
7
7
|
import { n as a, t as o } from "./label-Bius53F0.js";
|
|
8
|
-
import { a as s, c, t as l } from "./list-box-
|
|
8
|
+
import { a as s, c, t as l } from "./list-box-DvX6VTa1.js";
|
|
9
9
|
import { useRef as u } from "react";
|
|
10
10
|
import { Button as d, ComboBox as f, Input as p } from "react-aria-components";
|
|
11
11
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -24,15 +24,18 @@ var g = class extends l {
|
|
|
24
24
|
item: "_item_48j4n_187",
|
|
25
25
|
option: "_option_48j4n_188",
|
|
26
26
|
inputCheckbox: "_inputCheckbox_48j4n_188"
|
|
27
|
-
}, v = ({ className: t, children: n,
|
|
28
|
-
|
|
29
|
-
layoutOptions: { headingHeight: 38 },
|
|
30
|
-
children: /* @__PURE__ */ m(a, {
|
|
27
|
+
}, v = ({ className: t, children: n, virtualized: r = !0, ...i }) => {
|
|
28
|
+
let o = /* @__PURE__ */ m(a, {
|
|
31
29
|
className: e(_.listBox, t),
|
|
32
|
-
...
|
|
30
|
+
...i,
|
|
33
31
|
children: n
|
|
34
|
-
})
|
|
35
|
-
|
|
32
|
+
});
|
|
33
|
+
return r ? /* @__PURE__ */ m(d, {
|
|
34
|
+
layout: g,
|
|
35
|
+
layoutOptions: { headingHeight: 38 },
|
|
36
|
+
children: o
|
|
37
|
+
}) : o;
|
|
38
|
+
}, y = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("button", {
|
|
36
39
|
type: "button",
|
|
37
40
|
className: e(_.listBoxItem, _.listBoxButton, t),
|
|
38
41
|
...r,
|
|
@@ -7,7 +7,7 @@ import { t as o } from "./text-mAeDlv5N.js";
|
|
|
7
7
|
import { t as s } from "./field-error-DYp2kgFr.js";
|
|
8
8
|
import { n as c, t as l } from "./label-Bius53F0.js";
|
|
9
9
|
import { t as u } from "./popover-Bx2Rch_E.js";
|
|
10
|
-
import { c as d } from "./list-box-
|
|
10
|
+
import { c as d } from "./list-box-DvX6VTa1.js";
|
|
11
11
|
import { n as f, r as p, t as m } from "./tag-CELJrUEQ.js";
|
|
12
12
|
import h, { useContext as g } from "react";
|
|
13
13
|
import { Button as _, Select as v, SelectStateContext as y, SelectValue as b } from "react-aria-components";
|
|
@@ -125,15 +125,15 @@ import '../assets/select.css';var E = {
|
|
|
125
125
|
};
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region packages/components/src/select/Select.tsx
|
|
128
|
-
function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m,
|
|
128
|
+
function N({ children: e, description: n, errorMessage: r, errorPosition: i = "top", items: a, label: f, popover: p, popoverProps: m, listBoxProps: h, size: g = "large", ..._ }) {
|
|
129
129
|
return /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C(v, {
|
|
130
|
-
...
|
|
131
|
-
className: t(
|
|
130
|
+
..._,
|
|
131
|
+
className: t(_.className, D.select),
|
|
132
132
|
children: [
|
|
133
133
|
/* @__PURE__ */ S(c, {
|
|
134
134
|
popover: p,
|
|
135
135
|
children: f && /* @__PURE__ */ S(l, {
|
|
136
|
-
"data-disabled":
|
|
136
|
+
"data-disabled": _.isDisabled || void 0,
|
|
137
137
|
children: f
|
|
138
138
|
})
|
|
139
139
|
}),
|
|
@@ -144,11 +144,11 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
|
|
|
144
144
|
i === "top" && /* @__PURE__ */ S(s, { children: r }),
|
|
145
145
|
/* @__PURE__ */ C("div", {
|
|
146
146
|
className: D.triggerContainer,
|
|
147
|
-
"data-disabled":
|
|
147
|
+
"data-disabled": _.isDisabled || void 0,
|
|
148
148
|
children: [/* @__PURE__ */ S(M, {
|
|
149
|
-
size:
|
|
150
|
-
...
|
|
151
|
-
}),
|
|
149
|
+
size: g,
|
|
150
|
+
..._
|
|
151
|
+
}), _.selectionMode === "multiple" ? /* @__PURE__ */ S(k, { ..._ }) : null]
|
|
152
152
|
}),
|
|
153
153
|
i === "bottom" && /* @__PURE__ */ S(s, { children: r }),
|
|
154
154
|
/* @__PURE__ */ C(u, {
|
|
@@ -156,13 +156,14 @@ function N({ children: e, description: n, errorMessage: r, errorPosition: i = "t
|
|
|
156
156
|
hideArrow: !0,
|
|
157
157
|
...m,
|
|
158
158
|
className: t(m?.className, D.popover),
|
|
159
|
-
children: [
|
|
159
|
+
children: [_.isSelectableAll && /* @__PURE__ */ S(O, {}), /* @__PURE__ */ S(d, {
|
|
160
160
|
escapeKeyBehavior: "none",
|
|
161
161
|
items: a,
|
|
162
|
+
...h,
|
|
162
163
|
children: e
|
|
163
164
|
})]
|
|
164
165
|
}),
|
|
165
|
-
/* @__PURE__ */ S(j, { ...
|
|
166
|
+
/* @__PURE__ */ S(j, { ..._ })
|
|
166
167
|
]
|
|
167
168
|
}) });
|
|
168
169
|
}
|
|
@@ -35,6 +35,7 @@ export declare const Disabled: Story;
|
|
|
35
35
|
export declare const ReadOnly: Story;
|
|
36
36
|
export declare const Required: Story;
|
|
37
37
|
export declare const Sectioned: Story<Section>;
|
|
38
|
+
export declare const NotVirtualized: Story<Section>;
|
|
38
39
|
export declare const PerformanceTest: Story;
|
|
39
40
|
export declare const AsynchronousLoadingWithEmptyMessage: Story;
|
|
40
41
|
export declare const InfiniteScroll: Story;
|
package/combobox/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/combobox-
|
|
1
|
+
import { t as e } from "../chunks/combobox-UjxDfSoD.js";
|
|
2
2
|
export { e as ComboBox };
|
package/index.js
CHANGED
|
@@ -28,8 +28,8 @@ import { n as X, r as Z, t as Q } from "./chunks/modal-Dr0ythpF.js";
|
|
|
28
28
|
import { t as $ } from "./chunks/icons-Dw_ZbztW.js";
|
|
29
29
|
import { n as ee, t as te } from "./chunks/toggle-button-DlPo9GJW.js";
|
|
30
30
|
import { a as ne, i as re, n as ie, o as ae, r as oe, t as se } from "./chunks/menu-CB6VDQ-u.js";
|
|
31
|
-
import { t as ce } from "./chunks/combobox-
|
|
32
|
-
import { a as le, c as ue, i as de, n as fe, o as pe, r as me, s as he, t as ge } from "./chunks/list-box-
|
|
31
|
+
import { t as ce } from "./chunks/combobox-UjxDfSoD.js";
|
|
32
|
+
import { a as le, c as ue, i as de, n as fe, o as pe, r as me, s as he, t as ge } from "./chunks/list-box-DvX6VTa1.js";
|
|
33
33
|
import { i as _e, n as ve, r as ye, t as be } from "./chunks/date-field-CYk8-UEY.js";
|
|
34
34
|
import { n as xe, t as Se } from "./chunks/file-upload-CZRTVw5O.js";
|
|
35
35
|
import { n as Ce, t as we } from "./chunks/grid-CUYMbO7c.js";
|
|
@@ -38,7 +38,7 @@ import { n as Ee, t as De } from "./chunks/tooltip-BE_r_CBm.js";
|
|
|
38
38
|
import { n as Oe, t as ke } from "./chunks/logo-D7tz-4hp.js";
|
|
39
39
|
import { t as Ae } from "./chunks/progress-bar-5H5WvG7R.js";
|
|
40
40
|
import { n as je, t as Me } from "./chunks/radio-CsAvwCn2.js";
|
|
41
|
-
import { t as Ne } from "./chunks/select-
|
|
41
|
+
import { t as Ne } from "./chunks/select-DneAUko_.js";
|
|
42
42
|
import { n as Pe, r as Fe, t as Ie } from "./chunks/tag-CELJrUEQ.js";
|
|
43
43
|
import { t as Le } from "./chunks/skeleton-OqKFBcmO.js";
|
|
44
44
|
import { i as Re, n as ze, r as Be, t as Ve } from "./chunks/tabs-eshGdQJJ.js";
|
|
@@ -59,7 +59,7 @@ var $e = {
|
|
|
59
59
|
description: "Midas Components",
|
|
60
60
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
61
61
|
license: "CC0-1.0",
|
|
62
|
-
version: "17.
|
|
62
|
+
version: "17.19.0",
|
|
63
63
|
module: "./index.js",
|
|
64
64
|
type: "module",
|
|
65
65
|
main: "./index.js",
|
package/list-box/ListBox.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { ListBoxProps } from 'react-aria-components';
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { ListBoxProps as AriaListBoxProps } from 'react-aria-components';
|
|
2
|
+
export interface ListBoxProps<T extends object> extends AriaListBoxProps<T> {
|
|
3
|
+
/** @default true */
|
|
4
|
+
virtualized?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ListBox: <T extends object>({ className, children, virtualized, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Fruit } from '../../../../tools/test-utils/src/index.ts';
|
|
|
3
3
|
import { ListBox } from './ListBox';
|
|
4
4
|
type Story = StoryObj<typeof ListBox<Fruit>>;
|
|
5
5
|
declare const _default: {
|
|
6
|
-
component: <T extends object>({ className, children, ...rest }: import('
|
|
6
|
+
component: <T extends object>({ className, children, virtualized, ...rest }: import('./ListBox').ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
subcomponents: {
|
|
8
8
|
ListBoxItem: <T extends object>({ children, className, textValue, ...rest }: import('react-aria-components').ListBoxItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
};
|
|
@@ -20,3 +20,4 @@ declare const _default: {
|
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
22
22
|
export declare const SelectionModeSingle: Story;
|
|
23
|
+
export declare const NotVirtualized: Story;
|
package/list-box/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/list-box-DvX6VTa1.js";
|
|
2
2
|
export { t as ListBox, o as ListBoxButton, s as ListBoxEmptyState, r as ListBoxHeader, i as ListBoxItem, a as ListBoxLoadMoreItem, e as ListBoxPopover, n as ListBoxSection };
|
package/package.json
CHANGED
package/select/Select.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SelectProps, ValidationResult } from 'react-aria-components';
|
|
2
2
|
import { InfoPopoverProps } from '../label';
|
|
3
3
|
import { Size } from '../common/types';
|
|
4
|
+
import { ListBoxProps } from '../list-box';
|
|
4
5
|
import { Popover } from '../popover';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
export type SelectionMode = 'single' | 'multiple';
|
|
@@ -35,5 +36,9 @@ export interface MidasSelectProps<T extends object, M extends SelectionMode = 's
|
|
|
35
36
|
* Props passed to the internal Popover element.
|
|
36
37
|
*/
|
|
37
38
|
popoverProps?: Omit<React.ComponentProps<typeof Popover>, 'children'>;
|
|
39
|
+
/**
|
|
40
|
+
* Props passed to the internal ListBox element.
|
|
41
|
+
*/
|
|
42
|
+
listBoxProps?: Omit<ListBoxProps<T>, 'items' | 'children'>;
|
|
38
43
|
}
|
|
39
|
-
export declare function Select<T extends object, M extends SelectionMode = 'single'>({ children, description, errorMessage, errorPosition, items, label, popover, popoverProps, size, ...props }: MidasSelectProps<T, M>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function Select<T extends object, M extends SelectionMode = 'single'>({ children, description, errorMessage, errorPosition, items, label, popover, popoverProps, listBoxProps, size, ...props }: MidasSelectProps<T, M>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,6 +41,7 @@ export declare const WithTags: Story<Item, 'multiple'>;
|
|
|
41
41
|
export declare const SelectAllEnabled: Story<Item, 'multiple'>;
|
|
42
42
|
export declare const DS872: Story;
|
|
43
43
|
export declare const StaticSections: Story;
|
|
44
|
+
export declare const NotVirtualized: Story;
|
|
44
45
|
export declare const DynamicSections: Story<Section>;
|
|
45
46
|
export declare const RequiredMultipleWithTags: Story<Item, 'multiple'>;
|
|
46
47
|
export declare const RequiredMultipleWithClearAll: Story<Item, 'multiple'>;
|
package/select/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/select-
|
|
1
|
+
import { t as e } from "../chunks/select-DneAUko_.js";
|
|
2
2
|
export { e as Select };
|