diff --git a/.github/DISCUSSION_TEMPLATE/example-request.yml b/.github/DISCUSSION_TEMPLATE/example-request.yml new file mode 100644 index 000000000..5f126e5f1 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/example-request.yml @@ -0,0 +1,25 @@ +title: '[Example]: ' +labels: [Example Request] +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create an example request! Please search open/closed requests before submitting, as the block or a similar one may have already been requested. + + - type: textarea + id: example-description + attributes: + label: Description + description: Tell us about your example request + placeholder: A modal with tooltip + validations: + required: true + + - type: input + id: example-url + attributes: + label: Example + description: Link to an example + placeholder: ex. https://example.com + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index e0e756548..dd9a6d942 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,5 +1,5 @@ name: 🐞 Bug report -description: Create a report to help us improve radix-vue. +description: Create a report to help us improve reka-ui. title: '[Bug]: ' labels: [bug] body: @@ -11,9 +11,9 @@ body: This form is only for submitting bug reports. If you have a usage question or are unsure if this is really a bug, make sure to: - - Read the [docs](https://radix-vue.com/) - - Ask on [Discord Chat](https://chat.radix-vue.com/) - - Ask on [GitHub Discussions](https://github.com/unovue/radix-vue/discussions) + - Read the [docs](https://reka-ui.com/) + - Ask on [Discord Chat](https://chat.unovue.com/) + - Ask on [GitHub Discussions](https://github.com/unovue/reka-ui/discussions) Also try to search for your issue - it may have already been answered or even fixed. However, if you find that an old, closed issue still persists in the latest version, diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7c255a30e..e06f279ee 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: true contact_links: - name: 📚 Documentation - url: https://www.radix-vue.com/ + url: https://reka-ui.com/ about: Check the documentation for usage of Radix Vue. - name: 🗨️ Discord - url: https://chat.radix-vue.com/ + url: https://chat.unovue.com/ about: Join the Radix Vue Discord server. diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 000000000..48733ec7f --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,34 @@ +name: Setup +description: Installs Node and caches pnpm. + +runs: + using: composite + + steps: + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 9 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + shell: bash + run: pnpm i --frozen-lockfile diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d59d9c36a..2d5c672a7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,35 +19,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm i --frozen-lockfile + - name: Setup (Install node & pnpm) + uses: ./.github/actions/setup - name: Build - run: pnpm --filter radix-vue build + run: pnpm --filter reka-ui build - name: Check for errors run: | @@ -66,32 +42,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm i --frozen-lockfile + - name: Setup (Install node & pnpm) + uses: ./.github/actions/setup - name: Test run: pnpm test diff --git a/.github/workflows/pkg.pr.new.yaml b/.github/workflows/pkg.pr.new.yaml index d1a8a3ad6..27354cf5e 100644 --- a/.github/workflows/pkg.pr.new.yaml +++ b/.github/workflows/pkg.pr.new.yaml @@ -1,49 +1,20 @@ -name: Publish Merged PR -on: - pull_request: - types: [closed] - paths: - - 'packages/**' +name: Publish Any Commit (v2) +on: [push, pull_request] jobs: - after_merge: - if: github.event.pull_request.merged == true + build: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 18 + - name: Setup (Install node & pnpm) + uses: ./.github/actions/setup - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm i --frozen-lockfile - - - name: Build Radix Vue and plugins + - name: Build Reka UI and plugins run: pnpm run build - - run: pnpm dlx pkg-pr-new publish --compact ./packages/radix-vue + - run: pnpm dlx pkg-pr-new publish --compact ./packages/core env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f0d9d7bab..af82c3558 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,9 +4,6 @@ on: push: paths: - 'docs/**' - pull_request: - paths: - - 'docs/**' jobs: publish: @@ -16,39 +13,14 @@ jobs: deployments: write name: Publish to Cloudflare Pages steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 - # Run a build step here - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - version: 9 - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm i --frozen-lockfile + - name: Setup (Install node & pnpm) + uses: ./.github/actions/setup - - name: Build Radix Vue - run: pnpm --filter radix-vue build + - name: Build Reka UI + run: pnpm --filter reka-ui build - name: Build Docs run: pnpm docs:build @@ -57,15 +29,16 @@ jobs: - name: Publish to Cloudflare Pages uses: cloudflare/pages-action@v1.5.0 with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - projectName: radix-vue + apiToken: ${{ secrets.CLOUDFLARE_UNOVUE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_UNOVUE_ACCOUNT_ID }} + projectName: reka-ui directory: .vitepress/dist # Optional: Enable this if you want to have GitHub Deployments triggered gitHubToken: ${{ secrets.GITHUB_TOKEN }} # Optional: Switch what branch you are publishing to. # By default this will be the branch which triggered this workflow - # branch: main + # TODO: remove the following branch target after merging to main + branch: main # Optional: Change the working directory workingDirectory: docs wranglerVersion: '3' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dded36e48..6784153ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,6 +14,9 @@ jobs: release: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -25,3 +28,18 @@ jobs: - run: npx changelogithub env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + npm: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup (Install node & pnpm) + uses: ./.github/actions/setup + + - name: Build Packages & Publish to npm + run: pnpm build && pnpm pub:release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.histoire/package.json b/.histoire/package.json index 9f015c8a9..c148bbd29 100644 --- a/.histoire/package.json +++ b/.histoire/package.json @@ -1,7 +1,7 @@ { "name": "histoire", "type": "module", - "version": "0.0.0", + "version": "0.0.2", "private": true, "scripts": { "story:dev": "histoire dev", @@ -10,25 +10,24 @@ }, "peerDependencies": { "@vitejs/plugin-vue": "^4.6.2", - "@vueuse/components": "^10.11.0", - "@vueuse/core": "^10.11.0", - "@vueuse/shared": "^10.11.0", + "@vueuse/core": "^12.0.0", + "@vueuse/shared": "^12.0.0", "vite": "^4.5.3", - "vue": "^3.4.31" + "vue": "^3.5.13" }, "devDependencies": { "@antfu/eslint-config": "^2.27.3", - "@floating-ui/dom": "^1.6.7", - "@floating-ui/vue": "^1.1.0", + "@floating-ui/dom": "^1.6.13", + "@floating-ui/vue": "^1.1.6", "@histoire/plugin-vue": "^0.17.17", - "@iconify/vue": "^4.1.2", + "@iconify/vue": "^4.3.0", "@radix-ui/colors": "^3.0.0", - "@rollup/plugin-alias": "^5.1.0", - "autoprefixer": "^10.4.19", - "eslint": "^9.10.0", + "@rollup/plugin-alias": "^5.1.1", + "autoprefixer": "^10.4.20", + "eslint": "^9.19.0", "histoire": "^0.17.17", - "postcss": "^8.4.39", - "tailwindcss": "^3.4.4", + "postcss": "^8.5.1", + "tailwindcss": "^3.4.17", "tailwindcss-animate": "1.0.7" } } diff --git a/.histoire/tailwind.config.js b/.histoire/tailwind.config.js index b2338bb7a..e59c0261a 100644 --- a/.histoire/tailwind.config.js +++ b/.histoire/tailwind.config.js @@ -5,7 +5,7 @@ import animate from 'tailwindcss-animate' /** @type {import('tailwindcss').Config} */ export default { darkMode: 'class', - content: ['../packages/radix-vue/src/**/*.vue'], + content: ['../packages/core/src/**/*.vue'], theme: { extend: { colors: { @@ -59,10 +59,10 @@ export default { }, slideDown: { from: { height: 0 }, - to: { height: 'var(--radix-collapsible-content-height)' }, + to: { height: 'var(--reka-collapsible-content-height)' }, }, slideUp: { - from: { height: 'var(--radix-collapsible-content-height)' }, + from: { height: 'var(--reka-collapsible-content-height)' }, to: { height: 0 }, }, enterFromRight: { @@ -103,14 +103,14 @@ export default { height: 0, }, to: { - width: 'var(--radix-accordion-content-width)', - height: 'var(--radix-accordion-content-height)', + width: 'var(--reka-accordion-content-width)', + height: 'var(--reka-accordion-content-height)', }, }, close2D: { from: { - width: 'var(--radix-accordion-content-width)', - height: 'var(--radix-accordion-content-height)', + width: 'var(--reka-accordion-content-width)', + height: 'var(--reka-accordion-content-height)', }, to: { width: 0, @@ -126,7 +126,7 @@ export default { to: { transform: 'translateX(0)' }, }, swipeOut: { - from: { transform: 'translateX(var(--radix-toast-swipe-end-x))' }, + from: { transform: 'translateX(var(--reka-toast-swipe-end-x))' }, to: { transform: 'translateX(calc(100% + var(--viewport-padding)))' }, }, }, @@ -156,6 +156,9 @@ export default { slideIn: 'slideIn 150ms cubic-bezier(0.16, 1, 0.3, 1)', swipeOut: 'swipeOut 100ms ease-out', }, + transitionDuration: { + 250: '250ms', + }, }, }, plugins: [ diff --git a/.histoire/tsconfig.json b/.histoire/tsconfig.json index 3d33a1a53..7430f9133 100644 --- a/.histoire/tsconfig.json +++ b/.histoire/tsconfig.json @@ -5,5 +5,5 @@ "@iconify/vue": ["node_modules/@iconify/vue/dist/iconify.mjs"] } }, - "includes": ["../packages/radix-vue/src/**/*.vue", "../packages/radix-vue/src/**/*.ts"] + "includes": ["../packages/core/src/**/*.vue", "../packages/core/src/**/*.ts"] } diff --git a/.histoire/vite.config.ts b/.histoire/vite.config.ts index 0349e7990..ffedb2d19 100644 --- a/.histoire/vite.config.ts +++ b/.histoire/vite.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ entries: [ { find: '@', - replacement: resolve(projectRootDir, '../packages/radix-vue/src'), + replacement: resolve(projectRootDir, '../packages/core/src'), }, ], }), @@ -28,7 +28,7 @@ export default defineConfig({ viteNodeInlineDeps: [/@tanstack/], plugins: [{ name: 'builtin:tailwind-tokens' }, HstVue()], setupFile: './setup.ts', - storyMatch: [resolve(projectRootDir, '../packages/radix-vue/src/**/*.story.vue')], + storyMatch: [resolve(projectRootDir, '../packages/core/src/**/*.story.vue')], outDir: './dist', tree: { groups: [ @@ -37,7 +37,7 @@ export default defineConfig({ ], }, theme: { - title: 'Radix Vue', + title: 'Reka UI', logo: { square: '../docs/content/public/logo.svg', light: '../docs/content/public/logo.svg', diff --git a/.vscode/settings.json b/.vscode/settings.json index 7033caec7..3d1cd294c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -39,9 +39,5 @@ "json", "jsonc", "yaml" - ], - - "tailwindCSS.experimental.configFile": { - "./.histoire/tailwind.config.js": "./packages/radix-vue/**/*.story.vue" - } + ] } diff --git a/LICENSE b/LICENSE index 9100080f6..d5fc959af 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 radix-vue +Copyright (c) 2023 UnoVue Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md deleted file mode 100644 index 6e7d6d0b0..000000000 --- a/README.md +++ /dev/null @@ -1,91 +0,0 @@ -
-

- - Logo - - -

-Radix Vue -

-

-An unofficial Vue port of Radix UI.
-Radix is an unstyled, customisable UI Library with built in accessibility for building top quality design systems. - -

- -

- - -NPM version -NPM Downloads -GitHub stars -Gurubase -

- -

-Get involved! -

-

- Documentation | Getting Started | Examples | Why Radix Vue? -

- -![hero image](https://www.radix-vue.com/og.jpg) - design by: [icarusgkx](https://twitter.com/icarusgkx), [melkam](https://github.com/MellKam) - -## Installation - -```bash -pnpm add radix-vue -``` -```bash -npm install radix-vue -``` -```bash -yarn add radix-vue -``` - -## Documentation - -For full documentation, visit [radix-vue.com](https://radix-vue.com). - -## Releases - -For changelog, visit [releases](https://github.com/unovue/radix-vue/releases). - -## Contributing - -We would love to have your contributions! All PRs all welcomed! We need help building the core components, docs, tests, stories! Join our discord and we will get you up and running! - -## Dev Setup - -### Docs - -1. Clone the repo -2. Run `pnpm i` -3. Run `pnpm build` to run build `radix-vue` locally -3. Run `pnpm docs:dev` to run vitepress -4. Open `http://localhost:5173` - -### Package - -1. Clone the repo -2. Run `pnpm i` -3. Run `pnpm story:dev` to run histoire (storybook) -4. Open `http://localhost:6006` - -## Authors - -- [Khairul Haaziq](https://github.com/k11q) -- [Mujahid Anuar](https://github.com/mujahidfa) -- [Zernonia](https://github.com/zernonia) - -## Credits - -All credits go to these open-source works and resources - -- [Radix UI](https://radix-ui.com) for doing all the hard work to make sure components are accessible -- [Floating UI](https://floating-ui.com) for creating powerful components that as the base of many Radix Vue components -- [VueUse](https://vueuse.org) for providing many useful utilities. -- [Ark UI](https://ark-ui.com) for the `` component -- [Radix Svelte](https://radix-svelte.com) -- [Headless UI](https://headlessui.com) diff --git a/README.md b/README.md new file mode 120000 index 000000000..96a9dd409 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +./packages/core/README.md \ No newline at end of file diff --git a/docs/.vitepress/components/Announcement.vue b/docs/.vitepress/components/Announcement.vue deleted file mode 100644 index 4e059fb30..000000000 --- a/docs/.vitepress/components/Announcement.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/docs/.vitepress/components/CardLink.vue b/docs/.vitepress/components/CardLink.vue index dd76c16da..5aef117e0 100644 --- a/docs/.vitepress/components/CardLink.vue +++ b/docs/.vitepress/components/CardLink.vue @@ -1,5 +1,5 @@