@grafctory/skin 0.0.0-stage → 0.3.1

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 (78) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +469 -2
  3. package/dist/index.core.d.ts +201 -0
  4. package/dist/index.core.d.ts.map +1 -0
  5. package/dist/index.core.js +17 -0
  6. package/dist/index.core.js.map +1 -0
  7. package/dist/index.css +126 -0
  8. package/dist/index.d.ts +432 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +184 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/markup/alerts.css +83 -0
  13. package/dist/markup/blocks.css +255 -0
  14. package/dist/markup/forms.css +551 -0
  15. package/dist/markup/headings.css +131 -0
  16. package/dist/markup/highlights.css +38 -0
  17. package/dist/markup/inlines.css +183 -0
  18. package/dist/markup/lists.css +206 -0
  19. package/dist/markup/reset.css +38 -0
  20. package/dist/markup/tables.css +78 -0
  21. package/dist/presets/inter.css +194 -0
  22. package/dist/presets/roboto.css +198 -0
  23. package/dist/tokens/borders.css +151 -0
  24. package/dist/tokens/borders.d.ts +57 -0
  25. package/dist/tokens/borders.d.ts.map +1 -0
  26. package/dist/tokens/borders.js +72 -0
  27. package/dist/tokens/borders.js.map +1 -0
  28. package/dist/tokens/colors.css +515 -0
  29. package/dist/tokens/colors.d.ts +171 -0
  30. package/dist/tokens/colors.d.ts.map +1 -0
  31. package/dist/tokens/colors.js +186 -0
  32. package/dist/tokens/colors.js.map +1 -0
  33. package/dist/tokens/elevations.css +110 -0
  34. package/dist/tokens/elevations.d.ts +54 -0
  35. package/dist/tokens/elevations.d.ts.map +1 -0
  36. package/dist/tokens/elevations.js +69 -0
  37. package/dist/tokens/elevations.js.map +1 -0
  38. package/dist/tokens/layers.css +57 -0
  39. package/dist/tokens/layers.d.ts +34 -0
  40. package/dist/tokens/layers.d.ts.map +1 -0
  41. package/dist/tokens/layers.js +49 -0
  42. package/dist/tokens/layers.js.map +1 -0
  43. package/dist/tokens/motions.css +91 -0
  44. package/dist/tokens/motions.d.ts +40 -0
  45. package/dist/tokens/motions.d.ts.map +1 -0
  46. package/dist/tokens/motions.js +55 -0
  47. package/dist/tokens/motions.js.map +1 -0
  48. package/dist/tokens/opacities.css +41 -0
  49. package/dist/tokens/opacities.d.ts +32 -0
  50. package/dist/tokens/opacities.d.ts.map +1 -0
  51. package/dist/tokens/opacities.js +47 -0
  52. package/dist/tokens/opacities.js.map +1 -0
  53. package/dist/tokens/palettes.css +546 -0
  54. package/dist/tokens/palettes.d.ts +140 -0
  55. package/dist/tokens/palettes.d.ts.map +1 -0
  56. package/dist/tokens/palettes.js +155 -0
  57. package/dist/tokens/palettes.js.map +1 -0
  58. package/dist/tokens/scalings.css +81 -0
  59. package/dist/tokens/scalings.d.ts +31 -0
  60. package/dist/tokens/scalings.d.ts.map +1 -0
  61. package/dist/tokens/scalings.js +46 -0
  62. package/dist/tokens/scalings.js.map +1 -0
  63. package/dist/tokens/spacings.css +78 -0
  64. package/dist/tokens/spacings.d.ts +34 -0
  65. package/dist/tokens/spacings.d.ts.map +1 -0
  66. package/dist/tokens/spacings.js +49 -0
  67. package/dist/tokens/spacings.js.map +1 -0
  68. package/dist/tokens/typography.css +156 -0
  69. package/dist/tokens/typography.d.ts +77 -0
  70. package/dist/tokens/typography.d.ts.map +1 -0
  71. package/dist/tokens/typography.js +92 -0
  72. package/dist/tokens/typography.js.map +1 -0
  73. package/dist/tokens/viewports.css +101 -0
  74. package/dist/tokens/viewports.d.ts +75 -0
  75. package/dist/tokens/viewports.d.ts.map +1 -0
  76. package/dist/tokens/viewports.js +90 -0
  77. package/dist/tokens/viewports.js.map +1 -0
  78. package/package.json +87 -4
@@ -0,0 +1,155 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Palette tokens.
18
+ *
19
+ * Names the colours an author picks for content and the colours a chart, a coding or a map reads: eighteen editor
20
+ * colours, four ten-step scales, nine series slots and four area classes. An editor colour, a step, a slot or a class
21
+ * says how an author coloured content, where a value sits or which thing it belongs to. None ever stands in for a
22
+ * {@link colors role}, which says what a colour means in the interface, such as a failure or a disabled control.
23
+ *
24
+ * @remarks
25
+ *
26
+ * **Editor colours** — what an author picks to colour content, as text or as fill: a word set in red, a table cell
27
+ * filled in yellow, a highlight behind a phrase. They form a grid of a neutral and five hues by three steps, named
28
+ * as the `look` attribute names its own: `colorRedStrong` stands out from the page, `colorRedSubtle` stays close to
29
+ * it and `colorRed` sits between, with `colorBlack`, `colorGray` and `colorWhite` as the neutral steps. Each states
30
+ * both colour schemes, so a strong step is dark on the light page and light on the dark one. They are named for how
31
+ * they look and keep their values under any brand, since an author attaches no meaning the interface could rely on.
32
+ * For the same reason a widget never states a meaning with one. The plain step holds 3:1 on the page in either
33
+ * colour scheme, enough for large text and for a mark. That is the only contrast guarantee: any other step or
34
+ * combination is the author's to judge, and so is text at body size, which WCAG holds to 4.5:1 rather than 3:1.
35
+ *
36
+ * **Colour scales** — where a colour stands for a position rather than for a role, a ten-step scale provides it:
37
+ * `colorGray*` for a neutral, `colorSubtle*` and `colorStrong*` for a branded one, and `colorHeat*` for a magnitude.
38
+ * The number is the share of the anchor the step carries, so `010` is the faintest and `100` the anchor itself, and
39
+ * the three derived scales follow an app retuning {@link colors the anchors}. A step is not a replacement for a role
40
+ * token: the text and background roles do not land on the ladder.
41
+ *
42
+ * **The heat scale** — it carries literals of its own, cool blue through green and red to a violet extremum standing
43
+ * for a measure past the top of its range. Its hue carries the reading and its lightness does not, so a step means a
44
+ * band a legend names, never a position on a continuous gradient, and a consumer states the band in text beside the
45
+ * colour. Text over a step takes the page colour {@link colors `color`} up to `070` and the page background
46
+ * {@link colors `backgroundColor`} from `080` on. A continuous gradient needs a monotone scale of
47
+ * its own.
48
+ *
49
+ * **Series slots** — `colorSeries1` to `colorSeries9` tell one thing apart from another, on a bar, a line or a wedge.
50
+ * A number is a slot rather than a share: the slots stand in a fixed order, taken in sequence and held to the thing
51
+ * each one paints, so a filter dropping a series leaves the survivors their colours. Their separation under simulated
52
+ * colour vision deficiency is what the order buys, so reordering or resampling them forfeits it, and a state is told
53
+ * in the role that names it rather than in a slot. Nine hold where only neighbours are compared; where every pair is
54
+ * compared, on a scatter, a bubble chart or a map, the first three hold and a fourth thing is faceted rather than
55
+ * coloured. One value serves both colour schemes; four of the nine stay under 3:1 against the light page, so a chart
56
+ * carrying them states its figures in text as well, through direct labels or a table view.
57
+ *
58
+ * **Area classes** — `colorArea1` to `colorArea4` fill a shape rather than draw a mark: a region on a choropleth, a
59
+ * band on a terrain, a cell on a grid. They come as two pairs, a light and a dark of one hue each, so the members of
60
+ * a pair are told apart by lightness where hue alone would fail, and the two hues read as two families; that pairing
61
+ * is what a greyscale print survives on. Every pair of classes meets on a shared boundary, so the four are held to
62
+ * the all-pairs measure rather than the adjacent one, and four is the limit: a fifth class is a second map, never a
63
+ * fifth colour. The two pale classes stay under 3:1 against the light page, so a map keeps its boundaries drawn and
64
+ * names its classes in the legend.
65
+ *
66
+ * **Classified surfaces** — a step, a slot or a class may fill a surface rather than paint a mark, tinting an area by
67
+ * the class it belongs to: the columns of a board along its flow, the lanes of a swimlane by type. The fill takes
68
+ * the place of the page background for everything the area holds, so the area **always** assigns `color` too: text
69
+ * left on the page colour may lose contrast over the fill, as it does over the heat scale from `080` on, and over
70
+ * its brighter steps wherever the dark scheme sets that colour light. Inside the area, `backgroundColor` names the
71
+ * fill itself, so text meant to take the page background is given a colour of its own rather than that token. A
72
+ * colour washed out through {@link index.css css.tint} keeps the area close to the page instead, so at a low
73
+ * share the text it holds stays readable on the page colour, in either colour scheme, with no `color` of its own.
74
+ *
75
+ * @module palettes
76
+ */
77
+ /**
78
+ * The custom property behind every palette token.
79
+ *
80
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
81
+ */
82
+ export const palettes = {
83
+ colorGray010: "--skin--color-gray-010",
84
+ colorGray020: "--skin--color-gray-020",
85
+ colorGray030: "--skin--color-gray-030",
86
+ colorGray040: "--skin--color-gray-040",
87
+ colorGray050: "--skin--color-gray-050",
88
+ colorGray060: "--skin--color-gray-060",
89
+ colorGray070: "--skin--color-gray-070",
90
+ colorGray080: "--skin--color-gray-080",
91
+ colorGray090: "--skin--color-gray-090",
92
+ colorGray100: "--skin--color-gray-100",
93
+ colorSubtle010: "--skin--color-subtle-010",
94
+ colorSubtle020: "--skin--color-subtle-020",
95
+ colorSubtle030: "--skin--color-subtle-030",
96
+ colorSubtle040: "--skin--color-subtle-040",
97
+ colorSubtle050: "--skin--color-subtle-050",
98
+ colorSubtle060: "--skin--color-subtle-060",
99
+ colorSubtle070: "--skin--color-subtle-070",
100
+ colorSubtle080: "--skin--color-subtle-080",
101
+ colorSubtle090: "--skin--color-subtle-090",
102
+ colorSubtle100: "--skin--color-subtle-100",
103
+ colorStrong010: "--skin--color-strong-010",
104
+ colorStrong020: "--skin--color-strong-020",
105
+ colorStrong030: "--skin--color-strong-030",
106
+ colorStrong040: "--skin--color-strong-040",
107
+ colorStrong050: "--skin--color-strong-050",
108
+ colorStrong060: "--skin--color-strong-060",
109
+ colorStrong070: "--skin--color-strong-070",
110
+ colorStrong080: "--skin--color-strong-080",
111
+ colorStrong090: "--skin--color-strong-090",
112
+ colorStrong100: "--skin--color-strong-100",
113
+ colorHeat010: "--skin--color-heat-010",
114
+ colorHeat020: "--skin--color-heat-020",
115
+ colorHeat030: "--skin--color-heat-030",
116
+ colorHeat040: "--skin--color-heat-040",
117
+ colorHeat050: "--skin--color-heat-050",
118
+ colorHeat060: "--skin--color-heat-060",
119
+ colorHeat070: "--skin--color-heat-070",
120
+ colorHeat080: "--skin--color-heat-080",
121
+ colorHeat090: "--skin--color-heat-090",
122
+ colorHeat100: "--skin--color-heat-100",
123
+ colorSeries1: "--skin--color-series-1",
124
+ colorSeries2: "--skin--color-series-2",
125
+ colorSeries3: "--skin--color-series-3",
126
+ colorSeries4: "--skin--color-series-4",
127
+ colorSeries5: "--skin--color-series-5",
128
+ colorSeries6: "--skin--color-series-6",
129
+ colorSeries7: "--skin--color-series-7",
130
+ colorSeries8: "--skin--color-series-8",
131
+ colorSeries9: "--skin--color-series-9",
132
+ colorArea1: "--skin--color-area-1",
133
+ colorArea2: "--skin--color-area-2",
134
+ colorArea3: "--skin--color-area-3",
135
+ colorArea4: "--skin--color-area-4",
136
+ colorBlack: "--skin--color-black",
137
+ colorGray: "--skin--color-gray",
138
+ colorWhite: "--skin--color-white",
139
+ colorRedStrong: "--skin--color-red-strong",
140
+ colorRed: "--skin--color-red",
141
+ colorRedSubtle: "--skin--color-red-subtle",
142
+ colorYellowStrong: "--skin--color-yellow-strong",
143
+ colorYellow: "--skin--color-yellow",
144
+ colorYellowSubtle: "--skin--color-yellow-subtle",
145
+ colorGreenStrong: "--skin--color-green-strong",
146
+ colorGreen: "--skin--color-green",
147
+ colorGreenSubtle: "--skin--color-green-subtle",
148
+ colorBlueStrong: "--skin--color-blue-strong",
149
+ colorBlue: "--skin--color-blue",
150
+ colorBlueSubtle: "--skin--color-blue-subtle",
151
+ colorPurpleStrong: "--skin--color-purple-strong",
152
+ colorPurple: "--skin--color-purple",
153
+ colorPurpleSubtle: "--skin--color-purple-subtle"
154
+ };
155
+ //# sourceMappingURL=palettes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palettes.js","sourceRoot":"","sources":["../../src/tokens/palettes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IAEvB,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IAEtC,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAE1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAC1C,cAAc,EAAE,0BAA0B;IAE1C,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IAEtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,wBAAwB;IAEtC,UAAU,EAAE,sBAAsB;IAClC,UAAU,EAAE,sBAAsB;IAClC,UAAU,EAAE,sBAAsB;IAClC,UAAU,EAAE,sBAAsB;IAElC,UAAU,EAAE,qBAAqB;IACjC,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE,qBAAqB;IACjC,cAAc,EAAE,0BAA0B;IAC1C,QAAQ,EAAE,mBAAmB;IAC7B,cAAc,EAAE,0BAA0B;IAC1C,iBAAiB,EAAE,6BAA6B;IAChD,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,6BAA6B;IAChD,gBAAgB,EAAE,4BAA4B;IAC9C,UAAU,EAAE,qBAAqB;IACjC,gBAAgB,EAAE,4BAA4B;IAC9C,eAAe,EAAE,2BAA2B;IAC5C,SAAS,EAAE,oBAAoB;IAC/B,eAAe,EAAE,2BAA2B;IAC5C,iBAAiB,EAAE,6BAA6B;IAChD,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,6BAA6B;CAEvC,CAAC"}
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * The scaling ladder sizes what is measured against the text rather than spaced from it: a glyph, a spinner, a swatch
19
+ * or a dot. Every step is stated in em, so a subtree given a size of its own takes the ladder along, and the number is
20
+ * the multiple of the text size the step carries, 100 matching the text it sits in.
21
+ */
22
+
23
+ @property --skin--scaling-025 {
24
+ syntax: "*";
25
+ inherits: true;
26
+ initial-value: 0.25em;
27
+ }
28
+
29
+ @property --skin--scaling-050 {
30
+ syntax: "*";
31
+ inherits: true;
32
+ initial-value: 0.5em;
33
+ }
34
+
35
+ @property --skin--scaling-075 {
36
+ syntax: "*";
37
+ inherits: true;
38
+ initial-value: 0.75em;
39
+ }
40
+
41
+ @property --skin--scaling-090 {
42
+ syntax: "*";
43
+ inherits: true;
44
+ initial-value: 0.9em;
45
+ }
46
+
47
+ @property --skin--scaling-100 {
48
+ syntax: "*";
49
+ inherits: true;
50
+ initial-value: 1em;
51
+ }
52
+
53
+ @property --skin--scaling-110 {
54
+ syntax: "*";
55
+ inherits: true;
56
+ initial-value: 1.1em;
57
+ }
58
+
59
+ @property --skin--scaling-125 {
60
+ syntax: "*";
61
+ inherits: true;
62
+ initial-value: 1.25em;
63
+ }
64
+
65
+ @property --skin--scaling-150 {
66
+ syntax: "*";
67
+ inherits: true;
68
+ initial-value: 1.5em;
69
+ }
70
+
71
+ @property --skin--scaling-200 {
72
+ syntax: "*";
73
+ inherits: true;
74
+ initial-value: 2em;
75
+ }
76
+
77
+ @property --skin--scaling-250 {
78
+ syntax: "*";
79
+ inherits: true;
80
+ initial-value: 2.5em;
81
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Scaling tokens.
3
+ *
4
+ * Names the ladder a glyph, a spinner, a swatch or a dot is sized on, keeping its proportion to the text it sits in.
5
+ *
6
+ * @remarks
7
+ *
8
+ * Each step is the multiple of the text size its number names, stated in `em` so a resized subtree takes it along.
9
+ *
10
+ * A margin, a padding or a gap sets a thing apart rather than sizing it, and takes the {@link spacings spacing ladder}.
11
+ *
12
+ * @module scalings
13
+ */
14
+ /**
15
+ * The custom property behind every scaling token.
16
+ *
17
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
18
+ */
19
+ export declare const scalings: {
20
+ readonly scaling025: "--skin--scaling-025";
21
+ readonly scaling050: "--skin--scaling-050";
22
+ readonly scaling075: "--skin--scaling-075";
23
+ readonly scaling090: "--skin--scaling-090";
24
+ readonly scaling100: "--skin--scaling-100";
25
+ readonly scaling110: "--skin--scaling-110";
26
+ readonly scaling125: "--skin--scaling-125";
27
+ readonly scaling150: "--skin--scaling-150";
28
+ readonly scaling200: "--skin--scaling-200";
29
+ readonly scaling250: "--skin--scaling-250";
30
+ };
31
+ //# sourceMappingURL=scalings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalings.d.ts","sourceRoot":"","sources":["../../src/tokens/scalings.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;GAYG;AAGH;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;CAaX,CAAC"}
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Scaling tokens.
18
+ *
19
+ * Names the ladder a glyph, a spinner, a swatch or a dot is sized on, keeping its proportion to the text it sits in.
20
+ *
21
+ * @remarks
22
+ *
23
+ * Each step is the multiple of the text size its number names, stated in `em` so a resized subtree takes it along.
24
+ *
25
+ * A margin, a padding or a gap sets a thing apart rather than sizing it, and takes the {@link spacings spacing ladder}.
26
+ *
27
+ * @module scalings
28
+ */
29
+ /**
30
+ * The custom property behind every scaling token.
31
+ *
32
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
33
+ */
34
+ export const scalings = {
35
+ scaling025: "--skin--scaling-025",
36
+ scaling050: "--skin--scaling-050",
37
+ scaling075: "--skin--scaling-075",
38
+ scaling090: "--skin--scaling-090",
39
+ scaling100: "--skin--scaling-100",
40
+ scaling110: "--skin--scaling-110",
41
+ scaling125: "--skin--scaling-125",
42
+ scaling150: "--skin--scaling-150",
43
+ scaling200: "--skin--scaling-200",
44
+ scaling250: "--skin--scaling-250"
45
+ };
46
+ //# sourceMappingURL=scalings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalings.js","sourceRoot":"","sources":["../../src/tokens/scalings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IAEvB,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;CAExB,CAAC"}
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * The spacing ladder sets a thing apart from what surrounds it, on a margin, a padding or a gap. Every step is stated
19
+ * in em, so a subtree given a size of its own takes the rhythm along; the number is the multiple of the text size the
20
+ * step carries. A step sizing a thing against the text rather than spacing it from its neighbour belongs to the
21
+ * scaling ladder instead.
22
+ */
23
+
24
+ @property --skin--spacing-010 {
25
+ syntax: "*";
26
+ inherits: true;
27
+ initial-value: 0.1em;
28
+ }
29
+
30
+ @property --skin--spacing-025 {
31
+ syntax: "*";
32
+ inherits: true;
33
+ initial-value: 0.25em;
34
+ }
35
+
36
+ @property --skin--spacing-050 {
37
+ syntax: "*";
38
+ inherits: true;
39
+ initial-value: 0.5em;
40
+ }
41
+
42
+ @property --skin--spacing-075 {
43
+ syntax: "*";
44
+ inherits: true;
45
+ initial-value: 0.75em;
46
+ }
47
+
48
+ @property --skin--spacing-100 {
49
+ syntax: "*";
50
+ inherits: true;
51
+ initial-value: 1em;
52
+ }
53
+
54
+ @property --skin--spacing-150 {
55
+ syntax: "*";
56
+ inherits: true;
57
+ initial-value: 1.5em;
58
+ }
59
+
60
+ @property --skin--spacing-200 {
61
+ syntax: "*";
62
+ inherits: true;
63
+ initial-value: 2em;
64
+ }
65
+
66
+ @property --skin--spacing-250 {
67
+ syntax: "*";
68
+ inherits: true;
69
+ initial-value: 2.5em;
70
+ }
71
+
72
+ /* The padding of the one element it is assigned to, set from a step and read by no rule, none if unassigned. */
73
+
74
+ @property --skin--padding {
75
+ syntax: "*";
76
+ inherits: true;
77
+ initial-value: 0;
78
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Spacing tokens.
3
+ *
4
+ * Names the ladder margins, paddings and gaps set a thing apart on, so an interface's spacing retunes from one place.
5
+ *
6
+ * @remarks
7
+ *
8
+ * Each step is the multiple of the text size its number names, stated in `em` so a resized subtree takes it along.
9
+ *
10
+ * A step sizing a thing against the text rather than spacing it from its neighbour belongs to the
11
+ * {@link scalings scaling ladder} instead: a glyph, a spinner, a swatch or a dot is scaled, not spaced.
12
+ *
13
+ * **Padding** — `padding` is not a step but the padding of the element it is assigned to, set from a step: no rule
14
+ * reads it, and assigning it through {@link index.css css} pads that element alone, leaving what it holds unpadded.
15
+ *
16
+ * @module spacings
17
+ */
18
+ /**
19
+ * The custom property behind every spacing token.
20
+ *
21
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
22
+ */
23
+ export declare const spacings: {
24
+ readonly spacing010: "--skin--spacing-010";
25
+ readonly spacing025: "--skin--spacing-025";
26
+ readonly spacing050: "--skin--spacing-050";
27
+ readonly spacing075: "--skin--spacing-075";
28
+ readonly spacing100: "--skin--spacing-100";
29
+ readonly spacing150: "--skin--spacing-150";
30
+ readonly spacing200: "--skin--spacing-200";
31
+ readonly spacing250: "--skin--spacing-250";
32
+ readonly padding: "--skin--padding";
33
+ };
34
+ //# sourceMappingURL=spacings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacings.d.ts","sourceRoot":"","sources":["../../src/tokens/spacings.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;GAgBG;AAGH;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;CAaX,CAAC"}
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Spacing tokens.
18
+ *
19
+ * Names the ladder margins, paddings and gaps set a thing apart on, so an interface's spacing retunes from one place.
20
+ *
21
+ * @remarks
22
+ *
23
+ * Each step is the multiple of the text size its number names, stated in `em` so a resized subtree takes it along.
24
+ *
25
+ * A step sizing a thing against the text rather than spacing it from its neighbour belongs to the
26
+ * {@link scalings scaling ladder} instead: a glyph, a spinner, a swatch or a dot is scaled, not spaced.
27
+ *
28
+ * **Padding** — `padding` is not a step but the padding of the element it is assigned to, set from a step: no rule
29
+ * reads it, and assigning it through {@link index.css css} pads that element alone, leaving what it holds unpadded.
30
+ *
31
+ * @module spacings
32
+ */
33
+ /**
34
+ * The custom property behind every spacing token.
35
+ *
36
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
37
+ */
38
+ export const spacings = {
39
+ spacing010: "--skin--spacing-010",
40
+ spacing025: "--skin--spacing-025",
41
+ spacing050: "--skin--spacing-050",
42
+ spacing075: "--skin--spacing-075",
43
+ spacing100: "--skin--spacing-100",
44
+ spacing150: "--skin--spacing-150",
45
+ spacing200: "--skin--spacing-200",
46
+ spacing250: "--skin--spacing-250",
47
+ padding: "--skin--padding"
48
+ };
49
+ //# sourceMappingURL=spacings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacings.js","sourceRoot":"","sources":["../../src/tokens/spacings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IAEvB,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IAEjC,OAAO,EAAE,iBAAiB;CAEjB,CAAC"}
@@ -0,0 +1,156 @@
1
+ /*
2
+ * Copyright © 2023-2026 Metreeca srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /*
18
+ * The faces default to the platform faces, which cost the app no download. A preset states and bundles faces of its
19
+ * own, as presets/roboto.css does with the Roboto faces of the Metreeca brand, and an app loads its own faces itself.
20
+ */
21
+
22
+ @property --skin--font-family {
23
+ syntax: "*";
24
+ inherits: true;
25
+ initial-value: system-ui, sans-serif;
26
+ }
27
+
28
+ @property --skin--font-family-heading {
29
+ syntax: "*";
30
+ inherits: true;
31
+ initial-value: system-ui, sans-serif;
32
+ }
33
+
34
+ @property --skin--font-family-mono {
35
+ syntax: "*";
36
+ inherits: true;
37
+ initial-value: ui-monospace, monospace;
38
+ }
39
+
40
+ /*
41
+ * The base size follows the reader's own setting and the window rather than what it sits in, holding its rhythm
42
+ * wherever embedded. It grows a little across laptop windows and further only past the widest of them, on
43
+ * desktop windows where text read from further away would otherwise look small, and is capped there; the two size
44
+ * variants stay relative to whatever they sit in, so a subtree sized apart keeps their ratio to its own text.
45
+ */
46
+
47
+ @property --skin--font-size {
48
+ syntax: "*";
49
+ inherits: true;
50
+ initial-value: max(clamp(1rem, 0.75rem + 0.3125vw, 1.125rem), clamp(1rem, 100vw / 48 - 1.25rem, 1.25rem));
51
+ }
52
+
53
+ @property --skin--font-size-small {
54
+ syntax: "*";
55
+ inherits: true;
56
+ initial-value: 90%;
57
+ }
58
+
59
+ @property --skin--font-size-large {
60
+ syntax: "*";
61
+ inherits: true;
62
+ initial-value: 1.25em;
63
+ }
64
+
65
+ /*
66
+ * The heading size is relative and sizes every level. The first two levels scale up from it by small ratios, while the
67
+ * levels below take it as it stands or step down to the small size, leaving the rest of the hierarchy to the weight,
68
+ * the colour and the space around a heading. An app resizing this token resizes every heading together.
69
+ */
70
+
71
+ @property --skin--font-size-heading {
72
+ syntax: "*";
73
+ inherits: true;
74
+ initial-value: 1em;
75
+ }
76
+
77
+ /*
78
+ * Tracking ships neutral, so the brand face decides it. It is stated as a token all the same, since an app supplying
79
+ * a condensed or a wide face has no other way to correct a heading without restating the rule.
80
+ */
81
+
82
+ @property --skin--letter-spacing-heading {
83
+ syntax: "*";
84
+ inherits: true;
85
+ initial-value: normal;
86
+ }
87
+
88
+ /*
89
+ * Capitals set at the spacing a face gives lowercase text look crowded, so a label set in small capitals takes a
90
+ * tracking of its own. It is stated in em, so it follows the size the label is set at wherever the label appears.
91
+ */
92
+
93
+ @property --skin--letter-spacing-caps {
94
+ syntax: "*";
95
+ inherits: true;
96
+ initial-value: 0.08em;
97
+ }
98
+
99
+ /*
100
+ * Casing is a brand choice, so headings and labels in capitals each read it from a token. Headings ship as written and
101
+ * labels in capitals; a call site states another casing on a subtree, and every title or label inside it follows.
102
+ */
103
+
104
+ @property --skin--text-transform-heading {
105
+ syntax: "none | capitalize | uppercase | lowercase";
106
+ inherits: true;
107
+ initial-value: none;
108
+ }
109
+
110
+ @property --skin--text-transform-caps {
111
+ syntax: "none | capitalize | uppercase | lowercase";
112
+ inherits: true;
113
+ initial-value: uppercase;
114
+ }
115
+
116
+ /*
117
+ * Running text takes a line height leaving room for the eye to find the start of the next line. Display type, set
118
+ * several times larger, needs far less of it, and tighter leading holds a title spread over two lines together.
119
+ */
120
+
121
+ @property --skin--line-height {
122
+ syntax: "<number>";
123
+ inherits: true;
124
+ initial-value: 1.3;
125
+ }
126
+
127
+ @property --skin--line-height-display {
128
+ syntax: "<number>";
129
+ inherits: true;
130
+ initial-value: 1.1;
131
+ }
132
+
133
+ /*
134
+ * Prose is held to a comfortable reading measure, stated in characters of the element it caps. A container capped at
135
+ * the text size, such as a heading group, therefore holds fewer characters per line in a run set larger inside it.
136
+ */
137
+
138
+ @property --skin--inline-size-prose {
139
+ syntax: "*";
140
+ inherits: true;
141
+ initial-value: 75ch;
142
+ }
143
+
144
+ /* Two weights carry every text: one at rest and one marking a thing out, set far enough apart to read at a glance. */
145
+
146
+ @property --skin--font-weight {
147
+ syntax: "<number>";
148
+ inherits: true;
149
+ initial-value: 400;
150
+ }
151
+
152
+ @property --skin--font-weight-strong {
153
+ syntax: "<number>";
154
+ inherits: true;
155
+ initial-value: 600;
156
+ }