@pandacss/studio 0.4.0 → 0.5.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 (55) hide show
  1. package/{astro.config.ts → astro.config.mjs} +1 -1
  2. package/dist/studio.d.mts +13 -0
  3. package/dist/studio.js +11 -4
  4. package/dist/studio.mjs +12 -5
  5. package/package.json +15 -14
  6. package/styled-system/chunks/src__components__analyzer__category-utilities.css +97 -1
  7. package/styled-system/chunks/src__components__analyzer__data-combobox.css +41 -0
  8. package/styled-system/chunks/src__components__analyzer__file-details.css +54 -0
  9. package/styled-system/chunks/src__components__analyzer__report-item-columns.css +1 -0
  10. package/styled-system/chunks/src__components__analyzer__report-item-link.css +144 -0
  11. package/styled-system/chunks/src__components__analyzer__utility-details.css +97 -0
  12. package/styled-system/chunks/src__components__color-constrast.css +1 -2
  13. package/styled-system/chunks/src__components__color-wrapper.css +144 -0
  14. package/styled-system/chunks/src__components__colors.css +2 -2
  15. package/styled-system/chunks/src__components__font-tokens.css +1 -1
  16. package/styled-system/chunks/src__components__input.css +93 -0
  17. package/styled-system/chunks/src__components__layer-styles.css +39 -0
  18. package/styled-system/chunks/src__components__nav-item.css +108 -0
  19. package/styled-system/chunks/src__components__overview.css +37 -1
  20. package/styled-system/chunks/src__components__side-nav-item.css +36 -0
  21. package/styled-system/chunks/src__components__side-nav.css +2 -2
  22. package/styled-system/chunks/src__components__theme-toggle.css +18 -0
  23. package/styled-system/chunks/src__components__token-analyzer.css +223 -1
  24. package/styled-system/chunks/src__layouts__Sidebar.css +36 -0
  25. package/styled-system/css/cva.mjs +1 -1
  26. package/styled-system/helpers.mjs +40 -23
  27. package/styled-system/styles.css +7 -268
  28. package/styled-system/tokens/index.css +101 -30
  29. package/styled-system/tokens/index.mjs +322 -38
  30. package/styled-system/tokens/tokens.d.ts +3 -3
  31. package/styled-system/types/pattern.d.ts +1 -1
  32. package/styled-system/types/prop-type.d.ts +1 -1
  33. package/styled-system/types/system-types.d.ts +1 -1
  34. package/{virtual-panda.ts → virtual-panda.mjs} +9 -5
  35. package/styled-system/chunks/..__core____tests____atomic-rule.test.css +0 -363
  36. package/styled-system/chunks/src__components__analyzer__quick-tooltip.css +0 -2
  37. package/styled-system/chunks/src__components__analyzer__token-search-combobox.css +0 -2
  38. package/styled-system/chunks/src__layouts__Layout.css +0 -2
  39. package/styled-system/chunks/src__pages__colors.css +0 -2
  40. package/styled-system/chunks/src__pages__font-sizes.css +0 -2
  41. package/styled-system/chunks/src__pages__font-weights.css +0 -2
  42. package/styled-system/chunks/src__pages__fonts.css +0 -2
  43. package/styled-system/chunks/src__pages__index.css +0 -2
  44. package/styled-system/chunks/src__pages__layer-styles.css +0 -2
  45. package/styled-system/chunks/src__pages__letter-spacings.css +0 -2
  46. package/styled-system/chunks/src__pages__line-heights.css +0 -2
  47. package/styled-system/chunks/src__pages__playground__contrast-checker.css +0 -2
  48. package/styled-system/chunks/src__pages__playground__typography.css +0 -2
  49. package/styled-system/chunks/src__pages__radii.css +0 -2
  50. package/styled-system/chunks/src__pages__sizes.css +0 -2
  51. package/styled-system/chunks/src__pages__spacing.css +0 -2
  52. package/styled-system/chunks/src__pages__text-styles.css +0 -2
  53. package/styled-system/chunks/src__pages__token-analyzer__file.css +0 -2
  54. package/styled-system/chunks/src__pages__token-analyzer__index.css +0 -2
  55. package/styled-system/chunks/src__pages__token-analyzer__utility.css +0 -2
@@ -3,6 +3,204 @@
3
3
  padding-block: 20px;
4
4
  }
5
5
 
6
+ .\[\&_li\]\:cursor_pointer {
7
+ & li {
8
+ cursor: pointer;
9
+ }
10
+ }
11
+
12
+ .hover\:opacity_0\.8 {
13
+ &:where(:hover, [data-hover]) {
14
+ opacity: 0.8;
15
+ }
16
+ }
17
+
18
+ .hover\:bg_border {
19
+ &:where(:hover, [data-hover]) {
20
+ background-color: var(--colors-border);
21
+ }
22
+ }
23
+
24
+ .hover\:bg_border {
25
+ &:where(:hover, [data-hover]) {
26
+ background: var(--colors-border);
27
+ }
28
+ }
29
+
30
+ .hover\:opacity_0\.6 {
31
+ &:where(:hover, [data-hover]) {
32
+ opacity: 0.6;
33
+ }
34
+ }
35
+
36
+ .hover\:opacity_1 {
37
+ &:where(:hover, [data-hover]) {
38
+ opacity: 1;
39
+ }
40
+ }
41
+
42
+ .hover\:border-b_black {
43
+ &:where(:hover, [data-hover]) {
44
+ border-bottom-color: var(--colors-black);
45
+ }
46
+ }
47
+
48
+ .hover\:opacity_1 {
49
+ &:where(:hover, [data-hover]) {
50
+ opacity: 1;
51
+ }
52
+ }
53
+
54
+ .hover\:border-b_black {
55
+ &:where(:hover, [data-hover]) {
56
+ border-bottom-color: var(--colors-black);
57
+ }
58
+ }
59
+
60
+ .hover\:opacity_1 {
61
+ &:where(:hover, [data-hover]) {
62
+ opacity: 1;
63
+ }
64
+ }
65
+
66
+ .hover\:border-b_black {
67
+ &:where(:hover, [data-hover]) {
68
+ border-bottom-color: var(--colors-black);
69
+ }
70
+ }
71
+
72
+ .\[\&_li\]\:cursor_pointer {
73
+ & li {
74
+ cursor: pointer;
75
+ }
76
+ }
77
+
78
+ .hover\:opacity_0\.8 {
79
+ &:where(:hover, [data-hover]) {
80
+ opacity: 0.8;
81
+ }
82
+ }
83
+
84
+ .hover\:bg_border {
85
+ &:where(:hover, [data-hover]) {
86
+ background-color: var(--colors-border);
87
+ }
88
+ }
89
+
90
+ .hover\:bg_border {
91
+ &:where(:hover, [data-hover]) {
92
+ background: var(--colors-border);
93
+ }
94
+ }
95
+
96
+ .hover\:opacity_0\.6 {
97
+ &:where(:hover, [data-hover]) {
98
+ opacity: 0.6;
99
+ }
100
+ }
101
+
102
+ .hover\:opacity_1 {
103
+ &:where(:hover, [data-hover]) {
104
+ opacity: 1;
105
+ }
106
+ }
107
+
108
+ .hover\:border-b_black {
109
+ &:where(:hover, [data-hover]) {
110
+ border-bottom-color: var(--colors-black);
111
+ }
112
+ }
113
+
114
+ .hover\:opacity_1 {
115
+ &:where(:hover, [data-hover]) {
116
+ opacity: 1;
117
+ }
118
+ }
119
+
120
+ .hover\:border-b_black {
121
+ &:where(:hover, [data-hover]) {
122
+ border-bottom-color: var(--colors-black);
123
+ }
124
+ }
125
+
126
+ .hover\:opacity_1 {
127
+ &:where(:hover, [data-hover]) {
128
+ opacity: 1;
129
+ }
130
+ }
131
+
132
+ .hover\:border-b_black {
133
+ &:where(:hover, [data-hover]) {
134
+ border-bottom-color: var(--colors-black);
135
+ }
136
+ }
137
+
138
+ .\[\&_li\]\:cursor_pointer {
139
+ & li {
140
+ cursor: pointer;
141
+ }
142
+ }
143
+
144
+ .hover\:opacity_0\.8 {
145
+ &:where(:hover, [data-hover]) {
146
+ opacity: 0.8;
147
+ }
148
+ }
149
+
150
+ .hover\:bg_border {
151
+ &:where(:hover, [data-hover]) {
152
+ background-color: var(--colors-border);
153
+ }
154
+ }
155
+
156
+ .hover\:bg_border {
157
+ &:where(:hover, [data-hover]) {
158
+ background: var(--colors-border);
159
+ }
160
+ }
161
+
162
+ .hover\:opacity_0\.6 {
163
+ &:where(:hover, [data-hover]) {
164
+ opacity: 0.6;
165
+ }
166
+ }
167
+
168
+ .hover\:opacity_1 {
169
+ &:where(:hover, [data-hover]) {
170
+ opacity: 1;
171
+ }
172
+ }
173
+
174
+ .hover\:border-b_black {
175
+ &:where(:hover, [data-hover]) {
176
+ border-bottom-color: var(--colors-black);
177
+ }
178
+ }
179
+
180
+ .hover\:opacity_1 {
181
+ &:where(:hover, [data-hover]) {
182
+ opacity: 1;
183
+ }
184
+ }
185
+
186
+ .hover\:border-b_black {
187
+ &:where(:hover, [data-hover]) {
188
+ border-bottom-color: var(--colors-black);
189
+ }
190
+ }
191
+
192
+ .hover\:opacity_1 {
193
+ &:where(:hover, [data-hover]) {
194
+ opacity: 1;
195
+ }
196
+ }
197
+
198
+ .hover\:border-b_black {
199
+ &:where(:hover, [data-hover]) {
200
+ border-bottom-color: var(--colors-black);
201
+ }
202
+ }
203
+
6
204
  .p_4px_8px {
7
205
  padding: 4px 8px;
8
206
  }
@@ -88,7 +286,7 @@
88
286
  }
89
287
 
90
288
  .p_0 {
91
- padding: 0;
289
+ padding: var(--spacing-0);
92
290
  }
93
291
 
94
292
  .hover\:bg_border {
@@ -260,4 +458,28 @@
260
458
  }
261
459
  }
262
460
  }
461
+
462
+ .\[\&_li\]\:hover\:opacity_0\.8 {
463
+ & li {
464
+ &:where(:hover, [data-hover]) {
465
+ opacity: 0.8;
466
+ }
467
+ }
468
+ }
469
+
470
+ .\[\&_li\]\:hover\:opacity_0\.8 {
471
+ & li {
472
+ &:where(:hover, [data-hover]) {
473
+ opacity: 0.8;
474
+ }
475
+ }
476
+ }
477
+
478
+ .\[\&_li\]\:hover\:opacity_0\.8 {
479
+ & li {
480
+ &:where(:hover, [data-hover]) {
481
+ opacity: 0.8;
482
+ }
483
+ }
484
+ }
263
485
  }
@@ -110,4 +110,40 @@
110
110
  padding-inline: var(--spacing-8);
111
111
  }
112
112
  }
113
+
114
+ .md\:px_6 {
115
+ @media screen and (min-width: 768px) {
116
+ padding-inline: var(--spacing-6);
117
+ }
118
+ }
119
+
120
+ .lg\:px_8 {
121
+ @media screen and (min-width: 1024px) {
122
+ padding-inline: var(--spacing-8);
123
+ }
124
+ }
125
+
126
+ .md\:px_6 {
127
+ @media screen and (min-width: 768px) {
128
+ padding-inline: var(--spacing-6);
129
+ }
130
+ }
131
+
132
+ .lg\:px_8 {
133
+ @media screen and (min-width: 1024px) {
134
+ padding-inline: var(--spacing-8);
135
+ }
136
+ }
137
+
138
+ .md\:px_6 {
139
+ @media screen and (min-width: 768px) {
140
+ padding-inline: var(--spacing-6);
141
+ }
142
+ }
143
+
144
+ .lg\:px_8 {
145
+ @media screen and (min-width: 1024px) {
146
+ padding-inline: var(--spacing-8);
147
+ }
148
+ }
113
149
  }
@@ -30,7 +30,7 @@ export function cva(config) {
30
30
 
31
31
  return Object.assign(cvaFn, {
32
32
  __cva__: true,
33
- variants: variantMap,
33
+ variantMap,
34
34
  variantKeys,
35
35
  resolve,
36
36
  config,
@@ -3,6 +3,18 @@ function isObject(value) {
3
3
  return typeof value === 'object' && value != null && !Array.isArray(value)
4
4
  }
5
5
 
6
+ // src/astish.ts
7
+ var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g
8
+ var ruleClean = /\/\*[^]*?\*\/|\s\s+|\n/g
9
+ var astish = (val, tree = [{}]) => {
10
+ const block = newRule.exec((val ?? '').replace(ruleClean, ''))
11
+ if (!block) return tree[0]
12
+ if (block[4]) tree.shift()
13
+ else if (block[3]) tree.unshift((tree[0][block[3]] = tree[0][block[3]] || {}))
14
+ else tree[0][block[1]] = block[2]
15
+ return astish(val, tree)
16
+ }
17
+
6
18
  // src/compact.ts
7
19
  function compact(value) {
8
20
  return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0))
@@ -61,6 +73,7 @@ function mergeProps(...sources) {
61
73
  }
62
74
 
63
75
  // src/walk-object.ts
76
+ var isNotNullish = (element) => element != null
64
77
  function walkObject(target, predicate, options = {}) {
65
78
  const { stop, getKey } = options
66
79
  function inner(value, path = []) {
@@ -72,7 +85,10 @@ function walkObject(target, predicate, options = {}) {
72
85
  if (stop?.(value, childPath)) {
73
86
  return predicate(value, path)
74
87
  }
75
- result[key] = inner(child, childPath)
88
+ const next = inner(child, childPath)
89
+ if (isNotNullish(next)) {
90
+ result[key] = next
91
+ }
76
92
  }
77
93
  return result
78
94
  }
@@ -175,6 +191,28 @@ function createMergeCss(context) {
175
191
  return { mergeCss, assignCss }
176
192
  }
177
193
 
194
+ // src/memo.ts
195
+ var memo = (fn) => {
196
+ const cache = /* @__PURE__ */ new Map()
197
+ const get = (...args) => {
198
+ const key = JSON.stringify(args)
199
+ if (cache.has(key)) {
200
+ return cache.get(key)
201
+ }
202
+ const result = fn(...args)
203
+ cache.set(key, result)
204
+ return result
205
+ }
206
+ return get
207
+ }
208
+
209
+ // src/hypenate.ts
210
+ var dashCaseRegex = /[A-Z]/g
211
+ var hypenateProperty = memo((property) => {
212
+ if (property.startsWith('--')) return property
213
+ return property.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`)
214
+ })
215
+
178
216
  // src/normalize-html.ts
179
217
  var htmlProps = ['htmlSize', 'htmlTranslate', 'htmlWidth', 'htmlHeight']
180
218
  function convert(key) {
@@ -203,29 +241,8 @@ function splitProps(props, ...keys) {
203
241
  const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key))
204
242
  return keys.map(fn).concat(split(dKeys))
205
243
  }
206
-
207
- // src/memo.ts
208
- var memo = (fn) => {
209
- const cache = /* @__PURE__ */ new Map()
210
- const get = (...args) => {
211
- const key = JSON.stringify(args)
212
- if (cache.has(key)) {
213
- return cache.get(key)
214
- }
215
- const result = fn(...args)
216
- cache.set(key, result)
217
- return result
218
- }
219
- return get
220
- }
221
-
222
- // src/hypenate.ts
223
- var dashCaseRegex = /[A-Z]/g
224
- var hypenateProperty = memo((property) => {
225
- if (property.startsWith('--')) return property
226
- return property.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`)
227
- })
228
244
  export {
245
+ astish,
229
246
  compact,
230
247
  createCss,
231
248
  createMergeCss,