diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8c7ac3d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,35 @@ + + +### ๐Ÿ”— Linked issue + + + +### โ“ Type of change + + + +- [ ] ๐Ÿ“– Documentation (updates to the documentation, readme or JSdoc annotations) +- [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue) +- [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance) +- [ ] โœจ New feature (a non-breaking change that adds functionality) +- [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries) +- [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change) + +### ๐Ÿ“š Description + + + + + +### ๐Ÿ“ธ Screenshots (if appropriate) + + + +### ๐Ÿ“ Checklist + + + + + +- [ ] I have linked an issue or discussion. +- [ ] I have updated the documentation accordingly. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..536e9fc --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,27 @@ +# .github/workflows/release.yml + +name: Release + +permissions: + contents: write + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 18.x + + - run: npx changelogithub + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b494848 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +.nuxt +.env +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +!.vscode/settings.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +test-results/ +playwright-report/ +vite.config.ts.timestamp* + +**/.vitepress/cache/* \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..3bd3b7d --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shell-emulator=true diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..dc6958f --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "singleQuote": false, + "semi": true +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..64db0b2 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "Vue.volar", + "dbaeumer.vscode-eslint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c9442fb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,34 @@ +{ + "vue.server.hybridMode": true, + "eslint.experimental.useFlatConfig": true, + "prettier.enable": false, + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off" }, + { "rule": "format/*", "severity": "off" }, + { "rule": "*-indent", "severity": "off" }, + { "rule": "*-spacing", "severity": "off" }, + { "rule": "*-spaces", "severity": "off" }, + { "rule": "*-order", "severity": "off" }, + { "rule": "*-dangle", "severity": "off" }, + { "rule": "*-newline", "severity": "off" }, + { "rule": "*quotes", "severity": "off" }, + { "rule": "*semi", "severity": "off" } + ], + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml" + ] +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b270fa6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# 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 at +hello@lemonsqueezy.com. +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 community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..48446e2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to Wedges + +๐Ÿ‘‹ Hey there! We're thrilled that you're interested in contributing to Wedges. Before submitting your contribution, please take a moment to read through this guide. + +## Repository Structure + +Our repository is managed with [PNPM](https://pnpm.io/). Make sure you have PNPM installed to work with this repository. + +1. **packages/wedges-vue**: + This is the heart of our project โ€“ the UI library itself. Here you'll find all the components and utilities Wedges UI library. + +2. **apps/www**: + Contains the Vitepress documentation site for the Wedges UI library. This is where we maintain the documentation, examples, and guides for using the library. + +## Tooling and Technologies + +In the Wedges project, we utilize a variety of tools to ensure code quality, consistency, and smooth development processes. + +- **[Prettier](https://prettier.io/)**: for code formatting. Our codebase adheres to the configuration specified in `.prettierrc`. + +- **[ESLint](https://eslint.org/)**: for code linting. Make sure to check and fix any linting issues before submitting your code. + +- **[vite](https://vite.dev/)**: for bundling the library files. We bundle both ESM and CJS versions of the library. + +## Commit Convention + +Our project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. + +When preparing your commits for a Pull Request, ensure they adhere to our commit message format: `type(scope): description`. The `type` and `scope` help categorize the commit, making our history readable and organized. + +### Types of Commits + +Your commits should fall into one of the following categories: + +- `feat` (or `feature`): Introduces new code or functionality to the project. + +- `fix`: Addresses and resolves a bug. Linking to an issue if available is highly encouraged. + +- `refactor`: Code changes that neither fix a bug nor add a feature, but improve the existing codebase. + +- `docs`: Updates or additions to documentation, such as README files, usage guides, etc. + +- `build`: Changes affecting the build system, including dependency updates and additions. + +- `test`: Modifications involving tests, including adding new tests or refining existing ones. + +- `ci`: Adjustments to our continuous integration setup, like GitHub Actions or other CI tools. + +- `chore`: General maintenance and organizational tasks that don't fit other categories. + +For example, a commit message might look like: `feat(components): introduce new Button styles`. + +Thank you for making Wedges better! ๐ŸŽ‰ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9100080 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 radix-vue + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c5980d --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +

+ + Wedges UI library + +

+ +# Wedges + +[![](https://img.shields.io/npm/v/@lemonsqueezy/wedges?style=plastic)](https://www.npmjs.com/package/@lemonsqueezy/wedges) +[![](https://img.shields.io/npm/dw/@lemonsqueezy/wedges?style=plastic)](https://www.npmjs.com/package/@lemonsqueezy/wedges) + +Wedges is an ever-expanding, open-source React UI library built with the Wedges Design System, Radix primitives, and Tailwind CSS. + +With Wedges, you get a range of pre-built, customizable components that are easy to use and integrate into your React projects. It also comes with full TypeScript support, ensuring type safety and developer-friendly experience. + +Get Started with Wedges → + +## License + +Wedges is licensed under the [MIT License](./LICENSE). + +## Getting Started + +Visit Wedges Docs to get started. + +## Repository Structure + +This repository is organized as a monorepo and is managed with PNPM. + +## Packages + +- [packages/wedges-vue](./packages/wedges-vue) - This is the heart of our project โ€“ the UI library itself. Here you'll find all the components, utilities, and core functionality of the Wedges UI library. + +## Apps + +- [apps/www](./apps/docs) - Contains the Vitepress documentation site for the Wedges UI library. This is where we maintain the documentation, examples, and guides for using the library. + +## Development + +1. Clone the monorepo. +2. Install the necessary dependencies using PNPM: + +```bash +pnpm i --hoist +``` + +To start the development server, run: + +```bash +pnpm dev +``` + +## Contributing + +Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". + +Please refer to the [CONTRIBUTING](./CONTRIBUTING.md) for more information. + +## Connect with us + +Follow us @lmsqueezy for the latest and coolest. Let us know what you're building with Wedges! diff --git a/apps/docs/.vitepress/config.ts b/apps/docs/.vitepress/config.ts new file mode 100644 index 0000000..feb68a3 --- /dev/null +++ b/apps/docs/.vitepress/config.ts @@ -0,0 +1,87 @@ +import path from "node:path"; +import { defineConfig, postcssIsolateStyles } from "vitepress"; +import Icons from "unplugin-icons/vite"; +import tailwind from "tailwindcss"; +import autoprefixer from "autoprefixer"; +import { cssVariables } from "./theme/config/shiki"; + +// import { transformerMetaWordHighlight, transformerNotationWordHighlight } from '@shikijs/transformers' +import { siteConfig } from "./theme/config/site"; +import ComponentPreviewPlugin from "./theme/plugins/previewer"; + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + title: siteConfig.name, + titleTemplate: ":title - lemonsqueezy/wedges", + description: siteConfig.description, + head: [ + ["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }], + ["link", { rel: "shortcut icon", href: "/favicon-16x16.png" }], + ["link", { rel: "apple-touch-icon", href: "/apple-touch-icon.png" }], + ["link", { rel: "manifest", href: "/site.webmanifest" }], + + ["meta", { name: "theme-color", media: "(prefers-color-scheme: light)", content: "white" }], + ["meta", { name: "theme-color", media: "(prefers-color-scheme: dark)", content: "black" }], + + ["meta", { name: "creator", content: "raymondmuller" }], + ["meta", { name: "theme-color", content: "#41b883" }], + ["meta", { name: "og:type", content: "website" }], + ["meta", { name: "og:locale", content: "en" }], + ["meta", { name: "og:site_name", content: siteConfig.name }], + ["meta", { name: "og:image", content: siteConfig.ogImage }], + ["meta", { name: "twitter:image", content: siteConfig.ogImage }], + + ], + + sitemap: { + hostname: "https://wedges-vue.pages.dev", + transformItems(items) { + return items.filter(item => !item.url.includes("migration")); + }, + }, + appearance: false, + + lastUpdated: true, + themeConfig: { + search: { + provider: "local", + }, + editLink: { + pattern: "https://github.com/raymondmuller/wedges-vue/tree/main/apps/www/src/:path", + text: "Edit this page on GitHub", + }, + }, + + srcDir: path.resolve(__dirname, "../src"), + markdown: { + theme: cssVariables, + config(md) { + md.use(ComponentPreviewPlugin); + }, + }, + rewrites: { + "content/(.*)": "(.*)", + }, + vite: { + css: { + postcss: { + plugins: [ + + tailwind() as any, + autoprefixer(), + postcssIsolateStyles({ + includeFiles: [/vp-doc\.css/, /base\.css/, /shiki\.css/, /themes\.css/], + }), + ], + }, + }, + plugins: [ + Icons({ compiler: "vue3", autoInstall: true }), + ], + resolve: { + alias: { + "@": path.resolve(__dirname, "../src"), + }, + }, + }, +}); diff --git a/apps/docs/.vitepress/theme/components/Announcement.vue b/apps/docs/.vitepress/theme/components/Announcement.vue new file mode 100644 index 0000000..46e0a34 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Announcement.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Callout.vue b/apps/docs/.vitepress/theme/components/Callout.vue new file mode 100644 index 0000000..09081fe --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Callout.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/CodeWrapper.ts b/apps/docs/.vitepress/theme/components/CodeWrapper.ts new file mode 100644 index 0000000..2a978f8 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/CodeWrapper.ts @@ -0,0 +1,26 @@ +import { type VNode, cloneVNode, defineComponent } from "vue"; +import { useConfigStore } from "@/stores/config"; + +export default defineComponent( + (props, { slots }) => { + const { codeConfig } = useConfigStore(); + + return () => { + const clonedVNode = slots.default?.()?.[0] + ? cloneVNode(slots.default?.()?.[0], { + key: JSON.stringify(codeConfig.value), + }) + : undefined; + + // @ts-expect-error cloneVNode + const preVNode = [...clonedVNode?.children].find((node: VNode) => node.type === "pre") as VNode; + // @ts-expect-error cloneVNode + const codeVNode = preVNode.children?.at(0) as VNode; + + if (codeVNode) + return clonedVNode; + else + return slots.default?.(); + }; + }, +); diff --git a/apps/docs/.vitepress/theme/components/Color.vue b/apps/docs/.vitepress/theme/components/Color.vue new file mode 100644 index 0000000..0bc9449 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Color.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ColorThemable.vue b/apps/docs/.vitepress/theme/components/ColorThemable.vue new file mode 100644 index 0000000..8e82f72 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ColorThemable.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Colors.vue b/apps/docs/.vitepress/theme/components/Colors.vue new file mode 100644 index 0000000..0fb5f33 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Colors.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ComponentLoader.vue b/apps/docs/.vitepress/theme/components/ComponentLoader.vue new file mode 100644 index 0000000..84a1289 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ComponentLoader.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ComponentPreview.vue b/apps/docs/.vitepress/theme/components/ComponentPreview.vue new file mode 100644 index 0000000..ba4f7ff --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ComponentPreview.vue @@ -0,0 +1,98 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/EditLink.vue b/apps/docs/.vitepress/theme/components/EditLink.vue new file mode 100644 index 0000000..374d5d6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/EditLink.vue @@ -0,0 +1,27 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Kbd.vue b/apps/docs/.vitepress/theme/components/Kbd.vue new file mode 100644 index 0000000..df44126 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Kbd.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/LandingPage.vue b/apps/docs/.vitepress/theme/components/LandingPage.vue new file mode 100644 index 0000000..1047b53 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/LandingPage.vue @@ -0,0 +1,43 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/LinkCard.vue b/apps/docs/.vitepress/theme/components/LinkCard.vue new file mode 100644 index 0000000..30d2240 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/LinkCard.vue @@ -0,0 +1,27 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/LinkedCard.vue b/apps/docs/.vitepress/theme/components/LinkedCard.vue new file mode 100644 index 0000000..4487050 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/LinkedCard.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Logo.vue b/apps/docs/.vitepress/theme/components/Logo.vue new file mode 100644 index 0000000..589a6c7 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Logo.vue @@ -0,0 +1,12 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Logomark.vue b/apps/docs/.vitepress/theme/components/Logomark.vue new file mode 100644 index 0000000..2ebb07c --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Logomark.vue @@ -0,0 +1,42 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/MobileNav.vue b/apps/docs/.vitepress/theme/components/MobileNav.vue new file mode 100644 index 0000000..d5854b6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/MobileNav.vue @@ -0,0 +1,83 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/PageAction.vue b/apps/docs/.vitepress/theme/components/PageAction.vue new file mode 100644 index 0000000..419bee7 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/PageAction.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/PageHeader.vue b/apps/docs/.vitepress/theme/components/PageHeader.vue new file mode 100644 index 0000000..9e0a505 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/PageHeader.vue @@ -0,0 +1,16 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/PageHeaderDescription.vue b/apps/docs/.vitepress/theme/components/PageHeaderDescription.vue new file mode 100644 index 0000000..c5e9b55 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/PageHeaderDescription.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/PageHeaderHeading.vue b/apps/docs/.vitepress/theme/components/PageHeaderHeading.vue new file mode 100644 index 0000000..faea722 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/PageHeaderHeading.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Steps.vue b/apps/docs/.vitepress/theme/components/Steps.vue new file mode 100644 index 0000000..a1d6cd8 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Steps.vue @@ -0,0 +1,7 @@ + diff --git a/apps/docs/.vitepress/theme/components/TabMarkdown.vue b/apps/docs/.vitepress/theme/components/TabMarkdown.vue new file mode 100644 index 0000000..e52dae2 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/TabMarkdown.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/TabPreview.vue b/apps/docs/.vitepress/theme/components/TabPreview.vue new file mode 100644 index 0000000..83c27ad --- /dev/null +++ b/apps/docs/.vitepress/theme/components/TabPreview.vue @@ -0,0 +1,36 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/TableOfContent.vue b/apps/docs/.vitepress/theme/components/TableOfContent.vue new file mode 100644 index 0000000..665cee9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/TableOfContent.vue @@ -0,0 +1,80 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/TableOfContentTree.vue b/apps/docs/.vitepress/theme/components/TableOfContentTree.vue new file mode 100644 index 0000000..380fca2 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/TableOfContentTree.vue @@ -0,0 +1,51 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/TabsMarkdown.vue b/apps/docs/.vitepress/theme/components/TabsMarkdown.vue new file mode 100644 index 0000000..3c008b1 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/TabsMarkdown.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/Tooltip.vue b/apps/docs/.vitepress/theme/components/Tooltip.vue new file mode 100644 index 0000000..3b6e9a6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/Tooltip.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/VPImage.vue b/apps/docs/.vitepress/theme/components/VPImage.vue new file mode 100644 index 0000000..9802b4f --- /dev/null +++ b/apps/docs/.vitepress/theme/components/VPImage.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumb.vue b/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumb.vue new file mode 100644 index 0000000..0f8f302 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumb.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumbItem.vue b/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumbItem.vue new file mode 100644 index 0000000..6122b63 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/breadcrumb/BreadCrumbItem.vue @@ -0,0 +1,34 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/breadcrumb/index.ts b/apps/docs/.vitepress/theme/components/breadcrumb/index.ts new file mode 100644 index 0000000..16e61ac --- /dev/null +++ b/apps/docs/.vitepress/theme/components/breadcrumb/index.ts @@ -0,0 +1,2 @@ +export { default as BreadCrumb } from "./BreadCrumb.vue"; +export { default as BreadCrumbItem } from "./BreadCrumbItem.vue"; diff --git a/apps/docs/.vitepress/theme/components/index.ts b/apps/docs/.vitepress/theme/components/index.ts new file mode 100644 index 0000000..85fe754 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/index.ts @@ -0,0 +1,20 @@ +export { default as Callout } from "./Callout.vue"; +export { default as Color } from "./Color.vue"; +export { default as Colors } from "./Colors.vue"; +export { default as ColorThemable } from "./ColorThemable.vue"; +export { default as ComponentPreview } from "./ComponentPreview.vue"; +export { default as DataAttributesTable } from "./tables/DataAttributesTable.vue"; +export { default as EmitsTable } from "./tables/EmitsTable.vue"; +export { default as LandingPage } from "./LandingPage.vue"; +export { default as LinkCard } from "./LinkCard.vue"; +export { default as LinkedCard } from "./LinkedCard.vue"; +export { default as Logomark } from "./Logomark.vue"; +export { default as PropsTable } from "./tables/PropsTable.vue"; +export { default as SlotsTable } from "./tables/SlotsTable.vue"; +export { default as Steps } from "./Steps.vue"; +export { default as TabMarkdown } from "./TabMarkdown.vue"; +export { default as TabPreview } from "./TabPreview.vue"; +export { default as TabsMarkdown } from "./TabsMarkdown.vue"; +export { default as VPImage } from "./VPImage.vue"; + +export { Alert, Tabs, TabsContent, TabsList, TabsTrigger } from "wedges-vue"; diff --git a/apps/docs/.vitepress/theme/components/prose/ProseA.vue b/apps/docs/.vitepress/theme/components/prose/ProseA.vue new file mode 100644 index 0000000..5ead0ed --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseA.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseCodeInline.vue b/apps/docs/.vitepress/theme/components/prose/ProseCodeInline.vue new file mode 100644 index 0000000..01c41a2 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseCodeInline.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseH1.vue b/apps/docs/.vitepress/theme/components/prose/ProseH1.vue new file mode 100644 index 0000000..2dac5ea --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseH1.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseH2.vue b/apps/docs/.vitepress/theme/components/prose/ProseH2.vue new file mode 100644 index 0000000..47b3780 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseH2.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseH3.vue b/apps/docs/.vitepress/theme/components/prose/ProseH3.vue new file mode 100644 index 0000000..6825c3d --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseH3.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseP.vue b/apps/docs/.vitepress/theme/components/prose/ProseP.vue new file mode 100644 index 0000000..2e8880a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseP.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseTable.vue b/apps/docs/.vitepress/theme/components/prose/ProseTable.vue new file mode 100644 index 0000000..84cb95d --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseTable.vue @@ -0,0 +1,7 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseTbody.vue b/apps/docs/.vitepress/theme/components/prose/ProseTbody.vue new file mode 100644 index 0000000..09d6191 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseTbody.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseTd.vue b/apps/docs/.vitepress/theme/components/prose/ProseTd.vue new file mode 100644 index 0000000..3726e02 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseTd.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseTh.vue b/apps/docs/.vitepress/theme/components/prose/ProseTh.vue new file mode 100644 index 0000000..6b6fce5 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseTh.vue @@ -0,0 +1,12 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseThead.vue b/apps/docs/.vitepress/theme/components/prose/ProseThead.vue new file mode 100644 index 0000000..95dbdb7 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseThead.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/ProseTr.vue b/apps/docs/.vitepress/theme/components/prose/ProseTr.vue new file mode 100644 index 0000000..9cdc0cc --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/ProseTr.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/.vitepress/theme/components/prose/index.ts b/apps/docs/.vitepress/theme/components/prose/index.ts new file mode 100644 index 0000000..2bceca6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/prose/index.ts @@ -0,0 +1,12 @@ +export { default as ProseA } from "./ProseA.vue"; +export { default as ProseH1 } from "./ProseH1.vue"; +export { default as ProseH2 } from "./ProseH2.vue"; +export { default as ProseH3 } from "./ProseH3.vue"; +export { default as ProseP } from "./ProseP.vue"; +export { default as ProseTh } from "./ProseTh.vue"; +export { default as ProseTd } from "./ProseTd.vue"; +export { default as ProseTr } from "./ProseTr.vue"; +export { default as ProseCodeInline } from "./ProseCodeInline.vue"; +export { default as ProseTable } from "./ProseTable.vue"; +export { default as ProseThead } from "./ProseThead.vue"; +export { default as ProseTbody } from "./ProseTbody.vue"; diff --git a/apps/docs/.vitepress/theme/components/tables/CssVariablesTable.vue b/apps/docs/.vitepress/theme/components/tables/CssVariablesTable.vue new file mode 100644 index 0000000..3bcd304 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/CssVariablesTable.vue @@ -0,0 +1,42 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/DataAttributesTable.vue b/apps/docs/.vitepress/theme/components/tables/DataAttributesTable.vue new file mode 100644 index 0000000..58909aa --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/DataAttributesTable.vue @@ -0,0 +1,49 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/EmitsTable.vue b/apps/docs/.vitepress/theme/components/tables/EmitsTable.vue new file mode 100644 index 0000000..81280ec --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/EmitsTable.vue @@ -0,0 +1,49 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/KeyboardTable.vue b/apps/docs/.vitepress/theme/components/tables/KeyboardTable.vue new file mode 100644 index 0000000..6f79eb9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/KeyboardTable.vue @@ -0,0 +1,48 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/MethodsTable.vue b/apps/docs/.vitepress/theme/components/tables/MethodsTable.vue new file mode 100644 index 0000000..ece56b1 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/MethodsTable.vue @@ -0,0 +1,52 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/PropsTable.vue b/apps/docs/.vitepress/theme/components/tables/PropsTable.vue new file mode 100644 index 0000000..2fc9628 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/PropsTable.vue @@ -0,0 +1,81 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/tables/SlotsTable.vue b/apps/docs/.vitepress/theme/components/tables/SlotsTable.vue new file mode 100644 index 0000000..11a454f --- /dev/null +++ b/apps/docs/.vitepress/theme/components/tables/SlotsTable.vue @@ -0,0 +1,47 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/collapsible/Collapsible.vue b/apps/docs/.vitepress/theme/components/ui/collapsible/Collapsible.vue new file mode 100644 index 0000000..801de7f --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/collapsible/Collapsible.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleContent.vue b/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleContent.vue new file mode 100644 index 0000000..42d722d --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleContent.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleTrigger.vue b/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleTrigger.vue new file mode 100644 index 0000000..baf5fe9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/collapsible/CollapsibleTrigger.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/collapsible/index.ts b/apps/docs/.vitepress/theme/components/ui/collapsible/index.ts new file mode 100644 index 0000000..fffcc3d --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/collapsible/index.ts @@ -0,0 +1,3 @@ +export { default as Collapsible } from "./Collapsible.vue"; +export { default as CollapsibleTrigger } from "./CollapsibleTrigger.vue"; +export { default as CollapsibleContent } from "./CollapsibleContent.vue"; diff --git a/apps/docs/.vitepress/theme/components/ui/command/Command.vue b/apps/docs/.vitepress/theme/components/ui/command/Command.vue new file mode 100644 index 0000000..11959a5 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/Command.vue @@ -0,0 +1,30 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandDialog.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandDialog.vue new file mode 100644 index 0000000..8b8191c --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandDialog.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandEmpty.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandEmpty.vue new file mode 100644 index 0000000..c504ad7 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandEmpty.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandGroup.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandGroup.vue new file mode 100644 index 0000000..486d04a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandGroup.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandInput.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandInput.vue new file mode 100644 index 0000000..a1bf1e8 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandInput.vue @@ -0,0 +1,33 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandItem.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandItem.vue new file mode 100644 index 0000000..126347e --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandItem.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandList.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandList.vue new file mode 100644 index 0000000..496019b --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandList.vue @@ -0,0 +1,27 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandSeparator.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandSeparator.vue new file mode 100644 index 0000000..5bbf67d --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandSeparator.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/CommandShortcut.vue b/apps/docs/.vitepress/theme/components/ui/command/CommandShortcut.vue new file mode 100644 index 0000000..592f1d6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/CommandShortcut.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/command/index.ts b/apps/docs/.vitepress/theme/components/ui/command/index.ts new file mode 100644 index 0000000..2f33b76 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/command/index.ts @@ -0,0 +1,9 @@ +export { default as Command } from "./Command.vue"; +export { default as CommandDialog } from "./CommandDialog.vue"; +export { default as CommandEmpty } from "./CommandEmpty.vue"; +export { default as CommandGroup } from "./CommandGroup.vue"; +export { default as CommandInput } from "./CommandInput.vue"; +export { default as CommandItem } from "./CommandItem.vue"; +export { default as CommandList } from "./CommandList.vue"; +export { default as CommandSeparator } from "./CommandSeparator.vue"; +export { default as CommandShortcut } from "./CommandShortcut.vue"; diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/Dialog.vue b/apps/docs/.vitepress/theme/components/ui/dialog/Dialog.vue new file mode 100644 index 0000000..51367e0 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/Dialog.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogClose.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogClose.vue new file mode 100644 index 0000000..bc3b70a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogClose.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogContent.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogContent.vue new file mode 100644 index 0000000..c046bb3 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogContent.vue @@ -0,0 +1,50 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogDescription.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogDescription.vue new file mode 100644 index 0000000..ca4fbf5 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogDescription.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogFooter.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogFooter.vue new file mode 100644 index 0000000..04d27f9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogFooter.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogHeader.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogHeader.vue new file mode 100644 index 0000000..6989a58 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogHeader.vue @@ -0,0 +1,16 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogScrollContent.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogScrollContent.vue new file mode 100644 index 0000000..1c13dd1 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogScrollContent.vue @@ -0,0 +1,59 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogTitle.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogTitle.vue new file mode 100644 index 0000000..01eab08 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogTitle.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/DialogTrigger.vue b/apps/docs/.vitepress/theme/components/ui/dialog/DialogTrigger.vue new file mode 100644 index 0000000..7872f1c --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/DialogTrigger.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/dialog/index.ts b/apps/docs/.vitepress/theme/components/ui/dialog/index.ts new file mode 100644 index 0000000..b92d799 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/dialog/index.ts @@ -0,0 +1,9 @@ +export { default as Dialog } from "./Dialog.vue"; +export { default as DialogClose } from "./DialogClose.vue"; +export { default as DialogTrigger } from "./DialogTrigger.vue"; +export { default as DialogHeader } from "./DialogHeader.vue"; +export { default as DialogTitle } from "./DialogTitle.vue"; +export { default as DialogDescription } from "./DialogDescription.vue"; +export { default as DialogContent } from "./DialogContent.vue"; +export { default as DialogScrollContent } from "./DialogScrollContent.vue"; +export { default as DialogFooter } from "./DialogFooter.vue"; diff --git a/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollArea.vue b/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollArea.vue new file mode 100644 index 0000000..f4835b0 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollArea.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollBar.vue b/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollBar.vue new file mode 100644 index 0000000..b871ea0 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/scroll-area/ScrollBar.vue @@ -0,0 +1,30 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/scroll-area/index.ts b/apps/docs/.vitepress/theme/components/ui/scroll-area/index.ts new file mode 100644 index 0000000..cd655e0 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/scroll-area/index.ts @@ -0,0 +1,2 @@ +export { default as ScrollArea } from "./ScrollArea.vue"; +export { default as ScrollBar } from "./ScrollBar.vue"; diff --git a/apps/docs/.vitepress/theme/components/ui/separator/Separator.vue b/apps/docs/.vitepress/theme/components/ui/separator/Separator.vue new file mode 100644 index 0000000..03f8ec9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/separator/Separator.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/separator/index.ts b/apps/docs/.vitepress/theme/components/ui/separator/index.ts new file mode 100644 index 0000000..aae7f1a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/separator/index.ts @@ -0,0 +1 @@ +export { default as Separator } from "./Separator.vue"; diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/Sheet.vue b/apps/docs/.vitepress/theme/components/ui/sheet/Sheet.vue new file mode 100644 index 0000000..51367e0 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/Sheet.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetClose.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetClose.vue new file mode 100644 index 0000000..bc3b70a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetClose.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetContent.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetContent.vue new file mode 100644 index 0000000..ef14b84 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetContent.vue @@ -0,0 +1,56 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetDescription.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetDescription.vue new file mode 100644 index 0000000..d41c1e4 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetDescription.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetFooter.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetFooter.vue new file mode 100644 index 0000000..04d27f9 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetFooter.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetHeader.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetHeader.vue new file mode 100644 index 0000000..43d91fe --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetHeader.vue @@ -0,0 +1,16 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetTitle.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetTitle.vue new file mode 100644 index 0000000..372d0d4 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetTitle.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/SheetTrigger.vue b/apps/docs/.vitepress/theme/components/ui/sheet/SheetTrigger.vue new file mode 100644 index 0000000..7872f1c --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/SheetTrigger.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/sheet/index.ts b/apps/docs/.vitepress/theme/components/ui/sheet/index.ts new file mode 100644 index 0000000..55ff909 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/sheet/index.ts @@ -0,0 +1,31 @@ +import { type VariantProps, cva } from "class-variance-authority"; + +export { default as Sheet } from "./Sheet.vue"; +export { default as SheetTrigger } from "./SheetTrigger.vue"; +export { default as SheetClose } from "./SheetClose.vue"; +export { default as SheetContent } from "./SheetContent.vue"; +export { default as SheetHeader } from "./SheetHeader.vue"; +export { default as SheetTitle } from "./SheetTitle.vue"; +export { default as SheetDescription } from "./SheetDescription.vue"; +export { default as SheetFooter } from "./SheetFooter.vue"; + +export const sheetVariants = cva( + "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", + { + variants: { + side: { + top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + bottom: + "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", + left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + right: + "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + }, + }, + defaultVariants: { + side: "right", + }, + }, +); + +export type SheetVariants = VariantProps; diff --git a/apps/docs/.vitepress/theme/components/ui/toast/Toast.vue b/apps/docs/.vitepress/theme/components/ui/toast/Toast.vue new file mode 100644 index 0000000..15d97a6 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/Toast.vue @@ -0,0 +1,28 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastAction.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastAction.vue new file mode 100644 index 0000000..fae8253 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastAction.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastClose.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastClose.vue new file mode 100644 index 0000000..fa0f5f1 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastClose.vue @@ -0,0 +1,22 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastDescription.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastDescription.vue new file mode 100644 index 0000000..ab8bb68 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastDescription.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastProvider.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastProvider.vue new file mode 100644 index 0000000..707111b --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastProvider.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastTitle.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastTitle.vue new file mode 100644 index 0000000..3dbed0a --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastTitle.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/ToastViewport.vue b/apps/docs/.vitepress/theme/components/ui/toast/ToastViewport.vue new file mode 100644 index 0000000..a8088d1 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/ToastViewport.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/Toaster.vue b/apps/docs/.vitepress/theme/components/ui/toast/Toaster.vue new file mode 100644 index 0000000..849fc03 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/Toaster.vue @@ -0,0 +1,30 @@ + + + diff --git a/apps/docs/.vitepress/theme/components/ui/toast/index.ts b/apps/docs/.vitepress/theme/components/ui/toast/index.ts new file mode 100644 index 0000000..0365b00 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/index.ts @@ -0,0 +1,38 @@ +import type { ToastRootProps } from "radix-vue"; +import type { HTMLAttributes } from "vue"; + +export { default as Toaster } from "./Toaster.vue"; +export { default as Toast } from "./Toast.vue"; +export { default as ToastViewport } from "./ToastViewport.vue"; +export { default as ToastAction } from "./ToastAction.vue"; +export { default as ToastClose } from "./ToastClose.vue"; +export { default as ToastTitle } from "./ToastTitle.vue"; +export { default as ToastDescription } from "./ToastDescription.vue"; +export { default as ToastProvider } from "./ToastProvider.vue"; +export { toast, useToast } from "./use-toast"; + +import { type VariantProps, cva } from "class-variance-authority"; + +export const toastVariants = cva( + "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[--radix-toast-swipe-end-x] data-[swipe=move]:translate-x-[--radix-toast-swipe-move-x] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", + { + variants: { + variant: { + default: "border bg-background text-foreground", + destructive: + "destructive group border-destructive bg-destructive text-destructive-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +type ToastVariants = VariantProps; + +export interface ToastProps extends ToastRootProps { + class?: HTMLAttributes["class"]; + variant?: ToastVariants["variant"]; + onOpenChange?: ((value: boolean) => void) | undefined; +} diff --git a/apps/docs/.vitepress/theme/components/ui/toast/use-toast.ts b/apps/docs/.vitepress/theme/components/ui/toast/use-toast.ts new file mode 100644 index 0000000..58b1a68 --- /dev/null +++ b/apps/docs/.vitepress/theme/components/ui/toast/use-toast.ts @@ -0,0 +1,165 @@ +import { computed, ref } from "vue"; +import type { Component, VNode } from "vue"; +import type { ToastProps } from "."; + +const TOAST_LIMIT = 1; +const TOAST_REMOVE_DELAY = 1000000; + +export type StringOrVNode = + | string + | VNode + | (() => VNode); + +type ToasterToast = ToastProps & { + id: string; + title?: string; + description?: StringOrVNode; + action?: Component; +}; + +const actionTypes = { + ADD_TOAST: "ADD_TOAST", + UPDATE_TOAST: "UPDATE_TOAST", + DISMISS_TOAST: "DISMISS_TOAST", + REMOVE_TOAST: "REMOVE_TOAST", +} as const; + +let count = 0; + +function genId() { + count = (count + 1) % Number.MAX_VALUE; + return count.toString(); +} + +type ActionType = typeof actionTypes; + +type Action = + | { + type: ActionType["ADD_TOAST"]; + toast: ToasterToast; + } + | { + type: ActionType["UPDATE_TOAST"]; + toast: Partial; + } + | { + type: ActionType["DISMISS_TOAST"]; + toastId?: ToasterToast["id"]; + } + | { + type: ActionType["REMOVE_TOAST"]; + toastId?: ToasterToast["id"]; + }; + +interface State { + toasts: ToasterToast[]; +} + +const toastTimeouts = new Map>(); + +function addToRemoveQueue(toastId: string) { + if (toastTimeouts.has(toastId)) + return; + + const timeout = setTimeout(() => { + toastTimeouts.delete(toastId); + dispatch({ + type: actionTypes.REMOVE_TOAST, + toastId, + }); + }, TOAST_REMOVE_DELAY); + + toastTimeouts.set(toastId, timeout); +} + +const state = ref({ + toasts: [], +}); + +function dispatch(action: Action) { + switch (action.type) { + case actionTypes.ADD_TOAST: + state.value.toasts = [action.toast, ...state.value.toasts].slice(0, TOAST_LIMIT); + break; + + case actionTypes.UPDATE_TOAST: + state.value.toasts = state.value.toasts.map(t => + t.id === action.toast.id ? { ...t, ...action.toast } : t, + ); + break; + + case actionTypes.DISMISS_TOAST: { + const { toastId } = action; + + if (toastId) { + addToRemoveQueue(toastId); + } + else { + state.value.toasts.forEach((toast) => { + addToRemoveQueue(toast.id); + }); + } + + state.value.toasts = state.value.toasts.map(t => + t.id === toastId || toastId === undefined + ? { + ...t, + open: false, + } + : t, + ); + break; + } + + case actionTypes.REMOVE_TOAST: + if (action.toastId === undefined) + state.value.toasts = []; + else + state.value.toasts = state.value.toasts.filter(t => t.id !== action.toastId); + + break; + } +} + +function useToast() { + return { + toasts: computed(() => state.value.toasts), + toast, + dismiss: (toastId?: string) => dispatch({ type: actionTypes.DISMISS_TOAST, toastId }), + }; +} + +type Toast = Omit; + +function toast(props: Toast) { + const id = genId(); + + const update = (props: ToasterToast) => + dispatch({ + type: actionTypes.UPDATE_TOAST, + toast: { ...props, id }, + }); + + const dismiss = () => dispatch({ type: actionTypes.DISMISS_TOAST, toastId: id }); + + dispatch({ + type: actionTypes.ADD_TOAST, + toast: { + ...props, + id, + open: true, + onOpenChange: (open: boolean) => { + if (!open) + dismiss(); + }, + }, + }); + + return { + id, + dismiss, + update, + }; +} + +export { toast, useToast }; diff --git a/apps/docs/.vitepress/theme/config/docs.ts b/apps/docs/.vitepress/theme/config/docs.ts new file mode 100644 index 0000000..e85814c --- /dev/null +++ b/apps/docs/.vitepress/theme/config/docs.ts @@ -0,0 +1,245 @@ +export interface NavItem { + title: string; + href?: string; + disabled?: boolean; + external?: boolean; + icon?: string; + label?: string; +} + +export type SidebarNavItem = NavItem & { + items: SidebarNavItem[]; +}; + +export type NavItemWithChildren = NavItem & { + items: NavItemWithChildren[]; +}; + +interface DocsConfig { + mainNav: NavItem[]; + sidebarNav: SidebarNavItem[]; +} + +export const docsConfig: DocsConfig = { + mainNav: [ + { + title: "Docs", + href: "/docs/introduction", + }, + { + title: "Components", + href: "/docs/components/alert", + }, + { + title: "Figma", + href: "https://www.lemonsqueezy.com/wedges/figma", + external: true, + }, + { + title: "GitHub", + href: "https://github.com/raymondmuller/wedges-vue", + external: true, + }, + ], + sidebarNav: [ + { + title: "Getting Started", + items: [ + { + title: "Introduction", + href: "/docs/introduction", + items: [], + }, + { + title: "Requirements", + href: "/docs/requirements", + items: [], + }, + ], + }, + { + title: "Installation", + items: [ + { + title: "Default", + href: "/docs/installation/default", + items: [], + }, + { + title: "Laravel", + href: "/docs/installation/laravel", + items: [], + }, + ], + }, + { + title: "Theming", + items: [ + { + title: "Tailwind Plugin", + href: "/docs/theming/tailwind-css-plugin", + items: [], + }, + { + title: "Color System", + href: "/docs/theming/color-system", + items: [], + }, + { + title: "Default Themes", + href: "/docs/theming/default-themes", + items: [], + }, + { + title: "Custom Themes", + href: "/docs/theming/custom-themes", + items: [], + }, + { + title: "Additional Utilities", + href: "/docs/theming/additional-utilities", + items: [], + }, + ], + }, + { + title: "Components", + items: [ + { + title: "Alert", + href: "/docs/components/alert", + items: [], + }, + { + title: "Avatar", + href: "/docs/components/avatar", + items: [], + }, + { + title: "Avatar Group", + href: "/docs/components/avatar-group", + items: [], + }, + { + title: "Badge", + href: "/docs/components/badge", + items: [], + }, + { + title: "Button", + href: "/docs/components/button", + items: [], + }, + { + title: "Button Group", + href: "/docs/components/button-group", + items: [], + }, + { + title: "Checkbox", + href: "/docs/components/checkbox", + items: [], + }, + { + title: "Checkbox Group", + href: "/docs/components/checkbox-group", + items: [], + }, + { + title: "Dropdown Menu", + href: "/docs/components/dropdown-menu", + items: [], + }, + { + title: "Input", + href: "/docs/components/input", + items: [], + }, + { + title: "Kbd", + href: "/docs/components/kbd", + label: "New", + items: [], + }, + { + title: "Label", + href: "/docs/components/label", + items: [], + }, + { + title: "Loading", + href: "/docs/components/loading", + items: [], + }, + { + title: "Popover", + href: "/docs/components/popover", + items: [], + }, + { + title: "Progress Bar", + href: "/docs/components/progress-bar", + label: "New", + items: [], + }, + { + title: "Progress Circle", + href: "/docs/components/progress-circle", + label: "New", + items: [], + }, + { + title: "Radio Group", + href: "/docs/components/radio-group", + items: [], + }, + { + title: "Slider", + href: "/docs/components/slider", + label: "New", + items: [], + }, + { + title: "Switch", + href: "/docs/components/switch", + items: [], + }, + { + title: "Switch Group", + href: "/docs/components/switch-group", + items: [], + }, + { + title: "Tabs", + href: "/docs/components/tabs", + items: [], + }, + { + title: "Tag", + href: "/docs/components/tag", + items: [], + }, + { + title: "Textarea", + href: "/docs/components/textarea", + items: [], + }, + { + title: "Toggle", + href: "/docs/components/toggle", + items: [], + }, + { + title: "Toggle Group", + href: "/docs/components/toggle-group", + items: [], + }, + { + title: "Tooltip", + href: "/docs/components/tooltip", + items: [], + }, + ], + }, + ], +}; diff --git a/apps/docs/.vitepress/theme/config/shiki.ts b/apps/docs/.vitepress/theme/config/shiki.ts new file mode 100644 index 0000000..7ec8986 --- /dev/null +++ b/apps/docs/.vitepress/theme/config/shiki.ts @@ -0,0 +1,6 @@ +import { createCssVariablesTheme } from "shiki"; + +export const cssVariables = createCssVariablesTheme({ + variablePrefix: "--shiki-", + variableDefaults: {}, +}); diff --git a/apps/docs/.vitepress/theme/config/site.ts b/apps/docs/.vitepress/theme/config/site.ts new file mode 100644 index 0000000..3c018be --- /dev/null +++ b/apps/docs/.vitepress/theme/config/site.ts @@ -0,0 +1,17 @@ +export const siteConfig = { + name: "wedges-vue", + url: "https://github.com/raymondmuller/wedges-vue", + ogImage: "https://lemonsqueezy.com/wedges/docs/opengraph-image.png?c3c6e93219970a74", + description: "Beautifully designed components by LemonSqueezy, now available for Vue.", + links: { + twitter: "https://twitter.com/raymondmuller", + github: "https://github.com/raymondmuller/wedges-vue", + }, + keywords: "LemonSqueezy,Wedges,Vue,Nuxt,Vue Components,TailwindCSS,Radix Vue", +}; + +export const announcementConfig = { + icon: "โœจ", + title: "Now available for Vue", + link: "/docs/introduction", +}; diff --git a/apps/docs/.vitepress/theme/index.ts b/apps/docs/.vitepress/theme/index.ts new file mode 100644 index 0000000..730b1a7 --- /dev/null +++ b/apps/docs/.vitepress/theme/index.ts @@ -0,0 +1,25 @@ +// https://vitepress.dev/guide/custom-theme +import type { Theme } from "vitepress"; +import DefaultTheme from "vitepress/theme"; +import Layout from "./layout/MainLayout.vue"; +import DocsLayout from "./layout/DocsLayout.vue"; +import * as components from "./components"; + +const examples = import.meta.glob("./examples/*.vue", { eager: true }); +import "./style.css"; +import "./styles/shiki.css"; + +export default { + extends: DefaultTheme, + Layout, + enhanceApp({ app }) { + // ... + app.component("docs", DocsLayout); + + for (const component of Object.keys(components)) + app.component(component, components[component]); + + for (const example of Object.keys(examples)) + app.component(example, examples[example]); + }, +} satisfies Theme; diff --git a/apps/docs/.vitepress/theme/layout/DocsLayout.vue b/apps/docs/.vitepress/theme/layout/DocsLayout.vue new file mode 100644 index 0000000..9caeca0 --- /dev/null +++ b/apps/docs/.vitepress/theme/layout/DocsLayout.vue @@ -0,0 +1,111 @@ + + + diff --git a/apps/docs/.vitepress/theme/layout/MainLayout.vue b/apps/docs/.vitepress/theme/layout/MainLayout.vue new file mode 100644 index 0000000..cba47b4 --- /dev/null +++ b/apps/docs/.vitepress/theme/layout/MainLayout.vue @@ -0,0 +1,250 @@ + + + diff --git a/apps/docs/.vitepress/theme/plugins/previewer.ts b/apps/docs/.vitepress/theme/plugins/previewer.ts new file mode 100644 index 0000000..c2a3257 --- /dev/null +++ b/apps/docs/.vitepress/theme/plugins/previewer.ts @@ -0,0 +1,21 @@ +import type { MarkdownRenderer } from "vitepress"; +import { parseProps } from "./utils"; + +export default function (md: MarkdownRenderer) { + function addRenderRule(type: string) { + const defaultRender = md.renderer.rules[type]; + md.renderer.rules[type] = (tokens, idx, options, env, self) => { + const token = tokens[idx]; + const content = token.content.trim(); + if (!content.match(/^")) + return defaultRender!(tokens, idx, options, env, self); + + const props = parseProps(content); + const { attrs } = props; + const demoScripts = ``.trim(); + return demoScripts; + }; + } + addRenderRule("html_block"); + addRenderRule("html_inline"); +} diff --git a/apps/docs/.vitepress/theme/plugins/utils.ts b/apps/docs/.vitepress/theme/plugins/utils.ts new file mode 100644 index 0000000..2a497c4 --- /dev/null +++ b/apps/docs/.vitepress/theme/plugins/utils.ts @@ -0,0 +1,40 @@ +// Credit to @hairyf https://github.com/hairyf/markdown-it-vitepress-demo + +import { baseParse } from "@vue/compiler-core"; +import type { AttributeNode, ElementNode } from "@vue/compiler-core"; + +export interface GenerateOptions { + attrs?: string; + props: Record; + path: string; + code: string; +} + +export function isUndefined(v: any): v is undefined { + return v === undefined || v === null; +} + +function getPropsMap(attrs: any[]) { + const map: Record = {}; + for (const { name, value, exp, arg } of attrs) { + if (name === "bind") { + if (!isUndefined(arg?.content)) + map[arg.content] = JSON.parse(exp.content); + continue; + } + if (isUndefined(value?.content) || value?.content === "") + map[name] = true; + else if (["true", "false"].includes(value?.content || "")) + map[name] = value?.content === "true"; + else + map[name] = value?.content; + } + return map; +} + +export function parseProps(content: string) { + const ast = baseParse(content); + const demoElement = ast.children[0] as ElementNode; + + return getPropsMap(demoElement.props as AttributeNode[]); +} diff --git a/apps/docs/.vitepress/theme/style.css b/apps/docs/.vitepress/theme/style.css new file mode 100644 index 0000000..e34f94f --- /dev/null +++ b/apps/docs/.vitepress/theme/style.css @@ -0,0 +1,163 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + :root { + --font-geist-sans: "geist-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + --popover: 0 0% 100%; + --popover-foreground: 240 10% 3.9%; + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + --destructive: 0 72.22% 50.59%; + --destructive-foreground: 0 0% 98%; + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + --ring: 240 5% 64.9%; + --radius: 0.5rem; + } + + .dark { + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + --muted: 240 3.7% 15.9%; + --muted-foreground: 240 5% 64.9%; + --accent: 240 3.7% 15.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 85.7% 97.3%; + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + --ring: 240 4.9% 83.9%; + } + + + html { + -webkit-text-size-adjust: 100%; + font-variation-settings: normal; + } + body { + @apply bg-background text-foreground min-h-screen antialiased font-sans; + /* font-feature-settings: "rlig" 1, "calt" 1; */ + font-synthesis-weight: none; + text-rendering: optimizeLegibility; + } + + /* Mobile tap highlight */ + /* https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color */ + html { + -webkit-tap-highlight-color: rgba(128, 128, 128, 0.5); + } + + /* Font face Geist font */ + + @font-face { + font-family: "geist-sans"; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url("/fonts/Geist/GeistVariableVF.woff2") format("woff2"); + } + + /* === Scrollbars === */ + + ::-webkit-scrollbar { + @apply w-2; + @apply h-2; + } + + ::-webkit-scrollbar-track { + @apply !bg-muted; + } + ::-webkit-scrollbar-thumb { + @apply rounded-sm !bg-muted-foreground/30; + } + + /* Firefox */ + /* https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color#browser_compatibility */ + html { + scrollbar-color: hsl(215.4 16.3% 46.9% / 0.3); + } + + html.dark { + scrollbar-color: hsl(215.4 16.3% 56.9% / 0.3); + } + + .hide-scrollbar::-webkit-scrollbar { + display: none; + } + + .hide-scrollbar { + -ms-overflow-style: none; + scrollbar-width: none; + } + + .antialised { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + +} + + +@layer utilities { + .step { + counter-increment: step; + } + + .step:before { + @apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background; + @apply -ml-[50px] -mt-1; + content: counter(step); + } +} + +@media (max-width: 640px) { + .container { + @apply px-4; + } +} + +div[class^="language-"] { + @apply mb-4 mt-6 max-h-[650px] overflow-x-auto md:rounded-lg border !bg-zinc-950 dark:!bg-zinc-900 +} +pre { + @apply py-4; +} + +pre code { + @apply relative font-mono text-sm ; +} + +pre code .line { + @apply px-4 min-h-6 !py-0.5 w-full inline-block; +} + +.line-number { + @apply min-h-[1.375rem] !text-sm !inline-block text-muted-foreground; +} + +::view-transition-old(root), +::view-transition-new(root) { + animation-duration: 0.3s; +} \ No newline at end of file diff --git a/apps/docs/.vitepress/theme/styles/shiki.css b/apps/docs/.vitepress/theme/styles/shiki.css new file mode 100644 index 0000000..db00282 --- /dev/null +++ b/apps/docs/.vitepress/theme/styles/shiki.css @@ -0,0 +1,20 @@ +:root { + --shiki-foreground: #FFF8; + --shiki-color-background: #ffffff; + --shiki-token-constant: #ffffff; + --shiki-token-string: #ffffff88; + --shiki-token-comment: #ffffff88; + --shiki-token-keyword: #ffffff88; + --shiki-token-parameter: #AA0000; + --shiki-token-function: #ffffff; + --shiki-token-string-expression: #ebebeb; + --shiki-token-punctuation: #ffffff; + --shiki-token-link: #EE0000; +} + +.shiki .highlighted-word { + border-radius: calc(var(--radius) - 2px); + border-color: rgba(63,63,70,.7); + background-color: rgba(63,63,70,.5); + padding: 0.25rem; +} \ No newline at end of file diff --git a/apps/docs/.vitepress/theme/styles/themes.css b/apps/docs/.vitepress/theme/styles/themes.css new file mode 100644 index 0000000..49194d9 --- /dev/null +++ b/apps/docs/.vitepress/theme/styles/themes.css @@ -0,0 +1,775 @@ +html { + color-scheme: light; +} + +html.dark { + color-scheme: dark; +} + +.theme-zinc { + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + + --popover: 0 0% 100%; + --popover-foreground: 240 10% 3.9%; + + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; + + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + + --ring: 240 5.9% 10%; + + --radius: 0.5rem; +} + +.theme-zinc.dark { + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + + --muted: 240 3.7% 15.9%; + --muted-foreground: 240 5% 64.9%; + + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; + + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; + + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + + --accent: 240 3.7% 15.9%; + --accent-foreground: 0 0% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + + --ring: 240 4.9% 83.9%; +} + +.theme-slate { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --ring: 222.2 84% 4.9%; + + --radius: 0.5rem; +} + +.theme-slate.dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --ring: 212.7 26.8% 83.9; +} + +.theme-stone { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + + --primary: 24 9.8% 10%; + --primary-foreground: 60 9.1% 97.8%; + + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 20 14.3% 4.1%; + + --radius: 0.95rem; +} + +.theme-stone.dark { + --background: 20 14.3% 4.1%; + --foreground: 60 9.1% 97.8%; + + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + + --primary: 60 9.1% 97.8%; + --primary-foreground: 24 9.8% 10%; + + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 24 5.7% 82.9%; +} + +.theme-gray { + --background: 0 0% 100%; + --foreground: 224 71.4% 4.1%; + + --muted: 220 14.3% 95.9%; + --muted-foreground: 220 8.9% 46.1%; + + --popover: 0 0% 100%; + --popover-foreground: 224 71.4% 4.1%; + + --card: 0 0% 100%; + --card-foreground: 224 71.4% 4.1%; + + --border: 220 13% 91%; + --input: 220 13% 91%; + + --primary: 220.9 39.3% 11%; + --primary-foreground: 210 20% 98%; + + --secondary: 220 14.3% 95.9%; + --secondary-foreground: 220.9 39.3% 11%; + + --accent: 220 14.3% 95.9%; + --accent-foreground: 220.9 39.3% 11%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 20% 98%; + + --ring: 224 71.4% 4.1%; + + --radius: 0.35rem; +} + +.theme-gray.dark { + --background: 224 71.4% 4.1%; + --foreground: 210 20% 98%; + + --muted: 215 27.9% 16.9%; + --muted-foreground: 217.9 10.6% 64.9%; + + --popover: 224 71.4% 4.1%; + --popover-foreground: 210 20% 98%; + + --card: 224 71.4% 4.1%; + --card-foreground: 210 20% 98%; + + --border: 215 27.9% 16.9%; + --input: 215 27.9% 16.9%; + + --primary: 210 20% 98%; + --primary-foreground: 220.9 39.3% 11%; + + --secondary: 215 27.9% 16.9%; + --secondary-foreground: 210 20% 98%; + + --accent: 215 27.9% 16.9%; + --accent-foreground: 210 20% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 20% 98%; + + --ring: 216 12.2% 83.9%; +} + +.theme-neutral { + --background: 0 0% 100%; + --foreground: 0 0% 3.9%; + + --muted: 0 0% 96.1%; + --muted-foreground: 0 0% 45.1%; + + --popover: 0 0% 100%; + --popover-foreground: 0 0% 3.9%; + + --card: 0 0% 100%; + --card-foreground: 0 0% 3.9%; + + --border: 0 0% 89.8%; + --input: 0 0% 89.8%; + + --primary: 0 0% 9%; + --primary-foreground: 0 0% 98%; + + --secondary: 0 0% 96.1%; + --secondary-foreground: 0 0% 9%; + + --accent: 0 0% 96.1%; + --accent-foreground: 0 0% 9%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + + --ring: 0 0% 3.9%; + + --radius: ; +} + +.theme-neutral.dark { + --background: 0 0% 3.9%; + --foreground: 0 0% 98%; + + --muted: 0 0% 14.9%; + --muted-foreground: 0 0% 63.9%; + + --popover: 0 0% 3.9%; + --popover-foreground: 0 0% 98%; + + --card: 0 0% 3.9%; + --card-foreground: 0 0% 98%; + + --border: 0 0% 14.9%; + --input: 0 0% 14.9%; + + --primary: 0 0% 98%; + --primary-foreground: 0 0% 9%; + + --secondary: 0 0% 14.9%; + --secondary-foreground: 0 0% 98%; + + --accent: 0 0% 14.9%; + --accent-foreground: 0 0% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + + --ring: 0 0% 83.1%; +} + +.theme-red { + --background: 0 0% 100%; + --foreground: 0 0% 3.9%; + + --muted: 0 0% 96.1%; + --muted-foreground: 0 0% 45.1%; + + --popover: 0 0% 100%; + --popover-foreground: 0 0% 3.9%; + + --card: 0 0% 100%; + --card-foreground: 0 0% 3.9%; + + --border: 0 0% 89.8%; + --input: 0 0% 89.8%; + + --primary: 0 72.2% 50.6%; + --primary-foreground: 0 85.7% 97.3%; + + --secondary: 0 0% 96.1%; + --secondary-foreground: 0 0% 9%; + + --accent: 0 0% 96.1%; + --accent-foreground: 0 0% 9%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + + --ring: 0 72.2% 50.6%; + + --radius: 0.4rem; +} + +.theme-red.dark { + --background: 0 0% 3.9%; + --foreground: 0 0% 98%; + + --muted: 0 0% 14.9%; + --muted-foreground: 0 0% 63.9%; + + --popover: 0 0% 3.9%; + --popover-foreground: 0 0% 98%; + + --card: 0 0% 3.9%; + --card-foreground: 0 0% 98%; + + --border: 0 0% 14.9%; + --input: 0 0% 14.9%; + + --primary: 0 72.2% 50.6%; + --primary-foreground: 0 85.7% 97.3%; + + --secondary: 0 0% 14.9%; + --secondary-foreground: 0 0% 98%; + + --accent: 0 0% 14.9%; + --accent-foreground: 0 0% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + + --ring: 0 72.2% 50.6%; +} + +.theme-rose { + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + + --popover: 0 0% 100%; + --popover-foreground: 240 10% 3.9%; + + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + + --primary: 346.8 77.2% 49.8%; + --primary-foreground: 355.7 100% 97.3%; + + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + + --ring: 346.8 77.2% 49.8%; + + --radius: 0.5rem; +} + +.theme-rose.dark { + --background: 20 14.3% 4.1%; + --foreground: 0 0% 95%; + + --muted: 0 0% 15%; + --muted-foreground: 240 5% 64.9%; + + --popover: 0 0% 9%; + --popover-foreground: 0 0% 95%; + + --card: 24 9.8% 10%; + --card-foreground: 0 0% 95%; + + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + + --primary: 346.8 77.2% 49.8%; + --primary-foreground: 355.7 100% 97.3%; + + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + + --accent: 12 6.5% 15.1%; + --accent-foreground: 0 0% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 85.7% 97.3%; + + --ring: 346.8 77.2% 49.8%; +} + +.theme-orange { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + + --primary: 24.6 95% 53.1%; + --primary-foreground: 60 9.1% 97.8%; + + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 24.6 95% 53.1%; + + --radius: 0.95rem; +} + +.theme-orange.dark { + --background: 20 14.3% 4.1%; + --foreground: 60 9.1% 97.8%; + + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 60 9.1% 97.8%; + + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 20.5 90.2% 48.2%; +} + +.theme-green { + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + + --popover: 0 0% 100%; + --popover-foreground: 240 10% 3.9%; + + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + + --primary: 142.1 76.2% 36.3%; + --primary-foreground: 355.7 100% 97.3%; + + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + + --ring: 142.1 76.2% 36.3%; + + --radius: ; +} + +.theme-green.dark { + --background: 20 14.3% 4.1%; + --foreground: 0 0% 95%; + + --muted: 0 0% 15%; + --muted-foreground: 240 5% 64.9%; + + --popover: 0 0% 9%; + --popover-foreground: 0 0% 95%; + + --card: 24 9.8% 10%; + --card-foreground: 0 0% 95%; + + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + + --primary: 142.1 70.6% 45.3%; + --primary-foreground: 144.9 80.4% 10%; + + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + + --accent: 12 6.5% 15.1%; + --accent-foreground: 0 0% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 85.7% 97.3%; + + --ring: 142.4 71.8% 29.2%; +} + +.theme-blue { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + + --primary: 221.2 83.2% 53.3%; + --primary-foreground: 210 40% 98%; + + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + + --ring: 221.2 83.2% 53.3%; + + --radius: ; +} + +.theme-blue.dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + + --primary: 217.2 91.2% 59.8%; + --primary-foreground: 222.2 47.4% 11.2%; + + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + + --ring: 224.3 76.3% 48%; +} + +.theme-yellow { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + + --primary: 47.9 95.8% 53.1%; + --primary-foreground: 26 83.3% 14.1%; + + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 20 14.3% 4.1%; + + --radius: 0.95rem; +} + +.theme-yellow.dark { + --background: 20 14.3% 4.1%; + --foreground: 60 9.1% 97.8%; + + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + + --primary: 47.9 95.8% 53.1%; + --primary-foreground: 26 83.3% 14.1%; + + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 60 9.1% 97.8%; + + --ring: 35.5 91.7% 32.9%; +} + +.theme-violet { + --background: 0 0% 100%; + --foreground: 224 71.4% 4.1%; + + --muted: 220 14.3% 95.9%; + --muted-foreground: 220 8.9% 46.1%; + + --popover: 0 0% 100%; + --popover-foreground: 224 71.4% 4.1%; + + --card: 0 0% 100%; + --card-foreground: 224 71.4% 4.1%; + + --border: 220 13% 91%; + --input: 220 13% 91%; + + --primary: 262.1 83.3% 57.8%; + --primary-foreground: 210 20% 98%; + + --secondary: 220 14.3% 95.9%; + --secondary-foreground: 220.9 39.3% 11%; + + --accent: 220 14.3% 95.9%; + --accent-foreground: 220.9 39.3% 11%; + + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 20% 98%; + + --ring: 262.1 83.3% 57.8%; + + --radius: ; +} + +.theme-violet.dark { + --background: 224 71.4% 4.1%; + --foreground: 210 20% 98%; + + --muted: 215 27.9% 16.9%; + --muted-foreground: 217.9 10.6% 64.9%; + + --popover: 224 71.4% 4.1%; + --popover-foreground: 210 20% 98%; + + --card: 224 71.4% 4.1%; + --card-foreground: 210 20% 98%; + + --border: 215 27.9% 16.9%; + --input: 215 27.9% 16.9%; + + --primary: 263.4 70% 50.4%; + --primary-foreground: 210 20% 98%; + + --secondary: 215 27.9% 16.9%; + --secondary-foreground: 210 20% 98%; + + --accent: 215 27.9% 16.9%; + --accent-foreground: 210 20% 98%; + + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 20% 98%; + + --ring: 263.4 70% 50.4%; +} diff --git a/apps/docs/.vitepress/theme/types/colors.ts b/apps/docs/.vitepress/theme/types/colors.ts new file mode 100644 index 0000000..7c16750 --- /dev/null +++ b/apps/docs/.vitepress/theme/types/colors.ts @@ -0,0 +1,13 @@ +export type Color = + | "zinc" + | "slate" + | "stone" + | "gray" + | "neutral" + | "red" + | "rose" + | "orange" + | "green" + | "blue" + | "yellow" + | "violet"; diff --git a/apps/docs/.vitepress/theme/types/docs.ts b/apps/docs/.vitepress/theme/types/docs.ts new file mode 100644 index 0000000..ddce283 --- /dev/null +++ b/apps/docs/.vitepress/theme/types/docs.ts @@ -0,0 +1,9 @@ +export interface TableOfContentsItem { + title?: string; + url?: string; + items?: TableOfContentsItem[]; +} + +export interface TableOfContents { + items: TableOfContentsItem[]; +} diff --git a/apps/docs/api-examples.md b/apps/docs/api-examples.md new file mode 100644 index 0000000..6bd8bb5 --- /dev/null +++ b/apps/docs/api-examples.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: + +```md + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/apps/docs/index.md b/apps/docs/index.md new file mode 100644 index 0000000..17979e1 --- /dev/null +++ b/apps/docs/index.md @@ -0,0 +1,25 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "Wedges Vue" + text: "An ever-expanding, open-source Vue library built with the Wedges Design System, Radix primitives, and Tailwind CSS." + tagline: My great project tagline + actions: + - theme: brand + text: Markdown Examples + link: /markdown-examples + - theme: alt + text: API Examples + link: /api-examples + +features: + - title: Feature A + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature B + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature C + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit +--- + diff --git a/apps/docs/markdown-examples.md b/apps/docs/markdown-examples.md new file mode 100644 index 0000000..f9258a5 --- /dev/null +++ b/apps/docs/markdown-examples.md @@ -0,0 +1,85 @@ +# Markdown Extension Examples + +This page demonstrates some of the built-in markdown extensions provided by VitePress. + +## Syntax Highlighting + +VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: + +**Input** + +````md +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` +```` + +**Output** + +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +## Custom Containers + +**Input** + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +**Output** + +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: + +## More + +Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). diff --git a/apps/docs/package.json b/apps/docs/package.json new file mode 100644 index 0000000..0a92ad3 --- /dev/null +++ b/apps/docs/package.json @@ -0,0 +1,83 @@ +{ + "name": "docs", + "type": "module", + "version": "0.1.0", + "files": [ + "dist" + ], + "scripts": { + "dev": "vitepress dev", + "build": "vitepress build", + "prebuild": "pnpm run docs:gen", + "preview": "vitepress preview", + "docs:gen": "tsx scripts/autogen.ts", + "typecheck": "vue-tsc", + "typecheck:registry": "vue-tsc -p tsconfig.registry.json", + "docs:dev": "vitepress dev", + "docs:build": "vitepress build", + "docs:preview": "vitepress preview" + }, + "dependencies": { + "@formkit/auto-animate": "^0.8.2", + "@iconicicons/vue3": "^1.5.1", + "@lemonsqueezy/wedges": "^1.2.2", + "@radix-icons/vue": "^1.0.0", + "@tanstack/vue-table": "^8.16.0", + "@unovis/ts": "^1.4.0", + "@unovis/vue": "^1.4.0", + "@vee-validate/zod": "^4.12.6", + "@vueuse/core": "^10.9.0", + "clsx": "^2.1.1", + "date-fns": "^3.6.0", + "embla-carousel": "^8.0.2", + "embla-carousel-autoplay": "^8.0.2", + "embla-carousel-vue": "^8.0.2", + "magic-string": "^0.30.10", + "radix-vue": "^1.7.2", + "tailwindcss-animate": "^1.0.7", + "v-calendar": "^3.1.2", + "vaul-vue": "^0.1.0", + "vee-validate": "4.12.5", + "vue": "^3.4.25", + "vue-sonner": "^1.1.2", + "vue-wrap-balancer": "^1.1.3", + "wedges-vue": "workspace:^", + "zod": "^3.23.4" + }, + "devDependencies": { + "@babel/traverse": "^7.24.1", + "@iconify-json/radix-icons": "^1.1.14", + "@iconify-json/simple-icons": "^1.1.100", + "@iconify-json/tabler": "^1.1.110", + "@iconify/json": "^2.2.204", + "@iconify/vue": "^4.1.2", + "@shikijs/transformers": "^1.3.0", + "@tailwindcss/typography": "^0.5.12", + "@types/lodash.template": "^4.5.3", + "@types/node": "^20.12.7", + "@vitejs/plugin-vue": "^5.0.4", + "@vitejs/plugin-vue-jsx": "^3.1.0", + "@vue/compiler-core": "^3.4.25", + "@vue/compiler-dom": "^3.4.25", + "@vue/tsconfig": "^0.5.1", + "autoprefixer": "^10.4.19", + "class-variance-authority": "^0.7.0", + "fast-glob": "^3.3.2", + "lodash.template": "^4.5.0", + "markdown-it": "^14.1.0", + "oxc-parser": "^0.8.0", + "pathe": "^1.1.2", + "postcss": "^8.4.38", + "rimraf": "^5.0.5", + "shiki": "^1.3.0", + "tailwind-merge": "^2.3.0", + "tailwindcss": "^3.4.3", + "tsx": "^4.7.3", + "typescript": "^5.4.5", + "unplugin-icons": "^0.18.5", + "vite": "^5.2.10", + "vitepress": "^1.1.3", + "vue-component-meta": "^2.0.14", + "vue-tsc": "^2.0.14" + } +} diff --git a/apps/docs/scripts/autogen.ts b/apps/docs/scripts/autogen.ts new file mode 100644 index 0000000..78d5879 --- /dev/null +++ b/apps/docs/scripts/autogen.ts @@ -0,0 +1,284 @@ +import { join, parse, resolve } from "node:path"; +import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import fg from "fast-glob"; +import MarkdownIt from "markdown-it"; +import type { ComponentMeta, MetaCheckerOptions, PropertyMeta, PropertyMetaSchema } from "vue-component-meta"; +import { createComponentMetaChecker } from "vue-component-meta"; +import { babelParse, parse as sfcParse } from "vue/compiler-sfc"; +import _traverse from "@babel/traverse"; +import { transformJSDocLinks } from "./utils"; + +// @ts-expect-error ignore +const traverse = _traverse.default as typeof _traverse; +const __dirname = fileURLToPath(new URL(".", import.meta.url)); + +const components = {}; + +// 1. Get all the components in the components folder +const componentsFolder = resolve(__dirname, "../../../packages/wedges-vue/src/components"); +const componentFolders = readdirSync(componentsFolder, { withFileTypes: true }).filter(dirent => dirent.isDirectory()); + +componentFolders.forEach((folder) => { + const folderPath = join(componentsFolder, folder.name); + const files = readdirSync(folderPath, { withFileTypes: true }).filter(file => file.name.includes(".vue")); + components[folder.name] = files.map(file => parse(file.name).name); +}); + +const md = new MarkdownIt(); +md.use(transformJSDocLinks); + +const checkerOptions: MetaCheckerOptions = { + forceUseTs: true, + printer: { newLine: 1 }, +}; + +const tsconfigChecker = createComponentMetaChecker( + resolve(__dirname, "../../../packages/wedges-vue/tsconfig.json"), + checkerOptions, +); + +const eventDescriptionMap = new Map(); +const depTree = new Map(); +let prevDeps: string[] = []; + +const allComponents = fg.sync(["src/**/*.vue", "!src/**/story/*.vue", "!src/**/*.story.vue"], { + cwd: resolve(__dirname, "../../../packages/wedges-vue"), + absolute: true, +}); + +const listOfComponents = Object.values(components).flatMap(i => i); +const primitiveComponents = allComponents.filter(i => listOfComponents.includes(parse(i).name)); + +// 1. Generate all the dependencies for each components +allComponents.forEach((i) => { + generateDependencies(i); +}); + +// 2. Generate component meta +primitiveComponents.forEach((componentPath) => { + const dir = parse(componentPath).dir.split("/").at(-1) ?? ""; + const flattenDeps = [dir, ...getDependencies(dir)]; + if (!arraysAreEqual(prevDeps, flattenDeps)) { + flattenDeps.forEach((dep) => { + getEventFromComponentPath(dep); + }); + prevDeps = flattenDeps; + } + + const componentName = parse(componentPath).name; + const meta = parseMeta(tsconfigChecker.getComponentMeta(componentPath)); + + const metaDirPath = resolve(__dirname, "../src/content/meta"); + // if meta dir doesn't exist create + if (!existsSync(metaDirPath)) + mkdirSync(metaDirPath); + + const metaMdFilePath = join(metaDirPath, `${componentName}.md`); + + let parsedString = "\n\n"; + if (meta.props.length) + parsedString += `\n`; + + if (meta.events.length) + parsedString += `\n\n`; + + if (meta.slots.length) + parsedString += `\n\n`; + + if (meta.methods.length) + parsedString += `\n\n`; + + writeFileSync(metaMdFilePath, parsedString); +}); + +function parseTypeFromSchema(schema: PropertyMetaSchema): string { + if (typeof schema === "object" && (schema.kind === "enum" || schema.kind === "array")) { + const isFlatEnum = schema.schema?.every(val => typeof val === "string"); + const enumValue = schema?.schema?.filter(i => i !== "undefined") ?? []; + + if (isFlatEnum && /^[A-Z]/.test(schema.type)) + return enumValue.join(" | "); + else if (typeof schema.schema?.[0] === "object" && schema.schema?.[0].kind === "enum") + return schema.schema.map((s: PropertyMetaSchema) => parseTypeFromSchema(s)).join(" | "); + else + return schema.type; + } + else if (typeof schema === "object" && schema.kind === "object") { + return schema.type; + } + else if (typeof schema === "string") { + return schema; + } + else { + return ""; + } +} + +// Utilities +function parseMeta(meta: ComponentMeta) { + const props = meta.props + // Exclude global props + .filter(prop => !prop.global) + .map((prop) => { + let defaultValue = prop.default; + let type = prop.type; + const { name, description, required } = prop; + + if (name === "as") + defaultValue = defaultValue ?? "\"div\""; + + if (defaultValue === "undefined") + defaultValue = undefined; + + if (!type.includes("AcceptableValue")) + type = parseTypeFromSchema(prop.schema) || type; + + return ({ + name, + description: md.render(description), + type: type.replace(/\s*\|\s*undefined/g, ""), + required, + default: defaultValue ?? undefined, + }); + }) + .sort((a, b) => a.name.localeCompare(b.name)); + + const events = meta.events + .map((event) => { + const { name, type } = event; + return ({ + name, + description: md.render((eventDescriptionMap.get(name) ?? "").replace(/^[ \t]+/gm, "")), + type: type.replace(/\s*\|\s*undefined/g, ""), + }); + }) + .sort((a, b) => a.name.localeCompare(b.name)); + + const defaultSlot = meta.slots?.[0]; + const slots: { name: string; description: string; type: string }[] = []; + + if (defaultSlot && defaultSlot.type !== "{}") { + const schema = defaultSlot.schema; + if (typeof schema === "object" && schema.schema) { + Object.values(schema.schema).forEach((childMeta: PropertyMeta) => { + slots.push({ + name: childMeta.name, + description: md.render(childMeta.description), + type: parseTypeFromSchema(childMeta.schema), + }); + }); + } + } + + // exposed method + const methods = meta.exposed + .filter(expose => typeof expose.schema === "object" && expose.schema.kind === "event") + .map(expose => ({ + name: expose.name, + description: md.render(expose.description), + type: expose.type, + })); + + return { + props, + events, + slots, + methods, + }; +} + +function getEventFromComponentPath(dir: string) { + const files = readdirSync(resolve(__dirname, "../../../packages/wedges-vue/src/components", dir), { withFileTypes: true }).filter(file => file.name.includes(".vue")); + + files.forEach((file) => { + const { name, path } = file; + const source = readFileSync(join(path, name), { encoding: "utf8" }); + const { descriptor } = sfcParse(source, { + filename: name, + }); + + const code = descriptor.script?.content; + if (code) { + const result = babelParse(code, { + sourceType: "module", + plugins: ["typescript"], + }); + + for (const node of result.program.body) { + if (node.type === "ExportNamedDeclaration" && node.loc) { + if (node.declaration?.type === "TSTypeAliasDeclaration") { + if (node.declaration.typeAnnotation.type === "TSTypeLiteral") { + node.declaration.typeAnnotation.members.forEach((member) => { + if (member.type === "TSPropertySignature" && member.key.type === "StringLiteral" && member.leadingComments?.[0].loc) { + const key = member.key.value; + const description = member.leadingComments?.[0].value.replaceAll("*", "").trim(); + eventDescriptionMap.set(key, description); + } + else if (member.type === "TSPropertySignature" && member.key.type === "Identifier" && member.leadingComments?.[0].loc) { + const key = member.key.name; + const description = member.leadingComments?.[0].value.replaceAll("*", "").trim(); + eventDescriptionMap.set(key, description); + } + }); + } + else if (node.declaration.typeAnnotation.type === "TSIntersectionType") { + const literalType = node.declaration.typeAnnotation.types.find(t => t.type === "TSTypeLiteral"); + if (literalType?.type === "TSTypeLiteral") { + literalType.members.forEach((member) => { + if (member.type === "TSPropertySignature" && member.key.type === "StringLiteral" && member.leadingComments?.[0].loc) { + const key = member.key.value; + const description = member.leadingComments?.[0].value.replaceAll("*", "").trim(); + eventDescriptionMap.set(key, description); + } + }); + } + } + } + } + } + } + }); +} + +function generateDependencies(componentPath: string) { + const { name: componentName, dir: componentDir } = parse(componentPath); + const dir = componentDir.split("/").at(-1) ?? ""; + + const source = readFileSync(componentPath, { encoding: "utf8" }); + const { descriptor } = sfcParse(source, { + filename: componentName, + }); + + const code = descriptor.script?.content; + if (code) { + const result = babelParse(code, { + sourceType: "module", + plugins: ["typescript"], + }); + + traverse(result, { + ImportDeclaration: (path) => { + const value = path.node.source.value.split("/").at(-1); + if (value && value.match(/^[A-Z]/) && !value.includes("vue")) { + const prev = depTree.get(dir) ?? []; + depTree.set(dir, [...new Set([...prev, value])]); + } + }, + }); + } +} + +function getDependencies(dir: string, list = new Set()) { + const deps = depTree.get(dir); + + deps?.forEach((dep) => { + list.add(dep); + getDependencies(dep, list); + }); + return Array.from(list); +} + +function arraysAreEqual(arr1: T[], arr2: T[]): boolean { + return arr1.length === arr2.length && arr1.every((value, index) => value === arr2[index]); +} diff --git a/apps/docs/scripts/utils.ts b/apps/docs/scripts/utils.ts new file mode 100644 index 0000000..45b80a0 --- /dev/null +++ b/apps/docs/scripts/utils.ts @@ -0,0 +1,27 @@ +import type MarkdownIt from "markdown-it"; + +// Define a custom plugin to transform JSDoc @link tags +export function transformJSDocLinks(md: MarkdownIt) { + md.core.ruler.push("transform-jsdoc-links", (state) => { + state.tokens.forEach((token) => { + if (token.type === "inline" && token.children?.length) { + for (let i = 0; i < token.children.length; i++) { + const child = token.children[i]; + if (child.type === "text" && child.content.startsWith("{@link")) { + const matches = child.content.match(/\{@link\s+(.*?)\}/); + if (matches) { + const linkText = matches[1]; + const linkNode = new state.Token("link_open", "a", 1); + linkNode.attrSet("href", linkText); + linkNode.attrSet("target", "_blank"); + const textNode = new state.Token("text", "", 0); + textNode.content = "reference"; + token.children.splice(i, 1, linkNode, textNode, new state.Token("link_close", "a", -1)); + i += 2; // Skip the added link and text tokens + } + } + } + } + }); + }); +} diff --git a/apps/docs/src/assets/diagrams.drawio b/apps/docs/src/assets/diagrams.drawio new file mode 100644 index 0000000..8931a4f --- /dev/null +++ b/apps/docs/src/assets/diagrams.drawio @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/docs/src/assets/vue.svg b/apps/docs/src/assets/vue.svg new file mode 100644 index 0000000..ca8129c --- /dev/null +++ b/apps/docs/src/assets/vue.svg @@ -0,0 +1 @@ + diff --git a/apps/docs/src/components/examples/AlertExampleOne.vue b/apps/docs/src/components/examples/AlertExampleOne.vue new file mode 100644 index 0000000..b1f6ff7 --- /dev/null +++ b/apps/docs/src/components/examples/AlertExampleOne.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/docs/src/components/examples/AlertExampleTwo.vue b/apps/docs/src/components/examples/AlertExampleTwo.vue new file mode 100644 index 0000000..d8780ae --- /dev/null +++ b/apps/docs/src/components/examples/AlertExampleTwo.vue @@ -0,0 +1,67 @@ + + + diff --git a/apps/docs/src/components/examples/AlertPreview.vue b/apps/docs/src/components/examples/AlertPreview.vue new file mode 100644 index 0000000..7e19be0 --- /dev/null +++ b/apps/docs/src/components/examples/AlertPreview.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarExampleOne.vue b/apps/docs/src/components/examples/AvatarExampleOne.vue new file mode 100644 index 0000000..d98d640 --- /dev/null +++ b/apps/docs/src/components/examples/AvatarExampleOne.vue @@ -0,0 +1,16 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarExampleThree.vue b/apps/docs/src/components/examples/AvatarExampleThree.vue new file mode 100644 index 0000000..1f9abdf --- /dev/null +++ b/apps/docs/src/components/examples/AvatarExampleThree.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarExampleTwo.vue b/apps/docs/src/components/examples/AvatarExampleTwo.vue new file mode 100644 index 0000000..5d2f16c --- /dev/null +++ b/apps/docs/src/components/examples/AvatarExampleTwo.vue @@ -0,0 +1,76 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarGroupExampleOne.vue b/apps/docs/src/components/examples/AvatarGroupExampleOne.vue new file mode 100644 index 0000000..7770648 --- /dev/null +++ b/apps/docs/src/components/examples/AvatarGroupExampleOne.vue @@ -0,0 +1,82 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarGroupExampleThree.vue b/apps/docs/src/components/examples/AvatarGroupExampleThree.vue new file mode 100644 index 0000000..0c518ee --- /dev/null +++ b/apps/docs/src/components/examples/AvatarGroupExampleThree.vue @@ -0,0 +1,27 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarGroupExampleTwo.vue b/apps/docs/src/components/examples/AvatarGroupExampleTwo.vue new file mode 100644 index 0000000..b7d20d9 --- /dev/null +++ b/apps/docs/src/components/examples/AvatarGroupExampleTwo.vue @@ -0,0 +1,44 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarGroupPreview.vue b/apps/docs/src/components/examples/AvatarGroupPreview.vue new file mode 100644 index 0000000..297907f --- /dev/null +++ b/apps/docs/src/components/examples/AvatarGroupPreview.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/docs/src/components/examples/AvatarPreview.vue b/apps/docs/src/components/examples/AvatarPreview.vue new file mode 100644 index 0000000..75aad40 --- /dev/null +++ b/apps/docs/src/components/examples/AvatarPreview.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/src/components/examples/BadgeExampleOne.vue b/apps/docs/src/components/examples/BadgeExampleOne.vue new file mode 100644 index 0000000..9a195f4 --- /dev/null +++ b/apps/docs/src/components/examples/BadgeExampleOne.vue @@ -0,0 +1,234 @@ + + + diff --git a/apps/docs/src/components/examples/BadgePreview.vue b/apps/docs/src/components/examples/BadgePreview.vue new file mode 100644 index 0000000..255052c --- /dev/null +++ b/apps/docs/src/components/examples/BadgePreview.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonExampleOne.vue b/apps/docs/src/components/examples/ButtonExampleOne.vue new file mode 100644 index 0000000..cf88cd3 --- /dev/null +++ b/apps/docs/src/components/examples/ButtonExampleOne.vue @@ -0,0 +1,198 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonExampleThree.vue b/apps/docs/src/components/examples/ButtonExampleThree.vue new file mode 100644 index 0000000..8a30d3a --- /dev/null +++ b/apps/docs/src/components/examples/ButtonExampleThree.vue @@ -0,0 +1,198 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonExampleTwo.vue b/apps/docs/src/components/examples/ButtonExampleTwo.vue new file mode 100644 index 0000000..e227d7d --- /dev/null +++ b/apps/docs/src/components/examples/ButtonExampleTwo.vue @@ -0,0 +1,198 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonGroupExampleOne.vue b/apps/docs/src/components/examples/ButtonGroupExampleOne.vue new file mode 100644 index 0000000..022cfa6 --- /dev/null +++ b/apps/docs/src/components/examples/ButtonGroupExampleOne.vue @@ -0,0 +1,103 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonGroupExampleTwo.vue b/apps/docs/src/components/examples/ButtonGroupExampleTwo.vue new file mode 100644 index 0000000..6877b1e --- /dev/null +++ b/apps/docs/src/components/examples/ButtonGroupExampleTwo.vue @@ -0,0 +1,42 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonGroupPreview.vue b/apps/docs/src/components/examples/ButtonGroupPreview.vue new file mode 100644 index 0000000..7fd0f09 --- /dev/null +++ b/apps/docs/src/components/examples/ButtonGroupPreview.vue @@ -0,0 +1,38 @@ + + + diff --git a/apps/docs/src/components/examples/ButtonPreview.vue b/apps/docs/src/components/examples/ButtonPreview.vue new file mode 100644 index 0000000..f82541f --- /dev/null +++ b/apps/docs/src/components/examples/ButtonPreview.vue @@ -0,0 +1,18 @@ + + + diff --git a/apps/docs/src/components/examples/CheckboxExampleOne.vue b/apps/docs/src/components/examples/CheckboxExampleOne.vue new file mode 100644 index 0000000..33f061c --- /dev/null +++ b/apps/docs/src/components/examples/CheckboxExampleOne.vue @@ -0,0 +1,25 @@ + + + diff --git a/apps/docs/src/components/examples/CheckboxExampleTwo.vue b/apps/docs/src/components/examples/CheckboxExampleTwo.vue new file mode 100644 index 0000000..3689ace --- /dev/null +++ b/apps/docs/src/components/examples/CheckboxExampleTwo.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/docs/src/components/examples/CheckboxGroupExampleOne.vue b/apps/docs/src/components/examples/CheckboxGroupExampleOne.vue new file mode 100644 index 0000000..509a775 --- /dev/null +++ b/apps/docs/src/components/examples/CheckboxGroupExampleOne.vue @@ -0,0 +1,34 @@ + + + diff --git a/apps/docs/src/components/examples/CheckboxGroupPreview.vue b/apps/docs/src/components/examples/CheckboxGroupPreview.vue new file mode 100644 index 0000000..461c0f5 --- /dev/null +++ b/apps/docs/src/components/examples/CheckboxGroupPreview.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/src/components/examples/CheckboxPreview.vue b/apps/docs/src/components/examples/CheckboxPreview.vue new file mode 100644 index 0000000..5d9a1d6 --- /dev/null +++ b/apps/docs/src/components/examples/CheckboxPreview.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/src/components/examples/ColorsThemableColors.vue b/apps/docs/src/components/examples/ColorsThemableColors.vue new file mode 100644 index 0000000..7455526 --- /dev/null +++ b/apps/docs/src/components/examples/ColorsThemableColors.vue @@ -0,0 +1,6 @@ + diff --git a/apps/docs/src/components/examples/DropdownMenuExampleOne.vue b/apps/docs/src/components/examples/DropdownMenuExampleOne.vue new file mode 100644 index 0000000..5174401 --- /dev/null +++ b/apps/docs/src/components/examples/DropdownMenuExampleOne.vue @@ -0,0 +1,71 @@ + + + diff --git a/apps/docs/src/components/examples/DropdownMenuExampleTwo.vue b/apps/docs/src/components/examples/DropdownMenuExampleTwo.vue new file mode 100644 index 0000000..67c9ab5 --- /dev/null +++ b/apps/docs/src/components/examples/DropdownMenuExampleTwo.vue @@ -0,0 +1,92 @@ + + + diff --git a/apps/docs/src/components/examples/DropdownMenuPreview.vue b/apps/docs/src/components/examples/DropdownMenuPreview.vue new file mode 100644 index 0000000..5edf762 --- /dev/null +++ b/apps/docs/src/components/examples/DropdownMenuPreview.vue @@ -0,0 +1,60 @@ + + + diff --git a/apps/docs/src/components/examples/InputExampleOne.vue b/apps/docs/src/components/examples/InputExampleOne.vue new file mode 100644 index 0000000..4c935b2 --- /dev/null +++ b/apps/docs/src/components/examples/InputExampleOne.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/docs/src/components/examples/InputPreview.vue b/apps/docs/src/components/examples/InputPreview.vue new file mode 100644 index 0000000..8e02c25 --- /dev/null +++ b/apps/docs/src/components/examples/InputPreview.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/src/components/examples/KbdExampleOne.vue b/apps/docs/src/components/examples/KbdExampleOne.vue new file mode 100644 index 0000000..4c935b2 --- /dev/null +++ b/apps/docs/src/components/examples/KbdExampleOne.vue @@ -0,0 +1,23 @@ + + + diff --git a/apps/docs/src/components/examples/KbdPreview.vue b/apps/docs/src/components/examples/KbdPreview.vue new file mode 100644 index 0000000..abb36ea --- /dev/null +++ b/apps/docs/src/components/examples/KbdPreview.vue @@ -0,0 +1,7 @@ + + + diff --git a/apps/docs/src/components/examples/LabelExampleOne.vue b/apps/docs/src/components/examples/LabelExampleOne.vue new file mode 100644 index 0000000..94b8c5b --- /dev/null +++ b/apps/docs/src/components/examples/LabelExampleOne.vue @@ -0,0 +1,15 @@ + + + diff --git a/apps/docs/src/components/examples/LabelPreview.vue b/apps/docs/src/components/examples/LabelPreview.vue new file mode 100644 index 0000000..089d8ad --- /dev/null +++ b/apps/docs/src/components/examples/LabelPreview.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/docs/src/components/examples/LoadingExampleOne.vue b/apps/docs/src/components/examples/LoadingExampleOne.vue new file mode 100644 index 0000000..310ea07 --- /dev/null +++ b/apps/docs/src/components/examples/LoadingExampleOne.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/docs/src/components/examples/LoadingExampleTwo.vue b/apps/docs/src/components/examples/LoadingExampleTwo.vue new file mode 100644 index 0000000..ba7cf19 --- /dev/null +++ b/apps/docs/src/components/examples/LoadingExampleTwo.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/src/components/examples/LoadingPreview.vue b/apps/docs/src/components/examples/LoadingPreview.vue new file mode 100644 index 0000000..7c52fc7 --- /dev/null +++ b/apps/docs/src/components/examples/LoadingPreview.vue @@ -0,0 +1,7 @@ + + + diff --git a/apps/docs/src/components/examples/PopoverExampleOne.vue b/apps/docs/src/components/examples/PopoverExampleOne.vue new file mode 100644 index 0000000..0ed6ee7 --- /dev/null +++ b/apps/docs/src/components/examples/PopoverExampleOne.vue @@ -0,0 +1,40 @@ + + + diff --git a/apps/docs/src/components/examples/PopoverExampleTwo.vue b/apps/docs/src/components/examples/PopoverExampleTwo.vue new file mode 100644 index 0000000..ba7cf19 --- /dev/null +++ b/apps/docs/src/components/examples/PopoverExampleTwo.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/src/components/examples/PopoverPreview.vue b/apps/docs/src/components/examples/PopoverPreview.vue new file mode 100644 index 0000000..fe80e89 --- /dev/null +++ b/apps/docs/src/components/examples/PopoverPreview.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/docs/src/components/examples/ProgressBarExampleOne.vue b/apps/docs/src/components/examples/ProgressBarExampleOne.vue new file mode 100644 index 0000000..598f4c7 --- /dev/null +++ b/apps/docs/src/components/examples/ProgressBarExampleOne.vue @@ -0,0 +1,34 @@ + + + diff --git a/apps/docs/src/components/examples/ProgressBarExampleTwo.vue b/apps/docs/src/components/examples/ProgressBarExampleTwo.vue new file mode 100644 index 0000000..f7d6728 --- /dev/null +++ b/apps/docs/src/components/examples/ProgressBarExampleTwo.vue @@ -0,0 +1,128 @@ + + + diff --git a/apps/docs/src/components/examples/ProgressBarPreview.vue b/apps/docs/src/components/examples/ProgressBarPreview.vue new file mode 100644 index 0000000..1222c5c --- /dev/null +++ b/apps/docs/src/components/examples/ProgressBarPreview.vue @@ -0,0 +1,32 @@ + + + diff --git a/apps/docs/src/components/examples/ProgressCircleExampleOne.vue b/apps/docs/src/components/examples/ProgressCircleExampleOne.vue new file mode 100644 index 0000000..ceb09e0 --- /dev/null +++ b/apps/docs/src/components/examples/ProgressCircleExampleOne.vue @@ -0,0 +1,71 @@ + + + diff --git a/apps/docs/src/components/examples/ProgressCirclePreview.vue b/apps/docs/src/components/examples/ProgressCirclePreview.vue new file mode 100644 index 0000000..7564214 --- /dev/null +++ b/apps/docs/src/components/examples/ProgressCirclePreview.vue @@ -0,0 +1,18 @@ + + + diff --git a/apps/docs/src/components/examples/RadioGroupExampleOne.vue b/apps/docs/src/components/examples/RadioGroupExampleOne.vue new file mode 100644 index 0000000..97f77ab --- /dev/null +++ b/apps/docs/src/components/examples/RadioGroupExampleOne.vue @@ -0,0 +1,41 @@ + + + diff --git a/apps/docs/src/components/examples/RadioGroupExampleTwo.vue b/apps/docs/src/components/examples/RadioGroupExampleTwo.vue new file mode 100644 index 0000000..3689ace --- /dev/null +++ b/apps/docs/src/components/examples/RadioGroupExampleTwo.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/docs/src/components/examples/RadioGroupPreview.vue b/apps/docs/src/components/examples/RadioGroupPreview.vue new file mode 100644 index 0000000..8e7b69a --- /dev/null +++ b/apps/docs/src/components/examples/RadioGroupPreview.vue @@ -0,0 +1,21 @@ + + + diff --git a/apps/docs/src/components/examples/SliderExampleFive.vue b/apps/docs/src/components/examples/SliderExampleFive.vue new file mode 100644 index 0000000..eb1b0c1 --- /dev/null +++ b/apps/docs/src/components/examples/SliderExampleFive.vue @@ -0,0 +1,74 @@ + + + diff --git a/apps/docs/src/components/examples/SliderExampleFour.vue b/apps/docs/src/components/examples/SliderExampleFour.vue new file mode 100644 index 0000000..875eb0c --- /dev/null +++ b/apps/docs/src/components/examples/SliderExampleFour.vue @@ -0,0 +1,48 @@ + + + diff --git a/apps/docs/src/components/examples/SliderExampleOne.vue b/apps/docs/src/components/examples/SliderExampleOne.vue new file mode 100644 index 0000000..4ba81d1 --- /dev/null +++ b/apps/docs/src/components/examples/SliderExampleOne.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/docs/src/components/examples/SliderExampleThree.vue b/apps/docs/src/components/examples/SliderExampleThree.vue new file mode 100644 index 0000000..d244d8d --- /dev/null +++ b/apps/docs/src/components/examples/SliderExampleThree.vue @@ -0,0 +1,35 @@ + + + diff --git a/apps/docs/src/components/examples/SliderExampleTwo.vue b/apps/docs/src/components/examples/SliderExampleTwo.vue new file mode 100644 index 0000000..545e851 --- /dev/null +++ b/apps/docs/src/components/examples/SliderExampleTwo.vue @@ -0,0 +1,18 @@ + + + diff --git a/apps/docs/src/components/examples/SliderPreview.vue b/apps/docs/src/components/examples/SliderPreview.vue new file mode 100644 index 0000000..21b03d1 --- /dev/null +++ b/apps/docs/src/components/examples/SliderPreview.vue @@ -0,0 +1,28 @@ + + + diff --git a/apps/docs/src/components/examples/SwitchExampleOne.vue b/apps/docs/src/components/examples/SwitchExampleOne.vue new file mode 100644 index 0000000..8924481 --- /dev/null +++ b/apps/docs/src/components/examples/SwitchExampleOne.vue @@ -0,0 +1,36 @@ + + + diff --git a/apps/docs/src/components/examples/SwitchGroupExampleOne.vue b/apps/docs/src/components/examples/SwitchGroupExampleOne.vue new file mode 100644 index 0000000..ce1648e --- /dev/null +++ b/apps/docs/src/components/examples/SwitchGroupExampleOne.vue @@ -0,0 +1,45 @@ + + + diff --git a/apps/docs/src/components/examples/SwitchGroupPreview.vue b/apps/docs/src/components/examples/SwitchGroupPreview.vue new file mode 100644 index 0000000..9de0dc6 --- /dev/null +++ b/apps/docs/src/components/examples/SwitchGroupPreview.vue @@ -0,0 +1,20 @@ + + + diff --git a/apps/docs/src/components/examples/SwitchPreview.vue b/apps/docs/src/components/examples/SwitchPreview.vue new file mode 100644 index 0000000..bce3fc7 --- /dev/null +++ b/apps/docs/src/components/examples/SwitchPreview.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/src/components/examples/TabsExampleOne.vue b/apps/docs/src/components/examples/TabsExampleOne.vue new file mode 100644 index 0000000..d089da6 --- /dev/null +++ b/apps/docs/src/components/examples/TabsExampleOne.vue @@ -0,0 +1,207 @@ + + + diff --git a/apps/docs/src/components/examples/TabsPreview.vue b/apps/docs/src/components/examples/TabsPreview.vue new file mode 100644 index 0000000..cae5e28 --- /dev/null +++ b/apps/docs/src/components/examples/TabsPreview.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/docs/src/components/examples/TagDotIcon.vue b/apps/docs/src/components/examples/TagDotIcon.vue new file mode 100644 index 0000000..5fdab4d --- /dev/null +++ b/apps/docs/src/components/examples/TagDotIcon.vue @@ -0,0 +1,5 @@ + diff --git a/apps/docs/src/components/examples/TagExampleOne.vue b/apps/docs/src/components/examples/TagExampleOne.vue new file mode 100644 index 0000000..21c5ec4 --- /dev/null +++ b/apps/docs/src/components/examples/TagExampleOne.vue @@ -0,0 +1,209 @@ + + + diff --git a/apps/docs/src/components/examples/TagPreview.vue b/apps/docs/src/components/examples/TagPreview.vue new file mode 100644 index 0000000..013a829 --- /dev/null +++ b/apps/docs/src/components/examples/TagPreview.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/docs/src/components/examples/TagUKFlagIcon.vue b/apps/docs/src/components/examples/TagUKFlagIcon.vue new file mode 100644 index 0000000..69709d2 --- /dev/null +++ b/apps/docs/src/components/examples/TagUKFlagIcon.vue @@ -0,0 +1,60 @@ + diff --git a/apps/docs/src/components/examples/TagUSFlagIcon.vue b/apps/docs/src/components/examples/TagUSFlagIcon.vue new file mode 100644 index 0000000..ee60be8 --- /dev/null +++ b/apps/docs/src/components/examples/TagUSFlagIcon.vue @@ -0,0 +1,28 @@ + diff --git a/apps/docs/src/components/examples/TextareaExampleOne.vue b/apps/docs/src/components/examples/TextareaExampleOne.vue new file mode 100644 index 0000000..aa993e5 --- /dev/null +++ b/apps/docs/src/components/examples/TextareaExampleOne.vue @@ -0,0 +1,18 @@ + + +