@pandacss/studio 0.15.3 → 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 (59) 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 +28 -15
  23. package/styled-system/styles.css +50 -319
  24. package/styled-system/types/jsx.d.ts +10 -2
  25. package/virtual-panda.ts +2 -12
  26. package/src/components/analyzer/category-utilities.tsx +0 -156
  27. package/src/components/analyzer/data-combobox.tsx +0 -154
  28. package/src/components/analyzer/data-table.tsx +0 -39
  29. package/src/components/analyzer/external-icon.tsx +0 -8
  30. package/src/components/analyzer/file-details.tsx +0 -101
  31. package/src/components/analyzer/get-report-infos-from.ts +0 -80
  32. package/src/components/analyzer/quick-tooltip.tsx +0 -15
  33. package/src/components/analyzer/report-item-columns.tsx +0 -52
  34. package/src/components/analyzer/report-item-link.tsx +0 -98
  35. package/src/components/analyzer/section.tsx +0 -24
  36. package/src/components/analyzer/sort-icon.tsx +0 -10
  37. package/src/components/analyzer/text-with-count.tsx +0 -28
  38. package/src/components/analyzer/token-search-combobox.tsx +0 -39
  39. package/src/components/analyzer/truncated-text.tsx +0 -28
  40. package/src/components/analyzer/utility-details.tsx +0 -325
  41. package/src/components/color-item.tsx +0 -37
  42. package/src/components/token-analyzer.tsx +0 -397
  43. package/src/lib/analysis-data.ts +0 -17
  44. package/src/lib/get-report-item.tsx +0 -41
  45. package/src/pages/token-analyzer/file.astro +0 -11
  46. package/src/pages/token-analyzer/index.astro +0 -11
  47. package/src/pages/token-analyzer/utility.astro +0 -11
  48. package/styled-system/chunks/src__components__analyzer__category-utilities.css +0 -118
  49. package/styled-system/chunks/src__components__analyzer__data-combobox.css +0 -137
  50. package/styled-system/chunks/src__components__analyzer__data-table.css +0 -46
  51. package/styled-system/chunks/src__components__analyzer__file-details.css +0 -98
  52. package/styled-system/chunks/src__components__analyzer__report-item-columns.css +0 -39
  53. package/styled-system/chunks/src__components__analyzer__report-item-link.css +0 -78
  54. package/styled-system/chunks/src__components__analyzer__section.css +0 -30
  55. package/styled-system/chunks/src__components__analyzer__text-with-count.css +0 -34
  56. package/styled-system/chunks/src__components__analyzer__truncated-text.css +0 -18
  57. package/styled-system/chunks/src__components__analyzer__utility-details.css +0 -139
  58. package/styled-system/chunks/src__components__color-item.css +0 -22
  59. package/styled-system/chunks/src__components__token-analyzer.css +0 -220
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/studio",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "description": "The automated token documentation for Panda CSS",
5
5
  "main": "dist/studio.js",
6
6
  "module": "dist/studio.mjs",
@@ -33,19 +33,19 @@
33
33
  "react": "18.2.0",
34
34
  "react-dom": "18.2.0",
35
35
  "vite": "4.4.9",
36
- "@pandacss/config": "0.15.3",
37
- "@pandacss/logger": "0.15.3",
38
- "@pandacss/node": "0.15.3",
39
- "@pandacss/shared": "0.15.3",
40
- "@pandacss/token-dictionary": "0.15.3",
41
- "@pandacss/types": "0.15.3"
36
+ "@pandacss/config": "0.15.4",
37
+ "@pandacss/logger": "0.15.4",
38
+ "@pandacss/node": "0.15.4",
39
+ "@pandacss/shared": "0.15.4",
40
+ "@pandacss/token-dictionary": "0.15.4",
41
+ "@pandacss/types": "0.15.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "18.2.22",
45
45
  "@types/react-dom": "18.2.7",
46
46
  "@vitejs/plugin-react": "4.0.4",
47
47
  "execa": "7.2.0",
48
- "@pandacss/dev": "0.15.3"
48
+ "@pandacss/dev": "0.15.4"
49
49
  },
50
50
  "scripts": {
51
51
  "codegen": "panda",
@@ -3,8 +3,6 @@ import { TokenDictionary } from '@pandacss/token-dictionary'
3
3
  import type { TokenDataTypes } from '@pandacss/types'
4
4
  import { config } from 'virtual:panda'
5
5
 
6
- // console.log('_config', config)
7
-
8
6
  const { theme } = config
9
7
 
10
8
  const context = {
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .w_full {
4
3
  width: var(--sizes-full)
5
4
  }
@@ -23,36 +22,28 @@
23
22
  .shadow_inset {
24
23
  box-shadow: var(--shadows-inset)
25
24
  }
26
-
27
- .before\:content_\'\'::before {
28
- content: ''
25
+ .before\:content_\'\'::before {
26
+ content: ''
29
27
  }
30
-
31
- .before\:pos_absolute::before {
32
- position: absolute
28
+ .before\:pos_absolute::before {
29
+ position: absolute
33
30
  }
34
-
35
- .before\:rounded_sm::before {
36
- border-radius: var(--radii-sm)
31
+ .before\:rounded_sm::before {
32
+ border-radius: var(--radii-sm)
37
33
  }
38
-
39
- .before\:w_100\%::before {
40
- width: 100%
34
+ .before\:w_100\%::before {
35
+ width: 100%
41
36
  }
42
-
43
- .before\:h_100\%::before {
44
- height: 100%
37
+ .before\:h_100\%::before {
38
+ height: 100%
45
39
  }
46
-
47
- .before\:bg_24px::before {
48
- background-size: 24px
40
+ .before\:bg_24px::before {
41
+ background-size: 24px
49
42
  }
50
-
51
- .before\:z_-1::before {
52
- z-index: -1
43
+ .before\:z_-1::before {
44
+ z-index: -1
53
45
  }
54
-
55
- .before\:bg-img_check::before {
56
- background-image: var(--assets-check)
46
+ .before\:bg-img_check::before {
47
+ background-image: var(--assets-check)
57
48
  }
58
49
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .font_semibold {
4
3
  font-weight: var(--font-weights-semibold)
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .fs_5xl {
4
3
  font-size: var(--font-sizes-5xl)
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .fs_100px {
4
3
  font-size: 100px
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .mb_3\.5 {
4
3
  margin-bottom: var(--spacing-3\.5)
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .bg_transparent {
4
3
  background: var(--colors-transparent)
5
4
  }
@@ -23,9 +22,8 @@
23
22
  .text_neutral\.600 {
24
23
  color: var(--colors-neutral-600)
25
24
  }
26
-
27
- .dark\:text_neutral\.300.dark, .dark .dark\:text_neutral\.300 {
28
- color: var(--colors-neutral-300)
25
+ .dark\:text_neutral\.300.dark, .dark .dark\:text_neutral\.300 {
26
+ color: var(--colors-neutral-300)
29
27
  }
30
28
 
31
29
  .shadow_sm {
@@ -39,20 +37,16 @@
39
37
  .border_border {
40
38
  border-color: var(--colors-border)
41
39
  }
42
-
43
- .focusWithin\:outline-style_solid:focus-within {
44
- outline-style: solid
40
+ .focusWithin\:outline-style_solid:focus-within {
41
+ outline-style: solid
45
42
  }
46
-
47
- .focusWithin\:ring_2px:focus-within {
48
- outline-width: 2px
43
+ .focusWithin\:ring_2px:focus-within {
44
+ outline-width: 2px
49
45
  }
50
-
51
- .focusWithin\:ring_2px:focus-within {
52
- outline-offset: 2px
46
+ .focusWithin\:ring_2px:focus-within {
47
+ outline-offset: 2px
53
48
  }
54
-
55
- .focusWithin\:ring_neutral\.400:focus-within {
56
- outline-color: var(--colors-neutral-400)
49
+ .focusWithin\:ring_neutral\.400:focus-within {
50
+ outline-color: var(--colors-neutral-400)
57
51
  }
58
52
  }
@@ -1,12 +1,10 @@
1
1
  @layer utilities {
2
-
3
- .divide-y_1px > :not([hidden]) ~ :not([hidden]) {
4
- border-top-width: 1px;
5
- border-bottom-width: 0px
2
+ .divide-y_1px > :not([hidden]) ~ :not([hidden]) {
3
+ border-top-width: 1px;
4
+ border-bottom-width: 0px
6
5
  }
7
-
8
- .divide_card > :not([hidden]) ~ :not([hidden]) {
9
- border-color: var(--colors-card)
6
+ .divide_card > :not([hidden]) ~ :not([hidden]) {
7
+ border-color: var(--colors-card)
10
8
  }
11
9
 
12
10
  .px_1 {
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .w_60 {
4
3
  width: var(--sizes-60)
5
4
  }
@@ -19,6 +18,9 @@
19
18
  .transition_all_0\.2s_ease {
20
19
  transition: all 0.2s ease
21
20
  }
21
+ .hover\:shadow_lg:is(:hover, [data-hover]) {
22
+ box-shadow: var(--shadows-lg)
23
+ }
22
24
  .\[\&_svg\]\:font_normal svg {
23
25
  font-weight: var(--font-weights-normal)
24
26
  }
@@ -50,8 +52,4 @@
50
52
  .mt_3 {
51
53
  margin-top: var(--spacing-3)
52
54
  }
53
-
54
- .hover\:shadow_lg:is(:hover, [data-hover]) {
55
- box-shadow: var(--shadows-lg)
56
- }
57
55
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .bg_\#646cff {
4
3
  background: #646cff
5
4
  }
@@ -111,12 +110,10 @@
111
110
  .p_0 {
112
111
  padding: var(--spacing-0)
113
112
  }
114
-
115
- .\[\&\:hover\]\:bg_\#4049f0:hover {
116
- background: #4049f0
113
+ .\[\&\:hover\]\:bg_\#4049f0:hover {
114
+ background: #4049f0
117
115
  }
118
-
119
- .\[\&\:hover\]\:shadow_lg:hover {
120
- box-shadow: var(--shadows-lg)
116
+ .\[\&\:hover\]\:shadow_lg:hover {
117
+ box-shadow: var(--shadows-lg)
121
118
  }
122
119
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .w_80px {
4
3
  width: 80px
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .h_12 {
4
3
  height: var(--sizes-12)
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .d_block {
4
3
  display: block
5
4
  }
@@ -19,12 +18,10 @@
19
18
  .font_medium {
20
19
  font-weight: var(--font-weights-medium)
21
20
  }
22
-
23
- .currentPage\:text_yellow\.300[aria-current=page] {
24
- color: var(--colors-yellow-300)
21
+ .hover\:text_yellow\.300:is(:hover, [data-hover]) {
22
+ color: var(--colors-yellow-300)
25
23
  }
26
-
27
- .hover\:text_yellow\.300:is(:hover, [data-hover]) {
28
- color: var(--colors-yellow-300)
24
+ .currentPage\:text_yellow\.300[aria-current=page] {
25
+ color: var(--colors-yellow-300)
29
26
  }
30
27
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .mt_8 {
4
3
  margin-top: var(--spacing-8)
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .px_1 {
4
3
  padding-inline: var(--spacing-1)
5
4
  }
@@ -1,11 +1,9 @@
1
1
  @layer utilities {
2
-
3
2
  .cursor_pointer {
4
3
  cursor: pointer
5
4
  }
6
-
7
- .\[\&\.active\]\:text_yellow\.300.active {
8
- color: var(--colors-yellow-300)
5
+ .\[\&\.active\]\:text_yellow\.300.active {
6
+ color: var(--colors-yellow-300)
9
7
  }
10
8
 
11
9
  .sr_true {
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .d_flex {
4
3
  display: flex
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .d_flex {
4
3
  display: flex
5
4
  }
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
-
3
2
  .bg_card {
4
3
  background: var(--colors-card)
5
4
  }
@@ -99,15 +99,15 @@
99
99
  .overflow_auto {
100
100
  overflow: auto
101
101
  }
102
+ @media screen and (min-width: 48em) {
102
103
 
103
- @media screen and (min-width: 48em) {
104
- .md\:px_6 {
104
+ .md\:px_6 {
105
105
  padding-inline: var(--spacing-6)
106
106
  }
107
107
  }
108
+ @media screen and (min-width: 64em) {
108
109
 
109
- @media screen and (min-width: 64em) {
110
- .lg\:px_8 {
110
+ .lg\:px_8 {
111
111
  padding-inline: var(--spacing-8)
112
112
  }
113
113
  }
@@ -3,35 +3,48 @@ import { css, cx, cva } from '../css/index.mjs';
3
3
  import { splitProps, normalizeHTMLProps } from '../helpers.mjs';
4
4
  import { isCssProperty } from './is-valid-prop.mjs';
5
5
 
6
- function styledFn(Dynamic, configOrCva = {}) {
6
+ const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop)
7
+
8
+ function styledFn(Dynamic, configOrCva = {}, options = {}) {
7
9
  const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva)
8
10
 
11
+ const forwardFn = options.shouldForwardProp || defaultShouldForwardProp
12
+ const shouldForwardProp = (prop) => forwardFn(prop, cvaFn.variantKeys)
13
+
14
+ const defaultProps = Object.assign(
15
+ options.dataAttr && configOrCva.__name__ ? { 'data-recipe': configOrCva.__name__ } : {},
16
+ options.defaultProps,
17
+ )
18
+
9
19
  const PandaComponent = /* @__PURE__ */ forwardRef(function PandaComponent(props, ref) {
10
- const { as: Element = Dynamic, ...restProps } = props
20
+ const { as: Element = Dynamic, children, ...restProps } = props
11
21
 
12
- const [variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
13
- return splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
14
- }, [restProps])
22
+ const combinedProps = useMemo(() => Object.assign({}, defaultProps, restProps), [restProps])
15
23
 
16
- function recipeClass() {
17
- const { css: cssStyles, ...propStyles } = styleProps
18
- const compoundVariantStyles = cvaFn.__getCompoundVariantCss__?.(variantProps);
19
- return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), elementProps.className)
20
- }
24
+ const [forwardedProps, variantProps, styleProps, htmlProps, elementProps] = useMemo(() => {
25
+ return splitProps(combinedProps, shouldForwardProp, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
26
+ }, [combinedProps])
21
27
 
22
- function cvaClass() {
23
- const { css: cssStyles, ...propStyles } = styleProps
24
- const cvaStyles = cvaFn.raw(variantProps)
25
- return cx(css(cvaStyles, propStyles, cssStyles), elementProps.className)
26
- }
28
+ function recipeClass() {
29
+ const { css: cssStyles, ...propStyles } = styleProps
30
+ const compoundVariantStyles = cvaFn.__getCompoundVariantCss__?.(variantProps);
31
+ return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), combinedProps.className)
32
+ }
27
33
 
34
+ function cvaClass() {
35
+ const { css: cssStyles, ...propStyles } = styleProps
36
+ const cvaStyles = cvaFn.raw(variantProps)
37
+ return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className)
38
+ }
28
39
 
29
40
  const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
30
41
 
31
42
  return createElement(Element, {
32
43
  ref,
44
+ ...forwardedProps,
33
45
  ...elementProps,
34
46
  ...normalizeHTMLProps(htmlProps),
47
+ children,
35
48
  className: classes(),
36
49
  })
37
50
  })