* chore: org name change (#4596)

* chore: update brand name (#4600)

* fix(calendar): function components cannot be given refs (#4614)

* docs(modal): fix small typos and add clarifying language (#4629)

* chore(deps): bump RA versions (#4611)

* chore(deps): bump RA versions

* chore(deps): bump @internationalized/date

* chore(docs): update RA versions

* chore(docs): update versions

* chore(docs): use string type

* chore(deps): update @react-types versions

* refactor(docs): undo version change since they will be removed in another PR

* feat: tailwind variants upgrade (#4386)

* feat: tailwind variants upgrade

* chore: restore npmrc

* chore: adjust pkgs

* fix: versions

* fix: lock file

* chore(changeset): update package name

* chore(deps): use fixed version

* fix(test): incorrect package name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* feat: add fn win alt keys (#4638)

* feat: add new keys

* feat: add new keys

* chore: update docs & storybook as well

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>

* fix(use-image): load images after props change (#4523)

* fix(use-image): load image after props change

* chore(changeset): add changeset

* refactor(use-image): remove unused props

* feat(use-image): add test case

* fix(use-image): apply useCallback to load & remove status check

* chore(changeset): update package name

* feat: global labelPlacement prop (#4346)

* feat: adding the support for labelPlacement globally

* chore: reafctoring

* chore: updating the dependency

* chore(changeset): update package name

* chore: adding Marcus's suggestions

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* fix(form): use native as default validation behavior (#4425)

* fix(form): use native as default validation behavior

* docs(form): delete explicit validationBehavior=native

* test(form): adjusted form test validation behaviors

* chore(form): adjusted stories with forms

* chore(changeset): changed form default validation behavior to native

* chore(changeset): removed packages with only test changes

* chore(changeset): change to patch

* chore(changeset): update package name

* refactor(docs): update package name

* refactor(docs): update to heroui

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* feat(spinner): new spinner variants (#4555)

* refactor(spinner): add default variant

* feature(spinner): add gradient variant

* feature(spinner): add dots variant

* feature(spinner): add dots-blink variant

* feature(spinner): add spinner-bars

* chore(spinner): add variants storybook

* chore: adding variants to docs

* chore: simplyfying the styles and modifying docs

* chore: nits

* chore: updating the dots and dots-blink animation

* chore: nits

* chore: adding Marcus' suggestions

* chore: adding Marcus's suggestions

* chore: adding junior's suggestions

---------

Co-authored-by: Maharshi Alpesh <maharshialpesh@gmail.com>

* fix: rename wrapper to tab wrapper (#4636)

* fix: rename wrapper to tab wrapper

* docs: update

* docs: update

* docs: update

* fix: rename wrapper to tab wrapper

* refactor: remove feature request from issue template (#4661)

* refactor(.github): remove feature request template

* refactor(.github): add a link to redirect to discussion (feature request category)

* docs(table): include TS examples to show Selection type usage (#4793)

* fix(listbox): unexpected scrollShadow on virtualized listbox (#4784)

* fix(listbox): add scroll height & scroll top to listbox

* fix(use-data-scroll-overflow): handle scrollHeight & scrollTop in virtualization

* chore(changeset): add changeset

* refactor(theme): replace left & right by start & end to support RTL (#4782)

* fix(date-picker): deprecate dateInputClassNames (#4780)

* chore(date-picker): add missing slots comments

* fix(date-picker): remove dateInputClassNames

* fix(date-picker): use classNames instead of dateInputClassNames

* chore(docs): add missing attributes

* fix(date-picker): use classNames instead of dateInputClassNames

* feat(changeset): add changeset

* fix(docs): broken type

* refactor(navbar): remove dropdown menu width (#4757)

* refactor: remove dropdown menu width

* refactor: shorter description

* refactor: rename instances of NextUI to Hero UI (#4645)

* docs: use the correct org for `img.shields.io` license in README

* docs: update opencollective org name

* docs: use correct org name in site footer

* docs: update image urls for heroui pro sections

* docs: update laravel installation keywords in route config

* docs: add `heroui` tag to `Introducing HeroUI` blog post

* fix: use correct names in `plop/components/src` templates

* chore: add empty changeset

* fix: revert image urls back to `nextuipro.nyc3.cdn.digitaloceanspaces...`

* chore: undo footer change

* chore: update incorrect brand name

* chore(docs): nextui -> heroui

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* fix(input): missing clear button with file input type (#4599)

* fix(theme): sync with input theme on labelPlacement (#4597)

* fix(theme): sync with input theme on labelPlacement

* chore(select): revise width for labelPlacement

* chore(changeset): add changeset

* test(input): input interaction tests (#4579)

* test(input): user interaction tests

* test(input): missing act wrappers

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>

* fix(calendar): rtl navigation (#4565)

* fix(calendar): rtl navigation

* chore(changeset): fixed reverse behavior of NextButton and PrevButton in the RTL calendar

* chore(changeset): update package name

* refactor(calendar): prefer isRTL and use className in theme package instead

* chore(changeset): add theme package as well

* chore(calendar): add min theme package to 2.4.7

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* refactor: remove unnecessary className passing to tv and make naming consistent (#4558)

* refactor: remove unnecessary className passing to tv

* refactor(button): move styles to getButtonProps

* refactor: rename classNames to styles to keep the naming consistent

* fix: deprecation warning triggered by internal onClick  (#4557)

* fix(use-aria-link): onClick deprecation warning

* fix(use-aria-button): onClick deprecation warning

* feat(changeset): add changeset

* fix(use-aria-button): incorrect prop name

* chore(changeset): update package name

* ci: add pkg pr new (#4540)

* ci: add pkg pr new

* ci: add pkg pr new

* chore(workflow): update repo name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* chore(docs): remove shouldBlockScroll prop in Tooltip page (#4539)

* fix(use-pagination): controlled page after delay (#4536)

* fix(use-pagination): add page to dependency for scrollTo

* feat(changeset): add changeset

* chore(changeset): update package name

* fix(tooltip): accessing element.ref was removed in React 19 issue (#4531)

* fix(tooltip): accessing element.ref was removed in React 19 issue

* chore(changeset): update package name

* fix: correctly dismissable default value (#4524)

* fix: correctly dismissable default value

* fix: correctly dismissable default value

* chore(changeset): update package name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* fix(theme): input height in innerWrapper in Select (#4512)

* fix(select): fix input height #4321

* chore(select): changed package name in changeset to theme

* chore(select): updated changeset message

* chore(changeset): update package name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* fix: inert value in next15 (#4491)

* feat: add post install

* feat: add postinstall

* feat: add postinstall

* fix: type

* fix: type

* fix: next version

* chore(changeset): update package name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* refactor: remove cursor-hit in hiddenInputClasses (#4474)

* refactor: remove cursor-hit in hiddenInputClasses

* Create lazy-ants-exercise.md

* chore(changeset): update package name

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* feat(table): virtualization (#4285)

* feat: baseline virtualization for table

* merge branch canary

* fix: table layout

* fix: calc header height w layouteffect to offset padding

* Merge branch 'canary' into feat/eng-1633-virtualization-for-table

* chore: remove unused files and comments

* chore: add missing package

* feat: add shouldVirtualize conditional to render virtualized-table

* feat: update docs for table

* feat: use wrapper to support theme styles

* chore: add changeset

* chore(changeset): update package name

* chore(deps): pnpm-lock.yaml

* fix(table): outdated package name

* chore(changeset): add issue number

* fix(deps): keep the version consistent with other components

* fix(table): incorrect displayName

* refactor(table): use VirtualizedTemplate

* chore(deps): bump `@tanstack/react-virtua`

* chore(deps): typecheck issue

* fix(table): do not use any type

* chore: remove auto virtualization

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* feat(toast): introduce Toast component (#4437)

* feat: initial commit

* chore: adding the animation

* chore: nits

* chore: fixes and adding draft1 of stories

* chore: adding the docs draft

* chore: adding the swiping interaction for toast removal

* chore: adding the tests

* fix: improving the progress bar logix

* chore: refactoring and refining the animations

* fix: making the animations compatible with the positons

* chore: fixing the styles

* chore: modifying the animations

* chore: improving the animations

* chore: adding the decorator to the story-book

* chore: fixing the animations and positions

* fix: handle expand region on touch

* feat: adding the promises support

* chore: updating the styles

* chore: improving styles

* chore: styles correction

* fix: adding junior's suggestions

* chore: correcting styles

* fix: fixing the timer behavior

* chore: adding the spinner to the toast

* chore: full width for mobile

* chore: modifying styles

* chore: fixing the positions on smaller devices

* chore: adding story with description

* chore: adding credits for sonner

* fix: adding junior's suggestions

* chore: adding the exit animation

* fix: adding junior's suggestions

* chore: improving the swipe animations

* fix: fixing the swipe animations on touch

* chore: adding tests

* chore: adding swipe threshild and initial position variable

* fix: fixing autoclose in timeout

* chore: modifying the docs

* chore: fixing the conflict

* chore: adding marcus' suggestions

* chore: adding the bottom animations

* chore: modying docs

* chore: removing nextui references

* chore: adding info about the provider

* chore: updating the docs

* chore: versions in package.json

* chore: nits

* chore: adding junior's suggestions

* chore: nits

* fix: applying junior's suggestions

* chore: adding junior's suggestions

* chore: using domMax

* fix: adding Marcus's suggestions

* chore: add global toast props and custom close icon

* chore: adding the defaultTimout provider prop

* chore: modifying defaultTimeout

* chore: nits

* fix: adding Marcus' suggestions

* chore: fixing bg

* chore(deps): bump RA deps

* fix: fixing the color discrepancy due to the timer

* chore: moving the kapan ai to the left side

* refactor(toast): update author

* chore: nit

* chore: improvements

* chore: updating the solid variant

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>

* fix(docs): correct Tab usage example (#4821)

* chore(docs): add note itemHeight for virtualization (#4822)

* chore(docs): add note itemHeight for virtualization

* fix: format

* fix(docs): fix horizontal scrolling example in scroll-shadow (#4820)

* refactor: update author in package.json (#4800)

* feat(button): export PressEvent for onPress event typing   (#4819)

* fix(docs): failed to install dependencies in StackBlitz (#4639)

* chore(Docs): remove step 2 from "Using use-theme-hook" (#4797)

* fix(docs): incorrect code Modal placement (#4652)

* docs: update DatePicker example to remove "time" label as time selection is not supported in this example (#4443)

* feat(button): export PressEvent for onPress event typing

* revert unnecessary changes

* chore: format

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>
Co-authored-by: Praharsh Bhatt <30700808+praharshbhatt@users.noreply.github.com>

* fix(listbox): pass missing press events to usePress (#4812)

* fix(listbox): pass missing press events to usePress

* feat(listbox): add test case for press event

* chore(changeset): add changeset

* fix(checkbox): inherit stroke in CheckboxIcon (#4811)

* fix: `SelectItem`, `ListboxItem`, and `AutocompleteItem` not to accept `value` props (#4653)

* fix(select): `SelectItem` does not accept value props

* refactor: do not use the index as `key`

* Update .changeset/light-hairs-draw.md

* chore: remove unnecessary `value` props

* chore: update changeset

* refactor: remove unnecessary value prop

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>

* fix: pkg package scope (#4823)

* fix: pkg package scope

* fix: pkg package scope

* fix: pkg package scope

* fix(theme): border radius in Table when isMultiSelectable (#4808)

* fix(theme): border radius in Table when isMultiSelectable

* chore(theme): added changeset (#4807)

* chore: removing the kapa ai for toast doc page (#4833)

* fix(accordion): add data-slot attributes to accordion (#4832)

* fix(accordion): add data-slot attributes to accordion

* chore

---------

Co-authored-by: Hovannes Markarian <hovannes.markarian@socrate.fr>
Co-authored-by: աӄա <wingkwong.code@gmail.com>

* chore(docs): update versions (#4836)

* docs(themes): adding theme generator (#4626)

* chore: adding xylish's contributions + modifying styles

* chore: nextui to heroui

* chore: colors in theme generator

* chore: radiuses, disable-opacity

* chore: fixing the configuration box styles

* chore: adding the showcase elemtents

* chore: modifying styles

* chore: adding the fonts

* chore: adding the scaling

* chore: removing the calendar

* feat: adding the border-width

* chore: modifying style for mobile

* chore: modifying the styles

* chore: removing the NextUI references + small bug fix

* chore: adding coderabits reviews

* fix: borderWidth not getting applied on breadcrumbs and input

* chore: rebasing

* chore: modifying the styles

* chore: updating the styles for the smaller devices

* chore: refactoring

* chore: improvements

* chore: making the fonts workable

* chore: making the fonts workable

* chore: modifying the swatch according to the theme

* chore: adding the default selected template

* chore: modifying mobile styles

* chore: fixing the popover

* chore: nit

* fix: fixing the select styles

* chore: modifying the mobile styles

* chore: modifying the styles

* fix: adding junior's suggestions

* fix: fixing the breadcrumb

* fix: adding junior's suggestions

* feat: introduce NumberInput (#4475)

* feat(number-field): init structure

* feat(deps): add `@nextui-org/button` & `@react-types/button`

* feat(theme): export number-field

* feat(number-field): storybook init structure

* feat(number-field): add NumberFieldHorizontalStepper

* feat(number-field): add NumberFieldHorizontalStepper

* feat(theme): init number field theme

* feat(number-field): number-field draft

* refactor(number-field): revise stepper icons

* feat(shared-icons): add ChevronLeftIcon

* feat(theme): stepperButton styles

* feat(theme): number-field styles

* fix(number-field): label layout

* feat(number-field): vertical stepper wrapper

* feat(number-field): use-number-field (wip)

* feat(number-field): add data-direction

* feat(theme): center the text if it is horizontal stepper

* feat(number-field): add HorizontalStepper

* feat(number-field): add HideStepper

* chore(number-field): revise minValue & defaultValue

* feat(docs): init number field structure

* fix(theme): outside-left styles

* refactor(theme): remove labelPlacement styles

* refactor(number-field): remove labelContent logic

* refactor(number-field): remove labelPlacement args

* feat(number-field): helper text

* feat(number-field): revise number field stories

* feat(number-field): description

* refactor(number-field): revise number field stories

* feat(theme): numberFieldLabelClasses

* fix(number-field): incorrect button props

* fix(number-field): typing issue on stepper buttons

* chore(number-field): add aria-label

* refactor(number-field): merge props

* fix(number-field): pass originalProps instead

* chore(number-field): revise Required story args

* feat(number-field): add WithStepValue & WithWheelDisabled & revise stories

* chore(number-field): add label to Required

* feat(docs): number-field doc page

* fix(number-field): typing issue

* fix(number-field): test cases

* fix(number-field): user.keyboard & defaultValue

* fix(number-field): should work with defaultValues

* chore(number-field): add type: number

* chore(number-field): remove hidden related code

* fix(number-field): numeric value

* chore(changeset): add changeset

* feat(deps): add "@nextui-org/number-field" to docs

* feat(react): export `@nextui-org/number-field`

* feat(changeset): add @nextui-org/react

* feat(docs): number-field examples

* chore(number-field): use text instead

* refactor(number-field): remove unnecessary filled-within

* fix(number-field): test case

* chore(number-field): remove aria-label for stepper buttons

* feat(docs): add incrementAriaLabel & decrementAriaLabel to NumberField

* chore(number-field): reorder WithFormatOptions

* fix(deps): update number-field's peerDependencies & dependencies

* feat(number-field): hidden input for holding numeric vaule

* fix(docs): number field title

* feat(docs): add format options to number field

* chore(docs): revise number field content

* chore(number-field): add type to useDOMRef

* fix(number-field): clear button

* fix(theme): clear button styles

* refactor(theme): stepper button styles

* chore(number-field): accept stepperButton class

* fix(theme): helper wrapper padding

* feat(deps): add `@react-aria/i18n`

* fix(number-field): use locale from `@react-aria/i18n`

* fix(deps): dependency order

* fix(docs): incorrect command

* chore(docs): remove type=number

* chore(theme): add padding to stepper wrapper

* fix(number-field): avoid resetting value

* fix(number-field): storybook

* chore(docs): remove custom impl

* chore(docs): update docs code & content

* chore(number-field):  migrate to heroui

* chore(number-field): migrate to heroui

* chore(number-field): migrate to heroui

* chore: rename to number input

* fix(number-input): incorrect import

* chore(docs): rename to number input

* chore: change to number input

* refactor(number-input): change label to amount

* fix(docs): use heroui commands

* chore(changeset): update package name

* refactor(number-input): remove steps

* refactor: remove helper text

* feat(number-input): label placement

* refactor(number-input): rename stepper

* fix(theme): isClearable

* feat(docs): add label placements

* refactor(docs): update number-input content

* fix(docs): incorrect file

* feat(docs): add lablePlacement

* refactor(docs): remove labelPlacement & startContent

* refactor(docs): remove helperText

* refactor(docs): remove helperText

* refactor(docs): revise description

* feat(number-input): add data-slot for stepper-wrapper

* fix(number-input): test cases

* fix(docs): unexpected change

* refactor(number-input): update outdated info

* fix(docs): coderabbitai comments

* refactor: remove validationState

* fix(docs): typo

* chore(deps): remove unnecessary dep

* chore(deps): bump RA versions

* chore(number-input): apply latest labelPlacement change

* refactor(number-input): update author

* refactor(number-input): revise stepper wrapper alignment

* refactor(number-input): stepper button styles

* chore(number-input): add disableRipple

* fix(theme): increase stepper button click area

* fix(number-input): sync latest validationBehavior changes

* fix(number-input): pass validationBehavior to useAriaNumberInput

* chore(docs): add import react

* chore(number-input): remove HorizontalStepper story

* chore(number-input): enable ripple

* fix(number-input): remove number type

* refactor(theme): follow input clear button styles

* feat(theme): add color for stepperButton

* fix(theme): revise stepperButton size for outside & outside-left cases

* fix(number-input): typo

* chore(docs): update description for wheel

* chore(theme): change opacity when pressed

* chore(number-input): add disableRipple

* Update .changeset/witty-flies-reflect.md

* fix(theme): add hover opacity effect

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* chore(docs): revised tags in doc routes for 2.7.0 (#4777)

* chore(docs): remove last version update tags

* chore(docs): add updated tag for 2.7.0

* chore(docs): updated table

* chore(docs): update search meta

* chore(docs): update github info

* Merge branch 'canary' into docs/eng-2003

* chore(docs): update routes.json

* chore(docs): update meta info

* chore: improve theme builder

* v2.7.0

* chore: v2.7.0 combined changeset

* fix: changeset

* fix: peer deps

* feat: toast api improved

* chore: toast styles improved

* fix: toast styles

* chore: toast width style changed

* fix: changeset release

* fix: changeset peerdeps

* chore: toast styles improved

* refactor(pagination): rtl (#4843)

* refactor(pagination): rtl

* chore(changeset): add changeset

* feat: new spinner variant

* fix(docs): popover shouldBlockScroll default value (#4851)

* fix(select): select scroll content will close immediately when popover on click (#4849)

* chore(select): update select deps

* fix(select): select scroll content will close immediately when popover on click

* chore(select): add .changeset file

* chore(changeset): add issue number

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>

* feat(calendar): add firstDayOfWeek (#4852)

* feat(calendar): add firstDayOfWeek

* feat(docs): add firstDayOfWeek in Calendar docs

* feat(calendar): add firstDayOfWeek to range calendar

* feat(docs): add firstDayOfWeek to API table

* feat: add firstDayOfWeek to date picker & date range picker

* feat(docs): add firstDayOfWeek

* feat(changeset): add changeset

* feat: add firstDayOfWeek option in storybook

* feat(docs): export firstDayOfWeek

* chore(docs): update title

* chore: spinner variants updated

* feat: v2.7.0 blog

* ci(changesets): version packages (#4601)

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* chore: manual release

* fix(toast): fixing maxVisibleToasts, solid variant promise, promise timer (#4881)

* fix: maxVisibleToasts functionality

* chore: adding the changeset

* fix: starting the toast timer when the promise is resolved

* fix: spinner invisible in solid variants

* fix(toast): shouldShowTimeoutProgess typo (#4858)

* fix(toast): shouldShowTimeoutProgess typo

* fix(toast): shouldShowTimeoutProgess typo

* fix(select): pass form prop to hidden-select (#4854)

* fix(select): pass form prop to hidden-select

* chore(select): changeset

* fix(spinner): Attempted to call useProviderContext() from the server (#4904)

* fix(spinner): add banner in tsup.config.ts

* chore(changeset): add changeset

* chore(docs): update breaking changes in blog

* chore(docs): handled in PR4905

* fix(number-input): onChange event in number input (#4907)

* fix(number-input): onChange event in number input

* chore(number-input): remove duplicate test case

* fix(breadcrumb): broken start & end content (#4921) (#4922)

* refactor: build process (#4909)

* chore: update component description

* chore: exclude stories-utils & test-utils

* chore(utilities): remove unused info

* chore(deps): pnpm-lock.yaml

* fix: incorrect system & theme version in peerDependencies (#4901)

* fix: incorrect system & theme version in peerDependencies

* fix: incorrect system & theme version in peerDependencies

* chore(changeset): add changeset

* fix(changeset): remove `@heroui/stories-utils` and `@heroui/test-utils` from ignore list (#4939)

* fix(docs): include .npmrc in sandbox (#4951)

* fix(input): esc key to clear input value (#4892)

* chore: theme generator credits

* fix: blog date and spinner default variant

* fix: #4850
Solve Pressing ESC doesn't clear input value

* fix: #4850 code review change

* fix: undo changes in apps/docs/content/blog/v2.7.0.mdx and add a test case for my changes

* fix: run through the test cases successfully

* fix: change md content

* fix: using isClearable not clear the value

* fix: add number-input clearable esc clear

* fix: edit review problem

* fix: delete unless file

* chore(changeset): update changeset

* fix: add inputProps.onKeyDown

* fix: pressing ESC key in a read-only input not clear

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: աӄա <wingkwong.code@gmail.com>

* ci(changesets): version packages (#4896)

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* v2.7.4

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>
Co-authored-by: millmason <jmsoper@protonmail.com>
Co-authored-by: winches <329487092@qq.com>
Co-authored-by: Maharshi Alpesh <maharshialpesh@gmail.com>
Co-authored-by: Peterl561 <76144929+Peterl561@users.noreply.github.com>
Co-authored-by: Paul Ebose <49006567+plbstl@users.noreply.github.com>
Co-authored-by: Zarin <thesharifi.maruf@gmail.com>
Co-authored-by: Shrinidhi Upadhyaya <shrinidhiupadhyaya1195@gmail.com>
Co-authored-by: Avan <layouwen@gmail.com>
Co-authored-by: Vincentius Roger Kuswara <vincentiusrkuswara@gmail.com>
Co-authored-by: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com>
Co-authored-by: Praharsh Bhatt <30700808+praharshbhatt@users.noreply.github.com>
Co-authored-by: Adrian Szarapow <63786007+Adee1499@users.noreply.github.com>
Co-authored-by: Hova25 <75216176+Hova25@users.noreply.github.com>
Co-authored-by: Hovannes Markarian <hovannes.markarian@socrate.fr>
Co-authored-by: Tsuki <76603360+sudongyuer@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Steve Mosley <steve@starter4ten.com>
Co-authored-by: LinYongLu <88522000+linyonglu@users.noreply.github.com>
This commit is contained in:
Junior Garcia 2025-02-28 02:14:51 -03:00 committed by GitHub
parent a06ab9babf
commit 4855a0f112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
189 changed files with 1543 additions and 243 deletions

View File

@ -54,3 +54,5 @@ export const postcssConfig = `module.exports = {
export const stylesConfig = `@tailwind base;
@tailwind components;
@tailwind utilities;`;
export const npmrcConfig = `public-hoist-pattern[]=*@heroui/*`;

View File

@ -5,7 +5,14 @@ import {useLocalStorage} from "usehooks-ts";
import {HighlightedLines} from "./types";
import {getHighlightedLines, getFileName} from "./utils";
import {stylesConfig, postcssConfig, tailwindConfig, getHtmlFile, rootFile} from "./entries";
import {
stylesConfig,
postcssConfig,
tailwindConfig,
npmrcConfig,
getHtmlFile,
rootFile,
} from "./entries";
export interface UseSandpackProps {
files?: SandpackFiles;
@ -207,6 +214,10 @@ export const useSandpack = ({
code: stylesConfig,
hidden: true,
},
".npmrc": {
code: npmrcConfig,
hidden: true,
},
},
hasTypescript,
entryFile,

View File

@ -39,7 +39,17 @@ export function useStackblitz(props: UseSandpackProps) {
typescriptStrict,
});
const transformFiles = mapKeys(filesData, (_, key) => key.replace(/^\//, ""));
// in stackblitz, npm will be used to install dependencies
// it doesn't need `public-hoist-pattern[]=*@heroui/*`
const filteredFilesData = Object.keys(filesData)
.filter((k) => k !== ".npmrc")
.reduce((o, k) => {
o[k] = filesData[k];
return o;
}, {});
const transformFiles = mapKeys(filteredFilesData, (_, key) => key.replace(/^\//, ""));
const dependencies = {...customSetup.dependencies, ...customSetup.devDependencies};

View File

@ -10,8 +10,8 @@
},
"scripts": {
"dev": "pnpm sb",
"build": "turbo build --filter=!@heroui/docs --filter=!@heroui/storybook",
"build:fast": "turbo build:fast --filter=!@heroui/docs --filter=!@heroui/storybook",
"build": "turbo build --filter='!@heroui/docs' --filter='!@heroui/storybook' --filter='!@heroui/stories-utils' --filter='!@heroui/test-utils'",
"build:fast": "turbo build:fast --filter='!@heroui/docs' --filter='!@heroui/storybook' --filter='!@heroui/stories-utils' --filter='!@heroui/test-utils'",
"dev:docs": "turbo dev --filter=@heroui/docs",
"build:docs": "turbo build --filter=@heroui/docs",
"build:docs-meta": "node ./scripts/update-index-docs.js",

View File

@ -1,5 +1,21 @@
# @heroui/accordion
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/divider@2.2.10
- @heroui/use-aria-accordion@2.2.7
- @heroui/aria-utils@2.2.12
- @heroui/dom-animation@2.1.6
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/accordion",
"version": "2.2.11",
"version": "2.2.12",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",

View File

@ -1,5 +1,24 @@
# @heroui/alert
## 2.2.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.14
### Patch Changes
- Updated dependencies []:
- @heroui/button@2.2.14
## 2.2.13
### Patch Changes

View File

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

View File

@ -1,5 +1,39 @@
# @heroui/autocomplete
## 2.3.16
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/form@2.1.14
- @heroui/input@2.4.15
- @heroui/listbox@2.3.14
- @heroui/popover@2.3.15
- @heroui/scroll-shadow@2.3.10
- @heroui/spinner@2.2.12
- @heroui/use-aria-button@2.2.9
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.3.15
### Patch Changes
- Updated dependencies [[`2186f6d`](https://github.com/heroui-inc/heroui/commit/2186f6da23679c5cf63ea03c9c6df9ca6df92ad9), [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9)]:
- @heroui/spinner@2.2.11
- @heroui/input@2.4.14
- @heroui/button@2.2.14
- @heroui/popover@2.3.14
- @heroui/form@2.1.13
- @heroui/listbox@2.3.13
- @heroui/scroll-shadow@2.3.9
## 2.3.14
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/avatar
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-image@2.1.7
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/avatar",
"version": "2.2.10",
"version": "2.2.11",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"keywords": [
"avatar"

View File

@ -1,5 +1,15 @@
# @heroui/badge
## 2.2.10
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.9
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/badge",
"version": "2.2.9",
"version": "2.2.10",
"description": "Badges are used as a small numerical value or status descriptor for UI elements.",
"keywords": [
"badge"

View File

@ -1,5 +1,16 @@
# @heroui/breadcrumbs
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/breadcrumbs",
"version": "2.2.10",
"version": "2.2.11",
"description": "Breadcrumbs display a hierarchy of links to the current page or resource in an application.",
"keywords": [
"breadcrumbs"

View File

@ -1,5 +1,26 @@
# @heroui/button
## 2.2.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/ripple@2.2.12
- @heroui/spinner@2.2.12
- @heroui/use-aria-button@2.2.9
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.14
### Patch Changes
- Updated dependencies [[`2186f6d`](https://github.com/heroui-inc/heroui/commit/2186f6da23679c5cf63ea03c9c6df9ca6df92ad9)]:
- @heroui/spinner@2.2.11
- @heroui/ripple@2.2.11
## 2.2.13
### Patch Changes

View File

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

View File

@ -1,5 +1,27 @@
# @heroui/calendar
## 2.2.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/use-aria-button@2.2.9
- @heroui/dom-animation@2.1.6
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.14
### Patch Changes
- Updated dependencies []:
- @heroui/button@2.2.14
## 2.2.13
### Patch Changes

View File

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

View File

@ -1,5 +1,17 @@
# @heroui/card
## 2.2.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/ripple@2.2.12
- @heroui/use-aria-button@2.2.9
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.13
### Patch Changes

View File

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

View File

@ -1,5 +1,25 @@
# @heroui/checkbox
## 2.3.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/use-callback-ref@2.1.6
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.13
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.13
## 2.3.12
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/chip
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/chip",
"version": "2.2.10",
"version": "2.2.11",
"description": "Chips help people enter information, make selections, filter content, or trigger actions.",
"keywords": [
"chip"

View File

@ -1,5 +1,16 @@
# @heroui/code
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system-rsc@2.3.10
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/code",
"version": "2.2.10",
"version": "2.2.11",
"description": "Code is a component used to display inline code.",
"keywords": [
"code"

View File

@ -1,5 +1,25 @@
# @heroui/date-input
## 2.3.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.13
### Patch Changes
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- Updated dependencies []:
- @heroui/form@2.1.13
## 2.3.12
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/date-input",
"version": "2.3.12",
"version": "2.3.14",
"description": "A date input allows users to enter and edit date and time values using a keyboard.",
"keywords": [
"date-field"
@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"@heroui/system": ">=2.4.7",
"@heroui/theme": ">=2.4.6",
"@heroui/system": ">=2.4.10",
"@heroui/theme": ">=2.4.9",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},

View File

@ -1,5 +1,35 @@
# @heroui/date-picker
## 2.3.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/calendar@2.2.15
- @heroui/date-input@2.3.14
- @heroui/form@2.1.14
- @heroui/popover@2.3.15
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.3.14
### Patch Changes
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- Updated dependencies [[`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9)]:
- @heroui/date-input@2.3.13
- @heroui/button@2.2.14
- @heroui/popover@2.3.14
- @heroui/calendar@2.2.14
- @heroui/form@2.1.13
## 2.3.13
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/date-picker",
"version": "2.3.13",
"version": "2.3.15",
"description": "A date picker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value.",
"keywords": [
"date-picker"
@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"@heroui/system": ">=2.4.7",
"@heroui/theme": ">=2.4.6",
"@heroui/system": ">=2.4.10",
"@heroui/theme": ">=2.4.9",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"

View File

@ -1,5 +1,16 @@
# @heroui/divider
## 2.2.10
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system-rsc@2.3.10
- @heroui/react-rsc-utils@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.9
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/divider",
"version": "2.2.9",
"version": "2.2.10",
"description": ". A separator is a visual divider between two groups of content",
"keywords": [
"divider"

View File

@ -1,5 +1,17 @@
# @heroui/drawer
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/modal@2.2.12
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

@ -1,8 +1,8 @@
# @heroui/drawer
A Quick description of the component
Used to render a content that slides in from the side of the screen.
> This is an internal utility, not intended for public usage.
Please refer to the [documentation](https://heroui.com/docs/components/drawer) for more information.
## Installation

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/drawer",
"version": "2.2.11",
"version": "2.2.12",
"description": "Used to render a content that slides in from the side of the screen.",
"keywords": [
"drawer"

View File

@ -1,5 +1,26 @@
# @heroui/dropdown
## 2.3.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/menu@2.2.14
- @heroui/popover@2.3.15
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.14
### Patch Changes
- Updated dependencies []:
- @heroui/popover@2.3.14
- @heroui/menu@2.2.13
## 2.3.13
### Patch Changes

View File

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

View File

@ -1,5 +1,24 @@
# @heroui/form
## 2.1.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system@2.4.11
- @heroui/theme@2.4.11
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.1.13
### Patch Changes
- Updated dependencies [[`2774a1b`](https://github.com/heroui-inc/heroui/commit/2774a1b3513e2a046c538a2982a438f56608bbf2)]:
- @heroui/theme@2.4.10
## 2.1.12
### Patch Changes

View File

@ -1,8 +1,8 @@
# @heroui/form
A Quick description of the component
A form is a group of inputs that allows users submit data to a server and supports field validation errors.
> This is an internal utility, not intended for public usage.
Please refer to the [documentation](https://heroui.com/docs/components/form) for more information.
## Installation

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/image
## 2.2.10
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-image@2.1.7
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.9
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/image",
"version": "2.2.9",
"version": "2.2.10",
"description": "A simple image component",
"keywords": [
"image"

View File

@ -1,5 +1,23 @@
# @heroui/input-otp
## 2.1.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.1.13
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.13
## 2.1.12
### Patch Changes

View File

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

View File

@ -1,5 +1,27 @@
# @heroui/input
## 2.4.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.4.14
### Patch Changes
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- Updated dependencies []:
- @heroui/form@2.1.13
## 2.4.13
### Patch Changes

View File

@ -300,6 +300,66 @@ describe("Input", () => {
expect(onClear).toHaveBeenCalledTimes(0);
});
it("should clear value when isClearable and pressing ESC key", async () => {
const onClear = jest.fn();
const defaultValue = "test value";
const {getByRole} = render(<Input isClearable defaultValue={defaultValue} onClear={onClear} />);
const input = getByRole("textbox") as HTMLInputElement;
expect(input.value).toBe(defaultValue);
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe("");
expect(onClear).toHaveBeenCalledTimes(1);
});
it("should not clear value when pressing ESC key if input is empty", () => {
const onClear = jest.fn();
const {getByRole} = render(<Input isClearable defaultValue="" onClear={onClear} />);
const input = getByRole("textbox");
fireEvent.keyDown(input, {key: "Escape"});
expect(onClear).not.toHaveBeenCalled();
});
it("should not clear value when pressing ESC key if input is isClearable", () => {
const defaultValue = "test value";
const {getByRole} = render(<Input defaultValue={defaultValue} />);
const input = getByRole("textbox") as HTMLInputElement;
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe("test value");
});
it("should not clear value when pressing ESC key if input is readonly", () => {
const onClear = jest.fn();
const defaultValue = "test value";
const {getByRole} = render(
<Input isClearable isReadOnly defaultValue={defaultValue} onClear={onClear} />,
);
const input = getByRole("textbox") as HTMLInputElement;
expect(input.value).toBe(defaultValue);
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe(defaultValue);
expect(onClear).not.toHaveBeenCalled();
});
});
describe("Input with React Hook Form", () => {

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/input",
"version": "2.4.13",
"version": "2.4.15",
"description": "The input component is designed for capturing user input within a text field.",
"keywords": [
"input"
@ -36,8 +36,8 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.6",
"@heroui/system": ">=2.4.7"
"@heroui/theme": ">=2.4.9",
"@heroui/system": ">=2.4.10"
},
"dependencies": {
"@heroui/form": "workspace:*",

View File

@ -352,6 +352,21 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
[slots, isLabelHovered, labelProps, classNames?.label],
);
const handleKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => {
if (
e.key === "Escape" &&
inputValue &&
(isClearable || onClear) &&
!originalProps.isReadOnly
) {
setInputValue("");
onClear?.();
}
},
[inputValue, setInputValue, onClear, isClearable, originalProps.isReadOnly],
);
const getInputProps: PropGetter = useCallback(
(props = {}) => {
return {
@ -375,6 +390,7 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
),
"aria-readonly": dataAttr(originalProps.isReadOnly),
onChange: chain(inputProps.onChange, onChange),
onKeyDown: chain(inputProps.onKeyDown, props.onKeyDown, handleKeyDown),
ref: domRef,
};
},
@ -392,6 +408,7 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
originalProps.isReadOnly,
originalProps.isRequired,
onChange,
handleKeyDown,
],
);

View File

@ -1,5 +1,16 @@
# @heroui/kbd
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system-rsc@2.3.10
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/kbd",
"version": "2.2.10",
"version": "2.2.11",
"description": "The keyboard key components indicates which key or set of keys used to execute a specificv action",
"keywords": [
"kbd"

View File

@ -1,5 +1,17 @@
# @heroui/link
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-aria-link@2.2.10
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/link",
"version": "2.2.11",
"version": "2.2.12",
"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": [
"link"

View File

@ -1,5 +1,18 @@
# @heroui/listbox
## 2.3.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/divider@2.2.10
- @heroui/use-is-mobile@2.2.7
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.13
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/listbox",
"version": "2.3.13",
"version": "2.3.14",
"description": "A listbox displays a list of options and allows a user to select one or more of them.",
"keywords": [
"listbox"

View File

@ -1,5 +1,18 @@
# @heroui/menu
## 2.2.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/divider@2.2.10
- @heroui/use-is-mobile@2.2.7
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.13
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/menu",
"version": "2.2.13",
"version": "2.2.14",
"description": "A menu displays a list of options and allows a user to select one or more of them.",
"keywords": [
"menu"

View File

@ -1,5 +1,22 @@
# @heroui/modal
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-aria-button@2.2.9
- @heroui/use-aria-modal-overlay@2.2.8
- @heroui/use-disclosure@2.2.7
- @heroui/use-draggable@2.1.7
- @heroui/dom-animation@2.1.6
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/modal",
"version": "2.2.11",
"version": "2.2.12",
"description": "Displays a dialog with a custom content that requires attention or provides additional information.",
"keywords": [
"modal"

View File

@ -1,5 +1,18 @@
# @heroui/navbar
## 2.2.13
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-scroll-position@2.1.6
- @heroui/dom-animation@2.1.6
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.12
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/navbar",
"version": "2.2.12",
"version": "2.2.13",
"description": "A responsive navigation header positioned on top side of your page that includes support for branding, links, navigation, collapse and more.",
"keywords": [
"navbar"

View File

@ -1,5 +1,31 @@
# @heroui/number-input
## 2.0.5
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/form@2.1.14
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.0.4
### Patch Changes
- [#4907](https://github.com/heroui-inc/heroui/pull/4907) [`f55cf8b`](https://github.com/heroui-inc/heroui/commit/f55cf8bc7f3f1b2ebcded14f5f008ccfe8c4892c) Thanks [@wingkwong](https://github.com/wingkwong)! - handle onChange event in number input (#4874)
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- Updated dependencies []:
- @heroui/button@2.2.14
- @heroui/form@2.1.13
## 2.0.3
### Patch Changes

View File

@ -240,6 +240,91 @@ describe("NumberInput", () => {
expect(stepperButton).toBeNull();
});
it("should clear value when isClearable and pressing ESC key", async () => {
const onClear = jest.fn();
const defaultValue = 12;
const {container} = render(
<NumberInput isClearable defaultValue={defaultValue} onClear={onClear} />,
);
const input = container.querySelector("input") as HTMLInputElement;
expect(input.value).toBe(defaultValue.toString());
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe("");
expect(onClear).toHaveBeenCalledTimes(1);
});
it("should not clear value when pressing ESC key if input is empty", () => {
const onClear = jest.fn();
const {container} = render(<NumberInput isClearable onClear={onClear} />);
const input = container.querySelector("input") as HTMLInputElement;
fireEvent.keyDown(input, {key: "Escape"});
expect(onClear).not.toHaveBeenCalled();
});
it("should not clear value when pressing ESC key without isClearable", () => {
const defaultValue = 12;
const {container} = render(<NumberInput defaultValue={defaultValue} />);
const input = container.querySelector("input") as HTMLInputElement;
expect(input.value).toBe(defaultValue.toString());
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe(defaultValue.toString());
});
it("should not clear value when pressing ESC key if input is readonly", () => {
const onClear = jest.fn();
const defaultValue = 42;
const {container} = render(<NumberInput isReadOnly defaultValue={defaultValue} />);
const input = container.querySelector("input") as HTMLInputElement;
expect(input.value).toBe(defaultValue.toString());
fireEvent.keyDown(input, {key: "Escape"});
expect(input.value).toBe(defaultValue.toString());
expect(onClear).not.toHaveBeenCalled();
});
it("should emit onChange", async () => {
const onChange = jest.fn();
const {container} = render(<NumberInput label="test number input" onChange={onChange} />);
const input = container.querySelector("input") as HTMLInputElement;
await user.click(input);
await user.keyboard("1024");
expect(onChange).toHaveBeenCalledTimes(4);
});
it("should emit onChange with keyboard up & down key", async () => {
const onChange = jest.fn();
const {container} = render(<NumberInput label="test number input" onChange={onChange} />);
const input = container.querySelector("input") as HTMLInputElement;
await user.click(input);
await user.keyboard("[ArrowUp]");
await user.keyboard("[ArrowUp]");
expect(onChange).toHaveBeenCalledTimes(2);
await user.keyboard("[ArrowDown]");
expect(onChange).toHaveBeenCalledTimes(3);
});
});
describe("NumberInput with React Hook Form", () => {
@ -503,7 +588,6 @@ describe("NumberInput with React Hook Form", () => {
await user.tab();
await user.keyboard("1234");
await user.tab();
});
});
});

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/number-input",
"version": "2.0.3",
"version": "2.0.5",
"description": "The numeric input component is designed for users to enter a number, and increase or decrease the value using stepper buttons",
"keywords": [
"input",
@ -38,8 +38,8 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.6",
"@heroui/system": ">=2.4.7"
"@heroui/system": ">=2.4.10",
"@heroui/theme": ">=2.4.9"
},
"dependencies": {
"@heroui/form": "workspace:*",

View File

@ -136,7 +136,7 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
...originalProps,
validationBehavior,
locale,
onChange: onValueChange,
onChange: chain(onValueChange, onChange),
});
const {
@ -239,6 +239,21 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
[objectToDeps(variantProps), isInvalid, isClearable, hasStartContent, disableAnimation],
);
const handleKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => {
if (
e.key === "Escape" &&
inputValue &&
(isClearable || onClear) &&
!originalProps.isReadOnly
) {
state.setInputValue("");
onClear?.();
}
},
[inputValue, state.setInputValue, onClear, isClearable, originalProps.isReadOnly],
);
const getBaseProps: PropGetter = useCallback(
(props = {}) => {
return {
@ -324,6 +339,7 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
),
"aria-readonly": dataAttr(originalProps.isReadOnly),
onChange: chain(inputProps.onChange, onChange),
onKeyDown: chain(inputProps.onKeyDown, props.onKeyDown, handleKeyDown),
ref: domRef,
};
},
@ -339,6 +355,7 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
originalProps.isReadOnly,
originalProps.isRequired,
onChange,
handleKeyDown,
],
);

View File

@ -1,5 +1,18 @@
# @heroui/pagination
## 2.2.13
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-intersection-observer@2.2.7
- @heroui/use-pagination@2.2.8
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.12
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/pagination",
"version": "2.2.12",
"version": "2.2.13",
"description": "The Pagination component allows you to display active page and navigate between multiple pages.",
"keywords": [
"pagination"

View File

@ -1,5 +1,28 @@
# @heroui/popover
## 2.3.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/use-aria-button@2.2.9
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/aria-utils@2.2.12
- @heroui/dom-animation@2.1.6
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.14
### Patch Changes
- Updated dependencies []:
- @heroui/button@2.2.14
## 2.3.13
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/progress
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-is-mounted@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/progress",
"version": "2.2.10",
"version": "2.2.11",
"description": "Progress bars show either determinate or indeterminate progress of an operation over time.",
"keywords": [
"progress"

View File

@ -1,5 +1,23 @@
# @heroui/radio
## 2.3.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.13
### Patch Changes
- Updated dependencies []:
- @heroui/form@2.1.13
## 2.3.12
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/ripple
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/dom-animation@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/scroll-shadow
## 2.3.10
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-data-scroll-overflow@2.2.7
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.3.9
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/scroll-shadow",
"version": "2.3.9",
"version": "2.3.10",
"description": "A component that applies top and bottom shadows when content overflows on scroll.",
"keywords": [
"scroll-shadow"

View File

@ -1,5 +1,40 @@
# @heroui/select
## 2.4.15
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/form@2.1.14
- @heroui/listbox@2.3.14
- @heroui/popover@2.3.15
- @heroui/scroll-shadow@2.3.10
- @heroui/spinner@2.2.12
- @heroui/use-aria-button@2.2.9
- @heroui/use-aria-multiselect@2.4.8
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/aria-utils@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.4.14
### Patch Changes
- [#4854](https://github.com/heroui-inc/heroui/pull/4854) [`989cbe1`](https://github.com/heroui-inc/heroui/commit/989cbe1eb0eb42c0c718b67f08b8db1c8721ba7f) Thanks [@smozely](https://github.com/smozely)! - Pass form prop to hidden-select
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- Updated dependencies [[`2186f6d`](https://github.com/heroui-inc/heroui/commit/2186f6da23679c5cf63ea03c9c6df9ca6df92ad9)]:
- @heroui/spinner@2.2.11
- @heroui/popover@2.3.14
- @heroui/form@2.1.13
- @heroui/listbox@2.3.13
- @heroui/scroll-shadow@2.3.9
## 2.4.13
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/select",
"version": "2.4.13",
"version": "2.4.15",
"description": "A select displays a collapsible list of options and allows a user to select one of them.",
"keywords": [
"select"
@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"@heroui/system": ">=2.4.7",
"@heroui/theme": ">=2.4.6",
"@heroui/system": ">=2.4.10",
"@heroui/theme": ">=2.4.9",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"

View File

@ -68,6 +68,7 @@ export function useHiddenSelect<T>(
isDisabled = data.isDisabled,
selectionMode,
onChange,
form,
} = props;
let {validationBehavior, isRequired, isInvalid} = data;
let {visuallyHiddenProps} = useVisuallyHidden();
@ -92,6 +93,7 @@ export function useHiddenSelect<T>(
style: {display: "none"},
},
selectProps: {
form,
autoComplete,
disabled: isDisabled,
"aria-invalid": isInvalid || undefined,
@ -117,7 +119,7 @@ export function useHiddenSelect<T>(
* form autofill, mobile form navigation, and native form submission.
*/
export function HiddenSelect<T>(props: HiddenSelectProps<T>) {
let {state, triggerRef, selectRef, label, name, isDisabled} = props;
let {state, triggerRef, selectRef, label, name, isDisabled, form} = props;
let {containerProps, selectProps} = useHiddenSelect({...props, selectRef}, state, triggerRef);
@ -151,6 +153,7 @@ export function HiddenSelect<T>(props: HiddenSelectProps<T>) {
<input
autoComplete={selectProps.autoComplete}
disabled={isDisabled}
form={form}
name={name}
type="hidden"
value={[...state.selectedKeys].join(",") ?? ""}

View File

@ -493,6 +493,7 @@ export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
isRequired: originalProps?.isRequired,
autoComplete: originalProps?.autoComplete,
isDisabled: originalProps?.isDisabled,
form: originalProps?.form,
onChange,
...props,
} as HiddenSelectProps<T>),

View File

@ -1,5 +1,15 @@
# @heroui/skeleton
## 2.2.10
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.9
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/slider
## 2.4.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/tooltip@2.2.12
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.4.11
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/slider",
"version": "2.4.11",
"version": "2.4.12",
"description": "A slider allows a user to select one or more values within a range.",
"keywords": [
"slider"

View File

@ -1,5 +1,27 @@
# @heroui/snippet
## 2.2.16
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/button@2.2.15
- @heroui/tooltip@2.2.12
- @heroui/use-clipboard@2.1.7
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.15
### Patch Changes
- Updated dependencies []:
- @heroui/button@2.2.14
- @heroui/tooltip@2.2.11
## 2.2.14
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @heroui/spacer
## 2.2.11
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system-rsc@2.3.10
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.10
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/spacer",
"version": "2.2.10",
"version": "2.2.11",
"description": "A flexible spacer component designed to create consistent spacing and maintain alignment in your layout.",
"keywords": [
"spacer"

View File

@ -1,5 +1,26 @@
# @heroui/spinner
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/system@2.4.11
- @heroui/system-rsc@2.3.10
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes
- [#4904](https://github.com/heroui-inc/heroui/pull/4904) [`2186f6d`](https://github.com/heroui-inc/heroui/commit/2186f6da23679c5cf63ea03c9c6df9ca6df92ad9) Thanks [@wingkwong](https://github.com/wingkwong)! - add `use client` directive in tsup (#4903)
- Updated dependencies []:
- @heroui/system-rsc@2.3.9
## 2.2.10
### Patch Changes

View File

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

View File

@ -4,4 +4,5 @@ export default defineConfig({
clean: true,
target: "es2019",
format: ["cjs", "esm"],
banner: {js: '"use client";'},
});

View File

@ -1,5 +1,16 @@
# @heroui/switch
## 2.2.13
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-safe-layout-effect@2.1.6
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.12
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/switch",
"version": "2.2.12",
"version": "2.2.13",
"description": "A switch is similar to a checkbox, but represents on/off values as opposed to selection.",
"keywords": [
"switch"

View File

@ -1,5 +1,26 @@
# @heroui/table
## 2.2.14
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/checkbox@2.3.14
- @heroui/spacer@2.2.11
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.2.13
### Patch Changes
- Updated dependencies []:
- @heroui/checkbox@2.3.13
- @heroui/spacer@2.2.10
## 2.2.12
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@heroui/table",
"version": "2.2.12",
"version": "2.2.14",
"description": "Tables are used to display tabular data using rows and columns. ",
"keywords": [
"table"

View File

@ -1,5 +1,19 @@
# @heroui/tabs
## 2.2.12
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/use-is-mounted@2.1.6
- @heroui/use-update-effect@2.1.6
- @heroui/aria-utils@2.2.12
- @heroui/framer-utils@2.1.11
- @heroui/react-utils@2.1.8
- @heroui/shared-utils@2.1.7
## 2.2.11
### Patch Changes

View File

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

View File

@ -1,5 +1,32 @@
# @heroui/toast
## 2.0.5
### Patch Changes
- v2.7.4
- Updated dependencies []:
- @heroui/spinner@2.2.12
- @heroui/use-is-mobile@2.2.7
- @heroui/react-utils@2.1.8
- @heroui/shared-icons@2.1.6
- @heroui/shared-utils@2.1.7
## 2.0.4
### Patch Changes
- [#4901](https://github.com/heroui-inc/heroui/pull/4901) [`09a2b73`](https://github.com/heroui-inc/heroui/commit/09a2b7387056e176417404dbf7edb4cfb8c880a9) Thanks [@wingkwong](https://github.com/wingkwong)! - update peerDependencies (#4901)
- [#4881](https://github.com/heroui-inc/heroui/pull/4881) [`29df4f5`](https://github.com/heroui-inc/heroui/commit/29df4f531756daf84d2334926d193715fefeb428) Thanks [@macci001](https://github.com/macci001)! - fixing maxVisibleToast functionality in toast (#4870)
For promises, starting the timer only after the promise is resolved
- [#4858](https://github.com/heroui-inc/heroui/pull/4858) [`fd446da`](https://github.com/heroui-inc/heroui/commit/fd446dac2ac2af56f287a6b23c5baaea79ec3979) Thanks [@wingkwong](https://github.com/wingkwong)! - fix shouldShowTimeoutProgess typo (#4856)
- Updated dependencies [[`2186f6d`](https://github.com/heroui-inc/heroui/commit/2186f6da23679c5cf63ea03c9c6df9ca6df92ad9)]:
- @heroui/spinner@2.2.11
## 2.0.3
### Patch Changes

Some files were not shown because too many files have changed in this diff Show More