@bitrise/bitkit-v2 0.3.251-beta.1696 → 0.3.252-beta.1703
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/dist/components/BitkitActionBar/BitkitActionBar.js +1 -1
- package/dist/components/BitkitActionBar/BitkitActionBar.js.map +1 -1
- package/dist/components/BitkitAlert/BitkitAlert.js +2 -2
- package/dist/components/BitkitAlert/BitkitAlert.js.map +1 -1
- package/dist/components/BitkitAvatar/BitkitAvatar.d.ts +1 -1
- package/dist/components/BitkitAvatar/BitkitAvatar.js +4 -6
- package/dist/components/BitkitAvatar/BitkitAvatar.js.map +1 -1
- package/dist/components/BitkitBadge/BitkitBadge.d.ts +2 -5
- package/dist/components/BitkitBadge/BitkitBadge.js.map +1 -1
- package/dist/components/BitkitCloseButton/BitkitCloseButton.d.ts +1 -1
- package/dist/components/BitkitCloseButton/BitkitCloseButton.js +6 -3
- package/dist/components/BitkitCloseButton/BitkitCloseButton.js.map +1 -1
- package/dist/components/BitkitColorButton/BitkitColorButton.d.ts +1 -1
- package/dist/components/BitkitColorButton/BitkitColorButton.js.map +1 -1
- package/dist/components/BitkitLabel/BitkitLabel.js +1 -1
- package/dist/components/BitkitLabel/BitkitLabel.js.map +1 -1
- package/dist/components/BitkitList/BitkitList.d.ts +1 -1
- package/dist/components/BitkitList/BitkitList.js +6 -6
- package/dist/components/BitkitList/BitkitList.js.map +1 -1
- package/dist/components/BitkitMarkdown/BitkitMarkdown.js +1 -1
- package/dist/components/BitkitMarkdown/BitkitMarkdown.js.map +1 -1
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js +3 -3
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
- package/dist/components/BitkitPageFooter/BitkitPageFooter.d.ts +2 -2
- package/dist/components/BitkitPageFooter/BitkitPageFooter.js +7 -7
- package/dist/components/BitkitPageFooter/BitkitPageFooter.js.map +1 -1
- package/dist/components/BitkitRadio/BitkitRadio.js +1 -1
- package/dist/components/BitkitRadio/BitkitRadio.js.map +1 -1
- package/dist/components/BitkitRibbon/BitkitRibbon.d.ts +1 -1
- package/dist/components/BitkitRibbon/BitkitRibbon.js +4 -6
- package/dist/components/BitkitRibbon/BitkitRibbon.js.map +1 -1
- package/dist/components/BitkitSearchInput/BitkitSearchInput.js +1 -1
- package/dist/components/BitkitSearchInput/BitkitSearchInput.js.map +1 -1
- package/dist/components/BitkitSwitch/components/BitkitSwitchReadOnly.js +2 -2
- package/dist/components/BitkitSwitch/components/BitkitSwitchReadOnly.js.map +1 -1
- package/dist/components/BitkitTable/BitkitSortableColumnHeader.js +1 -1
- package/dist/components/BitkitTable/BitkitSortableColumnHeader.js.map +1 -1
- package/dist/components/BitkitTag/BitkitTag.js +1 -1
- package/dist/components/BitkitTag/BitkitTag.js.map +1 -1
- package/dist/components/BitkitToast/BitkitToaster.js +2 -2
- package/dist/components/BitkitToast/BitkitToaster.js.map +1 -1
- package/dist/components/BitkitTooltip/BitkitTooltip.js +1 -1
- package/dist/components/BitkitTooltip/BitkitTooltip.js.map +1 -1
- package/dist/components/common/notificationMaps.d.ts +8 -1
- package/dist/components/common/notificationMaps.js.map +1 -1
- package/dist/docs/shared.d.ts +1 -1
- package/dist/theme/common/AlertAndToast.common.js +1 -1
- package/dist/theme/common/AlertAndToast.common.js.map +1 -1
- package/dist/theme/global-css.js +1 -1
- package/dist/theme/global-css.js.map +1 -1
- package/dist/theme/recipes/Badge.recipe.d.ts +39 -5
- package/dist/theme/recipes/Badge.recipe.js +77 -20
- package/dist/theme/recipes/Badge.recipe.js.map +1 -1
- package/dist/theme/recipes/Button.recipe.js +12 -12
- package/dist/theme/recipes/Button.recipe.js.map +1 -1
- package/dist/theme/recipes/CloseButton.recipe.d.ts +68 -0
- package/dist/theme/recipes/CloseButton.recipe.js +56 -17
- package/dist/theme/recipes/CloseButton.recipe.js.map +1 -1
- package/dist/theme/recipes/ColorButton.recipe.d.ts +93 -0
- package/dist/theme/recipes/ColorButton.recipe.js +75 -30
- package/dist/theme/recipes/ColorButton.recipe.js.map +1 -1
- package/dist/theme/recipes/DefinitionTooltip.recipe.js +2 -2
- package/dist/theme/recipes/DefinitionTooltip.recipe.js.map +1 -1
- package/dist/theme/recipes/Link.recipe.d.ts +1 -1
- package/dist/theme/recipes/Link.recipe.js +1 -1
- package/dist/theme/recipes/Link.recipe.js.map +1 -1
- package/dist/theme/recipes/Separator.recipe.js +1 -1
- package/dist/theme/recipes/Separator.recipe.js.map +1 -1
- package/dist/theme/recipes/Skeleton.recipe.js +2 -2
- package/dist/theme/recipes/Skeleton.recipe.js.map +1 -1
- package/dist/theme/recipes/index.d.ts +201 -6
- package/dist/theme/semantic-tokens/index.d.ts +1772 -1
- package/dist/theme/semantic-tokens/semanticColors.d.ts +1772 -1
- package/dist/theme/semantic-tokens/semanticColors.js +356 -472
- package/dist/theme/semantic-tokens/semanticColors.js.map +1 -1
- package/dist/theme/slot-recipes/Avatar.recipe.d.ts +56 -0
- package/dist/theme/slot-recipes/Avatar.recipe.js +40 -3
- package/dist/theme/slot-recipes/Avatar.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Collapsible.recipe.js +1 -1
- package/dist/theme/slot-recipes/Collapsible.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Dialog.recipe.js +1 -1
- package/dist/theme/slot-recipes/Dialog.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Drawer.recipe.js +2 -2
- package/dist/theme/slot-recipes/Drawer.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/EmptyState.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/EmptyState.recipe.js +2 -2
- package/dist/theme/slot-recipes/EmptyState.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/MarkdownCard.recipe.d.ts +3 -3
- package/dist/theme/slot-recipes/MarkdownCard.recipe.js +4 -4
- package/dist/theme/slot-recipes/MarkdownCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/NoteCard.recipe.d.ts +2 -2
- package/dist/theme/slot-recipes/NoteCard.recipe.js +8 -8
- package/dist/theme/slot-recipes/NoteCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/OverflowContent.recipe.js +1 -1
- package/dist/theme/slot-recipes/OverflowContent.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/PageFooter.recipe.d.ts +4 -4
- package/dist/theme/slot-recipes/PageFooter.recipe.js +5 -5
- package/dist/theme/slot-recipes/PageFooter.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Ribbon.recipe.d.ts +39 -1
- package/dist/theme/slot-recipes/Ribbon.recipe.js +29 -5
- package/dist/theme/slot-recipes/Ribbon.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Tabs.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Tabs.recipe.js +1 -1
- package/dist/theme/slot-recipes/Tabs.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Tag.recipe.d.ts +44 -0
- package/dist/theme/slot-recipes/Tag.recipe.js +38 -7
- package/dist/theme/slot-recipes/Tag.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/TagsInput.recipe.js +5 -5
- package/dist/theme/slot-recipes/TagsInput.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Tooltip.recipe.d.ts +2 -2
- package/dist/theme/slot-recipes/Tooltip.recipe.js +3 -3
- package/dist/theme/slot-recipes/Tooltip.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +152 -14
- package/dist/theme/slot-recipes/index.js +1 -1
- package/dist/theme/tokens/colors.d.ts +4 -846
- package/dist/theme/tokens/colors.js +22 -137
- package/dist/theme/tokens/colors.js.map +1 -1
- package/dist/theme/tokens/index.d.ts +15 -312
- package/dist/theme/tokens/index.js +1 -1
- package/package.json +6 -5
- package/scripts/postinstall.cjs +8 -0
- package/scripts/prune-color-tokens.cjs +78 -0
|
@@ -14,140 +14,38 @@ declare const tokens: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
colors: {
|
|
17
|
-
brand: {
|
|
18
|
-
purple: {
|
|
19
|
-
darkest: {
|
|
20
|
-
value: string;
|
|
21
|
-
};
|
|
22
|
-
dark: {
|
|
23
|
-
value: string;
|
|
24
|
-
};
|
|
25
|
-
mid: {
|
|
26
|
-
value: string;
|
|
27
|
-
};
|
|
28
|
-
light: {
|
|
29
|
-
value: string;
|
|
30
|
-
};
|
|
31
|
-
lightest: {
|
|
32
|
-
value: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
blue: {
|
|
36
|
-
dark: {
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
mid: {
|
|
40
|
-
value: string;
|
|
41
|
-
};
|
|
42
|
-
light: {
|
|
43
|
-
value: string;
|
|
44
|
-
};
|
|
45
|
-
lightest: {
|
|
46
|
-
value: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
teal: {
|
|
50
|
-
dark: {
|
|
51
|
-
value: string;
|
|
52
|
-
};
|
|
53
|
-
mid: {
|
|
54
|
-
value: string;
|
|
55
|
-
};
|
|
56
|
-
light: {
|
|
57
|
-
value: string;
|
|
58
|
-
};
|
|
59
|
-
lightest: {
|
|
60
|
-
value: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
green: {
|
|
64
|
-
dark: {
|
|
65
|
-
value: string;
|
|
66
|
-
};
|
|
67
|
-
mid: {
|
|
68
|
-
value: string;
|
|
69
|
-
};
|
|
70
|
-
light: {
|
|
71
|
-
value: string;
|
|
72
|
-
};
|
|
73
|
-
lightest: {
|
|
74
|
-
value: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
yellow: {
|
|
78
|
-
mid: {
|
|
79
|
-
value: string;
|
|
80
|
-
};
|
|
81
|
-
light: {
|
|
82
|
-
value: string;
|
|
83
|
-
};
|
|
84
|
-
lightest: {
|
|
85
|
-
value: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
orange: {
|
|
89
|
-
dark: {
|
|
90
|
-
value: string;
|
|
91
|
-
};
|
|
92
|
-
mid: {
|
|
93
|
-
value: string;
|
|
94
|
-
};
|
|
95
|
-
light: {
|
|
96
|
-
value: string;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
red: {
|
|
100
|
-
dark: {
|
|
101
|
-
value: string;
|
|
102
|
-
};
|
|
103
|
-
mid: {
|
|
104
|
-
value: string;
|
|
105
|
-
};
|
|
106
|
-
light: {
|
|
107
|
-
value: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
neutral: {
|
|
111
|
-
black: {
|
|
112
|
-
value: string;
|
|
113
|
-
};
|
|
114
|
-
dark: {
|
|
115
|
-
value: string;
|
|
116
|
-
};
|
|
117
|
-
light: {
|
|
118
|
-
value: string;
|
|
119
|
-
};
|
|
120
|
-
white: {
|
|
121
|
-
value: string;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
17
|
white: {
|
|
126
|
-
|
|
18
|
+
'10': {
|
|
127
19
|
value: string;
|
|
128
20
|
};
|
|
129
|
-
|
|
21
|
+
'15': {
|
|
130
22
|
value: string;
|
|
131
23
|
};
|
|
132
|
-
|
|
24
|
+
'20': {
|
|
133
25
|
value: string;
|
|
134
26
|
};
|
|
135
|
-
|
|
27
|
+
'30': {
|
|
136
28
|
value: string;
|
|
137
29
|
};
|
|
138
|
-
|
|
30
|
+
'40': {
|
|
139
31
|
value: string;
|
|
140
32
|
};
|
|
141
|
-
|
|
33
|
+
'50': {
|
|
142
34
|
value: string;
|
|
143
35
|
};
|
|
144
|
-
|
|
36
|
+
'60': {
|
|
145
37
|
value: string;
|
|
146
38
|
};
|
|
147
|
-
|
|
39
|
+
'70': {
|
|
148
40
|
value: string;
|
|
149
41
|
};
|
|
150
|
-
|
|
42
|
+
'80': {
|
|
43
|
+
value: string;
|
|
44
|
+
};
|
|
45
|
+
'90': {
|
|
46
|
+
value: string;
|
|
47
|
+
};
|
|
48
|
+
'100': {
|
|
151
49
|
value: string;
|
|
152
50
|
};
|
|
153
51
|
};
|
|
@@ -188,27 +86,6 @@ declare const tokens: {
|
|
|
188
86
|
'100': {
|
|
189
87
|
value: string;
|
|
190
88
|
};
|
|
191
|
-
base: {
|
|
192
|
-
value: string;
|
|
193
|
-
};
|
|
194
|
-
bold: {
|
|
195
|
-
value: string;
|
|
196
|
-
};
|
|
197
|
-
minimal: {
|
|
198
|
-
value: string;
|
|
199
|
-
};
|
|
200
|
-
moderate: {
|
|
201
|
-
value: string;
|
|
202
|
-
};
|
|
203
|
-
muted: {
|
|
204
|
-
value: string;
|
|
205
|
-
};
|
|
206
|
-
strong: {
|
|
207
|
-
value: string;
|
|
208
|
-
};
|
|
209
|
-
subtle: {
|
|
210
|
-
value: string;
|
|
211
|
-
};
|
|
212
89
|
};
|
|
213
90
|
purple: {
|
|
214
91
|
'10': {
|
|
@@ -244,27 +121,6 @@ declare const tokens: {
|
|
|
244
121
|
'95': {
|
|
245
122
|
value: string;
|
|
246
123
|
};
|
|
247
|
-
base: {
|
|
248
|
-
value: string;
|
|
249
|
-
};
|
|
250
|
-
bold: {
|
|
251
|
-
value: string;
|
|
252
|
-
};
|
|
253
|
-
minimal: {
|
|
254
|
-
value: string;
|
|
255
|
-
};
|
|
256
|
-
moderate: {
|
|
257
|
-
value: string;
|
|
258
|
-
};
|
|
259
|
-
muted: {
|
|
260
|
-
value: string;
|
|
261
|
-
};
|
|
262
|
-
strong: {
|
|
263
|
-
value: string;
|
|
264
|
-
};
|
|
265
|
-
subtle: {
|
|
266
|
-
value: string;
|
|
267
|
-
};
|
|
268
124
|
};
|
|
269
125
|
indigo: {
|
|
270
126
|
'10': {
|
|
@@ -300,33 +156,6 @@ declare const tokens: {
|
|
|
300
156
|
'95': {
|
|
301
157
|
value: string;
|
|
302
158
|
};
|
|
303
|
-
base: {
|
|
304
|
-
value: string;
|
|
305
|
-
};
|
|
306
|
-
bold: {
|
|
307
|
-
value: string;
|
|
308
|
-
};
|
|
309
|
-
dark: {
|
|
310
|
-
value: string;
|
|
311
|
-
};
|
|
312
|
-
emphasized: {
|
|
313
|
-
value: string;
|
|
314
|
-
};
|
|
315
|
-
minimal: {
|
|
316
|
-
value: string;
|
|
317
|
-
};
|
|
318
|
-
moderate: {
|
|
319
|
-
value: string;
|
|
320
|
-
};
|
|
321
|
-
muted: {
|
|
322
|
-
value: string;
|
|
323
|
-
};
|
|
324
|
-
strong: {
|
|
325
|
-
value: string;
|
|
326
|
-
};
|
|
327
|
-
subtle: {
|
|
328
|
-
value: string;
|
|
329
|
-
};
|
|
330
159
|
};
|
|
331
160
|
red: {
|
|
332
161
|
'10': {
|
|
@@ -362,27 +191,6 @@ declare const tokens: {
|
|
|
362
191
|
'95': {
|
|
363
192
|
value: string;
|
|
364
193
|
};
|
|
365
|
-
base: {
|
|
366
|
-
value: string;
|
|
367
|
-
};
|
|
368
|
-
bold: {
|
|
369
|
-
value: string;
|
|
370
|
-
};
|
|
371
|
-
minimal: {
|
|
372
|
-
value: string;
|
|
373
|
-
};
|
|
374
|
-
moderate: {
|
|
375
|
-
value: string;
|
|
376
|
-
};
|
|
377
|
-
muted: {
|
|
378
|
-
value: string;
|
|
379
|
-
};
|
|
380
|
-
strong: {
|
|
381
|
-
value: string;
|
|
382
|
-
};
|
|
383
|
-
subtle: {
|
|
384
|
-
value: string;
|
|
385
|
-
};
|
|
386
194
|
};
|
|
387
195
|
orange: {
|
|
388
196
|
'10': {
|
|
@@ -418,27 +226,6 @@ declare const tokens: {
|
|
|
418
226
|
'95': {
|
|
419
227
|
value: string;
|
|
420
228
|
};
|
|
421
|
-
base: {
|
|
422
|
-
value: string;
|
|
423
|
-
};
|
|
424
|
-
bold: {
|
|
425
|
-
value: string;
|
|
426
|
-
};
|
|
427
|
-
minimal: {
|
|
428
|
-
value: string;
|
|
429
|
-
};
|
|
430
|
-
moderate: {
|
|
431
|
-
value: string;
|
|
432
|
-
};
|
|
433
|
-
muted: {
|
|
434
|
-
value: string;
|
|
435
|
-
};
|
|
436
|
-
strong: {
|
|
437
|
-
value: string;
|
|
438
|
-
};
|
|
439
|
-
subtle: {
|
|
440
|
-
value: string;
|
|
441
|
-
};
|
|
442
229
|
};
|
|
443
230
|
yellow: {
|
|
444
231
|
'10': {
|
|
@@ -474,27 +261,6 @@ declare const tokens: {
|
|
|
474
261
|
'95': {
|
|
475
262
|
value: string;
|
|
476
263
|
};
|
|
477
|
-
base: {
|
|
478
|
-
value: string;
|
|
479
|
-
};
|
|
480
|
-
bold: {
|
|
481
|
-
value: string;
|
|
482
|
-
};
|
|
483
|
-
minimal: {
|
|
484
|
-
value: string;
|
|
485
|
-
};
|
|
486
|
-
moderate: {
|
|
487
|
-
value: string;
|
|
488
|
-
};
|
|
489
|
-
muted: {
|
|
490
|
-
value: string;
|
|
491
|
-
};
|
|
492
|
-
strong: {
|
|
493
|
-
value: string;
|
|
494
|
-
};
|
|
495
|
-
subtle: {
|
|
496
|
-
value: string;
|
|
497
|
-
};
|
|
498
264
|
};
|
|
499
265
|
green: {
|
|
500
266
|
'10': {
|
|
@@ -530,27 +296,6 @@ declare const tokens: {
|
|
|
530
296
|
'95': {
|
|
531
297
|
value: string;
|
|
532
298
|
};
|
|
533
|
-
base: {
|
|
534
|
-
value: string;
|
|
535
|
-
};
|
|
536
|
-
bold: {
|
|
537
|
-
value: string;
|
|
538
|
-
};
|
|
539
|
-
minimal: {
|
|
540
|
-
value: string;
|
|
541
|
-
};
|
|
542
|
-
moderate: {
|
|
543
|
-
value: string;
|
|
544
|
-
};
|
|
545
|
-
muted: {
|
|
546
|
-
value: string;
|
|
547
|
-
};
|
|
548
|
-
strong: {
|
|
549
|
-
value: string;
|
|
550
|
-
};
|
|
551
|
-
subtle: {
|
|
552
|
-
value: string;
|
|
553
|
-
};
|
|
554
299
|
};
|
|
555
300
|
turquoise: {
|
|
556
301
|
'10': {
|
|
@@ -586,27 +331,6 @@ declare const tokens: {
|
|
|
586
331
|
'95': {
|
|
587
332
|
value: string;
|
|
588
333
|
};
|
|
589
|
-
base: {
|
|
590
|
-
value: string;
|
|
591
|
-
};
|
|
592
|
-
bold: {
|
|
593
|
-
value: string;
|
|
594
|
-
};
|
|
595
|
-
minimal: {
|
|
596
|
-
value: string;
|
|
597
|
-
};
|
|
598
|
-
moderate: {
|
|
599
|
-
value: string;
|
|
600
|
-
};
|
|
601
|
-
muted: {
|
|
602
|
-
value: string;
|
|
603
|
-
};
|
|
604
|
-
strong: {
|
|
605
|
-
value: string;
|
|
606
|
-
};
|
|
607
|
-
subtle: {
|
|
608
|
-
value: string;
|
|
609
|
-
};
|
|
610
334
|
};
|
|
611
335
|
blue: {
|
|
612
336
|
'10': {
|
|
@@ -642,27 +366,6 @@ declare const tokens: {
|
|
|
642
366
|
'95': {
|
|
643
367
|
value: string;
|
|
644
368
|
};
|
|
645
|
-
base: {
|
|
646
|
-
value: string;
|
|
647
|
-
};
|
|
648
|
-
bold: {
|
|
649
|
-
value: string;
|
|
650
|
-
};
|
|
651
|
-
minimal: {
|
|
652
|
-
value: string;
|
|
653
|
-
};
|
|
654
|
-
moderate: {
|
|
655
|
-
value: string;
|
|
656
|
-
};
|
|
657
|
-
muted: {
|
|
658
|
-
value: string;
|
|
659
|
-
};
|
|
660
|
-
strong: {
|
|
661
|
-
value: string;
|
|
662
|
-
};
|
|
663
|
-
subtle: {
|
|
664
|
-
value: string;
|
|
665
|
-
};
|
|
666
369
|
};
|
|
667
370
|
};
|
|
668
371
|
durations: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.252-beta.1703",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dist",
|
|
16
16
|
"docs",
|
|
17
17
|
"scripts/postinstall.cjs",
|
|
18
|
+
"scripts/prune-color-tokens.cjs",
|
|
18
19
|
"AGENTS.md",
|
|
19
20
|
"README.md",
|
|
20
21
|
"package.json"
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"build": "vite build",
|
|
41
42
|
"storybook": "storybook dev -p 6006",
|
|
42
43
|
"build-storybook": "storybook build",
|
|
43
|
-
"theme:generate-types": "chakra typegen lib/theme/index.ts",
|
|
44
|
+
"theme:generate-types": "chakra typegen lib/theme/index.ts && node ./scripts/prune-color-tokens.cjs",
|
|
44
45
|
"theme:watch": "chakra typegen lib/theme/index.ts --watch",
|
|
45
46
|
"lint": "eslint .",
|
|
46
47
|
"lint:fix": "eslint . --fix",
|
|
@@ -74,10 +75,10 @@
|
|
|
74
75
|
"@figma-export/output-components-as-svg": "^6.4.0",
|
|
75
76
|
"@figma-export/transform-svg-with-svgo": "^6.4.0",
|
|
76
77
|
"@google-cloud/storage": "^7.21.0",
|
|
77
|
-
"@storybook/addon-docs": "^10.4.
|
|
78
|
+
"@storybook/addon-docs": "^10.4.3",
|
|
78
79
|
"@storybook/addon-mcp": "^0.6.0",
|
|
79
80
|
"@storybook/mcp": "^0.7.0",
|
|
80
|
-
"@storybook/react-vite": "^10.4.
|
|
81
|
+
"@storybook/react-vite": "^10.4.3",
|
|
81
82
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
82
83
|
"@types/node": "^24.13.1",
|
|
83
84
|
"@types/react": "^18.3.31",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
"react": "^18.3.1",
|
|
87
88
|
"react-dom": "^18.3.1",
|
|
88
89
|
"release-it": "^20.2.0",
|
|
89
|
-
"storybook": "^10.4.
|
|
90
|
+
"storybook": "^10.4.3",
|
|
90
91
|
"tsx": "^4.22.4",
|
|
91
92
|
"typescript": "^6.0.3",
|
|
92
93
|
"vite": "^8.0.16",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -33,6 +33,14 @@ if (result.status !== 0) {
|
|
|
33
33
|
'[@bitrise/bitkit-v2] Chakra typegen failed — bitkit-specific theme types are unavailable. ' +
|
|
34
34
|
'You can retry manually with `npx chakra typegen node_modules/@bitrise/bitkit-v2/dist/theme/index.js`.',
|
|
35
35
|
);
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Trim internal color tokens (sys/*, primitives) from style-prop autocomplete.
|
|
40
|
+
try {
|
|
41
|
+
require('./prune-color-tokens.cjs');
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.warn(`[@bitrise/bitkit-v2] Color-token prune skipped: ${error.message}`);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
process.exit(0);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Post-processes the Chakra-generated `token.gen.d.ts` to keep the color-token
|
|
5
|
+
* autocomplete focused on usable tokens.
|
|
6
|
+
*
|
|
7
|
+
* Bitkit registers three layers of color tokens, but only one should be offered
|
|
8
|
+
* in style-prop autocomplete (`color`, `background`, …):
|
|
9
|
+
* - core/primitive palette (`red.50`, `white.10`, …) -> internal, hide
|
|
10
|
+
* - `sys/*` system layer -> internal, hide
|
|
11
|
+
* - everything else (`color/*`, `background/*`, …) -> keep
|
|
12
|
+
*
|
|
13
|
+
* The tokens still exist and resolve at runtime (references, recipes); we only
|
|
14
|
+
* trim the `ColorsToken` union that drives editor suggestions. `strictTokens`
|
|
15
|
+
* is off, so hidden tokens are not errors if used directly — just not suggested.
|
|
16
|
+
*
|
|
17
|
+
* Runs after `chakra typegen` (locally via `theme:generate-types`, and in
|
|
18
|
+
* consumer repos via this package's postinstall). Idempotent.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { existsSync, readFileSync, writeFileSync } = require('node:fs');
|
|
22
|
+
const { dirname, resolve } = require('node:path');
|
|
23
|
+
|
|
24
|
+
const PRIMITIVE_SCALES = ['white', 'neutral', 'purple', 'indigo', 'red', 'orange', 'yellow', 'green', 'turquoise', 'blue'];
|
|
25
|
+
const PRIMITIVE_DOT = new RegExp(`^(${PRIMITIVE_SCALES.join('|')})\\.`);
|
|
26
|
+
|
|
27
|
+
const isHidden = (token) => token.startsWith('sys/') || PRIMITIVE_DOT.test(token);
|
|
28
|
+
|
|
29
|
+
function resolveTokenGenPath() {
|
|
30
|
+
try {
|
|
31
|
+
const pkg = require.resolve('@chakra-ui/react/package.json');
|
|
32
|
+
return resolve(dirname(pkg), 'dist/types/styled-system/generated/token.gen.d.ts');
|
|
33
|
+
} catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function prune() {
|
|
39
|
+
const filePath = resolveTokenGenPath();
|
|
40
|
+
if (!filePath || !existsSync(filePath)) {
|
|
41
|
+
console.warn('[@bitrise/bitkit-v2] token.gen.d.ts not found — skipping color-token prune.');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const lines = readFileSync(filePath, 'utf8').split('\n');
|
|
46
|
+
let inColorsToken = false;
|
|
47
|
+
let dropped = 0;
|
|
48
|
+
const out = [];
|
|
49
|
+
|
|
50
|
+
for (const line of lines) {
|
|
51
|
+
if (line.startsWith('export type ColorsToken')) {
|
|
52
|
+
inColorsToken = true;
|
|
53
|
+
out.push(line);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (inColorsToken) {
|
|
57
|
+
// Allow an optional trailing `;` so the final union member is matched too,
|
|
58
|
+
// regardless of how the generator terminates the type.
|
|
59
|
+
const match = line.match(/^\s*\|\s*"(.+)"\s*;?\s*$/);
|
|
60
|
+
if (match) {
|
|
61
|
+
if (isHidden(match[1])) {
|
|
62
|
+
dropped += 1;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
out.push(line);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
// First line that is not a union member ends the ColorsToken block.
|
|
69
|
+
inColorsToken = false;
|
|
70
|
+
}
|
|
71
|
+
out.push(line);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
writeFileSync(filePath, out.join('\n'));
|
|
75
|
+
console.log(`[@bitrise/bitkit-v2] Pruned ${dropped} internal color tokens (sys/*, primitives) from autocomplete.`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
prune();
|