@midas-ds/components 10.0.0 → 10.1.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.
@@ -12,8 +12,13 @@ export interface InfoBannerProps extends React.DetailedHTMLProps<React.HTMLAttri
12
12
  children?: React.ReactNode;
13
13
  /**
14
14
  * Specify if the InfoBanner should have a dismiss button in the top right corner
15
+ * @deprecated since 10.0.1. Please use `isDismissable` instead
15
16
  */
16
17
  dismissable?: boolean;
18
+ /**
19
+ * Specify if the InfoBanner should have a dismiss button in the top right corner
20
+ */
21
+ isDismissable?: boolean;
17
22
  }
18
23
  /**
19
24
  * Displays a static message as an inline banner
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": "10.0.0",
17
+ "version": "10.1.0",
18
18
  "main": "./index.cjs",
19
19
  "module": "./index.js",
20
20
  "types": "./index.d.ts",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "react-aria": "^3.38.1",
53
- "react-aria-components": "^1.7.1",
53
+ "react-aria-components": "^1.9.0",
54
54
  "react-stately": "^3.36.1"
55
55
  }
56
56
  }
@@ -0,0 +1,20 @@
1
+ import { ListLayout, ListLayoutOptions, Size } from 'react-aria-components';
2
+ export declare class SectionedListLayout<T, O extends ListLayoutOptions = ListLayoutOptions> extends ListLayout<T, O> {
3
+ /**
4
+ * When using the ListLayout our scroll container height is not calculated properly when the content is partially sectioned.
5
+ * ```ts
6
+ * const partiallySectionedContent = [
7
+ * {
8
+ * name: 'fruit section',
9
+ * children: [{ id: 'kiwi', name: 'Kiwi' }]
10
+ * },
11
+ * // berries have no section, because it's optional
12
+ * { id: 'lingonberries', name: 'Lingonberries' }
13
+ * ];
14
+ * ```
15
+ * If we load the layout info for each key in the collection the calculation is correct.
16
+ *
17
+ * This might not be optional for performance, FYI
18
+ */
19
+ getContentSize(): Size;
20
+ }
@@ -1,10 +1,10 @@
1
- import { CollectionChildren } from '@react-types/shared';
1
+ import { CollectionChildren, Key } from '@react-types/shared';
2
2
  import { useMultiSelectState } from './useMultiSelectState';
3
3
  import { Size } from '../common/types';
4
4
  import * as React from 'react';
5
5
  export type OptionItem = {
6
6
  children?: never;
7
- id: string;
7
+ id: Key;
8
8
  name: string | React.ReactNode;
9
9
  /** Textual representation of `name` in case it is not a string. Used for searching. */
10
10
  textValue?: string;
@@ -1,9 +1,7 @@
1
1
  import { MultiSelectState } from './useMultiSelectState';
2
2
  import { AriaListBoxOptions } from '@react-aria/listbox';
3
- import * as React from 'react';
4
3
  interface ListBoxProps<T> extends AriaListBoxOptions<T> {
5
- listBoxRef?: React.RefObject<HTMLUListElement>;
6
4
  state: MultiSelectState<T>;
7
5
  }
8
- export declare const SelectListBox: <T>(props: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const SelectListBox: <T>({ state, ...rest }: ListBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
9
7
  export {};
package/tag/Tag.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- import { default as React } from 'react';
2
1
  import { TagGroupProps as AriaTagGroupProps, TagProps as AriaTagProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
3
  export interface TagGroupProp extends AriaTagGroupProps {
4
4
  children: React.ReactNode;
5
5
  }
6
6
  export interface TagProps extends AriaTagProps {
7
7
  children: React.ReactNode;
8
8
  dismissable?: boolean;
9
+ type?: 'default' | 'success' | 'info' | 'important' | 'warning';
9
10
  }
10
11
  export declare const TagGroup: React.FC<TagGroupProp>;
11
12
  export declare const Tag: React.FC<TagProps>;