Skip to content

Commit

Permalink
chore(deps): update tailwindcss to v4.0.0-alpha.33 (v3) (#2493)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <[email protected]>
  • Loading branch information
renovate[bot] and benjamincanac authored Nov 12, 2024
1 parent fc97112 commit fa5a375
Show file tree
Hide file tree
Showing 42 changed files with 980 additions and 812 deletions.
2 changes: 1 addition & 1 deletion devtools/app/components/CollapseContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ onMounted(() => {
</script>

<template>
<div class="border rounded border-[var(--ui-border)]">
<div class="border rounded-[var(--ui-radius)] border-[var(--ui-border)]">
<div
ref="wrapper"
:class="['overflow-hidden', collapsed && overflow ? 'max-h-48' : 'max-h-none']"
Expand Down
2 changes: 1 addition & 1 deletion devtools/app/components/ComponentPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const previewUrl = computed(() => {
</div>
<div v-if="highlightedCode && formattedCode" v-show="rendererReady" class="relative w-full p-3">
<!-- eslint-disable vue/no-v-html -->
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-lg border border-[var(--ui-border)] bg-neutral-50 dark:bg-neutral-800" v-html="highlightedCode" />
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-[calc(var(--ui-radius)*1.5)] border border-[var(--ui-border)] bg-neutral-50 dark:bg-neutral-800" v-html="highlightedCode" />
<UButton
color="neutral"
variant="link"
Expand Down
4 changes: 2 additions & 2 deletions devtools/app/components/ComponentPropInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ watchEffect(() => {
})
const description = computed(() => {
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-[var(--ui-bg-elevated)] px-1 py-0.5 rounded">$1</code>')
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-[var(--ui-bg-elevated)] px-1 py-0.5 rounded-[var(--ui-radius)]">$1</code>')
})
</script>

<template>
<UFormField :name="meta?.name" class="" :ui="{ wrapper: 'mb-2' }" :class="{ 'opacity-70 cursor-not-allowed': !matchedInput || ignore }">
<template #label>
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-[var(--ui-border-accented)] border-dashed rounded bg-[var(--ui-bg-elevated)]">
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-[var(--ui-border-accented)] border-dashed rounded-[var(--ui-radius)] bg-[var(--ui-bg-elevated)]">
{{ meta?.name }}
</p>
</template>
Expand Down
4 changes: 3 additions & 1 deletion docs/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ provide('navigation', updatedNavigation)
@source "../content/**/*.md";
@theme {
--container-8xl: 90rem;
--font-family-sans: 'Public Sans', sans-serif;
--color-green-50: #EFFDF5;
Expand All @@ -140,6 +142,6 @@ provide('navigation', updatedNavigation)
}
:root {
--ui-container-width: 90rem;
--ui-container: var(--container-8xl);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.duration"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l flex border-r border-[var(--ui-border-accented)]',
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
container: 'mt-0'
}"
Expand All @@ -18,8 +18,7 @@ const appConfig = useAppConfig()
v-model="appConfig.toaster.duration"
color="neutral"
variant="soft"
class="rounded rounded-l-none min-w-12"
:search-input="false"
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
/>
</UFormField>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.expand"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l flex border-r border-[var(--ui-border-accented)]',
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
container: 'mt-0'
}"
Expand All @@ -19,7 +19,7 @@ const appConfig = useAppConfig()
:items="[true, false]"
color="neutral"
variant="soft"
class="rounded rounded-l-none min-w-12"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
:search-input="false"
/>
</UFormField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.position"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l flex border-r border-[var(--ui-border-accented)]',
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
container: 'mt-0'
}"
Expand All @@ -22,7 +22,7 @@ const appConfig = useAppConfig()
:items="positions"
color="neutral"
variant="soft"
class="rounded rounded-l-none min-w-12"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
:search-input="false"
/>
</UFormField>
Expand Down
31 changes: 29 additions & 2 deletions docs/content/1.getting-started/3.theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,33 @@ You can customize the default radius value using the default Tailwind CSS variab
```
::

#### Container

Nuxt UI uses a global `--ui-container` CSS variable to define the width of the container:

```css
:root {
--ui-container: var(--container-7xl);
}
```

::tip
You can customize the default container width using the default Tailwind CSS variables or a value of your choice:

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";

@theme {
--container-8xl: 90rem;
}

:root {
--ui-container: var(--container-8xl);
}
```
::

## Components theme

Nuxt UI components are styled using the [Tailwind Variants](https://www.tailwind-variants.org/) API, which provides a powerful way to create variants and manage component styles. Let's explore the key features of this API:
Expand All @@ -370,7 +397,7 @@ Components in Nuxt UI can have multiple `slots`, each representing a distinct HT
```ts [src/theme/card.ts]
export default {
slots: {
root: 'bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow',
root: 'bg-[var(--ui-bg)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] rounded-[calc(var(--ui-radius)*2)] shadow-sm',
header: 'p-4 sm:px-6',
body: 'p-4 sm:p-6',
footer: 'p-4 sm:px-6'
Expand Down Expand Up @@ -404,7 +431,7 @@ Some components don't have slots, they are just composed of a single root elemen

```ts [src/theme/container.ts]
export default {
base: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8'
base: 'max-w-[var(--ui-container)] mx-auto px-4 sm:px-6 lg:px-8'
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@nuxt/content": "3.0.0-alpha.6",
"@nuxt/image": "^1.8.1",
"@nuxt/ui": "latest",
"@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@aae5b3e",
"@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@7c62edd",
"@nuxthub/core": "^0.8.6",
"@nuxtjs/plausible": "^1.0.3",
"@octokit/rest": "^21.0.2",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"@nuxt/kit": "^3.14.159",
"@nuxt/schema": "^3.14.159",
"@nuxtjs/color-mode": "^3.5.2",
"@tailwindcss/postcss": "4.0.0-alpha.30",
"@tailwindcss/vite": "4.0.0-alpha.30",
"@tailwindcss/postcss": "4.0.0-alpha.33",
"@tailwindcss/vite": "4.0.0-alpha.33",
"@tanstack/vue-table": "^8.20.5",
"@unhead/vue": "^1.11.11",
"@vueuse/core": "^11.2.0",
Expand All @@ -104,7 +104,7 @@
"scule": "^1.3.0",
"sirv": "^3.0.0",
"tailwind-variants": "^0.2.1",
"tailwindcss": "4.0.0-alpha.30",
"tailwindcss": "4.0.0-alpha.33",
"tinyglobby": "^0.2.10",
"unplugin": "^1.15.0",
"unplugin-auto-import": "^0.18.3",
Expand Down
Loading

0 comments on commit fa5a375

Please sign in to comment.