Compare commits

...

7 Commits

Author SHA1 Message Date
Junior Garcia
dfcb601de5 ci(changesets): version packages 2025-12-04 15:17:54 +00:00
WK
b89ba08ae0
fix(table): virtualized table in firefox by replacing Spacer with css (#5963)
* chore(deps): remove spacer and bump theme peer dependency

* refactor(table): remove spacer

* fix(theme): replace spacer by css

* chore(changeset): add changeset

* chore(changeset): update changeset message
2025-12-04 23:13:46 +08:00
WK
f08dfb8dd9
fix(table): column props not recognized (#5950)
* fix(table): width, minWidth, and maxWidth

* refactor(docs): revise table examples

* chore(changeset): add changeset
2025-12-04 21:42:04 +08:00
WK
0f165a36c8
fix(components): typos (#5958) 2025-12-03 01:18:40 +08:00
WK
9520b3f850
fix(docs): typos (#5957) 2025-12-03 00:29:37 +08:00
Stybo
ecad199b09
fix(docs): typos in calendar and range-calendar page (#5956)
* Fix typo in calendar component documentation

* Fix typo in range-calendar documentation
2025-12-03 00:16:26 +08:00
Adam Björnberg
a819f2a95a
fix(tabs): responsive resize cursor to match selected tab (#5846)
* fix(tabs): responsive resize cursor to match selected tab

* Move css to theme

* Update changeset

* use explicit true for data-initialized

* disable animation when variant changes

* make not disappear when toggling animation

* disable animation when isVertical changes

* refactor for readability

* fix blinking when toggling variant or isVertical

* disable animation when changing placement

* chore(changeset): add issue number

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>
2025-12-02 18:39:10 +08:00
91 changed files with 497 additions and 260 deletions

View File

@ -1,5 +0,0 @@
---
"@heroui/number-input": patch
---
allow inheriting labelPlacement from HeroUIProvider (#5845)

View File

@ -1,5 +0,0 @@
---
"@heroui/autocomplete": patch
---
show popover when emptyContent is provided with allowsCustomValue (#5745)

View File

@ -1,5 +0,0 @@
---
"@heroui/theme": patch
---
fix Safari autofill styling for dark mode readability in NumberInput & Input components (#4657)

View File

@ -1,5 +0,0 @@
---
"@heroui/number-input": patch
---
fix label position for empty percent format (#5941)

View File

@ -1,6 +0,0 @@
---
"@heroui/tabs": patch
"@heroui/theme": patch
---
fix tab cursor (#5790, #5809)

View File

@ -1,5 +0,0 @@
---
"@heroui/autocomplete": patch
---
fix close button display in autocomplete on mobile (#5826)

View File

@ -1,6 +0,0 @@
---
"@heroui/spinner": patch
"@heroui/theme": patch
---
Fix spinner animation (#5794)

View File

@ -1,5 +0,0 @@
---
"@heroui/tabs": patch
---
Fix vertical tabs to use correct aria-orientation and support Up/Down arrow navigation for accessibility. (#5810)

View File

@ -1,5 +0,0 @@
---
"@heroui/ripple": patch
---
fix resolve misalignment in RTL layouts by using transform translate (#5858)

View File

@ -1,5 +0,0 @@
---
"@heroui/spinner": patch
---
cater global spinner variant (#5939)

View File

@ -1,8 +0,0 @@
---
"@heroui/button": patch
"@heroui/select": patch
"@heroui/input": patch
"@heroui/theme": patch
---
Fix bordered focus styles overridden by hover styles (#5585)

View File

@ -1,5 +0,0 @@
---
"@heroui/link": patch
---
Fix an issue where the useHref was not being applied correctly (#5925, #5431, #5600)

View File

@ -1,6 +0,0 @@
---
"@heroui/theme": patch
"@heroui/skeleton": patch
---
fixed skeleton shimmer animation not respecting disableAnimation prop (#5915)

View File

@ -1,5 +0,0 @@
---
"@heroui/radio": patch
---
handle props styles in getBaseProps (#5942)

View File

@ -350,20 +350,18 @@ export default function Page() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown className="bg-background border-1 border-default-200">
<Dropdown className="bg-background border-1 border-default-200"> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly radius="full" size="sm" variant="light">
<Button isIconOnly radius="full" size="sm" variant="light"> <VerticalDotsIcon className="text-default-400" />
<VerticalDotsIcon className="text-default-400" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -342,20 +342,18 @@ export default function Page() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown>
<Dropdown> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly size="sm" variant="light">
<Button isIconOnly size="sm" variant="light"> <VerticalDotsIcon className="text-default-300" />
<VerticalDotsIcon className="text-default-300" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -144,7 +144,7 @@ nextui add --all
<Spacer y={4} /> <Spacer y={4} />
> The CLI is currentl in `Alpha` stage, we're working on adding more features and improvements. If you find any issues or have any suggestions, please let us know by [opening an issue](https://github.com/heroui-inc/heroui-cli/issues/new). > The CLI is currently in `Alpha` stage, we're working on adding more features and improvements. If you find any issues or have any suggestions, please let us know by [opening an issue](https://github.com/heroui-inc/heroui-cli/issues/new).
To learn more about the CLI and its commands, please refer to the [CLI documentation](/docs/guide/cli) and the [CLI API reference](/docs/api-references/cli-api). To learn more about the CLI and its commands, please refer to the [CLI documentation](/docs/guide/cli) and the [CLI API reference](/docs/api-references/cli-api).

View File

@ -93,7 +93,7 @@ The new `outside-top` option ensures that labels are consistently displayed at t
### Select ### Select
Two new properties `isClearable` and `onClear` have been introduced in the Select component. A clear button is visible when a value is slected and a callback function triggered upon clearing the selection for custom handling. Two new properties `isClearable` and `onClear` have been introduced in the Select component. A clear button is visible when a value is selected and a callback function triggered upon clearing the selection for custom handling.
<CodeDemo title="Clearable" files={selectIsClearable} /> <CodeDemo title="Clearable" files={selectIsClearable} />

View File

@ -19,7 +19,7 @@ import unavailableDates from "./unavailable-dates";
import visibleMonth from "./visible-month"; import visibleMonth from "./visible-month";
import firstDayOfWeek from "./first-day-of-week"; import firstDayOfWeek from "./first-day-of-week";
import pageBehavior from "./page-behavior"; import pageBehavior from "./page-behavior";
import nonContigous from "./non-contiguous"; import nonContiguous from "./non-contiguous";
import presets from "./presets"; import presets from "./presets";
import withMonthAndYearPickers from "./with-month-and-year-pickers"; import withMonthAndYearPickers from "./with-month-and-year-pickers";
import customStyles from "./custom-styles"; import customStyles from "./custom-styles";
@ -46,7 +46,7 @@ export const dateRangePickerContent = {
visibleMonth, visibleMonth,
firstDayOfWeek, firstDayOfWeek,
pageBehavior, pageBehavior,
nonContigous, nonContiguous,
presets, presets,
withMonthAndYearPickers, withMonthAndYearPickers,
customStyles, customStyles,

View File

@ -441,20 +441,18 @@ export default function App() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown className="bg-background border-1 border-default-200">
<Dropdown className="bg-background border-1 border-default-200"> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly radius="full" size="sm" variant="light">
<Button isIconOnly radius="full" size="sm" variant="light"> <VerticalDotsIcon className="text-default-400" />
<VerticalDotsIcon className="text-default-400" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -453,20 +453,18 @@ export default function App() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown className="bg-background border-1 border-default-200">
<Dropdown className="bg-background border-1 border-default-200"> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly radius="full" size="sm" variant="light">
<Button isIconOnly radius="full" size="sm" variant="light"> <VerticalDotsIcon className="text-default-400" />
<VerticalDotsIcon className="text-default-400" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -433,20 +433,18 @@ export default function App() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown>
<Dropdown> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly size="sm" variant="light">
<Button isIconOnly size="sm" variant="light"> <VerticalDotsIcon className="text-default-300" />
<VerticalDotsIcon className="text-default-300" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -446,20 +446,18 @@ export default function App() {
); );
case "actions": case "actions":
return ( return (
<div className="relative flex justify-end items-center gap-2"> <Dropdown>
<Dropdown> <DropdownTrigger>
<DropdownTrigger> <Button isIconOnly size="sm" variant="light">
<Button isIconOnly size="sm" variant="light"> <VerticalDotsIcon className="text-default-300" />
<VerticalDotsIcon className="text-default-300" /> </Button>
</Button> </DropdownTrigger>
</DropdownTrigger> <DropdownMenu>
<DropdownMenu> <DropdownItem key="view">View</DropdownItem>
<DropdownItem key="view">View</DropdownItem> <DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem> <DropdownItem key="delete">Delete</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem> </DropdownMenu>
</DropdownMenu> </Dropdown>
</Dropdown>
</div>
); );
default: default:
return cellValue; return cellValue;

View File

@ -264,7 +264,7 @@ Here's the example to customize `topContent` and `bottomContent` to have some pr
{ {
attribute: "defaultFocusedValue", attribute: "defaultFocusedValue",
type: "DateValue", type: "DateValue",
description: "The date that is focused when the calendar first mounts (uncountrolled).", description: "The date that is focused when the calendar first mounts (uncontrolled).",
default: "-" default: "-"
}, },
{ {

View File

@ -273,7 +273,7 @@ import {today, isWeekend, getLocalTimeZone} from "@internationalized/date";
import {useLocale} from "@react-aria/i18n"; import {useLocale} from "@react-aria/i18n";
``` ```
<CodeDemo title="Non Contiguous" files={dateRangePickerContent.nonContigous} /> <CodeDemo title="Non Contiguous" files={dateRangePickerContent.nonContiguous} />
### Presets ### Presets

View File

@ -116,7 +116,7 @@ You can set the maximum value of the input by passing the `maxValue` property.
### With Wheel Disabled ### With Wheel Disabled
By default, you can increase or decrease the value with scroll wheel. You can disable changing the vaule with scroll in NumberInput by passing the `isWheelDisabled` property. By default, you can increase or decrease the value with scroll wheel. You can disable changing the value with scroll in NumberInput by passing the `isWheelDisabled` property.
<CodeDemo title="With Wheel Disabled" files={numberInputContent.isWheelDisabled} /> <CodeDemo title="With Wheel Disabled" files={numberInputContent.isWheelDisabled} />

View File

@ -272,7 +272,7 @@ Here's the example to customize `topContent` and `bottomContent` to have some pr
{ {
attribute: "defaultFocusedValue", attribute: "defaultFocusedValue",
type: "DateValue", type: "DateValue",
description: "The date that is focused when the calendar first mounts (uncountrolled).", description: "The date that is focused when the calendar first mounts (uncontrolled).",
default: "-" default: "-"
}, },
{ {

View File

@ -61,7 +61,7 @@ Update your main css file as below
#### With `tailwind.config.js` #### With `tailwind.config.js`
In Tailwind v4, `tailwind.config.js` is still supported for backward compatibility. If you still need to use it, you can load it explicity as below. In Tailwind v4, `tailwind.config.js` is still supported for backward compatibility. If you still need to use it, you can load it explicitly as below.
```diff-css ```diff-css
/* your main css file */ /* your main css file */

View File

@ -1,5 +1,12 @@
# @heroui/alert # @heroui/alert
## 2.2.28
### Patch Changes
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
## 2.2.27 ## 2.2.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/alert", "name": "@heroui/alert",
"version": "2.2.27", "version": "2.2.28",
"description": "Alerts are temporary notifications that provide concise feedback about an action or event.", "description": "Alerts are temporary notifications that provide concise feedback about an action or event.",
"keywords": [ "keywords": [
"alert" "alert"

View File

@ -1,5 +1,21 @@
# @heroui/autocomplete # @heroui/autocomplete
## 2.3.30
### Patch Changes
- [#5951](https://github.com/heroui-inc/heroui/pull/5951) [`b4cfb40`](https://github.com/heroui-inc/heroui/commit/b4cfb408e963c1131ea3beb58aac7821a0ef52a9) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - show popover when emptyContent is provided with allowsCustomValue (#5745)
- [#5827](https://github.com/heroui-inc/heroui/pull/5827) [`2922b35`](https://github.com/heroui-inc/heroui/commit/2922b35644d8136d593ce08cccf9c78c08d00e0f) Thanks [@wingkwong](https://github.com/wingkwong)! - fix close button display in autocomplete on mobile (#5826)
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
- @heroui/input@2.4.29
- @heroui/form@2.1.28
- @heroui/listbox@2.3.26
- @heroui/popover@2.3.28
- @heroui/scroll-shadow@2.3.18
## 2.3.29 ## 2.3.29
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/autocomplete", "name": "@heroui/autocomplete",
"version": "2.3.29", "version": "2.3.30",
"description": "An autocomplete combines a text input with a listbox, allowing users to filter a list of options to items matching a query.", "description": "An autocomplete combines a text input with a listbox, allowing users to filter a list of options to items matching a query.",
"keywords": [ "keywords": [
"autocomplete" "autocomplete"

View File

@ -1,5 +1,15 @@
# @heroui/button # @heroui/button
## 2.2.28
### Patch Changes
- [#5893](https://github.com/heroui-inc/heroui/pull/5893) [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix bordered focus styles overridden by hover styles (#5585)
- Updated dependencies [[`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c), [`91e010f`](https://github.com/heroui-inc/heroui/commit/91e010fe3bd8e49653bd53c47e9955d8b11c1db2), [`0825f88`](https://github.com/heroui-inc/heroui/commit/0825f88cd2bfd1b6638a23b8d21f8812576f84a7)]:
- @heroui/spinner@2.2.25
- @heroui/ripple@2.2.21
## 2.2.27 ## 2.2.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/button", "name": "@heroui/button",
"version": "2.2.27", "version": "2.2.28",
"description": "Buttons allow users to perform actions and choose with a single tap.", "description": "Buttons allow users to perform actions and choose with a single tap.",
"keywords": [ "keywords": [
"button" "button"

View File

@ -1,5 +1,12 @@
# @heroui/calendar # @heroui/calendar
## 2.2.28
### Patch Changes
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
## 2.2.27 ## 2.2.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/calendar", "name": "@heroui/calendar",
"version": "2.2.27", "version": "2.2.28",
"description": "A calendar displays one or more date grids and allows users to select a single date.", "description": "A calendar displays one or more date grids and allows users to select a single date.",
"keywords": [ "keywords": [
"calendar" "calendar"

View File

@ -1,5 +1,12 @@
# @heroui/card # @heroui/card
## 2.2.26
### Patch Changes
- Updated dependencies [[`91e010f`](https://github.com/heroui-inc/heroui/commit/91e010fe3bd8e49653bd53c47e9955d8b11c1db2)]:
- @heroui/ripple@2.2.21
## 2.2.25 ## 2.2.25
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/card", "name": "@heroui/card",
"version": "2.2.25", "version": "2.2.26",
"description": "Card is a container for text, photos, and actions in the context of a single subject.", "description": "Card is a container for text, photos, and actions in the context of a single subject.",
"keywords": [ "keywords": [
"card" "card"

View File

@ -1,5 +1,12 @@
# @heroui/checkbox # @heroui/checkbox
## 2.3.28
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.28
## 2.3.27 ## 2.3.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/checkbox", "name": "@heroui/checkbox",
"version": "2.3.27", "version": "2.3.28",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.", "description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"keywords": [ "keywords": [
"checkbox" "checkbox"

View File

@ -1,5 +1,12 @@
# @heroui/date-input # @heroui/date-input
## 2.3.28
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.28
## 2.3.27 ## 2.3.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/date-input", "name": "@heroui/date-input",
"version": "2.3.27", "version": "2.3.28",
"description": "A date input allows users to enter and edit date and time values using a keyboard.", "description": "A date input allows users to enter and edit date and time values using a keyboard.",
"keywords": [ "keywords": [
"date-field" "date-field"

View File

@ -1,5 +1,16 @@
# @heroui/date-picker # @heroui/date-picker
## 2.3.29
### Patch Changes
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
- @heroui/calendar@2.2.28
- @heroui/date-input@2.3.28
- @heroui/form@2.1.28
- @heroui/popover@2.3.28
## 2.3.28 ## 2.3.28
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/date-picker", "name": "@heroui/date-picker",
"version": "2.3.28", "version": "2.3.29",
"description": "A date picker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value.", "description": "A date picker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value.",
"keywords": [ "keywords": [
"date-picker" "date-picker"

View File

@ -1,5 +1,13 @@
# @heroui/dropdown # @heroui/dropdown
## 2.3.28
### Patch Changes
- Updated dependencies []:
- @heroui/menu@2.2.26
- @heroui/popover@2.3.28
## 2.3.27 ## 2.3.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/dropdown", "name": "@heroui/dropdown",
"version": "2.3.27", "version": "2.3.28",
"description": "A dropdown displays a list of actions or options that a user can choose.", "description": "A dropdown displays a list of actions or options that a user can choose.",
"keywords": [ "keywords": [
"dropdown" "dropdown"

View File

@ -1,5 +1,12 @@
# @heroui/form # @heroui/form
## 2.1.28
### Patch Changes
- Updated dependencies [[`b89ba08`](https://github.com/heroui-inc/heroui/commit/b89ba08ae06bf0140f0bc92f10e9a09c1484cdba), [`8921dc4`](https://github.com/heroui-inc/heroui/commit/8921dc4361f7cdb8cbce755e8b90fdd799b668da), [`b38a2cf`](https://github.com/heroui-inc/heroui/commit/b38a2cfb58feb79b3baff10eff19e21480da1563), [`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c), [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1), [`a819f2a`](https://github.com/heroui-inc/heroui/commit/a819f2a95a32d059581b2789f2476c5e497732f2), [`bc4c982`](https://github.com/heroui-inc/heroui/commit/bc4c9826097a1014939b691425d30eff998d1e2e)]:
- @heroui/theme@2.4.24
## 2.1.27 ## 2.1.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/form", "name": "@heroui/form",
"version": "2.1.27", "version": "2.1.28",
"description": "A form is a group of inputs that allows users submit data to a server and supports field validation errors.", "description": "A form is a group of inputs that allows users submit data to a server and supports field validation errors.",
"keywords": [ "keywords": [
"form" "form"

View File

@ -1,5 +1,12 @@
# @heroui/input-otp # @heroui/input-otp
## 2.1.28
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.28
## 2.1.27 ## 2.1.27
### Patch Changes ### Patch Changes

View File

@ -293,7 +293,7 @@ describe("InputOtp with react-hook-form", () => {
expect(onSubmit).toHaveBeenCalledTimes(1); expect(onSubmit).toHaveBeenCalledTimes(1);
}); });
it("should work correctly wiht react-hook-form controller", async () => { it("should work correctly with react-hook-form controller", async () => {
const {result} = renderHook(() => const {result} = renderHook(() =>
useForm({ useForm({
defaultValues: { defaultValues: {

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/input-otp", "name": "@heroui/input-otp",
"version": "2.1.27", "version": "2.1.28",
"description": "", "description": "",
"keywords": [ "keywords": [
"input-otp" "input-otp"

View File

@ -1,5 +1,14 @@
# @heroui/input # @heroui/input
## 2.4.29
### Patch Changes
- [#5893](https://github.com/heroui-inc/heroui/pull/5893) [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix bordered focus styles overridden by hover styles (#5585)
- Updated dependencies []:
- @heroui/form@2.1.28
## 2.4.28 ## 2.4.28
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/input", "name": "@heroui/input",
"version": "2.4.28", "version": "2.4.29",
"description": "The input component is designed for capturing user input within a text field.", "description": "The input component is designed for capturing user input within a text field.",
"keywords": [ "keywords": [
"input" "input"

View File

@ -24,7 +24,7 @@ export type TextareaHeightChangeMeta = {
export interface TextAreaProps extends Omit<UseInputProps<HTMLTextAreaElement>, OmittedInputProps> { export interface TextAreaProps extends Omit<UseInputProps<HTMLTextAreaElement>, OmittedInputProps> {
/** /**
* Whether the textarea should automatically grow vertically to accomodate content. * Whether the textarea should automatically grow vertically to accommodate content.
* @default false * @default false
*/ */
disableAutosize?: boolean; disableAutosize?: boolean;

View File

@ -1,5 +1,11 @@
# @heroui/link # @heroui/link
## 2.2.24
### Patch Changes
- [#5933](https://github.com/heroui-inc/heroui/pull/5933) [`66ef76e`](https://github.com/heroui-inc/heroui/commit/66ef76e823ed6329b1d2e3c3b9d83721db12fdcf) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix an issue where the useHref was not being applied correctly (#5925, #5431, #5600)
## 2.2.23 ## 2.2.23
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/link", "name": "@heroui/link",
"version": "2.2.23", "version": "2.2.24",
"description": "Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an &lt;a&gt;", "description": "Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an &lt;a&gt;",
"keywords": [ "keywords": [
"link" "link"

View File

@ -1,5 +1,17 @@
# @heroui/number-input # @heroui/number-input
## 2.0.19
### Patch Changes
- [#5866](https://github.com/heroui-inc/heroui/pull/5866) [`bdd37b4`](https://github.com/heroui-inc/heroui/commit/bdd37b4b08cc12dc3c93f031aa639148257d06d6) Thanks [@KumJungMin](https://github.com/KumJungMin)! - allow inheriting labelPlacement from HeroUIProvider (#5845)
- [#5945](https://github.com/heroui-inc/heroui/pull/5945) [`ce0c298`](https://github.com/heroui-inc/heroui/commit/ce0c2987859a3fe0adc831eaef81ab018edadc11) Thanks [@wingkwong](https://github.com/wingkwong)! - fix label position for empty percent format (#5941)
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
- @heroui/form@2.1.28
## 2.0.18 ## 2.0.18
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/number-input", "name": "@heroui/number-input",
"version": "2.0.18", "version": "2.0.19",
"description": "The numeric input component is designed for users to enter a number, and increase or decrease the value using stepper buttons", "description": "The numeric input component is designed for users to enter a number, and increase or decrease the value using stepper buttons",
"keywords": [ "keywords": [
"input", "input",

View File

@ -1,5 +1,12 @@
# @heroui/popover # @heroui/popover
## 2.3.28
### Patch Changes
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
## 2.3.27 ## 2.3.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/popover", "name": "@heroui/popover",
"version": "2.3.27", "version": "2.3.28",
"description": "A popover is an overlay element positioned relative to a trigger.", "description": "A popover is an overlay element positioned relative to a trigger.",
"keywords": [ "keywords": [
"popover" "popover"

View File

@ -1,5 +1,14 @@
# @heroui/radio # @heroui/radio
## 2.3.28
### Patch Changes
- [#5944](https://github.com/heroui-inc/heroui/pull/5944) [`4fa5453`](https://github.com/heroui-inc/heroui/commit/4fa54534b2596ca2e46c69945c34894d1da14fab) Thanks [@wingkwong](https://github.com/wingkwong)! - handle props styles in getBaseProps (#5942)
- Updated dependencies []:
- @heroui/form@2.1.28
## 2.3.27 ## 2.3.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/radio", "name": "@heroui/radio",
"version": "2.3.27", "version": "2.3.28",
"description": "Radios allow users to select a single option from a list of mutually exclusive options.", "description": "Radios allow users to select a single option from a list of mutually exclusive options.",
"keywords": [ "keywords": [
"radio" "radio"

View File

@ -1,5 +1,11 @@
# @heroui/ripple # @heroui/ripple
## 2.2.21
### Patch Changes
- [#5891](https://github.com/heroui-inc/heroui/pull/5891) [`91e010f`](https://github.com/heroui-inc/heroui/commit/91e010fe3bd8e49653bd53c47e9955d8b11c1db2) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - fix resolve misalignment in RTL layouts by using transform translate (#5858)
## 2.2.20 ## 2.2.20
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/ripple", "name": "@heroui/ripple",
"version": "2.2.20", "version": "2.2.21",
"description": "A simple implementation to display a ripple animation when the source component is clicked", "description": "A simple implementation to display a ripple animation when the source component is clicked",
"keywords": [ "keywords": [
"ripple" "ripple"

View File

@ -1,5 +1,18 @@
# @heroui/select # @heroui/select
## 2.4.29
### Patch Changes
- [#5893](https://github.com/heroui-inc/heroui/pull/5893) [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix bordered focus styles overridden by hover styles (#5585)
- Updated dependencies [[`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c), [`0825f88`](https://github.com/heroui-inc/heroui/commit/0825f88cd2bfd1b6638a23b8d21f8812576f84a7)]:
- @heroui/spinner@2.2.25
- @heroui/form@2.1.28
- @heroui/listbox@2.3.26
- @heroui/popover@2.3.28
- @heroui/scroll-shadow@2.3.18
## 2.4.28 ## 2.4.28
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/select", "name": "@heroui/select",
"version": "2.4.28", "version": "2.4.29",
"description": "A select displays a collapsible list of options and allows a user to select one of them.", "description": "A select displays a collapsible list of options and allows a user to select one of them.",
"keywords": [ "keywords": [
"select" "select"

View File

@ -1,5 +1,11 @@
# @heroui/skeleton # @heroui/skeleton
## 2.2.18
### Patch Changes
- [#5916](https://github.com/heroui-inc/heroui/pull/5916) [`bc4c982`](https://github.com/heroui-inc/heroui/commit/bc4c9826097a1014939b691425d30eff998d1e2e) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - fixed skeleton shimmer animation not respecting disableAnimation prop (#5915)
## 2.2.17 ## 2.2.17
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/skeleton", "name": "@heroui/skeleton",
"version": "2.2.17", "version": "2.2.18",
"description": "Skeleton is used to display the loading state of some component.", "description": "Skeleton is used to display the loading state of some component.",
"keywords": [ "keywords": [
"skeleton" "skeleton"

View File

@ -1,5 +1,13 @@
# @heroui/snippet # @heroui/snippet
## 2.2.29
### Patch Changes
- Updated dependencies [[`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1)]:
- @heroui/button@2.2.28
- @heroui/tooltip@2.2.24
## 2.2.28 ## 2.2.28
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/snippet", "name": "@heroui/snippet",
"version": "2.2.28", "version": "2.2.29",
"description": "Display a snippet of copyable code for the command line.", "description": "Display a snippet of copyable code for the command line.",
"keywords": [ "keywords": [
"snippet" "snippet"

View File

@ -1,5 +1,16 @@
# @heroui/spinner # @heroui/spinner
## 2.2.25
### Patch Changes
- [#5815](https://github.com/heroui-inc/heroui/pull/5815) [`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c) Thanks [@Vishesh-Verma-07](https://github.com/Vishesh-Verma-07)! - Fix spinner animation (#5794)
- [#5948](https://github.com/heroui-inc/heroui/pull/5948) [`0825f88`](https://github.com/heroui-inc/heroui/commit/0825f88cd2bfd1b6638a23b8d21f8812576f84a7) Thanks [@wingkwong](https://github.com/wingkwong)! - cater global spinner variant (#5939)
- Updated dependencies []:
- @heroui/system-rsc@2.3.20
## 2.2.24 ## 2.2.24
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/spinner", "name": "@heroui/spinner",
"version": "2.2.24", "version": "2.2.25",
"description": "Loaders express an unspecified wait time or display the length of a process.", "description": "Loaders express an unspecified wait time or display the length of a process.",
"keywords": [ "keywords": [
"loading", "loading",

View File

@ -1,5 +1,16 @@
# @heroui/table # @heroui/table
## 2.2.28
### Patch Changes
- [#5963](https://github.com/heroui-inc/heroui/pull/5963) [`b89ba08`](https://github.com/heroui-inc/heroui/commit/b89ba08ae06bf0140f0bc92f10e9a09c1484cdba) Thanks [@wingkwong](https://github.com/wingkwong)! - fix(table): virtualized table in firefox by replacing Spacer with css (#2108, #5479)
- [#5950](https://github.com/heroui-inc/heroui/pull/5950) [`f08dfb8`](https://github.com/heroui-inc/heroui/commit/f08dfb8dd966e8a6f4b2407ab60e4e9d51821126) Thanks [@wingkwong](https://github.com/wingkwong)! - fix column props not recognized (#1667)
- Updated dependencies []:
- @heroui/checkbox@2.3.28
## 2.2.27 ## 2.2.27
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/table", "name": "@heroui/table",
"version": "2.2.27", "version": "2.2.28",
"description": "Tables are used to display tabular data using rows and columns. ", "description": "Tables are used to display tabular data using rows and columns. ",
"keywords": [ "keywords": [
"table" "table"
@ -36,7 +36,7 @@
"peerDependencies": { "peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0", "react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0", "react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.17", "@heroui/theme": ">=2.4.23",
"@heroui/system": ">=2.4.18" "@heroui/system": ">=2.4.18"
}, },
"dependencies": { "dependencies": {
@ -44,7 +44,6 @@
"@heroui/react-utils": "workspace:*", "@heroui/react-utils": "workspace:*",
"@heroui/shared-icons": "workspace:*", "@heroui/shared-icons": "workspace:*",
"@heroui/shared-utils": "workspace:*", "@heroui/shared-utils": "workspace:*",
"@heroui/spacer": "workspace:*",
"@react-aria/focus": "3.21.2", "@react-aria/focus": "3.21.2",
"@react-aria/interactions": "3.25.6", "@react-aria/interactions": "3.25.6",
"@react-aria/table": "3.17.8", "@react-aria/table": "3.17.8",

View File

@ -35,6 +35,10 @@ export interface TableColumnHeaderProps<T = object> extends HTMLHeroUIProps<"th"
node: GridNode<T>; node: GridNode<T>;
} }
const normalizeWidth = (value: number | string): string => {
return typeof value === "number" ? `${value}px` : value;
};
const TableColumnHeader = forwardRef<"th", TableColumnHeaderProps>((props, ref) => { const TableColumnHeader = forwardRef<"th", TableColumnHeaderProps>((props, ref) => {
const {as, className, state, node, slots, classNames, sortIcon, ...otherProps} = props; const {as, className, state, node, slots, classNames, sortIcon, ...otherProps} = props;
@ -49,10 +53,16 @@ const TableColumnHeader = forwardRef<"th", TableColumnHeaderProps>((props, ref)
const {isFocusVisible, focusProps} = useFocusRing(); const {isFocusVisible, focusProps} = useFocusRing();
const {isHovered, hoverProps} = useHover({}); const {isHovered, hoverProps} = useHover({});
const {hideHeader, align, ...columnProps} = node.props; const {hideHeader, align, width, minWidth, maxWidth, ...columnProps} = node.props;
const allowsSorting = columnProps.allowsSorting; const allowsSorting = columnProps.allowsSorting;
const columnStyles: React.CSSProperties = {};
if (width) columnStyles.width = normalizeWidth(width);
if (minWidth) columnStyles.minWidth = normalizeWidth(minWidth);
if (maxWidth) columnStyles.maxWidth = normalizeWidth(maxWidth);
const sortIconProps = { const sortIconProps = {
"aria-hidden": true, "aria-hidden": true,
"data-direction": state.sortDescriptor?.direction, "data-direction": state.sortDescriptor?.direction,
@ -72,6 +82,7 @@ const TableColumnHeader = forwardRef<"th", TableColumnHeaderProps>((props, ref)
data-focus-visible={dataAttr(isFocusVisible)} data-focus-visible={dataAttr(isFocusVisible)}
data-hover={dataAttr(isHovered)} data-hover={dataAttr(isHovered)}
data-sortable={dataAttr(allowsSorting)} data-sortable={dataAttr(allowsSorting)}
style={columnStyles}
{...mergeProps( {...mergeProps(
columnHeaderProps, columnHeaderProps,
focusProps, focusProps,

View File

@ -1,7 +1,6 @@
import type {UseTableProps} from "./use-table"; import type {UseTableProps} from "./use-table";
import {useCallback} from "react"; import {useCallback} from "react";
import {Spacer} from "@heroui/spacer";
import {forwardRef} from "@heroui/system"; import {forwardRef} from "@heroui/system";
import {useTable} from "./use-table"; import {useTable} from "./use-table";
@ -111,7 +110,6 @@ const Table = forwardRef<"table", TableProps>((props, ref) => {
)} )}
</TableHeaderRow> </TableHeaderRow>
))} ))}
<Spacer as="tr" tabIndex={-1} y={1} />
</TableRowGroup> </TableRowGroup>
<TableBody <TableBody
checkboxesProps={values.checkboxesProps} checkboxesProps={values.checkboxesProps}

View File

@ -1,7 +1,6 @@
import type {UseTableProps} from "./use-table"; import type {UseTableProps} from "./use-table";
import {useCallback, useLayoutEffect, useRef, useState} from "react"; import {useCallback, useLayoutEffect, useRef, useState} from "react";
import {Spacer} from "@heroui/spacer";
import {forwardRef} from "@heroui/system"; import {forwardRef} from "@heroui/system";
import {useVirtualizer} from "@tanstack/react-virtual"; import {useVirtualizer} from "@tanstack/react-virtual";
@ -128,7 +127,6 @@ const VirtualizedTable = forwardRef<"table", TableProps>((props, ref) => {
)} )}
</TableHeaderRow> </TableHeaderRow>
))} ))}
<Spacer as="tr" tabIndex={-1} y={1} />
</TableRowGroup> </TableRowGroup>
<VirtualizedTableBody <VirtualizedTableBody
checkboxesProps={values.checkboxesProps} checkboxesProps={values.checkboxesProps}

View File

@ -1,5 +1,15 @@
# @heroui/tabs # @heroui/tabs
## 2.2.25
### Patch Changes
- [#5816](https://github.com/heroui-inc/heroui/pull/5816) [`b38a2cf`](https://github.com/heroui-inc/heroui/commit/b38a2cfb58feb79b3baff10eff19e21480da1563) Thanks [@wingkwong](https://github.com/wingkwong)! - fix tab cursor (#5790, #5809)
- [#5924](https://github.com/heroui-inc/heroui/pull/5924) [`5d9a05b`](https://github.com/heroui-inc/heroui/commit/5d9a05be01fea1a66ed47ec4b4d9a9a442560341) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix vertical tabs to use correct aria-orientation and support Up/Down arrow navigation for accessibility. (#5810)
- [#5846](https://github.com/heroui-inc/heroui/pull/5846) [`a819f2a`](https://github.com/heroui-inc/heroui/commit/a819f2a95a32d059581b2789f2476c5e497732f2) Thanks [@adbjo](https://github.com/adbjo)! - responsive tab cursor (#5943)
## 2.2.24 ## 2.2.24
### Patch Changes ### Patch Changes

View File

@ -341,7 +341,7 @@ describe("Tabs", () => {
expect(tabWrapper).toHaveAttribute("data-vertical", "horizontal"); expect(tabWrapper).toHaveAttribute("data-vertical", "horizontal");
}); });
test("should destory inactive tab panels", () => { test("should destroy inactive tab panels", () => {
const {container} = render( const {container} = render(
<Tabs aria-label="Tabs test (destroyInactiveTabPanel=true)"> <Tabs aria-label="Tabs test (destroyInactiveTabPanel=true)">
<Tab key="tab1" data-testid="item1" title="Tab 1"> <Tab key="tab1" data-testid="item1" title="Tab 1">
@ -356,7 +356,7 @@ describe("Tabs", () => {
expect(container.querySelectorAll("[data-slot='panel']")).toHaveLength(1); expect(container.querySelectorAll("[data-slot='panel']")).toHaveLength(1);
}); });
test("should not destory inactive tab panels", async () => { test("should not destroy inactive tab panels", async () => {
const wrapper = render( const wrapper = render(
<Tabs aria-label="Tabs test (destroyInactiveTabPanel=false)" destroyInactiveTabPanel={false}> <Tabs aria-label="Tabs test (destroyInactiveTabPanel=false)" destroyInactiveTabPanel={false}>
<Tab key="tab1" data-testid="item1" title="Tab 1"> <Tab key="tab1" data-testid="item1" title="Tab 1">

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/tabs", "name": "@heroui/tabs",
"version": "2.2.24", "version": "2.2.25",
"description": "Tabs organize content into multiple sections and allow users to navigate between them.", "description": "Tabs organize content into multiple sections and allow users to navigate between them.",
"keywords": [ "keywords": [
"tabs" "tabs"

View File

@ -1,7 +1,7 @@
import type {ForwardedRef, ReactElement} from "react"; import type {ForwardedRef, ReactElement} from "react";
import type {UseTabsProps} from "./use-tabs"; import type {UseTabsProps} from "./use-tabs";
import {useRef, useMemo} from "react"; import {useEffect, useCallback, useRef, useMemo} from "react";
import {forwardRef} from "@heroui/system"; import {forwardRef} from "@heroui/system";
import {useTabs} from "./use-tabs"; import {useTabs} from "./use-tabs";
@ -44,66 +44,105 @@ const Tabs = forwardRef(function Tabs<T extends object>(
<Tab key={item.key} item={item} {...tabsProps} {...item.props} /> <Tab key={item.key} item={item} {...tabsProps} {...item.props} />
)); ));
const variant = props?.variant;
const previousVariant = useRef<typeof variant>(undefined);
const isVertical = props?.isVertical;
const previousIsVertical = useRef<typeof isVertical>(undefined);
const placement = props?.placement;
const previousPlacement = useRef<typeof placement>(undefined);
const cursorRef = useRef<HTMLSpanElement | null>(null);
const selectedItem = state.selectedItem; const selectedItem = state.selectedItem;
const selectedKey = selectedItem?.key; const selectedKey = selectedItem?.key;
const prevSelectedKey = useRef<typeof selectedKey>(undefined);
const prevVariant = useRef(props?.variant);
const variant = props?.variant;
const isVertical = props?.isVertical;
const getCursorStyles = (tabRect: DOMRect, relativeLeft: number, relativeTop: number) => { const getCursorStyles = useCallback(
const baseStyles = { (tabRect: DOMRect) => {
left: `${relativeLeft}px`, if (variant === "underlined") {
width: `${tabRect.width}px`, return {
}; left: `${tabRect.left + tabRect.width * 0.1}px`,
top: `${tabRect.top + tabRect.height - 2}px`,
width: `${tabRect.width * 0.8}px`,
height: "",
};
}
if (variant === "underlined") {
return { return {
left: `${relativeLeft + tabRect.width * 0.1}px`, left: `${tabRect.left}px`,
top: `${relativeTop + tabRect.height - 2}px`, top: `${tabRect.top}px`,
width: `${tabRect.width * 0.8}px`, width: `${tabRect.width}px`,
height: "", height: `${tabRect.height}px`,
}; };
} },
[variant],
);
return { const withAnimationReset = useCallback(
...baseStyles, (callback: () => void) => {
top: `${relativeTop}px`, if (
height: `${tabRect.height}px`, variant !== previousVariant.current ||
}; isVertical !== previousIsVertical.current ||
}; placement !== previousPlacement.current
) {
cursorRef.current?.removeAttribute("data-animated");
}
callback();
previousVariant.current = variant;
previousIsVertical.current = isVertical;
previousPlacement.current = placement;
requestAnimationFrame(() => {
cursorRef.current?.setAttribute("data-animated", "true");
cursorRef.current?.setAttribute("data-initialized", "true");
});
},
[isVertical, variant, placement],
);
const updateCursorPosition = (node: HTMLSpanElement, selectedTab: HTMLElement) => { const updateCursorPosition = useCallback(
const tabRect = { (selectedTab: HTMLElement) => {
width: selectedTab.offsetWidth, if (!cursorRef.current) return;
height: selectedTab.offsetHeight,
} as DOMRect;
const styles = getCursorStyles(tabRect, selectedTab.offsetLeft, selectedTab.offsetTop); const tabRect = {
width: selectedTab.offsetWidth,
height: selectedTab.offsetHeight,
left: selectedTab.offsetLeft,
top: selectedTab.offsetTop,
} as DOMRect;
node.style.left = styles.left; const styles = getCursorStyles(tabRect);
node.style.top = styles.top;
node.style.width = styles.width;
node.style.height = styles.height;
};
const handleCursorRef = (node: HTMLSpanElement | null) => { withAnimationReset(() => {
if (!node) return; cursorRef.current!.style.left = styles.left;
cursorRef.current!.style.top = styles.top;
cursorRef.current!.style.width = styles.width;
cursorRef.current!.style.height = styles.height;
});
},
[cursorRef.current, getCursorStyles, withAnimationReset],
);
const selectedTab = domRef.current?.querySelector(`[data-key="${selectedKey}"]`) as HTMLElement; const onResize = useCallback(
(entries: ResizeObserverEntry[]) => {
const contentRect = entries[0].contentRect;
if (!selectedTab || !domRef.current) return; // check if rendered
if (contentRect.width === 0 && contentRect.height === 0) return;
const shouldDisableTransition = updateCursorPosition(entries[0].target as HTMLElement);
prevSelectedKey.current === undefined || prevVariant.current !== variant; },
[updateCursorPosition],
);
node.style.transition = shouldDisableTransition ? "none" : ""; useEffect(() => {
const selectedTab = domRef.current?.querySelector(`[data-key="${selectedKey}"]`);
prevSelectedKey.current = selectedKey; if (!selectedTab) return;
prevVariant.current = variant;
updateCursorPosition(node, selectedTab); const observer = new ResizeObserver(onResize);
};
observer.observe(selectedTab);
return () => observer.disconnect();
}, [domRef.current, onResize, selectedKey]);
const renderTabs = useMemo( const renderTabs = useMemo(
() => ( () => (
@ -111,7 +150,7 @@ const Tabs = forwardRef(function Tabs<T extends object>(
<div {...getBaseProps()}> <div {...getBaseProps()}>
<Component {...getTabListProps()}> <Component {...getTabListProps()}>
{!values.disableAnimation && !values.disableCursorAnimation && selectedKey != null && ( {!values.disableAnimation && !values.disableCursorAnimation && selectedKey != null && (
<span {...getTabCursorProps()} ref={handleCursorRef} /> <span {...getTabCursorProps()} ref={cursorRef} />
)} )}
{tabs} {tabs}
</Component> </Component>
@ -145,6 +184,7 @@ const Tabs = forwardRef(function Tabs<T extends object>(
values.state, values.state,
destroyInactiveTabPanel, destroyInactiveTabPanel,
domRef, domRef,
cursorRef,
variant, variant,
isVertical, isVertical,
], ],

View File

@ -1,5 +1,12 @@
# @heroui/toast # @heroui/toast
## 2.0.18
### Patch Changes
- Updated dependencies [[`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c), [`0825f88`](https://github.com/heroui-inc/heroui/commit/0825f88cd2bfd1b6638a23b8d21f8812576f84a7)]:
- @heroui/spinner@2.2.25
## 2.0.17 ## 2.0.17
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/toast", "name": "@heroui/toast",
"version": "2.0.17", "version": "2.0.18",
"description": "Toast are temporary notifications that provide concise feedback about an action or event", "description": "Toast are temporary notifications that provide concise feedback about an action or event",
"keywords": [ "keywords": [
"toast" "toast"

View File

@ -309,8 +309,8 @@ const CustomToastComponent = (args) => {
variant="bordered" variant="bordered"
onPress={() => { onPress={() => {
addToast({ addToast({
title: "Sucessful!", title: "Successful!",
description: "Document uploaded to cloud successful.", description: "Document uploaded to cloud successfully.",
classNames: { classNames: {
base: cn([ base: cn([
"bg-default-50 dark:bg-background shadow-sm", "bg-default-50 dark:bg-background shadow-sm",

View File

@ -1,5 +1,58 @@
# @heroui/react # @heroui/react
## 2.8.6
### Patch Changes
- Updated dependencies [[`bdd37b4`](https://github.com/heroui-inc/heroui/commit/bdd37b4b08cc12dc3c93f031aa639148257d06d6), [`b89ba08`](https://github.com/heroui-inc/heroui/commit/b89ba08ae06bf0140f0bc92f10e9a09c1484cdba), [`b4cfb40`](https://github.com/heroui-inc/heroui/commit/b4cfb408e963c1131ea3beb58aac7821a0ef52a9), [`8921dc4`](https://github.com/heroui-inc/heroui/commit/8921dc4361f7cdb8cbce755e8b90fdd799b668da), [`f08dfb8`](https://github.com/heroui-inc/heroui/commit/f08dfb8dd966e8a6f4b2407ab60e4e9d51821126), [`ce0c298`](https://github.com/heroui-inc/heroui/commit/ce0c2987859a3fe0adc831eaef81ab018edadc11), [`b38a2cf`](https://github.com/heroui-inc/heroui/commit/b38a2cfb58feb79b3baff10eff19e21480da1563), [`2922b35`](https://github.com/heroui-inc/heroui/commit/2922b35644d8136d593ce08cccf9c78c08d00e0f), [`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c), [`5d9a05b`](https://github.com/heroui-inc/heroui/commit/5d9a05be01fea1a66ed47ec4b4d9a9a442560341), [`91e010f`](https://github.com/heroui-inc/heroui/commit/91e010fe3bd8e49653bd53c47e9955d8b11c1db2), [`0825f88`](https://github.com/heroui-inc/heroui/commit/0825f88cd2bfd1b6638a23b8d21f8812576f84a7), [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1), [`66ef76e`](https://github.com/heroui-inc/heroui/commit/66ef76e823ed6329b1d2e3c3b9d83721db12fdcf), [`a819f2a`](https://github.com/heroui-inc/heroui/commit/a819f2a95a32d059581b2789f2476c5e497732f2), [`bc4c982`](https://github.com/heroui-inc/heroui/commit/bc4c9826097a1014939b691425d30eff998d1e2e), [`4fa5453`](https://github.com/heroui-inc/heroui/commit/4fa54534b2596ca2e46c69945c34894d1da14fab)]:
- @heroui/number-input@2.0.19
- @heroui/table@2.2.28
- @heroui/theme@2.4.24
- @heroui/autocomplete@2.3.30
- @heroui/tabs@2.2.25
- @heroui/spinner@2.2.25
- @heroui/ripple@2.2.21
- @heroui/button@2.2.28
- @heroui/select@2.4.29
- @heroui/input@2.4.29
- @heroui/link@2.2.24
- @heroui/skeleton@2.2.18
- @heroui/radio@2.3.28
- @heroui/accordion@2.2.24
- @heroui/alert@2.2.28
- @heroui/avatar@2.2.22
- @heroui/badge@2.2.17
- @heroui/breadcrumbs@2.2.22
- @heroui/calendar@2.2.28
- @heroui/card@2.2.26
- @heroui/checkbox@2.3.28
- @heroui/chip@2.2.22
- @heroui/code@2.2.21
- @heroui/date-input@2.3.28
- @heroui/date-picker@2.3.29
- @heroui/divider@2.2.20
- @heroui/drawer@2.2.24
- @heroui/dropdown@2.3.28
- @heroui/form@2.1.28
- @heroui/image@2.2.17
- @heroui/input-otp@2.1.28
- @heroui/kbd@2.2.22
- @heroui/listbox@2.3.26
- @heroui/menu@2.2.26
- @heroui/modal@2.2.24
- @heroui/navbar@2.2.25
- @heroui/pagination@2.2.24
- @heroui/popover@2.3.28
- @heroui/progress@2.2.22
- @heroui/scroll-shadow@2.3.18
- @heroui/slider@2.4.24
- @heroui/snippet@2.2.29
- @heroui/spacer@2.2.21
- @heroui/switch@2.2.24
- @heroui/toast@2.0.18
- @heroui/tooltip@2.2.24
- @heroui/user@2.2.22
## 2.8.5 ## 2.8.5
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/react", "name": "@heroui/react",
"version": "2.8.5", "version": "2.8.6",
"description": "🚀 Beautiful and modern React UI library.", "description": "🚀 Beautiful and modern React UI library.",
"author": "HeroUI <support@heroui.com>", "author": "HeroUI <support@heroui.com>",
"homepage": "https://heroui.com", "homepage": "https://heroui.com",

View File

@ -1,5 +1,23 @@
# @heroui/theme # @heroui/theme
## 2.4.24
### Patch Changes
- [#5963](https://github.com/heroui-inc/heroui/pull/5963) [`b89ba08`](https://github.com/heroui-inc/heroui/commit/b89ba08ae06bf0140f0bc92f10e9a09c1484cdba) Thanks [@wingkwong](https://github.com/wingkwong)! - fix(table): virtualized table in firefox by replacing Spacer with css (#2108, #5479)
- [#5909](https://github.com/heroui-inc/heroui/pull/5909) [`8921dc4`](https://github.com/heroui-inc/heroui/commit/8921dc4361f7cdb8cbce755e8b90fdd799b668da) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - fix Safari autofill styling for dark mode readability in NumberInput & Input components (#4657)
- [#5816](https://github.com/heroui-inc/heroui/pull/5816) [`b38a2cf`](https://github.com/heroui-inc/heroui/commit/b38a2cfb58feb79b3baff10eff19e21480da1563) Thanks [@wingkwong](https://github.com/wingkwong)! - fix tab cursor (#5790, #5809)
- [#5815](https://github.com/heroui-inc/heroui/pull/5815) [`1782961`](https://github.com/heroui-inc/heroui/commit/17829618591d723beea665a7c56d9c45a112e24c) Thanks [@Vishesh-Verma-07](https://github.com/Vishesh-Verma-07)! - Fix spinner animation (#5794)
- [#5893](https://github.com/heroui-inc/heroui/pull/5893) [`fd9dd2a`](https://github.com/heroui-inc/heroui/commit/fd9dd2a20c30beb4f46a8a6ab5d654ec7b9dbec1) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - Fix bordered focus styles overridden by hover styles (#5585)
- [#5846](https://github.com/heroui-inc/heroui/pull/5846) [`a819f2a`](https://github.com/heroui-inc/heroui/commit/a819f2a95a32d059581b2789f2476c5e497732f2) Thanks [@adbjo](https://github.com/adbjo)! - responsive tab cursor (#5943)
- [#5916](https://github.com/heroui-inc/heroui/pull/5916) [`bc4c982`](https://github.com/heroui-inc/heroui/commit/bc4c9826097a1014939b691425d30eff998d1e2e) Thanks [@hasegawa-101](https://github.com/hasegawa-101)! - fixed skeleton shimmer animation not respecting disableAnimation prop (#5915)
## 2.4.23 ## 2.4.23
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@heroui/theme", "name": "@heroui/theme",
"version": "2.4.23", "version": "2.4.24",
"description": "The default theme for HeroUI components", "description": "The default theme for HeroUI components",
"keywords": [ "keywords": [
"theme", "theme",

View File

@ -54,7 +54,7 @@ const table = tv({
"overflow-auto", "overflow-auto",
], ],
table: "min-w-full h-auto", table: "min-w-full h-auto",
thead: "[&>tr]:first:rounded-lg", thead: "[&>tr]:first:rounded-lg after:content-[''] after:table-row after:h-[5px]",
tbody: "after:block", tbody: "after:block",
tr: ["group/tr", "outline-solid outline-transparent", ...dataFocusVisibleClasses], tr: ["group/tr", "outline-solid outline-transparent", ...dataFocusVisibleClasses],
th: [ th: [

View File

@ -69,9 +69,11 @@ const tabs = tv({
"z-0", "z-0",
"bg-white", "bg-white",
"will-change-[transform,width,height]", "will-change-[transform,width,height]",
"transition-[left,top,width,height]", "invisible",
"duration-250", "data-[initialized=true]:visible",
"ease-out", "data-[animated=true]:transition-[left,top,width,height]",
"data-[animated=true]:duration-250",
"data-[animated=true]:ease-out",
], ],
panel: [ panel: [
"py-3", "py-3",

3
pnpm-lock.yaml generated
View File

@ -2695,9 +2695,6 @@ importers:
'@heroui/shared-utils': '@heroui/shared-utils':
specifier: workspace:* specifier: workspace:*
version: link:../../utilities/shared-utils version: link:../../utilities/shared-utils
'@heroui/spacer':
specifier: workspace:*
version: link:../spacer
'@react-aria/focus': '@react-aria/focus':
specifier: 3.21.2 specifier: 3.21.2
version: 3.21.2(react-dom@18.3.0(react@18.3.0))(react@18.3.0) version: 3.21.2(react-dom@18.3.0(react@18.3.0))(react@18.3.0)