@grafctory/skin 0.0.0-stage → 0.3.2

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 +482 -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 +130 -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 +552 -0
  15. package/dist/markup/headings.css +131 -0
  16. package/dist/markup/highlights.css +38 -0
  17. package/dist/markup/inlines.css +181 -0
  18. package/dist/markup/lists.css +202 -0
  19. package/dist/markup/reset.css +38 -0
  20. package/dist/markup/tables.css +87 -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 +61 -0
  25. package/dist/tokens/borders.d.ts.map +1 -0
  26. package/dist/tokens/borders.js +76 -0
  27. package/dist/tokens/borders.js.map +1 -0
  28. package/dist/tokens/colors.css +516 -0
  29. package/dist/tokens/colors.d.ts +172 -0
  30. package/dist/tokens/colors.d.ts.map +1 -0
  31. package/dist/tokens/colors.js +187 -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,57 @@
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 stacking order two things overlapping the page are settled by, from the page upwards. A value is compared only
19
+ * against its siblings in the same stacking context, so a dropdown opened inside a modal keeps the dropdown step and
20
+ * still paints above the modal. The steps are spaced wide apart, leaving room for a thing an app slots between them.
21
+ */
22
+
23
+ @property --skin--z-index-sticky {
24
+ syntax: "<integer>";
25
+ inherits: true;
26
+ initial-value: 100;
27
+ }
28
+
29
+ @property --skin--z-index-dropdown {
30
+ syntax: "<integer>";
31
+ inherits: true;
32
+ initial-value: 200;
33
+ }
34
+
35
+ @property --skin--z-index-blanket {
36
+ syntax: "<integer>";
37
+ inherits: true;
38
+ initial-value: 300;
39
+ }
40
+
41
+ @property --skin--z-index-modal {
42
+ syntax: "<integer>";
43
+ inherits: true;
44
+ initial-value: 400;
45
+ }
46
+
47
+ @property --skin--z-index-toast {
48
+ syntax: "<integer>";
49
+ inherits: true;
50
+ initial-value: 500;
51
+ }
52
+
53
+ @property --skin--z-index-tooltip {
54
+ syntax: "<integer>";
55
+ inherits: true;
56
+ initial-value: 600;
57
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Layering tokens.
3
+ *
4
+ * Names the stacking order two things overlapping the page are settled by, so a widget states which kind of thing it
5
+ * is rather than inventing a number and discovering later which other widget it lost to.
6
+ *
7
+ * @remarks
8
+ *
9
+ * **Order** — from the page upwards: `zIndexSticky`, `zIndexDropdown`, `zIndexBlanket`, `zIndexModal`, `zIndexToast`,
10
+ * `zIndexTooltip`. A tooltip sits at the top because it explains whatever is below it, and a toast below that because
11
+ * it is dismissible while a tooltip is not.
12
+ *
13
+ * **Stacking contexts** — a value is compared only against its siblings in the same stacking context, so a dropdown
14
+ * opened inside a modal takes `zIndexDropdown` and still paints above the modal, whose own value applies in the
15
+ * context enclosing it. A widget therefore never adds a step to clear an ancestor.
16
+ *
17
+ * **Steps** — spaced wide apart, leaving an app room to slot a thing between two without restating the ladder.
18
+ *
19
+ * @module layers
20
+ */
21
+ /**
22
+ * The custom property behind every layering token.
23
+ *
24
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
25
+ */
26
+ export declare const layers: {
27
+ readonly zIndexSticky: "--skin--z-index-sticky";
28
+ readonly zIndexDropdown: "--skin--z-index-dropdown";
29
+ readonly zIndexBlanket: "--skin--z-index-blanket";
30
+ readonly zIndexModal: "--skin--z-index-modal";
31
+ readonly zIndexToast: "--skin--z-index-toast";
32
+ readonly zIndexTooltip: "--skin--z-index-tooltip";
33
+ };
34
+ //# sourceMappingURL=layers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../src/tokens/layers.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;CAST,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
+ * Layering tokens.
18
+ *
19
+ * Names the stacking order two things overlapping the page are settled by, so a widget states which kind of thing it
20
+ * is rather than inventing a number and discovering later which other widget it lost to.
21
+ *
22
+ * @remarks
23
+ *
24
+ * **Order** — from the page upwards: `zIndexSticky`, `zIndexDropdown`, `zIndexBlanket`, `zIndexModal`, `zIndexToast`,
25
+ * `zIndexTooltip`. A tooltip sits at the top because it explains whatever is below it, and a toast below that because
26
+ * it is dismissible while a tooltip is not.
27
+ *
28
+ * **Stacking contexts** — a value is compared only against its siblings in the same stacking context, so a dropdown
29
+ * opened inside a modal takes `zIndexDropdown` and still paints above the modal, whose own value applies in the
30
+ * context enclosing it. A widget therefore never adds a step to clear an ancestor.
31
+ *
32
+ * **Steps** — spaced wide apart, leaving an app room to slot a thing between two without restating the ladder.
33
+ *
34
+ * @module layers
35
+ */
36
+ /**
37
+ * The custom property behind every layering token.
38
+ *
39
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
40
+ */
41
+ export const layers = {
42
+ zIndexSticky: "--skin--z-index-sticky",
43
+ zIndexDropdown: "--skin--z-index-dropdown",
44
+ zIndexBlanket: "--skin--z-index-blanket",
45
+ zIndexModal: "--skin--z-index-modal",
46
+ zIndexToast: "--skin--z-index-toast",
47
+ zIndexTooltip: "--skin--z-index-tooltip"
48
+ };
49
+ //# sourceMappingURL=layers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layers.js","sourceRoot":"","sources":["../../src/tokens/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAErB,YAAY,EAAE,wBAAwB;IACtC,cAAc,EAAE,0BAA0B;IAC1C,aAAa,EAAE,yBAAyB;IACxC,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,uBAAuB;IACpC,aAAa,EAAE,yBAAyB;CAE/B,CAAC"}
@@ -0,0 +1,91 @@
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
+ * How long a change takes and how it accelerates. The fast step is for a change the eye should not have to wait for,
19
+ * the normal one for a change that has to be followed, and the slow one for a change covering the viewport. The spin
20
+ * is no change at all, but the period a busy mark keeps turning at for as long as the work it signals lasts.
21
+ */
22
+
23
+ @property --skin--duration-fast {
24
+ syntax: "<time>";
25
+ inherits: true;
26
+ initial-value: 100ms;
27
+ }
28
+
29
+ @property --skin--duration-normal {
30
+ syntax: "<time>";
31
+ inherits: true;
32
+ initial-value: 200ms;
33
+ }
34
+
35
+ @property --skin--duration-slow {
36
+ syntax: "<time>";
37
+ inherits: true;
38
+ initial-value: 400ms;
39
+ }
40
+
41
+ /*
42
+ * The period of one turn of a busy mark, which stays out of the reduced motion collapse below: a mark that stops
43
+ * turning stops saying the work is under way, and a steady rotation is the one motion its meaning rests on.
44
+ */
45
+
46
+ @property --skin--duration-spin {
47
+ syntax: "<time>";
48
+ inherits: true;
49
+ initial-value: 1s;
50
+ }
51
+
52
+ /*
53
+ * The entering curve decelerates and the leaving one accelerates, so the two read as opposite halves of the same
54
+ * gesture. An easing function has no registrable type, so each is registered untyped.
55
+ */
56
+
57
+ @property --skin--easing-standard {
58
+ syntax: "*";
59
+ inherits: true;
60
+ initial-value: cubic-bezier(0.4, 0, 0.2, 1);
61
+ }
62
+
63
+ @property --skin--easing-enter {
64
+ syntax: "*";
65
+ inherits: true;
66
+ initial-value: cubic-bezier(0, 0, 0.2, 1);
67
+ }
68
+
69
+ @property --skin--easing-exit {
70
+ syntax: "*";
71
+ inherits: true;
72
+ initial-value: cubic-bezier(0.4, 0, 1, 1);
73
+ }
74
+
75
+ /*
76
+ * A reader who asked for less motion gets none: collapsing the durations stops every transition stated through them,
77
+ * with no rule of its own anywhere else. The easings are left alone, since a curve over no time changes nothing, and
78
+ * so is the spin, which a busy mark needs to keep saying that the work is still under way.
79
+ */
80
+
81
+ @media (prefers-reduced-motion: reduce) {
82
+
83
+ :root {
84
+
85
+ --skin--duration-fast: 0s;
86
+ --skin--duration-normal: 0s;
87
+ --skin--duration-slow: 0s;
88
+
89
+ }
90
+
91
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Motion tokens.
3
+ *
4
+ * Names how long a change takes and how it accelerates, by kind rather than by number, retuned from one place.
5
+ *
6
+ * @remarks
7
+ *
8
+ * **Durations** — `durationFast` is for a change the eye should not have to wait for, a hover or a press;
9
+ * `durationNormal` for one that has to be followed, a panel opening or a row expanding; `durationSlow` for one
10
+ * covering the viewport.
11
+ *
12
+ * **Spinning** — `durationSpin` is the period of one turn of a busy mark, read with `linear` timing over an
13
+ * `infinite` count. It stands apart from the steps above: a busy mark that stops turning stops saying it is busy.
14
+ *
15
+ * **Easings** — `easingEnter` decelerates, for a thing arriving, and `easingExit` accelerates, for a thing leaving,
16
+ * so the two read as opposite halves of the same gesture. `easingStandard` does both, for a thing that stays and
17
+ * merely moves.
18
+ *
19
+ * **Reduced motion** — every duration but `durationSpin` collapses to zero under `prefers-reduced-motion: reduce`, so
20
+ * a transition stated through these tokens honours the preference with no rule of its own. An animation whose
21
+ * duration is written as a literal opts out of that and owes its own media query, which is the reason to state it as
22
+ * a token. `durationSpin` keeps its period under the preference, so a busy mark keeps turning while work is pending.
23
+ *
24
+ * @module motions
25
+ */
26
+ /**
27
+ * The custom property behind every motion token.
28
+ *
29
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
30
+ */
31
+ export declare const motions: {
32
+ readonly durationFast: "--skin--duration-fast";
33
+ readonly durationNormal: "--skin--duration-normal";
34
+ readonly durationSlow: "--skin--duration-slow";
35
+ readonly durationSpin: "--skin--duration-spin";
36
+ readonly easingStandard: "--skin--easing-standard";
37
+ readonly easingEnter: "--skin--easing-enter";
38
+ readonly easingExit: "--skin--easing-exit";
39
+ };
40
+ //# sourceMappingURL=motions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motions.d.ts","sourceRoot":"","sources":["../../src/tokens/motions.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;;;;;CAWV,CAAC"}
@@ -0,0 +1,55 @@
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
+ * Motion tokens.
18
+ *
19
+ * Names how long a change takes and how it accelerates, by kind rather than by number, retuned from one place.
20
+ *
21
+ * @remarks
22
+ *
23
+ * **Durations** — `durationFast` is for a change the eye should not have to wait for, a hover or a press;
24
+ * `durationNormal` for one that has to be followed, a panel opening or a row expanding; `durationSlow` for one
25
+ * covering the viewport.
26
+ *
27
+ * **Spinning** — `durationSpin` is the period of one turn of a busy mark, read with `linear` timing over an
28
+ * `infinite` count. It stands apart from the steps above: a busy mark that stops turning stops saying it is busy.
29
+ *
30
+ * **Easings** — `easingEnter` decelerates, for a thing arriving, and `easingExit` accelerates, for a thing leaving,
31
+ * so the two read as opposite halves of the same gesture. `easingStandard` does both, for a thing that stays and
32
+ * merely moves.
33
+ *
34
+ * **Reduced motion** — every duration but `durationSpin` collapses to zero under `prefers-reduced-motion: reduce`, so
35
+ * a transition stated through these tokens honours the preference with no rule of its own. An animation whose
36
+ * duration is written as a literal opts out of that and owes its own media query, which is the reason to state it as
37
+ * a token. `durationSpin` keeps its period under the preference, so a busy mark keeps turning while work is pending.
38
+ *
39
+ * @module motions
40
+ */
41
+ /**
42
+ * The custom property behind every motion token.
43
+ *
44
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
45
+ */
46
+ export const motions = {
47
+ durationFast: "--skin--duration-fast",
48
+ durationNormal: "--skin--duration-normal",
49
+ durationSlow: "--skin--duration-slow",
50
+ durationSpin: "--skin--duration-spin",
51
+ easingStandard: "--skin--easing-standard",
52
+ easingEnter: "--skin--easing-enter",
53
+ easingExit: "--skin--easing-exit"
54
+ };
55
+ //# sourceMappingURL=motions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motions.js","sourceRoot":"","sources":["../../src/tokens/motions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IAEtB,YAAY,EAAE,uBAAuB;IACrC,cAAc,EAAE,yBAAyB;IACzC,YAAY,EAAE,uBAAuB;IACrC,YAAY,EAAE,uBAAuB;IAErC,cAAc,EAAE,yBAAyB;IACzC,WAAW,EAAE,sBAAsB;IACnC,UAAU,EAAE,qBAAqB;CAExB,CAAC"}
@@ -0,0 +1,41 @@
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
+ * How far a thing present but not available fades, taking along the border, icon and contents a colour role misses.
19
+ *
20
+ * The three steps are a ladder of reach. Content being replaced fades least, since it is still worth reading while it
21
+ * is on its way out. A disabled control fades further, being there to be understood rather than read. A region put out
22
+ * of reach fades furthest of all: nothing in it is offered, and what a reader is left with is where it stood.
23
+ */
24
+
25
+ @property --skin--opacity-disabled {
26
+ syntax: "<number>";
27
+ inherits: true;
28
+ initial-value: 0.4;
29
+ }
30
+
31
+ @property --skin--opacity-loading {
32
+ syntax: "<number>";
33
+ inherits: true;
34
+ initial-value: 0.6;
35
+ }
36
+
37
+ @property --skin--opacity-locked {
38
+ syntax: "<number>";
39
+ inherits: true;
40
+ initial-value: 0.3;
41
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Opacity tokens.
3
+ *
4
+ * Names how far a thing present but not available fades, so a composite dims at once rather than part by part.
5
+ *
6
+ * @remarks
7
+ *
8
+ * **Reach** — fading the container is what a colour role cannot do: {@link colors `colorDisabled`} settles the text
9
+ * of a disabled control, while `opacityDisabled` carries its border, its icon and whatever it encloses along. A
10
+ * control whose parts are all tokenised takes the role, and one enclosing arbitrary content takes the token.
11
+ *
12
+ * **Contrast** — a faded thing is exempt from the contrast budget only because it is also inert. Anything a reader is
13
+ * still expected to act on, or to read, states its colour through a role instead and keeps its ratio.
14
+ *
15
+ * **Steps** — the three steps are a ladder of reach: `opacityLoading` is lightest, content being replaced being still worth
16
+ * reading while it is on its way out; `opacityDisabled` goes further, a disabled control being there to be understood
17
+ * rather than read; `opacityLocked` goes furthest, a region put out of reach offering nothing, so what a reader is
18
+ * left with is where it stood.
19
+ *
20
+ * @module opacities
21
+ */
22
+ /**
23
+ * The custom property behind every opacity token.
24
+ *
25
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
26
+ */
27
+ export declare const opacities: {
28
+ readonly opacityDisabled: "--skin--opacity-disabled";
29
+ readonly opacityLoading: "--skin--opacity-loading";
30
+ readonly opacityLocked: "--skin--opacity-locked";
31
+ };
32
+ //# sourceMappingURL=opacities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opacities.d.ts","sourceRoot":"","sources":["../../src/tokens/opacities.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;CAMZ,CAAC"}
@@ -0,0 +1,47 @@
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
+ * Opacity tokens.
18
+ *
19
+ * Names how far a thing present but not available fades, so a composite dims at once rather than part by part.
20
+ *
21
+ * @remarks
22
+ *
23
+ * **Reach** — fading the container is what a colour role cannot do: {@link colors `colorDisabled`} settles the text
24
+ * of a disabled control, while `opacityDisabled` carries its border, its icon and whatever it encloses along. A
25
+ * control whose parts are all tokenised takes the role, and one enclosing arbitrary content takes the token.
26
+ *
27
+ * **Contrast** — a faded thing is exempt from the contrast budget only because it is also inert. Anything a reader is
28
+ * still expected to act on, or to read, states its colour through a role instead and keeps its ratio.
29
+ *
30
+ * **Steps** — the three steps are a ladder of reach: `opacityLoading` is lightest, content being replaced being still worth
31
+ * reading while it is on its way out; `opacityDisabled` goes further, a disabled control being there to be understood
32
+ * rather than read; `opacityLocked` goes furthest, a region put out of reach offering nothing, so what a reader is
33
+ * left with is where it stood.
34
+ *
35
+ * @module opacities
36
+ */
37
+ /**
38
+ * The custom property behind every opacity token.
39
+ *
40
+ * Narrowed to literals, so the design system contract can name the tokens and the custom properties they resolve to.
41
+ */
42
+ export const opacities = {
43
+ opacityDisabled: "--skin--opacity-disabled",
44
+ opacityLoading: "--skin--opacity-loading",
45
+ opacityLocked: "--skin--opacity-locked"
46
+ };
47
+ //# sourceMappingURL=opacities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opacities.js","sourceRoot":"","sources":["../../src/tokens/opacities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IAExB,eAAe,EAAE,0BAA0B;IAC3C,cAAc,EAAE,yBAAyB;IACzC,aAAa,EAAE,wBAAwB;CAE9B,CAAC"}