@pandacss/studio 0.0.0-dev-20230614111156 → 0.0.0-dev-20230614113002

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/studio",
3
- "version": "0.0.0-dev-20230614111156",
3
+ "version": "0.0.0-dev-20230614113002",
4
4
  "description": "The automated token documentation for Panda CSS",
5
5
  "main": "dist/studio.js",
6
6
  "module": "dist/studio.mjs",
@@ -32,19 +32,19 @@
32
32
  "react": "18.2.0",
33
33
  "react-dom": "18.2.0",
34
34
  "vite": "4.3.9",
35
- "@pandacss/types": "0.0.0-dev-20230614111156",
36
- "@pandacss/config": "0.0.0-dev-20230614111156",
37
- "@pandacss/shared": "0.0.0-dev-20230614111156",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20230614111156",
39
- "@pandacss/logger": "0.0.0-dev-20230614111156",
40
- "@pandacss/node": "0.0.0-dev-20230614111156"
35
+ "@pandacss/types": "0.0.0-dev-20230614113002",
36
+ "@pandacss/config": "0.0.0-dev-20230614113002",
37
+ "@pandacss/shared": "0.0.0-dev-20230614113002",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20230614113002",
39
+ "@pandacss/logger": "0.0.0-dev-20230614113002",
40
+ "@pandacss/node": "0.0.0-dev-20230614113002"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/react": "18.2.12",
44
44
  "@types/react-dom": "18.2.5",
45
45
  "@vitejs/plugin-react": "4.0.0",
46
46
  "execa": "7.1.1",
47
- "@pandacss/dev": "0.0.0-dev-20230614111156"
47
+ "@pandacss/dev": "0.0.0-dev-20230614113002"
48
48
  },
49
49
  "scripts": {
50
50
  "codegen": "panda",
@@ -1,4 +1,4 @@
1
- import { Grid, panda, Wrap } from '../../../styled-system/jsx'
1
+ import { Grid, panda, Stack, Wrap } from '../../../styled-system/jsx'
2
2
  import { gridItem, styledLink } from '../../../styled-system/patterns'
3
3
  import { getReportItem, getUtilityLink } from '../../lib/get-report-item'
4
4
  import { groupBy } from '../../lib/group-in'
@@ -121,11 +121,11 @@ const CategoryUtilities = ({
121
121
  })
122
122
 
123
123
  return (
124
- <panda.div key={category} p="4" bg="gray.50" className={className}>
124
+ <Stack key={category} p="4" bg="card" color="text" gap="2" className={className}>
125
125
  <panda.h4>
126
126
  <panda.a className={styledLink({})} href={getUtilityLink({ category })}>
127
127
  <TextWithCount count={values.length}>
128
- <TruncatedText text={category} />
128
+ <TruncatedText text={category} fontWeight="semibold" />
129
129
  </TextWithCount>
130
130
  </panda.a>
131
131
  </panda.h4>
@@ -141,6 +141,6 @@ const CategoryUtilities = ({
141
141
  )
142
142
  })}
143
143
  </Wrap>
144
- </panda.div>
144
+ </Stack>
145
145
  )
146
146
  }
@@ -39,7 +39,7 @@ export const DataCombobox = ({ options: allOptions, label, ...props }: DataCombo
39
39
  }, [allOptions])
40
40
 
41
41
  return (
42
- <Combobox openOnClick {...props}>
42
+ <Combobox openOnClick {...props} className={css({ m: 4 })}>
43
43
  {(state: any) => {
44
44
  return (
45
45
  <>
@@ -50,11 +50,16 @@ export const DataCombobox = ({ options: allOptions, label, ...props }: DataCombo
50
50
  <panda.span fontWeight="bold">{label}</panda.span>
51
51
  </ComboboxLabel>
52
52
  )}
53
- <panda.div display="flex" border="1px solid token(colors.blue.400, blue)">
53
+ <panda.div
54
+ display="flex"
55
+ _focus={{
56
+ border: '1px solid token(colors.blue.400, blue)',
57
+ }}
58
+ >
54
59
  <ComboboxInput
55
60
  defaultValue={props.defaultValue}
56
61
  placeholder={props.placeholder ?? 'Search...'}
57
- className={css({ width: 'full' })}
62
+ className={css({ width: 'full', p: 2 })}
58
63
  onChange={(e) => {
59
64
  const value = e.target.value
60
65
  if (!value) {
@@ -95,9 +100,10 @@ export const DataCombobox = ({ options: allOptions, label, ...props }: DataCombo
95
100
  maxHeight: '300px',
96
101
  overflow: 'auto',
97
102
  padding: '4px 8px',
98
- bg: 'white',
103
+ bg: 'card',
99
104
  listStyle: 'none',
100
- border: '1px solid token(colors.blue.400, blue)',
105
+ rounded: 'md',
106
+ border: '1px solid token(colors.border)',
101
107
  })}
102
108
  >
103
109
  {/* TODO virtualization */}
@@ -109,7 +115,7 @@ export const DataCombobox = ({ options: allOptions, label, ...props }: DataCombo
109
115
  className={css({
110
116
  padding: '4px 8px',
111
117
  _highlighted: {
112
- outline: '1px solid token(colors.blue.400, blue)',
118
+ bg: 'border',
113
119
  },
114
120
  })}
115
121
  />
@@ -78,7 +78,7 @@ export const ReportItemOpenInEditorLink = ({ withRange, ...reportItem }: ReportI
78
78
  </panda.a>
79
79
  <QuickTooltip
80
80
  tooltip={
81
- <panda.span p="2" bgColor="white" border="1px solid rgba(0, 0, 0, 0.1)">
81
+ <panda.span p="2" bgColor="card" border="border">
82
82
  Click to open in editor
83
83
  </panda.span>
84
84
  }
@@ -1,7 +1,10 @@
1
1
  export const SortIcon = () => {
2
2
  return (
3
3
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
4
- <path d="M15.344 17.778a.75.75 0 0 0-.75-.75h-5.16a.75.75 0 0 0 0 1.5h5.16a.75.75 0 0 0 .75-.75zm2.206-4a.75.75 0 0 0-.75-.75H7.204a.75.75 0 0 0 0 1.5H16.8a.75.75 0 0 0 .75-.75zm2.45-4a.75.75 0 0 0-.75-.75H4.75a.75.75 0 0 0 0 1.5h14.5a.75.75 0 0 0 .75-.75zm2-4a.75.75 0 0 0-.75-.75H2.75a.75.75 0 0 0 0 1.5h18.5a.75.75 0 0 0 .75-.75z" />
4
+ <path
5
+ d="M15.344 17.778a.75.75 0 0 0-.75-.75h-5.16a.75.75 0 0 0 0 1.5h5.16a.75.75 0 0 0 .75-.75zm2.206-4a.75.75 0 0 0-.75-.75H7.204a.75.75 0 0 0 0 1.5H16.8a.75.75 0 0 0 .75-.75zm2.45-4a.75.75 0 0 0-.75-.75H4.75a.75.75 0 0 0 0 1.5h14.5a.75.75 0 0 0 .75-.75zm2-4a.75.75 0 0 0-.75-.75H2.75a.75.75 0 0 0 0 1.5h18.5a.75.75 0 0 0 .75-.75z"
6
+ stroke="currentColor"
7
+ />
5
8
  </svg>
6
9
  )
7
10
  }
@@ -12,7 +12,7 @@ export const TruncatedText = ({
12
12
  return (
13
13
  <QuickTooltip
14
14
  tooltip={
15
- <panda.span p="2" bgColor="white" border="1px solid rgba(0, 0, 0, 0.1)">
15
+ <panda.span p="2" bgColor="card" border="1px solid rgba(0, 0, 0, 0.1)">
16
16
  {truncate(text, 80)}
17
17
  </panda.span>
18
18
  }
@@ -22,5 +22,5 @@ export const TruncatedText = ({
22
22
  )
23
23
  }
24
24
 
25
- return text as unknown as JSX.Element
25
+ return <panda.span {...props}>{text}</panda.span>
26
26
  }
@@ -223,7 +223,14 @@ const UsedInFiles = () => {
223
223
  )
224
224
  }
225
225
 
226
- const selectOptionClass = css({ padding: '4px 8px', bg: 'white' })
226
+ const selectOptionClass = css({
227
+ padding: '4px 8px',
228
+ rounded: 'md',
229
+ '& li': {
230
+ cursor: 'pointer',
231
+ _hover: { opacity: 0.8 },
232
+ },
233
+ })
227
234
 
228
235
  const ReportItemMatchingFiltersTable = (infos: Infos) => {
229
236
  const tokenName = infos.params.value
@@ -252,7 +259,7 @@ const ReportItemMatchingFiltersTable = (infos: Infos) => {
252
259
  Found ({infos[value].length}) matches{' '}
253
260
  </panda.span>
254
261
  }
255
- bg="gray.50"
262
+ bg="card"
256
263
  >
257
264
  <DataTable list={infos[value]} columns={columns} />
258
265
  <>
@@ -152,7 +152,11 @@ const HeadlineSummary = () => {
152
152
 
153
153
  const selectOptionClass = css({
154
154
  padding: '4px 8px',
155
- bg: 'white',
155
+ rounded: 'md',
156
+ '& li': {
157
+ cursor: 'pointer',
158
+ _hover: { opacity: 0.8 },
159
+ },
156
160
  })
157
161
 
158
162
  const MostUsedList = () => {
@@ -169,7 +173,7 @@ const MostUsedList = () => {
169
173
  </SelectTrigger>
170
174
  </>
171
175
  }
172
- bg="gray.50"
176
+ bg="card"
173
177
  >
174
178
  {mostUsedByName[selectedOption?.value as keyof typeof mostUsedByName]}
175
179
  <>
@@ -231,7 +235,7 @@ const ColorPalette = () => {
231
235
  return (
232
236
  <Section
233
237
  title={<TextWithCount count={analysisData.stats.mostUseds.colors.length}>Color palette</TextWithCount>}
234
- bg="gray.50"
238
+ bg="card"
235
239
  >
236
240
  <Wrap gap="2" fontSize="sm">
237
241
  {analysisData.stats.mostUseds.colors.map(({ key, count }) => (
@@ -241,7 +245,8 @@ const ColorPalette = () => {
241
245
  py="2"
242
246
  px="4"
243
247
  transition="all 0.2s ease"
244
- _hover={{ bgColor: 'gray.100' }}
248
+ rounded="md"
249
+ _hover={{ bgColor: 'border' }}
245
250
  >
246
251
  <TextWithCount count={count}>
247
252
  <TruncatedText text={key} />
@@ -281,14 +286,14 @@ const FilesAccordionList = () => {
281
286
  <SelectTrigger>
282
287
  <panda.button display="flex" alignItems="center">
283
288
  Sort by {selectedOption?.label}
284
- <panda.div w="26px" ml="2">
289
+ <panda.div w="26px" ml="2" color="text">
285
290
  <SortIcon />
286
291
  </panda.div>
287
292
  </panda.button>
288
293
  </SelectTrigger>
289
294
  <Portal>
290
295
  <SelectPositioner>
291
- <SelectContent className={cx(selectOptionClass, css({ listStyle: 'none' }))}>
296
+ <SelectContent className={cx(selectOptionClass, css({ listStyle: 'none', bg: 'card' }))}>
292
297
  <SelectOption className={selectOptionClass} value="name" label="name" />
293
298
  <SelectOption className={selectOptionClass} value="tokens count" label="tokens count" />
294
299
  <SelectOption className={selectOptionClass} value="file path" label="file path" />
@@ -301,7 +306,7 @@ const FilesAccordionList = () => {
301
306
  </panda.div>
302
307
  }
303
308
  >
304
- <Accordion className={stack({ gap: '2', px: '2', fontSize: 'sm', width: 'full', debug: false })} multiple>
309
+ <Accordion className={stack({ gap: '2', px: '2', fontSize: 'sm', width: 'full' })} multiple>
305
310
  {sorted.map(([filepath, reportItemIdList]) => {
306
311
  const values = reportItemIdList.map(getReportItem)
307
312
  const localMaps =
@@ -314,17 +319,17 @@ const FilesAccordionList = () => {
314
319
  key={filepath}
315
320
  value={filepath}
316
321
  className={css({
317
- p: '4',
318
322
  width: 'full',
319
323
  rounded: 'md',
320
- _hover: { bgColor: 'gray.50' },
324
+ bg: 'card',
325
+ _hover: { opacity: '0.8' },
321
326
  cursor: 'pointer',
322
327
  })}
323
328
  >
324
329
  {(props) => (
325
330
  <>
326
- <AccordionTrigger>
327
- <panda.button display="flex" bg="none" w="full" p="2" cursor="pointer">
331
+ <AccordionTrigger asChild>
332
+ <panda.button display="flex" bg="none" w="full" pt="6" pl="6" pr="4" cursor="pointer">
328
333
  <panda.a
329
334
  className={styledLink({})}
330
335
  href={getFileLink({ filepath })}
@@ -342,7 +347,7 @@ const FilesAccordionList = () => {
342
347
  <panda.span ml="2">{props.isOpen ? '▲' : '▼'}</panda.span>
343
348
  </panda.button>
344
349
  </AccordionTrigger>
345
- <AccordionContent className={css({ p: '2' })}>
350
+ <AccordionContent className={css({ p: '6', cursor: 'default' })}>
346
351
  <panda.div>
347
352
  <panda.h5>Utilities</panda.h5>
348
353
  <Wrap gap="2" mt="4">
@@ -7,6 +7,178 @@
7
7
  background: var(--colors-white);
8
8
  }
9
9
 
10
+ .bg_gray\.50 {
11
+ background: var(--colors-gray-50);
12
+ }
13
+
14
+ .hover\:opacity_1 {
15
+ &:where(:hover, [data-hover]) {
16
+ opacity: 1;
17
+ }
18
+ }
19
+
20
+ .hover\:border-b_black {
21
+ &:where(:hover, [data-hover]) {
22
+ border-bottom-color: var(--colors-black);
23
+ }
24
+ }
25
+
26
+ .hover\:opacity_1 {
27
+ &:where(:hover, [data-hover]) {
28
+ opacity: 1;
29
+ }
30
+ }
31
+
32
+ .hover\:border-b_black {
33
+ &:where(:hover, [data-hover]) {
34
+ border-bottom-color: var(--colors-black);
35
+ }
36
+ }
37
+
38
+ .hover\:opacity_1 {
39
+ &:where(:hover, [data-hover]) {
40
+ opacity: 1;
41
+ }
42
+ }
43
+
44
+ .hover\:border-b_black {
45
+ &:where(:hover, [data-hover]) {
46
+ border-bottom-color: var(--colors-black);
47
+ }
48
+ }
49
+
50
+ .hover\:opacity_1 {
51
+ &:where(:hover, [data-hover]) {
52
+ opacity: 1;
53
+ }
54
+ }
55
+
56
+ .hover\:border-b_black {
57
+ &:where(:hover, [data-hover]) {
58
+ border-bottom-color: var(--colors-black);
59
+ }
60
+ }
61
+
62
+ .hover\:opacity_1 {
63
+ &:where(:hover, [data-hover]) {
64
+ opacity: 1;
65
+ }
66
+ }
67
+
68
+ .hover\:border-b_black {
69
+ &:where(:hover, [data-hover]) {
70
+ border-bottom-color: var(--colors-black);
71
+ }
72
+ }
73
+
74
+ .hover\:opacity_1 {
75
+ &:where(:hover, [data-hover]) {
76
+ opacity: 1;
77
+ }
78
+ }
79
+
80
+ .hover\:border-b_black {
81
+ &:where(:hover, [data-hover]) {
82
+ border-bottom-color: var(--colors-black);
83
+ }
84
+ }
85
+
86
+ .hover\:opacity_1 {
87
+ &:where(:hover, [data-hover]) {
88
+ opacity: 1;
89
+ }
90
+ }
91
+
92
+ .hover\:border-b_black {
93
+ &:where(:hover, [data-hover]) {
94
+ border-bottom-color: var(--colors-black);
95
+ }
96
+ }
97
+
98
+ .hover\:opacity_1 {
99
+ &:where(:hover, [data-hover]) {
100
+ opacity: 1;
101
+ }
102
+ }
103
+
104
+ .hover\:border-b_black {
105
+ &:where(:hover, [data-hover]) {
106
+ border-bottom-color: var(--colors-black);
107
+ }
108
+ }
109
+
110
+ .hover\:opacity_1 {
111
+ &:where(:hover, [data-hover]) {
112
+ opacity: 1;
113
+ }
114
+ }
115
+
116
+ .hover\:border-b_black {
117
+ &:where(:hover, [data-hover]) {
118
+ border-bottom-color: var(--colors-black);
119
+ }
120
+ }
121
+
122
+ .hover\:opacity_1 {
123
+ &:where(:hover, [data-hover]) {
124
+ opacity: 1;
125
+ }
126
+ }
127
+
128
+ .hover\:border-b_black {
129
+ &:where(:hover, [data-hover]) {
130
+ border-bottom-color: var(--colors-black);
131
+ }
132
+ }
133
+
134
+ .hover\:opacity_1 {
135
+ &:where(:hover, [data-hover]) {
136
+ opacity: 1;
137
+ }
138
+ }
139
+
140
+ .hover\:border-b_black {
141
+ &:where(:hover, [data-hover]) {
142
+ border-bottom-color: var(--colors-black);
143
+ }
144
+ }
145
+
146
+ .hover\:opacity_1 {
147
+ &:where(:hover, [data-hover]) {
148
+ opacity: 1;
149
+ }
150
+ }
151
+
152
+ .hover\:border-b_black {
153
+ &:where(:hover, [data-hover]) {
154
+ border-bottom-color: var(--colors-black);
155
+ }
156
+ }
157
+
158
+ .hover\:opacity_1 {
159
+ &:where(:hover, [data-hover]) {
160
+ opacity: 1;
161
+ }
162
+ }
163
+
164
+ .hover\:border-b_black {
165
+ &:where(:hover, [data-hover]) {
166
+ border-bottom-color: var(--colors-black);
167
+ }
168
+ }
169
+
170
+ .hover\:opacity_1 {
171
+ &:where(:hover, [data-hover]) {
172
+ opacity: 1;
173
+ }
174
+ }
175
+
176
+ .hover\:border-b_black {
177
+ &:where(:hover, [data-hover]) {
178
+ border-bottom-color: var(--colors-black);
179
+ }
180
+ }
181
+
10
182
  .list-style_none {
11
183
  list-style: none;
12
184
  }
@@ -27,12 +199,8 @@
27
199
  margin-left: var(--spacing-2);
28
200
  }
29
201
 
30
- .p_4 {
31
- padding: var(--spacing-4);
32
- }
33
-
34
- .bg_gray\.50 {
35
- background: var(--colors-gray-50);
202
+ .font_semibold {
203
+ font-weight: var(--font-weights-semibold);
36
204
  }
37
205
 
38
206
  .d_grid {
@@ -51,6 +219,22 @@
51
219
  grid-column: span 2;
52
220
  }
53
221
 
222
+ .flex_column {
223
+ flex-direction: column;
224
+ }
225
+
226
+ .p_4 {
227
+ padding: var(--spacing-4);
228
+ }
229
+
230
+ .bg_card {
231
+ background: var(--colors-card);
232
+ }
233
+
234
+ .text_text {
235
+ color: var(--colors-text);
236
+ }
237
+
54
238
  .d_inline-flex {
55
239
  display: inline-flex;
56
240
  }