Releases: chakra-ui/ark
Releases · chakra-ui/ark
@ark-ui/[email protected]
Added
- Added
Signature Pad
anatomy
@ark-ui/[email protected]
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 theasChild
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
andCollapsible
component - Add an optional
index
prop to theDatePicker.Input
to support multiple inputs. - Add the
DatePicker.PresetTrigger
component - Improve a controlled state in
ColorPicker
,DatePicker
,Dialog
,HoverCard
,Menu
,Popover
,Select
, andTooltip
components - Added
defaultOpen
toTooltip
Changed
- Changed
TreeView.BranchTrigger
frombutton
todiv
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
, andSelect
where scrolling into view could result in scrolling the body element. - Fix issue where
DatePicker
does not show correct number of weeks whenstartOfWeek
is set - Fix issue in the
Editable
where cannot delete text whenmaxLength
reached - Fix issue in the
Select
where item group's labelid
pointed to the wrong element - Fix issue where
Select
uses the incorrectid
foraria-activedecesendant
field - Resolved an issue in
DatePicker
where themin
andmax
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 theDatePicker
component.
@ark-ui/[email protected]
Fixed
- Resolved an issue where the
dist
folder was not being published to npm.
@ark-ui/[email protected]
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 theasChild
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 themin
andmax
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 theasChild
composition pattern. - Removed the unused
parse
prop from theDatePicker
component.
@ark-ui/[email protected]
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 theasChild
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
toTooltip
Changed
- Changed the
Menu
component. Please refer to the documentation for more information.
Fixed
- Resolved an issue in
DatePicker
where themin
andmax
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 theasChild
composition pattern. - Removed the unused
parse
prop from theDatePicker
component.
@ark-ui/[email protected]
Added
- Added
Tour
anatomy
@ark-ui/[email protected]
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]
Added
- Added
Collapsible
component.
Changed
- Enhanced the performance of the Ark
factory
by utilizingmemo
to avoid unnecessary re-renders. - Integrated
Collapsible
intoAccordion
, allowing theAccordion
component to utilizeCollapsible
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]
Fixed
- Resolved an issue that a disabled
Accordion.Item
could still be opened.̊
@ark-ui/[email protected]
Changed
- Updated to latest
@ark-ui/anatomy
version.