@kajabi-ui/styles 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -82,6 +82,22 @@ For more granular imports of specific components:
82
82
  - Motion and animations
83
83
  - Component-specific tokens (button, chip, etc.)
84
84
 
85
+ ## Lint Mappings (for Tooling)
86
+
87
+ This package also exports token mappings for linting tools that enforce semantic token usage:
88
+
89
+ ```javascript
90
+ // ESLint/Stylelint plugins can import this
91
+ const tokenMappings = require('@kajabi-ui/styles/lint-mappings');
92
+ ```
93
+
94
+ The `lint-mappings` export provides:
95
+ - **hexToCore**: Hex color → core token mappings (e.g., `#343332` → `grey-900`)
96
+ - **mappings**: Context-aware core → semantic token mappings (text, background, border)
97
+ - **ambiguous**: Tokens with multiple semantic meanings based on context
98
+
99
+ This is used by Pine color linting rules in [pine](https://github.com/Kajabi/pine) and [kajabi-products](https://github.com/Kajabi/kajabi-products) to ensure developers use semantic tokens for proper dark mode support.
100
+
85
101
  ## Project Structure
86
102
 
87
103
  ```
@@ -0,0 +1,306 @@
1
+ {
2
+ "mappings": {
3
+ "text": {
4
+ "grey-900": "text",
5
+ "grey-950": "text-hover",
6
+ "grey-500": "text-disabled",
7
+ "grey-700": "text-readonly",
8
+ "purple-900": "text-accent",
9
+ "purple-300": "text-accent-disabled",
10
+ "purple-950": "text-accent-hover",
11
+ "red-900": "text-danger",
12
+ "red-300": "text-danger-disabled",
13
+ "red-950": "text-danger-hover",
14
+ "blue-900": "text-info",
15
+ "blue-300": "text-info-disabled",
16
+ "blue-950": "text-info-hover",
17
+ "grey-800": "text-message",
18
+ "red-600": "text-message-danger",
19
+ "grey-600": "text-message-disabled",
20
+ "grey-400": "text-placeholder-disabled",
21
+ "white": "text-primary",
22
+ "grey-300": "text-subtle-disabled",
23
+ "black": "text-emphasis",
24
+ "grey-100": "text-inverse",
25
+ "grey-150": "text-inverse-secondary",
26
+ "green-900": "text-success",
27
+ "green-300": "text-success-disabled",
28
+ "green-950": "text-success-hover",
29
+ "yellow-900": "text-warning",
30
+ "yellow-300": "text-warning-disabled",
31
+ "yellow-950": "text-warning-hover"
32
+ },
33
+ "background": {
34
+ "grey-100": "background-app",
35
+ "grey-150": "background-muted",
36
+ "grey-900": "background-inverse-app",
37
+ "grey-800": "background-inverse-subtle",
38
+ "grey-700": "background-inverse-muted",
39
+ "black": "background-inverse-container",
40
+ "grey-950": "background-inverse-inset",
41
+ "white": "background-container",
42
+ "grey-050": "background-container-hover",
43
+ "grey-200": "background-inset",
44
+ "grey-300": "background-inset-emphasized"
45
+ },
46
+ "border": {
47
+ "grey-300": "border",
48
+ "grey-400": "border-hover",
49
+ "grey-200": "border-disabled",
50
+ "red-600": "border-danger",
51
+ "red-700": "border-danger-hover"
52
+ }
53
+ },
54
+ "ambiguous": {
55
+ "grey-900": [
56
+ "text",
57
+ "background-inverse-app"
58
+ ],
59
+ "grey-950": [
60
+ "text-hover",
61
+ "background-inverse-inset"
62
+ ],
63
+ "grey-700": [
64
+ "text-readonly",
65
+ "background-inverse-muted"
66
+ ],
67
+ "grey-800": [
68
+ "text-message",
69
+ "background-inverse-subtle"
70
+ ],
71
+ "red-600": [
72
+ "text-message-danger",
73
+ "border-danger"
74
+ ],
75
+ "grey-400": [
76
+ "text-placeholder-disabled",
77
+ "border-hover"
78
+ ],
79
+ "white": [
80
+ "text-primary",
81
+ "background-container"
82
+ ],
83
+ "grey-300": [
84
+ "text-subtle-disabled",
85
+ "background-inset-emphasized",
86
+ "border"
87
+ ],
88
+ "black": [
89
+ "text-emphasis",
90
+ "background-inverse-container"
91
+ ],
92
+ "grey-100": [
93
+ "text-inverse",
94
+ "background-app"
95
+ ],
96
+ "grey-150": [
97
+ "text-inverse-secondary",
98
+ "background-muted"
99
+ ],
100
+ "grey-200": [
101
+ "background-inset",
102
+ "border-disabled"
103
+ ]
104
+ },
105
+ "docsUrl": "https://pine-design-system.netlify.app/?path=/docs/design-tokens-semantic-color--docs",
106
+ "hexToCore": {
107
+ "neutrals": {
108
+ "#fff": "white",
109
+ "#000": "black",
110
+ "#f8f8f8": "grey-100",
111
+ "#f0f0f0": "grey-150",
112
+ "#e4e4e4": "grey-200",
113
+ "#d2d1d1": "grey-300",
114
+ "#bbbab9": "grey-400",
115
+ "#9b9a98": "grey-500",
116
+ "#828180": "grey-600",
117
+ "#6c6a69": "grey-700",
118
+ "#4d4d4c": "grey-800",
119
+ "#343332": "grey-900",
120
+ "#1a1a19": "grey-950",
121
+ "#fcfcfc": "grey-050"
122
+ },
123
+ "blues": {
124
+ "#eff6ff": "blue-100",
125
+ "#dbeafe": "blue-150",
126
+ "#bfdbfe": "blue-200",
127
+ "#93c5fd": "blue-300",
128
+ "#60a5fa": "blue-400",
129
+ "#3b82f6": "blue-500",
130
+ "#2563eb": "blue-600",
131
+ "#1d4ed8": "blue-700",
132
+ "#1e40af": "blue-800",
133
+ "#1e3a8a": "blue-900",
134
+ "#172554": "blue-950",
135
+ "#fafcff": "blue-050"
136
+ },
137
+ "greens": {
138
+ "#edfcf2": "green-100",
139
+ "#d3f8df": "green-150",
140
+ "#aaf0c4": "green-200",
141
+ "#73e2a3": "green-300",
142
+ "#3ccb7f": "green-400",
143
+ "#16b364": "green-500",
144
+ "#099250": "green-600",
145
+ "#087443": "green-700",
146
+ "#095c37": "green-800",
147
+ "#084c2e": "green-900",
148
+ "#052e1c": "green-950",
149
+ "#fbfefc": "green-050"
150
+ },
151
+ "reds": {
152
+ "#fef2f2": "red-100",
153
+ "#fee2e2": "red-150",
154
+ "#fecaca": "red-200",
155
+ "#fca5a5": "red-300",
156
+ "#f87171": "red-400",
157
+ "#ef4444": "red-500",
158
+ "#dc2626": "red-600",
159
+ "#b91c1c": "red-700",
160
+ "#991b1b": "red-800",
161
+ "#7f1d1d": "red-900",
162
+ "#450a0a": "red-950",
163
+ "#fffafa": "red-050"
164
+ },
165
+ "yellows": {
166
+ "#fffbeb": "yellow-100",
167
+ "#fff2c6": "yellow-150",
168
+ "#fee589": "yellow-200",
169
+ "#fed04b": "yellow-300",
170
+ "#fdbb21": "yellow-400",
171
+ "#f79a09": "yellow-500",
172
+ "#db7204": "yellow-600",
173
+ "#b64f07": "yellow-700",
174
+ "#933d0d": "yellow-800",
175
+ "#79330e": "yellow-900",
176
+ "#461902": "yellow-950",
177
+ "#fffefa": "yellow-050"
178
+ },
179
+ "purples": {
180
+ "#eef1ff": "purple-100",
181
+ "#e0e4ff": "purple-150",
182
+ "#c7cdfe": "purple-200",
183
+ "#a4acfd": "purple-300",
184
+ "#8081f9": "purple-400",
185
+ "#6b62f2": "purple-500",
186
+ "#533be5": "purple-600",
187
+ "#4f37cb": "purple-700",
188
+ "#402fa4": "purple-800",
189
+ "#372d82": "purple-900",
190
+ "#221b4b": "purple-950",
191
+ "#fafbff": "purple-050"
192
+ },
193
+ "mercury": {
194
+ "#fff4f1": "mercury-100",
195
+ "#ffeae5": "mercury-150",
196
+ "#fed4cd": "mercury-200",
197
+ "#fdb1a4": "mercury-300",
198
+ "#fb8271": "mercury-400",
199
+ "#ff3e14": "mercury-500",
200
+ "#f02006": "mercury-600",
201
+ "#c71307": "mercury-700",
202
+ "#9e110e": "mercury-800",
203
+ "#7f120f": "mercury-900",
204
+ "#450506": "mercury-950",
205
+ "#fffbfa": "mercury-050"
206
+ },
207
+ "forest": {
208
+ "#effaf6": "forest-100",
209
+ "#d9f2e7": "forest-150",
210
+ "#b5e5d2": "forest-200",
211
+ "#85d0b7": "forest-300",
212
+ "#52b597": "forest-400",
213
+ "#30997d": "forest-500",
214
+ "#23856d": "forest-600",
215
+ "#1a6253": "forest-700",
216
+ "#174e43": "forest-800",
217
+ "#144038": "forest-900",
218
+ "#0a2420": "forest-950",
219
+ "#fbfefd": "forest-050"
220
+ },
221
+ "lime": {
222
+ "#f7fee7": "lime-100",
223
+ "#ecfccb": "lime-150",
224
+ "#d9f99d": "lime-200",
225
+ "#bef264": "lime-300",
226
+ "#a3e635": "lime-400",
227
+ "#84cc16": "lime-500",
228
+ "#65a30d": "lime-600",
229
+ "#4d7c0f": "lime-700",
230
+ "#3f6212": "lime-800",
231
+ "#365314": "lime-900",
232
+ "#1b290a": "lime-950",
233
+ "#fdfffa": "lime-050"
234
+ },
235
+ "magenta": {
236
+ "#fdf4ff": "magenta-100",
237
+ "#fae8ff": "magenta-150",
238
+ "#f5d0fe": "magenta-200",
239
+ "#f0abfc": "magenta-300",
240
+ "#e879f9": "magenta-400",
241
+ "#d946ef": "magenta-500",
242
+ "#c026d3": "magenta-600",
243
+ "#a21caf": "magenta-700",
244
+ "#86198f": "magenta-800",
245
+ "#701a75": "magenta-900",
246
+ "#4a044e": "magenta-950",
247
+ "#fefaff": "magenta-050"
248
+ },
249
+ "pink": {
250
+ "#fdf2f8": "pink-100",
251
+ "#fce7f3": "pink-150",
252
+ "#fbcfe8": "pink-200",
253
+ "#f9a8d4": "pink-300",
254
+ "#f472b6": "pink-400",
255
+ "#ec4899": "pink-500",
256
+ "#db2777": "pink-600",
257
+ "#be185d": "pink-700",
258
+ "#9d174d": "pink-800",
259
+ "#831843": "pink-900",
260
+ "#500724": "pink-950",
261
+ "#fffafa": "pink-050"
262
+ },
263
+ "salmon": {
264
+ "#fff1f2": "salmon-100",
265
+ "#ffe4e6": "salmon-150",
266
+ "#fecdd3": "salmon-200",
267
+ "#fda4af": "salmon-300",
268
+ "#fb7185": "salmon-400",
269
+ "#f43f5e": "salmon-500",
270
+ "#e11d48": "salmon-600",
271
+ "#be123c": "salmon-700",
272
+ "#9f1239": "salmon-800",
273
+ "#881337": "salmon-900",
274
+ "#4c0519": "salmon-950",
275
+ "#fffafa": "salmon-050"
276
+ },
277
+ "sky": {
278
+ "#f0f9ff": "sky-100",
279
+ "#e0f2fe": "sky-150",
280
+ "#bae6fd": "sky-200",
281
+ "#7dd3fc": "sky-300",
282
+ "#38bdf8": "sky-400",
283
+ "#0ea5e9": "sky-500",
284
+ "#0284c7": "sky-600",
285
+ "#0369a1": "sky-700",
286
+ "#075985": "sky-800",
287
+ "#0c4a6e": "sky-900",
288
+ "#082f49": "sky-950",
289
+ "#fafdff": "sky-050"
290
+ },
291
+ "teal": {
292
+ "#f0fdfa": "teal-100",
293
+ "#ccfbf1": "teal-150",
294
+ "#99f6e4": "teal-200",
295
+ "#5eead4": "teal-300",
296
+ "#2dd4bf": "teal-400",
297
+ "#14b8a6": "teal-500",
298
+ "#0d9488": "teal-600",
299
+ "#0f766e": "teal-700",
300
+ "#115e59": "teal-800",
301
+ "#134e4a": "teal-900",
302
+ "#042f2e": "teal-950",
303
+ "#fbfefe": "teal-050"
304
+ }
305
+ }
306
+ }
package/package.json CHANGED
@@ -2,11 +2,12 @@
2
2
  "name": "@kajabi-ui/styles",
3
3
  "author": "Kajabi Design System Services",
4
4
  "description": "A collection of styles and tokens used within Kajabi",
5
- "version": "1.0.4",
5
+ "version": "1.0.5",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  "./package.json": "./package.json",
9
9
  "./tokens/*": "./dist/tokens/*",
10
+ "./lint-mappings": "./dist/tokens/pine-token-mappings.json",
10
11
  "./*": "./dist/*"
11
12
  },
12
13
  "files": [
@@ -34,7 +35,7 @@
34
35
  "scripts": {
35
36
  "clean": "rm -rf _generated",
36
37
  "generate": "npm run clean && node src/lib/transform/index.js",
37
- "build": "npm run generate && vite build && node scripts/copy-tokens.js",
38
+ "build": "npm run generate && vite build && node scripts/copy-tokens.js && node scripts/generate-lint-mappings.js",
38
39
  "lint": "npm run lint.eslint",
39
40
  "lint.eslint": "eslint src/lib/**/*"
40
41
  }