Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1923

Merged
merged 5 commits into from
Jul 15, 2024
Merged

Release #1923

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@



window['STORIES'] = [];</script><script src="runtime~main.9390b27b.iframe.bundle.js"></script><script src="vendors~main.2eb898cf.iframe.bundle.js"></script><script src="main.6baa0b0c.iframe.bundle.js"></script></body></html>
window['STORIES'] = [];</script><script src="runtime~main.9390b27b.iframe.bundle.js"></script><script src="vendors~main.2eb898cf.iframe.bundle.js"></script><script src="main.0e1c9460.iframe.bundle.js"></script></body></html>
3 changes: 3 additions & 0 deletions docs/main.0e1c9460.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/main.0e1c9460.iframe.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions docs/main.6baa0b0c.iframe.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/main.6baa0b0c.iframe.bundle.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions packages/carousel/src/components/ButtonsMainImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export const ButtonsMainImage = ({
planos = [],
frontCoverBlueprints = [],
setTabSelected,
handleTouchToogle,
setFullscreen,
setIndex,
}) => {
const handleClick = (e, type) => {
e.stopPropagation()
setTabSelected(type)
handleTouchToogle()
setFullscreen(true)
setIndex(0)
}
return (
Expand Down
4 changes: 3 additions & 1 deletion packages/carousel/src/components/ImageCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export const ImageCard = ({ url, styles, children, ...props }) => {
const [rectangle, setRectangle] = useState(false)
const [errorImage, setErrorImage] = useState(false)
const [showSkeleton, setShowSkeleton] = useState(true)

const isRectangle = async () => {
setErrorImage(false)
try {
const isRectangle = await validateImageDimensions(url)
return setRectangle(isRectangle)
Expand All @@ -39,7 +41,7 @@ export const ImageCard = ({ url, styles, children, ...props }) => {
}
}, [url])

if (errorImage) {
if (url && errorImage) {
return <ImageErrorFallback {...props}>{children}</ImageErrorFallback>
}

Expand Down
3 changes: 3 additions & 0 deletions packages/carousel/src/components/SliderSwap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ImageErrorFallback } from './ImageErrorFallback'

export const SliderSwap = ({
files = [],
toggleFullscreen,
setFullscreen,
otherButton,
fullScreen = false,
Expand Down Expand Up @@ -243,6 +244,7 @@ export const SliderSwap = ({
))}
{!fullScreen && files.length === 0 && (
<Box
onClick={() => toggleFullscreen()}
__css={{
display: 'flex',
justifyContent: 'center',
Expand All @@ -251,6 +253,7 @@ export const SliderSwap = ({
height: '100%',
backgroundColor: theme.colors.neutralGray7,
borderRadius: '12px',
cursor: 'pointer',
}}
>
<Icon
Expand Down
8 changes: 6 additions & 2 deletions packages/carousel/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const Carousel = ({
const mainImageSkeletonRef = useRef()
const mainImageWidthSkeleton = mainImageSkeletonRef.current?.clientWidth
const allPictures = [...imgWithCover, ...bluePrintsWithCover]

if (video.length > 0) {
tabContainers.push('Videos')
}
Expand Down Expand Up @@ -110,6 +111,7 @@ export const Carousel = ({
}
if (emptyArray) setEmptyImgArray(emptyArray)
}, [followImgColumns, windowResize])

const toggleFullscreen = () => {
if (
otherButton ||
Expand Down Expand Up @@ -223,6 +225,7 @@ export const Carousel = ({
<SliderSwap
files={allPictures}
setFullscreen={setFullscreen}
toggleFullscreen={toggleFullscreen}
otherButton={otherButton}
handleImageClickToFullscreen={handleImageClickToFullscreen}
setIndex={setIndex}
Expand All @@ -242,7 +245,7 @@ export const Carousel = ({
frontCoverBlueprints={frontCoverBlueprints}
setTabSelected={setTabSelected}
setIndex={setIndex}
handleTouchToogle={toggleFullscreen}
setFullscreen={setFullscreen}
/>
</Box>
)}
Expand Down Expand Up @@ -292,7 +295,7 @@ export const Carousel = ({
frontCoverBlueprints={frontCoverBlueprints}
setTabSelected={setTabSelected}
setIndex={setIndex}
handleTouchToogle={toggleFullscreen}
setFullscreen={setFullscreen}
/>
)}
</ImageCard>
Expand Down Expand Up @@ -341,6 +344,7 @@ export const Carousel = ({
<Box
__css={{
borderRadius: '50%',
position: 'absolute',
width: '46px',
height: '46px',
display: 'flex',
Expand Down
Loading