Skip to content

Releases: chakra-ui/ark

@ark-ui/[email protected]

15 May 18:58
Compare
Choose a tag to compare

Added

  • Added Signature Pad anatomy

@ark-ui/[email protected]

19 Apr 18:47
Compare
Choose a tag to compare
Pre-release

Added

  • Added a Context component to allow access to the internal machine API. Previously, it was only possible to access the internal API at the root level, which is manageable for small components but could lead to cumbersome composition in larger components. Additionally, this pattern clashed with the asChild composition pattern we use.
<template>
  <Popover.Root>
    <Popover.Trigger>Open</Popover.Trigger>
    <Popover.Positioner>
      <Popover.Context v-slot="popover">
          <Popover.Content>
            <Popover.Title @click="() => popover.close()">Title</Popover.Title>
            <Popover.Description>Description</Popover.Description>
          </Popover.Content>
      </Popover.Context>
    </Popover.Positioner>
  </Popover.Root>
</template>
  • Added Format and Collapsible component
  • Add an optional index prop to the DatePicker.Input to support multiple inputs.
  • Add the DatePicker.PresetTrigger component
  • Improve a controlled state in ColorPicker, DatePicker, Dialog, HoverCard, Menu, Popover, Select, and Tooltip components
  • Added defaultOpen to Tooltip

Changed

  • Changed TreeView.BranchTrigger from button to div for the accessibility reasons.

Fixed

  • Prevent calling interaction outside when scrollbar is clicked.
  • Fix issue where positioned components don't respond to window resizing.
  • Fix issue where restoring scroll causes a smooth scroll transition back to the initial scroll point.
  • Fix issue in Combobox, Menu, and Select where scrolling into view could result in scrolling the body element.
  • Fix issue where DatePicker does not show correct number of weeks when startOfWeek is set
  • Fix issue in the Editable where cannot delete text when maxLength reached
  • Fix issue in the Select where item group's label id pointed to the wrong element
  • Fix issue where Select uses the incorrect id for aria-activedecesendant field
  • Resolved an issue in DatePicker where the min and max props did not support date string values
  • Fix issue where close animation doesn't work for components that use the presence component.

Removed

  • Removed the unused parse prop from the DatePicker component.

@ark-ui/[email protected]

11 Apr 14:48
Compare
Choose a tag to compare
Pre-release

Fixed

  • Resolved an issue where the dist folder was not being published to npm.

@ark-ui/[email protected]

10 Apr 11:43
Compare
Choose a tag to compare
Pre-release

Added

  • Exposed component-related types to keep imports clean and orderly.
import { Avatar } from '@ark-ui/react';

export const Example = () => {
  // New: Use `Avatar` import to declare types.
  const handleLoadingStatusChange = (details: Avatar.StatusChangeDetails) => {
    console.log(details.status);
  };

  return (
    <Avatar.Root onLoadingStatusChange={handleLoadingStatusChange}>
      <Avatar.Fallback>PA</Avatar.Fallback>
      <Avatar.Image src="https://i.pravatar.cc/300" alt="avatar" />
    </Avatar.Root>
  );
};
  • Added a Context component to allow access to the internal machine API. Previously, it was only possible to access the internal API at the root level, which is manageable for small components but could lead to cumbersome composition in larger components. Additionally, this pattern clashed with the asChild composition pattern we use.
export const Basic = () => (
  <Popover.Root>
    <Popover.Trigger>Open</Popover.Trigger>
    <Popover.Positioner>
      <Popover.Context>
        {(popover) => (
          <Popover.Content>
            <Popover.Title onClick={() => popover().close()}>Title</Popover.Title>
            <Popover.Description>Description</Popover.Description>
          </Popover.Content>
        )}
      </Popover.Context>
    </Popover.Positioner>
  </Popover.Root>
);
  • Added new Format component to format bytes and numbers.

Fixed

  • Resolved an issue with Toast not updating its toasts and count properties when creating one or more toasts.
  • Resolved an issue in DatePicker where the min and max props did not support date string values.

Changed

  • Refined the current as prop implementation. The previous approach had several issues, mostly related to the merging of multiple types (e.g., ButtonProps + DialogTriggerProps + HTMLButtonElement), which resulted in a sluggish and, in some cases, malfunctioning implementation.
// before
<Button as={Dialog.Trigger} variant="solid" size="sm">
  Open Dialog
</Button>

// after
<Dialog.Trigger asChild>
  {(props) => (
    <Button
      {...props({ onClick: () => console.log('merge events') })}
      variant="solid"
      size="md"
    >
      Open Dialog
    </Button>
  )}
</Dialog.Trigger>

Removed

  • BREAKING: Removed the option to access the internal API from various Root components. Use the new Context component instead. This change will help in streamlining the asChild composition pattern.
  • Removed the unused parse prop from the DatePicker component.

@ark-ui/[email protected]

10 Apr 11:38
Compare
Choose a tag to compare
Pre-release

Added

  • Exposed component-related types to keep imports clean and orderly.
import { Avatar } from '@ark-ui/react';

export const Example = () => {
  // New: Use `Avatar` import to declare types.
  const handleLoadingStatusChange = (details: Avatar.StatusChangeDetails) => {
    console.log(details.status);
  };

  return (
    <Avatar.Root onLoadingStatusChange={handleLoadingStatusChange}>
      <Avatar.Fallback>PA</Avatar.Fallback>
      <Avatar.Image src="https://i.pravatar.cc/300" alt="avatar" />
    </Avatar.Root>
  );
};
  • Added a Context component to allow access to the internal machine API. Previously, it was only possible to access the internal API at the root level, which is manageable for small components but could lead to cumbersome composition in larger components. Additionally, this pattern clashed with the asChild composition pattern we use.
export const Basic = () => (
  <Popover.Root>
    <Popover.Trigger>Open</Popover.Trigger>
    <Popover.Positioner>
      <Popover.Context>
        {(api) => (
          <Popover.Content>
            <Popover.Title onClick={() => api.close()}>Title</Popover.Title>
            <Popover.Description>Description</Popover.Description>
          </Popover.Content>
        )}
      </Popover.Context>
    </Popover.Positioner>
  </Popover.Root>
);
  • Added new Format component to format bytes and numbers.
  • Added defaultOpen to Tooltip

Changed

  • Changed the Menu component. Please refer to the documentation for more information.

Fixed

  • Resolved an issue in DatePicker where the min and max props did not support date string values.

Removed

  • BREAKING: Removed the option to access the internal API from various Root components. Use the new Context component instead. This change will help in streamlining the asChild composition pattern.
  • Removed the unused parse prop from the DatePicker component.

@ark-ui/[email protected]

05 Apr 18:58
Compare
Choose a tag to compare

Added

  • Added Tour anatomy

@ark-ui/[email protected]

05 Mar 06:59
Compare
Choose a tag to compare

Fixed

  • Resolved an issue with using Locale in Next.js projects.
  • Resolved an issue with Toast not updating its toasts and count properties when creating one or more toasts.

@ark-ui/[email protected]

27 Feb 11:06
Compare
Choose a tag to compare

Added

  • Added Collapsible component.

Changed

  • Enhanced the performance of the Ark factory by utilizing memo to avoid unnecessary re-renders.
  • Integrated Collapsible into Accordion, allowing the Accordion component to utilize Collapsible for animating the opening and closing of content.d
@keyframes slideDown {
  from {
    height: 0;
  }
  to {
    height: var(--height);
  }
}

@keyframes slideUp {
  from {
    height: var(--height);
  }
  to {
    height: 0;
  }
}

[data-scope='accordion'][data-part='item-content'][data-state='open'] {
  animation: slideDown 250ms;
}

[data-scope='accordion'][data-part='item-content'][data-state='closed'] {
  animation: slideUp 200ms;
}

Fixed

  • Fixed a bug where the disabled Tooltip would flash upon hovering and clicking the trigger.
  • Fixed an issue where a disclosure components could not be initially set to an open state without being controlled.

@ark-ui/[email protected]

27 Feb 14:06
Compare
Choose a tag to compare

Fixed

  • Resolved an issue that a disabled Accordion.Item could still be opened.̊

@ark-ui/[email protected]

27 Feb 10:08
Compare
Choose a tag to compare

Changed

  • Updated to latest @ark-ui/anatomy version.