@govbr-ds/tokens 4.0.0-next.36 → 4.0.0-next.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +24 -20
  2. package/dist/css/components/actionGroup/tokens.css +1 -0
  3. package/dist/css/components/select/tokens.css +3 -0
  4. package/dist/css/components/tag/tokens.css +43 -0
  5. package/dist/css/components/tagCount/tokens.css +25 -0
  6. package/dist/css/components/tagStatus/tokens.css +30 -0
  7. package/dist/css/tokens.css +9 -0
  8. package/dist/js/components/actionGroup/tokens.js +1 -0
  9. package/dist/js/components/select/tokens.js +3 -0
  10. package/dist/js/components/tag/tokens.js +43 -0
  11. package/dist/js/components/tagCount/tokens.js +23 -0
  12. package/dist/js/components/tagStatus/tokens.js +28 -0
  13. package/dist/js/tokens.js +9 -0
  14. package/dist/json/components/actionGroup/tokens.json +43 -6
  15. package/dist/json/components/avatar/tokens.json +63 -63
  16. package/dist/json/components/breadcrumbs/tokens.json +60 -60
  17. package/dist/json/components/button/tokens.json +104 -104
  18. package/dist/json/components/card/tokens.json +73 -73
  19. package/dist/json/components/chatBubble/tokens.json +86 -86
  20. package/dist/json/components/chatInput/tokens.json +101 -101
  21. package/dist/json/components/checkbox/tokens.json +113 -113
  22. package/dist/json/components/checkboxGroup/tokens.json +9 -9
  23. package/dist/json/components/divider/tokens.json +19 -19
  24. package/dist/json/components/footer/tokens.json +82 -82
  25. package/dist/json/components/formLabel/tokens.json +7 -7
  26. package/dist/json/components/header/tokens.json +64 -64
  27. package/dist/json/components/icon/tokens.json +64 -64
  28. package/dist/json/components/input/tokens.json +78 -78
  29. package/dist/json/components/institutionalBar/tokens.json +28 -28
  30. package/dist/json/components/list/tokens.json +100 -100
  31. package/dist/json/components/loading/tokens.json +10 -10
  32. package/dist/json/components/message/tokens.json +16 -16
  33. package/dist/json/components/radioGroup/tokens.json +88 -88
  34. package/dist/json/components/rating/tokens.json +30 -30
  35. package/dist/json/components/select/tokens.json +125 -20
  36. package/dist/json/components/sideMenu/tokens.json +117 -117
  37. package/dist/json/components/skipLink/tokens.json +6 -6
  38. package/dist/json/components/tag/tokens.json +1383 -68
  39. package/dist/json/components/tagCount/tokens.json +579 -0
  40. package/dist/json/components/tagStatus/tokens.json +744 -0
  41. package/dist/json/components/text/tokens.json +42 -42
  42. package/dist/json/components/tooltip/tokens.json +21 -21
  43. package/dist/json/theme/dark/tokens.json +122 -122
  44. package/dist/json/theme/light/tokens.json +122 -122
  45. package/dist/json/tokens.json +2172 -1845
  46. package/dist/penpot/tokens.json +6309 -3688
  47. package/dist/scss/components/actionGroup/tokens.scss +1 -0
  48. package/dist/scss/components/select/tokens.scss +3 -0
  49. package/dist/scss/components/tag/tokens.scss +43 -0
  50. package/dist/scss/components/tagCount/tokens.scss +22 -0
  51. package/dist/scss/components/tagStatus/tokens.scss +27 -0
  52. package/dist/scss/tokens.scss +25 -1
  53. package/dist/tokens-studio/tokens.json +2995 -452
  54. package/package.json +5 -8
  55. package/src/config/config.json +51 -0
  56. package/src/config/penpot.json +47 -0
  57. package/src/tokens.json +279 -0
  58. package/src/config/penpot.mjs +0 -53
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@govbr-ds/tokens",
3
- "version": "4.0.0-next.36",
3
+ "version": "4.0.0-next.38",
4
4
  "description": "Tokens do Padrão Digital de Governo",
5
5
  "keywords": [
6
6
  "design system",
@@ -33,16 +33,13 @@
33
33
  "access": "public"
34
34
  },
35
35
  "scripts": {
36
- "build": "run-s clear split-tokens compile generate-tokens-studio generate-penpot",
36
+ "build": "run-s clear split-tokens compile",
37
37
  "clear": "run-p clear:*",
38
38
  "clear:dist": "rimraf ./dist",
39
- "clear:temp": "rimraf ./src/temp",
40
- "compile": "node scripts/build.mjs",
41
- "generate-penpot": "node scripts/generate-penpot.mjs",
42
- "generate-tokens-studio": "node scripts/generate-tokens-studio.mjs",
39
+ "clear:temp": "rimraf ./temp",
40
+ "compile": "node style-dictionary/build.mjs",
43
41
  "split-tokens": "node scripts/split-tokens.mjs",
44
- "start": "run-s split-tokens compile generate-tokens-studio generate-penpot",
45
- "test": "node --test test/**/*.test.mjs",
42
+ "test": "node --test test/*.test.mjs test/**/*.test.mjs",
46
43
  "test:contracts": "run-s split-tokens test:contracts:run",
47
44
  "test:contracts:run": "node --test test/contracts/**/*.test.mjs"
48
45
  }
@@ -0,0 +1,51 @@
1
+ {
2
+ "source": [
3
+ "temp/style-dictionary/core/component.json",
4
+ "temp/style-dictionary/core/foundation.json",
5
+ "temp/style-dictionary/core/pattern.json",
6
+ "temp/style-dictionary/core/config.json"
7
+ ],
8
+ "parsers": ["govbr/dtcg-sets"],
9
+ "preprocessors": ["tokens-studio"],
10
+ "log": { "verbosity": "silent" },
11
+ "platforms": {
12
+ "css": {
13
+ "transformGroup": "govbr/shared",
14
+ "transforms": ["name/kebab", "govbr/remove/px", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
15
+ "buildPath": "dist/css/",
16
+ "actions": ["govbr/css-contrast-mode"],
17
+ "files": [
18
+ { "format": "govbr/native/css/variables", "destination": "tokens.css", "filter": "govbr/core" }
19
+ ]
20
+ },
21
+ "scss": {
22
+ "transformGroup": "govbr/shared",
23
+ "transforms": ["name/kebab", "govbr/remove/px", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
24
+ "buildPath": "dist/scss/",
25
+ "files": [
26
+ {
27
+ "format": "govbr/native/scss/map-deep",
28
+ "destination": "tokens.scss",
29
+ "filter": "govbr/core",
30
+ "options": { "showFileHeader": false }
31
+ }
32
+ ]
33
+ },
34
+ "js": {
35
+ "transformGroup": "govbr/shared",
36
+ "transforms": ["name/camel", "govbr/remove/px", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
37
+ "buildPath": "dist/js/",
38
+ "files": [
39
+ { "format": "govbr/native/javascript/es6", "destination": "tokens.js", "filter": "govbr/core" }
40
+ ]
41
+ },
42
+ "json": {
43
+ "transformGroup": "govbr/shared",
44
+ "transforms": ["name/camel", "govbr/remove/px", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
45
+ "buildPath": "dist/json/",
46
+ "files": [
47
+ { "format": "govbr/native/json", "destination": "tokens.json", "filter": "govbr/core" }
48
+ ]
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "destination": "penpot/tokens.json",
3
+ "themeGroup": "DS GOV",
4
+ "typesToChange": {
5
+ "spacing": "dimension",
6
+ "offset": "number",
7
+ "lineHeights": "dimension"
8
+ },
9
+ "typesToChangeByToken": {
10
+ "number": [
11
+ "br.contentOverflow.scrollShadow.blur",
12
+ "br.contentOverflow.scrollShadow.spread",
13
+ "br.elevation.blur.*",
14
+ "br.elevation.level0.blur.*",
15
+ "br.elevation.level1.blur.*",
16
+ "br.elevation.level2.blur.*",
17
+ "br.elevation.level3.blur.*",
18
+ "br.elevation.level4.blur.*"
19
+ ],
20
+ "spacing": ["br.form.gap.*", "br.form.padding.*", "br.grid.gutter.*", "br.grid.margin.*"],
21
+ "rotation": ["br.state.dragging.rotation"]
22
+ },
23
+ "setAliases": {
24
+ "core/foundation": "global",
25
+ "core/pattern": "global",
26
+ "core/component": "component",
27
+ "theme/light": "light",
28
+ "theme/dark": "dark"
29
+ },
30
+ "themes": {
31
+ "light": {
32
+ "name": "Light",
33
+ "description": "Tema Light",
34
+ "sets": ["global", "component", "light"]
35
+ },
36
+ "dark": {
37
+ "name": "Dark",
38
+ "description": "Tema Dark",
39
+ "sets": ["global", "component", "dark"]
40
+ }
41
+ },
42
+ "metadata": {
43
+ "group": "DS GOV",
44
+ "activeThemes": ["DS GOV/Light"],
45
+ "activeSets": ["global", "component", "light"]
46
+ }
47
+ }
package/src/tokens.json CHANGED
@@ -2443,6 +2443,15 @@
2443
2443
  },
2444
2444
  "success": {
2445
2445
  "$value": "check-circle"
2446
+ },
2447
+ "online": {
2448
+ "$value": "wifi"
2449
+ },
2450
+ "offline": {
2451
+ "$value": "circle-minus"
2452
+ },
2453
+ "busy": {
2454
+ "$value": "ban"
2446
2455
  }
2447
2456
  },
2448
2457
  "brand": {
@@ -3802,12 +3811,38 @@
3802
3811
  }
3803
3812
  }
3804
3813
  },
3814
+ "collapse": {
3815
+ "iconName": {
3816
+ "$type": "text",
3817
+ "left": {
3818
+ "$value": "{br.iconography.iconName.navigation.collapseLeft}"
3819
+ },
3820
+ "right": {
3821
+ "$value": "{br.iconography.iconName.navigation.collapseRight}"
3822
+ },
3823
+ "up": {
3824
+ "$value": "{br.iconography.iconName.navigation.collapseUp}"
3825
+ },
3826
+ "down": {
3827
+ "$value": "{br.iconography.iconName.navigation.collapseDown}"
3828
+ }
3829
+ }
3830
+ },
3805
3831
  "dropdown": {
3806
3832
  "shadowStyle": {
3807
3833
  "$type": "boxShadow",
3808
3834
  "default": {
3809
3835
  "$value": "{br.elevation.shadowStyle.level2}"
3810
3836
  }
3837
+ },
3838
+ "iconName": {
3839
+ "$type": "text",
3840
+ "open": {
3841
+ "$value": "{br.iconography.iconName.navigation.dropdownOpen}"
3842
+ },
3843
+ "close": {
3844
+ "$value": "{br.iconography.iconName.navigation.dropdownClose}"
3845
+ }
3811
3846
  }
3812
3847
  }
3813
3848
  }
@@ -5143,6 +5178,15 @@
5143
5178
  },
5144
5179
  "intermediary": {
5145
5180
  "$value": "square-minus"
5181
+ },
5182
+ "search": {
5183
+ "$value": "{br.iconography.iconName.action.search}"
5184
+ },
5185
+ "open": {
5186
+ "$value": "{br.dropdown.iconName.open}"
5187
+ },
5188
+ "close": {
5189
+ "$value": "{br.dropdown.iconName.close}"
5146
5190
  }
5147
5191
  },
5148
5192
  "shadowStyle": {
@@ -7595,12 +7639,247 @@
7595
7639
  "$value": "{br.spacing.layout.1}"
7596
7640
  }
7597
7641
  },
7642
+ "iconName": {
7643
+ "$type": "text",
7644
+ "options": {
7645
+ "$value": "{br.iconography.iconName.navigation.options}"
7646
+ }
7647
+ },
7598
7648
  "shadowStyle": {
7599
7649
  "$type": "boxShadow",
7600
7650
  "menu": {
7601
7651
  "$value": "{br.dropdown.shadowStyle.default}"
7602
7652
  }
7603
7653
  }
7654
+ },
7655
+ "tagCount": {
7656
+ "color": {
7657
+ "$type": "color",
7658
+ "background": {
7659
+ "default": {
7660
+ "$value": "{br.color.goldVivid.20}"
7661
+ },
7662
+ "main": {
7663
+ "primary": {
7664
+ "$value": "{br.color.background.main.primary}"
7665
+ },
7666
+ "secondary": {
7667
+ "$value": "{br.color.background.main.secondary}"
7668
+ }
7669
+ },
7670
+ "contrast": {
7671
+ "primary": {
7672
+ "$value": "{br.color.background.contrast.primary}"
7673
+ },
7674
+ "secondary": {
7675
+ "$value": "{br.color.background.contrast.secondary}"
7676
+ }
7677
+ }
7678
+ },
7679
+ "foreground": {
7680
+ "default": {
7681
+ "$value": "{br.color.pure.100}"
7682
+ },
7683
+ "main": {
7684
+ "primary": {
7685
+ "$value": "{br.color.foreground.main.primary}"
7686
+ },
7687
+ "secondary": {
7688
+ "$value": "{br.color.foreground.main.secondary}"
7689
+ }
7690
+ },
7691
+ "contrast": {
7692
+ "primary": {
7693
+ "$value": "{br.color.foreground.contrast.primary}"
7694
+ },
7695
+ "secondary": {
7696
+ "$value": "{br.color.foreground.contrast.secondary}"
7697
+ }
7698
+ }
7699
+ }
7700
+ },
7701
+ "padding": {
7702
+ "$type": "spacing",
7703
+ "default": {
7704
+ "$value": "{br.spacing.adjust.1}"
7705
+ }
7706
+ },
7707
+ "rounder": {
7708
+ "$type": "borderRadius",
7709
+ "default": {
7710
+ "$value": "{br.surface.rounder.full}"
7711
+ }
7712
+ },
7713
+ "density": {
7714
+ "$type": "dimension",
7715
+ "compact": {
7716
+ "$value": "{br.spacing.layout.2}"
7717
+ },
7718
+ "regular": {
7719
+ "$value": "{br.spacing.adjust.3}"
7720
+ },
7721
+ "spacious": {
7722
+ "$value": "{br.spacing.layout.3}"
7723
+ }
7724
+ },
7725
+ "borderStyle": {
7726
+ "$type": "border",
7727
+ "main": {
7728
+ "primary": {
7729
+ "$value": {
7730
+ "color": "{br.color.background.main.primary}",
7731
+ "width": "{br.surface.borderWidth.sm}",
7732
+ "style": "solid"
7733
+ }
7734
+ },
7735
+ "secondary": {
7736
+ "$value": {
7737
+ "color": "{br.color.background.main.secondary}",
7738
+ "width": "{br.surface.borderWidth.sm}",
7739
+ "style": "solid"
7740
+ }
7741
+ }
7742
+ },
7743
+ "contrast": {
7744
+ "primary": {
7745
+ "$value": {
7746
+ "color": "{br.color.background.contrast.primary}",
7747
+ "width": "{br.surface.borderWidth.sm}",
7748
+ "style": "solid"
7749
+ }
7750
+ },
7751
+ "secondary": {
7752
+ "$value": {
7753
+ "color": "{br.color.background.contrast.secondary}",
7754
+ "width": "{br.surface.borderWidth.sm}",
7755
+ "style": "solid"
7756
+ }
7757
+ }
7758
+ }
7759
+ }
7760
+ },
7761
+ "tagStatus": {
7762
+ "color": {
7763
+ "$type": "color",
7764
+ "background": {
7765
+ "online": {
7766
+ "$value": "{br.color.greenVivid.60}"
7767
+ },
7768
+ "offline": {
7769
+ "$value": "{br.color.grayCool.60}"
7770
+ },
7771
+ "away": {
7772
+ "$value": "{br.color.goldVivid.20}"
7773
+ },
7774
+ "busy": {
7775
+ "$value": "{br.color.redVivid.60}"
7776
+ }
7777
+ },
7778
+ "foreground": {
7779
+ "online": {
7780
+ "$value": "{br.color.greenVivid.10}"
7781
+ },
7782
+ "offline": {
7783
+ "$value": "{br.color.grayCool.10}"
7784
+ },
7785
+ "away": {
7786
+ "$value": "{br.color.goldVivid.70}"
7787
+ },
7788
+ "busy": {
7789
+ "$value": "{br.color.redVivid.10}"
7790
+ }
7791
+ }
7792
+ },
7793
+ "gap": {
7794
+ "$type": "spacing",
7795
+ "default": {
7796
+ "$value": "{br.spacing.adjust.1}"
7797
+ }
7798
+ },
7799
+ "rounder": {
7800
+ "$type": "borderRadius",
7801
+ "default": {
7802
+ "$value": "{br.surface.rounder.full}"
7803
+ }
7804
+ },
7805
+ "borderStyle": {
7806
+ "$type": "border",
7807
+ "main": {
7808
+ "primary": {
7809
+ "$value": {
7810
+ "color": "{br.color.background.main.primary}",
7811
+ "width": "{br.surface.borderWidth.sm}",
7812
+ "style": "solid"
7813
+ }
7814
+ },
7815
+ "secondary": {
7816
+ "$value": {
7817
+ "color": "{br.color.background.main.secondary}",
7818
+ "width": "{br.surface.borderWidth.sm}",
7819
+ "style": "solid"
7820
+ }
7821
+ }
7822
+ },
7823
+ "contrast": {
7824
+ "primary": {
7825
+ "$value": {
7826
+ "color": "{br.color.background.contrast.primary}",
7827
+ "width": "{br.surface.borderWidth.sm}",
7828
+ "style": "solid"
7829
+ }
7830
+ },
7831
+ "secondary": {
7832
+ "$value": {
7833
+ "color": "{br.color.background.contrast.secondary}",
7834
+ "width": "{br.surface.borderWidth.sm}",
7835
+ "style": "solid"
7836
+ }
7837
+ }
7838
+ }
7839
+ },
7840
+ "iconName": {
7841
+ "$type": "text",
7842
+ "online": {
7843
+ "$value": "{br.iconography.iconName.feedback.online}"
7844
+ },
7845
+ "offline": {
7846
+ "$value": "{br.iconography.iconName.feedback.offline}"
7847
+ },
7848
+ "away": {
7849
+ "$value": "{br.iconography.iconName.feedback.time}"
7850
+ },
7851
+ "busy": {
7852
+ "$value": "{br.iconography.iconName.feedback.busy}"
7853
+ }
7854
+ },
7855
+ "simple": {
7856
+ "$type": "dimension",
7857
+ "density": {
7858
+ "compact": {
7859
+ "$value": "{br.spacing.layout.1}"
7860
+ },
7861
+ "regular": {
7862
+ "$value": "{br.spacing.adjust.2}"
7863
+ },
7864
+ "spacious": {
7865
+ "$value": "{br.spacing.layout.2}"
7866
+ }
7867
+ }
7868
+ },
7869
+ "semantic": {
7870
+ "$type": "dimension",
7871
+ "density": {
7872
+ "compact": {
7873
+ "$value": "{br.spacing.adjust.3}"
7874
+ },
7875
+ "regular": {
7876
+ "$value": "{br.spacing.layout.3}"
7877
+ },
7878
+ "spacious": {
7879
+ "$value": "{br.spacing.adjust.4}"
7880
+ }
7881
+ }
7882
+ }
7604
7883
  }
7605
7884
  }
7606
7885
  },
@@ -1,53 +0,0 @@
1
- const PENPOT_CONFIG = {
2
- source_path: 'src/tokens.json',
3
- output_path: 'dist/penpot/tokens.json',
4
- configSet: 'core/config',
5
- maxReferenceDepth: 12,
6
- themeGroup: 'DS GOV',
7
- typesToChange: {
8
- spacing: 'dimension',
9
- offset: 'number',
10
- lineHeights: 'dimension',
11
- },
12
- typesToChangeByToken: {
13
- number: [
14
- 'br.contentOverflow.scrollShadow.blur',
15
- 'br.contentOverflow.scrollShadow.spread',
16
- 'br.elevation.blur.*',
17
- 'br.elevation.level0.blur.*',
18
- 'br.elevation.level1.blur.*',
19
- 'br.elevation.level2.blur.*',
20
- 'br.elevation.level3.blur.*',
21
- 'br.elevation.level4.blur.*',
22
- ],
23
- spacing: ['br.form.gap.*', 'br.form.padding.*', 'br.grid.gutter.*', 'br.grid.margin.*'],
24
- rotation: ['br.state.dragging.rotation'],
25
- },
26
- fontSizeBaseToken: '{br.typography.fontSize.fontBase.default}',
27
- setAliases: {
28
- 'core/foundation': 'global',
29
- 'core/pattern': 'global',
30
- 'core/component': 'component',
31
- 'theme/light': 'light',
32
- 'theme/dark': 'dark',
33
- },
34
- themes: {
35
- light: {
36
- name: 'Light',
37
- description: 'Tema Light',
38
- sets: ['global', 'component', 'light'],
39
- },
40
- dark: {
41
- name: 'Dark',
42
- description: 'Tema Dark',
43
- sets: ['global', 'component', 'dark'],
44
- },
45
- },
46
- metadata: {
47
- group: 'DS GOV',
48
- activeThemes: ['DS GOV/Light'],
49
- activeSets: ['global', 'component', 'light'],
50
- },
51
- };
52
-
53
- export default PENPOT_CONFIG;