@rocket.chat/fuselage-tokens 0.34.0 → 0.36.0-rc.0

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.
package/README.md CHANGED
@@ -1,79 +1,105 @@
1
- <!--header-->
2
-
3
- <p align="center">
4
- <a href="https://rocket.chat" title="Rocket.Chat">
5
- <img src="https://github.com/RocketChat/Rocket.Chat.Artwork/raw/master/Logos/2020/png/logo-horizontal-red.png" alt="Rocket.Chat" />
6
- </a>
7
- </p>
8
-
9
1
  # `@rocket.chat/fuselage-tokens`
10
2
 
11
- > Design tokens for Fuselage, Rocket.Chat's design system
3
+ > Design tokens for Fuselage, Rocket.Chat's design system, as JSON and SCSS.
12
4
 
13
- ---
5
+ [![npm](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/fuselage-tokens) [![downloads](https://img.shields.io/npm/dw/@rocket.chat/fuselage-tokens?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/fuselage-tokens)
14
6
 
15
- [![npm@latest](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/latest?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/fuselage-tokens/v/latest) [![npm@next](https://img.shields.io/npm/v/@rocket.chat/fuselage-tokens/next?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/fuselage-tokens/v/next) ![npm downloads](https://img.shields.io/npm/dw/@rocket.chat/fuselage-tokens?style=flat-square) ![License: MIT](https://img.shields.io/npm/l/@rocket.chat/fuselage-tokens?style=flat-square)
7
+ The colors, typography, breakpoints, border and spacing values that Fuselage and the Rocket.Chat clients are styled with. They are defined once and built with [Style Dictionary](https://styledictionary.com/) into JSON files (with TypeScript declarations) and SCSS maps.
16
8
 
17
- ![deps](https://img.shields.io/librariesio/release/npm/@rocket.chat/fuselage-tokens?style=flat-square) ![npm bundle size](https://img.shields.io/bundlephobia/min/@rocket.chat/fuselage-tokens?style=flat-square)
9
+ Use this package when you need Rocket.Chat's design values outside of Fuselage's React components: charts, emails, PDFs, native code, or your own stylesheets. If you use `@rocket.chat/fuselage`, its `Box` props and `Palette` already read from these tokens.
18
10
 
19
- <!--/header-->
11
+ ## Installation
20
12
 
21
- ## Install
13
+ ```sh
14
+ npm install @rocket.chat/fuselage-tokens
15
+ ```
22
16
 
23
- <!--install-->
17
+ The package has no dependencies and no JavaScript entry point. Import the files under `dist/` directly.
24
18
 
25
- Add `@rocket.chat/fuselage-tokens` as a dependency:
19
+ ## Usage
26
20
 
27
- ```sh
28
- npm i @rocket.chat/fuselage-tokens
21
+ ### JavaScript and TypeScript
22
+
23
+ Each token category is a JSON file:
29
24
 
30
- # or, if you are using yarn:
25
+ ```ts
26
+ import breakpoints from '@rocket.chat/fuselage-tokens/dist/breakpoints.json';
27
+ import colors from '@rocket.chat/fuselage-tokens/dist/colors.json';
28
+ import typography from '@rocket.chat/fuselage-tokens/dist/typography.json';
31
29
 
32
- yarn add @rocket.chat/fuselage-tokens
30
+ colors.n900; // '#…', the darkest neutral
31
+ typography.fontScale.h1; // { fontSize: 32, fontWeight: 700, letterSpacing: 0, lineHeight: 40 }
32
+ breakpoints.md.minViewportWidth; // 768
33
33
  ```
34
34
 
35
- <!--/install-->
35
+ In Node.js ES modules, add the import attribute: `import colors from '@rocket.chat/fuselage-tokens/dist/colors.json' with { type: 'json' };`.
36
36
 
37
- ## Contributing
37
+ TypeScript resolves the types through `resolveJsonModule`. Each file also has a `<name>.d.json.ts` declaration next to it, which TypeScript uses when `allowArbitraryExtensions` is enabled.
38
38
 
39
- <!--contributing(msg)-->
39
+ Theme-aware categories have one object per theme:
40
40
 
41
- Contributions, issues, and feature requests are welcome!<br />
42
- Feel free to check the [issues](https://github.com/RocketChat/fuselage/issues).
41
+ ```ts
42
+ import surface from '@rocket.chat/fuselage-tokens/dist/surface.json';
43
43
 
44
- <!--/contributing(msg)-->
44
+ const background = surface.dark.room;
45
+ ```
45
46
 
46
- ### Building
47
+ ### SCSS
47
48
 
48
- As this package dependends on others in this monorepo, before anything run the following at the root directory:
49
+ Each category is also a flat Sass map, with keys made from the token path in kebab case:
49
50
 
50
- <!--yarn(build)-->
51
+ ```scss
52
+ @use 'sass:map';
53
+ @use '@rocket.chat/fuselage-tokens/dist/breakpoints.scss';
54
+ @use '@rocket.chat/fuselage-tokens/dist/colors.scss';
51
55
 
52
- ```sh
53
- yarn build
56
+ .sidebar {
57
+ color: map.get(colors.$colors, 'n900');
58
+
59
+ @media (min-width: map.get(breakpoints.$breakpoints, 'md-min-viewport-width')) {
60
+ padding-inline: map.get(breakpoints.$breakpoints, 'md-gutter-width');
61
+ }
62
+ }
54
63
  ```
55
64
 
56
- <!--/yarn(build)-->
65
+ The map is named after the category in kebab case: `$colors`, `$surface`, `$status-bullet`, and so on. Add `node_modules` to your Sass load paths (or let your bundler resolve package imports) for the `@use` paths above to work.
57
66
 
58
- ### Linting
67
+ ## API
59
68
 
60
- To ensure the source is matching our coding style, we perform [linting](<https://en.wikipedia.org/wiki/Lint_(software)>).
61
- Before commiting, check if your code fits our style by running:
69
+ Every category is available as `dist/<category>.json`, `dist/<category>.d.json.ts` and `dist/<category>.scss`.
62
70
 
63
- <!--yarn(lint)-->
71
+ | Category | Contents |
72
+ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `colors` | The base palette: `white` and graded scales for neutral (`n100`–`n900`), red (`r`), orange (`o`), purple (`p`), yellow (`y`), green (`g`) and blue (`b`). |
74
+ | `surface` | Background colors (`light`, `tint`, `room`, `hover`, `selected`, `sidebar`…). |
75
+ | `font` | Text and icon colors (`default`, `titlesLabels`, `hint`, `info`, `danger`…). |
76
+ | `stroke` | Border colors (`extraLight`, `light`, `medium`, `dark`, `highlight`, `error`…). |
77
+ | `status` | Status backgrounds and the text color to use on each (`info`, `font-on-info`, `success`, `danger`, `warning`, `service-1`…). |
78
+ | `statusBullet` | User presence colors (`online`, `away`, `busy`, `disabled`, `offline`, `loading`). |
79
+ | `badge` | Badge backgrounds (`level-0` to `level-4`). |
80
+ | `button` | Button background and text colors per variant and state. |
81
+ | `shadow` | Shadow colors (`highlight`, `danger`, `elevation-1`…). |
82
+ | `typography` | `fontFamily` (`sans`, `mono`) and `fontScale` (`hero`, `h1`–`h5`, `p1`, `p1m`, `p1b`, `p2`, `p2m`, `p2b`, `c1`, `c2`, `micro`). |
83
+ | `breakpoints` | `xs`, `sm`, `md`, `lg`, `xl`, `xxl` and `xxxl`, each with `minViewportWidth`, `columns` and `gutterWidth`. |
84
+ | `border` | `radius` (`none`, `default`, `small`, `medium`, `large`, `extra-large`, `full`) and `width` (`none`, `default`, `medium`, `large`, `extra-large`). |
85
+ | `spacing` | The spacing scale for margins, paddings and gaps: `x4`, `x8`, `x12`, `x16`, `x20`, `x24`, `x32` and `x40`. The SCSS map holds them in `px`. |
64
86
 
65
- ```sh
66
- yarn lint
67
- ```
87
+ `surface`, `font`, `stroke`, `status`, `statusBullet`, `badge`, `button` and `shadow` are split by theme: `light`, `dark` and `high-contrast`.
68
88
 
69
- <!--/yarn(lint)-->
89
+ In the JSON files, sizes are plain numbers in pixels and colors are hex strings.
70
90
 
71
- Some linter warnings and errors can be automatically fixed:
91
+ ## Development
72
92
 
73
- <!--yarn(lint-and-fix)-->
93
+ This package lives in the [Rocket.Chat monorepo](https://github.com/RocketChat/Rocket.Chat/tree/develop/packages/fuselage-tokens). From the repository root:
74
94
 
75
95
  ```sh
76
- yarn lint-and-fix
96
+ yarn workspace @rocket.chat/fuselage-tokens build
97
+ yarn workspace @rocket.chat/fuselage-tokens lint
98
+ yarn workspace @rocket.chat/fuselage-tokens lint:fix
77
99
  ```
78
100
 
79
- <!--/yarn(lint-and-fix)-->
101
+ Token sources live in `src/` as Style Dictionary JSON. `build.js` and `config.js` define the transforms and output formats.
102
+
103
+ ## License
104
+
105
+ MIT — see [LICENSE](https://github.com/RocketChat/Rocket.Chat/blob/develop/LICENSE).
@@ -0,0 +1,24 @@
1
+ export default badge;
2
+ declare const badge: {
3
+ "light": {
4
+ "level-0": "#e4e7ea",
5
+ "level-1": "#6c737a",
6
+ "level-2": "#156ff5",
7
+ "level-3": "#f38c39",
8
+ "level-4": "#ec0d2a"
9
+ },
10
+ "high-contrast": {
11
+ "level-0": "#e4e7ea",
12
+ "level-1": "#2f343d",
13
+ "level-2": "#10529e",
14
+ "level-3": "#713607",
15
+ "level-4": "#9b1325"
16
+ },
17
+ "dark": {
18
+ "level-0": "#404754",
19
+ "level-1": "#6c737a",
20
+ "level-2": "#2c65ba",
21
+ "level-3": "#955828",
22
+ "level-4": "#b43c4c"
23
+ }
24
+ };
@@ -0,0 +1,19 @@
1
+ export default border;
2
+ declare const border: {
3
+ "radius": {
4
+ "none": 0,
5
+ "default": 1,
6
+ "small": 2,
7
+ "medium": 4,
8
+ "large": 8,
9
+ "extra-large": 20,
10
+ "full": 9999
11
+ },
12
+ "width": {
13
+ "none": 0,
14
+ "default": 1,
15
+ "medium": 2,
16
+ "large": 4,
17
+ "extra-large": 8
18
+ }
19
+ };
package/dist/border.json CHANGED
@@ -12,6 +12,7 @@
12
12
  "none": 0,
13
13
  "default": 1,
14
14
  "medium": 2,
15
- "large": 4
15
+ "large": 4,
16
+ "extra-large": 8
16
17
  }
17
18
  }
package/dist/border.scss CHANGED
@@ -14,5 +14,6 @@ $border: (
14
14
  'width-none': 0,
15
15
  'width-default': 1px,
16
16
  'width-medium': 2px,
17
- 'width-large': 4px
17
+ 'width-large': 4px,
18
+ 'width-extra-large': 8px
18
19
  );
@@ -0,0 +1,38 @@
1
+ export default breakpoints;
2
+ declare const breakpoints: {
3
+ "xs": {
4
+ "minViewportWidth": null,
5
+ "columns": 4,
6
+ "gutterWidth": 16
7
+ },
8
+ "sm": {
9
+ "minViewportWidth": 600,
10
+ "columns": 8,
11
+ "gutterWidth": 16
12
+ },
13
+ "md": {
14
+ "minViewportWidth": 768,
15
+ "columns": 8,
16
+ "gutterWidth": 24
17
+ },
18
+ "lg": {
19
+ "minViewportWidth": 1024,
20
+ "columns": 12,
21
+ "gutterWidth": 24
22
+ },
23
+ "xl": {
24
+ "minViewportWidth": 1280,
25
+ "columns": 12,
26
+ "gutterWidth": 24
27
+ },
28
+ "xxl": {
29
+ "minViewportWidth": 1600,
30
+ "columns": 12,
31
+ "gutterWidth": 24
32
+ },
33
+ "xxxl": {
34
+ "minViewportWidth": 1920,
35
+ "columns": 12,
36
+ "gutterWidth": 24
37
+ }
38
+ };
@@ -0,0 +1,129 @@
1
+ export default button;
2
+ declare const button: {
3
+ "light": {
4
+ "backgroundPrimaryDefault": "#156ff5",
5
+ "backgroundPrimaryHover": "#095ad2",
6
+ "backgroundPrimaryPress": "#10529e",
7
+ "backgroundPrimaryFocus": "#156ff5",
8
+ "backgroundPrimaryKeyfocus": "#156ff5",
9
+ "backgroundPrimaryDisabled": "#d1ebfe",
10
+ "fontOnPrimary": "#ffffff",
11
+ "fontOnPrimaryDisabled": "#ffffff",
12
+ "backgroundSecondaryDefault": "#e4e7ea",
13
+ "backgroundSecondaryHover": "#cbced1",
14
+ "backgroundSecondaryPress": "#9ea2a8",
15
+ "backgroundSecondaryFocus": "#e4e7ea",
16
+ "backgroundSecondaryKeyfocus": "#e4e7ea",
17
+ "backgroundSecondaryDisabled": "#ebecef",
18
+ "fontOnSecondary": "#1f2329",
19
+ "fontOnSecondaryDisabled": "#cbced1",
20
+ "backgroundSecondaryDangerDefault": "#e4e7ea",
21
+ "backgroundSecondaryDangerHover": "#cbced1",
22
+ "backgroundSecondaryDangerPress": "#9ea2a8",
23
+ "backgroundSecondaryDangerFocus": "#e4e7ea",
24
+ "backgroundSecondaryDangerKeyfocus": "#e4e7ea",
25
+ "backgroundSecondaryDangerDisabled": "#ebecef",
26
+ "fontOnSecondaryDanger": "#bb0b21",
27
+ "onSecondaryDangerDisabled": "#f98f9d",
28
+ "backgroundDangerDefault": "#ec0d2a",
29
+ "backgroundDangerHover": "#d40c26",
30
+ "backgroundDangerPress": "#bb0b21",
31
+ "backgroundDangerFocus": "#ec0d2a",
32
+ "backgroundDangerKeyfocus": "#ec0d2a",
33
+ "backgroundDangerDisabled": "#ffc1c9",
34
+ "fontOnDanger": "#ffffff",
35
+ "fontOnDangerDisabled": "#ffffff",
36
+ "backgroundSuccessDefault": "#148660",
37
+ "backgroundSuccessHover": "#106d4f",
38
+ "backgroundSuccessPress": "#0d5940",
39
+ "backgroundSuccessFocus": "#148660",
40
+ "backgroundSuccessKeyfocus": "#148660",
41
+ "backgroundSuccessDisabled": "#c0f6e4",
42
+ "fontOnSuccess": "#ffffff",
43
+ "fontOnSuccessDisabled": "#ffffff"
44
+ },
45
+ "high-contrast": {
46
+ "backgroundPrimaryDefault": "#10529e",
47
+ "backgroundPrimaryHover": "#01336b",
48
+ "backgroundPrimaryPress": "#012247",
49
+ "backgroundPrimaryFocus": "#10529e",
50
+ "backgroundPrimaryKeyfocus": "#10529e",
51
+ "backgroundPrimaryDisabled": "#d1ebfe",
52
+ "fontOnPrimary": "#ffffff",
53
+ "fontOnPrimaryDisabled": "#ffffff",
54
+ "backgroundSecondaryDefault": "#e4e7ea",
55
+ "backgroundSecondaryHover": "#cbced1",
56
+ "backgroundSecondaryPress": "#9ea2a8",
57
+ "backgroundSecondaryFocus": "#e4e7ea",
58
+ "backgroundSecondaryKeyfocus": "#e4e7ea",
59
+ "backgroundSecondaryDisabled": "#ebecef",
60
+ "fontOnSecondary": "#1f2329",
61
+ "fontOnSecondaryDisabled": "#cbced1",
62
+ "backgroundSecondaryDangerDefault": "#e4e7ea",
63
+ "backgroundSecondaryDangerHover": "#cbced1",
64
+ "backgroundSecondaryDangerPress": "#9ea2a8",
65
+ "backgroundSecondaryDangerFocus": "#e4e7ea",
66
+ "backgroundSecondaryDangerKeyfocus": "#e4e7ea",
67
+ "backgroundSecondaryDangerDisabled": "#ebecef",
68
+ "fontOnSecondaryDanger": "#8b0719",
69
+ "onSecondaryDangerDisabled": "#f98f9d",
70
+ "backgroundDangerDefault": "#9b1325",
71
+ "backgroundDangerHover": "#8b0719",
72
+ "backgroundDangerPress": "#8b0719",
73
+ "backgroundDangerFocus": "#9b1325",
74
+ "backgroundDangerKeyfocus": "#9b1325",
75
+ "backgroundDangerDisabled": "#ffc1c9",
76
+ "fontOnDanger": "#ffffff",
77
+ "fontOnDangerDisabled": "#ffffff",
78
+ "backgroundSuccessDefault": "#2de0a5",
79
+ "backgroundSuccessHover": "#1ecb92",
80
+ "backgroundSuccessPress": "#19ac7c",
81
+ "backgroundSuccessFocus": "#2de0a5",
82
+ "backgroundSuccessKeyfocus": "#2de0a5",
83
+ "backgroundSuccessDisabled": "#c0f6e4",
84
+ "fontOnSuccess": "#1f2329",
85
+ "fontOnSuccessDisabled": "#ffffff"
86
+ },
87
+ "dark": {
88
+ "backgroundPrimaryDefault": "#095ad2",
89
+ "backgroundPrimaryHover": "#10529e",
90
+ "backgroundPrimaryPress": "#01336b",
91
+ "backgroundPrimaryFocus": "#095ad2",
92
+ "backgroundPrimaryKeyfocus": "#095ad2",
93
+ "backgroundPrimaryDisabled": "#012247",
94
+ "fontOnPrimary": "#ffffff",
95
+ "fontOnPrimaryDisabled": "#6c727a",
96
+ "backgroundSecondaryDefault": "#353b45",
97
+ "backgroundSecondaryHover": "#404754",
98
+ "backgroundSecondaryPress": "#4c5362",
99
+ "backgroundSecondaryFocus": "#353b45",
100
+ "backgroundSecondaryKeyfocus": "#353b45",
101
+ "backgroundSecondaryDisabled": "#353b45",
102
+ "fontOnSecondary": "#e4e7ea",
103
+ "fontOnSecondaryDisabled": "#6c727a",
104
+ "backgroundSecondaryDangerDefault": "#353b45",
105
+ "backgroundSecondaryDangerHover": "#404754",
106
+ "backgroundSecondaryDangerPress": "#4c5362",
107
+ "backgroundSecondaryDangerFocus": "#353b45",
108
+ "backgroundSecondaryDangerKeyfocus": "#353b45",
109
+ "backgroundSecondaryDangerDisabled": "#353b45",
110
+ "fontOnSecondaryDanger": "#ffc1c9",
111
+ "onSecondaryDangerDisabled": "#6b0513",
112
+ "backgroundDangerDefault": "#bb3e4e",
113
+ "backgroundDangerHover": "#95323f",
114
+ "backgroundDangerPress": "#822c37",
115
+ "backgroundDangerFocus": "#bb3e4e",
116
+ "backgroundDangerKeyfocus": "#bb3e4e",
117
+ "backgroundDangerDisabled": "#3d2126",
118
+ "fontOnDanger": "#ffffff",
119
+ "fontOnDangerDisabled": "#757575",
120
+ "backgroundSuccessDefault": "#1d7256",
121
+ "backgroundSuccessHover": "#175943",
122
+ "backgroundSuccessPress": "#134937",
123
+ "backgroundSuccessFocus": "#1d7256",
124
+ "backgroundSuccessKeyfocus": "#1d7256",
125
+ "backgroundSuccessDisabled": "#1e4b40",
126
+ "fontOnSuccess": "#ffffff",
127
+ "fontOnSuccessDisabled": "#757575"
128
+ }
129
+ };
@@ -0,0 +1,74 @@
1
+ export default colors;
2
+ declare const colors: {
3
+ "white": "#ffffff",
4
+ "n100": "#f7f8fa",
5
+ "n200": "#f2f3f5",
6
+ "n250": "#ebecef",
7
+ "n300": "#ebecef",
8
+ "n400": "#e4e7ea",
9
+ "n450": "#d7dbe0",
10
+ "n500": "#cbced1",
11
+ "n600": "#9ea2a8",
12
+ "n700": "#6c737a",
13
+ "n800": "#2f343d",
14
+ "n900": "#1f2329",
15
+ "r100": "#ffe9ec",
16
+ "r200": "#ffc1c9",
17
+ "r300": "#f98f9d",
18
+ "r400": "#f5455c",
19
+ "r500": "#ec0d2a",
20
+ "r600": "#d40c26",
21
+ "r700": "#bb0b21",
22
+ "r800": "#9b1325",
23
+ "r900": "#8b0719",
24
+ "r1000": "#6b0513",
25
+ "o100": "#fde8d7",
26
+ "o200": "#fad1b0",
27
+ "o300": "#f7b27b",
28
+ "o400": "#f59b53",
29
+ "o500": "#f38c39",
30
+ "o600": "#e26d0e",
31
+ "o700": "#bd5a0b",
32
+ "o800": "#974809",
33
+ "o900": "#713607",
34
+ "o1000": "#5b2c06",
35
+ "p100": "#f9effc",
36
+ "p200": "#edd0f7",
37
+ "p300": "#dca0ef",
38
+ "p400": "#ca71e7",
39
+ "p500": "#9f22c7",
40
+ "p600": "#7f1b9f",
41
+ "p700": "#5f1477",
42
+ "p800": "#4a105d",
43
+ "p900": "#350b42",
44
+ "y100": "#fff8e0",
45
+ "y200": "#ffecad",
46
+ "y300": "#ffe383",
47
+ "y400": "#ffd95a",
48
+ "y500": "#ffd031",
49
+ "y600": "#f3be08",
50
+ "y700": "#dfac00",
51
+ "y800": "#ac892f",
52
+ "y900": "#8e6300",
53
+ "y950": "#895f00",
54
+ "y1000": "#573d00",
55
+ "g100": "#e5fbf4",
56
+ "g200": "#c0f6e4",
57
+ "g300": "#96f0d2",
58
+ "g400": "#6ce9c0",
59
+ "g500": "#2de0a5",
60
+ "g600": "#1ecb92",
61
+ "g700": "#19ac7c",
62
+ "g800": "#148660",
63
+ "g900": "#106d4f",
64
+ "g1000": "#0d5940",
65
+ "b100": "#e8f2ff",
66
+ "b200": "#d1ebfe",
67
+ "b300": "#76b7fc",
68
+ "b400": "#549df9",
69
+ "b500": "#156ff5",
70
+ "b600": "#095ad2",
71
+ "b700": "#10529e",
72
+ "b800": "#01336b",
73
+ "b900": "#012247"
74
+ };
package/dist/colors.json CHANGED
@@ -49,6 +49,7 @@
49
49
  "y700": "#dfac00",
50
50
  "y800": "#ac892f",
51
51
  "y900": "#8e6300",
52
+ "y950": "#895f00",
52
53
  "y1000": "#573d00",
53
54
  "g100": "#e5fbf4",
54
55
  "g200": "#c0f6e4",
package/dist/colors.scss CHANGED
@@ -54,6 +54,7 @@ $colors: (
54
54
  'y700': #dfac00,
55
55
  'y800': #ac892f,
56
56
  'y900': #8e6300,
57
+ 'y950': #895f00,
57
58
  'y1000': #573d00,
58
59
  'g100': #e5fbf4,
59
60
  'g200': #c0f6e4,
@@ -0,0 +1,42 @@
1
+ export default font;
2
+ declare const font: {
3
+ "light": {
4
+ "white": "#ffffff",
5
+ "disabled": "#cbced1",
6
+ "annotation": "#9ea2a8",
7
+ "hint": "#6c737a",
8
+ "secondaryInfo": "#6c737a",
9
+ "default": "#2f343d",
10
+ "titlesLabels": "#1f2329",
11
+ "info": "#095ad2",
12
+ "danger": "#d40c26",
13
+ "pureWhite": "#ffffff",
14
+ "pureBlack": "#2f343d"
15
+ },
16
+ "high-contrast": {
17
+ "white": "#ffffff",
18
+ "disabled": "#cbced1",
19
+ "annotation": "#1f2329",
20
+ "hint": "#1f2329",
21
+ "secondaryInfo": "#1f2329",
22
+ "default": "#1f2329",
23
+ "titlesLabels": "#1f2329",
24
+ "info": "#01336b",
25
+ "danger": "#9b1325",
26
+ "pureWhite": "#ffffff",
27
+ "pureBlack": "#1f2329"
28
+ },
29
+ "dark": {
30
+ "white": "#2f343d",
31
+ "disabled": "#60646c",
32
+ "annotation": "#9ea2a8",
33
+ "hint": "#9ea2a8",
34
+ "secondaryInfo": "#9ea2a8",
35
+ "default": "#c1c7d0",
36
+ "titlesLabels": "#f2f3f5",
37
+ "info": "#739ede",
38
+ "danger": "#d88892",
39
+ "pureWhite": "#ffffff",
40
+ "pureBlack": "#1f2329"
41
+ }
42
+ };
@@ -0,0 +1,27 @@
1
+ export default shadow;
2
+ declare const shadow: {
3
+ "light": {
4
+ "highlight": "#d1ebfe",
5
+ "danger": "#ffe9ec",
6
+ "elevation-border": "#ebecef",
7
+ "elevation-1": "#2f343d1a",
8
+ "elevation-2x": "#2f343d14",
9
+ "elevation-2y": "#2f343d1f"
10
+ },
11
+ "high-contrast": {
12
+ "highlight": "#d1ebfe",
13
+ "danger": "#ffe9ec",
14
+ "elevation-border": "#ebecef",
15
+ "elevation-1": "#2f343d1a",
16
+ "elevation-2x": "#2f343d14",
17
+ "elevation-2y": "#2f343d1f"
18
+ },
19
+ "dark": {
20
+ "highlight": "#d1ebfe",
21
+ "danger": "#ffe9ec",
22
+ "elevation-border": "#2f343d",
23
+ "elevation-1": "#09090959",
24
+ "elevation-2x": "#0909094d",
25
+ "elevation-2y": "#09090973"
26
+ }
27
+ };
@@ -0,0 +1,11 @@
1
+ export default spacing;
2
+ declare const spacing: {
3
+ "x4": 4,
4
+ "x8": 8,
5
+ "x12": 12,
6
+ "x16": 16,
7
+ "x20": 20,
8
+ "x24": 24,
9
+ "x32": 32,
10
+ "x40": 40
11
+ };
@@ -0,0 +1,10 @@
1
+ {
2
+ "x4": 4,
3
+ "x8": 8,
4
+ "x12": 12,
5
+ "x16": 16,
6
+ "x20": 20,
7
+ "x24": 24,
8
+ "x32": 32,
9
+ "x40": 40
10
+ }
@@ -0,0 +1,15 @@
1
+
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+
6
+ $spacing: (
7
+ 'x4': 4px,
8
+ 'x8': 8px,
9
+ 'x12': 12px,
10
+ 'x16': 16px,
11
+ 'x20': 20px,
12
+ 'x24': 24px,
13
+ 'x32': 32px,
14
+ 'x40': 40px
15
+ );
@@ -0,0 +1,57 @@
1
+ export default status;
2
+ declare const status: {
3
+ "light": {
4
+ "info": "#d1ebfe",
5
+ "font-on-info": "#095ad2",
6
+ "success": "#c0f6e4",
7
+ "font-on-success": "#148660",
8
+ "danger": "#ffc1c9",
9
+ "font-on-danger": "#9b1325",
10
+ "warning": "#ffecad",
11
+ "font-on-warning": "#895f00",
12
+ "warning-2": "#fff8e0",
13
+ "font-on-warning-2": "#2f343d",
14
+ "service-1": "#fad1b0",
15
+ "font-on-service-1": "#974809",
16
+ "service-2": "#edd0f7",
17
+ "font-on-service-2": "#7f1b9f",
18
+ "service-3": "#5f1477",
19
+ "font-on-service-3": "#ffffff"
20
+ },
21
+ "high-contrast": {
22
+ "info": "#d1ebfe",
23
+ "font-on-info": "#01336b",
24
+ "success": "#c0f6e4",
25
+ "font-on-success": "#0d5940",
26
+ "danger": "#ffc1c9",
27
+ "font-on-danger": "#6b0513",
28
+ "warning": "#ffecad",
29
+ "font-on-warning": "#573d00",
30
+ "warning-2": "#fff8e0",
31
+ "font-on-warning-2": "#2f343d",
32
+ "service-1": "#fad1b0",
33
+ "font-on-service-1": "#5b2c06",
34
+ "service-2": "#edd0f7",
35
+ "font-on-service-2": "#7f1b9f",
36
+ "service-3": "#5f1477",
37
+ "font-on-service-3": "#ffffff"
38
+ },
39
+ "dark": {
40
+ "info": "#a8c3eb",
41
+ "font-on-info": "#8db6fc",
42
+ "success": "#c1ebdd",
43
+ "font-on-success": "#58ad90",
44
+ "danger": "#f7cfd4",
45
+ "font-on-danger": "#d88892",
46
+ "warning": "#feefbe",
47
+ "font-on-warning": "#cfb26c",
48
+ "warning-2": "#3c3625",
49
+ "font-on-warning-2": "#ffffff",
50
+ "service-1": "#fce3cf",
51
+ "font-on-service-1": "#ca9163",
52
+ "service-2": "#edd0f7",
53
+ "font-on-service-2": "#c393d2",
54
+ "service-3": "#5f1477",
55
+ "font-on-service-3": "#ffffff"
56
+ }
57
+ };
package/dist/status.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "danger": "#ffc1c9",
8
8
  "font-on-danger": "#9b1325",
9
9
  "warning": "#ffecad",
10
- "font-on-warning": "#8e6300",
10
+ "font-on-warning": "#895f00",
11
11
  "warning-2": "#fff8e0",
12
12
  "font-on-warning-2": "#2f343d",
13
13
  "service-1": "#fad1b0",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "high-contrast": {
21
21
  "info": "#d1ebfe",
22
- "font-on-info": "#10529e",
22
+ "font-on-info": "#01336b",
23
23
  "success": "#c0f6e4",
24
24
  "font-on-success": "#0d5940",
25
25
  "danger": "#ffc1c9",
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dark": {
39
39
  "info": "#a8c3eb",
40
- "font-on-info": "#739ede",
40
+ "font-on-info": "#8db6fc",
41
41
  "success": "#c1ebdd",
42
42
  "font-on-success": "#58ad90",
43
43
  "danger": "#f7cfd4",
44
44
  "font-on-danger": "#d88892",
45
45
  "warning": "#feefbe",
46
- "font-on-warning": "#c7aa66",
46
+ "font-on-warning": "#cfb26c",
47
47
  "warning-2": "#3c3625",
48
48
  "font-on-warning-2": "#ffffff",
49
49
  "service-1": "#fce3cf",
package/dist/status.scss CHANGED
@@ -11,7 +11,7 @@ $status: (
11
11
  'light-danger': #ffc1c9,
12
12
  'light-font-on-danger': #9b1325,
13
13
  'light-warning': #ffecad,
14
- 'light-font-on-warning': #8e6300,
14
+ 'light-font-on-warning': #895f00,
15
15
  'light-warning-2': #fff8e0,
16
16
  'light-font-on-warning-2': #2f343d,
17
17
  'light-service-1': #fad1b0,
@@ -21,7 +21,7 @@ $status: (
21
21
  'light-service-3': #5f1477,
22
22
  'light-font-on-service-3': #ffffff,
23
23
  'high-contrast-info': #d1ebfe,
24
- 'high-contrast-font-on-info': #10529e,
24
+ 'high-contrast-font-on-info': #01336b,
25
25
  'high-contrast-success': #c0f6e4,
26
26
  'high-contrast-font-on-success': #0d5940,
27
27
  'high-contrast-danger': #ffc1c9,
@@ -37,13 +37,13 @@ $status: (
37
37
  'high-contrast-service-3': #5f1477,
38
38
  'high-contrast-font-on-service-3': #ffffff,
39
39
  'dark-info': #a8c3eb,
40
- 'dark-font-on-info': #739ede,
40
+ 'dark-font-on-info': #8db6fc,
41
41
  'dark-success': #c1ebdd,
42
42
  'dark-font-on-success': #58ad90,
43
43
  'dark-danger': #f7cfd4,
44
44
  'dark-font-on-danger': #d88892,
45
45
  'dark-warning': #feefbe,
46
- 'dark-font-on-warning': #c7aa66,
46
+ 'dark-font-on-warning': #cfb26c,
47
47
  'dark-warning-2': #3c3625,
48
48
  'dark-font-on-warning-2': #ffffff,
49
49
  'dark-service-1': #fce3cf,
@@ -0,0 +1,27 @@
1
+ export default statusBullet;
2
+ declare const statusBullet: {
3
+ "light": {
4
+ "online": "#148660",
5
+ "away": "#ac892f",
6
+ "busy": "#d40c26",
7
+ "disabled": "#f38c39",
8
+ "offline": "#6c737a",
9
+ "loading": "#6c737a"
10
+ },
11
+ "high-contrast": {
12
+ "online": "#0d5940",
13
+ "away": "#ac892f",
14
+ "busy": "#6b0513",
15
+ "disabled": "#bd5a0b",
16
+ "offline": "#1f2329",
17
+ "loading": "#1f2329"
18
+ },
19
+ "dark": {
20
+ "online": "#1cbf89",
21
+ "away": "#b08c30",
22
+ "busy": "#c75765",
23
+ "disabled": "#cc7f42",
24
+ "offline": "#8b9098",
25
+ "loading": "#8b9098"
26
+ }
27
+ };
@@ -0,0 +1,36 @@
1
+ export default stroke;
2
+ declare const stroke: {
3
+ "light": {
4
+ "extraLight": "#ebecef",
5
+ "light": "#cbced1",
6
+ "medium": "#9ea2a8",
7
+ "dark": "#6c737a",
8
+ "extraDark": "#2f343d",
9
+ "extraLightHighlight": "#d1ebfe",
10
+ "highlight": "#156ff5",
11
+ "extraLightError": "#ffc1c9",
12
+ "error": "#ec0d2a"
13
+ },
14
+ "high-contrast": {
15
+ "extraLight": "#ebecef",
16
+ "light": "#cbced1",
17
+ "medium": "#9ea2a8",
18
+ "dark": "#6c737a",
19
+ "extraDark": "#2f343d",
20
+ "extraLightHighlight": "#d1ebfe",
21
+ "highlight": "#156ff5",
22
+ "extraLightError": "#ffc1c9",
23
+ "error": "#ec0d2a"
24
+ },
25
+ "dark": {
26
+ "extraLight": "#333842",
27
+ "light": "#404754",
28
+ "medium": "#4b5362",
29
+ "dark": "#9ea2a8",
30
+ "extraDark": "#cbced1",
31
+ "extraLightHighlight": "#d1ebfe",
32
+ "highlight": "#6292da",
33
+ "extraLightError": "#f49aa6",
34
+ "error": "#bb3e4e"
35
+ }
36
+ };
@@ -0,0 +1,45 @@
1
+ export default surface;
2
+ declare const surface: {
3
+ "light": {
4
+ "light": "#ffffff",
5
+ "tint": "#f7f8fa",
6
+ "room": "#ffffff",
7
+ "neutral": "#e4e7ea",
8
+ "disabled": "#f7f8fa",
9
+ "hover": "#f2f3f5",
10
+ "selected": "#d7dbe0",
11
+ "dark": "#1f2329",
12
+ "featured": "#5f1477",
13
+ "featuredHover": "#4a105d",
14
+ "sidebar": "#e4e7ea",
15
+ "overlay": "#2f343d80"
16
+ },
17
+ "high-contrast": {
18
+ "light": "#ffffff",
19
+ "tint": "#f7f8fa",
20
+ "room": "#ffffff",
21
+ "neutral": "#e4e7ea",
22
+ "disabled": "#f7f8fa",
23
+ "hover": "#f2f3f5",
24
+ "selected": "#d7dbe0",
25
+ "dark": "#1f2329",
26
+ "featured": "#5f1477",
27
+ "featuredHover": "#4a105d",
28
+ "sidebar": "#e4e7ea",
29
+ "overlay": "#2f343d80"
30
+ },
31
+ "dark": {
32
+ "light": "#262931",
33
+ "tint": "#1f2329",
34
+ "room": "#1f2329",
35
+ "neutral": "#2d3039",
36
+ "disabled": "#24272e",
37
+ "hover": "#1a1e23",
38
+ "selected": "#4c5362",
39
+ "dark": "#e4e7ea",
40
+ "featured": "#5f1477",
41
+ "featuredHover": "#4a105d",
42
+ "sidebar": "#2f343d",
43
+ "overlay": "#00000099"
44
+ }
45
+ };
@@ -0,0 +1,122 @@
1
+ export default typography;
2
+ declare const typography: {
3
+ "fontFamily": {
4
+ "sans": [
5
+ "Inter",
6
+ "-apple-system",
7
+ "BlinkMacSystemFont",
8
+ "Segoe UI",
9
+ "Roboto",
10
+ "Oxygen",
11
+ "Ubuntu",
12
+ "Cantarell",
13
+ "Helvetica Neue",
14
+ "Apple Color Emoji",
15
+ "Segoe UI Emoji",
16
+ "Segoe UI Symbol",
17
+ "Meiryo UI",
18
+ "Arial",
19
+ "sans-serif"
20
+ ],
21
+ "mono": [
22
+ "Menlo",
23
+ "Monaco",
24
+ "Consolas",
25
+ "Liberation Mono",
26
+ "Courier New",
27
+ "monospace"
28
+ ]
29
+ },
30
+ "fontScale": {
31
+ "hero": {
32
+ "fontSize": 48,
33
+ "fontWeight": 800,
34
+ "letterSpacing": 0,
35
+ "lineHeight": 64
36
+ },
37
+ "h1": {
38
+ "fontSize": 32,
39
+ "fontWeight": 700,
40
+ "letterSpacing": 0,
41
+ "lineHeight": 40
42
+ },
43
+ "h2": {
44
+ "fontSize": 24,
45
+ "fontWeight": 700,
46
+ "letterSpacing": 0,
47
+ "lineHeight": 32
48
+ },
49
+ "h3": {
50
+ "fontSize": 20,
51
+ "fontWeight": 700,
52
+ "letterSpacing": 0,
53
+ "lineHeight": 28
54
+ },
55
+ "h4": {
56
+ "fontSize": 16,
57
+ "fontWeight": 700,
58
+ "letterSpacing": 0,
59
+ "lineHeight": 24
60
+ },
61
+ "h5": {
62
+ "fontSize": 14,
63
+ "fontWeight": 700,
64
+ "letterSpacing": 0,
65
+ "lineHeight": 20
66
+ },
67
+ "p1": {
68
+ "fontSize": 16,
69
+ "fontWeight": 400,
70
+ "letterSpacing": 0,
71
+ "lineHeight": 24
72
+ },
73
+ "p1m": {
74
+ "fontSize": 16,
75
+ "fontWeight": 500,
76
+ "letterSpacing": 0,
77
+ "lineHeight": 24
78
+ },
79
+ "p1b": {
80
+ "fontSize": 16,
81
+ "fontWeight": 700,
82
+ "letterSpacing": 0,
83
+ "lineHeight": 24
84
+ },
85
+ "p2": {
86
+ "fontSize": 14,
87
+ "fontWeight": 400,
88
+ "letterSpacing": 0,
89
+ "lineHeight": 20
90
+ },
91
+ "p2m": {
92
+ "fontSize": 14,
93
+ "fontWeight": 500,
94
+ "letterSpacing": 0,
95
+ "lineHeight": 20
96
+ },
97
+ "p2b": {
98
+ "fontSize": 14,
99
+ "fontWeight": 700,
100
+ "letterSpacing": 0,
101
+ "lineHeight": 20
102
+ },
103
+ "c1": {
104
+ "fontSize": 12,
105
+ "fontWeight": 400,
106
+ "letterSpacing": 0,
107
+ "lineHeight": 16
108
+ },
109
+ "c2": {
110
+ "fontSize": 12,
111
+ "fontWeight": 700,
112
+ "letterSpacing": 0,
113
+ "lineHeight": 16
114
+ },
115
+ "micro": {
116
+ "fontSize": 10,
117
+ "fontWeight": 700,
118
+ "letterSpacing": 0,
119
+ "lineHeight": 12
120
+ }
121
+ }
122
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket.chat/fuselage-tokens",
3
- "version": "0.34.0",
3
+ "version": "0.36.0-rc.0",
4
4
  "description": "Design tokens for Fuselage, Rocket.Chat's design system",
5
5
  "keywords": [
6
6
  "design",
@@ -8,13 +8,13 @@
8
8
  "fuselage",
9
9
  "rocket.chat"
10
10
  ],
11
- "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/",
11
+ "homepage": "https://github.com/RocketChat/Rocket.Chat#readme",
12
12
  "bugs": {
13
- "url": "https://github.com/RocketChat/fuselage/issues"
13
+ "url": "https://github.com/RocketChat/Rocket.Chat/issues"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/RocketChat/fuselage.git",
17
+ "url": "git+https://github.com/RocketChat/Rocket.Chat.git",
18
18
  "directory": "packages/fuselage-tokens"
19
19
  },
20
20
  "license": "MIT",
@@ -24,24 +24,19 @@
24
24
  },
25
25
  "type": "module",
26
26
  "files": [
27
- "dist"
27
+ "/dist"
28
28
  ],
29
29
  "scripts": {
30
- "build": "rimraf dist && node ./build --config ./config.js"
30
+ "build": "rm -rf dist && node ./build.js",
31
+ "lint": "yarn run -T oxlint",
32
+ "lint:fix": "yarn run -T oxlint --fix"
31
33
  },
32
34
  "devDependencies": {
33
- "eslint": "~10.8.0",
34
- "eslint-config-prettier": "~10.1.8",
35
- "lint-all": "^0.31.25",
36
- "postcss": "~8.5.23",
37
- "postcss-scss": "~4.0.9",
38
- "prettier": "~3.6.2",
39
- "rimraf": "~6.1.3",
40
- "style-dictionary": "~5.5.0",
41
- "stylelint": "~17.14.1",
42
- "stylelint-order": "~8.1.1",
43
- "stylelint-prettier": "~5.0.3",
44
- "stylelint-scss": "~7.2.0"
35
+ "change-case": "~5.4.4",
36
+ "style-dictionary": "~5.5.3"
37
+ },
38
+ "volta": {
39
+ "extends": "../../package.json"
45
40
  },
46
41
  "publishConfig": {
47
42
  "access": "public"