@youversion/design-system-components 0.28.0 → 0.29.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/CHANGELOG.md +13 -0
- package/dist/index.es.js +667 -643
- package/dist/index.umd.js +3 -3
- package/package.json +2 -2
- package/dist/src/context/Toast/Toast.d.ts +0 -7
- package/dist/src/context/Toast/Toast.d.ts.map +0 -1
- package/dist/src/context/Toast/Toast.stories.d.ts +0 -8
- package/dist/src/context/Toast/Toast.stories.d.ts.map +0 -1
- package/dist/src/context/Toast/Toast.types.d.ts +0 -57
- package/dist/src/context/Toast/Toast.types.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/design-system-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"main": "./dist/index.umd.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@youversion/design-system-core": "0.3.2",
|
|
25
|
-
"@youversion/design-system-icons": "0.
|
|
25
|
+
"@youversion/design-system-icons": "0.15.0",
|
|
26
26
|
"@youversion/design-system-tokens": "1.1.1",
|
|
27
27
|
"clsx": "1.2.1",
|
|
28
28
|
"tailwind-merge": "1.13.2"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
import { ToastContextType, ToastProviderType } from './Toast.types';
|
|
3
|
-
declare const ToastContext: import("react").Context<ToastContextType>;
|
|
4
|
-
declare const ToastProvider: FC<PropsWithChildren<ToastProviderType>>;
|
|
5
|
-
declare function useToast(): ToastContextType;
|
|
6
|
-
export { ToastContext, ToastProvider, useToast };
|
|
7
|
-
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EACF,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,eAAe,CAAC;AAIvB,QAAA,MAAM,YAAY,2CAKhB,CAAC;AAmEH,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAqD3D,CAAC;AAEF,iBAAS,QAAQ,qBAEhB;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
title: string;
|
|
3
|
-
};
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const ToastProviderStandard: () => JSX.Element;
|
|
6
|
-
export declare const ToastProviderblockEndInlineStartMax5: () => JSX.Element;
|
|
7
|
-
export declare const ProgrammaticDismissals: () => JSX.Element;
|
|
8
|
-
//# sourceMappingURL=Toast.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.stories.tsx"],"names":[],"mappings":";;;AAKA,wBAEE;AAkBF,eAAO,MAAM,qBAAqB,mBAMjC,CAAC;AAcF,eAAO,MAAM,oCAAoC,mBAMhD,CAAC;AA6BF,eAAO,MAAM,sBAAsB,mBAMlC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
export declare const CommunicationDispatch: {
|
|
3
|
-
readonly ADD: "add";
|
|
4
|
-
readonly DISMISS: "dismiss";
|
|
5
|
-
readonly DISMISS_ALL: "dismiss_all";
|
|
6
|
-
readonly DISMISS_BY_META: "dismiss_by_meta";
|
|
7
|
-
};
|
|
8
|
-
type ToastVariant = 'success' | 'error' | 'info' | 'default';
|
|
9
|
-
type ToastPosition = 'blockStartInlineEnd' | 'blockStartInlineStart' | 'blockEndInlineEnd' | 'blockEndInlineStart';
|
|
10
|
-
export type ToastType = {
|
|
11
|
-
[metaKey: string]: unknown;
|
|
12
|
-
content: string | ReactElement;
|
|
13
|
-
duration?: number;
|
|
14
|
-
hideDismissButton?: boolean;
|
|
15
|
-
id: string;
|
|
16
|
-
variant?: ToastVariant;
|
|
17
|
-
};
|
|
18
|
-
export interface ConfigType {
|
|
19
|
-
/** May add any meta name/value combo to each toast message connected to the provider. */
|
|
20
|
-
[metaKey: string]: unknown;
|
|
21
|
-
/** Sets default duration for each toast message. May be overwritten with the `toast` hook. */
|
|
22
|
-
duration?: number;
|
|
23
|
-
/** Sets max number of toasts visible at once. */
|
|
24
|
-
max?: number;
|
|
25
|
-
/** Sets the position the toast animate out from. Options are `blockStartInlineEnd`, `blockStartInlineStart`, `blockEndInlineEnd`, `blockEndInlineStart`. */
|
|
26
|
-
position: ToastPosition;
|
|
27
|
-
/** Sets the default toast background color. Options are `success`, `error`, `default`, and `info`. May be overwritten with the `toast` hook. */
|
|
28
|
-
variant?: ToastVariant;
|
|
29
|
-
}
|
|
30
|
-
export type CommunicationDispatchType = {
|
|
31
|
-
toast: ToastType;
|
|
32
|
-
type: typeof CommunicationDispatch.ADD;
|
|
33
|
-
} | {
|
|
34
|
-
id: string;
|
|
35
|
-
type: typeof CommunicationDispatch.DISMISS;
|
|
36
|
-
} | {
|
|
37
|
-
metaName: string;
|
|
38
|
-
metaValue: string;
|
|
39
|
-
type: typeof CommunicationDispatch.DISMISS_BY_META;
|
|
40
|
-
} | {
|
|
41
|
-
type: typeof CommunicationDispatch.DISMISS_ALL;
|
|
42
|
-
};
|
|
43
|
-
export interface ToastProviderType {
|
|
44
|
-
config: ConfigType;
|
|
45
|
-
}
|
|
46
|
-
export type MetaType = {
|
|
47
|
-
metaName: string;
|
|
48
|
-
metaValue: string;
|
|
49
|
-
};
|
|
50
|
-
export interface ToastContextType {
|
|
51
|
-
dismiss: (id: string) => void;
|
|
52
|
-
dismissAll: () => void;
|
|
53
|
-
dismissByMeta: (meta: MetaType) => void;
|
|
54
|
-
toast: (content: string | ReactElement, options?: Partial<ToastType>) => string;
|
|
55
|
-
}
|
|
56
|
-
export {};
|
|
57
|
-
//# sourceMappingURL=Toast.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.d.ts","sourceRoot":"","sources":["../../../../src/context/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAC7D,KAAK,aAAa,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAEnH,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4JAA4J;IAC5J,QAAQ,EAAE,aAAa,CAAC;IACxB,gJAAgJ;IAChJ,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,MAAM,yBAAyB,GACjC;IAAE,KAAK,EAAE,SA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