unholy-design-tokens 1.0.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.
Files changed (111) hide show
  1. package/.github/workflows/lint-format-build.yml +35 -0
  2. package/.github/workflows/publish_release.yml +18 -0
  3. package/.prettierrc +9 -0
  4. package/ANALOGY_HOUSE.md +139 -0
  5. package/ANALOGY_I18NEXT.md +160 -0
  6. package/LICENSE +201 -0
  7. package/README.md +90 -0
  8. package/WHY_THIS_EXISTS.md +74 -0
  9. package/bin/build-tokens.ts +34 -0
  10. package/build/css/bg/bg.css +60 -0
  11. package/build/css/border/border.css +51 -0
  12. package/build/css/colors.css +204 -0
  13. package/build/css/conditional.css +8 -0
  14. package/build/css/cube/cube.block.css +18 -0
  15. package/build/css/cube/cube.composition.css +16 -0
  16. package/build/css/cube/cube.utility.css +185 -0
  17. package/build/css/font/font.css +24 -0
  18. package/build/css/space.css +20 -0
  19. package/build/css/text/text.css +48 -0
  20. package/build/css/themes/private-theme.css +228 -0
  21. package/build/css/themes/public-theme.css +228 -0
  22. package/build/css/variant/variant.css +42 -0
  23. package/build/css/variants.css +167 -0
  24. package/build/types/theme.d.ts +932 -0
  25. package/build/types/tokens.ts +653 -0
  26. package/dist/bin/build-tokens.js +27 -0
  27. package/dist/scripts/build-style-dictionary.js +32 -0
  28. package/dist/scripts/generate-typography-tokens.js +125 -0
  29. package/dist/src/colors/color.config.js +45 -0
  30. package/dist/src/colors/color.filter.js +19 -0
  31. package/dist/src/colors/color.formatter.js +25 -0
  32. package/dist/src/colors/index.js +2 -0
  33. package/dist/src/cube-css/cube.config.js +42 -0
  34. package/dist/src/cube-css/cube.formatter.js +89 -0
  35. package/dist/src/style-dictionary.config.js +143 -0
  36. package/dist/src/type-declarations/type-declarations.config.js +29 -0
  37. package/dist/src/type-declarations/type-declarations.formatter.js +111 -0
  38. package/dist/src/utils/helpers.js +9 -0
  39. package/dist/src/utils/index.js +4 -0
  40. package/dist/src/utils/template.js +83 -0
  41. package/dist/src/utils/tokens.js +80 -0
  42. package/dist/src/utils/utopia.js +19 -0
  43. package/eslint.config.js +67 -0
  44. package/package.json +60 -0
  45. package/scripts/build-style-dictionary.ts +44 -0
  46. package/scripts/generate-typography-tokens.ts +138 -0
  47. package/src/LICENSE +201 -0
  48. package/src/README.md +88 -0
  49. package/src/colors/color.config.ts +48 -0
  50. package/src/colors/color.filter.ts +28 -0
  51. package/src/colors/color.formatter.ts +43 -0
  52. package/src/colors/index.ts +6 -0
  53. package/src/cube-css/cube.config.ts +50 -0
  54. package/src/cube-css/cube.formatter.ts +104 -0
  55. package/src/formatters/spacing.js +95 -0
  56. package/src/style-dictionary.config.ts +151 -0
  57. package/src/theme/README.md +256 -0
  58. package/src/theme/cube-theme-addon.js +44 -0
  59. package/src/theme/helper.js +38 -0
  60. package/src/theme/index.js +6 -0
  61. package/src/theme/theme.config.js +42 -0
  62. package/src/theme/theme.filter.js +42 -0
  63. package/src/theme/theme.formatter.js +71 -0
  64. package/src/tokens/1 - primitives/README.md +58 -0
  65. package/src/tokens/1 - primitives/border.json +54 -0
  66. package/src/tokens/1 - primitives/breakpoint.json +10 -0
  67. package/src/tokens/1 - primitives/color-pool.json +266 -0
  68. package/src/tokens/1 - primitives/color.json +266 -0
  69. package/src/tokens/1 - primitives/font-scale.json +27 -0
  70. package/src/tokens/1 - primitives/font.json +23 -0
  71. package/src/tokens/1 - primitives/shadow.json +26 -0
  72. package/src/tokens/1 - primitives/space.json +27 -0
  73. package/src/tokens/2 - semantic/README.md +49 -0
  74. package/src/tokens/2 - semantic/border.json +27 -0
  75. package/src/tokens/2 - semantic/color.json +263 -0
  76. package/src/tokens/2 - semantic/details.md +1 -0
  77. package/src/tokens/2 - semantic/layout.json +52 -0
  78. package/src/tokens/2 - semantic/radius.json +13 -0
  79. package/src/tokens/2 - semantic/shadow.json +19 -0
  80. package/src/tokens/2 - semantic/spacing.json +25 -0
  81. package/src/tokens/3 - intent/README.md +43 -0
  82. package/src/tokens/3 - intent/background.json +135 -0
  83. package/src/tokens/3 - intent/color.json +265 -0
  84. package/src/tokens/3 - intent/font.json +61 -0
  85. package/src/tokens/3 - intent/text +67 -0
  86. package/src/tokens/README.md +176 -0
  87. package/src/tokens/color/brand.json +316 -0
  88. package/src/tokens/component/theming.json +69 -0
  89. package/src/tokens/conditional.json +40 -0
  90. package/src/tokens/custom/4 - (OPTIONAL) cube css/README.md +38 -0
  91. package/src/tokens/custom/4 - (OPTIONAL) cube css/block.json +24 -0
  92. package/src/tokens/custom/4 - (OPTIONAL) cube css/composition.json +26 -0
  93. package/src/tokens/custom/4 - (OPTIONAL) cube css/global.json +15 -0
  94. package/src/tokens/custom/4 - (OPTIONAL) cube css/utility.json +224 -0
  95. package/src/tokens/custom/OKlch/color.json +61 -0
  96. package/src/tokens/custom/OKlch/state.json +107 -0
  97. package/src/tokens/custom/OKlch/theme-color.json +34 -0
  98. package/src/tokens/custom/OKlch/variant.json +67 -0
  99. package/src/tokens/custom/components/highlighted.json +16 -0
  100. package/src/tokens/state.js +29 -0
  101. package/src/tokens/theme-color.json +34 -0
  102. package/src/type-declarations/type-declarations.config.ts +34 -0
  103. package/src/type-declarations/type-declarations.formatter.ts +122 -0
  104. package/src/utils/helpers.ts +11 -0
  105. package/src/utils/index.ts +4 -0
  106. package/src/utils/template.ts +110 -0
  107. package/src/utils/tokens.ts +95 -0
  108. package/src/utils/utopia.ts +36 -0
  109. package/tailwind.md +720 -0
  110. package/tsconfig.json +19 -0
  111. package/turbowatch.ts +14 -0
@@ -0,0 +1,224 @@
1
+ {
2
+ "cube": {
3
+ "utility": {
4
+ "margin": {
5
+ "t-0": { "value": "margin-block-start: 0" },
6
+ "t-xs": { "value": "margin-block-start: var(--spacing-xs)" },
7
+ "t-sm": { "value": "margin-block-start: var(--spacing-sm)" },
8
+ "t-md": { "value": "margin-block-end: var(--spacing-md)" },
9
+ "t-lg": { "value": "margin-block-end: var(--spacing-lg)" },
10
+ "t-xl": { "value": "margin-block-start: var(--spacing-xl)" },
11
+ "b-0": { "value": "margin-block-end: 0" },
12
+ "b-xs": { "value": "margin-block-end: var(--spacing-xs)" },
13
+ "b-sm": { "value": "margin-block-end: var(--spacing-sm)" },
14
+ "b-md": { "value": "margin-block-end: var(--spacing-md)" },
15
+ "b-lg": { "value": "margin-block-end: var(--spacing-lg)" },
16
+ "b-xl": { "value": "margin-block-end: var(--spacing-xl)" },
17
+ "auto": { "value": "margin: auto" }
18
+ },
19
+ "position": {
20
+ "relative": { "value": "position: relative" },
21
+ "absolute": { "value": "position: absolute" },
22
+ "fixed": { "value": "position: fixed" },
23
+ "top-0": { "value": "top: 0" },
24
+ "right-0": { "value": "right: 0" },
25
+ "bottom-0": { "value": "bottom: 0" },
26
+ "left-0": { "value": "left: 0" }
27
+ },
28
+ "display": {
29
+ "none": { "value": "display: none" },
30
+ "block": { "value": "display: block" },
31
+ "inline-block": { "value": "display: inline-block" },
32
+ "grid": { "value": "display: grid" },
33
+ "flex": { "value": "display: flex" },
34
+ "sticky": { "value": "position: sticky" }
35
+ },
36
+ "align": {
37
+ "start": { "value": "--layout-align: flex-start" },
38
+ "end": { "value": "--layout-align: flex-end" },
39
+ "center": { "value": "--layout-align: center" }
40
+ },
41
+ "justify": {
42
+ "start": { "value": "--layout-justify: flex-start" },
43
+ "end": { "value": "--layout-justify: flex-end" },
44
+ "center": { "value": "--layout-justify: center" },
45
+ "between": { "value": "--layout-justify: space-between" }
46
+ },
47
+ "flex": {
48
+ "column": { "value": "--layout-direction: column" },
49
+ "row": { "value": "--layout-direction: row" },
50
+ "wrap": { "value": "flex-wrap: wrap" }
51
+ },
52
+ "gap": {
53
+ "xs": { "value": "gap: var(--spacing-xs)" },
54
+ "sm": { "value": "gap: var(--spacing-sm)" },
55
+ "md": { "value": "gap: var(--spacing-md)" },
56
+ "lg": { "value": "gap: var(--spacing-lg)" },
57
+ "xl": { "value": "gap: var(--spacing-xl)" }
58
+ },
59
+ "padding": {
60
+ "xs": { "value": "padding: var(--spacing-xs)" },
61
+ "sm": { "value": "padding: var(--spacing-sm)" },
62
+ "md": { "value": "padding: var(--spacing-md)" },
63
+ "lg": { "value": "padding: var(--spacing-lg)" },
64
+ "xl": { "value": "padding: var(--spacing-xl)" },
65
+ "x-0": { "value": "padding-inline: 0" },
66
+ "x-xs": { "value": "padding-inline: var(--spacing-xs)" },
67
+ "x-sm": { "value": "padding-inline: var(--spacing-sm)" },
68
+ "x-md": { "value": "padding-inline: var(--spacing-md)" },
69
+ "x-lg": { "value": "padding-inline: var(--spacing-lg)" },
70
+ "x-xl": { "value": "padding-inline: var(--spacing-xl)" },
71
+ "y-0": { "value": "padding-block: 0" },
72
+ "y-xs": { "value": "padding-block: var(--spacing-xs)" },
73
+ "y-sm": { "value": "padding-block: var(--spacing-sm)" },
74
+ "y-md": { "value": "padding-block: var(--spacing-md)" },
75
+ "y-lg": { "value": "padding-block: var(--spacing-lg)" },
76
+ "y-xl": { "value": "padding-block: var(--spacing-xl)" },
77
+
78
+ "auto": { "value": "padding: 0" },
79
+
80
+ // Specific sides
81
+ "top-0": { "value": "padding-top: 0" },
82
+ "top-xs": { "value": "padding-top: var(--spacing-xs)" },
83
+ "top-sm": { "value": "padding-top: var(--spacing-sm)" },
84
+ "top-md": { "value": "padding-top: var(--spacing-md)" },
85
+ "top-lg": { "value": "padding-top: var(--spacing-lg)" },
86
+ "top-xl": { "value": "padding-top: var(--spacing-xl)" },
87
+
88
+ "bottom-0": { "value": "padding-bottom: 0" }
89
+ },
90
+
91
+ "text": {
92
+ "center": { "value": "text-align: center" },
93
+ "dim": { "value": "opacity: 0.7" }
94
+ },
95
+ "border": {
96
+ "solid": { "value": "border-style: solid" },
97
+ "dashed": { "value": "border-style: dashed" },
98
+ "dotted": { "value": "border-style: dotted" },
99
+ "none": { "value": "border-style: none" },
100
+ "primary": {
101
+ "value": "border-color: var(--color-border-primary)"
102
+ },
103
+ "secondary": {
104
+ "value": "border-color: var(--color-border-secondary)"
105
+ },
106
+ "accent": {
107
+ "value": "border-color: var(--color-border-accent)"
108
+ },
109
+ "neutral": {
110
+ "value": "border-color: var(--color-border-neutral)"
111
+ },
112
+ "info": {
113
+ "value": "border-color: var(--color-border-info)"
114
+ },
115
+ "success": {
116
+ "value": "border-color: var(--color-border-success)"
117
+ },
118
+ "top": {
119
+ "value": "border-top-width: var(--border-width-default)"
120
+ },
121
+ "bottom": {
122
+ "value": "border-bottom-width: var(--border-width-default)"
123
+ },
124
+ "left": {
125
+ "value": "border-left-width: var(--border-width-default)"
126
+ },
127
+ "right": {
128
+ "value": "border-right-width: var(--border-width-default)"
129
+ },
130
+ "all": {
131
+ "value": "border-width: var(--border-width-default)"
132
+ },
133
+ "theme": {
134
+ "light": {
135
+ "value": "border: var(--border-width-small) solid var(--theme-color)"
136
+ },
137
+ "medium": {
138
+ "value": "border: var(--border-width-medium) solid var(--theme-color)"
139
+ },
140
+ "large": {
141
+ "value": "border: var(--border-width-large) solid var(--theme-color)"
142
+ },
143
+ "10": {
144
+ "value": "border: var(--border-width-10) solid var(--theme-color)"
145
+ },
146
+ "25": {
147
+ "value": "border: var(--border-width-25) solid var(--theme-color)"
148
+ },
149
+ "50": {
150
+ "value": "border: var(--border-width-50) solid var(--theme-color)"
151
+ },
152
+ "75": {
153
+ "value": "border: var(--border-width-75) solid var(--theme-color)"
154
+ },
155
+ "100": {
156
+ "value": "border: var(--border-width-100) solid var(--theme-color)"
157
+ }
158
+ },
159
+ "width": {
160
+ "xsmall": {
161
+ "value": "border-width: var(--border-width-xsmall)"
162
+ },
163
+ "small": {
164
+ "value": "border-width: var(--border-width-small)"
165
+ },
166
+ "medium": {
167
+ "value": "border-width: var(--border-width-medium)"
168
+ },
169
+ "large": {
170
+ "value": "border-width: var(--border-width-large)"
171
+ }
172
+ }
173
+ },
174
+ "radius": {
175
+ "light": { "value": "border-radius: var(--radius-light)" },
176
+ "medium": { "value": "border-radius: var(--radius-medium)" },
177
+ "heavy": { "value": "border-radius: var(--radius-heavy)" }
178
+ },
179
+ "height": {
180
+ "auto": { "value": "height: auto" },
181
+ "full": { "value": "height: 100%" },
182
+ "half": { "value": "height: 50%" },
183
+ "quarter": { "value": "height: 25%" },
184
+ "screen": { "value": "height: 100svh" }
185
+ },
186
+ "width": {
187
+ "auto": { "value": "width: auto" },
188
+ "full": { "value": "width: 100%" },
189
+ "half": { "value": "width: 50%" },
190
+ "quarter": { "value": "width: 25%" },
191
+ "screen": { "value": "width: 100svw" }
192
+ },
193
+ "overflow": {
194
+ "auto": { "value": "overflow: auto" },
195
+ "hidden": { "value": "overflow: hidden" },
196
+ "scroll": { "value": "overflow: scroll" },
197
+ "visible": { "value": "overflow: visible" },
198
+ "x-hidden": { "value": "overflow-x: hidden" },
199
+ "y-hidden": { "value": "overflow-y: hidden" }
200
+ },
201
+ "bg": {
202
+ "primary": { "value": "background-color: var(--color-bg-primary)" },
203
+ "secondary": { "value": "background-color: var(--color-bg-secondary)" },
204
+ "accent": { "value": "background-color: var(--color-bg-accent)" },
205
+ "accent-subtle": { "value": "background-color: var(--color-bg-accent-subtle)" },
206
+ "neutral": { "value": "background-color: var(--color-bg-neutral)" },
207
+ "page": { "value": "background-color: var(--color-bg-page)" },
208
+ "subtle": { "value": "background-color: var(--color-bg-subtle)" },
209
+ "elevated": { "value": "background-color: var(--color-bg-elevated)" },
210
+ "inset": { "value": "background-color: var(--color-bg-inset)" },
211
+ "info": { "value": "background-color: var(--color-bg-info)" },
212
+ "success": { "value": "background-color: var(--color-bg-success)" }
213
+ }
214
+ // "keyframes": {
215
+ // "checked-in": {
216
+ // "value": "@keyframes checked-in \\{ from \\{ transform: scale(0); \\} to \\{ transform: scale(1); \\} \\}"
217
+ // },
218
+ // "checked-out": {
219
+ // "value": "@keyframes checked-out \\{ from \\{ transform: scale(1); \\} to \\{ transform: scale(0); \\} \\}"
220
+ // }
221
+ // }
222
+ }
223
+ }
224
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "color": {
3
+ "primary": {
4
+ "bg": {
5
+ "hue": { "value": "0deg" },
6
+ "lightness": { "value": "0%" },
7
+ "opacity": { "value": 1 }
8
+ },
9
+ "border": {
10
+ "hue": { "value": "0deg" },
11
+ "lightness": { "value": "0%" },
12
+ "opacity": { "value": 1 }
13
+ },
14
+ "text": {
15
+ "hue": { "value": "0deg" },
16
+ "lightness": { "value": "0%" },
17
+ "opacity": { "value": 1 }
18
+ },
19
+ "attribute": {
20
+ "type": "lolol"
21
+ }
22
+ },
23
+ "secondary": {
24
+ "bg": {
25
+ "hue": { "value": "0deg" },
26
+ "lightness": { "value": "0%" },
27
+ "opacity": { "value": 1 }
28
+ },
29
+ "border": {
30
+ "hue": { "value": "0deg" },
31
+ "lightness": { "value": "0%" },
32
+ "opacity": { "value": 1 }
33
+ },
34
+ "text": {
35
+ "hue": { "value": "0deg" },
36
+ "lightness": { "value": "0%" },
37
+ "opacity": { "value": 1 }
38
+ }
39
+ },
40
+ "danger": {
41
+ "bg": {
42
+ "hue": { "value": "0deg" },
43
+ "lightness": { "value": "0%" },
44
+ "opacity": { "value": 1 }
45
+ },
46
+ "border": {
47
+ "hue": { "value": "0deg" },
48
+ "lightness": { "value": "0%" },
49
+ "opacity": { "value": 1 }
50
+ },
51
+ "text": {
52
+ "hue": { "value": "0deg" },
53
+ "lightness": { "value": "0%" },
54
+ "opacity": { "value": 1 }
55
+ }
56
+ },
57
+ "attributes": {
58
+ "type": "variants"
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "state": {
3
+ "base": {
4
+ "bg": {
5
+ "lightness": { "value": 0 },
6
+ "chroma": { "value": 0 },
7
+ "hue": { "value": 0 },
8
+ "opacity": { "value": 1 }
9
+ },
10
+ "border": {
11
+ "lightness": { "value": 0 },
12
+ "chroma": { "value": 0 },
13
+ "hue": { "value": 0 },
14
+ "opacity": { "value": 1 }
15
+ },
16
+ "text": {
17
+ "lightness": { "value": 0 },
18
+ "chroma": { "value": 0 },
19
+ "hue": { "value": 0 },
20
+ "opacity": { "value": 1 }
21
+ }
22
+ },
23
+ "hover": {
24
+ "bg": {
25
+ "lightness": { "value": 0.05 },
26
+ "chroma": { "value": 0 },
27
+ "hue": { "value": 0 },
28
+ "opacity": { "value": 1 }
29
+ },
30
+ "border": {
31
+ "lightness": { "value": 0 },
32
+ "chroma": { "value": 0 },
33
+ "hue": { "value": 0 },
34
+ "opacity": { "value": 1 }
35
+ },
36
+ "text": {
37
+ "lightness": { "value": 0 },
38
+ "chroma": { "value": 0 },
39
+ "hue": { "value": 0 },
40
+ "opacity": { "value": 1 }
41
+ }
42
+ },
43
+ "active": {
44
+ "bg": {
45
+ "lightness": { "value": 0.1 },
46
+ "chroma": { "value": 0 },
47
+ "hue": { "value": 0 },
48
+ "opacity": { "value": 1 }
49
+ },
50
+ "border": {
51
+ "lightness": { "value": 0 },
52
+ "chroma": { "value": 0 },
53
+ "hue": { "value": 0 },
54
+ "opacity": { "value": 1 }
55
+ },
56
+ "text": {
57
+ "lightness": { "value": 0 },
58
+ "chroma": { "value": 0 },
59
+ "hue": { "value": 0 },
60
+ "opacity": { "value": 1 }
61
+ }
62
+ },
63
+ "focus": {
64
+ "bg": {
65
+ "lightness": { "value": 0.05 },
66
+ "chroma": { "value": 0 },
67
+ "hue": { "value": 0 },
68
+ "opacity": { "value": 1 }
69
+ },
70
+ "border": {
71
+ "lightness": { "value": 0 },
72
+ "chroma": { "value": 0 },
73
+ "hue": { "value": 0 },
74
+ "opacity": { "value": 1 }
75
+ },
76
+ "text": {
77
+ "lightness": { "value": 0 },
78
+ "chroma": { "value": 0 },
79
+ "hue": { "value": 0 },
80
+ "opacity": { "value": 1 }
81
+ }
82
+ },
83
+ "disabled": {
84
+ "bg": {
85
+ "lightness": { "value": 0 },
86
+ "chroma": { "value": 0 },
87
+ "hue": { "value": 0 },
88
+ "opacity": { "value": 1 }
89
+ },
90
+ "border": {
91
+ "lightness": { "value": 0 },
92
+ "chroma": { "value": 0 },
93
+ "hue": { "value": 0 },
94
+ "opacity": { "value": 1 }
95
+ },
96
+ "text": {
97
+ "lightness": { "value": 0 },
98
+ "chroma": { "value": 0 },
99
+ "hue": { "value": 0 },
100
+ "opacity": { "value": 1 }
101
+ }
102
+ },
103
+ "attributes": {
104
+ "type": "variants"
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "color": {
3
+ "bg": {
4
+ "hue": {
5
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
6
+ },
7
+ "h": { "value": "var(--theme-color-bg-hue)" },
8
+ "lightness": {
9
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
10
+ },
11
+ "l": { "value": "var(--theme-color-bg-lightness)" },
12
+ "opacity": { "value": "var(--color-primary-opacity)" },
13
+ "o": { "value": "var(--theme-color-bg-opacity)" }
14
+ },
15
+ "border": {
16
+ "hue": {
17
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
18
+ },
19
+ "lightness": {
20
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
21
+ },
22
+ "opacity": { "value": "var(--color-primary-opacity)" }
23
+ },
24
+ "text": {
25
+ "hue": {
26
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
27
+ },
28
+ "lightness": {
29
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
30
+ },
31
+ "opacity": { "value": "var(--color-primary-opacity)" }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "variant": {
3
+ "contained": {
4
+ "bg": {
5
+ "lightness": { "value": 0 },
6
+ "chroma": { "value": 0 },
7
+ "hue": { "value": 0 },
8
+ "opacity": { "value": 1 }
9
+ },
10
+ "border": {
11
+ "lightness": { "value": 0 },
12
+ "chroma": { "value": 0 },
13
+ "hue": { "value": 0 },
14
+ "opacity": { "value": 1 }
15
+ },
16
+ "text": {
17
+ "lightness": { "value": 0 },
18
+ "chroma": { "value": 0 },
19
+ "hue": { "value": 0 },
20
+ "opacity": { "value": 1 }
21
+ }
22
+ },
23
+ "outlined": {
24
+ "bg": {
25
+ "lightness": { "value": 0 },
26
+ "chroma": { "value": 0 },
27
+ "hue": { "value": 0 },
28
+ "opacity": { "value": 0 }
29
+ },
30
+ "border": {
31
+ "lightness": { "value": 0 },
32
+ "chroma": { "value": 0 },
33
+ "hue": { "value": 0 },
34
+ "opacity": { "value": 1 }
35
+ },
36
+ "text": {
37
+ "lightness": { "value": 0 },
38
+ "chroma": { "value": 0 },
39
+ "hue": { "value": 0 },
40
+ "opacity": { "value": 1 }
41
+ }
42
+ },
43
+ "text": {
44
+ "bg": {
45
+ "lightness": { "value": 0 },
46
+ "chroma": { "value": 0 },
47
+ "hue": { "value": 0 },
48
+ "opacity": { "value": 0 }
49
+ },
50
+ "border": {
51
+ "lightness": { "value": 0 },
52
+ "chroma": { "value": 0 },
53
+ "hue": { "value": 0 },
54
+ "opacity": { "value": 0 }
55
+ },
56
+ "text": {
57
+ "lightness": { "value": 0 },
58
+ "chroma": { "value": 0 },
59
+ "hue": { "value": 0 },
60
+ "opacity": { "value": 1 }
61
+ }
62
+ },
63
+ "attributes": {
64
+ "type": "variants"
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "highlighted-text": {
3
+ "gap": {
4
+ "min": { "value": "var(--_spacing-xxs)" },
5
+ "max": { "value": "var(--_spacing-lg)" },
6
+ "scaler": { "value": "1.4svw" },
7
+ "left": {
8
+ "value": "clamp(var(--_highlighted-text-gap-min), var(--_highlighted-text-gap-scaler), var(--_highlighted-text-gap-max))"
9
+ }
10
+ }
11
+ },
12
+ "attributes": {
13
+ "category": "component",
14
+ "tokenTier": "component"
15
+ }
16
+ }
@@ -0,0 +1,29 @@
1
+ export default {
2
+ state: {
3
+ base: {
4
+ bg: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
5
+ border: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
6
+ text: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
7
+ },
8
+ hover: {
9
+ bg: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
10
+ border: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
11
+ text: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
12
+ },
13
+ active: {
14
+ bg: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
15
+ border: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
16
+ text: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
17
+ },
18
+ focus: {
19
+ bg: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
20
+ border: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
21
+ text: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
22
+ },
23
+ disabled: {
24
+ bg: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
25
+ border: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
26
+ text: { hue: 0, saturation: 0, lightness: 0, opacity: 1 },
27
+ },
28
+ },
29
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "color": {
3
+ "bg": {
4
+ "hue": {
5
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
6
+ },
7
+ "h": { "value": "var(--theme-color-bg-hue)" },
8
+ "lightness": {
9
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
10
+ },
11
+ "l": { "value": "var(--theme-color-bg-lightness)" },
12
+ "opacity": { "value": "var(--color-primary-opacity)" },
13
+ "o": { "value": "var(--theme-color-bg-opacity)" }
14
+ },
15
+ "border": {
16
+ "hue": {
17
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
18
+ },
19
+ "lightness": {
20
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
21
+ },
22
+ "opacity": { "value": "var(--color-primary-opacity)" }
23
+ },
24
+ "text": {
25
+ "hue": {
26
+ "value": "var(--color-primary-hue) * var(--primary, 1) + var(--color-secondary-hue) * var(--secondary, 0) + var(--color-danger-hue) * var(--danger, 0)"
27
+ },
28
+ "lightness": {
29
+ "value": "var(--color-primary-lightness) * var(--primary, 1) + var(--color-secondary-lightness) * var(--secondary, 0) + var(--color-danger-lightness) * var(--danger, 0)"
30
+ },
31
+ "opacity": { "value": "var(--color-primary-opacity)" }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,34 @@
1
+ import StyleDictionary from 'style-dictionary'
2
+ import {
3
+ tokensDeclarationFormatter,
4
+ typesDeclarationFormatter,
5
+ } from './type-declarations.formatter'
6
+
7
+ StyleDictionary.registerFormat(typesDeclarationFormatter)
8
+ StyleDictionary.registerFormat(tokensDeclarationFormatter)
9
+
10
+ export default {
11
+ ts: {
12
+ // transformGroup: "js",
13
+ // transformGroup: "js",
14
+ buildPath: 'types/',
15
+ files: [
16
+ {
17
+ destination: 'theme.d.ts',
18
+ format: 'typescript/types-declaration',
19
+ transformGroup: 'js',
20
+ },
21
+ ],
22
+ },
23
+ // Tokens declarations
24
+ tokens: {
25
+ transformGroup: 'css',
26
+ buildPath: 'types/',
27
+ files: [
28
+ {
29
+ destination: 'tokens.ts',
30
+ format: 'typescript/tokens-declaration',
31
+ },
32
+ ],
33
+ },
34
+ }