Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
larrasu authored Nov 4, 2023
2 parents 88d1030 + d7cbd05 commit f44a12a
Show file tree
Hide file tree
Showing 145 changed files with 5,091 additions and 1,526 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@ jobs:
ci:
runs-on: ${{ matrix.os }}

permissions:
contents: read
pull-requests: read

strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [18]

env:
NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }}

steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -46,6 +53,15 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'src/**'
- 'package.json'
- 'pnpm-lock.yaml'
- name: Install dependencies
run: pnpm install

Expand All @@ -61,8 +77,11 @@ jobs:
- name: Build
run: pnpm run build

- name: Test
run: pnpm run test run

- name: Release Edge
if: github.event_name == 'push'
if: github.event_name == 'push' && steps.changes.outputs.src == 'true'
run: ./scripts/release-edge.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ jobs:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [18]

env:
NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }}

steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -58,6 +61,9 @@ jobs:
- name: Build
run: pnpm run build

- name: Test
run: pnpm run test run

- name: Version Check
id: check
uses: EndBug/version-check@v2
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.enable": false
}
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## [2.10.0](https://github.com/nuxt/ui/compare/v2.9.0...v2.10.0) (2023-10-31)


### Features

* **CommandPalette:** handle `filter` attribute in groups ([#871](https://github.com/nuxt/ui/issues/871)) ([8ba2a79](https://github.com/nuxt/ui/commit/8ba2a791e4877682705bd752d4ab6f9c52d0b37b))
* **Divider:** new component ([#757](https://github.com/nuxt/ui/issues/757)) ([eb9ce6a](https://github.com/nuxt/ui/commit/eb9ce6a0ddb7d73e3d3accee000ac71c20b96d1b))
* **Form:** handle `[@error](https://github.com/error)` event ([#718](https://github.com/nuxt/ui/issues/718)) ([e16379f](https://github.com/nuxt/ui/commit/e16379fdbdff6c98e96dc03cc67f3912f2f61075))
* **Input/Textarea:** allow specifying autofocus delay for page transitions ([#816](https://github.com/nuxt/ui/issues/816)) ([8bfd359](https://github.com/nuxt/ui/commit/8bfd3591a624ad7b77bcd9d3c38961a1ba59f23c))
* **Meter:** new component ([#827](https://github.com/nuxt/ui/issues/827)) ([abbcc37](https://github.com/nuxt/ui/commit/abbcc37fbb4b52b1503a69f8312cbecfe222f675))
* **Pagination:** add first and last page buttons ([#842](https://github.com/nuxt/ui/issues/842)) ([c5ce997](https://github.com/nuxt/ui/commit/c5ce997ba9d7abdb8282fcd34b88c380a7a4c592))
* **Popover:** manual mode & horizontal offset ([#781](https://github.com/nuxt/ui/issues/781)) ([92b8618](https://github.com/nuxt/ui/commit/92b86186e7b8a987eec1da9cf45a0ec378d421cf))
* **popper:** `arrow` option & docs consistency across components ([#875](https://github.com/nuxt/ui/issues/875)) ([f785ecd](https://github.com/nuxt/ui/commit/f785ecd46fdff77ecb8579d8a7edc463bcce2407))
* **Progress:** new component ([#697](https://github.com/nuxt/ui/issues/697)) ([2c5559b](https://github.com/nuxt/ui/commit/2c5559b73ea22f1021c18c2561de1e6cd6f9741f))
* **RadioGroup:** configurable label size ([#881](https://github.com/nuxt/ui/issues/881)) ([5a2644b](https://github.com/nuxt/ui/commit/5a2644b329dd1bb85a8ca70f849e108dbb93c776))
* **RadioGroup:** new component ([#730](https://github.com/nuxt/ui/issues/730)) ([23d5dc7](https://github.com/nuxt/ui/commit/23d5dc7b981d56127dd2bd3f03d752a76f36653c))
* **Range:** add `2xs`, `xs`, `xl` and `2xl` sizes to match progress component ([3cb3914](https://github.com/nuxt/ui/commit/3cb3914386e465180337ff8bf3f78e07a14bbafb)), closes [#673](https://github.com/nuxt/ui/issues/673)
* **Table:** add `v-model:sort` prop ([#803](https://github.com/nuxt/ui/issues/803)) ([9f4d88e](https://github.com/nuxt/ui/commit/9f4d88e0aa7ec8cbbdae3fccd372d8c5e81d7ad0))
* **Tooltip:** adding option to show popper arrow ([#868](https://github.com/nuxt/ui/issues/868)) ([4ce2374](https://github.com/nuxt/ui/commit/4ce23746da27ad0ef9b1833e41105165045f1cb8))


### Bug Fixes

* **Accordion:** toggle correct element when keyboard press ([#805](https://github.com/nuxt/ui/issues/805)) ([96296c3](https://github.com/nuxt/ui/commit/96296c3d388a4f65f08e4a062f720d37f2c84ebc))
* **Divider:** display a single border when no content ([3c5c338](https://github.com/nuxt/ui/commit/3c5c3389f8cdfcf9b70f1bb7d5553d0be55278a4))
* **Dropdown:** use `NuxtLink` instead of `ULink` ([#882](https://github.com/nuxt/ui/issues/882)) ([c37ad8b](https://github.com/nuxt/ui/commit/c37ad8b79a61ffccbb8959ca07fdf54923313e00))
* **FormGroup:** ensure size exists in config ([#695](https://github.com/nuxt/ui/issues/695)) ([f5f3388](https://github.com/nuxt/ui/commit/f5f33882f9ad48944e54f31cb784bedf26dccbd1))
* **Modal:** remove padding on mobile with `fullscreen` enabled ([550ac10](https://github.com/nuxt/ui/commit/550ac10e49d15e0b5435e031ec61f7defdaee445)), closes [#811](https://github.com/nuxt/ui/issues/811)
* **Notification:** add roles for accessibility ([#724](https://github.com/nuxt/ui/issues/724)) ([40f3b16](https://github.com/nuxt/ui/commit/40f3b161003f71ecacf57b9641de66acd14e3fab))
* **Table:** enable sorting for nested column keys ([#835](https://github.com/nuxt/ui/issues/835)) ([b4f7b03](https://github.com/nuxt/ui/commit/b4f7b035f7e802427e57fc7359020648a23eb71e))
* **Table:** prevent `[@select](https://github.com/select)` event call when selecting all rows ([#838](https://github.com/nuxt/ui/issues/838)) ([51f4d54](https://github.com/nuxt/ui/commit/51f4d549998c0d570adc843e1f3835cbd163ae69))
* **Tabs:** truncate buttons content ([ddbb431](https://github.com/nuxt/ui/commit/ddbb4319539e9e306ed9fc6f4f2145f20f13683a)), closes [#796](https://github.com/nuxt/ui/issues/796)
* **types:** handle sub-objects in `app.config.ts` (button colors) ([7be2af7](https://github.com/nuxt/ui/commit/7be2af7127acba2e1228b7994ecd8eb40e5c376b)), closes [#858](https://github.com/nuxt/ui/issues/858)
* use explicit type imports ([#830](https://github.com/nuxt/ui/issues/830)) ([a8279d1](https://github.com/nuxt/ui/commit/a8279d1c97c2f2c6a5d9fd971abb27767b5beb4c))

## [2.9.0](https://github.com/nuxt/ui/compare/v2.8.1...v2.9.0) (2023-10-02)


Expand Down
8 changes: 5 additions & 3 deletions docs/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# To link Nuxt UI Pro in development
# Specify the path of @nuxt/ui-pro locally
NUXT_UI_PRO_PATH=
# To use Nuxt UI Pro in production
NUXT_UI_PRO_TOKEN=
# Production token for @nuxt/ui-pro, purchase on https://ui.nuxt.com/pro/purchase
NUXT_UI_PRO_LICENSE=
# Used when pre-rendering the docs for dynamic OG images
NUXT_PUBLIC_SITE_URL=
# Used to fetch `nuxt/ui-pro` docs content
NUXT_GITHUB_TOKEN=
67 changes: 61 additions & 6 deletions docs/app.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!-- eslint-disable vue/no-v-html -->
<template>
<div>
<Header />
<Header v-if="!$route.path.startsWith('/examples')" :links="links" />

<NuxtLayout>
<NuxtPage />
</NuxtLayout>

<Footer />
<Footer v-if="!$route.path.startsWith('/examples')" />

<ClientOnly>
<LazyUDocsSearch ref="searchRef" :files="files" :navigation="navigation" :groups="groups" />
<LazyUDocsSearch ref="searchRef" :files="files" :navigation="navigation" :groups="groups" :links="links" />
</ClientOnly>

<UNotifications>
Expand Down Expand Up @@ -42,10 +42,17 @@ const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', { defa
// Computed

const navigation = computed(() => {
const main = nav.value.filter(item => item._path !== '/dev')
const dev = nav.value.find(item => item._path === '/dev')?.children
if (branch.value?.name === 'dev') {
const dev = nav.value.find(item => item._path === '/dev')?.children
const pro = nav.value.find(item => item._path === '/pro')

return [
...(pro ? [pro] : []),
...dev
]
}

return branch.value?.name === 'dev' ? dev : main
return nav.value.filter(item => item._path !== '/dev')
})

const groups = computed(() => {
Expand All @@ -58,6 +65,54 @@ const groups = computed(() => {

const color = computed(() => colorMode.value === 'dark' ? '#18181b' : 'white')

const links = computed(() => {
return [{
label: 'Documentation',
icon: 'i-heroicons-book-open',
to: `${branch.value?.name === 'dev' ? '/dev' : ''}/getting-started`
}, {
label: 'Playground',
icon: 'i-simple-icons-stackblitz',
to: '/playground'
}, {
label: 'Roadmap',
icon: 'i-heroicons-academic-cap',
to: '/roadmap'
}, !!navigation.value.find(item => item._path === '/pro') && {
label: 'Pro',
icon: 'i-heroicons-square-3-stack-3d',
to: '/pro',
children: [{
label: 'Features',
to: '/pro#features',
exactHash: true,
icon: 'i-heroicons-beaker',
description: 'Discover all the features of Nuxt UI Pro.'
}, {
label: 'Pricing',
to: '/pro#pricing',
exactHash: true,
icon: 'i-heroicons-credit-card',
description: 'A simple pricing, for solo developers or teams.'
}, {
label: 'Guide',
to: '/pro/guide',
icon: 'i-heroicons-book-open',
description: 'Learn how to use Nuxt UI Pro in your app.'
}, {
label: 'Components',
to: '/pro/components',
icon: 'i-heroicons-cube-transparent',
description: 'Discover all the components available in Nuxt UI Pro.'
}]
}, {
label: 'Releases',
icon: 'i-heroicons-rocket-launch',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}].filter(Boolean)
})

// Watch

watch(() => searchRef.value?.commandPaletteRef?.query, debounce((query: string) => {
Expand Down
20 changes: 7 additions & 13 deletions docs/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<template>
<div v-if="$route.path !== '/playground'" class="w-full h-px bg-gray-200 dark:bg-gray-800 flex items-center justify-center">
<div class="bg-white dark:bg-gray-900 px-4">
<div class="w-full h-px bg-gray-200 dark:bg-gray-800 flex items-center justify-center">
<div v-if="!['/playground', '/roadmap'].includes($route.path)" class="bg-white dark:bg-gray-900 px-4">
<LogoOnly class="w-5 h-5" />
</div>
</div>

<UFooter :links="[]" :ui="{ bottom: { container: 'lg:py-4' } }">
<UFooter>
<template #left>
<div class="text-sm text-gray-500 dark:text-gray-400">
Made by
<NuxtLink to="https://nuxtlabs.com" aria-label="NuxtLabs" class="inline-block">
<LogoLabs class="text-gray-900 dark:text-white h-4 w-auto" />
</NuxtLink>
</div>
</template>

<template #center>
<span class="text-sm text-gray-500 dark:text-gray-400">
<a v-if="$route.path.startsWith('/pro')" class="text-sm text-gray-500 dark:text-gray-400 hover:underline" href="https://ui.nuxt.com/pro/purchase" target="_blank">
Purchase Nuxt UI Pro
</a>
<span v-else class="text-sm text-gray-500 dark:text-gray-400">
Published under <NuxtLink to="https://github.com/nuxt/ui" target="_blank" class="text-gray-900 dark:text-white">
MIT License
</NuxtLink>
Expand Down
41 changes: 19 additions & 22 deletions docs/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,35 @@
</template>

<template #panel>
<BranchSelect />
<UAsideLinks :links="links" />

<UNavigationTree :links="mapContentNavigation(navigation)" />
<UDivider type="dashed" class="mt-4 mb-3" />

<BranchSelect v-if="!route.path.startsWith('/pro')" />

<UNavigationTree :links="mapContentNavigation(navigation)" :multiple="false" default-open />
</template>
</UHeader>
</template>

<script setup lang="ts">
import type { NavItem } from '@nuxt/content/dist/runtime/types'
import type { Link } from '#ui-pro/types'
defineProps<{
links: Link[]
}>()
const route = useRoute()
const { metaSymbol } = useShortcuts()
const navigation = inject<Ref<NavItem[]>>('navigation')
const nav = inject<Ref<NavItem[]>>('navigation')
const navigation = computed(() => {
if (route.path.startsWith('/pro')) {
return nav.value.find(item => item._path === '/pro')?.children
}
const links = computed(() => {
return [{
label: 'Documentation',
icon: 'i-heroicons-book-open-solid',
to: '/getting-started'
}, {
label: 'Examples',
icon: 'i-heroicons-square-3-stack-3d',
to: '/getting-started/examples'
}, {
label: 'Playground',
icon: 'i-simple-icons-stackblitz',
to: '/playground'
}, {
label: 'Releases',
icon: 'i-heroicons-rocket-launch-solid',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}]
return nav.value.filter(item => !item._path.startsWith('/pro'))
})
</script>
Loading

0 comments on commit f44a12a

Please sign in to comment.