@transferwise/neptune-tokens 0.0.0-experimental-b6daf3f

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 ADDED
@@ -0,0 +1,148 @@
1
+ # Neptune Tokens [![npm](https://img.shields.io/npm/v/@transferwise/neptune-tokens.svg)](https://www.npmjs.com/package/@transferwise/neptune-tokens)
2
+
3
+ Design tokens for [Neptune](https://github.com/transferwise/neptune), Wise's design system. Currently includes colours, radiuses, and sizes.
4
+
5
+ Tokens always start with a `base` layer that directly accesses the values, and can be extended with a semantic layer that describes the token's intended purpose, rather than how it looks.
6
+
7
+ ## Installation
8
+
9
+ For npm environments, install the package and consume the bundles below.
10
+
11
+ ```shell
12
+ npm install @transferwise/neptune-tokens
13
+ ```
14
+
15
+ ### Web
16
+
17
+ Bundles are offered both in CSS and Less.
18
+
19
+ We currently only have one theme on web, so the bundles directly reference the colour values from the `light` theme.
20
+
21
+ ```css
22
+ @import "@transferwise/neptune-tokens/tokens.css";
23
+
24
+ .tw-card {
25
+ color: var(--color-text-primary);
26
+ padding: var(--size-16);
27
+ }
28
+ ```
29
+
30
+ ```less
31
+ @import "@transferwise/neptune-tokens/tokens.less";
32
+
33
+ .tw-card {
34
+ color: @color-text-primary;
35
+ padding: @size-16;
36
+ }
37
+ ```
38
+
39
+ Too add the new personal theme please add our new tokens
40
+
41
+ ```
42
+ @import "@transferwise/neptune-tokens/dist/themes/personal/tokens.css";
43
+ ```
44
+
45
+ ### Figma
46
+
47
+ To import or update colours on the Figma libraries for Neptune:
48
+
49
+ 1. Copy the values from the [colors.json](https://github.com/transferwise/neptune-tokens/blob/master/dist/colors.json) file in the dist folder
50
+ 2. Paste them into the plugin [Import from Style Dictionary](https://www.figma.com/community/plugin/827796798859685469/Import-from-Style-Dictionary)
51
+
52
+ ## Properties
53
+
54
+ ### Colours
55
+
56
+ Our current colour palette is built on a main set of 7 base colours with different levels of brightness. From lightest to darkest:
57
+
58
+ - Fade
59
+ - Light
60
+ - Mid
61
+ - Dark
62
+
63
+ The base set also includes 3 brand colours, currently used exclusively in marketing pages outside product, that don't have brightness variations.
64
+
65
+ We have 2 themes, `light` and `dark`, that refer to the colours semantically. This is the recommended way of using our colour tokens, as the base colours have a higher risk of deprecation. There are no dependencies between the imports, the values are flattened on the themes, so base colours don't usually need to be imported.
66
+
67
+ #### Source values
68
+
69
+ - [Base](https://github.com/transferwise/neptune-tokens/blob/master/src/colors/base.json)
70
+ - [Light theme](https://github.com/transferwise/neptune-tokens/blob/master/src/colors/themes/light.json)
71
+ - [Dark theme](https://github.com/transferwise/neptune-tokens/blob/master/src/colors/themes/dark.json)
72
+
73
+ ### Radius
74
+
75
+ Radius tokens are available in `small` and `medium` sizes. We want to encourage a small manageable set of radiuses in Neptune, so we use T-shirt sizes to define their names.
76
+
77
+ | Name | Size |
78
+ | --------------- | ---- |
79
+ | `radius-small` | 3 |
80
+ | `radius-medium` | 10 |
81
+
82
+ ### Sizes
83
+
84
+ Size tokens should be used for defining spaces and dimensions.
85
+
86
+ We start with a 4-point scale that gives fine control for aligning elements inside components and optimising space on smaller screens. From 16 onwards it becomes an 8-point scale where the difference in steps is more visible. There's currently no semantic layer for sizes.
87
+
88
+ | Name | Size |
89
+ | ---------- | ---- |
90
+ | `size-4` | 4 |
91
+ | `size-8` | 8 |
92
+ | `size-12` | 12 |
93
+ | `size-14` | 14 |
94
+ | `size-16` | 16 |
95
+ | `size-24` | 24 |
96
+ | `size-32` | 32 |
97
+ | `size-40` | 40 |
98
+ | `size-48` | 48 |
99
+ | `size-56` | 56 |
100
+ | `size-60` | 60 |
101
+ | `size-64` | 64 |
102
+ | `size-72` | 72 |
103
+ | `size-80` | 80 |
104
+ | `size-88` | 88 |
105
+ | `size-96` | 96 |
106
+ | `size-104` | 104 |
107
+ | `size-112` | 112 |
108
+ | `size-120` | 120 |
109
+ | `size-128` | 128 |
110
+ | `size-146` | 146 |
111
+ | `size-154` | 154 |
112
+
113
+ > ⚠️ These tokens were previously called `spacing` before version 1.0.0
114
+
115
+ ### Spaces
116
+
117
+ Space tokens should be used for defining spaces between elements.
118
+
119
+ We currently only provide a token for horizontal content spacing.
120
+
121
+ | Name | Size |
122
+ | -------------------------- | ---- |
123
+ | `space-content-horizontal` | 16 |
124
+
125
+ ### Typography
126
+
127
+ Our size scale was created around the standard size for proportional fonts on most platforms, 16. It then includes smaller values for lower hierarchy body copy, and larger ones mostly used for headings.
128
+
129
+ | Name | Size | Default rendering size |
130
+ | -------------- | ----- | ---------------------- |
131
+ | `font-size-12` | 0.75 | 12px |
132
+ | `font-size-14` | 0.875 | 14px |
133
+ | `font-size-16` | 1 | 16px |
134
+ | `font-size-20` | 1.25 | 20px |
135
+ | `font-size-26` | 1.625 | 26px |
136
+ | `font-size-32` | 2 | 32px |
137
+
138
+ | Name | Line height |
139
+ | --------------------- | ----------- |
140
+ | `line-height-title` | 1.2 |
141
+ | `line-height-body` | 1.5 |
142
+ | `line-height-control` | 1.2 |
143
+
144
+ | Name | Font weight |
145
+ | ----------------------- | ----------- |
146
+ | `font-weight-regular` | 500 |
147
+ | `font-weight-semi-bold` | 600 |
148
+ | `font-weight-bold` | 700 |
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Do not edit directly
3
+ * Generated on Fri, 10 May 2024 10:39:19 GMT
4
+ */
5
+
6
+ :root {
7
+ --color-base-blue-light: #00b9ff;
8
+ --color-base-blue-mid: #00a2dd;
9
+ --color-base-blue-dark: #0097c7;
10
+ --color-base-blue-fade: #38c8ff1a;
11
+ --color-base-green-light: #6fd698;
12
+ --color-base-green-mid: #2ead4b;
13
+ --color-base-green-dark: #008026;
14
+ --color-base-green-fade: #36c7971a;
15
+ --color-base-red-light: #ffa6a9;
16
+ --color-base-red-mid: #e74848;
17
+ --color-base-red-dark: #cf2929;
18
+ --color-base-red-fade: #ff87871a;
19
+ --color-base-orange-light: #ffd184;
20
+ --color-base-orange-mid: #df8700;
21
+ --color-base-orange-dark: #9a6500;
22
+ --color-base-orange-fade: #ffac001a;
23
+ --color-base-smoke-light: #e2e6e8;
24
+ --color-base-smoke-mid: #c9cbce;
25
+ --color-base-smoke-dark: #a8aaac;
26
+ --color-base-smoke-fade: #86a7bd1a;
27
+ --color-base-navy-light: #37517e;
28
+ --color-base-navy-mid: #2e4369;
29
+ --color-base-navy-dark: #253655;
30
+ --color-base-navy-fade: #849cc51a;
31
+ --color-base-grey-light: #829ca9;
32
+ --color-base-grey-mid: #768e9c;
33
+ --color-base-grey-dark: #5d7079;
34
+ --color-base-grey-fade: #829ca91a;
35
+ --color-base-white-light: #ffffff;
36
+ --color-base-white-mid: #ebebeb;
37
+ --color-base-white-fade: #ffffff1a;
38
+ --color-base-black-light: #202020;
39
+ --color-base-black-mid: #181818;
40
+ --color-base-black-dark: #000000;
41
+ --color-base-black-fade: #0000001a;
42
+ --color-base-brand-blue: #00b9ff;
43
+ --color-base-brand-purple: #485cc7;
44
+ --color-base-brand-amber: #ffb619;
45
+ --color-base-brand-borderless: #44ee70;
46
+ }
@@ -0,0 +1,43 @@
1
+
2
+ // Do not edit directly
3
+ // Generated on Fri, 10 May 2024 10:39:19 GMT
4
+
5
+ @color-base-blue-light: #00b9ff;
6
+ @color-base-blue-mid: #00a2dd;
7
+ @color-base-blue-dark: #0097c7;
8
+ @color-base-blue-fade: #38c8ff1a;
9
+ @color-base-green-light: #6fd698;
10
+ @color-base-green-mid: #2ead4b;
11
+ @color-base-green-dark: #008026;
12
+ @color-base-green-fade: #36c7971a;
13
+ @color-base-red-light: #ffa6a9;
14
+ @color-base-red-mid: #e74848;
15
+ @color-base-red-dark: #cf2929;
16
+ @color-base-red-fade: #ff87871a;
17
+ @color-base-orange-light: #ffd184;
18
+ @color-base-orange-mid: #df8700;
19
+ @color-base-orange-dark: #9a6500;
20
+ @color-base-orange-fade: #ffac001a;
21
+ @color-base-smoke-light: #e2e6e8;
22
+ @color-base-smoke-mid: #c9cbce;
23
+ @color-base-smoke-dark: #a8aaac;
24
+ @color-base-smoke-fade: #86a7bd1a;
25
+ @color-base-navy-light: #37517e;
26
+ @color-base-navy-mid: #2e4369;
27
+ @color-base-navy-dark: #253655;
28
+ @color-base-navy-fade: #849cc51a;
29
+ @color-base-grey-light: #829ca9;
30
+ @color-base-grey-mid: #768e9c;
31
+ @color-base-grey-dark: #5d7079;
32
+ @color-base-grey-fade: #829ca91a;
33
+ @color-base-white-light: #ffffff;
34
+ @color-base-white-mid: #ebebeb;
35
+ @color-base-white-fade: #ffffff1a;
36
+ @color-base-black-light: #202020;
37
+ @color-base-black-mid: #181818;
38
+ @color-base-black-dark: #000000;
39
+ @color-base-black-fade: #0000001a;
40
+ @color-base-brand-blue: #00b9ff;
41
+ @color-base-brand-purple: #485cc7;
42
+ @color-base-brand-amber: #ffb619;
43
+ @color-base-brand-borderless: #44ee70;