@vtex/faststore-plugin-buyer-portal 1.3.7 → 1.3.8

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 CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.8] - 2025-10-17
11
+
12
+ ### Added
13
+
14
+ - Responsiviness to drawer animation
15
+
10
16
  ## [1.3.7] - 2025-10-17
11
17
 
12
18
  ### Added
@@ -146,7 +152,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146
152
  - Add CHANGELOG file
147
153
  - Add README file
148
154
 
149
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.7...HEAD
155
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.8...HEAD
150
156
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
151
157
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
152
158
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -158,4 +164,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
158
164
 
159
165
  [1.3.6]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.6
160
166
 
167
+ [1.3.8]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.7...v1.3.8
161
168
  [1.3.7]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,41 +1,44 @@
1
- import { SlideOver } from "@faststore/ui";
1
+ import React from "react";
2
+
3
+ import { SlideOver, useFadeEffect } from "@faststore/ui";
4
+
5
+ import { DrawerProps } from "../../hooks";
2
6
 
3
7
  import { BasicDrawerBody } from "./BasicDrawerBody";
4
8
  import { BasicDrawerButton } from "./BasicDrawerButton";
5
9
  import { BasicDrawerFooter } from "./BasicDrawerFooter";
6
10
  import { BasicDrawerHeading } from "./BasicDrawerHeading";
7
11
 
8
- import type { DrawerProps } from "../../hooks/useDrawerProps";
9
-
10
12
  export type BasicDrawerProps = Omit<DrawerProps, "open"> & {
11
13
  children: React.ReactNode;
12
14
  id?: string;
15
+ isOpen: boolean;
16
+ onDismiss?: () => void;
13
17
  };
14
18
 
15
19
  export const BasicDrawer = ({
16
20
  isOpen,
17
- children,
21
+ onDismiss,
18
22
  id,
23
+ children,
19
24
  ...props
20
25
  }: BasicDrawerProps) => {
26
+ const { fadeOut } = useFadeEffect();
21
27
  return (
22
- <>
23
- {isOpen && (
24
- <SlideOver
25
- size="partial"
26
- direction="rightSide"
27
- isOpen={isOpen}
28
- data-fs-bp-basic-drawer
29
- id={id}
30
- {...props}
31
- >
32
- {children}
33
- </SlideOver>
34
- )}
35
- </>
28
+ <SlideOver
29
+ isOpen={isOpen}
30
+ direction="rightSide"
31
+ size="partial"
32
+ data-fs-bp-basic-drawer
33
+ data-fs-mobile-bottom-sheet
34
+ id={id}
35
+ onDismiss={onDismiss ?? fadeOut}
36
+ {...props}
37
+ >
38
+ {children}
39
+ </SlideOver>
36
40
  );
37
41
  };
38
-
39
42
  BasicDrawer.Heading = BasicDrawerHeading;
40
43
  BasicDrawer.Body = BasicDrawerBody;
41
44
  BasicDrawer.Footer = BasicDrawerFooter;
@@ -10,6 +10,50 @@
10
10
  border-top-left-radius: 1.25rem;
11
11
  border-top-right-radius: 1.25rem;
12
12
 
13
+ &[data-fs-slide-over][data-fs-mobile-bottom-sheet][data-fs-slide-over-sidebar] {
14
+ max-height: 100%;
15
+ }
16
+
17
+ @include media("<=tablet") {
18
+ &[data-fs-slide-over][data-fs-mobile-bottom-sheet] {
19
+ &:not([data-fs-slide-over-sidebar]) {
20
+ left: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ top: auto;
24
+ width: 100vw;
25
+ max-height: min(85vh, 45rem);
26
+
27
+ border-top-left-radius: var(--fs-spacing-3);
28
+ border-top-right-radius: var(--fs-spacing-3);
29
+ box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
30
+
31
+ will-change: transform;
32
+ backface-visibility: hidden;
33
+ transform: translate3d(0, 100%, 0);
34
+
35
+ transition: transform var(--fs-slide-over-transition-timing) ease;
36
+
37
+ &[data-fs-slide-over-state="in"] {
38
+ transform: translate3d(0, 0, 0);
39
+ }
40
+ &[data-fs-slide-over-state="out"] {
41
+ transform: translate3d(0, 100%, 0);
42
+ }
43
+
44
+ &[data-fs-slide-over-direction="rightSide"][data-fs-slide-over-state="out"],
45
+ &[data-fs-slide-over-direction="leftSide"][data-fs-slide-over-state="out"] {
46
+ transform: translate3d(0, 100%, 0);
47
+ }
48
+
49
+ [data-fs-slide-over][data-fs-mobile-bottom-sheet]
50
+ [data-fs-slide-over-state="out"] {
51
+ transform: translateY(100%);
52
+ }
53
+ }
54
+ }
55
+ }
56
+
13
57
  @include media(">=tablet") {
14
58
  height: 100%;
15
59
  bottom: auto;
@@ -23,6 +23,7 @@ export const SidebarDrawer = ({
23
23
  close={close}
24
24
  {...props}
25
25
  data-fs-slide-over-direction="leftSide"
26
+ data-fs-slide-over-sidebar
26
27
  >
27
28
  <BasicDrawer.Heading
28
29
  title={
@@ -13,4 +13,4 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
13
13
  export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
14
14
  "bp_hide_edit_recipient_confirm";
15
15
 
16
- export const CURRENT_VERSION = "1.3.7";
16
+ export const CURRENT_VERSION = "1.3.8";