@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 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
@@ -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 MidasAccordion extends DisclosureGroupProps {
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<MidasAccordion>;
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').MidasAccordion>;
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 MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
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<MidasAccordionItem>;
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;
@@ -1,3 +1,3 @@
1
1
  export * from './Accordion';
2
2
  export type { MidasAccordion } from './Accordion';
3
- export { AccordionItem } from './AccordionItem';
3
+ export * from './AccordionItem';
@@ -1,4 +1,4 @@
1
- import { a as r, A as a } from "../chunks/AccordionItem-Cu5L1c1h.js";
1
+ import { A as r, a } from "../chunks/AccordionItem-DnWNOVQg.js";
2
2
  export {
3
3
  r as Accordion,
4
4
  a as AccordionItem
@@ -123,6 +123,6 @@ import '../assets/AccordionItem.css';const D = "_root_17bdp_1", M = "_contained_
123
123
  );
124
124
  };
125
125
  export {
126
- ot as A,
127
- et as a
126
+ et as A,
127
+ ot as a
128
128
  };
@@ -1,13 +1,9 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
- import { optionsWithSections } from '../utils/tests';
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: number;
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 { a as r, A as e } from "./chunks/AccordionItem-Cu5L1c1h.js";
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";
@@ -13,8 +13,8 @@ declare const _default: {
13
13
  isSelectableAll: false;
14
14
  label: string;
15
15
  options: {
16
+ id: import('react-aria').Key;
16
17
  name: string;
17
- id: string;
18
18
  }[];
19
19
  placeholder: string;
20
20
  selectionMode: "single";
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "description": "Midas Components",
15
15
  "homepage": "https://designsystem.migrationsverket.se/",
16
16
  "license": "CC0-1.0",
17
- "version": "16.4.2",
17
+ "version": "16.4.3",
18
18
  "module": "./index.js",
19
19
  "type": "module",
20
20
  "main": "./index.js",
@@ -1,5 +1,6 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
- import { options, optionsWithSections } from '../utils/tests';
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";
@@ -1,12 +0,0 @@
1
- export declare function generateMockOptions(count: number): {
2
- id: number;
3
- name: string;
4
- }[];
5
- export declare const optionsWithSections: {
6
- name: string;
7
- id: number;
8
- children: {
9
- name: string;
10
- id: number;
11
- }[];
12
- }[];
@@ -1,11 +0,0 @@
1
- export declare const options: {
2
- name: string;
3
- id: string;
4
- }[];
5
- export declare const optionsWithSections: {
6
- name: string;
7
- children: {
8
- name: string;
9
- id: string;
10
- }[];
11
- }[];
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
- }[];