@veracity/vui 1.2.0-rc.0 → 1.2.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.
- package/dist/cjs/core/types.d.ts +10 -1
- package/dist/cjs/core/types.d.ts.map +1 -1
- package/dist/cjs/core/vuiProvider/context.d.ts +2 -1
- package/dist/cjs/core/vuiProvider/context.d.ts.map +1 -1
- package/dist/cjs/toast/useToast.d.ts +1 -1
- package/dist/esm/core/types.d.ts +10 -1
- package/dist/esm/core/types.d.ts.map +1 -1
- package/dist/esm/core/vuiProvider/context.d.ts +2 -1
- package/dist/esm/core/vuiProvider/context.d.ts.map +1 -1
- package/dist/esm/toast/useToast.d.ts +1 -1
- package/package.json +1 -1
- package/src/core/types.ts +10 -1
- package/src/core/vuiProvider/context.ts +2 -1
package/dist/cjs/core/types.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { Dispatch, ReactNode } from 'react';
|
|
2
|
+
import { ToastListItem } from '../toast/toast.types';
|
|
2
3
|
export interface ChildrenProp {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
}
|
|
6
|
+
export interface VuiContext {
|
|
7
|
+
toasts: {
|
|
8
|
+
list: ToastListItem[];
|
|
9
|
+
};
|
|
10
|
+
addToast: (toast: ToastListItem) => void;
|
|
11
|
+
removeToast: (id: string) => void;
|
|
12
|
+
setPortalSlot: Dispatch<ReactNode>;
|
|
13
|
+
}
|
|
5
14
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QAAE,IAAI,EAAE,aAAa,EAAE,CAAA;KAAE,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;CACnC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { VuiContext } from '../types';
|
|
3
|
+
declare const VuiContextProvider: import("react").Provider<VuiContext>, useVuiContext: () => VuiContext;
|
|
3
4
|
export { VuiContextProvider, useVuiContext };
|
|
4
5
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/context.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/context.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,QAAA,MAAO,kBAAkB,wCAAE,aAAa,kBAAmD,CAAA;AAE3F,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ToastOptions } from './toast.types';
|
|
3
3
|
export declare const useToast: () => {
|
|
4
4
|
showToast: (options?: ToastOptions | undefined) => void;
|
|
5
|
-
hideToast: (id: string) =>
|
|
5
|
+
hideToast: (id: string) => void;
|
|
6
6
|
showInfo: (text: ReactNode) => void;
|
|
7
7
|
showSuccess: (text: ReactNode) => void;
|
|
8
8
|
showWarning: (text: ReactNode) => void;
|
package/dist/esm/core/types.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { Dispatch, ReactNode } from 'react';
|
|
2
|
+
import { ToastListItem } from '../toast/toast.types';
|
|
2
3
|
export interface ChildrenProp {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
}
|
|
6
|
+
export interface VuiContext {
|
|
7
|
+
toasts: {
|
|
8
|
+
list: ToastListItem[];
|
|
9
|
+
};
|
|
10
|
+
addToast: (toast: ToastListItem) => void;
|
|
11
|
+
removeToast: (id: string) => void;
|
|
12
|
+
setPortalSlot: Dispatch<ReactNode>;
|
|
13
|
+
}
|
|
5
14
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QAAE,IAAI,EAAE,aAAa,EAAE,CAAA;KAAE,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;CACnC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { VuiContext } from '../types';
|
|
3
|
+
declare const VuiContextProvider: import("react").Provider<VuiContext>, useVuiContext: () => VuiContext;
|
|
3
4
|
export { VuiContextProvider, useVuiContext };
|
|
4
5
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/context.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/context.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,QAAA,MAAO,kBAAkB,wCAAE,aAAa,kBAAmD,CAAA;AAE3F,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ToastOptions } from './toast.types';
|
|
3
3
|
export declare const useToast: () => {
|
|
4
4
|
showToast: (options?: ToastOptions | undefined) => void;
|
|
5
|
-
hideToast: (id: string) =>
|
|
5
|
+
hideToast: (id: string) => void;
|
|
6
6
|
showInfo: (text: ReactNode) => void;
|
|
7
7
|
showSuccess: (text: ReactNode) => void;
|
|
8
8
|
showWarning: (text: ReactNode) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "1.2.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/core/types.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react'
|
|
1
|
+
import { Dispatch, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
import { ToastListItem } from '../toast/toast.types'
|
|
2
4
|
|
|
3
5
|
export interface ChildrenProp {
|
|
4
6
|
children?: ReactNode
|
|
5
7
|
}
|
|
8
|
+
|
|
9
|
+
export interface VuiContext {
|
|
10
|
+
toasts: { list: ToastListItem[] }
|
|
11
|
+
addToast: (toast: ToastListItem) => void
|
|
12
|
+
removeToast: (id: string) => void
|
|
13
|
+
setPortalSlot: Dispatch<ReactNode>
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createContext } from '../../utils'
|
|
2
|
+
import { VuiContext } from '../types'
|
|
2
3
|
|
|
3
|
-
const [VuiContextProvider, useVuiContext] = createContext<
|
|
4
|
+
const [VuiContextProvider, useVuiContext] = createContext<VuiContext>({ isOptional: true })
|
|
4
5
|
|
|
5
6
|
export { VuiContextProvider, useVuiContext }
|