This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #717 from appsmithorg/release
chore: Release PR
- Loading branch information
Showing
14 changed files
with
213 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@appsmithorg/design-system-old": patch | ||
"@appsmithorg/design-system": patch | ||
--- | ||
|
||
feat: new workflow icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@appsmithorg/design-system": patch | ||
--- | ||
|
||
feat: Announcement modal |
15 changes: 12 additions & 3 deletions
15
packages/design-system-old/src/assets/icons/ads/workflows.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
packages/design-system/src/AnnouncementModal/AnnouncementModal.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { CLASS_NAME_PREFIX } from "__config__/constants"; | ||
|
||
export const AnnouncementModalClassName = `${CLASS_NAME_PREFIX}-announcement-modal`; | ||
export const AnnouncementModalBannerClassName = `${AnnouncementModalClassName}__banner`; | ||
export const AnnouncementModalContentClassName = `${AnnouncementModalClassName}__content`; | ||
export const AnnouncementModalContentDataClassName = `${AnnouncementModalContentClassName}-data`; | ||
export const AnnouncementModalContentFooterClassName = `${AnnouncementModalContentClassName}-footer`; |
35 changes: 35 additions & 0 deletions
35
packages/design-system/src/AnnouncementModal/AnnouncementModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from "react"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { AnnouncementModal } from "./AnnouncementModal"; | ||
import { Button } from "../Button"; | ||
|
||
export default { | ||
title: "Design System/Announcement", | ||
component: AnnouncementModal, | ||
} as Meta<typeof AnnouncementModal>; | ||
|
||
type Story = StoryObj<typeof AnnouncementModal>; | ||
|
||
export const AnnouncementModalStory: Story = { | ||
name: "Modal", | ||
args: { | ||
banner: "https://assets.appsmith.com/new-sidebar-banner.svg", | ||
description: | ||
"You can now write queries & JS functions as you refer to your UI on the side. This is a beta version that we will continue to improve with your feedback.", | ||
title: "Code and UI side-by-side", | ||
footer: ( | ||
<> | ||
<Button kind="primary" size="md"> | ||
Try out | ||
</Button> | ||
<Button kind="tertiary" size="md"> | ||
Learn More | ||
</Button> | ||
</> | ||
), | ||
isOpen: true, | ||
isBeta: true, | ||
}, | ||
render: (args) => <AnnouncementModal {...args} />, | ||
}; |
43 changes: 43 additions & 0 deletions
43
packages/design-system/src/AnnouncementModal/AnnouncementModal.styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import styled from "styled-components"; | ||
import { ModalContent } from "Modal"; | ||
|
||
export const StyledModalContent = styled(ModalContent)` | ||
padding: 0; | ||
width: 400px; | ||
overflow: hidden; | ||
`; | ||
|
||
export const BannerImage = styled.div<{ url: string }>` | ||
height: 350px; | ||
width: 100%; | ||
background-image: url("${({ url }) => url}"); | ||
background-position: center; | ||
background-size: cover; | ||
`; | ||
|
||
export const BannerContent = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
padding: var(--ads-v2-spaces-9); | ||
gap: var(--ads-v2-spaces-7); | ||
`; | ||
|
||
export const BannerData = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: start; | ||
gap: var(--ads-v2-spaces-3); | ||
`; | ||
|
||
export const BannerTitle = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
gap: var(--ads-v2-spaces-3); | ||
`; | ||
|
||
export const BannerFooter = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
gap: var(--ads-v2-spaces-3); | ||
`; |
61 changes: 61 additions & 0 deletions
61
packages/design-system/src/AnnouncementModal/AnnouncementModal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react"; | ||
import { Modal } from "Modal"; | ||
|
||
import { AnnouncementModalProps } from "./AnnouncementModal.types"; | ||
import { | ||
StyledModalContent, | ||
BannerImage, | ||
BannerContent, | ||
BannerData, | ||
BannerTitle, | ||
BannerFooter, | ||
} from "./AnnouncementModal.styles"; | ||
import { Text } from "Text"; | ||
import { Tag } from "Tag"; | ||
import { | ||
AnnouncementModalBannerClassName, | ||
AnnouncementModalClassName, | ||
AnnouncementModalContentClassName, | ||
AnnouncementModalContentDataClassName, | ||
AnnouncementModalContentFooterClassName, | ||
} from "./AnnouncementModal.constants"; | ||
|
||
function AnnouncementModal({ | ||
banner, | ||
description, | ||
footer, | ||
isBeta, | ||
isOpen, | ||
title, | ||
}: AnnouncementModalProps) { | ||
return ( | ||
<Modal open={isOpen}> | ||
<StyledModalContent className={AnnouncementModalClassName}> | ||
<BannerImage | ||
className={AnnouncementModalBannerClassName} | ||
url={banner} | ||
/> | ||
<BannerContent className={AnnouncementModalContentClassName}> | ||
<BannerData className={AnnouncementModalContentDataClassName}> | ||
<BannerTitle> | ||
<Text kind="heading-m">{title}</Text> | ||
{isBeta ? ( | ||
<Tag isClosable={false} size="md"> | ||
Beta | ||
</Tag> | ||
) : null} | ||
</BannerTitle> | ||
<Text kind="body-m">{description}</Text> | ||
</BannerData> | ||
<BannerFooter className={AnnouncementModalContentFooterClassName}> | ||
{footer} | ||
</BannerFooter> | ||
</BannerContent> | ||
</StyledModalContent> | ||
</Modal> | ||
); | ||
} | ||
|
||
AnnouncementModal.displayName = "AnnouncementModal"; | ||
|
||
export { AnnouncementModal }; |
15 changes: 15 additions & 0 deletions
15
packages/design-system/src/AnnouncementModal/AnnouncementModal.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// AnnouncementModal props | ||
export type AnnouncementModalProps = { | ||
/** flag to show or hide modal */ | ||
isOpen: boolean; | ||
/** the banner url of the announcement */ | ||
banner: string; | ||
/** the title of the announcement */ | ||
title: string; | ||
/** the description of the announcement */ | ||
description: string; | ||
/** the footer of the announcement */ | ||
footer?: React.ReactNode; | ||
/** flag to show or hide beta flag */ | ||
isBeta?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./AnnouncementModal"; | ||
export * from "./AnnouncementModal.types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/design-system/src/__assets__/icons/ads/workflows-mono.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions
15
packages/design-system/src/__assets__/icons/ads/workflows.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters