Skip to content

Commit

Permalink
Merge pull request #19 from qld-gov-au/feature/tokens-2.1.1
Browse files Browse the repository at this point in the history
Feature/tokens 2.1.1 palette -> palettes
  • Loading branch information
pedroportella authored Dec 6, 2024
2 parents c8fe511 + f819153 commit a5109f4
Show file tree
Hide file tree
Showing 237 changed files with 32,103 additions and 39,099 deletions.
6 changes: 3 additions & 3 deletions .build/build-tokens.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { copyOriginalFile, emptyDir } from "./dir-and-files.mjs";

register(StyleDictionary);

// list of components that we have tokens for, assume the tokenset path for it is tokens/${comp}.tokens.json
// list of components that we have tokens for, assume the tokenset path for it is tokens/${comp}.json
const components = ["button", "card"];

const directory = "src";
Expand All @@ -23,12 +23,12 @@ const finalDestIndex = "src/index.ts"
const originalSrcGlobal = ".build/original/global.d.ts"
const finalDestGlobal = "src/global.d.ts"

async function beforeRun() {
function beforeRun() {
// clear
emptyDir(directory);
}

async function afterRun() {
function afterRun() {
// copy index.ts and global.d.ts for dist
copyOriginalFile(originalSrcIndex, finalDestIndex);
copyOriginalFile(originalSrcGlobal, finalDestGlobal);
Expand Down
6 changes: 3 additions & 3 deletions .build/sd-file-generators.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const generateSemanticFiles = (components, theme, platform, fileExtension
destination: `src/${platform}/styles/qgds-${theme.toLowerCase()}.${fileExtension}`,
});

// not theme-specific outputs
// no theme-specific outputs
filesArr.push({
...commonFileOptions[platform],
filter: semanticFilter(components, false),
Expand All @@ -40,7 +40,7 @@ export const generateSemanticFiles = (components, theme, platform, fileExtension
return filesArr;
};

// for each component (currently only button), filter those specific component tokens and output them
// for each component (currently only button and card), filter those specific component tokens and output them
// to the component folder where the component source code will live
export const generateComponentFiles = (components, theme, platform, fileExtension) => {
const filesArr = [];
Expand All @@ -53,7 +53,7 @@ export const generateComponentFiles = (components, theme, platform, fileExtensio
destination: `src/${platform}/${comp}/${comp}-${theme.toLowerCase()}.${fileExtension}`,
});

// not theme-specific outputs
// no theme-specific outputs
filesArr.push({
...commonFileOptions[platform],
filter: componentFilter(comp, false),
Expand Down
1 change: 1 addition & 0 deletions .build/sd-filters.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const semanticFilter =
)
);
};

// filters tokens by themable and from which tokenset they originate
// must match per component name, in this repository we currently only have "button"
export const componentFilter =
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Queensland Government Design System
# Design Tokens
# Queensland Government Design System
# Design Tokens
## (qgds-tokens)
*Style once, use everywhere.*
>
Expand All @@ -9,9 +9,9 @@

### Using this repository:
Run:
```bash
```bash
npm run build
```
```

### Verify outputs
```bash
Expand All @@ -33,7 +33,7 @@ https://docs.tokens.studio

## About Style Dictionary
https://github.com/amzn/style-dictionary

## About Style Dictionary Transforms for Tokens Studio
https://github.com/tokens-studio/sd-transforms

Expand Down
151 changes: 151 additions & 0 deletions dist/android/button/button-campaign-neon-palette.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Do not edit directly, this file was auto-generated.
-->
<resources>
<color name="buttonPaletteBrightPrimaryDefaultBackground">#710074</color>
<color name="buttonPaletteBrightPrimaryDefaultText">#ffffff</color>
<string name="buttonPaletteBrightPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteBrightPrimaryDefaultBorder">#710074</color>
<color name="buttonPaletteBrightPrimaryActiveBackground">#5d0061</color>
<color name="buttonPaletteBrightPrimaryActiveText">#ffffff</color>
<string name="buttonPaletteBrightPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteBrightPrimaryActiveBorder">#5d0061</color>
<color name="buttonPaletteBrightPrimaryHoverBackground">#5d0061</color>
<color name="buttonPaletteBrightPrimaryHoverText">#ffffff</color>
<string name="buttonPaletteBrightPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteBrightPrimaryHoverBorder">#5d0061</color>
<color name="buttonPaletteBrightSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBrightSecondaryDefaultText">#ae0047</color>
<string name="buttonPaletteBrightSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteBrightSecondaryDefaultBorder">#710074</color>
<color name="buttonPaletteBrightSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBrightSecondaryActiveText">#ae0047</color>
<string name="buttonPaletteBrightSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteBrightSecondaryActiveBorder">#5d0061</color>
<color name="buttonPaletteBrightSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBrightSecondaryHoverText">#ae0047</color>
<string name="buttonPaletteBrightSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteBrightSecondaryHoverBorder">#5d0061</color>
<color name="buttonPaletteTintPrimaryDefaultBackground">#710074</color>
<color name="buttonPaletteTintPrimaryDefaultText">#ffffff</color>
<string name="buttonPaletteTintPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteTintPrimaryDefaultBorder">#710074</color>
<color name="buttonPaletteTintPrimaryActiveBackground">#5d0061</color>
<color name="buttonPaletteTintPrimaryActiveText">#ffffff</color>
<string name="buttonPaletteTintPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteTintPrimaryActiveBorder">#5d0061</color>
<color name="buttonPaletteTintPrimaryHoverBackground">#5d0061</color>
<color name="buttonPaletteTintPrimaryHoverText">#ffffff</color>
<string name="buttonPaletteTintPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteTintPrimaryHoverBorder">#5d0061</color>
<color name="buttonPaletteTintSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteTintSecondaryDefaultText">#ae0047</color>
<string name="buttonPaletteTintSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteTintSecondaryDefaultBorder">#710074</color>
<color name="buttonPaletteTintSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteTintSecondaryActiveText">#ae0047</color>
<string name="buttonPaletteTintSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteTintSecondaryActiveBorder">#5d0061</color>
<color name="buttonPaletteTintSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteTintSecondaryHoverText">#ae0047</color>
<string name="buttonPaletteTintSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteTintSecondaryHoverBorder">#5d0061</color>
<color name="buttonPaletteAltPrimaryDefaultBackground">#710074</color>
<color name="buttonPaletteAltPrimaryDefaultText">#ffffff</color>
<string name="buttonPaletteAltPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteAltPrimaryDefaultBorder">#710074</color>
<color name="buttonPaletteAltPrimaryActiveBackground">#5d0061</color>
<color name="buttonPaletteAltPrimaryActiveText">#ffffff</color>
<string name="buttonPaletteAltPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteAltPrimaryActiveBorder">#5d0061</color>
<color name="buttonPaletteAltPrimaryHoverBackground">#5d0061</color>
<color name="buttonPaletteAltPrimaryHoverText">#ffffff</color>
<string name="buttonPaletteAltPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteAltPrimaryHoverBorder">#5d0061</color>
<color name="buttonPaletteAltSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteAltSecondaryDefaultText">#ae0047</color>
<string name="buttonPaletteAltSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteAltSecondaryDefaultBorder">#710074</color>
<color name="buttonPaletteAltSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteAltSecondaryActiveText">#ae0047</color>
<string name="buttonPaletteAltSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteAltSecondaryActiveBorder">#5d0061</color>
<color name="buttonPaletteAltSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteAltSecondaryHoverText">#ae0047</color>
<string name="buttonPaletteAltSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteAltSecondaryHoverBorder">#5d0061</color>
<color name="buttonPaletteBoldPrimaryDefaultBackground">#ffffff</color>
<color name="buttonPaletteBoldPrimaryDefaultText">#2a2b2f</color>
<string name="buttonPaletteBoldPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteBoldPrimaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteBoldPrimaryActiveBackground">#ffc85e</color>
<color name="buttonPaletteBoldPrimaryActiveText">#2a2b2f</color>
<string name="buttonPaletteBoldPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteBoldPrimaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteBoldPrimaryHoverBackground">#ffc85e</color>
<color name="buttonPaletteBoldPrimaryHoverText">#2a2b2f</color>
<string name="buttonPaletteBoldPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteBoldPrimaryHoverBorder">#ffc85e</color>
<color name="buttonPaletteBoldSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBoldSecondaryDefaultText">#ffffff</color>
<string name="buttonPaletteBoldSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteBoldSecondaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteBoldSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBoldSecondaryActiveText">#ffffff</color>
<string name="buttonPaletteBoldSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteBoldSecondaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteBoldSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteBoldSecondaryHoverText">#ffffff</color>
<string name="buttonPaletteBoldSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteBoldSecondaryHoverBorder">#ffc85e</color>
<color name="buttonPaletteStrongPrimaryDefaultBackground">#ffffff</color>
<color name="buttonPaletteStrongPrimaryDefaultText">#2a2b2f</color>
<string name="buttonPaletteStrongPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteStrongPrimaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteStrongPrimaryActiveBackground">#ffc85e</color>
<color name="buttonPaletteStrongPrimaryActiveText">#2a2b2f</color>
<string name="buttonPaletteStrongPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteStrongPrimaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteStrongPrimaryHoverBackground">#ffc85e</color>
<color name="buttonPaletteStrongPrimaryHoverText">#2a2b2f</color>
<string name="buttonPaletteStrongPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteStrongPrimaryHoverBorder">#ffc85e</color>
<color name="buttonPaletteStrongSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteStrongSecondaryDefaultText">#ffffff</color>
<string name="buttonPaletteStrongSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteStrongSecondaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteStrongSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteStrongSecondaryActiveText">#ffffff</color>
<string name="buttonPaletteStrongSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteStrongSecondaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteStrongSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteStrongSecondaryHoverText">#ffffff</color>
<string name="buttonPaletteStrongSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteStrongSecondaryHoverBorder">#ffc85e</color>
<color name="buttonPaletteDarkPrimaryDefaultBackground">#ffffff</color>
<color name="buttonPaletteDarkPrimaryDefaultText">#2a2b2f</color>
<string name="buttonPaletteDarkPrimaryDefaultTextDecoration">none</string>
<color name="buttonPaletteDarkPrimaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteDarkPrimaryActiveBackground">#ffc85e</color>
<color name="buttonPaletteDarkPrimaryActiveText">#2a2b2f</color>
<string name="buttonPaletteDarkPrimaryActiveTextDecoration">none</string>
<color name="buttonPaletteDarkPrimaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteDarkPrimaryHoverBackground">#ffc85e</color>
<color name="buttonPaletteDarkPrimaryHoverText">#2a2b2f</color>
<string name="buttonPaletteDarkPrimaryHoverTextDecoration">underline</string>
<color name="buttonPaletteDarkPrimaryHoverBorder">#ffc85e</color>
<color name="buttonPaletteDarkSecondaryDefaultBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteDarkSecondaryDefaultText">#ffffff</color>
<string name="buttonPaletteDarkSecondaryDefaultTextDecoration">none</string>
<color name="buttonPaletteDarkSecondaryDefaultBorder">#ffffff</color>
<color name="buttonPaletteDarkSecondaryActiveBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteDarkSecondaryActiveText">#ffffff</color>
<string name="buttonPaletteDarkSecondaryActiveTextDecoration">none</string>
<color name="buttonPaletteDarkSecondaryActiveBorder">#ffc85e</color>
<color name="buttonPaletteDarkSecondaryHoverBackground">rgba(0, 0, 0, 0)</color>
<color name="buttonPaletteDarkSecondaryHoverText">#ffffff</color>
<string name="buttonPaletteDarkSecondaryHoverTextDecoration">underline</string>
<color name="buttonPaletteDarkSecondaryHoverBorder">#ffc85e</color>
</resources>
Loading

0 comments on commit a5109f4

Please sign in to comment.