@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 +8 -1
- package/package.json +1 -1
- package/src/features/shared/components/BasicDrawer/BasicDrawer.tsx +22 -19
- package/src/features/shared/components/BasicDrawer/basic-drawer.scss +44 -0
- package/src/features/shared/layouts/BaseTabsLayout/sidebar-drawer/SidebarDrawer.tsx +1 -0
- package/src/features/shared/utils/constants.ts +1 -1
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/
|
|
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,41 +1,44 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
21
|
+
onDismiss,
|
|
18
22
|
id,
|
|
23
|
+
children,
|
|
19
24
|
...props
|
|
20
25
|
}: BasicDrawerProps) => {
|
|
26
|
+
const { fadeOut } = useFadeEffect();
|
|
21
27
|
return (
|
|
22
|
-
|
|
23
|
-
{isOpen
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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;
|