@smg-automotive/components 25.11.0-migrate-v3-header-full.4 → 25.11.0-migrate-use-toast.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.
Files changed (42) hide show
  1. package/dist/cjs/components/alert/index.d.ts +2 -2
  2. package/dist/cjs/components/alert/index.d.ts.map +1 -1
  3. package/dist/cjs/components/closeButton/index.d.ts +2 -2
  4. package/dist/cjs/components/closeButton/index.d.ts.map +1 -1
  5. package/dist/cjs/hooks/useToast/Toast.d.ts +12 -0
  6. package/dist/cjs/hooks/useToast/Toast.d.ts.map +1 -0
  7. package/dist/cjs/hooks/useToast/TopRightToast.d.ts +4 -0
  8. package/dist/cjs/hooks/useToast/TopRightToast.d.ts.map +1 -0
  9. package/dist/cjs/hooks/useToast/TopToaster.d.ts +4 -0
  10. package/dist/cjs/hooks/useToast/TopToaster.d.ts.map +1 -0
  11. package/dist/cjs/hooks/useToast/index.d.ts +9 -0
  12. package/dist/cjs/hooks/useToast/index.d.ts.map +1 -0
  13. package/dist/cjs/index.js +19 -0
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/themes/shared/index.d.ts +16 -0
  16. package/dist/cjs/themes/shared/index.d.ts.map +1 -1
  17. package/dist/cjs/themes/shared/slotRecipes/alert.d.ts +16 -0
  18. package/dist/cjs/themes/shared/slotRecipes/alert.d.ts.map +1 -1
  19. package/dist/cjs/themes/shared/slotRecipes/index.d.ts +16 -0
  20. package/dist/cjs/themes/shared/slotRecipes/index.d.ts.map +1 -1
  21. package/dist/esm/components/alert/index.d.ts +2 -2
  22. package/dist/esm/components/alert/index.d.ts.map +1 -1
  23. package/dist/esm/components/closeButton/index.d.ts +2 -2
  24. package/dist/esm/components/closeButton/index.d.ts.map +1 -1
  25. package/dist/esm/hooks/useToast/Toast.d.ts +12 -0
  26. package/dist/esm/hooks/useToast/Toast.d.ts.map +1 -0
  27. package/dist/esm/hooks/useToast/TopRightToast.d.ts +4 -0
  28. package/dist/esm/hooks/useToast/TopRightToast.d.ts.map +1 -0
  29. package/dist/esm/hooks/useToast/TopToaster.d.ts +4 -0
  30. package/dist/esm/hooks/useToast/TopToaster.d.ts.map +1 -0
  31. package/dist/esm/hooks/useToast/index.d.ts +9 -0
  32. package/dist/esm/hooks/useToast/index.d.ts.map +1 -0
  33. package/dist/esm/themes/shared/index.d.ts +16 -0
  34. package/dist/esm/themes/shared/index.d.ts.map +1 -1
  35. package/dist/esm/themes/shared/slotRecipes/alert.d.ts +16 -0
  36. package/dist/esm/themes/shared/slotRecipes/alert.d.ts.map +1 -1
  37. package/dist/esm/themes/shared/slotRecipes/alert.js +19 -0
  38. package/dist/esm/themes/shared/slotRecipes/alert.js.map +1 -1
  39. package/dist/esm/themes/shared/slotRecipes/index.d.ts +16 -0
  40. package/dist/esm/themes/shared/slotRecipes/index.d.ts.map +1 -1
  41. package/dist/index.d.ts +1 -1
  42. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import React, { FC } from 'react';
2
2
  import { RecipeVariantProps } from '@chakra-ui/react';
3
3
  import { alertRecipe } from 'src/themes/shared/slotRecipes/alert';
4
- export interface SharedProps extends RecipeVariantProps<typeof alertRecipe> {
4
+ export type SharedProps = RecipeVariantProps<typeof alertRecipe> & {
5
5
  description: string;
6
6
  title?: string;
7
7
  link?: {
@@ -13,7 +13,7 @@ export interface SharedProps extends RecipeVariantProps<typeof alertRecipe> {
13
13
  };
14
14
  icon?: React.ReactNode;
15
15
  type?: 'error' | 'warning' | 'info' | 'success';
16
- }
16
+ };
17
17
  export type DismissibleProps = SharedProps & {
18
18
  onDismiss?: () => void;
19
19
  dismissible?: true;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;A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,OAAO,WAAW,CAAC,GAAG;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE;QACL,EAAE,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC;QAC3C,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAC9C,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAEhE,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAmChC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { FC } from 'react';
2
- interface CloseButtonProps {
2
+ type CloseButtonProps = {
3
3
  disabled?: boolean;
4
4
  onClick?: () => void;
5
- }
5
+ };
6
6
  export declare const CloseButton: FC<CloseButtonProps>;
7
7
  export {};
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/closeButton/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAU5C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/closeButton/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAU5C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { createToaster, RecipeVariantProps } from '@chakra-ui/react';
3
+ import { alertRecipe } from 'src/themes/shared/slotRecipes/alert';
4
+ export declare const toastConfig: {
5
+ pauseOnPageIdle: boolean;
6
+ max: number;
7
+ };
8
+ export type ToastProps = RecipeVariantProps<typeof alertRecipe> & {
9
+ toaster: ReturnType<typeof createToaster>;
10
+ };
11
+ export declare const Toast: FC<ToastProps>;
12
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useToast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAGL,aAAa,EAEb,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAIlE,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,OAAO,WAAW,CAAC,GAAG;IAChE,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA+ChC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ export declare const topRightToaster: import("@zag-js/toast").Store<any>;
3
+ export declare const TopRightToast: FC;
4
+ //# sourceMappingURL=TopRightToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopRightToast.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useToast/TopRightToast.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,eAAO,MAAM,eAAe,oCAG1B,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,EAE3B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ export declare const topToaster: import("@zag-js/toast").Store<any>;
3
+ export declare const TopToast: FC;
4
+ //# sourceMappingURL=TopToaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopToaster.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useToast/TopToaster.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,eAAO,MAAM,UAAU,oCAGrB,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,EAEtB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { SharedProps } from 'src/components/alert';
2
+ export type ToastOptions = {
3
+ position?: 'top' | 'top-right';
4
+ onClose?: () => void;
5
+ } & SharedProps;
6
+ export declare const useToast: () => (options: ToastOptions) => {
7
+ closeToast: () => void;
8
+ };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useToast/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMnD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,WAAW,CAAC;AAOhB,eAAO,MAAM,QAAQ,SACX,SAAS,YAAY;;CAgC9B,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -2649,6 +2649,25 @@ var alertRecipe = react$1.defineSlotRecipe({
2649
2649
  },
2650
2650
  },
2651
2651
  },
2652
+ variant: {
2653
+ toast: {
2654
+ root: {
2655
+ translate: 'var(--x) var(--y)',
2656
+ scale: 'var(--scale)',
2657
+ width: 'full',
2658
+ position: 'relative',
2659
+ zIndex: 'var(--z-index)',
2660
+ height: 'var(--height)',
2661
+ opacity: 'var(--opacity)',
2662
+ willChange: 'translate, opacity, scale',
2663
+ transitionProperty: 'common',
2664
+ transitionDuration: 'normal',
2665
+ },
2666
+ },
2667
+ },
2668
+ },
2669
+ defaultVariants: {
2670
+ variant: 'toast',
2652
2671
  },
2653
2672
  });
2654
2673