github chakra-ui/zag @zag-js/carousel@2.0.0-next.4

Major Changes

  • #3342
    1e1f6da Thanks
    @github-actions! - Breaking: Spell out "Prev" as "Previous" across the
    API.

    The prevTrigger part is now previousTrigger in carousel, date picker, pagination, scheduler and steps, including
    its prop getter, data attribute, ids key and translation key.

    - <button {...api.getPrevTriggerProps()} />
    + <button {...api.getPreviousTriggerProps()} />
    
    - [data-carousel-prev-trigger] { ... }
    + [data-carousel-previous-trigger] { ... }
    
      carousel.machine({
    -   ids: { prevTrigger: "prev" },
    -   translations: { prevTrigger: "Previous slide" },
    +   ids: { previousTrigger: "prev" },
    +   translations: { previousTrigger: "Previous slide" },
      })

    Pagination and scheduler rename translations.prevTriggerLabel to translations.previousTriggerLabel.

    Component Before After
    Carousel scrollPrev(), canScrollPrev scrollPrevious(), canScrollPrevious
    Date picker, Scheduler goToPrev() goToPrevious()
    Pagination goToPrevPage() goToPreviousPage()
    Steps goToPrevStep(), hasPrevStep goToPreviousStep(), hasPreviousStep
    Tabs selectPrev() selectPrevious()
    Tour prev(), hasPrevStep previous(), hasPreviousStep

    The tour's "prev" action is now "previous", and its trigger renders data-type="previous".

    - actions: [{ label: "Prev", action: "prev" }],
    + actions: [{ label: "Previous", action: "previous" }],
    - action: (actions) => actions.prev()
    + action: (actions) => actions.previous()
    - translations: { prevStep: "Previous step" }
    + translations: { previousStep: "Previous step" }

Patch Changes

  • #3342
    730ea29 Thanks
    @github-actions! - - Fix focus, scroll and sync work scheduled for the next
    frame running after the component unmounts.

  • #3342
    d6089c3 Thanks
    @github-actions! - - Fix a quick mouse flick snapping back instead of moving
    to the next page.

    • Fix scrollToIndex not scrolling to slides that aren't the first of a page.

    • Fix changing dir at runtime not updating the snap points in Vue.

    • Fix changing orientation or dir at runtime throwing in Svelte.

  • Updated dependencies [a80b307]:

    • @zag-js/dom-query@2.0.0-next.4
    • @zag-js/core@2.0.0-next.4
    • @zag-js/scroll-snap@2.0.0-next.4
    • @zag-js/anatomy@2.0.0-next.4
    • @zag-js/types@2.0.0-next.4
    • @zag-js/utils@2.0.0-next.4

Don't miss a new zag release

NewReleases is sending notifications on new releases.