@pandacss/studio 0.3.0 → 0.3.1

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 (31) hide show
  1. package/LICENSE.md +1 -1
  2. package/package.json +8 -8
  3. package/src/components/analyzer/category-utilities.tsx +12 -4
  4. package/src/components/analyzer/data-combobox.tsx +27 -10
  5. package/src/components/analyzer/external-icon.tsx +1 -1
  6. package/src/components/analyzer/report-item-columns.tsx +1 -1
  7. package/src/components/analyzer/report-item-link.tsx +1 -1
  8. package/src/components/analyzer/truncated-text.tsx +3 -1
  9. package/src/components/analyzer/utility-details.tsx +31 -25
  10. package/src/components/color-item.tsx +1 -1
  11. package/src/components/colors.tsx +12 -3
  12. package/src/components/icons.tsx +49 -0
  13. package/src/components/semantic-color.tsx +25 -19
  14. package/src/components/token-analyzer.tsx +7 -5
  15. package/src/layouts/Layout.astro +1 -1
  16. package/styled-system/chunks/src__components__analyzer__category-utilities.css +21 -173
  17. package/styled-system/chunks/src__components__analyzer__data-combobox.css +60 -210
  18. package/styled-system/chunks/src__components__analyzer__report-item-columns.css +12 -4
  19. package/styled-system/chunks/src__components__analyzer__report-item-link.css +10 -106
  20. package/styled-system/chunks/src__components__analyzer__truncated-text.css +4 -16
  21. package/styled-system/chunks/src__components__analyzer__utility-details.css +32 -120
  22. package/styled-system/chunks/src__components__color-item.css +2 -2
  23. package/styled-system/chunks/src__components__colors.css +10 -2
  24. package/styled-system/chunks/src__components__semantic-color.css +28 -8
  25. package/styled-system/chunks/src__components__token-analyzer.css +18 -1361
  26. package/styled-system/styles.css +64 -94
  27. package/styled-system/types/pattern.d.ts +7 -6
  28. package/styled-system/jsx/absolute-center.d.ts +0 -8
  29. package/styled-system/jsx/absolute-center.mjs +0 -9
  30. package/styled-system/patterns/absolute-center.d.ts +0 -14
  31. package/styled-system/patterns/absolute-center.mjs +0 -23
@@ -11,6 +11,10 @@
11
11
  @import './tokens/keyframes.css';
12
12
 
13
13
  @layer utilities {
14
+ .w_26px {
15
+ width: 26px;
16
+ }
17
+
14
18
  .grid-cols_repeat\(2\,_minmax\(0\,_1fr\)\) {
15
19
  grid-template-columns: repeat(2, minmax(0, 1fr));
16
20
  }
@@ -23,44 +27,24 @@
23
27
  margin: var(--spacing-4);
24
28
  }
25
29
 
26
- .border_1px_solid_token\(colors\.blue\.400\,_blue\) {
27
- border: 1px solid var(--colors-blue-400, blue);
28
- }
29
-
30
- .border_1px_solid_token\(colors\.border\,_blue\) {
31
- border: 1px solid var(--colors-border, blue);
32
- }
33
-
34
- .transition_all_\.2s_ease {
35
- transition: all 0.2s ease;
36
- }
37
-
38
- .transition_outline_\.2s_ease {
39
- transition: outline 0.2s ease;
40
- }
41
-
42
- .highlighted\:opacity_0\.8[data-highlighted] {
43
- opacity: 0.8;
44
- }
45
-
46
- .highlighted\:ring_1px_solid_token\(colors\.blue\.400\,_blue\)[data-highlighted] {
47
- outline: 1px solid var(--colors-blue-400, blue);
48
- }
49
-
50
30
  .max-h_300px {
51
31
  max-height: 300px;
52
32
  }
53
33
 
54
- .border_1px_solid_token\(colors\.border\) {
55
- border: 1px solid var(--colors-border);
34
+ .word-wrap_break-word {
35
+ word-wrap: break-word;
56
36
  }
57
37
 
58
38
  .highlighted\:bg_border[data-highlighted] {
59
39
  background: var(--colors-border);
60
40
  }
61
41
 
62
- .mr_-2 {
63
- margin-right: calc(var(--spacing-2) * -1);
42
+ .border_solid_1px {
43
+ border: solid 1px;
44
+ }
45
+
46
+ .border-l_solid_1px {
47
+ border-left: solid 1px;
64
48
  }
65
49
 
66
50
  .max-w_14px {
@@ -71,8 +55,8 @@
71
55
  flex-shrink: 0;
72
56
  }
73
57
 
74
- .border_border {
75
- border: border;
58
+ .border_1px_solid_token\(colors\.border\) {
59
+ border: 1px solid var(--colors-border);
76
60
  }
77
61
 
78
62
  .text_red\.400 {
@@ -95,18 +79,10 @@
95
79
  margin-left: var(--spacing-1);
96
80
  }
97
81
 
98
- .bg_white {
99
- background-color: var(--colors-white);
100
- }
101
-
102
82
  .bg_card {
103
83
  background-color: var(--colors-card);
104
84
  }
105
85
 
106
- .bg_gray\.50 {
107
- background: var(--colors-gray-50);
108
- }
109
-
110
86
  .p_16 {
111
87
  padding: var(--spacing-16);
112
88
  }
@@ -115,14 +91,18 @@
115
91
  margin-top: var(--spacing-1);
116
92
  }
117
93
 
118
- .self_flex-end {
119
- align-self: flex-end;
120
- }
121
-
122
94
  .select_none {
123
95
  user-select: none;
124
96
  }
125
97
 
98
+ .px_3 {
99
+ padding-inline: var(--spacing-3);
100
+ }
101
+
102
+ .h_16 {
103
+ height: var(--sizes-16);
104
+ }
105
+
126
106
  .pt_16 {
127
107
  padding-top: var(--spacing-16);
128
108
  }
@@ -176,10 +156,6 @@
176
156
  margin-bottom: var(--spacing-2);
177
157
  }
178
158
 
179
- .opacity_0\.1 {
180
- opacity: 0.1;
181
- }
182
-
183
159
  .h_10 {
184
160
  height: var(--sizes-10);
185
161
  }
@@ -236,6 +212,10 @@
236
212
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
237
213
  }
238
214
 
215
+ .grid-cols_repeat\(auto-fit\,_minmax\(30rem\,_1fr\)\) {
216
+ grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
217
+ }
218
+
239
219
  .my_5 {
240
220
  margin-block: var(--spacing-5);
241
221
  }
@@ -272,10 +252,6 @@
272
252
  font-size: 24px;
273
253
  }
274
254
 
275
- .text_uppercase {
276
- text-transform: uppercase;
277
- }
278
-
279
255
  .justify_center {
280
256
  justify-content: center;
281
257
  }
@@ -374,6 +350,10 @@
374
350
  width: var(--sizes-60);
375
351
  }
376
352
 
353
+ .p_4 {
354
+ padding: var(--spacing-4);
355
+ }
356
+
377
357
  .\[\&_svg\]\:font_normal svg {
378
358
  font-weight: var(--font-weights-normal);
379
359
  }
@@ -486,6 +466,10 @@
486
466
  border-color: var(--colors-neutral-700);
487
467
  }
488
468
 
469
+ .text_uppercase {
470
+ text-transform: uppercase;
471
+ }
472
+
489
473
  .d_block {
490
474
  display: block;
491
475
  }
@@ -624,22 +608,6 @@
624
608
  padding-block: 20px;
625
609
  }
626
610
 
627
- .p_4 {
628
- padding: var(--spacing-4);
629
- }
630
-
631
- .debug_true {
632
- outline: 1px solid blue !important;
633
- }
634
-
635
- .debug_true > * {
636
- outline: 1px solid red !important;
637
- }
638
-
639
- .bg_white {
640
- background: var(--colors-white);
641
- }
642
-
643
611
  .p_4px_8px {
644
612
  padding: 4px 8px;
645
613
  }
@@ -668,12 +636,8 @@
668
636
  width: 100%;
669
637
  }
670
638
 
671
- .w_26px {
672
- width: 26px;
673
- }
674
-
675
- .text_text {
676
- color: var(--colors-text);
639
+ .w_5 {
640
+ width: var(--sizes-5);
677
641
  }
678
642
 
679
643
  .ml_auto {
@@ -716,10 +680,6 @@
716
680
  padding: 0;
717
681
  }
718
682
 
719
- .rounded_md {
720
- border-radius: var(--radii-md);
721
- }
722
-
723
683
  .py_2 {
724
684
  padding-block: var(--spacing-2);
725
685
  }
@@ -728,6 +688,10 @@
728
688
  transition: all 0.2s ease;
729
689
  }
730
690
 
691
+ .rounded_md {
692
+ border-radius: var(--radii-md);
693
+ }
694
+
731
695
  .bg_none {
732
696
  background: none;
733
697
  }
@@ -744,6 +708,10 @@
744
708
  padding-right: var(--spacing-4);
745
709
  }
746
710
 
711
+ .text_text {
712
+ color: var(--colors-text);
713
+ }
714
+
747
715
  .mb_4 {
748
716
  margin-bottom: var(--spacing-4);
749
717
  }
@@ -944,6 +912,15 @@
944
912
  width: var(--sizes-full);
945
913
  }
946
914
 
915
+ .focusWithin\:border_yellow\.200:focus-within {
916
+ border-color: var(--colors-yellow-200);
917
+ }
918
+
919
+ .focusWithin\:dark\:border_yellow\.300:focus-within.dark,
920
+ .dark .focusWithin\:dark\:border_yellow\.300:focus-within {
921
+ border-color: var(--colors-yellow-300);
922
+ }
923
+
947
924
  .focusWithin\:outline-style_solid:focus-within {
948
925
  outline-style: solid;
949
926
  }
@@ -960,12 +937,13 @@
960
937
  outline-color: var(--colors-neutral-400);
961
938
  }
962
939
 
963
- .focus\:border_1px_solid_token\(colors\.blue\.400\,_blue\):where(:focus, [data-focus]) {
964
- border: 1px solid var(--colors-blue-400, blue);
940
+ .focus\:ring_none:where(:focus, [data-focus]) {
941
+ outline: 2px solid transparent;
942
+ outline-offset: 2px;
965
943
  }
966
944
 
967
- .hover\:border_1px_solid_token\(colors\.blue\.400\,_blue\):where(:hover, [data-hover]) {
968
- border: 1px solid var(--colors-blue-400, blue);
945
+ .hover\:bg_gray\.100:where(:hover, [data-hover]) {
946
+ background-color: var(--colors-gray-100);
969
947
  }
970
948
 
971
949
  .hover\:shadow_lg:where(:hover, [data-hover]) {
@@ -976,18 +954,6 @@
976
954
  color: var(--colors-yellow-300);
977
955
  }
978
956
 
979
- .hover\:bg_bg:where(:hover, [data-hover]) {
980
- background: var(--colors-bg);
981
- }
982
-
983
- .hover\:bg_gray\.50:where(:hover, [data-hover]) {
984
- background-color: var(--colors-gray-50);
985
- }
986
-
987
- .hover\:bg_gray\.100:where(:hover, [data-hover]) {
988
- background-color: var(--colors-gray-100);
989
- }
990
-
991
957
  .hover\:opacity_0\.8:where(:hover, [data-hover]) {
992
958
  opacity: 0.8;
993
959
  }
@@ -996,8 +962,12 @@
996
962
  background-color: var(--colors-border);
997
963
  }
998
964
 
999
- .hover\:bg_gray\.100:where(:hover, [data-hover]) {
1000
- background: var(--colors-gray-100);
965
+ .hover\:bg_border:where(:hover, [data-hover]) {
966
+ background: var(--colors-border);
967
+ }
968
+
969
+ .hover\:opacity_0\.6:where(:hover, [data-hover]) {
970
+ opacity: 0.6;
1001
971
  }
1002
972
 
1003
973
  .hover\:opacity_1:where(:hover, [data-hover]) {
@@ -14,7 +14,11 @@ export type PatternHelpers = {
14
14
  map: (value: any, fn: (value: string) => string | undefined) => any
15
15
  }
16
16
 
17
- export type PatternConfig<T = PatternProperty> = {
17
+ type PatternProperties = Record<string, PatternProperty>
18
+
19
+ type Props<T> = Record<LiteralUnion<keyof T>, any>
20
+
21
+ export type PatternConfig<T extends PatternProperties = PatternProperties> = {
18
22
  /**
19
23
  * The description of the pattern. This will be used in the JSDoc comment.
20
24
  */
@@ -27,14 +31,11 @@ export type PatternConfig<T = PatternProperty> = {
27
31
  /**
28
32
  * The properties of the pattern.
29
33
  */
30
- properties: T extends Record<string, PatternProperty> ? T : Record<string, PatternProperty>
34
+ properties: T
31
35
  /**
32
36
  * The css object this pattern will generate.
33
37
  */
34
- transform?: (
35
- props: T extends Record<infer Keys, PatternProperty> ? Record<Keys, any> : Record<string, PatternProperty>,
36
- helpers: PatternHelpers,
37
- ) => SystemStyleObject
38
+ transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject
38
39
  /**
39
40
  * The jsx element name this pattern will generate.
40
41
  */
@@ -1,8 +0,0 @@
1
- import type { FunctionComponent } from 'react'
2
- import type { AbsoluteCenterProperties } from '../patterns/absolute-center'
3
- import type { HTMLPandaProps } from '../types/jsx'
4
-
5
- export type AbsoluteCenterProps = AbsoluteCenterProperties & Omit<HTMLPandaProps<'div'>, keyof AbsoluteCenterProperties >
6
-
7
-
8
- export declare const AbsoluteCenter: FunctionComponent<AbsoluteCenterProps>
@@ -1,9 +0,0 @@
1
- import { createElement, forwardRef } from 'react'
2
- import { panda } from './factory.mjs'
3
- import { getAbsoluteCenterStyle } from '../patterns/absolute-center.mjs'
4
-
5
- export const AbsoluteCenter = forwardRef(function AbsoluteCenter(props, ref) {
6
- const { axis, ...restProps } = props
7
- const styleProps = getAbsoluteCenterStyle({ axis })
8
- return createElement(panda.div, { ref, ...styleProps, ...restProps })
9
- })
@@ -1,14 +0,0 @@
1
- import type { SystemStyleObject, ConditionalValue } from '../types'
2
- import type { PropertyValue } from '../types/prop-type'
3
- import type { Properties } from '../types/csstype'
4
- import type { Tokens } from '../tokens'
5
-
6
- export type AbsoluteCenterProperties = {
7
- axis?: ConditionalValue<"x" | "y" | "both">
8
- }
9
-
10
-
11
- type AbsoluteCenterOptions = AbsoluteCenterProperties & Omit<SystemStyleObject, keyof AbsoluteCenterProperties >
12
-
13
-
14
- export declare function absoluteCenter(options?: AbsoluteCenterOptions): string
@@ -1,23 +0,0 @@
1
- import { mapObject } from '../helpers.mjs'
2
- import { css } from '../css/index.mjs'
3
-
4
- const absoluteCenterConfig = {
5
- transform(props, { map }) {
6
- const { axis = 'both', ...rest } = props
7
- return {
8
- position: 'absolute',
9
- insetBlockStart: map(axis, (v) => (v === 'x' ? 'auto' : '50%')),
10
- insetInlineStart: map(axis, (v) => (v === 'y' ? 'auto' : '50%')),
11
- transform: map(axis, (v) =>
12
- v === 'both' ? 'translate(-50%, -50%)' : v === 'x' ? 'translateX(-50%)' : 'translateY(-50%)',
13
- ),
14
- maxWidth: '100%',
15
- maxHeight: '100%',
16
- ...rest,
17
- }
18
- },
19
- }
20
-
21
- export const getAbsoluteCenterStyle = (styles = {}) => absoluteCenterConfig.transform(styles, { map: mapObject })
22
-
23
- export const absoluteCenter = (styles) => css(getAbsoluteCenterStyle(styles))