Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 docs update panda preset readme #6

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
packages/*/node_modules

packages/*/build
packages/*/.tsup

tsconfig.tsbuildinfo
*/tsconfig.tsbuildinfo
Expand Down
2 changes: 1 addition & 1 deletion configs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cerberus/configs",
"name": "@cerberus-design/configs",
"version": "0.0.0",
"description": "The internal shared configurations for the projects.",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export default tseslint.config(
},
},
{
name: '@cerberus/panda-preset',
name: '@cerberus-design/panda-preset',
files: ['packages/panda-preset/**/*.ts'],
},
{
name: '@cerberus/configs',
name: '@cerberus-design/configs',
files: ['configs/**/*.mjs', 'configs/**/*.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': OFF,
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cerberus/icons",
"name": "@cerberus-design/icons",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
41 changes: 40 additions & 1 deletion packages/panda-preset/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# Panda Preset

This is the official Panda preset for the Digital University design system.
This is the official [Panda-CSS](https://panda-css.com/) preset for the Cerberus design system.

## Installation

```bash
pnpm add -D @cerberus-design/panda-preset
```

## Usage

```typescript
import { defineConfig } from '@pandacss/dev'
import pandaPreset from '@pandacss/preset-panda'
import { cerberusPreset, cerberusConfig } from '@cerberus-design/panda-preset'

export default defineConfig({
...cerberusConfig,

include: ['./src/**/*.{ts,tsx,js,jsx}'],
exclude: [],

presets: [pandaPreset, cerberusPreset],
})
```

## Features

- [Conditions]('./src/conditions.ts')
- [Utilities]('./src/utilities.ts')
- [Patterns](./src/patterns.ts)
- [Global CSS](./src/globalCss.ts)
- [Key-frames](./src/theme/keyframes.ts)
- [Text Styles](./src/theme/textStyles.ts)
- [Tokens](./src/theme/tokens.ts)
- [Semantic Tokens](./src/theme/semanticTokens/index.ts)
- [Recipes](./src/recipes/index.ts)

---

_Copyright (c) 2024 Digital University, All Rights Reserved_
4 changes: 2 additions & 2 deletions packages/panda-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cerberus/panda-preset",
"name": "@cerberus-design/panda-preset",
"version": "1.0.0",
"description": "The official Panda-CSS preset for the omni-federal design system",
"browserslist": "> 0.25%, not dead",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@microsoft/api-extractor": "^7.43.1",
"@pandacss/dev": "^0.37.2",
"@pandacss/types": "^0.37.2",
"@cerberus/configs": "workspace:*",
"@cerberus-design/configs": "workspace:*",
"tsup": "^8.0.2"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/panda-preset/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './theme/index'
import { recipes, slotRecipes } from './recipes'

export const nurlPreset = definePreset({
export const cerberusPreset = definePreset({
globalCss,
conditions,
utilities,
Expand Down
2 changes: 1 addition & 1 deletion packages/panda-preset/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'tsup'
import { modernConfig, legacyConfig } from '@cerberus/configs'
import { modernConfig, legacyConfig } from '@cerberus-design/configs'

export default defineConfig([
modernConfig({ entry: ['src/**/*.ts'] }),
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"test:react": "echo \"TODO\" && exit 1"
},
"devDependencies": {
"@cerberus/panda-preset": "workspace:*"
"@cerberus-design/panda-preset": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion tests/panda-preset/conditions.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { conditions } from '@cerberus/panda-preset'
import { conditions } from '@cerberus-design/panda-preset'

describe('conditions', () => {
test('should have a duTheme', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/patterns.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { patterns } from '@cerberus/panda-preset'
import { patterns } from '@cerberus-design/panda-preset'

describe('patterns', () => {
test('should export animateIn', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/recipes/shared/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
DANGER,
BRAND,
type Sentiment,
} from '@cerberus/panda-preset'
} from '@cerberus-design/panda-preset'

describe('recipe helpers', () => {
const slots = ['usage', 'size', 'kind']
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/recipes/shared/palettes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
warning,
danger,
allPalettes,
} from '@cerberus/panda-preset'
} from '@cerberus-design/panda-preset'

describe('recipe palettes', () => {
test('should export NEUTRAL', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/recipes/shared/states.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { formStates, focusStates } from '@cerberus/panda-preset'
import { formStates, focusStates } from '@cerberus-design/panda-preset'

describe('recipe states', () => {
test('should export focusStates', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/panda-preset/root.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { describe, test, expect } from 'bun:test'
import * as DS from '@cerberus/panda-preset'
import * as DS from '@cerberus-design/panda-preset'

describe('root', () => {
test('should export a config', () => {
expect(DS.cerberusConfig).toBeDefined()
})

test('should export a preset', () => {
expect(DS.nurlPreset).toBeDefined()
expect(DS.cerberusPreset).toBeDefined()
})

test('should export conditions', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/keyframes.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { keyframes } from '@cerberus/panda-preset'
import { keyframes } from '@cerberus-design/panda-preset'

describe('keyframes', () => {
test('should export fadeIn', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/actions.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { actionTokens } from '@cerberus/panda-preset'
import { actionTokens } from '@cerberus-design/panda-preset'

describe('actionTokens', () => {
test('should have a action key', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/danger.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { dangerTokens } from '@cerberus/panda-preset'
import { dangerTokens } from '@cerberus-design/panda-preset'

describe('dangerTokens', () => {
test('should have a danger property', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/info.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { infoTokens } from '@cerberus/panda-preset'
import { infoTokens } from '@cerberus-design/panda-preset'

describe('infoTokens', () => {
test('should have a info property', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/neutral.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { neutralTokens } from '@cerberus/panda-preset'
import { neutralTokens } from '@cerberus-design/panda-preset'

describe('neutral', () => {
test('should have a neutral property', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/success.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { successTokens } from '@cerberus/panda-preset'
import { successTokens } from '@cerberus-design/panda-preset'

describe('success', () => {
test('should have a success property', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/semantic-tokens/warning.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { warningTokens } from '@cerberus/panda-preset'
import { warningTokens } from '@cerberus-design/panda-preset'

describe('warning', () => {
test('should have a warning property', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/textStyles.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { textStyles } from '@cerberus/panda-preset'
import { textStyles } from '@cerberus-design/panda-preset'

describe('textStyles', () => {
test('should export a textStyles object', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/theme/tokens.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { tokens } from '@cerberus/panda-preset'
import { tokens } from '@cerberus-design/panda-preset'

describe('tokens', () => {
test('should have a fonts key', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/panda-preset/utilities.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'bun:test'
import { utilities } from '@cerberus/panda-preset'
import { utilities } from '@cerberus-design/panda-preset'

describe('utilities', () => {
test('should export a mxi utility', () => {
Expand Down