Skip to content

Commit d1c93ee

Browse files
feat(Marquee)!: rename from PageMarquee (#4741)
Co-authored-by: Benjamin Canac <[email protected]>
1 parent 4951bba commit d1c93ee

File tree

17 files changed

+73
-72
lines changed

17 files changed

+73
-72
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="relative w-full h-[400px] bg-muted overflow-hidden">
3-
<UPageMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -left-[100px] -top-[300px] h-[940px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
3+
<UMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -left-[100px] -top-[300px] h-[940px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
44
<img
55
v-for="i in 4"
66
:key="i"
@@ -10,8 +10,8 @@
1010
:alt="`Nuxt UI Screenshot ${i}`"
1111
class="aspect-video border border-default rounded-lg bg-white"
1212
>
13-
</UPageMarquee>
14-
<UPageMarquee orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -top-[400px] left-[480px] h-[1160px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
13+
</UMarquee>
14+
<UMarquee orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -top-[400px] left-[480px] h-[1160px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
1515
<img
1616
v-for="i in [5, 6, 7, 8]"
1717
:key="i"
@@ -21,8 +21,8 @@
2121
:alt="`Nuxt UI Screenshot ${i}`"
2222
class="aspect-video border border-default rounded-lg bg-white"
2323
>
24-
</UPageMarquee>
25-
<UPageMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: 'hidden md:flex [--duration:40s] absolute w-[460px] -top-[300px] left-[1020px] h-[1060px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
24+
</UMarquee>
25+
<UMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: 'hidden md:flex [--duration:40s] absolute w-[460px] -top-[300px] left-[1020px] h-[1060px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
2626
<img
2727
v-for="i in [9, 10, 11, 12]"
2828
:key="i"
@@ -32,6 +32,6 @@
3232
:alt="`Nuxt UI Screenshot ${i}`"
3333
class="aspect-video border border-default rounded-lg bg-white"
3434
>
35-
</UPageMarquee>
35+
</UMarquee>
3636
</div>
3737
</template>

docs/app/components/content/examples/page/PageMarqueeTestimonials.vue renamed to docs/app/components/content/examples/marquee/MarqueeTestimonials.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const testimonials = [{
8787

8888
<template>
8989
<div class="flex flex-col gap-4 w-full">
90-
<UPageMarquee pause-on-hover :overlay="false" :ui="{ root: '[--gap:--spacing(4)]', content: 'w-auto py-1' }">
90+
<UMarquee pause-on-hover :overlay="false" :ui="{ root: '[--gap:--spacing(4)]', content: 'w-auto py-1' }">
9191
<UPageCard
9292
v-for="(testimonial, index) in testimonials"
9393
:key="index"
@@ -102,8 +102,8 @@ const testimonials = [{
102102
<UUser v-bind="testimonial.user" size="xl" :ui="{ description: 'line-clamp-1' }" />
103103
</template>
104104
</UPageCard>
105-
</UPageMarquee>
106-
<UPageMarquee pause-on-hover reverse :overlay="false" :ui="{ root: '[--gap:--spacing(4)]', content: 'w-auto py-1' }">
105+
</UMarquee>
106+
<UMarquee pause-on-hover reverse :overlay="false" :ui="{ root: '[--gap:--spacing(4)]', content: 'w-auto py-1' }">
107107
<UPageCard
108108
v-for="(testimonial, index) in testimonials"
109109
:key="index"
@@ -118,6 +118,6 @@ const testimonials = [{
118118
<UUser v-bind="testimonial.user" size="xl" :ui="{ description: 'line-clamp-1' }" />
119119
</template>
120120
</UPageCard>
121-
</UPageMarquee>
121+
</UMarquee>
122122
</div>
123123
</template>

docs/app/pages/figma.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ onMounted(async () => {
232232
<UPageSection v-bind="page.features2" :ui="{ container: 'py-16 sm:py-16 lg:py-16', features: 'mt-0' }" class="border-y border-default" />
233233

234234
<UPageCTA v-if="page.customers" :title="page.customers.title" :ui="{ title: '!text-base font-medium', container: 'sm:py-12 sm:gap-8' }" variant="outline" class="rounded-none">
235-
<UPageMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
235+
<UMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
236236
<img v-for="(logo, index) in page.customers.items" :key="index" v-bind="logo" class="h-6 shrink-0 max-w-[140px] filter invert dark:invert-0" loading="lazy">
237-
</UPageMarquee>
237+
</UMarquee>
238238
</UPageCTA>
239239
<UPageSection v-bind="page.faq" :ui="{ container: 'relative' }">
240240
<div aria-hidden="true" class="hidden lg:block absolute z-[-1] border-x border-default inset-0 mx-4 sm:mx-6 lg:mx-8" />

docs/app/pages/index.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
8080
<LazySkyBg is-index />
8181

8282
<div class="h-[344px] lg:h-full lg:relative w-full lg:min-h-[calc(100vh-var(--ui-header-height)-1px)] overflow-hidden">
83-
<UPageMarquee
83+
<UMarquee
8484
pause-on-hover
8585
:overlay="false"
8686
:ui="{
@@ -106,9 +106,9 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
106106
/>
107107
<UBadge color="neutral" variant="outline" size="md" :label="component.title" class="hidden lg:block absolute mx-auto top-4 left-6 xl:left-4 group-hover/link:opacity-100 opacity-0 transition-all duration-300 pointer-events-none -translate-y-2 group-hover/link:translate-y-0" />
108108
</ULink>
109-
</UPageMarquee>
109+
</UMarquee>
110110

111-
<UPageMarquee
111+
<UMarquee
112112
pause-on-hover
113113
reverse
114114
:overlay="false"
@@ -135,7 +135,7 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
135135
/>
136136
<UBadge color="neutral" variant="outline" size="md" :label="component.title" class="hidden lg:block absolute mx-auto top-4 left-6 xl:left-4 group-hover/link:opacity-100 opacity-0 transition-all duration-300 pointer-events-none -translate-y-2 group-hover/link:translate-y-0" />
137137
</ULink>
138-
</UPageMarquee>
138+
</UMarquee>
139139
</div>
140140
</UPageHero>
141141

@@ -271,7 +271,7 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
271271

272272
<div aria-hidden="true" class="hidden lg:block absolute z-[-1] border-x border-default inset-0 mx-4 sm:mx-6 lg:mx-8" />
273273
<div class="relative h-[400px] border border-default bg-muted overflow-hidden border-x-0 -mx-4 sm:-mx-6 lg:mx-0 lg:border-x w-screen lg:w-full">
274-
<UPageMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -left-[100px] -top-[300px] h-[940px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
274+
<UMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -left-[100px] -top-[300px] h-[940px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
275275
<img
276276
v-for="i in 4"
277277
:key="i"
@@ -282,8 +282,8 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
282282
:alt="`Nuxt UI Screenshot ${i}`"
283283
class="aspect-video border border-default rounded-lg bg-white"
284284
>
285-
</UPageMarquee>
286-
<UPageMarquee orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -top-[400px] left-[480px] h-[1160px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
285+
</UMarquee>
286+
<UMarquee orientation="vertical" :overlay="false" :ui="{ root: '[--duration:40s] absolute w-[460px] -top-[400px] left-[480px] h-[1160px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
287287
<img
288288
v-for="i in [5, 6, 7, 8]"
289289
:key="i"
@@ -294,8 +294,8 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
294294
:alt="`Nuxt UI Screenshot ${i}`"
295295
class="aspect-video border border-default rounded-lg bg-white"
296296
>
297-
</UPageMarquee>
298-
<UPageMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: 'hidden md:flex [--duration:40s] absolute w-[460px] -top-[300px] left-[1020px] h-[1060px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
297+
</UMarquee>
298+
<UMarquee reverse orientation="vertical" :overlay="false" :ui="{ root: 'hidden md:flex [--duration:40s] absolute w-[460px] -top-[300px] left-[1020px] h-[1060px] transform-3d rotate-x-55 rotate-y-0 rotate-z-30' }">
299299
<img
300300
v-for="i in [9, 10, 11, 12]"
301301
:key="i"
@@ -306,7 +306,7 @@ useIntersectionObserver(contributorsRef, ([entry]) => {
306306
:alt="`Nuxt UI Screenshot ${i}`"
307307
class="aspect-video border border-default rounded-lg bg-white"
308308
>
309-
</UPageMarquee>
309+
</UMarquee>
310310
</div>
311311
</UPageSection>
312312
</UMain>

docs/content/docs/2.components/page-marquee.md renamed to docs/content/docs/2.components/marquee.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: PageMarquee
2+
title: Marquee
33
description: 'A component to create infinite scrolling content.'
4-
category: page
4+
category: data
55
links:
66
- label: GitHub
77
icon: i-simple-icons-github
8-
to: https://github.com/nuxt/ui/blob/v4/src/runtime/components/PageMarquee.vue
8+
to: https://github.com/nuxt/ui/blob/v4/src/runtime/components/Marquee.vue
99
---
1010

1111
## Usage
1212

13-
The `PageMarquee` component allows you to create an infinite scrolling animation with your content. Perfect for showcasing logos, testimonials, or any repeating content in an engaging way.
13+
The `Marquee` component allows you to create an infinite scrolling animation with your content. Perfect for showcasing logos, testimonials, or any repeating content in an engaging way.
1414

1515
::component-code
1616
---
@@ -173,12 +173,12 @@ slots:
173173

174174
### Testimonials
175175

176-
Use the `PageMarquee` component to create an infinite scrolling animation for your testimonials.
176+
Use the `Marquee` component to create an infinite scrolling animation for your testimonials.
177177

178178
::component-example{label="With Items"}
179179
---
180180
prettier: true
181-
name: 'page-marquee-testimonials'
181+
name: 'marquee-testimonials'
182182
collapse: true
183183
overflowHidden: true
184184
class: 'px-0'
@@ -187,12 +187,12 @@ class: 'px-0'
187187

188188
### Screenshots
189189

190-
Use the `PageMarquee` component to create an infinite scrolling animation for your screenshots.
190+
Use the `Marquee` component to create an infinite scrolling animation for your screenshots.
191191

192192
::component-example{label="With Screenshots"}
193193
---
194194
prettier: true
195-
name: 'page-marquee-screenshots'
195+
name: 'marquee-screenshots'
196196
collapse: true
197197
overflowHidden: true
198198
class: '!p-0'

docs/content/docs/2.components/page-logos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ props:
8181
---
8282
::
8383

84-
::note{to="/docs/components/page-marquee"}
85-
When you use `marquee` mode, you can customize its behavior by passing props. For more info, check out the [PageMarquee](/docs/components/page-marquee) component.
84+
::note{to="/docs/components/marquee"}
85+
When you use `marquee` mode, you can customize its behavior by passing props. For more info, check out the [Marquee](/docs/components/marquee) component.
8686
::
8787

8888
## API

docs/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export default defineNuxtConfig({
8282
'/docs/getting-started/i18n': { redirect: '/docs/getting-started/i18n/nuxt', prerender: false },
8383
// v4 redirects - renamed components
8484
'/components/button-group': { redirect: { to: '/docs/components/field-group', statusCode: 301 }, prerender: false },
85+
'/components/page-marquee': { redirect: { to: '/docs/components/marquee', statusCode: 301 }, prerender: false },
8586
// v4 redirects - removed pro pages
8687
'/pro': { redirect: { to: '/pro/activate', statusCode: 301 }, prerender: false },
8788
'/pro/pricing': { redirect: { to: '/pro/activate', statusCode: 301 }, prerender: false },
File renamed without changes.
File renamed without changes.

src/runtime/components/PageMarquee.vue renamed to src/runtime/components/Marquee.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
<script lang="ts">
22
import type { AppConfig } from '@nuxt/schema'
3-
import theme from '#build/ui/page-marquee'
3+
import theme from '#build/ui/marquee'
44
import type { ComponentConfig } from '../types/tv'
55
6-
type PageMarquee = ComponentConfig<typeof theme, AppConfig, 'pageMarquee'>
6+
type Marquee = ComponentConfig<typeof theme, AppConfig, 'marquee'>
77
8-
export interface PageMarqueeProps {
8+
export interface MarqueeProps {
99
/**
1010
* The element or component this component should render as.
1111
* @defaultValue 'div'
1212
*/
1313
as?: any
1414
pauseOnHover?: boolean
1515
reverse?: boolean
16-
orientation?: PageMarquee['variants']['orientation']
16+
orientation?: Marquee['variants']['orientation']
1717
repeat?: number
1818
overlay?: boolean
1919
class?: any
20-
ui?: PageMarquee['slots']
20+
ui?: Marquee['slots']
2121
}
2222
23-
export interface PageMarqueeSlots {
23+
export interface MarqueeSlots {
2424
default(props?: {}): any
2525
}
2626
</script>
@@ -31,16 +31,16 @@ import { Primitive } from 'reka-ui'
3131
import { useAppConfig } from '#imports'
3232
import { tv } from '../utils/tv'
3333
34-
const props = withDefaults(defineProps<PageMarqueeProps>(), {
34+
const props = withDefaults(defineProps<MarqueeProps>(), {
3535
orientation: 'horizontal',
3636
repeat: 4,
3737
overlay: true
3838
})
39-
defineSlots<PageMarqueeSlots>()
39+
defineSlots<MarqueeSlots>()
4040
41-
const appConfig = useAppConfig() as PageMarquee['AppConfig']
41+
const appConfig = useAppConfig() as Marquee['AppConfig']
4242
43-
const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.pageMarquee || {}) })({
43+
const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.marquee || {}) })({
4444
pauseOnHover: props.pauseOnHover,
4545
orientation: props.orientation,
4646
reverse: props.reverse,

0 commit comments

Comments
 (0)