@pandacss/studio 0.15.2 → 0.15.4

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 (60) hide show
  1. package/package.json +8 -8
  2. package/src/lib/panda.context.ts +0 -2
  3. package/styled-system/chunks/src__components__color-wrapper.css +16 -25
  4. package/styled-system/chunks/src__components__colors.css +0 -1
  5. package/styled-system/chunks/src__components__empty-state.css +0 -1
  6. package/styled-system/chunks/src__components__font-family.css +0 -1
  7. package/styled-system/chunks/src__components__font-tokens.css +0 -1
  8. package/styled-system/chunks/src__components__input.css +10 -16
  9. package/styled-system/chunks/src__components__layer-styles.css +5 -7
  10. package/styled-system/chunks/src__components__nav-item.css +3 -5
  11. package/styled-system/chunks/src__components__overview.css +4 -7
  12. package/styled-system/chunks/src__components__radii.css +0 -1
  13. package/styled-system/chunks/src__components__semantic-color.css +0 -1
  14. package/styled-system/chunks/src__components__side-nav-item.css +4 -7
  15. package/styled-system/chunks/src__components__side-nav.css +0 -1
  16. package/styled-system/chunks/src__components__text-styles.css +0 -1
  17. package/styled-system/chunks/src__components__theme-toggle.css +2 -4
  18. package/styled-system/chunks/src__components__token-content.css +0 -1
  19. package/styled-system/chunks/src__components__token-group.css +0 -1
  20. package/styled-system/chunks/src__components__typography-playground.css +0 -1
  21. package/styled-system/chunks/src__layouts__Sidebar.css +4 -4
  22. package/styled-system/jsx/factory.mjs +29 -17
  23. package/styled-system/styles.css +50 -319
  24. package/styled-system/types/jsx.d.ts +10 -2
  25. package/styled-system/types/recipe.d.ts +10 -8
  26. package/virtual-panda.ts +2 -12
  27. package/src/components/analyzer/category-utilities.tsx +0 -156
  28. package/src/components/analyzer/data-combobox.tsx +0 -154
  29. package/src/components/analyzer/data-table.tsx +0 -39
  30. package/src/components/analyzer/external-icon.tsx +0 -8
  31. package/src/components/analyzer/file-details.tsx +0 -101
  32. package/src/components/analyzer/get-report-infos-from.ts +0 -80
  33. package/src/components/analyzer/quick-tooltip.tsx +0 -15
  34. package/src/components/analyzer/report-item-columns.tsx +0 -52
  35. package/src/components/analyzer/report-item-link.tsx +0 -98
  36. package/src/components/analyzer/section.tsx +0 -24
  37. package/src/components/analyzer/sort-icon.tsx +0 -10
  38. package/src/components/analyzer/text-with-count.tsx +0 -28
  39. package/src/components/analyzer/token-search-combobox.tsx +0 -39
  40. package/src/components/analyzer/truncated-text.tsx +0 -28
  41. package/src/components/analyzer/utility-details.tsx +0 -325
  42. package/src/components/color-item.tsx +0 -37
  43. package/src/components/token-analyzer.tsx +0 -397
  44. package/src/lib/analysis-data.ts +0 -17
  45. package/src/lib/get-report-item.tsx +0 -41
  46. package/src/pages/token-analyzer/file.astro +0 -11
  47. package/src/pages/token-analyzer/index.astro +0 -11
  48. package/src/pages/token-analyzer/utility.astro +0 -11
  49. package/styled-system/chunks/src__components__analyzer__category-utilities.css +0 -118
  50. package/styled-system/chunks/src__components__analyzer__data-combobox.css +0 -137
  51. package/styled-system/chunks/src__components__analyzer__data-table.css +0 -46
  52. package/styled-system/chunks/src__components__analyzer__file-details.css +0 -98
  53. package/styled-system/chunks/src__components__analyzer__report-item-columns.css +0 -39
  54. package/styled-system/chunks/src__components__analyzer__report-item-link.css +0 -78
  55. package/styled-system/chunks/src__components__analyzer__section.css +0 -30
  56. package/styled-system/chunks/src__components__analyzer__text-with-count.css +0 -34
  57. package/styled-system/chunks/src__components__analyzer__truncated-text.css +0 -18
  58. package/styled-system/chunks/src__components__analyzer__utility-details.css +0 -139
  59. package/styled-system/chunks/src__components__color-item.css +0 -22
  60. package/styled-system/chunks/src__components__token-analyzer.css +0 -220
@@ -11,131 +11,6 @@
11
11
  @import './tokens/keyframes.css';
12
12
 
13
13
  @layer utilities {
14
- .w_26px {
15
- width: 26px
16
- }
17
-
18
- .grid-cols_repeat\(2\,_minmax\(0\,_1fr\)\) {
19
- grid-template-columns: repeat(2, minmax(0, 1fr))
20
- }
21
-
22
- .col-span_span_2 {
23
- grid-column: span 2
24
- }
25
-
26
- .m_4 {
27
- margin: var(--spacing-4)
28
- }
29
-
30
- .max-h_300px {
31
- max-height: 300px
32
- }
33
-
34
- .word-wrap_break-word {
35
- word-wrap: break-word
36
- }
37
-
38
- .highlighted\:bg_border[data-highlighted] {
39
- background: var(--colors-border)
40
- }
41
-
42
- .isolation_isolate {
43
- isolation: isolate
44
- }
45
-
46
- .border-l_solid_1px {
47
- border-left: solid 1px
48
- }
49
-
50
- .expanded\:transform_rotate\(180deg\):is([aria-expanded=true], [data-expanded], [data-state="expanded"]) {
51
- transform: rotate(180deg)
52
- }
53
-
54
- .transition_all_\.2s_ease {
55
- transition: all .2s ease
56
- }
57
-
58
- .top_0px {
59
- top: 0px
60
- }
61
-
62
- .right_0px {
63
- right: 0px
64
- }
65
-
66
- .pos_absolute {
67
- position: absolute
68
- }
69
-
70
- .z_2 {
71
- z-index: 2
72
- }
73
-
74
- .break_break-word {
75
- word-break: break-word
76
- }
77
-
78
- .grid-cols_80px_repeat\(auto-fit\,_minmax\(30px\,_1fr\)\) {
79
- grid-template-columns: 80px repeat(auto-fit, minmax(30px, 1fr))
80
- }
81
-
82
- .max-w_14px {
83
- max-width: 14px
84
- }
85
-
86
- .shrink_0 {
87
- flex-shrink: 0
88
- }
89
-
90
- .border_1px_solid_token\(colors\.border\) {
91
- border: 1px solid var(--colors-border)
92
- }
93
-
94
- .text_red\.400 {
95
- color: var(--colors-red-400)
96
- }
97
-
98
- .fs_75\% {
99
- font-size: 75%
100
- }
101
-
102
- .leading_0 {
103
- line-height: 0
104
- }
105
-
106
- .top_-0\.35em {
107
- top: -0.35em
108
- }
109
-
110
- .ml_1 {
111
- margin-left: var(--spacing-1)
112
- }
113
-
114
- .bg_card {
115
- background-color: var(--colors-card)
116
- }
117
-
118
- .p_16 {
119
- padding: var(--spacing-16)
120
- }
121
-
122
- .mt_1 {
123
- margin-top: var(--spacing-1)
124
- }
125
-
126
- .select_none {
127
- -webkit-user-select: none;
128
- user-select: none
129
- }
130
-
131
- .px_3 {
132
- padding-inline: var(--spacing-3)
133
- }
134
-
135
- .h_16 {
136
- height: var(--sizes-16)
137
- }
138
-
139
14
  .pt_16 {
140
15
  padding-top: var(--spacing-16)
141
16
  }
@@ -144,10 +19,18 @@
144
19
  margin-top: var(--spacing-10)
145
20
  }
146
21
 
22
+ .opacity_0\.5 {
23
+ opacity: 0.5
24
+ }
25
+
147
26
  .justify_space-between {
148
27
  justify-content: space-between
149
28
  }
150
29
 
30
+ .p_2 {
31
+ padding: var(--spacing-2)
32
+ }
33
+
151
34
  .ring_none {
152
35
  outline: var(--borders-none)
153
36
  }
@@ -164,22 +47,6 @@
164
47
  flex: 1 1 0%
165
48
  }
166
49
 
167
- .w_auto {
168
- width: auto
169
- }
170
-
171
- .min-w_80px {
172
- min-width: 80px
173
- }
174
-
175
- .h_40px {
176
- height: 40px
177
- }
178
-
179
- .mb_2 {
180
- margin-bottom: var(--spacing-2)
181
- }
182
-
183
50
  .h_10 {
184
51
  height: var(--sizes-10)
185
52
  }
@@ -224,6 +91,10 @@
224
91
  background-image: var(--assets-check)
225
92
  }
226
93
 
94
+ .fs_xl {
95
+ font-size: var(--font-sizes-xl)
96
+ }
97
+
227
98
  .gap_0\.5 {
228
99
  gap: var(--spacing-0\.5)
229
100
  }
@@ -417,6 +288,10 @@
417
288
  margin-top: var(--spacing-6)
418
289
  }
419
290
 
291
+ .transition_all_0\.2s_ease {
292
+ transition: all 0.2s ease
293
+ }
294
+
420
295
  .py_24 {
421
296
  padding-block: var(--spacing-24)
422
297
  }
@@ -441,6 +316,10 @@
441
316
  padding: var(--spacing-8)
442
317
  }
443
318
 
319
+ .flex-wrap_wrap {
320
+ flex-wrap: wrap
321
+ }
322
+
444
323
  .gap_6 {
445
324
  gap: var(--spacing-6)
446
325
  }
@@ -489,6 +368,10 @@
489
368
  border-color: var(--colors-neutral-700)
490
369
  }
491
370
 
371
+ .fs_sm {
372
+ font-size: var(--font-sizes-sm)
373
+ }
374
+
492
375
  .text_uppercase {
493
376
  text-transform: uppercase
494
377
  }
@@ -501,10 +384,18 @@
501
384
  padding-block: var(--spacing-1\.5)
502
385
  }
503
386
 
387
+ .fs_md {
388
+ font-size: var(--font-sizes-md)
389
+ }
390
+
504
391
  .currentPage\:text_yellow\.300[aria-current=page] {
505
392
  color: var(--colors-yellow-300)
506
393
  }
507
394
 
395
+ .mt_8 {
396
+ margin-top: var(--spacing-8)
397
+ }
398
+
508
399
  .fs_small {
509
400
  font-size: small
510
401
  }
@@ -517,6 +408,10 @@
517
408
  list-style-type: none
518
409
  }
519
410
 
411
+ .p_0 {
412
+ padding: var(--spacing-0)
413
+ }
414
+
520
415
  .my_2 {
521
416
  margin-block: var(--spacing-2)
522
417
  }
@@ -595,6 +490,10 @@
595
490
  font-weight: var(--font-weights-medium)
596
491
  }
597
492
 
493
+ .cursor_pointer {
494
+ cursor: pointer
495
+ }
496
+
598
497
  .\[\&\.active\]\:text_yellow\.300.active {
599
498
  color: var(--colors-yellow-300)
600
499
  }
@@ -615,164 +514,28 @@
615
514
  flex-direction: row
616
515
  }
617
516
 
618
- .border-width_1px {
619
- border-width: 1px
620
- }
621
-
622
- .self_flex-start {
623
- align-self: flex-start
624
- }
625
-
626
- .text_inherit {
627
- color: inherit
628
- }
629
-
630
- .py_20px {
631
- padding-block: 20px
632
- }
633
-
634
- .p_4px_8px {
635
- padding: 4px 8px
636
- }
637
-
638
- .\[\&_li\]\:cursor_pointer li {
639
- cursor: pointer
640
- }
641
-
642
- .list-style_none {
643
- list-style: none
644
- }
645
-
646
- .p_6 {
647
- padding: var(--spacing-6)
648
- }
649
-
650
- .cursor_default {
651
- cursor: default
652
- }
653
-
654
- .px_24 {
655
- padding-inline: var(--spacing-24)
656
- }
657
-
658
- .w_100\% {
659
- width: 100%
660
- }
661
-
662
- .w_5 {
663
- width: var(--sizes-5)
664
- }
665
-
666
- .ml_auto {
667
- margin-left: auto
668
- }
669
-
670
- .mt_8 {
671
- margin-top: var(--spacing-8)
672
- }
673
-
674
- .fs_xl {
675
- font-size: var(--font-sizes-xl)
676
- }
677
-
678
- .p_2 {
679
- padding: var(--spacing-2)
680
- }
681
-
682
- .bg_gray\.100 {
683
- background: var(--colors-gray-100)
684
- }
685
-
686
- .border_1px_solid_rgba\(0\,_0\,_0\,_0\.1\) {
687
- border: 1px solid rgba(0, 0, 0, 0.1)
688
- }
689
-
690
- .fs_md {
691
- font-size: var(--font-sizes-md)
692
- }
693
-
694
- .ml_2 {
695
- margin-left: var(--spacing-2)
696
- }
697
-
698
- .d_inline-block {
699
- display: inline-block
700
- }
701
-
702
- .p_0 {
703
- padding: var(--spacing-0)
704
- }
705
-
706
- .py_2 {
707
- padding-block: var(--spacing-2)
708
- }
709
-
710
- .transition_all_0\.2s_ease {
711
- transition: all 0.2s ease
712
- }
713
-
714
517
  .rounded_md {
715
518
  border-radius: var(--radii-md)
716
519
  }
717
520
 
718
- .bg_none {
719
- background: none
720
- }
721
-
722
- .pt_6 {
723
- padding-top: var(--spacing-6)
724
- }
725
-
726
- .pl_6 {
727
- padding-left: var(--spacing-6)
728
- }
729
-
730
- .pr_4 {
731
- padding-right: var(--spacing-4)
732
- }
733
-
734
- .text_text {
735
- color: var(--colors-text)
736
- }
737
-
738
- .mb_4 {
739
- margin-bottom: var(--spacing-4)
740
- }
741
-
742
- .p_20px {
743
- padding: 20px
744
- }
745
-
746
- .fs_lg {
747
- font-size: var(--font-sizes-lg)
748
- }
749
-
750
- .d_inline-flex {
751
- display: inline-flex
752
- }
753
-
754
- .opacity_0\.5 {
755
- opacity: 0.5
756
- }
757
-
758
- .border-b_1px_solid_transparent {
759
- border-bottom: 1px solid transparent
521
+ .px_2 {
522
+ padding-inline: var(--spacing-2)
760
523
  }
761
524
 
762
- .cursor_pointer {
763
- cursor: pointer
525
+ .py_2 {
526
+ padding-block: var(--spacing-2)
764
527
  }
765
528
 
766
- .flex-wrap_wrap {
767
- flex-wrap: wrap
529
+ .border-width_1px {
530
+ border-width: 1px
768
531
  }
769
532
 
770
- .px_2 {
771
- padding-inline: var(--spacing-2)
533
+ .self_flex-start {
534
+ align-self: flex-start
772
535
  }
773
536
 
774
- .fs_sm {
775
- font-size: var(--font-sizes-sm)
537
+ .text_inherit {
538
+ color: inherit
776
539
  }
777
540
 
778
541
  .gap_12 {
@@ -951,10 +714,6 @@
951
714
  outline-color: var(--colors-neutral-400)
952
715
  }
953
716
 
954
- .hover\:bg_gray\.100:is(:hover, [data-hover]) {
955
- background-color: var(--colors-gray-100)
956
- }
957
-
958
717
  .hover\:shadow_lg:is(:hover, [data-hover]) {
959
718
  box-shadow: var(--shadows-lg)
960
719
  }
@@ -971,34 +730,6 @@
971
730
  color: var(--colors-yellow-300)
972
731
  }
973
732
 
974
- .hover\:opacity_0\.8:is(:hover, [data-hover]) {
975
- opacity: 0.8
976
- }
977
-
978
- .hover\:bg_border:is(:hover, [data-hover]) {
979
- background-color: var(--colors-border)
980
- }
981
-
982
- .hover\:bg_border:is(:hover, [data-hover]) {
983
- background: var(--colors-border)
984
- }
985
-
986
- .hover\:opacity_0\.6:is(:hover, [data-hover]) {
987
- opacity: 0.6
988
- }
989
-
990
- .hover\:opacity_1:is(:hover, [data-hover]) {
991
- opacity: 1
992
- }
993
-
994
- .hover\:border-b_black:is(:hover, [data-hover]) {
995
- border-bottom-color: var(--colors-black)
996
- }
997
-
998
- .\[\&_li\]\:hover\:opacity_0\.8 li:is(:hover, [data-hover]) {
999
- opacity: 0.8
1000
- }
1001
-
1002
733
  @media screen and (min-width: 48em) {
1003
734
  .md\:px_6 {
1004
735
  padding-inline: var(--spacing-6)
@@ -16,13 +16,21 @@ export interface PandaComponent<T extends ElementType, P extends Dict = {}> {
16
16
 
17
17
  interface RecipeFn { __type: any }
18
18
 
19
+ interface JsxFactoryOptions<TProps extends Dict> {
20
+ dataAttr?: boolean
21
+ defaultProps?: TProps
22
+ shouldForwardProp?(prop: string, variantKeys: string[]): boolean
23
+ }
24
+
25
+ export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T>, P>;
26
+
19
27
  interface JsxFactory {
20
28
  <T extends ElementType>(component: T): PandaComponent<T, {}>
21
- <T extends ElementType, P extends RecipeVariantRecord>(component: T, recipe: RecipeDefinition<P>): PandaComponent<
29
+ <T extends ElementType, P extends RecipeVariantRecord>(component: T, recipe: RecipeDefinition<P>, options?: JsxFactoryOptions<JsxRecipeProps<T, RecipeSelection<P>>>): PandaComponent<
22
30
  T,
23
31
  RecipeSelection<P>
24
32
  >
25
- <T extends ElementType, P extends RecipeFn>(component: T, recipeFn: P): PandaComponent<T, P['__type']>
33
+ <T extends ElementType, P extends RecipeFn>(component: T, recipeFn: P, options?: JsxFactoryOptions<JsxRecipeProps<T, P['__type']>>): PandaComponent<T, P['__type']>
26
34
  }
27
35
 
28
36
  type JsxElements = { [K in keyof JSX.IntrinsicElements]: PandaComponent<K, {}> }
@@ -38,11 +38,13 @@ export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVa
38
38
  ): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
39
39
  }
40
40
 
41
- export type RecipeCompoundSelection<T extends RecipeVariantRecord> = {
42
- [K in keyof T]?: StringToBoolean<keyof T[K]> | Array<StringToBoolean<keyof T[K]>>
41
+ type OneOrMore<T> = T | Array<T>
42
+
43
+ export type RecipeCompoundSelection<T> = {
44
+ [K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>>
43
45
  }
44
46
 
45
- export type RecipeCompoundVariant<T extends RecipeVariantRecord> = RecipeCompoundSelection<T> & {
47
+ export type RecipeCompoundVariant<T> = T & {
46
48
  css: SystemStyleObject
47
49
  }
48
50
 
@@ -54,7 +56,7 @@ export interface RecipeDefinition<T extends RecipeVariantRecord> {
54
56
  /**
55
57
  * The multi-variant styles of the recipe.
56
58
  */
57
- variants?: T | RecipeVariantRecord
59
+ variants?: T
58
60
  /**
59
61
  * The default variants of the recipe.
60
62
  */
@@ -62,7 +64,7 @@ export interface RecipeDefinition<T extends RecipeVariantRecord> {
62
64
  /**
63
65
  * The styles to apply when a combination of variants is selected.
64
66
  */
65
- compoundVariants?: Array<RecipeCompoundVariant<T>>
67
+ compoundVariants?: Pretty<RecipeCompoundVariant<RecipeCompoundSelection<T>>>[]
66
68
  }
67
69
 
68
70
  export type RecipeCreatorFn = <T extends RecipeVariantRecord>(config: RecipeDefinition<T>) => RecipeRuntimeFn<T>
@@ -109,7 +111,7 @@ export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVaria
109
111
  splitVariantProps<Props extends RecipeSelection<T>>(props: Props): [RecipeSelection<T>, Pretty<Omit<Props, keyof T>>]
110
112
  }
111
113
 
112
- export type SlotRecipeCompoundVariant<S extends string, T extends RecipeVariantRecord> = RecipeCompoundSelection<T> & {
114
+ export type SlotRecipeCompoundVariant<S extends string, T> = T & {
113
115
  css: SlotRecord<S, SystemStyleObject>
114
116
  }
115
117
 
@@ -125,7 +127,7 @@ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVari
125
127
  /**
126
128
  * The multi-variant styles of the recipe.
127
129
  */
128
- variants?: T | SlotRecipeVariantRecord<S>
130
+ variants?: T
129
131
  /**
130
132
  * The default variants of the recipe.
131
133
  */
@@ -133,7 +135,7 @@ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVari
133
135
  /**
134
136
  * The styles to apply when a combination of variants is selected.
135
137
  */
136
- compoundVariants?: Array<SlotRecipeCompoundVariant<S, T>>
138
+ compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
137
139
  }
138
140
 
139
141
  export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
package/virtual-panda.ts CHANGED
@@ -1,27 +1,17 @@
1
- import { type PandaContext, analyzeTokens, loadConfigAndCreateContext, writeAnalyzeJSON } from '@pandacss/node'
2
- import { stringify } from 'javascript-stringify'
1
+ import { loadConfigAndCreateContext, type PandaContext } from '@pandacss/node'
3
2
  import type { AstroIntegration } from 'astro'
3
+ import { stringify } from 'javascript-stringify'
4
4
  import type { PluginOption } from 'vite'
5
5
 
6
- import { dirname, resolve } from 'path'
7
- import { fileURLToPath } from 'url'
8
-
9
6
  const virtualModuleId = 'virtual:panda'
10
7
  const resolvedVirtualModuleId = '\0' + virtualModuleId
11
8
 
12
- const _dirname = dirname(fileURLToPath(import.meta.url))
13
- const analysisDataFilepath = 'src/lib/analysis.json'
14
- const jsonPath = resolve(_dirname, analysisDataFilepath)
15
-
16
9
  function vitePlugin(configPath: string): PluginOption {
17
10
  let config: PandaContext['config']
18
11
 
19
12
  async function loadPandaConfig() {
20
13
  const ctx = await loadConfigAndCreateContext({ configPath })
21
14
  config = ctx.config
22
-
23
- const result = analyzeTokens(ctx)
24
- await writeAnalyzeJSON(jsonPath, result, ctx)
25
15
  }
26
16
 
27
17
  return {