@midas-ds/components 10.1.0 → 10.1.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 +33 -0
- package/card/Card.d.ts +3 -0
- package/combobox/ComboBox.d.ts +9 -5
- package/combobox/index.d.ts +1 -1
- package/combobox/types.d.ts +6 -0
- package/combobox/utils.d.ts +3 -10
- package/index.cjs +39 -34
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.js +5449 -5514
- package/link/Link.d.ts +4 -1
- package/link-button/LinkButton.d.ts +24 -1
- package/list-box/ListBox.d.ts +4 -0
- package/list-box/ListBoxButton.d.ts +2 -0
- package/list-box/ListBoxItem.d.ts +3 -0
- package/list-box/ListBoxPopover.d.ts +3 -0
- package/list-box/ListBoxSection.d.ts +8 -0
- package/list-box/index.d.ts +6 -0
- package/list-box/types.d.ts +23 -0
- package/package.json +1 -1
- package/select/HiddenMultiSelect.d.ts +5 -4
- package/select/MultiSelectValueTag.d.ts +11 -0
- package/select/Select.d.ts +2 -77
- package/select/SelectFieldError.d.ts +8 -0
- package/select/SelectListBox.d.ts +4 -3
- package/select/SelectTrigger.d.ts +10 -0
- package/select/index.d.ts +1 -0
- package/select/types.d.ts +188 -0
- package/select/useMultiSelect.d.ts +4 -21
- package/select/useMultiSelectListState.d.ts +3 -15
- package/select/useMultiSelectState.d.ts +3 -19
- package/utils/test.d.ts +1 -1
- package/select/SelectPopover.d.ts +0 -10
- /package/{select → list-box}/SectionedListLayout.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 10.1.1 (2025-06-09)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **combobox:** remove label element in ListBoxSection ([#631](https://github.com/migrationsverket/midas/pull/631))
|
|
6
|
+
- **link:** better icon logic on links, support for external and download ([#617](https://github.com/migrationsverket/midas/pull/617))
|
|
7
|
+
- **date-picker:** fix height issue with button in field ([#623](https://github.com/migrationsverket/midas/pull/623))
|
|
8
|
+
- **link-button:** add support for medium size ([#618](https://github.com/migrationsverket/midas/pull/618))
|
|
9
|
+
- replace invalid token --blue-140 ([#620](https://github.com/migrationsverket/midas/pull/620))
|
|
10
|
+
- **combobox:** virtualize the listbox ([14745432fc](https://github.com/migrationsverket/midas/commit/14745432fc))
|
|
11
|
+
|
|
12
|
+
### 💅 Refactors
|
|
13
|
+
|
|
14
|
+
- **combobox:** add explicit id prop to sections ([57b0df3264](https://github.com/migrationsverket/midas/commit/57b0df3264))
|
|
15
|
+
- **select:** merge select and combobox list item types ([ed6bbf4d50](https://github.com/migrationsverket/midas/commit/ed6bbf4d50))
|
|
16
|
+
- **select:** separate code ([01926124ee](https://github.com/migrationsverket/midas/commit/01926124ee))
|
|
17
|
+
- **select:** move list item class to list box ([a3a3a6f2e1](https://github.com/migrationsverket/midas/commit/a3a3a6f2e1))
|
|
18
|
+
- **combobox:** extract shared listbox components ([bfe30e237e](https://github.com/migrationsverket/midas/commit/bfe30e237e))
|
|
19
|
+
|
|
20
|
+
### 📖 Documentation changes
|
|
21
|
+
|
|
22
|
+
- remove broken anchor ([e2dd1e0766](https://github.com/migrationsverket/midas/commit/e2dd1e0766))
|
|
23
|
+
- **release-notes:** add release notes for 10.1.0 ([a912e097bc](https://github.com/migrationsverket/midas/commit/a912e097bc))
|
|
24
|
+
|
|
25
|
+
### 🔧 Maintenance
|
|
26
|
+
|
|
27
|
+
- **docs:** update docusaurus ([64d69a5239](https://github.com/migrationsverket/midas/commit/64d69a5239))
|
|
28
|
+
- update test files with changed props ([fd165fa775](https://github.com/migrationsverket/midas/commit/fd165fa775))
|
|
29
|
+
- **deps-dev:** bump next in the npm_and_yarn group across 1 directory ([2b6d2af5e7](https://github.com/migrationsverket/midas/commit/2b6d2af5e7))
|
|
30
|
+
- **deps:** bump tar-fs in the npm_and_yarn group across 1 directory ([f3b185c8e6](https://github.com/migrationsverket/midas/commit/f3b185c8e6))
|
|
31
|
+
- test chromatic build ([8613c3cded](https://github.com/migrationsverket/midas/commit/8613c3cded))
|
|
32
|
+
- **link-button:** remove the story icon from the storybook ([251945d26f](https://github.com/migrationsverket/midas/commit/251945d26f))
|
|
33
|
+
|
|
1
34
|
## 10.1.0 (2025-05-23)
|
|
2
35
|
|
|
3
36
|
### 🚀 Features
|
package/card/Card.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export interface MidasCardImage {
|
|
|
19
19
|
}
|
|
20
20
|
interface MidasCardLink<C extends React.ElementType> {
|
|
21
21
|
children: React.ReactNode;
|
|
22
|
+
/** Replace base component with any Client Side Routing link instead.
|
|
23
|
+
* @see {@link https://designsystem.migrationsverket.se/dev/client-side-routing/|Client side routing}
|
|
24
|
+
*/
|
|
22
25
|
as?: C;
|
|
23
26
|
}
|
|
24
27
|
export type MidasCardLinkProps<C extends React.ElementType> = MidasCardLink<C> & Omit<React.ComponentProps<C>, keyof MidasCardLink<C>>;
|
package/combobox/ComboBox.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps, ValidationResult } from 'react-aria-components';
|
|
3
|
-
import { Item, Section } from './types';
|
|
4
3
|
import { Size } from '../common/types';
|
|
5
|
-
|
|
4
|
+
import { ListBoxOption, ListBoxItemElement, ListBoxSectionElement } from '../list-box';
|
|
5
|
+
export interface ComboBoxProps<T extends ListBoxOption> extends Omit<AriaComboBoxProps<T>, 'children'> {
|
|
6
6
|
label?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
@@ -15,6 +15,10 @@ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<
|
|
|
15
15
|
* */
|
|
16
16
|
size?: Size;
|
|
17
17
|
}
|
|
18
|
-
export declare function ComboBox<T extends
|
|
19
|
-
export declare function ComboBoxItem(props: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
|
|
18
|
+
export declare function ComboBox<T extends ListBoxOption>({ label, description, errorMessage, children, items, className, errorPosition, size, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function ComboBoxItem<T extends ListBoxItemElement>(props: ListBoxItemProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated since v.10.1.0 please use `ComboBoxSection` instead
|
|
22
|
+
*/
|
|
23
|
+
export declare function ComboBoxSelection<T extends ListBoxSectionElement>(props: T): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function ComboBoxSection<T extends ListBoxSectionElement>(props: T): import("react/jsx-runtime").JSX.Element;
|
package/combobox/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ComboBox, ComboBoxItem, ComboBoxSelection } from './ComboBox';
|
|
1
|
+
export { ComboBox, ComboBoxItem, ComboBoxSelection, ComboBoxSection, } from './ComboBox';
|
|
2
2
|
export type { Section, Item } from './types';
|
package/combobox/types.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated since v.10.1.0 please use `ListBoxItemElement` instead
|
|
3
|
+
*/
|
|
1
4
|
export type Item = {
|
|
2
5
|
id: number;
|
|
3
6
|
name: string;
|
|
4
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated since v10.1.0 please use `ListBoxSectionElement` instead
|
|
10
|
+
*/
|
|
5
11
|
export type Section<T> = Item & {
|
|
6
12
|
children?: Iterable<T>;
|
|
7
13
|
};
|
package/combobox/utils.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function generateMockOptions(count: number):
|
|
3
|
-
export declare const optionsWithSections:
|
|
4
|
-
name: string;
|
|
5
|
-
id: number;
|
|
6
|
-
children: {
|
|
7
|
-
name: string;
|
|
8
|
-
id: number;
|
|
9
|
-
}[];
|
|
10
|
-
}[];
|
|
1
|
+
import { ListBoxItemElement, ListBoxSectionElement } from '../list-box';
|
|
2
|
+
export declare function generateMockOptions(count: number): ListBoxItemElement[];
|
|
3
|
+
export declare const optionsWithSections: ListBoxSectionElement[];
|