Skip to content

Commit

Permalink
chore: make all panda versions equal
Browse files Browse the repository at this point in the history
  • Loading branch information
@casey_baggz_omni committed Sep 11, 2024
1 parent b017b4d commit 2aea9ad
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 390 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
],
"prettier.configPath": ".prettierrc",
"prettier.prettierPath": "./node_modules/prettier",
"prettier.singleQuote": true
"prettier.singleQuote": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
30 changes: 29 additions & 1 deletion docs/app/react/file-uploader/dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ If you choose to process the file, you can use the `FileStatus` component to dis

## Customizing

To customize the FileUploader, we recommend extending the `fileUploader` slot recipe in your panda config.
To customize the FileUploader or FileStatus, we recommend extending the `fileUploader` or the `fileStatus` slot recipe in your panda config.

## API

### FileUploader

```ts showLineNumbers=false
export interface FileUploaderProps
extends InputHTMLAttributes<HTMLInputElement> {
Expand All @@ -44,6 +46,24 @@ export interface FileUploaderProps
define function FileUploader(props: FileUploaderProps): ReactNode
```

### FileStatus

```ts showLineNumbers=false
export type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]
export type FileStatusActions = 'cancel' | 'retry' | 'delete'
export interface FileBaseStatusProps
extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
file: string
now: number
status: processStatus
onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void
}
export type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps
define function FileStatus(props: FileStatusProps): ReactNode
```

### Props

The `FileUploader` component accepts the following props:
Expand All @@ -52,3 +72,11 @@ The `FileUploader` component accepts the following props:
| -------- | ------- | ------------------------------------------------------------- |
| heading | | The heading for the file uploader |
| name | | The unique name of the file uploader |

The `FileStatus` component accepts the following props:

| Name | Default | Description |
| -------- | ------- | ------------------------------------------------------------- |
| file | | The name of the file being processed |
| now | | The current progress of the file upload |
| status | 'todo' | The status of the file upload |
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@next/mdx": "^14.2.3",
"@pandacss/dev": "^0.46.0",
"@pandacss/preset-panda": "^0.46.0",
"@pandacss/types": "^0.46.0",
"@shikijs/rehype": "^1.5.1",
"@shikijs/transformers": "^1.5.1",
"@shikijs/twoslash": "^1.5.1",
Expand Down
8 changes: 5 additions & 3 deletions docs/panda.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from '@pandacss/dev'
import { defineConfig, type Config } from '@pandacss/dev'
import pandaPreset from '@pandacss/preset-panda'
import { cerberusPreset, cerberusConfig } from '@cerberus-design/panda-preset'

export default defineConfig({
const config: Config = {
...cerberusConfig,

include: [
Expand All @@ -13,4 +13,6 @@ export default defineConfig({
exclude: [],

presets: [pandaPreset, cerberusPreset],
})
}

export default defineConfig(config)
4 changes: 2 additions & 2 deletions packages/panda-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"devDependencies": {
"@cerberus-design/configs": "workspace:*",
"@microsoft/api-extractor": "^7.46.2",
"@pandacss/dev": "^0.45.0",
"@pandacss/types": "^0.45.0",
"@pandacss/dev": "^0.46.0",
"@pandacss/types": "^0.46.0",
"tsup": "^8.0.2"
},
"publishConfig": {
Expand Down
Loading

0 comments on commit 2aea9ad

Please sign in to comment.