-
Notifications
You must be signed in to change notification settings - Fork 17
[doc] Add Branding details screen #2416
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
Merged
raquelarrojo
merged 19 commits into
theme-generator
from
PelayoFelgueroso/branding_details
Mar 6, 2026
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cf1287a
Add Branding details screen
PelayoFelgueroso cda62b2
-Remove `width: fit-content` to DxcButtons as it is the default value.
PelayoFelgueroso 34469e0
Fix based on comments and Change version of adobe leonardo
PelayoFelgueroso 5527d9b
Create Branding Input grid and remove imports from /lib
PelayoFelgueroso 7f2c799
Remove adobe leonador to global package.json
PelayoFelgueroso 9c834f7
Update package-lock
PelayoFelgueroso 961eab0
Delete lock file
PelayoFelgueroso c6c6374
Fix based on comments
PelayoFelgueroso bb1c6ba
add accessibility properties to ColorBox
PelayoFelgueroso b2f2eed
Change width of ColorBox, and create copyToCipboard in utils.ts
PelayoFelgueroso affc1a3
Reorganize folders
PelayoFelgueroso 33f535b
fix based on comments
PelayoFelgueroso 24b3e42
Remane BrandingColorGrid, use LCH instead of RGB.
PelayoFelgueroso 2bbdf74
change stop-color everywhere
PelayoFelgueroso 12bd920
Fix build issue
PelayoFelgueroso bfd111c
Merge branch 'theme-generator' into PelayoFelgueroso/branding_details
PelayoFelgueroso bdf12f2
Change folder name to be able to change the file name
PelayoFelgueroso 4a678ea
Merge branch 'PelayoFelgueroso/branding_details' of https://github.co…
PelayoFelgueroso 66055b6
Change folder to branding again
PelayoFelgueroso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
76 changes: 31 additions & 45 deletions
76
apps/website/screens/theme-generator/components/BottomButtons.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -1,54 +1,40 @@ | ||
| import { DxcButton, DxcContainer, DxcFlex } from "@dxc-technology/halstack-react"; | ||
| import { Step } from "../ThemeGeneratorConfigPage"; | ||
| import { Step } from "../types"; | ||
|
|
||
| const MIN_STEP: Step = 0; | ||
| const MAX_STEP: Step = 2; | ||
|
|
||
| interface BottomButtonsProps { | ||
| const BottomButtons = ({ | ||
| currentStep, | ||
| onChangeStep, | ||
| onExport, | ||
| }: { | ||
| currentStep: Step; | ||
| onChangeStep: (step: Step) => void; | ||
| } | ||
|
|
||
| const BottomButtons = ({ currentStep, onChangeStep }: BottomButtonsProps) => { | ||
| const goToStep = (step: number) => { | ||
| if (step >= MIN_STEP && step <= MAX_STEP) { | ||
| onChangeStep(step as Step); | ||
| } | ||
| }; | ||
|
|
||
| return ( | ||
| <DxcContainer | ||
| width="100%" | ||
| padding="var(--spacing-padding-s) var(--spacing-padding-l)" | ||
| background={{ color: "var(--color-bg-neutral-lightest)" }} | ||
| boxSizing="border-box" | ||
| > | ||
| <DxcFlex justifyContent="flex-end" alignItems="center" gap="var(--spacing-gap-m)"> | ||
| <DxcButton | ||
| label="Back" | ||
| icon="arrow_back" | ||
| mode="tertiary" | ||
| onClick={() => goToStep(currentStep - 1)} | ||
| disabled={currentStep === 0} | ||
| size={{ height: "medium", width: "fitContent" }} | ||
| /> | ||
| {currentStep === 2 ? ( | ||
| <DxcButton | ||
| label="Export theme" | ||
| //TODO: replace with actual export functionality | ||
| onClick={() => console.log("download theme")} | ||
| size={{ height: "medium", width: "fitContent" }} | ||
| /> | ||
| ) : ( | ||
| <DxcButton | ||
| label="Next" | ||
| onClick={() => goToStep(currentStep + 1)} | ||
| size={{ height: "medium", width: "fitContent" }} | ||
| /> | ||
| )} | ||
| </DxcFlex> | ||
| </DxcContainer> | ||
| ); | ||
| }; | ||
| onExport: () => void; | ||
| }) => ( | ||
| <DxcContainer | ||
| width="100%" | ||
| padding="var(--spacing-padding-s) var(--spacing-padding-l)" | ||
| background={{ color: "var(--color-bg-neutral-lightest)" }} | ||
| boxSizing="border-box" | ||
| > | ||
| <DxcFlex justifyContent="flex-end" alignItems="center" gap="var(--spacing-gap-m)"> | ||
| <DxcButton | ||
| label="Back" | ||
| icon="arrow_back" | ||
| mode="tertiary" | ||
| onClick={() => onChangeStep((currentStep - 1) as Step)} | ||
| disabled={currentStep === MIN_STEP} | ||
| size={{ height: "medium" }} | ||
| /> | ||
| {currentStep === MAX_STEP ? ( | ||
| <DxcButton label="Export theme" onClick={onExport} size={{ height: "medium" }} /> | ||
| ) : ( | ||
| <DxcButton label="Next" onClick={() => onChangeStep((currentStep + 1) as Step)} size={{ height: "medium" }} /> | ||
| )} | ||
| </DxcFlex> | ||
| </DxcContainer> | ||
| ); | ||
|
|
||
| export default BottomButtons; |
7 changes: 1 addition & 6 deletions
7
apps/website/screens/theme-generator/components/StepHeading.tsx
This file contains hidden or 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
40 changes: 40 additions & 0 deletions
40
apps/website/screens/theme-generator/components/branding/BrandingColorGrid.tsx
This file contains hidden or 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,40 @@ | ||
| import { DxcFlex, DxcGrid, DxcTypography } from "@dxc-technology/halstack-react"; | ||
| import { ColorCard } from "./ColorCard"; | ||
| import { Colors } from "../../types"; | ||
| import { BrandingColorGridProps } from "./types"; | ||
|
|
||
| const BrandingColorGrid = ({ section, colors, onColorChange }: BrandingColorGridProps) => ( | ||
| <DxcFlex direction="column" alignItems="flex-start" gap="var(--spacing-gap-m)" alignSelf="stretch"> | ||
| <DxcFlex alignItems="center" gap="var(--spacing-gap-xs)"> | ||
| <DxcTypography | ||
| as="div" | ||
| color="var(--color-fg-primary-strong)" | ||
| fontSize="var(--typography-body-xxl)" | ||
| lineHeight="var(--height-xxs)" | ||
| > | ||
| {section.icon} | ||
| </DxcTypography> | ||
| <DxcTypography | ||
| as="h3" | ||
| fontSize="var(--typography-title-l)" | ||
| fontWeight="var(--typography-title-bold)" | ||
| lineHeight="normal" | ||
| > | ||
| {section.title} | ||
| </DxcTypography> | ||
| </DxcFlex> | ||
| <DxcGrid placeSelf="stretch" templateColumns={["repeat(4, 1fr)"]} gap="var(--spacing-gap-m)"> | ||
| {section.fields.map(({ id, label, helperText }) => ( | ||
| <ColorCard | ||
| key={id} | ||
| label={label} | ||
| helperText={helperText} | ||
| color={colors[id as keyof Colors]} | ||
| onChange={onColorChange(id)} | ||
| /> | ||
| ))} | ||
| </DxcGrid> | ||
| </DxcFlex> | ||
| ); | ||
|
|
||
| export default BrandingColorGrid; | ||
45 changes: 45 additions & 0 deletions
45
apps/website/screens/theme-generator/components/branding/BrandingLogoGrid.tsx
This file contains hidden or 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,45 @@ | ||
| import { DxcFileInput, DxcFlex, DxcGrid, DxcTypography } from "@dxc-technology/halstack-react"; | ||
| import { Logos } from "../../types"; | ||
| import { BrandingLogoGridProps } from "./types"; | ||
|
|
||
| const BrandingLogoGrid = ({ section, logos, onLogoChange }: BrandingLogoGridProps) => ( | ||
| <DxcFlex direction="column" alignItems="flex-start" gap="var(--spacing-gap-m)" alignSelf="stretch"> | ||
| <DxcFlex alignItems="center" gap="var(--spacing-gap-xs)"> | ||
| <DxcTypography | ||
| as="div" | ||
| color="var(--color-fg-primary-strong)" | ||
| fontSize="var(--typography-body-xxl)" | ||
| lineHeight="var(--height-xxs)" | ||
| > | ||
| {section.icon} | ||
| </DxcTypography> | ||
| <DxcTypography | ||
| as="h3" | ||
| fontSize="var(--typography-title-l)" | ||
| fontWeight="var(--typography-title-bold)" | ||
| lineHeight="normal" | ||
| > | ||
| {section.title} | ||
| </DxcTypography> | ||
| </DxcFlex> | ||
| <DxcGrid templateColumns={["repeat(4, 1fr)"]} gap="var(--spacing-gap-m)" placeSelf="stretch"> | ||
| {section.fields.map(({ id, label, helperText }) => ( | ||
| <DxcFileInput | ||
| key={id} | ||
| size="fillParent" | ||
| label={label} | ||
| helperText={helperText} | ||
| buttonLabel="Select file" | ||
| mode="filedrop" | ||
| accept="image/*" | ||
| showPreview | ||
| multiple={false} | ||
| callbackFile={(files) => onLogoChange(id, files)} | ||
| value={logos[id as keyof Logos]} | ||
| /> | ||
| ))} | ||
| </DxcGrid> | ||
| </DxcFlex> | ||
| ); | ||
|
|
||
| export default BrandingLogoGrid; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.