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

refactor(codebase): fixing codebase for 1st relese #19

Merged
merged 9 commits into from
Aug 1, 2024
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [["ruru-ui"]],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": { "version": false },
"bumpVersionsWithWorkspaceProtocolOnly": true,
"ignore": ["www", "sink"]
}
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Lint
name: Ci

# Controls when the action will run. Triggers the workflow on push or pull request
on:
pull_request:
branches: ["*"]
push:
branches: ["main"]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "lint"
lint:
runs-on: ubuntu-latest

Expand All @@ -31,6 +36,7 @@ jobs:
- name: Run ESLint
run: pnpm lint --filter=./packages/*

# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest

Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm prettier
34 changes: 18 additions & 16 deletions apps/www/content/docs/components/avatar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,25 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs";
The `Avatar` component is used to represent a user or entity.

<Tabs items={["Preview", "Code"]}>
<Tab className={"grid grid-cols-3 place-items-center "} value="Preview" >
<Avatar
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
<Avatar
size={50}
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
<Avatar
size={70}
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
<Tab value="Preview" >
<div className="grid grid-cols-3 place-items-center">
<Avatar
size={50}
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
<Avatar
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
<Avatar
size={70}
placeholder="RU"
src={"https://github.com/ruru-m07.png"}
/>
</div>
</Tab>
<Tab className={"-mt-8"} value="Code">
<Tab value="Code">
```tsx
import { Avatar } from "ruru-ui/components/avatar";

Expand Down
18 changes: 18 additions & 0 deletions apps/www/content/docs/components/switch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ import { Switch } from "ruru-ui/components/switch";

</Tabs>

### Default Checked Switch

<Tabs items={["Preview", "Code"]}>
<Tab className={"flex justify-center"} value="Preview">
<Switch defaultChecked />
</Tab>
<Tab className={"-mt-8"} value="Code">
```tsx
import { Switch } from "your-ui-library/components/switch";

export function DefaultCheckedSwitchDemo() {
return <Switch defaultChecked />;
}
```
</Tab>

</Tabs>

---

This document provides an overview of the Switch component, including usage examples, variants, props, and example implementations.
29 changes: 13 additions & 16 deletions apps/www/content/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs";

First, you'll need to install **ruru UI** and its peer dependencies. You can do this using npm or yarn:

<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
<Tab value="npm">```bash npm install ruru-ui ```</Tab>
<Tab value="pnpm">```bash pnpm install ruru-ui ```</Tab>
<Tab value="yarn">```bash yarn add ruru-ui ```</Tab>
<Tab value="bun">```bash bun add ruru-ui ```</Tab>
</Tabs>
```package-install
npm i ruru-ui
```

## Import Styles

Expand All @@ -29,7 +26,7 @@ import "ruru-ui/style.css";
Now that you've installed **ruru UI** and imported its styles, you can start using the components in your project. Here's an example of how you can use a button component:

```tsx title="App.tsx"
import { Button } from "ruru-ui";
import { Button } from "ruru-ui/components/button";

function App() {
return <Button>Click me</Button>;
Expand All @@ -42,19 +39,19 @@ That's it! You're now ready to start building beautiful interfaces with **ruru U

<Cards>
<Card
href="/docs/components"
title="Explore the Components"
description="Discover all the components and features ruru UI has to offer."
href="/docs/dark-mode"
title="Dark Mode"
description="Learn how to enable dark mode in your ruru UI app."
/>
<Card
href="/docs/examples"
title="View the Examples"
description="Explore the examples to see ruru UI in action and get inspired."
href="/docs/typography"
title="Typography"
description="Explore the typography styles available in ruru UI."
/>
<Card
href="/docs/contributing"
title="Contribute to the Library"
description="Help make ruru UI even better by contributing to the library."
href="/docs/components/button"
title="Button"
description="Explore the Button component and its props."
/>
</Cards>

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint:prettier": "prettier --cache --check --ignore-path .gitignore --ignore-path .prettierignore .",
"prettier": "prettier --cache --write --list-different --ignore-path .gitignore --ignore-path .prettierignore .",
"types:check": "turbo run types:check"
"types:check": "turbo run types:check",
"release": "turbo run build --filter=./packages/* && changeset publish",
"version": "changeset version && pnpm install --lockfile-only"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.16.1",
Expand All @@ -19,12 +21,16 @@
"eslint": "^8.57.0",
"eslint-plugin-tailwindcss": "^3.17.4",
"eslint-plugin-tsdoc": "^0.3.0",
"husky": "^9.1.4",
"prettier": "^3.3.3",
"turbo": "^2.0.9",
"typescript": "^5.4.5"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=18.17.0"
},
"dependencies": {
"@changesets/cli": "^2.27.7"
}
}
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ruru-ui",
"version": "1.0.0-beta.1",
"version": "1.0.1",
"description": "Ruru UI Components",
"publishConfig": {
"access": "public"
Expand Down
Loading