Skip to content

Commit

Permalink
Merge pull request #76 from omnifed/75-feature-add-button-recipe
Browse files Browse the repository at this point in the history
75 feature add button recipe
  • Loading branch information
caseybaggz authored May 21, 2024
2 parents 462d70c + f6e470a commit de70cb3
Show file tree
Hide file tree
Showing 29 changed files with 691 additions and 43 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand All @@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/icons-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v4
with:
version: 9.1.1
version: 9.1.2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
Expand Down
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ build
coverage
.husky

pnpm-lock.yaml
pnpm-lock.yaml

docs/**/*.mdx
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"cSpell.words": [
"caseybaggz",
"csstools",
"frontmatter",
"nextjs",
Expand Down
87 changes: 87 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement via our [community admin](mailto:[email protected]) email. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the project community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
available at [v2 covenant][v2-covenant].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at
[contributor/faq][faq]. Translations are available at [covenant/translations][translations].

[homepage]: http://contributor-covenant.org
[faq]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
[v2-covenant]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
53 changes: 53 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributing to Cerberus Design System

Thank you for investing your time in contributing to our project! ✨.

Read our [Code of Conduct](https://github.com/omnifed/cerberus/blob/main/CODE_OF_CONDUCT.md) to keep our community approachable and respectable. Solid accepts a number of contributions from the broader community. More hands indeed make lighter work. We're however selective of the types of contributions we receive.

This usually involves vetting code quality, current focus, alignment with team philosophies etc. It's typically a good idea to submit a proposal for a change before spending time implementing it. This is to ensure that your efforts align with the current needs or more practically that work isn't completed by multiple contributors.

Note: If you would like your project listed here please submit a PR or contact a core/ecosystem member on Discord.

## Team Structure & Organization

There are a lot of opportunities to get involved. We organize Solid community efforts via Discord and typically onboard dedicated contributors into focused teams:

- Core Docs & Admin (headed by [@caseybaggz](https://github.com/caseybaggz))

Most team members are part of the Ecosystem Team or Core Team. Entry into these groups is selected by Core Members only. We do not accept applications or requests for entry. Selections are made ad-hoc according to internal needs. Selections are typically announced at Community Meetings which occur quarterly.

## Where do I start?

If you haven't found any interesting information on this page then we encourage you to start hacking at a Cerberus related utility or package that does. Building useful tools for fellow OSS ecosystem and Cerberus users enhances the whole platform.

We can't wait to see what you build!

## Contribution Process

1. Fork the repository.
2. Clone the forked repository to your local system.
3. Install the required tools: [pnPm](https://pnpm.io/) and [Bun](https://bun.sh)
4. Install the dependencies: `pnpm install` in the **root directory**.
5. Create a new branch: `git checkout -b my-branch-name`.
6. Make your changes (including unit tests).
7. Test your changes: `pnpm test:ci`.
8. Lint your changes: `pnpm lint:ts`, `pnpm lint:es`, and `pnpm lint:ox`.
9. Commit your changes: `git commit -am 'feat: my new feature'`.
10. Push to the branch: `git push origin my-branch-name`.
11. Submit a pull request **IN DRAFT MODE**. Be sure to **fill out** the PR template.
12. Once all the tests have passed in the CI in your draft PR, mark it as ready for review. This will automatically notify and assign the maintainers.
13. Wait for a maintainer to review your PR.

**Note**: Any PR that does not follow these guidelines will be closed without any notice. This includes _properly filling out the PR template._

### Review Process

1. A maintainer will review your PR and may request changes.
2. Make the requested changes.
3. Repeat steps 7-13 until the PR is approved.

### Merge Process

1. Once the PR is approved, a maintainer will merge it.
2. The PR will be closed and the changes will be merged into the main branch.
3. The main branch will ship the latest updates in the `next` tagged release.
2 changes: 1 addition & 1 deletion docs/app/components/CodePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function PreviewLayout(props: PropsWithChildren<PreviewLayoutProps>) {
</header>
<section
className={vstack({
bgColor: 'info.surface.initial',
bgColor: 'neutral.surface.200',
border: '3px solid',
borderColor: 'info.border.initial',
borderRadius: 'xl',
Expand Down
3 changes: 2 additions & 1 deletion docs/app/components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export interface HeadingItem extends SideNavItem {
}

export interface LinkItem extends SideNavItem {
type: 'route'
route: string
tag: '' | 'new' | 'next'
type: 'route'
}

interface SideNavProps {
Expand Down
58 changes: 58 additions & 0 deletions docs/app/react/button/components/button-preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { css, cx } from '@/styled-system/css'
import { button } from '@/styled-system/recipes'
import { ArrowDownRight } from '@cerberus-design/icons'

export function BasicButtonPreview() {
return <button className={button()}>Default styles</button>
}

export function DangerButtonPreview() {
return (
<button className={button({ palette: 'danger' })}>Danger styles</button>
)
}

export function OutlineButtonPreview() {
return (
<button className={button({ usage: 'outline' })}>Outline styles</button>
)
}

export function TextButtonPreview() {
return <button className={button({ usage: 'text' })}>Text styles</button>
}

export function RoundedButtonPreview() {
return (
<button className={button({ shape: 'rounded' })}>Rounded styles</button>
)
}

export function WithIconButtonPreview() {
return (
<button className={button()}>
<ArrowDownRight />
With icon
</button>
)
}

export function CustomButtonPreview() {
return (
<button
className={cx(
css({
bgColor: 'yellow',
color: 'black',
_hover: {
bgColor: 'black',
color: 'yellow',
},
}),
button(),
)}
>
Wu-Tang Forever
</button>
)
}
Loading

0 comments on commit de70cb3

Please sign in to comment.