@midas-ds/components 5.0.0 → 5.0.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/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": "5.0.0",
17
+ "version": "5.0.1",
18
18
  "main": "./index.cjs",
19
19
  "module": "./index.js",
20
20
  "types": "./index.d.ts",
@@ -48,9 +48,8 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@react-stately/toast": "3.0.0-beta.7",
52
- "react-aria": "3.37.0",
53
- "react-aria-components": "^1.6.0",
54
- "react-stately": "3.35.0"
51
+ "react-aria": "^3.38.1",
52
+ "react-aria-components": "^1.7.1",
53
+ "react-stately": "^3.36.1"
55
54
  }
56
55
  }
package/toast/Toast.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AriaToastProps, AriaToastRegionProps } from '@react-aria/toast';
2
- import { QueuedToast, ToastQueue, ToastState } from '@react-stately/toast';
1
+ import { AriaToastProps, AriaToastRegionProps } from 'react-aria';
2
+ import { QueuedToast, ToastQueue, ToastState, ToastStateProps } from 'react-stately';
3
3
  import { default as React } from 'react';
4
4
  export interface MidasToast {
5
5
  message: string;
@@ -17,6 +17,11 @@ export interface ToastProps<T> extends AriaToastProps<T> {
17
17
  interface ToastProviderProps extends AriaToastRegionProps {
18
18
  children?: ((state: ToastState<MidasToast>) => React.ReactNode) | React.ReactNode;
19
19
  }
20
+ /**
21
+ * Temporary implementation of https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/toast/src/useToastState.ts#L59
22
+ * TODO: Erase this as soon as react-stately is released
23
+ */
24
+ export declare function useToastState<T>(props?: ToastStateProps): ToastState<T>;
20
25
  export declare const toastQueue: ToastQueue<MidasToast>;
21
26
  export declare const GlobalToastRegion: (props: ToastProviderProps) => React.ReactPortal | null;
22
27
  export declare const ToastProvider: ({ children, ...props }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;