@midas-ds/components 16.4.2 โ 16.4.3
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 +14 -0
- package/accordion/Accordion.d.ts +6 -2
- package/accordion/Accordion.stories.d.ts +1 -1
- package/accordion/AccordionItem.d.ts +2 -3
- package/accordion/AccordionItem.stories.d.ts +22 -0
- package/accordion/index.d.ts +1 -1
- package/accordion/index.js +1 -1
- package/chunks/{AccordionItem-Cu5L1c1h.js โ AccordionItem-DnWNOVQg.js} +2 -2
- package/combobox/ComboBox.stories.d.ts +2 -6
- package/index.js +1 -1
- package/legacy-select/LegacySelect.stories.d.ts +1 -1
- package/package.json +1 -1
- package/select/Select.stories.d.ts +4 -3
- package/combobox/utils.d.ts +0 -12
- package/legacy-select/utils.d.ts +0 -11
- package/utils/tests.d.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 16.4.3 (2026-01-20)
|
|
2
|
+
|
|
3
|
+
### ๐ Features
|
|
4
|
+
|
|
5
|
+
- **test-utils:** add tool for common test utils ([eb2df9b414](https://github.com/migrationsverket/midas/commit/eb2df9b414))
|
|
6
|
+
|
|
7
|
+
### ๐ฉน Fixes
|
|
8
|
+
|
|
9
|
+
- **components, accordion:** rename types ([2f9f64de2f](https://github.com/migrationsverket/midas/commit/2f9f64de2f))
|
|
10
|
+
|
|
11
|
+
### ๐งช Tests updated
|
|
12
|
+
|
|
13
|
+
- **components:** update failing tests after data change ([ec21833a37](https://github.com/migrationsverket/midas/commit/ec21833a37))
|
|
14
|
+
|
|
1
15
|
## 16.4.2 (2026-01-19)
|
|
2
16
|
|
|
3
17
|
### ๐ฉน Fixes
|
package/accordion/Accordion.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DisclosureGroupProps } from 'react-aria-components';
|
|
2
2
|
import { Size } from '../common/types';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
export interface
|
|
4
|
+
export interface AccordionProps extends DisclosureGroupProps {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
isContained?: boolean;
|
|
@@ -10,7 +10,11 @@ export interface MidasAccordion extends DisclosureGroupProps {
|
|
|
10
10
|
**/
|
|
11
11
|
size?: Size;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated since v 16.4.1 please use AccordionProps instead
|
|
15
|
+
*/
|
|
16
|
+
export type MidasAccordion = AccordionProps;
|
|
13
17
|
/**
|
|
14
18
|
* Accordions help reduce visual clutter on a page by organizing content into collapsible sections.
|
|
15
19
|
*/
|
|
16
|
-
export declare const Accordion: React.FC<
|
|
20
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
3
3
|
import { Accordion } from '.';
|
|
4
4
|
type Story = StoryObj<typeof Accordion>;
|
|
5
5
|
declare const _default: {
|
|
6
|
-
component: React.FC<import('./Accordion').
|
|
6
|
+
component: React.FC<import('./Accordion').AccordionProps>;
|
|
7
7
|
subcomponents: {
|
|
8
8
|
AccordionItem: React.ComponentType<unknown>;
|
|
9
9
|
};
|
|
@@ -3,7 +3,7 @@ import { HeadingProps } from '../heading';
|
|
|
3
3
|
import { FeedbackStatus, Size } from '../common/types';
|
|
4
4
|
import { FeedbackStatusIconProps } from '../common/FeedbackStatusIcon';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
interface
|
|
6
|
+
export interface AccordionItemProps extends Omit<DisclosureProps, 'children'> {
|
|
7
7
|
/** The text displayed in the collapsed state. If a ReactNode is provided, a heading will not be automatically added, and you must provide one yourself. */
|
|
8
8
|
title?: string | React.ReactNode;
|
|
9
9
|
children?: React.ReactNode;
|
|
@@ -26,5 +26,4 @@ interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
|
|
|
26
26
|
*/
|
|
27
27
|
iconAriaLabel?: FeedbackStatusIconProps['aria-label'];
|
|
28
28
|
}
|
|
29
|
-
export declare const AccordionItem: React.FC<
|
|
30
|
-
export {};
|
|
29
|
+
export declare const AccordionItem: React.FC<AccordionItemProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { AccordionItem } from './AccordionItem';
|
|
3
|
+
type Story = StoryObj<typeof AccordionItem>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('./AccordionItem').AccordionItemProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
title: string;
|
|
10
|
+
children: string;
|
|
11
|
+
size: "large";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Contained: Story;
|
|
17
|
+
export declare const Success: Story;
|
|
18
|
+
export declare const Info: Story;
|
|
19
|
+
export declare const Warning: Story;
|
|
20
|
+
export declare const Important: Story;
|
|
21
|
+
export declare const Disabled: Story;
|
|
22
|
+
export declare const StatusDisabled: Story;
|
package/accordion/index.d.ts
CHANGED
package/accordion/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { optionsWithSections } from '
|
|
2
|
+
import { options, optionsWithSections } from '../../../../tools/test-utils/src/index.ts';
|
|
3
3
|
import { ComboBox } from './ComboBox';
|
|
4
4
|
type Item = (typeof options)[0];
|
|
5
5
|
type Section = (typeof optionsWithSections)[0];
|
|
6
6
|
type Story<T extends object = Item> = StoryObj<typeof ComboBox<T>>;
|
|
7
|
-
declare const options: {
|
|
8
|
-
id: number;
|
|
9
|
-
name: string;
|
|
10
|
-
}[];
|
|
11
7
|
declare const _default: {
|
|
12
8
|
component: typeof ComboBox;
|
|
13
9
|
title: string;
|
|
@@ -26,7 +22,7 @@ declare const _default: {
|
|
|
26
22
|
};
|
|
27
23
|
};
|
|
28
24
|
render: (args: import('./ComboBox').ComboBoxProps<{
|
|
29
|
-
id:
|
|
25
|
+
id: import('react-aria').Key;
|
|
30
26
|
name: string;
|
|
31
27
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
32
28
|
};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as r, a as e } from "./chunks/AccordionItem-DnWNOVQg.js";
|
|
2
2
|
import { B as s, a as p } from "./chunks/BadgeContainer-CKVsfTlF.js";
|
|
3
3
|
import { B as m } from "./chunks/Breadcrumbs-By2bMbQd.js";
|
|
4
4
|
import { B as f } from "./chunks/Button-BYrLbzir.js";
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { options, optionsWithSections } from '
|
|
2
|
+
import { options, optionsWithSections } from '../../../../tools/test-utils/src/index.ts';
|
|
3
|
+
import { Key } from 'react-aria-components';
|
|
3
4
|
import { Select, SelectionMode } from './Select';
|
|
4
5
|
type Story<T extends object = Item, M extends SelectionMode = 'single'> = StoryObj<typeof Select<T, M>>;
|
|
5
6
|
type Item = (typeof options)[0];
|
|
@@ -10,16 +11,16 @@ declare const _default: {
|
|
|
10
11
|
tags: string[];
|
|
11
12
|
args: {
|
|
12
13
|
children: (item: {
|
|
14
|
+
id: Key;
|
|
13
15
|
name: string;
|
|
14
|
-
id: string;
|
|
15
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
description: string;
|
|
17
18
|
isDisabled: false;
|
|
18
19
|
isSelectableAll: false;
|
|
19
20
|
label: string;
|
|
20
21
|
items: {
|
|
22
|
+
id: Key;
|
|
21
23
|
name: string;
|
|
22
|
-
id: string;
|
|
23
24
|
}[];
|
|
24
25
|
placeholder: string;
|
|
25
26
|
selectionMode: "single";
|
package/combobox/utils.d.ts
DELETED
package/legacy-select/utils.d.ts
DELETED
package/utils/tests.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const options: {
|
|
2
|
-
name: string;
|
|
3
|
-
id: string;
|
|
4
|
-
}[];
|
|
5
|
-
export declare const mockedNow: import('@internationalized/date').CalendarDate;
|
|
6
|
-
export declare function generateMockOptions(count: number): {
|
|
7
|
-
id: number;
|
|
8
|
-
name: string;
|
|
9
|
-
}[];
|
|
10
|
-
export declare const optionsWithSections: {
|
|
11
|
-
name: string;
|
|
12
|
-
id: number;
|
|
13
|
-
children: {
|
|
14
|
-
name: string;
|
|
15
|
-
id: number;
|
|
16
|
-
}[];
|
|
17
|
-
}[];
|