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

feat(styles): new floating label inputs #3493

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
c5ddca4
First Sync Designtokens
swisspost-bot Jul 8, 2024
4511cd5
feat(tokens): Added Componenttokens to most textinput fields and some…
swisspost-bot Jul 10, 2024
7c728e9
feat(tokens): added tokens for textrarea and textimput
swisspost-bot Jul 10, 2024
d20c145
feat(token): added Fillertokens to empty groups for testing reasons
swisspost-bot Jul 11, 2024
c83ab57
fix(tokens): Safetycopy before Namechanges
swisspost-bot Jul 11, 2024
17f7a26
refactor(tokens): Namechange from horizontal/vertical to inline/block
swisspost-bot Jul 12, 2024
e0dd280
refactor (tokens): Renaming and where needed remapping of values with…
swisspost-bot Jul 12, 2024
533e21b
Feat(tokens): added inverted colors
Vandapanda Jul 12, 2024
5ea7c49
Update for Device Transfair
Vandapanda Jul 15, 2024
09a46ad
Push for merg tryouts
Vandapanda Jul 15, 2024
2e65671
Merge branch 'main' into tokens/v2
oliverschuerch Jul 15, 2024
b236a06
refactor(tokens): removing % out of token names
Vandapanda Jul 15, 2024
7cad4d9
Devicetransfer push
Vandapanda Jul 15, 2024
4dee50c
feat (tokens): Added some Tokens for popover and breadcrumbs, added p…
Vandapanda Jul 16, 2024
f1bbb1e
Merge branch 'main' into tokens/v2
oliverschuerch Jul 18, 2024
2aaae90
Merge branch 'main' into tokens/v2
oliverschuerch Jul 22, 2024
f1a1b1c
Merge branch 'main' into tokens/v2
oliverschuerch Jul 22, 2024
07e087e
Feat (tokens): Added some spacing tokens for textfields, remapped tok…
Vandapanda Jul 23, 2024
e6787a1
Push for device switch
Vandapanda Jul 24, 2024
ae56263
End of Workday push
Vandapanda Jul 24, 2024
6965294
Feat (tokens): Added Tokens for Notification/popover
Vandapanda Jul 25, 2024
4e7b944
Feat (Tokens): Added inverted Button colors, overworked
Vandapanda Jul 25, 2024
7e01d2e
Testing out a bug
Vandapanda Jul 26, 2024
e35a134
testing out bug
Vandapanda Jul 26, 2024
a680fb4
Feat (Tokens): Added semantic typotokens according to file
Vandapanda Jul 26, 2024
e923437
Feat (tokens): Added utility tokens for typo on component level
Vandapanda Jul 26, 2024
ca2c10a
Feat (tokens): Added Tokens for Badge notifications
Vandapanda Jul 29, 2024
d7dfc34
refactor (tokens): Renamed most of the component color tokens to fit …
Vandapanda Jul 29, 2024
da95476
Feat (Tokens): Added Tokens for notifications
Vandapanda Jul 31, 2024
2ee2654
refactor (tokens): Renamed semantic spacing tokens to easier reuse to…
Vandapanda Jul 31, 2024
221ef8f
Pushed for exercise
Vandapanda Jul 31, 2024
99de3c2
Feat (tokens): added colortokens to notifications
Vandapanda Jul 31, 2024
7207ea1
feat (tokens): Added notification color token on a component level
Vandapanda Aug 5, 2024
3664d4e
feat (tokens): added sizing and spacing tokens to notifications
Vandapanda Aug 6, 2024
bd5883d
Feat (tokens): Added Surface as category for component tokens, added …
Vandapanda Aug 7, 2024
a50606e
refactor (tokens): renaming some of the sizing token to better repres…
Vandapanda Aug 7, 2024
570603b
Feat (tokens): added tokens for different kinds of buttons
Vandapanda Aug 8, 2024
ef0acd1
feat (tokens): Added Tokens for social media button
Vandapanda Aug 12, 2024
8a2ef8c
Refactor (tokens): rerouted Font-weight tokens on a semantic level
Vandapanda Aug 13, 2024
438d9e7
Feat (tokens): Added Text styles
Vandapanda Aug 13, 2024
a5d08f9
Merge branch 'main' into tokens/v2
oliverschuerch Aug 13, 2024
8fabba2
Safety push before changing to new format
Vandapanda Aug 14, 2024
8c0dd75
Convert to W3C - DTCG Format
Vandapanda Aug 14, 2024
d27269e
Feat (Tokens): added line-height variables
Vandapanda Aug 14, 2024
5c5f0b1
Refacture (tokens): Changed the Naming of the utility typo tokens
Vandapanda Aug 19, 2024
25574d5
Refacture (Tokens): Changed paragraph tokens to represent changes in …
Vandapanda Aug 21, 2024
3580d42
Feat (Tokens): Tryout token for SVG disabled Borders
Vandapanda Aug 21, 2024
ed6075b
chore: add verbose scripts for the tokens package
oliverschuerch Aug 21, 2024
e79ed25
refactor(tokens): update build script to support w3c dtcg format
oliverschuerch Aug 22, 2024
8b05591
Refacture (Tokens): broke down interactives into specivic components
Vandapanda Aug 23, 2024
196da08
Feat (tokens): added stroke-tokens to checkboxes
Vandapanda Aug 23, 2024
e50855e
Feat (Tokens): Added tokens to Checkbox, popover and radio-button
Vandapanda Aug 23, 2024
60d32e2
refactor(tokens): vulnerable regex mentioned by sonar
oliverschuerch Aug 26, 2024
e0db4bf
refactor(tokens): vulnerable regex mentioned by sonar
oliverschuerch Aug 26, 2024
6d56639
Feat (Tokens): added some spacing and sizing tokens for components. S…
Vandapanda Aug 26, 2024
d3696cd
feat(tokens): implement workaround for correctly output shadow tokens…
oliverschuerch Aug 26, 2024
7454c8f
refactor(tokens): nested functions, reported by sonar
oliverschuerch Aug 26, 2024
097e176
refactor(tokens): alternation, reported by sonar
oliverschuerch Aug 26, 2024
b7ee320
refactor(tokens): vulnerable regex mentioned by sonar
oliverschuerch Aug 26, 2024
c1583a4
fix(styles): fix post theme map name
oliverschuerch Aug 26, 2024
2451573
refactor(tokens): vulnerable regex mentioned by sonar
oliverschuerch Aug 26, 2024
67c66cb
feat(tokens): add normalizeSetName method
oliverschuerch Aug 26, 2024
5998825
refactor(tokens): replace character class by character itself, report…
oliverschuerch Aug 26, 2024
218d005
refactor(tokens): rename tokenset-prefix constant
oliverschuerch Aug 26, 2024
b9c643f
Merge branch 'main' into tokens/v2
oliverschuerch Aug 26, 2024
41e7b1b
Refacture (Tokens): Renamed font based on other naming convenionts
Vandapanda Aug 26, 2024
9122d09
Feat (tokens): added tokens for Popover and Social media Button
Vandapanda Aug 27, 2024
86217c8
refacture (tokens): changed typo tocens accordingly to documentation
Vandapanda Aug 28, 2024
a2d729e
chore(tokens): removed not used tokens on componentlevel
Vandapanda Aug 28, 2024
0edec97
chore(tokens):removed interactive tokens after rewiring componenttoke…
Vandapanda Aug 28, 2024
d87b867
chore(tokens):Switched to multi layered Modi, deleted some spacing / …
Vandapanda Aug 28, 2024
43b29a6
refacture(tokens):deleted doubble naming in buttons
Vandapanda Aug 28, 2024
ab54f67
feat(tokens):added the component list to be able to add the component…
Vandapanda Aug 28, 2024
b2b5c99
feat(tokens): implement tokenset column inheritance
oliverschuerch Aug 28, 2024
e25d4f0
refacture(tokens):renamed the utility set to components/base
Vandapanda Aug 29, 2024
bd70648
refactore(tokens): rewrote naming of notification tokens
Vandapanda Aug 29, 2024
8e08150
refacture(tokens):Changed a token for List, end of day push
Vandapanda Aug 29, 2024
07b5a8f
refacture(tokens):moving notifications to their own sets. notificatio…
Vandapanda Aug 30, 2024
1d1bfbf
feat(tokens):added poirt of the list tokens
Vandapanda Aug 30, 2024
a0c8184
feat(styles): add components tokens file
oliverschuerch Aug 30, 2024
c91df6d
refacture(tokens):moved typo tokens to figma only
Vandapanda Sep 2, 2024
293026a
refactor(tokens): remove component tokensets as source tokens
oliverschuerch Sep 2, 2024
88d882d
Merge branch 'tokens/v2' of https://github.com/swisspost/design-syste…
oliverschuerch Sep 2, 2024
f41c729
refactor(tokens):changed stepper so there are no componenttoken used …
Vandapanda Sep 3, 2024
507ed9d
refactor(tokens):renamed header to heading in typo tokens
Vandapanda Sep 3, 2024
d49bc49
Add element sets and utilities
oliverschuerch Sep 4, 2024
5ee4a75
feat(styles): add text input styles v2
alizedebray Sep 4, 2024
be36f60
add todos
alizedebray Sep 4, 2024
a782daa
Update _text-input.scss
alizedebray Sep 4, 2024
3f2e5c8
feat(tokens): implement different source files for every output
oliverschuerch Sep 4, 2024
f624233
feat(styles): add tokens files for elements and utilities
oliverschuerch Sep 4, 2024
9ad9fd2
Merge branch 'main' into tokens/v2
oliverschuerch Sep 4, 2024
96dfcf3
feat(tokens):added utilitytokens and typographic tokens for coding.
Vandapanda Sep 4, 2024
076e9fb
update stories
alizedebray Sep 4, 2024
db458af
refactor(tokens):renaming semantical layers for better understanding
Vandapanda Sep 5, 2024
1c22fd0
Merge branch 'tokens/v2' into 3270-component-text-input
alizedebray Sep 5, 2024
efa74ec
refactor(tokens):renamed first half of the existing component tokens …
Vandapanda Sep 5, 2024
56c96fd
refactor(tokens): shortened names where possible for component tokens…
Vandapanda Sep 6, 2024
13643e9
add validation
alizedebray Sep 6, 2024
8891ce3
Merge branch '3270-component-text-input' of https://github.com/swissp…
alizedebray Sep 6, 2024
c229cb7
Merge branch 'tokens/v2' into 3270-component-text-input
alizedebray Sep 6, 2024
d1b5782
Merge branch 'main' into 3270-component-text-input
leagrdv Nov 6, 2024
4506625
fix issues following merge
leagrdv Nov 6, 2024
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
Prev Previous commit
Next Next commit
feat(tokens): add normalizeSetName method
  • Loading branch information
oliverschuerch committed Aug 26, 2024
commit 67c66cb98a378e750da0baea755c8405044c6f0a
14 changes: 13 additions & 1 deletion packages/tokens/_build/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import StyleDictionary from './style-dictionary.js';
import { usesReferences } from 'style-dictionary/utils';
import { expandTypesMap } from '@tokens-studio/sd-transforms';
import { promises } from 'fs';
import { SOURCE_PATH, OUTPUT_PATH, FILE_HEADER } from './constants.js';
import { SOURCE_PATH, OUTPUT_PATH, FILE_HEADER, SCSS_MAP_PREFIX } from './constants.js';

let CLI_OPTIONS;
let tokenSets;
Expand Down Expand Up @@ -220,6 +220,18 @@ export function getFileHeader() {
return FILE_HEADER.replace('{date}', new Date().toUTCString());
}

/**
* @function normalizeSetName(option, setName)
*
* @param options Config
* @param setName String
*
* @returns the normalized set name
*/
export function normalizeSetName(_options, setName) {
return `${SCSS_MAP_PREFIX ? SCSS_MAP_PREFIX + '-' : ''}${setName.trim().replace(/[ ]/g, '-')}`;
}

/**
* @function normalizeTokenName(option, token)
*
Expand Down
14 changes: 8 additions & 6 deletions packages/tokens/_build/style-dictionary.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import StyleDictionary from 'style-dictionary';
import { sortByReference } from 'style-dictionary/utils';
import { register } from '@tokens-studio/sd-transforms';
import { SCSS_MAP_PREFIX } from './constants.js';
import { getFileHeader, normalizeTokenName, normalizeTokenValueReference } from './methods.js';
import {
getFileHeader,
normalizeSetName,
normalizeTokenName,
normalizeTokenValueReference,
} from './methods.js';

register(StyleDictionary);

Expand Down Expand Up @@ -79,7 +83,7 @@ StyleDictionary.registerFormat({
getFileHeader() +
meta.setNames
.map(setName => {
const scssMapPrefix = SCSS_MAP_PREFIX ? SCSS_MAP_PREFIX + '-' : '';
const tokenSetName = normalizeSetName(options, setName);
const tokens = dictionary.allTokens
.filter(token => token.path[0] === setName)
.sort(sortByReference(dictionary))
Expand All @@ -93,9 +97,7 @@ StyleDictionary.registerFormat({
})
.join('\n');

return meta.core
? `:root {\n${tokens}\n}\n`
: `$${scssMapPrefix}${setName}: (\n${tokens}\n);\n`;
return meta.core ? `:root {\n${tokens}\n}\n` : `$${tokenSetName}: (\n${tokens}\n);\n`;
})
.join('\n')
);
Expand Down