@midas-ds/components 10.0.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 CHANGED
@@ -1,3 +1,74 @@
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
+
34
+ ## 10.1.0 (2025-05-23)
35
+
36
+ ### 🚀 Features
37
+
38
+ - **select:** allow for option id to be string or number ([b9f31bac6b](https://github.com/migrationsverket/midas/commit/b9f31bac6b))
39
+ - **select:** use midas checkbox ([94c2cdb61d](https://github.com/migrationsverket/midas/commit/94c2cdb61d))
40
+ - **accordion:** add variant `hasBackground` ([2b429a73b3](https://github.com/migrationsverket/midas/commit/2b429a73b3))
41
+ - **accordion:** add new variant `hasBackground` ([1022bcc58a](https://github.com/migrationsverket/midas/commit/1022bcc58a))
42
+ - **tag:** add dark mode style ([408be2acb7](https://github.com/migrationsverket/midas/commit/408be2acb7))
43
+ - **tag:** add new prop ([82a0998769](https://github.com/migrationsverket/midas/commit/82a0998769))
44
+
45
+ ### 🩹 Fixes
46
+
47
+ - **link-button:** add disabled styling ([143f708127](https://github.com/migrationsverket/midas/commit/143f708127))
48
+ - **radio:** remove interactions with radiogroup items outside the label and button ([0b9f197971](https://github.com/migrationsverket/midas/commit/0b9f197971))
49
+ - **skeleton:** dont overwrite className and style props ([155a8ff437](https://github.com/migrationsverket/midas/commit/155a8ff437))
50
+ - **select:** virtualize the scroll box ([523b138e17](https://github.com/migrationsverket/midas/commit/523b138e17))
51
+ - **tag:** fix the hover and fix the disabled style ([3a21642715](https://github.com/migrationsverket/midas/commit/3a21642715))
52
+ - **tag:** unset border to make button the right width/height ([769cfa8ec5](https://github.com/migrationsverket/midas/commit/769cfa8ec5))
53
+ - **tag:** change token on button hover and pressed ([0f2ff1c422](https://github.com/migrationsverket/midas/commit/0f2ff1c422))
54
+ - **tag:** fix the missing nesting selector ([87ac33ab1c](https://github.com/migrationsverket/midas/commit/87ac33ab1c))
55
+
56
+ ### 💅 Refactors
57
+
58
+ - **tag:** move render function to meta data ([48d9f9b126](https://github.com/migrationsverket/midas/commit/48d9f9b126))
59
+
60
+ ### 📖 Documentation changes
61
+
62
+ - control size globally in storybook + new dark mode control ([#596](https://github.com/migrationsverket/midas/pull/596))
63
+
64
+ ### 🔧 Maintenance
65
+
66
+ - **deps:** update RAC ([20da285b9e](https://github.com/migrationsverket/midas/commit/20da285b9e))
67
+ - extend commitlint conventional commits config ([4daa47926d](https://github.com/migrationsverket/midas/commit/4daa47926d))
68
+ - update eslint rule to handle major versions > 9 ([ba85178773](https://github.com/migrationsverket/midas/commit/ba85178773))
69
+ - **changelog:** group and display more commit types in changelog ([d86d18ae94](https://github.com/migrationsverket/midas/commit/d86d18ae94))
70
+ - change react import statement ([efe3c867f0](https://github.com/migrationsverket/midas/commit/efe3c867f0))
71
+
1
72
  # 10.0.0 (2025-05-20)
2
73
 
3
74
  ### 🚀 Features
@@ -9,6 +9,11 @@ interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
9
9
  headingLevel?: HeadingProps['elementType'];
10
10
  /** Display an accordion item in different status states */
11
11
  type?: 'default' | 'success' | 'warning';
12
+ /**
13
+ * Adds a background element to the content, set to false for a transparent look
14
+ * @default true
15
+ **/
16
+ hasBackground?: boolean;
12
17
  }
13
18
  export declare const AccordionItem: React.FC<MidasAccordionItem>;
14
19
  export {};
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>>;
@@ -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
- export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children'> {
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 object>({ label, description, errorMessage, children, items, className, errorPosition, size, ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
19
- export declare function ComboBoxItem(props: ListBoxItemProps): import("react/jsx-runtime").JSX.Element;
20
- export declare function ComboBoxSelection(props: Section<Item>): import("react/jsx-runtime").JSX.Element;
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;
@@ -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';
@@ -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
  };
@@ -1,10 +1,3 @@
1
- import { Item } from './types';
2
- export declare function generateMockOptions(count: number): Iterable<Item>;
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[];