@magiclabs/ui-components 1.15.1 → 1.16.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/components/containers/drawer.js.map +1 -1
- package/dist/cjs/components/external/paypal-button.js +1 -1
- package/dist/cjs/components/external/paypal-button.js.map +1 -1
- package/dist/cjs/components/feedback/callout.js +1 -1
- package/dist/cjs/components/feedback/callout.js.map +1 -1
- package/dist/cjs/components/feedback/status-icon.js +2 -0
- package/dist/cjs/components/feedback/status-icon.js.map +1 -0
- package/dist/cjs/components/feedback/toast-provider.js +2 -0
- package/dist/cjs/components/feedback/toast-provider.js.map +1 -0
- package/dist/cjs/components/list-items/token-list-item.js +1 -1
- package/dist/cjs/components/list-items/token-list-item.js.map +1 -1
- package/dist/cjs/components/primitives/button.js +1 -1
- package/dist/cjs/components/primitives/button.js.map +1 -1
- package/dist/cjs/components/primitives/portal.js +2 -0
- package/dist/cjs/components/primitives/portal.js.map +1 -0
- package/dist/cjs/components/primitives/radio.js.map +1 -1
- package/dist/cjs/components/primitives/segmented-control.js.map +1 -1
- package/dist/cjs/components/primitives/text.js.map +1 -1
- package/dist/cjs/components/sections/verify-pincode.js +1 -1
- package/dist/cjs/components/sections/verify-pincode.js.map +1 -1
- package/dist/cjs/components/utils/animate.js +1 -1
- package/dist/cjs/components/utils/animate.js.map +1 -1
- package/dist/cjs/hooks/useToast.js +2 -0
- package/dist/cjs/hooks/useToast.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/recipes/toast.js +2 -0
- package/dist/cjs/recipes/toast.js.map +1 -0
- package/dist/es/components/containers/drawer.js.map +1 -1
- package/dist/es/components/external/paypal-button.js +1 -1
- package/dist/es/components/external/paypal-button.js.map +1 -1
- package/dist/es/components/feedback/callout.js +1 -1
- package/dist/es/components/feedback/callout.js.map +1 -1
- package/dist/es/components/feedback/status-icon.js +2 -0
- package/dist/es/components/feedback/status-icon.js.map +1 -0
- package/dist/es/components/feedback/toast-provider.js +2 -0
- package/dist/es/components/feedback/toast-provider.js.map +1 -0
- package/dist/es/components/list-items/token-list-item.js +1 -1
- package/dist/es/components/list-items/token-list-item.js.map +1 -1
- package/dist/es/components/primitives/button.js +1 -1
- package/dist/es/components/primitives/button.js.map +1 -1
- package/dist/es/components/primitives/portal.js +2 -0
- package/dist/es/components/primitives/portal.js.map +1 -0
- package/dist/es/components/primitives/radio.js.map +1 -1
- package/dist/es/components/primitives/segmented-control.js.map +1 -1
- package/dist/es/components/primitives/text.js.map +1 -1
- package/dist/es/components/sections/verify-pincode.js +1 -1
- package/dist/es/components/sections/verify-pincode.js.map +1 -1
- package/dist/es/components/utils/animate.js +1 -1
- package/dist/es/components/utils/animate.js.map +1 -1
- package/dist/es/hooks/useToast.js +2 -0
- package/dist/es/hooks/useToast.js.map +1 -0
- package/dist/es/index.js +1 -1
- package/dist/es/recipes/toast.js +2 -0
- package/dist/es/recipes/toast.js.map +1 -0
- package/dist/panda.buildinfo.json +1 -1
- package/dist/types/components/containers/drawer.d.ts +2 -3
- package/dist/types/components/containers/drawer.d.ts.map +1 -1
- package/dist/types/components/feedback/callout.d.ts.map +1 -1
- package/dist/types/components/feedback/index.d.ts +2 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -1
- package/dist/types/components/feedback/status-icon.d.ts +8 -0
- package/dist/types/components/feedback/status-icon.d.ts.map +1 -0
- package/dist/types/components/feedback/toast-provider.d.ts +14 -0
- package/dist/types/components/feedback/toast-provider.d.ts.map +1 -0
- package/dist/types/components/list-items/token-list-item.d.ts +2 -2
- package/dist/types/components/list-items/token-list-item.d.ts.map +1 -1
- package/dist/types/components/primitives/portal.d.ts +8 -0
- package/dist/types/components/primitives/portal.d.ts.map +1 -0
- package/dist/types/components/primitives/radio.d.ts +2 -3
- package/dist/types/components/primitives/radio.d.ts.map +1 -1
- package/dist/types/components/primitives/segmented-control.d.ts +2 -3
- package/dist/types/components/primitives/segmented-control.d.ts.map +1 -1
- package/dist/types/components/primitives/text.d.ts +2 -3
- package/dist/types/components/primitives/text.d.ts.map +1 -1
- package/dist/types/components/utils/animate.d.ts +11 -17
- package/dist/types/components/utils/animate.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useToast.d.ts +18 -0
- package/dist/types/hooks/useToast.d.ts.map +1 -0
- package/dist/types/recipes/toast.d.ts +70 -0
- package/dist/types/recipes/toast.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
type Props = PropsWithChildren<{
|
|
3
|
-
show?: boolean;
|
|
4
|
-
} & AnimateProps>;
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
5
2
|
type AnimationType = 'fade' | 'slide' | 'scale';
|
|
6
|
-
export
|
|
7
|
-
type
|
|
8
|
-
duration
|
|
9
|
-
timingFunction
|
|
10
|
-
delay
|
|
3
|
+
export interface AnimateProps extends PropsWithChildren {
|
|
4
|
+
type?: AnimationType;
|
|
5
|
+
duration?: number;
|
|
6
|
+
timingFunction?: string;
|
|
7
|
+
delay?: number;
|
|
11
8
|
asChild?: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly timingFunction: "cubic-bezier(0.33, 1.33, 0.23, 1)";
|
|
18
|
-
};
|
|
19
|
-
declare const Animate: FC<Props>;
|
|
9
|
+
show?: boolean;
|
|
10
|
+
onHidden?: () => void;
|
|
11
|
+
onShown?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const Animate: (props: AnimateProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
14
|
export default Animate;
|
|
21
15
|
//# sourceMappingURL=animate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/animate.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,
|
|
1
|
+
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../../../../src/components/utils/animate.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAE1F,KAAK,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAID,QAAA,MAAM,OAAO,UAAW,YAAY,mDAqEnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ToastProps {
|
|
3
|
+
message: string;
|
|
4
|
+
dismissible?: boolean;
|
|
5
|
+
icon?: boolean;
|
|
6
|
+
lifespan?: number;
|
|
7
|
+
variant?: 'branded' | 'success' | 'error' | 'warning' | 'neutral';
|
|
8
|
+
}
|
|
9
|
+
export interface ToastDefinition extends ToastProps {
|
|
10
|
+
id: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ToastContext {
|
|
13
|
+
createToast: (options: ToastProps) => number;
|
|
14
|
+
removeToast: (id: number) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const ToastContext: import("react").Context<ToastContext>;
|
|
17
|
+
export declare function useToast(): ToastContext;
|
|
18
|
+
//# sourceMappingURL=useToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../../src/hooks/useToast.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CACnE;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,MAAM,CAAC;IAC7C,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AASD,eAAO,MAAM,YAAY,uCAGvB,CAAC;AAEH,wBAAgB,QAAQ,iBAEvB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type RecipeVariantProps } from '@styled/css';
|
|
2
|
+
export declare const toast: import("../../styled-system/types").SlotRecipeRuntimeFn<"container" | "portal" | "toast" | "icon" | "dismiss", {
|
|
3
|
+
variant: {
|
|
4
|
+
branded: {
|
|
5
|
+
toast: {
|
|
6
|
+
backgroundColor: "brand.base";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
success: {
|
|
10
|
+
toast: {
|
|
11
|
+
backgroundColor: "positive.darker";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
warning: {
|
|
15
|
+
toast: {
|
|
16
|
+
backgroundColor: "warning.darker";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
error: {
|
|
20
|
+
toast: {
|
|
21
|
+
backgroundColor: "negative.darker";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
neutral: {
|
|
25
|
+
toast: {
|
|
26
|
+
backgroundColor: "text.tertiary";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
position: {
|
|
31
|
+
top: {
|
|
32
|
+
container: {
|
|
33
|
+
alignItems: "center";
|
|
34
|
+
justifyContent: "flex-start";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
'top-left': {
|
|
38
|
+
container: {
|
|
39
|
+
alignItems: "flex-start";
|
|
40
|
+
justifyContent: "flex-start";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
'top-right': {
|
|
44
|
+
container: {
|
|
45
|
+
alignItems: "flex-end";
|
|
46
|
+
justifyContent: "flex-start";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
bottom: {
|
|
50
|
+
container: {
|
|
51
|
+
alignItems: "center";
|
|
52
|
+
justifyContent: "flex-end";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
'bottom-left': {
|
|
56
|
+
container: {
|
|
57
|
+
alignItems: "flex-start";
|
|
58
|
+
justifyContent: "flex-end";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
'bottom-right': {
|
|
62
|
+
container: {
|
|
63
|
+
alignItems: "flex-end";
|
|
64
|
+
justifyContent: "flex-end";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
69
|
+
export type ToastVariants = RecipeVariantProps<typeof toast>;
|
|
70
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/recipes/toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGhB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,OAAO,KAAK,CAAC,CAAC"}
|