Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add carousel component #227

Merged
merged 26 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f5369b5
feat: create new carousel component with embala-carousel
wasimTQ Dec 29, 2023
38e8a8e
feat: create demos for the carousel component
wasimTQ Dec 29, 2023
34ca4e3
feat: add the default carousel component to the docs
wasimTQ Dec 29, 2023
963217b
feat: add new-york styling for carousels
wasimTQ Dec 29, 2023
9f86084
feat: add more examples for spacing, size and options
wasimTQ Dec 29, 2023
a09acec
refactor: change ways to better pass the data to parent
wasimTQ Dec 29, 2023
43daeb3
feat: add examples for carousel api handling
wasimTQ Dec 29, 2023
6ded40c
feat: add example for using embla plugin
wasimTQ Dec 29, 2023
0ec5604
chore: add carousel component doc to the table of contents
wasimTQ Dec 29, 2023
b39ba51
feat: add focusability on carousel element
wasimTQ Dec 30, 2023
86da196
fix: update docs
wasimTQ Dec 30, 2023
9f31e86
chore: add docs for slot props
wasimTQ Dec 30, 2023
f3d4992
feat: expose api for the parent component
wasimTQ Dec 30, 2023
5a03b2f
chore: include missing filenames
wasimTQ Dec 30, 2023
331ff88
chore: update embla carousel dependency versions
wasimTQ Jan 6, 2024
cbbc3c1
chore: fix typescript error by getting the types from core package
wasimTQ Jan 7, 2024
734079a
chore: prevent duplicate classes by using class as prop
wasimTQ Jan 8, 2024
13c47ce
feat: use slot fallback content
sadeghbarati Jan 8, 2024
40f0747
fix: change attribute inheritance element
sadeghbarati Jan 8, 2024
dfda49d
chore: update www package.json `scripts`
sadeghbarati Jan 8, 2024
dae21cc
refactor: fix embla-carousel types after v8.0.0-rc18
sadeghbarati Jan 8, 2024
518189f
chore: update @vue/tsconfig
sadeghbarati Jan 8, 2024
8f7a183
chore: run registry
zernonia Jan 8, 2024
d2f0865
refactor: remove uneended ref
zernonia Jan 8, 2024
c3e9e9f
fix: dependencies for embla missing
zernonia Jan 8, 2024
c509c67
docs: update carousel for optional plugin installation
zernonia Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: fix embla-carousel types after v8.0.0-rc18
update embla deps
  • Loading branch information
sadeghbarati committed Jan 8, 2024
commit dae21ccc7c6cdadb4b37f83378990b51763a1f71
4 changes: 2 additions & 2 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"codesandbox": "^2.2.3",
"date-fns": "^2.30.0",
"embla-carousel": "8.0.0-rc19",
"embla-carousel-autoplay": "8.0.0-rc18",
"embla-carousel-vue": "8.0.0-rc18",
"embla-carousel-autoplay": "8.0.0-rc19",
"embla-carousel-vue": "8.0.0-rc19",
"lucide-vue-next": "^0.276.0",
"radix-vue": "^1.2.5",
"tailwindcss-animate": "^1.0.7",
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/default/ui/carousel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export { default as CarouselPrevious } from './CarouselPrevious.vue'
export { default as CarouselNext } from './CarouselNext.vue'
export { useCarousel } from './useCarousel'

export {
type EmblaCarouselType as CarouselApi,
} from 'embla-carousel-vue'
export type {
EmblaCarouselType as CarouselApi,
} from 'embla-carousel'
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/default/ui/carousel/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type {
EmblaOptionsType as CarouselOptions,
EmblaPluginType as CarouselPlugin,
} from 'embla-carousel'
import type { HTMLAttributes } from 'vue'
import type { HTMLAttributes, Ref } from 'vue'

export interface CarouselProps {
opts?: CarouselOptions
plugins?: CarouselPlugin[]
opts?: CarouselOptions | Ref<CarouselOptions>
plugins?: CarouselPlugin[] | Ref<CarouselPlugin[]>
orientation?: 'horizontal' | 'vertical'
}

Expand Down
7 changes: 4 additions & 3 deletions apps/www/src/lib/registry/default/ui/carousel/useCarousel.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createInjectionState } from '@vueuse/core'
import emblaCarouselVue, {
type EmblaCarouselType as CarouselApi,
} from 'embla-carousel-vue'
import emblaCarouselVue from 'embla-carousel-vue'
import { onMounted, ref } from 'vue'
import type {
EmblaCarouselType as CarouselApi,
} from 'embla-carousel'
import type { CarouselEmits, CarouselProps } from './interface'

const [useProvideCarousel, useInjectCarousel] = createInjectionState(
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/new-york/ui/carousel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export { default as CarouselPrevious } from './CarouselPrevious.vue'
export { default as CarouselNext } from './CarouselNext.vue'
export { useCarousel } from './useCarousel'

export {
type EmblaCarouselType as CarouselApi,
} from 'embla-carousel-vue'
export type {
EmblaCarouselType as CarouselApi,
} from 'embla-carousel'
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/new-york/ui/carousel/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type {
EmblaOptionsType as CarouselOptions,
EmblaPluginType as CarouselPlugin,
} from 'embla-carousel'
import type { HTMLAttributes } from 'vue'
import type { HTMLAttributes, Ref } from 'vue'

export interface CarouselProps {
opts?: CarouselOptions
plugins?: CarouselPlugin[]
opts?: CarouselOptions | Ref<CarouselOptions>
plugins?: CarouselPlugin[] | Ref<CarouselPlugin[]>
orientation?: 'horizontal' | 'vertical'
}

Expand Down
7 changes: 4 additions & 3 deletions apps/www/src/lib/registry/new-york/ui/carousel/useCarousel.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createInjectionState } from '@vueuse/core'
import emblaCarouselVue, {
type EmblaCarouselType as CarouselApi,
} from 'embla-carousel-vue'
import emblaCarouselVue from 'embla-carousel-vue'
import { onMounted, ref } from 'vue'
import type {
EmblaCarouselType as CarouselApi,
} from 'embla-carousel'
import type { CarouselEmits, CarouselProps } from './interface'

const [useProvideCarousel, useInjectCarousel] = createInjectionState(
Expand Down
34 changes: 15 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.