* feat(dropdown): add "should respect closeOnSelect setting of DropdownItem (dynamic)"
* chore(changeset): add changeset
* fix(dropdown): find is not function error when click dropdown item (#3763)
* fix: find is not function error when click dropdown item
* fix: find is not function error when click dropdown item
* fix: type error
* fix: optimization
* refactor(dropdown): must have return value
* chore(changeset): revise changeset
---------
Co-authored-by: winches <329487092@qq.com>
* fix(theme): apply nested group for checkbox
* fix(theme): apply nested group for autocomplete
* fix(theme): apply nested group for select
* fix(theme): apply nested group for toggle
* fix(theme): apply nested group for radio
* fix(theme): apply nested group for input
* fix(theme): apply nested group for datepicker
* fix(theme): apply nested group for dateinput
* chore(changeset): add changeset
* chore(changeset): add issue number
* chore(theme): format code
* feat(table): add TableWithSwitch
* fix(modal): set the min-height of base height to 100dvh where size equals "full"
* chore(changeset): add changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix: use accessible text colors for flat variant
* fix: use accessible text colors for flat variant
* chore(changeset): update changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
In the documentation on the custom item the type PaginationItemRenderProps is represented with a generic but in the implementation it doesn't receive a generic type.
* fix(select): resolving color descrepancy in select
* fix(select): making the changes accroding to the asked design
* chore(changeset): revise message
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(autocomplete): hide clear button with `visibility: hidden`
* fix(autocomplete): clear button pointer-events
* refactor(autocomplete): improve keyboard reopen issue on mobile
* chore: add changeset
* refactor(autocomplete): apply chain and add type to e
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(select): prevent select from closing instantly when clicking on label
* fix(select): flickering on label click
* fix(select): flickering while click on label
* fix(select): add changeset on fixing the flickering model issue
* chore(changeset): revise changeset message and add issue number
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(docs): added ts example for infinite pagination
* fix(docs): changed the condition of showOpenInCodeSandbox in CodeDemo
* chore(docs): add bun command
* chore(docs): add bun command
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* Support default configuration export
Conveniently available for developers to modify from the default configuration
* chore(changeset): add changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(calendar): #3641,#3642 add order and row-reverse to arrows for rtl layout support
* chore(changeset): patch @nextui-org/calendar
* chore(changeset): add missing package and revise changeset message
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* feat(docs): added tanstack router to the routing section in the documentation
* fix: updated the TanStack Router example by following RA example
* fix: updated the documentation wordings
* chore(docs): update highlighted row numbers
---------
Co-authored-by: HaRuki Kuriwada <haruki.kuriwada@hennge.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(navbar): allow height prop to accept number type and fix broken menu
* fix(navbar): menu breaking when a numerical height value is provided. changeset
* fix(table): sortable header slow color change during theme change
* chore(changeset): add space
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(status): normalize 'status' value to lowercase in page.tsx
* fix(status): normalize 'status' value to lowercase in use-case.ts
* fix(status): normalize 'status' value to lowercase in custom-render-value.ts
* fix(status): normalize 'status' value to lowercase in top-content.ts
* fix(status): normalize 'status' value to lowercase in multiple-chips.ts
* fix(status): normalize 'status' value to lowercase in custom-items.ts
* fix(status): normalize 'status' value to lowercase in data.ts
* fix(status): normalize 'status' value to lowercase in custom-styles.ts
* fix(status): normalize 'status' value to lowercase in page.tsx
* fix(status): normalize 'status' value to lowercase in custom-styles.ts
* fix(status): normalize 'status' value to lowercase in custom-items.ts
* fix(status): normalize 'status' value to lowercase in page.tsx
* fix(status): normalize 'status' value to lowercase in custom-styles.ts
* Update highlighted line numbers in Remix examples
* Update highlighted line numbers in Next.js examples
* Update highlighted line numbers in Astro examples
* Update highlighted line numbers in Vite examples
* Adjust highlighted line number
* Adjust highlighted line number
* fix(input): fixed the background change on autofill in Chrome
* fix(input): fixed the background change on autofill in Chrome
* chore(changeset): add issue number
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix: prevent year, month change error in showMonthAndYearPickers mode
* docs: add changeset
* docs: edit changeset
* test: add test code about date clear issue in date picker
* test: update test code
* test: check application aria is same with current date
* chore(changeset): revise package and add issue number
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(popover): close popover on scroll
* feat(popover): add "should close popover on scroll" test
* feat(changeset): add changeset
* feat(select): add ScrollableContainerTemplate
* fix(calendar): disable button picker in calendar if `isDisabled` is true
* feat(changeset): add changeset
* feat(calendar): add test to cover showMonthAndYearPickers with isDisabled
* feat(select): add test
* fix(select): use domRef in ariaShouldCloseOnInteractOutside
* feat(changeset): add changeset
* fix(select): rewrite "should unset form value" test
* fix(date-picker): update calendar classNames in useDateRangePicker
* feat(docs): include custom styles in date-range-picker docs
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* feat(date-picker): add support for DatePicker to apply styles to DateInput
* chore: update changeset
* docs(date-picker): add dateInputClassNames props
* fix(input): input display with hidden type
* chore(input): add isHiddenType to dependency
* refactor(input): move the styles to theme and change hidden to data attr
* feat(theme): add isHiddenType to input
* chore(changeset): include theme package
* chore(input): revise input test
* fix(theme): remove isHiddenType from variants and use data-hidden prop instead
* fix(theme): remove isHiddenType from defaultVariants
* fix(input): remove isHiddenType passing to input
* chore(root): reat-aria packages updated (#2889)
* chore(storybook): common colors enabled (#2902)
* fix(range-calendar): hide only dates outside the month (#2906)
* fix(range-calendar): hide only dates outside the month #2890
* fix(range-calendar): corrected spelling mistake in changeset description
* fix(range-calendar): corrected capitalization in changeset description
* chore(changeset): patch @nextui-org/theme
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(date-picker): keep date picker style consistent for different variants (#2908)
* fix: add missing TableRowProps export (#2866)
* fix: add missing TableRowProps export
* feat(changeset): add changeset for PR2866
* chore(changeset): revise changeset message
---------
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(input): correct label margin for RTL required inputs (#2781)
* fix(input): correct label margin for RTL required inputs
* fix(theme): add changeset fr theme
* docs(core): add storybook and canary release info (#2914)
* Cn utility refactor (#2915)
* refactor(core): cn utility adjusted and moved to the theme package
* chore(root): changeset
* fix(storybook): stories that used cn
* docs(date-picker): change to jsx instead (#2919)
* fix(switch): support uncontrolled switch in react-hook-form (#2924)
* feat(switch): add @nextui-org/use-safe-layout-effect
* chore(deps): add @nextui-org/use-safe-layout-effect
* fix(switch): react-hook-form uncontrolled switch component
* fix(switch): react-hook-form uncontrolled switch component
* feat(switch): add rect-hook-form in dev dep
* feat(switch): add WithReactHookFormTemplate
* refactor(root): react aria packages fixed (#2944)
* feat(docs): docs changes (#2868)
* feat(docs): add example how to set locale (#2867)
* docs(guide): add an explanation for the installation guide (#2769)
* docs(guide): add an explanation for the installation guide
* docs(guide): add an explanation for the cli guide
* docs(guide): add support for cli output
* fix: change sort priority - cmdk (#2873)
* docs: remove unsupported props in range calendar and date range picker (#2881)
* chore(calendar): remove showMonthAndYearPickers from range calendar story
* docs(date-range-picker): remove showMonthAndYearPickers info
* docs(range-calendar): remove unsupported props
* docs: refactor typing in form.ts (#2882)
* chore(docs): supplement errorMessage behaviour in input (#2892)
* refactor(docs): revise NextUI Provider structure
* chore(docs): add updated tag
---------
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
* fix(slider): missing marks when hideThumb is true & revise slider styles (#2883)
* chore(slider): include marks in hideThumb
* fix(slider): revise slider styles
* feat(changeset): add changeset
* feat(slider): add tests with marks and hideThumb
* feat(test): react hook form tests & stories (#2931)
* feat(input): add Input with React Hook Form tests
* refactor(input): add missing types
* feat(checkbox): add checkbox with React Hook Form tests
* feat(select): add react-hook-form to dev dep
* feat(select): add react hook form story
* feat(select): react hook form tests
* fix(select): incorrect button reference
* feat(deps): add react-hook-form to dev dep in autocomplete
* feat(autocomplete): react hook form story
* feat(autocomplete): react hook form tests
* fix(autocomplete): rollback wrapper type
* feat(switch): add react hook form tests
* refactor(stories): reorder stories items
* fix: update accordion item heading tag to be customizable (#2265)
* fix: update accordion item heading tag to be customizable
* Update .changeset/heavy-hairs-join.md
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* Update .changeset/heavy-hairs-join.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore(accordion): lint
* chore(changeset): add issue number
* feat(docs): add HeadingComponent prop
---------
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(theme): add pointer-events-none to skeleton base (#2972)
* feat(tabs): add `destroyInactiveTabPanel` prop for Tabs component (#2973)
* feat(tabs): add destroyInactiveTabPanel and set default to false
* feat(tabs): integrate with destroyInactiveTabPanel
* feat(theme): hidden inert tab panel
* feat(changeset): add changeset
* chore(changeset): add issue number
* feat(docs): add `destroyInactiveTabPanel` prop to tabs page
* chore(docs): set destroyInactiveTabPanel to true by default
* chore(tabs): set destroyInactiveTabPanel to true by default
* chore(tabs): revise destroyInactiveTabPanel logic
* feat(tabs): add tests for destroyInactiveTabPanel
* chore(tabs): change the default value of destroyInactiveTabPanel to true
* refactor: add support for disabling the animation globally (#2929)
* refactor: add support for disabling the animation globally
* chore(docs): disableAnimation removed from global provider
* feat(docs): nextui provider api updated, storybook preview adjusted
* chore(theme): button is scalable when disabled, tooltip animation improved
* fix(theme): remove origin-bottom from button (#2990)
* fix(skeleton): overflow issue in skeleton (#2986)
* fix(theme): set overflow visible after skeleton loaded
* feat(changeset): add changeset
* fix(table): v2 input/textarea don't allow spaces inside a table (#3020)
* fix(table): set onKeyDownCapture to undefined
* feat(changeset): add changeset
* fix(slider): calculate the correct value on mark click (#3017)
* fix(slider): calculate the correct value on mark click
* refactor(slider): remove the tests inside describe block
* feat(slider): add tests for thumb move on mark click
* refactor(slider): use val instead of pos
* fix(theme): revise input isInvalid styles (#3010)
* fix(theme): revise isInvalid input styles
* feat(changeset): add changeset
* feat(date-picker): add missing ref to input wrapper (#3011)
* fix(date-picker): add missing ref to input wrapper
* feat(changeset): add changeset
* fix(core): incorrect tailwind classnames (#3018)
* fix(dropdown): focus behaviour on press / enter keydown (#2970)
* fix(dropdown): set focus on the first item
* feat(dropdown): add keyboard interactions tests
* feat(changeset): add changeset
* fix(dropdown): use fireEvent.keyDown instead
* chore(deps): add @nextui-org/test-utils to dropdown
* refactor(dropdown): pass onKeyDown to menu trigger and don't hardcode autoFocus
* chore(dropdown): remove autoFocus
* fix(menu): pass userMenuProps to useTreeState and useAriaMenu and remove from getListProps
* chore(changeset): add menu package
* fix(component): update type definition to prevent primitive values as items (#2953)
* fix: update type definition to prevent primitive values as items
* fix: typecheck
* fix(select): onSelectionChange can handle number (#2937)
* fix: onSelectionChange type for dynamic items in Select component
* docs: remove unnecessary properties
* docs: update highlightedLines
* chore: add changeset
* fix(calendar): scrolling is hidden when changing the month (#2949)
* fix(calendar): scrolling is hidden when changing the month
* chore(changeset): correct package name
---------
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix: make VisuallyHidden's element type as span when it's inside phrasing element (#3013)
* fix(checkbox): make VisuallyHidden's element type as span
* feat(changeset): add changeset
* fix(radio): make the VisuallyHidden element type as span
* fix(switch): make the VisuallyHidden element type as span
* fix(select): make the VisuallyHidden element type as span
* feat(changeset): replace changeset
* chore: fix formatting
* docs: sync nextui-cli api (#3035)
* docs: sync nextui-cli api
* docs: update
* chore: update routes.json with new path and set updated flag
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* feat: switch default validationBehavior to aria and allow switching via props (#2987)
* chore: add support validationBehavior aria
* chore: add validationBehavior to Provider
* chore: add autocomplete validation test
* chore: add checkbox validation test
* fix(input): require condition
* docs: add description of validationBehavior props
* chore: add support validationBehavior props for date components
* docs(dates): add description of validationBehavior props
* chore: add changeset
* chore: format
* chore: fix test
* fix: select validationBehavior is not support yet
* fix: select validationBehavior not supported yet
* chore(docs): validation behavior prop added to nextui-provider
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix: popover-based focus behaviour (#2854)
* fix(autocomplete): autocomplete focus behaviour
* feat(autocomplete): add test case for catching blur cases
* refactor(autocomplete): use isOpen instead
* feat(autocomplete): add "should focus when clicking autocomplete" test case
* feat(autocomplete): add should set the input after selection
* fix(autocomplete): remove shouldUseVirtualFocus
* fix(autocomplete): uncomment blur logic
* refactor(autocomplete): remove state as it is in getPopoverProps
* refactor(autocomplete): remove unnecessary blur
* refactor(select): remove unncessary props
* fix(popover): use domRef instead
* fix(popover): revise isNonModal and isDismissable
* fix(popover): use dialogRef back
* fix(popover): rollback
* fix(autocomplete): onFocus logic
* feat(popover): set disableFocusManagement to overlay
* feat(modal): set disableFocusManagement to overlay
* fix(autocomplete): set disableFocusManagement for autocomplete
* feat(popover): include disableFocusManagement prop
* refactor(autocomplete): revise type in selectorButton
* fix(autocomplete): revise focus logic
* feat(autocomplete): add internal focus state and add shouldCloseOnInteractOutside
* feat(autocomplete): handle selectedItem change
* feat(autocomplete): add clear button test
* feat(changeset): add changeset
* refactor(components): use the original order
* refactor(autocomplete): add more comments
* fix(autocomplete): revise focus behaviours
* refactor(autocomplete): rename to listbox
* chore(popover): remove disableFocusManagement from popover
* chore(autocomplete): remove disableFocusManagement from autocomplete
* chore(changeset): add issue number
* fix(popover): don't set default value to transformOrigin
* fix(autocomplete): revise shouldCloseOnInteractOutside logic
* feat(autocomplete): should close listbox by clicking another autocomplete
* fix(popover): add disableFocusManagement to overlay
* refactor(autocomplete): revise comments and refactor shouldCloseOnInteractOutside
* feat(changeset): add issue number
* fix(autocomplete): merge with selectorButtonProps.onClick
* refactor(autocomplete): remove extra line
* refactor(autocomplete): revise comment
* feat(select): add shouldCloseOnInteractOutside
* feat(dropdown): add shouldCloseOnInteractOutside
* feat(date-picker): add shouldCloseOnInteractOutside
* feat(changeset): add dropdown and date-picker
* fix(popover): revise shouldCloseOnInteractOutside
* feat(date-picker): integrate with ariaShouldCloseOnInteractOutside
* feat(select): integrate with ariaShouldCloseOnInteractOutside
* feat(dropdown): integrate with ariaShouldCloseOnInteractOutside
* feat(popover): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): ariaShouldCloseOnInteractOutside
* chore(deps): update pnpm-lock.yaml
* feat(autocomplete): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): handle setShouldFocus logic
* feat(changeset): add @nextui-org/aria-utils
* chore(autocomplete): put the test into correct group
* feat(select): should close listbox by clicking another select
* feat(dropdown): should close listbox by clicking another dropdown
* feat(popover): should close listbox by clicking another popover
* feat(date-picker): should close listbox by clicking another datepicker
* chore(changeset): add issue numbers and revise changeset message
* refactor(autocomplete): change to useRef instead
* refactor(autocomplete): change to useRef instead
* refactor(aria-utils): revise comments and format code
* chore(changeset): add issue number
* chore: take popoverProps.shouldCloseOnInteractOutside first
* refactor(autocomplete): remove unnecessary logic
* refactor(autocomplete): focus management logic
* fix(components): Fix 'Tap to click' behavior on macOS with Edge/Chrome for Accordion and Tab (#2725)
* fix(components): fix 'Tap to click' behavior on macOS
* Add change file for accordion, menu, and tabs
* Remove 'fix(components)' from the .changeset file
* fix(components): undo dropdown change now that it's no longer applicable
* fix(components): update changeset file now that we are no longer modifying the dropdown component
* fix(date-picker): corrected inert value for true condition (#3054)
* fix(date-picker): corrected inert value for true condition #3044
* refactor(calendar): add todo comment
* feat(changeset): add changeset
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(hooks): resolve type error in onKeyDown event handler (#3064)
* fix(hooks): resolve type error in onKeyDown event handler
* chore(changeset): revise changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* Update dependency array on setPage useCallback hook (#3029)
Changes:
Add the onChangeActivePage function to the dependency array of the setPage useCallback hook to ensure it always reflects the latest state.
Impact:
This fix ensures that the pagination component accurately reflects the current state when triggering onChangeActivePage.
* fix: error peerDep in pkg (#3014)
* fix: error peerDep in pkg
* docs: changeset
* Fix DatePicker Time Input (#2845)
* fix(date-picker): set `isCalendarHeaderExpanded` to `false` when DatePicker is closed
* fix(date-picker): calendar header controlled state on DatePicker
* chore(date-picker): update test
* chore(date-picker): remove unnecessary `async` in test
* Update packages/components/date-picker/__tests__/date-picker.test.tsx
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(date-picker): test
* fix(hooks): optimize useScrollPosition with useCallback and useRef (#3049)
* fix(hooks): optimize useScrollPosition with useCallback and useRef
* Update .changeset/lucky-cobras-jog.md
* Update packages/hooks/use-scroll-position/src/index.ts
* Update packages/hooks/use-scroll-position/src/index.ts
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(select): placeholder text display for controlled component (#3081)
* fix: return placeholder when selectedItems is empty
* chore: add test and changeset
* chore(docs): v2.4.0 (#3084)
* chore(docs): v2.4.0
* chore(docs): v2.4.0 blog
* chore(docs): revise typos based on coderabbitai
* chore(docs): adjust navbar
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* chore(changese): update @nextui-org/react dependency to minor version
* docs: update cli docs (#3096)
* ci(changesets): version packages (#2903)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(radio): remove required attribute for Radio with validationBehavior="aria" (#3110)
* fix(theme): add missing pointer event after data loaded (#3126)
* fix(system): listbox href issue (experimental) (#3119)
* fix(system): @react-aria/utils
* feat(hooks): include routerLinkProps
* feat(changeset): add changeset
* chore(deps): bump @react-aria/utils to 3.24.1
* fix(hooks): missing arguments
* chore(deps): bump @react-types/link
* chore(link): bump @react-aria/link to 3.7.1
* chore(link): use @react-aria/link instead
* chore(changeset): revise changeset
* chore(hooks): undo use-aria-link changes
* chore(deps): undo use-aria-link changes
* chore(deps): bump `@react-aria/utils` to `3.24.1`
* chore(deps): bump `@react-types/shared`
* feat: add missing router.open parameters due to router change
* chore(changeset): add new line
* chore(deps): bump `@react-types/shared` to `3.23.1`
* fix(avatar): avoid passing `disableAnimation` prop to a DOM element (#3111)
* fix(avatar): avoid passing `disableAnimation` prop to a DOM element
* refactor(avatar): use filterDOMProps approach
* chore(avatar): remove to type import
* chore(avatar): change to shouldFilterDOMProps
* fix(docs): removed unused import & corrected prop for disabled DatePicker (#3136)
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
* ci(changesets): version packages (#3115)
* fix(pagination): missing animation (#3144)
* fix tsup domain (#3158)
* chore(docs): remove destroyInactiveTabPanel from Tab due to merge conflict (#3155)
* fix(autocomplete): maximum update depth exceeded in autocomplete (#3175)
* docs: installation update init description
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: Shrinidhi Upadhyaya <shrinidhiupadhyaya1195@gmail.com>
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
Co-authored-by: Paul Tiedtke <PaulTiedtke@web.de>
Co-authored-by: Mohammad Reza Badri <85818966+mrbadri@users.noreply.github.com>
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
Co-authored-by: Shawn Dong <dsknight@live.com.au>
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com>
Co-authored-by: Poli Sour <57824881+novsource@users.noreply.github.com>
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: Artem Pitikin <git@kosmotema.dev>
Co-authored-by: Eric Abreu <ericfabreu@gmail.com>
Co-authored-by: Minsu <52266597+Gaic4o@users.noreply.github.com>
Co-authored-by: Jesus Perdomo Lampignano <38929969+jesuzon@users.noreply.github.com>
Co-authored-by: chirokas <157580465+chirokas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: EGOIST <0x142857@gmail.com>
* chore(root): reat-aria packages updated (#2889)
* chore(storybook): common colors enabled (#2902)
* fix(range-calendar): hide only dates outside the month (#2906)
* fix(range-calendar): hide only dates outside the month #2890
* fix(range-calendar): corrected spelling mistake in changeset description
* fix(range-calendar): corrected capitalization in changeset description
* chore(changeset): patch @nextui-org/theme
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(date-picker): keep date picker style consistent for different variants (#2908)
* fix: add missing TableRowProps export (#2866)
* fix: add missing TableRowProps export
* feat(changeset): add changeset for PR2866
* chore(changeset): revise changeset message
---------
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(input): correct label margin for RTL required inputs (#2781)
* fix(input): correct label margin for RTL required inputs
* fix(theme): add changeset fr theme
* docs(core): add storybook and canary release info (#2914)
* Cn utility refactor (#2915)
* refactor(core): cn utility adjusted and moved to the theme package
* chore(root): changeset
* fix(storybook): stories that used cn
* docs(date-picker): change to jsx instead (#2919)
* fix(switch): support uncontrolled switch in react-hook-form (#2924)
* feat(switch): add @nextui-org/use-safe-layout-effect
* chore(deps): add @nextui-org/use-safe-layout-effect
* fix(switch): react-hook-form uncontrolled switch component
* fix(switch): react-hook-form uncontrolled switch component
* feat(switch): add rect-hook-form in dev dep
* feat(switch): add WithReactHookFormTemplate
* refactor(root): react aria packages fixed (#2944)
* feat(docs): docs changes (#2868)
* feat(docs): add example how to set locale (#2867)
* docs(guide): add an explanation for the installation guide (#2769)
* docs(guide): add an explanation for the installation guide
* docs(guide): add an explanation for the cli guide
* docs(guide): add support for cli output
* fix: change sort priority - cmdk (#2873)
* docs: remove unsupported props in range calendar and date range picker (#2881)
* chore(calendar): remove showMonthAndYearPickers from range calendar story
* docs(date-range-picker): remove showMonthAndYearPickers info
* docs(range-calendar): remove unsupported props
* docs: refactor typing in form.ts (#2882)
* chore(docs): supplement errorMessage behaviour in input (#2892)
* refactor(docs): revise NextUI Provider structure
* chore(docs): add updated tag
---------
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
* fix(slider): missing marks when hideThumb is true & revise slider styles (#2883)
* chore(slider): include marks in hideThumb
* fix(slider): revise slider styles
* feat(changeset): add changeset
* feat(slider): add tests with marks and hideThumb
* feat(test): react hook form tests & stories (#2931)
* feat(input): add Input with React Hook Form tests
* refactor(input): add missing types
* feat(checkbox): add checkbox with React Hook Form tests
* feat(select): add react-hook-form to dev dep
* feat(select): add react hook form story
* feat(select): react hook form tests
* fix(select): incorrect button reference
* feat(deps): add react-hook-form to dev dep in autocomplete
* feat(autocomplete): react hook form story
* feat(autocomplete): react hook form tests
* fix(autocomplete): rollback wrapper type
* feat(switch): add react hook form tests
* refactor(stories): reorder stories items
* fix: update accordion item heading tag to be customizable (#2265)
* fix: update accordion item heading tag to be customizable
* Update .changeset/heavy-hairs-join.md
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* Update .changeset/heavy-hairs-join.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore(accordion): lint
* chore(changeset): add issue number
* feat(docs): add HeadingComponent prop
---------
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(theme): add pointer-events-none to skeleton base (#2972)
* feat(tabs): add `destroyInactiveTabPanel` prop for Tabs component (#2973)
* feat(tabs): add destroyInactiveTabPanel and set default to false
* feat(tabs): integrate with destroyInactiveTabPanel
* feat(theme): hidden inert tab panel
* feat(changeset): add changeset
* chore(changeset): add issue number
* feat(docs): add `destroyInactiveTabPanel` prop to tabs page
* chore(docs): set destroyInactiveTabPanel to true by default
* chore(tabs): set destroyInactiveTabPanel to true by default
* chore(tabs): revise destroyInactiveTabPanel logic
* feat(tabs): add tests for destroyInactiveTabPanel
* chore(tabs): change the default value of destroyInactiveTabPanel to true
* refactor: add support for disabling the animation globally (#2929)
* refactor: add support for disabling the animation globally
* chore(docs): disableAnimation removed from global provider
* feat(docs): nextui provider api updated, storybook preview adjusted
* chore(theme): button is scalable when disabled, tooltip animation improved
* fix(theme): remove origin-bottom from button (#2990)
* fix(skeleton): overflow issue in skeleton (#2986)
* fix(theme): set overflow visible after skeleton loaded
* feat(changeset): add changeset
* fix(table): v2 input/textarea don't allow spaces inside a table (#3020)
* fix(table): set onKeyDownCapture to undefined
* feat(changeset): add changeset
* fix(slider): calculate the correct value on mark click (#3017)
* fix(slider): calculate the correct value on mark click
* refactor(slider): remove the tests inside describe block
* feat(slider): add tests for thumb move on mark click
* refactor(slider): use val instead of pos
* fix(theme): revise input isInvalid styles (#3010)
* fix(theme): revise isInvalid input styles
* feat(changeset): add changeset
* feat(date-picker): add missing ref to input wrapper (#3011)
* fix(date-picker): add missing ref to input wrapper
* feat(changeset): add changeset
* fix(core): incorrect tailwind classnames (#3018)
* fix(dropdown): focus behaviour on press / enter keydown (#2970)
* fix(dropdown): set focus on the first item
* feat(dropdown): add keyboard interactions tests
* feat(changeset): add changeset
* fix(dropdown): use fireEvent.keyDown instead
* chore(deps): add @nextui-org/test-utils to dropdown
* refactor(dropdown): pass onKeyDown to menu trigger and don't hardcode autoFocus
* chore(dropdown): remove autoFocus
* fix(menu): pass userMenuProps to useTreeState and useAriaMenu and remove from getListProps
* chore(changeset): add menu package
* fix(component): update type definition to prevent primitive values as items (#2953)
* fix: update type definition to prevent primitive values as items
* fix: typecheck
* fix(select): onSelectionChange can handle number (#2937)
* fix: onSelectionChange type for dynamic items in Select component
* docs: remove unnecessary properties
* docs: update highlightedLines
* chore: add changeset
* fix(calendar): scrolling is hidden when changing the month (#2949)
* fix(calendar): scrolling is hidden when changing the month
* chore(changeset): correct package name
---------
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix: make VisuallyHidden's element type as span when it's inside phrasing element (#3013)
* fix(checkbox): make VisuallyHidden's element type as span
* feat(changeset): add changeset
* fix(radio): make the VisuallyHidden element type as span
* fix(switch): make the VisuallyHidden element type as span
* fix(select): make the VisuallyHidden element type as span
* feat(changeset): replace changeset
* chore: fix formatting
* docs: sync nextui-cli api (#3035)
* docs: sync nextui-cli api
* docs: update
* chore: update routes.json with new path and set updated flag
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* feat: switch default validationBehavior to aria and allow switching via props (#2987)
* chore: add support validationBehavior aria
* chore: add validationBehavior to Provider
* chore: add autocomplete validation test
* chore: add checkbox validation test
* fix(input): require condition
* docs: add description of validationBehavior props
* chore: add support validationBehavior props for date components
* docs(dates): add description of validationBehavior props
* chore: add changeset
* chore: format
* chore: fix test
* fix: select validationBehavior is not support yet
* fix: select validationBehavior not supported yet
* chore(docs): validation behavior prop added to nextui-provider
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix: popover-based focus behaviour (#2854)
* fix(autocomplete): autocomplete focus behaviour
* feat(autocomplete): add test case for catching blur cases
* refactor(autocomplete): use isOpen instead
* feat(autocomplete): add "should focus when clicking autocomplete" test case
* feat(autocomplete): add should set the input after selection
* fix(autocomplete): remove shouldUseVirtualFocus
* fix(autocomplete): uncomment blur logic
* refactor(autocomplete): remove state as it is in getPopoverProps
* refactor(autocomplete): remove unnecessary blur
* refactor(select): remove unncessary props
* fix(popover): use domRef instead
* fix(popover): revise isNonModal and isDismissable
* fix(popover): use dialogRef back
* fix(popover): rollback
* fix(autocomplete): onFocus logic
* feat(popover): set disableFocusManagement to overlay
* feat(modal): set disableFocusManagement to overlay
* fix(autocomplete): set disableFocusManagement for autocomplete
* feat(popover): include disableFocusManagement prop
* refactor(autocomplete): revise type in selectorButton
* fix(autocomplete): revise focus logic
* feat(autocomplete): add internal focus state and add shouldCloseOnInteractOutside
* feat(autocomplete): handle selectedItem change
* feat(autocomplete): add clear button test
* feat(changeset): add changeset
* refactor(components): use the original order
* refactor(autocomplete): add more comments
* fix(autocomplete): revise focus behaviours
* refactor(autocomplete): rename to listbox
* chore(popover): remove disableFocusManagement from popover
* chore(autocomplete): remove disableFocusManagement from autocomplete
* chore(changeset): add issue number
* fix(popover): don't set default value to transformOrigin
* fix(autocomplete): revise shouldCloseOnInteractOutside logic
* feat(autocomplete): should close listbox by clicking another autocomplete
* fix(popover): add disableFocusManagement to overlay
* refactor(autocomplete): revise comments and refactor shouldCloseOnInteractOutside
* feat(changeset): add issue number
* fix(autocomplete): merge with selectorButtonProps.onClick
* refactor(autocomplete): remove extra line
* refactor(autocomplete): revise comment
* feat(select): add shouldCloseOnInteractOutside
* feat(dropdown): add shouldCloseOnInteractOutside
* feat(date-picker): add shouldCloseOnInteractOutside
* feat(changeset): add dropdown and date-picker
* fix(popover): revise shouldCloseOnInteractOutside
* feat(date-picker): integrate with ariaShouldCloseOnInteractOutside
* feat(select): integrate with ariaShouldCloseOnInteractOutside
* feat(dropdown): integrate with ariaShouldCloseOnInteractOutside
* feat(popover): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): ariaShouldCloseOnInteractOutside
* chore(deps): update pnpm-lock.yaml
* feat(autocomplete): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): handle setShouldFocus logic
* feat(changeset): add @nextui-org/aria-utils
* chore(autocomplete): put the test into correct group
* feat(select): should close listbox by clicking another select
* feat(dropdown): should close listbox by clicking another dropdown
* feat(popover): should close listbox by clicking another popover
* feat(date-picker): should close listbox by clicking another datepicker
* chore(changeset): add issue numbers and revise changeset message
* refactor(autocomplete): change to useRef instead
* refactor(autocomplete): change to useRef instead
* refactor(aria-utils): revise comments and format code
* chore(changeset): add issue number
* chore: take popoverProps.shouldCloseOnInteractOutside first
* refactor(autocomplete): remove unnecessary logic
* refactor(autocomplete): focus management logic
* fix(components): Fix 'Tap to click' behavior on macOS with Edge/Chrome for Accordion and Tab (#2725)
* fix(components): fix 'Tap to click' behavior on macOS
* Add change file for accordion, menu, and tabs
* Remove 'fix(components)' from the .changeset file
* fix(components): undo dropdown change now that it's no longer applicable
* fix(components): update changeset file now that we are no longer modifying the dropdown component
* fix(date-picker): corrected inert value for true condition (#3054)
* fix(date-picker): corrected inert value for true condition #3044
* refactor(calendar): add todo comment
* feat(changeset): add changeset
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(hooks): resolve type error in onKeyDown event handler (#3064)
* fix(hooks): resolve type error in onKeyDown event handler
* chore(changeset): revise changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* Update dependency array on setPage useCallback hook (#3029)
Changes:
Add the onChangeActivePage function to the dependency array of the setPage useCallback hook to ensure it always reflects the latest state.
Impact:
This fix ensures that the pagination component accurately reflects the current state when triggering onChangeActivePage.
* fix: error peerDep in pkg (#3014)
* fix: error peerDep in pkg
* docs: changeset
* Fix DatePicker Time Input (#2845)
* fix(date-picker): set `isCalendarHeaderExpanded` to `false` when DatePicker is closed
* fix(date-picker): calendar header controlled state on DatePicker
* chore(date-picker): update test
* chore(date-picker): remove unnecessary `async` in test
* Update packages/components/date-picker/__tests__/date-picker.test.tsx
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(date-picker): test
* fix(hooks): optimize useScrollPosition with useCallback and useRef (#3049)
* fix(hooks): optimize useScrollPosition with useCallback and useRef
* Update .changeset/lucky-cobras-jog.md
* Update packages/hooks/use-scroll-position/src/index.ts
* Update packages/hooks/use-scroll-position/src/index.ts
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(select): placeholder text display for controlled component (#3081)
* fix: return placeholder when selectedItems is empty
* chore: add test and changeset
* chore(docs): v2.4.0 (#3084)
* chore(docs): v2.4.0
* chore(docs): v2.4.0 blog
* chore(docs): revise typos based on coderabbitai
* chore(docs): adjust navbar
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* chore(changese): update @nextui-org/react dependency to minor version
* docs: update cli docs (#3096)
* ci(changesets): version packages (#2903)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(radio): remove required attribute for Radio with validationBehavior="aria" (#3110)
* fix(theme): add missing pointer event after data loaded (#3126)
* fix(system): listbox href issue (experimental) (#3119)
* fix(system): @react-aria/utils
* feat(hooks): include routerLinkProps
* feat(changeset): add changeset
* chore(deps): bump @react-aria/utils to 3.24.1
* fix(hooks): missing arguments
* chore(deps): bump @react-types/link
* chore(link): bump @react-aria/link to 3.7.1
* chore(link): use @react-aria/link instead
* chore(changeset): revise changeset
* chore(hooks): undo use-aria-link changes
* chore(deps): undo use-aria-link changes
* chore(deps): bump `@react-aria/utils` to `3.24.1`
* chore(deps): bump `@react-types/shared`
* feat: add missing router.open parameters due to router change
* chore(changeset): add new line
* chore(deps): bump `@react-types/shared` to `3.23.1`
* fix(avatar): avoid passing `disableAnimation` prop to a DOM element (#3111)
* fix(avatar): avoid passing `disableAnimation` prop to a DOM element
* refactor(avatar): use filterDOMProps approach
* chore(avatar): remove to type import
* chore(avatar): change to shouldFilterDOMProps
* fix(docs): removed unused import & corrected prop for disabled DatePicker (#3136)
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
* ci(changesets): version packages (#3115)
* fix(pagination): missing animation (#3144)
* fix tsup domain (#3158)
* chore(docs): remove destroyInactiveTabPanel from Tab due to merge conflict (#3155)
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: Shrinidhi Upadhyaya <shrinidhiupadhyaya1195@gmail.com>
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: Paul Tiedtke <PaulTiedtke@web.de>
Co-authored-by: Mohammad Reza Badri <85818966+mrbadri@users.noreply.github.com>
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
Co-authored-by: Shawn Dong <dsknight@live.com.au>
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com>
Co-authored-by: Poli Sour <57824881+novsource@users.noreply.github.com>
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: Artem Pitikin <git@kosmotema.dev>
Co-authored-by: winches <329487092@qq.com>
Co-authored-by: Eric Abreu <ericfabreu@gmail.com>
Co-authored-by: Minsu <52266597+Gaic4o@users.noreply.github.com>
Co-authored-by: Jesus Perdomo Lampignano <38929969+jesuzon@users.noreply.github.com>
Co-authored-by: chirokas <157580465+chirokas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: EGOIST <0x142857@gmail.com>
* fix(avatar): avoid passing `disableAnimation` prop to a DOM element
* refactor(avatar): use filterDOMProps approach
* chore(avatar): remove to type import
* chore(avatar): change to shouldFilterDOMProps
* chore(root): reat-aria packages updated (#2889)
* chore(storybook): common colors enabled (#2902)
* fix(range-calendar): hide only dates outside the month (#2906)
* fix(range-calendar): hide only dates outside the month #2890
* fix(range-calendar): corrected spelling mistake in changeset description
* fix(range-calendar): corrected capitalization in changeset description
* chore(changeset): patch @nextui-org/theme
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(date-picker): keep date picker style consistent for different variants (#2908)
* fix: add missing TableRowProps export (#2866)
* fix: add missing TableRowProps export
* feat(changeset): add changeset for PR2866
* chore(changeset): revise changeset message
---------
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(input): correct label margin for RTL required inputs (#2781)
* fix(input): correct label margin for RTL required inputs
* fix(theme): add changeset fr theme
* docs(core): add storybook and canary release info (#2914)
* Cn utility refactor (#2915)
* refactor(core): cn utility adjusted and moved to the theme package
* chore(root): changeset
* fix(storybook): stories that used cn
* docs(date-picker): change to jsx instead (#2919)
* fix(switch): support uncontrolled switch in react-hook-form (#2924)
* feat(switch): add @nextui-org/use-safe-layout-effect
* chore(deps): add @nextui-org/use-safe-layout-effect
* fix(switch): react-hook-form uncontrolled switch component
* fix(switch): react-hook-form uncontrolled switch component
* feat(switch): add rect-hook-form in dev dep
* feat(switch): add WithReactHookFormTemplate
* refactor(root): react aria packages fixed (#2944)
* feat(docs): docs changes (#2868)
* feat(docs): add example how to set locale (#2867)
* docs(guide): add an explanation for the installation guide (#2769)
* docs(guide): add an explanation for the installation guide
* docs(guide): add an explanation for the cli guide
* docs(guide): add support for cli output
* fix: change sort priority - cmdk (#2873)
* docs: remove unsupported props in range calendar and date range picker (#2881)
* chore(calendar): remove showMonthAndYearPickers from range calendar story
* docs(date-range-picker): remove showMonthAndYearPickers info
* docs(range-calendar): remove unsupported props
* docs: refactor typing in form.ts (#2882)
* chore(docs): supplement errorMessage behaviour in input (#2892)
* refactor(docs): revise NextUI Provider structure
* chore(docs): add updated tag
---------
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
* fix(slider): missing marks when hideThumb is true & revise slider styles (#2883)
* chore(slider): include marks in hideThumb
* fix(slider): revise slider styles
* feat(changeset): add changeset
* feat(slider): add tests with marks and hideThumb
* feat(test): react hook form tests & stories (#2931)
* feat(input): add Input with React Hook Form tests
* refactor(input): add missing types
* feat(checkbox): add checkbox with React Hook Form tests
* feat(select): add react-hook-form to dev dep
* feat(select): add react hook form story
* feat(select): react hook form tests
* fix(select): incorrect button reference
* feat(deps): add react-hook-form to dev dep in autocomplete
* feat(autocomplete): react hook form story
* feat(autocomplete): react hook form tests
* fix(autocomplete): rollback wrapper type
* feat(switch): add react hook form tests
* refactor(stories): reorder stories items
* fix: update accordion item heading tag to be customizable (#2265)
* fix: update accordion item heading tag to be customizable
* Update .changeset/heavy-hairs-join.md
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* Update .changeset/heavy-hairs-join.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore(accordion): lint
* chore(changeset): add issue number
* feat(docs): add HeadingComponent prop
---------
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(theme): add pointer-events-none to skeleton base (#2972)
* feat(tabs): add `destroyInactiveTabPanel` prop for Tabs component (#2973)
* feat(tabs): add destroyInactiveTabPanel and set default to false
* feat(tabs): integrate with destroyInactiveTabPanel
* feat(theme): hidden inert tab panel
* feat(changeset): add changeset
* chore(changeset): add issue number
* feat(docs): add `destroyInactiveTabPanel` prop to tabs page
* chore(docs): set destroyInactiveTabPanel to true by default
* chore(tabs): set destroyInactiveTabPanel to true by default
* chore(tabs): revise destroyInactiveTabPanel logic
* feat(tabs): add tests for destroyInactiveTabPanel
* chore(tabs): change the default value of destroyInactiveTabPanel to true
* refactor: add support for disabling the animation globally (#2929)
* refactor: add support for disabling the animation globally
* chore(docs): disableAnimation removed from global provider
* feat(docs): nextui provider api updated, storybook preview adjusted
* chore(theme): button is scalable when disabled, tooltip animation improved
* fix(theme): remove origin-bottom from button (#2990)
* fix(skeleton): overflow issue in skeleton (#2986)
* fix(theme): set overflow visible after skeleton loaded
* feat(changeset): add changeset
* fix(table): v2 input/textarea don't allow spaces inside a table (#3020)
* fix(table): set onKeyDownCapture to undefined
* feat(changeset): add changeset
* fix(slider): calculate the correct value on mark click (#3017)
* fix(slider): calculate the correct value on mark click
* refactor(slider): remove the tests inside describe block
* feat(slider): add tests for thumb move on mark click
* refactor(slider): use val instead of pos
* fix(theme): revise input isInvalid styles (#3010)
* fix(theme): revise isInvalid input styles
* feat(changeset): add changeset
* feat(date-picker): add missing ref to input wrapper (#3011)
* fix(date-picker): add missing ref to input wrapper
* feat(changeset): add changeset
* fix(core): incorrect tailwind classnames (#3018)
* fix(dropdown): focus behaviour on press / enter keydown (#2970)
* fix(dropdown): set focus on the first item
* feat(dropdown): add keyboard interactions tests
* feat(changeset): add changeset
* fix(dropdown): use fireEvent.keyDown instead
* chore(deps): add @nextui-org/test-utils to dropdown
* refactor(dropdown): pass onKeyDown to menu trigger and don't hardcode autoFocus
* chore(dropdown): remove autoFocus
* fix(menu): pass userMenuProps to useTreeState and useAriaMenu and remove from getListProps
* chore(changeset): add menu package
* fix(component): update type definition to prevent primitive values as items (#2953)
* fix: update type definition to prevent primitive values as items
* fix: typecheck
* fix(select): onSelectionChange can handle number (#2937)
* fix: onSelectionChange type for dynamic items in Select component
* docs: remove unnecessary properties
* docs: update highlightedLines
* chore: add changeset
* fix(calendar): scrolling is hidden when changing the month (#2949)
* fix(calendar): scrolling is hidden when changing the month
* chore(changeset): correct package name
---------
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix: make VisuallyHidden's element type as span when it's inside phrasing element (#3013)
* fix(checkbox): make VisuallyHidden's element type as span
* feat(changeset): add changeset
* fix(radio): make the VisuallyHidden element type as span
* fix(switch): make the VisuallyHidden element type as span
* fix(select): make the VisuallyHidden element type as span
* feat(changeset): replace changeset
* chore: fix formatting
* docs: sync nextui-cli api (#3035)
* docs: sync nextui-cli api
* docs: update
* chore: update routes.json with new path and set updated flag
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* feat: switch default validationBehavior to aria and allow switching via props (#2987)
* chore: add support validationBehavior aria
* chore: add validationBehavior to Provider
* chore: add autocomplete validation test
* chore: add checkbox validation test
* fix(input): require condition
* docs: add description of validationBehavior props
* chore: add support validationBehavior props for date components
* docs(dates): add description of validationBehavior props
* chore: add changeset
* chore: format
* chore: fix test
* fix: select validationBehavior is not support yet
* fix: select validationBehavior not supported yet
* chore(docs): validation behavior prop added to nextui-provider
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix: popover-based focus behaviour (#2854)
* fix(autocomplete): autocomplete focus behaviour
* feat(autocomplete): add test case for catching blur cases
* refactor(autocomplete): use isOpen instead
* feat(autocomplete): add "should focus when clicking autocomplete" test case
* feat(autocomplete): add should set the input after selection
* fix(autocomplete): remove shouldUseVirtualFocus
* fix(autocomplete): uncomment blur logic
* refactor(autocomplete): remove state as it is in getPopoverProps
* refactor(autocomplete): remove unnecessary blur
* refactor(select): remove unncessary props
* fix(popover): use domRef instead
* fix(popover): revise isNonModal and isDismissable
* fix(popover): use dialogRef back
* fix(popover): rollback
* fix(autocomplete): onFocus logic
* feat(popover): set disableFocusManagement to overlay
* feat(modal): set disableFocusManagement to overlay
* fix(autocomplete): set disableFocusManagement for autocomplete
* feat(popover): include disableFocusManagement prop
* refactor(autocomplete): revise type in selectorButton
* fix(autocomplete): revise focus logic
* feat(autocomplete): add internal focus state and add shouldCloseOnInteractOutside
* feat(autocomplete): handle selectedItem change
* feat(autocomplete): add clear button test
* feat(changeset): add changeset
* refactor(components): use the original order
* refactor(autocomplete): add more comments
* fix(autocomplete): revise focus behaviours
* refactor(autocomplete): rename to listbox
* chore(popover): remove disableFocusManagement from popover
* chore(autocomplete): remove disableFocusManagement from autocomplete
* chore(changeset): add issue number
* fix(popover): don't set default value to transformOrigin
* fix(autocomplete): revise shouldCloseOnInteractOutside logic
* feat(autocomplete): should close listbox by clicking another autocomplete
* fix(popover): add disableFocusManagement to overlay
* refactor(autocomplete): revise comments and refactor shouldCloseOnInteractOutside
* feat(changeset): add issue number
* fix(autocomplete): merge with selectorButtonProps.onClick
* refactor(autocomplete): remove extra line
* refactor(autocomplete): revise comment
* feat(select): add shouldCloseOnInteractOutside
* feat(dropdown): add shouldCloseOnInteractOutside
* feat(date-picker): add shouldCloseOnInteractOutside
* feat(changeset): add dropdown and date-picker
* fix(popover): revise shouldCloseOnInteractOutside
* feat(date-picker): integrate with ariaShouldCloseOnInteractOutside
* feat(select): integrate with ariaShouldCloseOnInteractOutside
* feat(dropdown): integrate with ariaShouldCloseOnInteractOutside
* feat(popover): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): ariaShouldCloseOnInteractOutside
* chore(deps): update pnpm-lock.yaml
* feat(autocomplete): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): handle setShouldFocus logic
* feat(changeset): add @nextui-org/aria-utils
* chore(autocomplete): put the test into correct group
* feat(select): should close listbox by clicking another select
* feat(dropdown): should close listbox by clicking another dropdown
* feat(popover): should close listbox by clicking another popover
* feat(date-picker): should close listbox by clicking another datepicker
* chore(changeset): add issue numbers and revise changeset message
* refactor(autocomplete): change to useRef instead
* refactor(autocomplete): change to useRef instead
* refactor(aria-utils): revise comments and format code
* chore(changeset): add issue number
* chore: take popoverProps.shouldCloseOnInteractOutside first
* refactor(autocomplete): remove unnecessary logic
* refactor(autocomplete): focus management logic
* fix(components): Fix 'Tap to click' behavior on macOS with Edge/Chrome for Accordion and Tab (#2725)
* fix(components): fix 'Tap to click' behavior on macOS
* Add change file for accordion, menu, and tabs
* Remove 'fix(components)' from the .changeset file
* fix(components): undo dropdown change now that it's no longer applicable
* fix(components): update changeset file now that we are no longer modifying the dropdown component
* fix(date-picker): corrected inert value for true condition (#3054)
* fix(date-picker): corrected inert value for true condition #3044
* refactor(calendar): add todo comment
* feat(changeset): add changeset
---------
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(hooks): resolve type error in onKeyDown event handler (#3064)
* fix(hooks): resolve type error in onKeyDown event handler
* chore(changeset): revise changeset
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* Update dependency array on setPage useCallback hook (#3029)
Changes:
Add the onChangeActivePage function to the dependency array of the setPage useCallback hook to ensure it always reflects the latest state.
Impact:
This fix ensures that the pagination component accurately reflects the current state when triggering onChangeActivePage.
* fix: error peerDep in pkg (#3014)
* fix: error peerDep in pkg
* docs: changeset
* Fix DatePicker Time Input (#2845)
* fix(date-picker): set `isCalendarHeaderExpanded` to `false` when DatePicker is closed
* fix(date-picker): calendar header controlled state on DatePicker
* chore(date-picker): update test
* chore(date-picker): remove unnecessary `async` in test
* Update packages/components/date-picker/__tests__/date-picker.test.tsx
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(date-picker): test
* fix(hooks): optimize useScrollPosition with useCallback and useRef (#3049)
* fix(hooks): optimize useScrollPosition with useCallback and useRef
* Update .changeset/lucky-cobras-jog.md
* Update packages/hooks/use-scroll-position/src/index.ts
* Update packages/hooks/use-scroll-position/src/index.ts
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(select): placeholder text display for controlled component (#3081)
* fix: return placeholder when selectedItems is empty
* chore: add test and changeset
* chore(docs): v2.4.0 (#3084)
* chore(docs): v2.4.0
* chore(docs): v2.4.0 blog
* chore(docs): revise typos based on coderabbitai
* chore(docs): adjust navbar
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* chore(changese): update @nextui-org/react dependency to minor version
* docs: update cli docs (#3096)
* ci(changesets): version packages (#2903)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
---------
Co-authored-by: Shrinidhi Upadhyaya <shrinidhiupadhyaya1195@gmail.com>
Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
Co-authored-by: Paul Tiedtke <PaulTiedtke@web.de>
Co-authored-by: Mohammad Reza Badri <85818966+mrbadri@users.noreply.github.com>
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
Co-authored-by: Shawn Dong <dsknight@live.com.au>
Co-authored-by: Shawn Dong <shawn.dong@flybuys.com.au>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com>
Co-authored-by: Poli Sour <57824881+novsource@users.noreply.github.com>
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: Artem Pitikin <git@kosmotema.dev>
Co-authored-by: winches <329487092@qq.com>
Co-authored-by: Eric Abreu <ericfabreu@gmail.com>
Co-authored-by: Minsu <52266597+Gaic4o@users.noreply.github.com>
Co-authored-by: Jesus Perdomo Lampignano <38929969+jesuzon@users.noreply.github.com>
Co-authored-by: chirokas <157580465+chirokas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(date-picker): set `isCalendarHeaderExpanded` to `false` when DatePicker is closed
* fix(date-picker): calendar header controlled state on DatePicker
* chore(date-picker): update test
* chore(date-picker): remove unnecessary `async` in test
* Update packages/components/date-picker/__tests__/date-picker.test.tsx
---------
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Changes:
Add the onChangeActivePage function to the dependency array of the setPage useCallback hook to ensure it always reflects the latest state.
Impact:
This fix ensures that the pagination component accurately reflects the current state when triggering onChangeActivePage.
* fix(components): fix 'Tap to click' behavior on macOS
* Add change file for accordion, menu, and tabs
* Remove 'fix(components)' from the .changeset file
* fix(components): undo dropdown change now that it's no longer applicable
* fix(components): update changeset file now that we are no longer modifying the dropdown component
* fix(autocomplete): autocomplete focus behaviour
* feat(autocomplete): add test case for catching blur cases
* refactor(autocomplete): use isOpen instead
* feat(autocomplete): add "should focus when clicking autocomplete" test case
* feat(autocomplete): add should set the input after selection
* fix(autocomplete): remove shouldUseVirtualFocus
* fix(autocomplete): uncomment blur logic
* refactor(autocomplete): remove state as it is in getPopoverProps
* refactor(autocomplete): remove unnecessary blur
* refactor(select): remove unncessary props
* fix(popover): use domRef instead
* fix(popover): revise isNonModal and isDismissable
* fix(popover): use dialogRef back
* fix(popover): rollback
* fix(autocomplete): onFocus logic
* feat(popover): set disableFocusManagement to overlay
* feat(modal): set disableFocusManagement to overlay
* fix(autocomplete): set disableFocusManagement for autocomplete
* feat(popover): include disableFocusManagement prop
* refactor(autocomplete): revise type in selectorButton
* fix(autocomplete): revise focus logic
* feat(autocomplete): add internal focus state and add shouldCloseOnInteractOutside
* feat(autocomplete): handle selectedItem change
* feat(autocomplete): add clear button test
* feat(changeset): add changeset
* refactor(components): use the original order
* refactor(autocomplete): add more comments
* fix(autocomplete): revise focus behaviours
* refactor(autocomplete): rename to listbox
* chore(popover): remove disableFocusManagement from popover
* chore(autocomplete): remove disableFocusManagement from autocomplete
* chore(changeset): add issue number
* fix(popover): don't set default value to transformOrigin
* fix(autocomplete): revise shouldCloseOnInteractOutside logic
* feat(autocomplete): should close listbox by clicking another autocomplete
* fix(popover): add disableFocusManagement to overlay
* refactor(autocomplete): revise comments and refactor shouldCloseOnInteractOutside
* feat(changeset): add issue number
* fix(autocomplete): merge with selectorButtonProps.onClick
* refactor(autocomplete): remove extra line
* refactor(autocomplete): revise comment
* feat(select): add shouldCloseOnInteractOutside
* feat(dropdown): add shouldCloseOnInteractOutside
* feat(date-picker): add shouldCloseOnInteractOutside
* feat(changeset): add dropdown and date-picker
* fix(popover): revise shouldCloseOnInteractOutside
* feat(date-picker): integrate with ariaShouldCloseOnInteractOutside
* feat(select): integrate with ariaShouldCloseOnInteractOutside
* feat(dropdown): integrate with ariaShouldCloseOnInteractOutside
* feat(popover): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): ariaShouldCloseOnInteractOutside
* chore(deps): update pnpm-lock.yaml
* feat(autocomplete): integrate with ariaShouldCloseOnInteractOutside
* feat(aria-utils): handle setShouldFocus logic
* feat(changeset): add @nextui-org/aria-utils
* chore(autocomplete): put the test into correct group
* feat(select): should close listbox by clicking another select
* feat(dropdown): should close listbox by clicking another dropdown
* feat(popover): should close listbox by clicking another popover
* feat(date-picker): should close listbox by clicking another datepicker
* chore(changeset): add issue numbers and revise changeset message
* refactor(autocomplete): change to useRef instead
* refactor(autocomplete): change to useRef instead
* refactor(aria-utils): revise comments and format code
* chore(changeset): add issue number
* chore: take popoverProps.shouldCloseOnInteractOutside first
* refactor(autocomplete): remove unnecessary logic
* refactor(autocomplete): focus management logic
* docs: sync nextui-cli api
* docs: update
* chore: update routes.json with new path and set updated flag
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(checkbox): make VisuallyHidden's element type as span
* feat(changeset): add changeset
* fix(radio): make the VisuallyHidden element type as span
* fix(switch): make the VisuallyHidden element type as span
* fix(select): make the VisuallyHidden element type as span
* feat(changeset): replace changeset
* chore: fix formatting
* fix(calendar): scrolling is hidden when changing the month
* chore(changeset): correct package name
---------
Co-authored-by: Poli Sour <polisour.work@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
* fix(dropdown): set focus on the first item
* feat(dropdown): add keyboard interactions tests
* feat(changeset): add changeset
* fix(dropdown): use fireEvent.keyDown instead
* chore(deps): add @nextui-org/test-utils to dropdown
* refactor(dropdown): pass onKeyDown to menu trigger and don't hardcode autoFocus
* chore(dropdown): remove autoFocus
* fix(menu): pass userMenuProps to useTreeState and useAriaMenu and remove from getListProps
* chore(changeset): add menu package
* fix(slider): calculate the correct value on mark click
* refactor(slider): remove the tests inside describe block
* feat(slider): add tests for thumb move on mark click
* refactor(slider): use val instead of pos
* refactor: add support for disabling the animation globally
* chore(docs): disableAnimation removed from global provider
* feat(docs): nextui provider api updated, storybook preview adjusted
* chore(theme): button is scalable when disabled, tooltip animation improved
* feat(tabs): add destroyInactiveTabPanel and set default to false
* feat(tabs): integrate with destroyInactiveTabPanel
* feat(theme): hidden inert tab panel
* feat(changeset): add changeset
* chore(changeset): add issue number
* feat(docs): add `destroyInactiveTabPanel` prop to tabs page
* chore(docs): set destroyInactiveTabPanel to true by default
* chore(tabs): set destroyInactiveTabPanel to true by default
* chore(tabs): revise destroyInactiveTabPanel logic
* feat(tabs): add tests for destroyInactiveTabPanel
* chore(tabs): change the default value of destroyInactiveTabPanel to true
* feat(input): add Input with React Hook Form tests
* refactor(input): add missing types
* feat(checkbox): add checkbox with React Hook Form tests
* feat(select): add react-hook-form to dev dep
* feat(select): add react hook form story
* feat(select): react hook form tests
* fix(select): incorrect button reference
* feat(deps): add react-hook-form to dev dep in autocomplete
* feat(autocomplete): react hook form story
* feat(autocomplete): react hook form tests
* fix(autocomplete): rollback wrapper type
* feat(switch): add react hook form tests
* refactor(stories): reorder stories items
* chore(slider): include marks in hideThumb
* fix(slider): revise slider styles
* feat(changeset): add changeset
* feat(slider): add tests with marks and hideThumb
* feat(docs): add example how to set locale (#2867)
* docs(guide): add an explanation for the installation guide (#2769)
* docs(guide): add an explanation for the installation guide
* docs(guide): add an explanation for the cli guide
* docs(guide): add support for cli output
* fix: change sort priority - cmdk (#2873)
* docs: remove unsupported props in range calendar and date range picker (#2881)
* chore(calendar): remove showMonthAndYearPickers from range calendar story
* docs(date-range-picker): remove showMonthAndYearPickers info
* docs(range-calendar): remove unsupported props
* docs: refactor typing in form.ts (#2882)
* chore(docs): supplement errorMessage behaviour in input (#2892)
* refactor(docs): revise NextUI Provider structure
* chore(docs): add updated tag
---------
Co-authored-by: Nozomi-Hijikata <116155762+Nozomi-Hijikata@users.noreply.github.com>
Co-authored-by: HaRuki <soccer_haruki15@me.com>
Co-authored-by: Kaben <carnoxen@gmail.com>
* chore(docs): use develop branch instead of main
* chore(workflows): change to develop
* chore(.changeset): change baseBranch to develop
* feat(workflows): trigger sync-develop-to-main workflow after publish
* feat(workflow): add sync develop to main workflow
* chore(workflows): add back "or Publish to NPM"
* refactor(workflows): rename tag name from dev to canary
* refactor: rename dev to canary
* refactor: reaname develop to canary
* refactor(workflows): change from develop to canary
* feat(input): add @nextui-org/use-safe-layout-effect
* fix(input): use useSafeLayoutEffect to handle react-hook-form case
* feat(input): add isClearable test case
* feat(input): add react-hook-form to dev dependencies for storybook
* feat(input): add WithReactHookForm to input storybook
* feat(changeset): fixes isClearable function in input
* chore(changeset): update changeset message
* refactor(input): revise input test
* fix(components): fix slider component vertical mark y position focus issue
* feat(changeset): fixed slider component vertical mark y position
* chore(changeset): add issue number and revise package
---------
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(progress): turn twMerge true to fix custom styling
* fix(changelog): move changes to patch
* fix: remove stories from changeset
* add Issue number in the changeset
* chore(changeset): remove extra space
* chore(changeset): changeset message
---------
Co-authored-by: Guillaume DE LA RUE <guillaume.de-la-rue@consertotech.pro>
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(radioGroup): add RTL support to the radio group component
* fix(radio): add changeset
* chore(changeset): correct package name and add issue number
---------
Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
* fix(core): export * from not supported on client components
* fix(core): named exports implemented in several packages
* chore(root): changeset description
* fix(popover): trigger disabled prop warning
* chore(.changeset): fix typo
* feat(dropdown): add @nextui-org/image
* feat(dropdown): add more tests for custom trigger with isDisabled
* feat(dropdown): make sure the menu can be open
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
* fix(hook): add AsyncLoadable & show warning after data is loaded
* fix(hooks): change isLoading default state to true
* refactor(hooks): move the logic to missingKeys
* refactor(changeset): rephrase changeset description
* fix(select): disable all keys for isDisabled case
* fix(select): add "disabled select shouldn't update by keyboard" test case
* refactor(select): remove unnecessary map
* feat(autocomplete): add AsyncFilteringTemplate
* chore(autocomplete): move SWCharacter out
* feat(changeset): add missing AsyncFiltering story in Autocomplete
* chore(changeset): remove changeset since the change only impacts the story
* fix(ripple): lazyMotion forwardRef issue in Ripple
* feat(dropdown): add test case for LazyMotion React.forwardRef issue
* refactor(dropdown): revise the test title
* feat(modal): include console error check in modal test
* feat(popover): add "should not throw error when clicking trigger button" test
* feat(accordion): add test for lazy motion issue
* feat(navbar): add test for lazy motion issue
* feat(tabs): add test for lazy motion issue
* feat(tooltip): add test for lazy motion issue
* refactor(dropdown): remove unnecessary async
* refactor(test): move spy outside and trigger clearAllMocks after each test
* fix(popover): handle isDisabled logic for elements without isDisabled props
* chore(popover): isDisabled not necessary in restProps
* chore(changset): handle isDisabled logic for elements without isDisabled props
* fix(popover): keep all the props but isDisabled for non nextui button
* refactor(popover): move isDisabled handling to getTriggerProps
* refactor(popover): get the popover trigger styles from theme instead
* feat(theme): add isDisabled styles in popover
* chore(changeset): add patch to @nextui-org/theme
* refactor(popover): avoid re-instantiate popover styles
* fix(popover): apply filterDOMProps in popover trigger
* fix(popover): avoid conflicts with tooltip isDisabled
* chore(core): add isNextUIEl function to check if a component is a NextUI component
* chore(changeset): add system-rsc and revise message
* feat(dropdown): add tests for custom trigger with isDisabled
* fix(dropdown): incorrect User import path
* feat(dropdown): revise User and add mockRestore
* fix(dropdown): revise user import path
---------
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
Reordered `Space` type values to a logical ascending sequence (0.5, 1, 1.5, etc.) for improved readability and consistency. No functional impact on the code.
* fix(select): set undefined to shouldCloseOnInteractOutside in select
* fix(select): set false to shouldCloseOnInteractOutside in autocomplete
* fix(popover): take shouldCloseOnInteractOutside from props
* chore(changeset): revise shouldCloseOnInteractOutside for FreeSoloPopover
* feat(select): add test cases to select
* feat(select): assert that the select is open after click
* feat(autocomplete): add test cases to autocomplete
* feat(select): assert that the select is open after click
* chore(badge): Remove unnecessary type
I suggest removing the `children` type from BadgeProps, as the already extended UseBadgeProps has a `children` prop.
* Create three-tools-whisper.md
* Update three-tools-whisper.md
* fix(select): isFilled logic for state.selectedItems
* fix(select): handle hasValue case and return boolean type
* chore(changeset): include hasValue case as well
Avoid displaying loadingContent and emptyContent at the same time.
Note that there's an existing issue with loadingContent where if
emptyContent is not provided, it will render loadingContent on top of
the columns (instead of inside the table). This change doesn't fix that,
but rather make isLoading play nice with a provided emptyContent. A
separate fix is still needed for when emptyContent is not provided, which
may affect this change later.
* fix(components): set shouldCloseOnInteractOutside to false for FreeSoloPopover
* feat(changeset): fixed popover closing issue in autocomplete with open modal
* fix: issue on RTL support checkbox component
* fix: delete extra file
* fix: adjust the changeset for rtl checkbox
* fix: convert changeset rtl checkbox to ptach
* fix(popover): dropdown behavior on disabled state and update popover trigger props
* chore(dropdown): add DisabledTrigger story to dropdown.stories.tsx
* fix(components): autocomplete, tabIndex is not passed on input
* fix(components): autocomplete, tabIndex is not passed on input
* Update metal-gorillas-dress.md
* fix(components): accordion component throws "validateDOMNesting" error on the storybook
* fix(components): accordion component throws "validateDOMNesting" error on the storybook
* fix(components): accordion component throws "validateDOMNesting" error on the storybook
* fix(components): accordion component throws "validateDOMNesting" error on the storybook
* fix(docs): accordion component throws "validateDOMNesting" error on the storybook
* chore(root): rename to CONTRIBUTING.md
* fix(core): broken CONTRIBUTING.md link
* fix(root): broken CONTRIBUTING.md link
* fix(docs): broken CONTRIBUTING.md link
Typos. (Actually stinking to "PRs" instead of "PR's". The grammatical format present in examples such as L's and W's is expected because it's only one letter, but does not seem to apply to multiple letters combined.
In version 2.2.0, the classNames prop for tooltips is not of type Record<"base"|"arrow", string>, it should be of type Record<"base"|"content", string>.
@@ -14,7 +14,7 @@ Hello!, I am very excited that you are interested in contributing with Next UI.
### Tooling
- [PNPM](https://pnpm.io/) to manage packages and dependencies
- [Tsup](https://tsup.egoist.sh/) to bundle packages
- [Tsup](https://tsup.egoist.dev/) to bundle packages
- [Storybook](https://storybook.js.org/) for rapid UI component development and
testing
- [Testing Library](https://testing-library.com/) for testing components and
@@ -57,7 +57,7 @@ https://www.conventionalcommits.org/ or check out the
## Pull Request Guidelines
- The `main` branch is basically a snapshot of the latest stable version. All development must be done in dedicated branches.
- The `main` branch is basically a snapshot of the latest production version. All development must be done in dedicated branches and will be merged to `canary` branch.
- Make sure that Github Actions are green
- It is good to have multiple small commits while working on the PR. We'll let GitHub squash it automatically before the merge.
- If you add a new feature:
@@ -73,14 +73,14 @@ https://www.conventionalcommits.org/ or check out the
1. Fork of the nextui repository and clone your fork
2. Create a new branch out of the `main` branch. We follow the convention
2. Create a new branch out of the `canary` branch. We follow the convention
`[type/scope]`. For example `fix/dropdown-hook` or `docs/menu-typo`. `type`
can be either `docs`, `fix`, `feat`, `build`, or any other conventional
commit type. `scope` is just a short id that describes the scope of work.
As you develop, you can run `pnpm build --filter=<module>` and
As you canary, you can run `pnpm build --filter=<module>` and
`pnpm test packages/<module>/<pkg>` e.g. `pnpm build --filter=avatar & pnpm test packages/components/avatar` to make sure everything works as expected.
> To know more about the `--filter` option, please check the turborepo [docs](https://turborepo.org/docs/core-concepts/filtering).
@@ -118,12 +118,13 @@ We use [Turbo Repo](https://turborepo.org/) for the project management.
```bash
## Start the dev babel server of NextUI core components
pnpm dev:nextui
pnpm dev
## optional
pnpm dev:docs ## this will start the documentation next.js server and it will automatically detect the changes in the components.
pnpm start:sb ## this will start the storybook server for a faster development and testing.
pnpm sb ## this will start the storybook server for a faster development and testing.
pnpm dev:docs ## this will start the documentation next.js server and it will automatically detect the changes in the components.
```
- If you will be working just on the documentation source code / mdx, you can use the following commands to build
@@ -131,7 +132,7 @@ pnpm start:sb ## this will start the storybook server for a faster development a
```bash
## Build NextUI source components
pnpm build:nextui
pnpm build
## Start the next.js documentation dev server
pnpm dev:docs
@@ -141,10 +142,6 @@ pnpm dev:docs
```bash
pnpm sb
#or
pnpm start:sb
```
Remember that these commands must be executed in the root folder of the project.
data-modal-disclaimer="This is a custom LLM for NextUI with access to all developer docs (nextui.org/docs) and GitHub Issues and PRs (github.com/nextui-org/nextui)."
data-modal-example-questions="How do I install for Next.js?,How do I customize primary color?"
@@ -322,4 +327,4 @@ Whether it's a feature request, bug report, or a project to showcase, please get
## Contributing
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.MD) to learn how you can contribute to this project.
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.md) to learn how you can contribute to this project.
@@ -164,4 +164,4 @@ Whether it's a feature request, bug report, or a project to showcase, please get
## Contributing
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.MD) to learn how you can contribute to this project.
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.md) to learn how you can contribute to this project.
@@ -269,7 +269,7 @@ collapse them into a dropdown menu.
<CodeDemo title="Customizing the Ellipsis Item" files={breadcrumbsContent.customizingEllipsis} />
### Apllying custom styles
### Applying custom styles
You can customize the `Breadcrumbs` component by passing custom Tailwind CSS classes to the component slots.
@@ -440,4 +440,4 @@ Whether it's a feature request, bug report, or a project to showcase, please get
## Contributing
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.MD) to learn how you can contribute to this project.
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.md) to learn how you can contribute to this project.
description: "NextUI v2.3.0 is here! includes six new components, NextUI CLI, bug fixes, React Aria, and a TailwindCSS upgrade, among other enhancements."
We are excited to announce the latest update to NextUI, version **2.3.0**! This release introduces 6 new components,
our new CLI, and several enhancements and bug fixes.
## What's New in v2.3.0?
- [NextUI CLI](/docs/guide/cli) - A command-line interface for creating and managing NextUI projects.
- [DateInput](/docs/components/date-input) - Allows users to enter and edit date and time values using a keyboard.
- [TimeInput](/docs/components/time-input) - Allows users to enter and edit time values using a keyboard.
- [Calendar](/docs/components/calendar) - Displays a calendar for selecting dates and times.
- [RangeCalendar](/docs/components/range-calendar) - Displays a calendar for selecting date ranges.
- [DatePicker](/docs/components/date-picker) - Allows users to select a date from a calendar.
- [DateRangePicker](/docs/components/date-range-picker) - Allows users to select a date range from a calendar.
- [Other Changes](#other-changes) - Includes styling improvements, accessibility and usability enhancements.
<Spacer y={4} />
Requirements:
- [Tailwind CSS 3.4](https://tailwindcss.com/) or later
Upgrade today by running one of the following commands:
<Spacer y={4} />
<PackageManagers
commands={{
cli: "nextui upgrade",
npm: "npx nextui-cli@latest upgrade",
}}
/>
<Spacer y={4} />
## NextUI CLI
We are thrilled to introduce the [NextUI CLI](https://github.com/nextui-org/nextui-cli), a command-line interface, It offers a comprehensive suite
of commands to initialize, manage, and improve your NextUI projects. It enables you to `add`, `remove`, or
`upgrade` individual components, assess the health of your project, and more.
### Installation
To install the CLI globally, execute one of the following commands in your terminal:
<PackageManagers
commands={{
npm: "npm install nextui-cli -g",
yarn: "yarn add nextui-cli -g",
pnpm: "pnpm add nextui-cli -g",
bun: "bun add nextui-cli -g",
}}
/>
Alternatively, you can use the CLI without a global installation by employing `npx`:
```bash
npx nextui-cli@latest
```
### Usage
Once the CLI is installed, run the following command to display available commands:
```bash
nextui
```
NextUI CLI can help you create new projects, add components, upgrade components, remove components, detect issues in
you setup, know your environment, and more.
<Spacer y={4} />
To initialize a new project, you can simply run:
```bash
nextui init my-nextui-app
```
<Spacer y={4} />
You will be prompted to configure your project:
```codeBlock bash
? Select a template › - Use arrow-keys. Return to submit.
❯ App
A Next.js 13 with app directory template pre-configured with NextUI (v2) and Tailwind CSS.
Pages
A Next.js 13 with pages directory template pre-configured with NextUI (v2) and Tailwind CSS.
```
Select the template you want to use and the CLI will create a new project for you.
> We're working on adding more templates to the CLI, so stay tuned for updates!
<Spacer y={4} />
If you already have a NextUI project, you can add components to it using the `add` command:
```bash
nextui add date-input
```
It will automatically detect the required dependencies, modify your `tailwind.config.(js|ts)` file,
detect whether using `pnpm` if so, add the required configuration to your `.npmrc` file and add the component to your project.
If instead of installing a single component you want to install multiple components, you can do so by separating them with a space:
```bash
nextui add date-input time-input calendar
```
You can alternatively install the `main` package which includes all the components by passing the `--all` flag:
```bash
nextui add --all
```
<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/nextui-org/nextui-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).
## New Components
Since the beginning of NextUI, devs have been asking for date and time input components. After
months of iteration and development, we are excited to introduce the following new components:
### DateInput
DateInput is a component that allows users to enter and edit date and time values using a keyboard.
Each part of a date value is displayed in an individually editable segment.
Go to the [DateInput documentation](/docs/components/date-input) to learn more about the component.
### TimeInput
The `TimeInput` component consists of a label, and a group of segments representing each unit of a time (e.g. hours, minutes, and seconds). Each segment is individually focusable and editable by the user, by typing or using the arrow keys to increment and decrement the value. This approach allows values to be formatted and parsed correctly regardless of the locale or time format, and offers an easy and error-free way to edit times using the keyboard.
Go to the [TimeInput documentation](/docs/components/time-input) to learn more about the component.
### Calendar
A Calendar consists of a grouping element containing one or more date grids (e.g. months), and a previous and next button for navigating between date ranges. Each calendar grid consists of cells containing button elements that can be pressed and navigated to using the arrow keys to select a date.
The calendar also supports selecting years and months for rapid selection.
<CodeDemo title="With Month And Year Picker" files={calendarContent.withMonthAndYearPicker} />
Go to the [Calendar documentation](/docs/components/calendar) to learn more about the component.
### RangeCalendar
A Range calendar consists of a grouping element containing one or more date grids (e.g. months), and a previous and next button for navigating through time. Each calendar grid consists of cells containing button elements that can be pressed and navigated to using the arrow keys to select a date range. Once a start date is selected, the user can navigate to another date using the keyboard or by hovering over it, and clicking it or pressing the Enter key commits the selected date range.
These new components have built-in internationalization, time zones and granularity support, they supports selecting dates
in many calendar systems used around the world, including `Gregorian`, `Hebrew`, `Indian`, `Islamic`, `Buddhist`, and more.
Dates are automatically displayed in the appropriate calendar system for the user's locale this is possible thanks to [@internationalized/date](https://react-spectrum.adobe.com/internationalized/date/) package, which
includes functions for parsing strings in multiple formats into `ZonedDateTime` objects.
Here's and example using the `Indian` calendar system:
If no `locale` is provided, it will extract the locale from the browser.
### NextUI Provider
The `NextUIProvider` component was updated to include the `createCalendar` function, which allows you to create a calendar instance with the specified locale and time zone,
and the `defaultDates` object which allows you to set global minimum and maximum dates for the components.
```jsx
// Next.js App Router example
"use client";
import {NextUIProvider, SupportedCalendars} from "@nextui-org/react";
import {CalendarDate, GregorianCalendar} from "@internationalized/date";
export interface ProvidersProps {
children: React.ReactNode;
}
function createCalendar(identifier: SupportedCalendars) {
switch (identifier) {
case "gregory":
return new GregorianCalendar();
default:
throw new Error(`Unsupported calendar ${identifier}`);
}
}
export function Providers({children}: ProvidersProps) {
const router = useRouter();
return (
<NextUIProvider
locale="hi-IN-u-ca-indian"
defaultDates={{
minDate: new CalendarDate(1900, 1, 1),
maxDate: new CalendarDate(2099, 12, 31),
}}
createCalendar={createCalendar}
>
{children}
</NextUIProvider>
);
}
```
<Spacer y={4} />
## Breaking Changes
### Removal of the `units` creation
To improve performance and reduce bundle size, we have removed the `units` creation from the
`nextui` plugin. [TailwindCSS v3.4](https://tailwindcss.com/blog/tailwindcss-v3-4) added support for `min-h-*` and `min-w-*` classes, so it is no longer needed.
How to upgrade:
1. Upgrade TailwindCSS to version 3.4 or later (if you haven't already). You can do this by running:
```bash
npm install tailwindcss@latest
```
2. Remove the `spacingUnit` configuration from your `tailwind.config.(js|ts)` file (if you have it):
```diff-js
plugins: [
nextui({
layout: {
- spacingUnit: 4,
},
}),
],
```
3. Find all `-unit` classes in your project and replace them with a `-` separator. For example, replace `p-unit-4` with `p-4`.
We are currently working on supporting multiple types of validation, including native HTML constraint validation, custom validation, and real-time validation.
Due to this reason, the requirements for displaying error messages have become more varied, and it is necessary to handle validation conditions separately from the `errorMessage`.
How to upgrade:
1. To display `errorMessage`, `isInvalid` must be set to `true`.
```diff-jsx
<Input
type="email"
label="Email"
variant="bordered"
defaultValue="junior2nextui.org"
+ isInvalid={true}
errorMessage="Please enter a valid email"
className="max-w-xs"
/>
```
That's it! Your project should now be using the latest version of TailwindCSS and NextUI.
<Spacer y={4} />
## Other Changes
**Bug Fixes**:
- Fixed an HSL color rounding issue in the theme settings to ensure accurate color representation. [PR](https://github.com/nextui-org/nextui/pull/2702) - [@wingkwong](https://github.com/wingkwong)
- Patched the "@nextui-org/autocomplete" package to fix an issue where empty items with `allowCustomValue` would not render properly due to a null node problem. [PR](https://github.com/nextui-org/nextui/pull/2674) - [@wingkwong](https://github.com/wingkwong)
- Implemented a fix in modal components to prevent carryover of IME (Input Method Editor) input when switching fields using the Tab key. [PR](https://github.com/nextui-org/nextui/pull/2709) - [@ryo-manba](https://github.com/ryo-manba)
- Enhanced accessibility by handling Tab key press event in the `ModalContent` component. [PR](https://github.com/nextui-org/nextui/pull/2709) - [@ryo-manba](https://github.com/ryo-manba)
- Fixed an issue where disabled select components could still be changed using blur and keyboard shortcuts. [PR](https://github.com/nextui-org/nextui/pull/2649) - [@wingkwong](https://github.com/wingkwong)
- Patched issues in "@nextui-org/use-aria-multiselect" and "@nextui-org/stories-utils" packages to fix a warning about `SELECT defaultSelectedKeys`. [PR](https://github.com/nextui-org/nextui/pull/2648) - [@wingkwong](https://github.com/wingkwong)
- Fixed an issue with incorrect `onChange` typing in Checkbox Group, ensuring it now correctly handles an array of strings as values. [PR](https://github.com/nextui-org/nextui/pull/2595) - [@wingkwong](https://github.com/wingkwong)
- Fixed the `label` placement issue in `Select` component if a `description` prop is used [PR](https://github.com/nextui-org/nextui/pull/2553) - [@novsource](https://github.com/novsource)
- Fixed the `originalProps` spread issue in the `Dropdown` component. [PR](https://github.com/nextui-org/nextui/pull/2450) - [@wingkwong](https://github.com/wingkwong)
**Improvements**
- Framer Motion was updated to the latest version, improving performance and reducing bundle size. [Docs](https://www.framer.com/motion/guide-reduce-bundle-size/) [PR](https://github.com/nextui-org/nextui/pull/2464) - [@mezotv](https://github.com/mezotv)
- `LazyMotion` was added to all components that use Framer Motion, improving performance by only loading the required motion components.
- We removed the custom `units` creation from the `nextui` plugin, it is no longer needed with TailwindCSS v3.4 and above. [PR](https://github.com/nextui-org/nextui/pull/2713) - [@jrgarciadev](https://github.com/jrgarciadev)
- Updated `framer-motion` package across various components and utilities to version `11.0.22` for enhanced performance and consistency. [PR](https://github.com/nextui-org/nextui/pull/2596) - [@wingkwong](https://github.com/wingkwong)
- Ensured compatibility with `react@18.2.0` and `react-dom@18.2.0` across the board. [PR](https://github.com/nextui-org/nextui/pull/2596) - [@wingkwong](https://github.com/wingkwong)
- Introduced patches for NextUI components to improve animations, including support for keyframes with spring and inertia animations. [PR](https://github.com/nextui-org/nextui/pull/2596) - [@wingkwong](https://github.com/wingkwong)
- Improved handling of numeric keys in the multi-select component to ensure consistent behavior. [PR](https://github.com/nextui-org/nextui/pull/2589) - [@wingkwong](https://github.com/wingkwong)
- Updated the version of react-aria to include the latest changes as detailed in the [2024-02-13 release](https://react-spectrum.adobe.com/releases/2024-02-13.html). [PR](https://github.com/nextui-org/nextui/pull/2561) - [@ryo-manba](https://github.com/ryo-manba)
- Added support for custom class names in the `AvatarGroup` component, enhancing flexibility in styling. [PR](https://github.com/nextui-org/nextui/pull/2669) - [@wingkwong](https://github.com/wingkwong)
- Introduced a `count` slot to the `AvatarGroup` for more customized rendering. [PR](https://github.com/nextui-org/nextui/pull/2669) - [@wingkwong](https://github.com/wingkwong)
- Improved the `AvatarGroup` component's count rendering logic for better performance and flexibility. [PR](https://github.com/nextui-org/nextui/pull/2669) - [@wingkwong](https://github.com/wingkwong)
- Add RTL support to the kbd component. [PR](https://github.com/nextui-org/nextui/pull/2482) - [@mrbadri](https://github.com/mrbadri)
- Add RTL support to the Select component. [PR](https://github.com/nextui-org/nextui/pull/2485) - [@mrbadri](https://github.com/mrbadri)
- Add RTL support to the avatar group componen. [PR](https://github.com/nextui-org/nextui/pull/2498) - [@mrbadri](https://github.com/mrbadri)
- Add RTL support to the Table component. [PR](https://github.com/nextui-org/nextui/pull/2472) - [@mrbadri](https://github.com/mrbadri)
**Documentation**:
- Updated documentation to reflect the new features and changes in the `AvatarGroup` component.
- Added support for the "bun" package manager across documentation and components. [PR](https://github.com/nextui-org/nextui/pull/2625) - [@sudongyuer](https://github.com/sudongyuer)
- [Kapa.ai](https://www.kapa.ai/) widget was added to the documentation to provide AI support for users. [PR](https://github.com/nextui-org/nextui/pull/2428) - [@wingkwong](https://github.com/sudongyuer)
- Layout docs updated to remove the `units` configuration from the `tailwind.config.(js|ts)` file.
Special thanks to NextUI Team members [@kuri-sun](https://github.com/kuri-sun), [@ryo-manba](https://github.com/ryo-manba),
[@tianenpang](https://github.com/tianenpang), [@smultar](https://github.com/smultar) and contributors for their contributions to this release.
For a full list of changes, please refer to the [release notes](https://github.com/nextui-org/nextui/releases/tag/%40nextui-org%2Freact%402.3.0).
<Spacer y={6} />
We hope you enjoy these new components and the new features. We're excited to see what you build with them!
Thanks for reading and happy coding! 🚀
---
## Community
We're excited to see the community adopt NextUI, raise issues, and provide feedback.
Whether it's a feature request, bug report, or a project to showcase, please get involved!
<Community />
## Contributing
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.md) to learn how you can contribute to this project.
We are excited to announce the latest update to NextUI, version **2.4.0**! This release introduces 60+ bug fixes, dependencies upgrades, improvements in API and CLI and more.
## What's New in v2.4.0?
- [Disable Animations Globally](#disable-animations-globally) - Allows users to disable animation globally via NextUIProvider
- [API Improvements](#api-improvements) - Includes several props like `disableRipple`, `skipFramerMotionAnimations` and `validationBehavior`
- [CLI Improvements](#cli-improvements) - Includes new command options and optimizes performance
- [React Aria Packages Upgrades](#react-aria-packages-upgrades) - Upgrades and fixes the exact versions of React Aria
- [Other Changes](#other-changes) - Includes styling improvements, accessibility, usability enhancements and over 60 bug fixes across different component packages
<Spacer y={4} />
Upgrade today by running one of the following commands:
<Spacer y={4} />
<PackageManagers
commands={{
cli: "nextui upgrade",
npm: "npx nextui-cli@latest upgrade",
}}
/>
<Spacer y={4} />
## Disable Animations Globally
NextUI components are animated by default and can be disabled by setting the prop `disableAnimation` individually. Since v2.4.0, you can globally disable the animation by setting `disableAnimation` to `NextUIProvider`.
```tsx
"use client";
import {type ReactNode} from "react";
import {NextUIProvider} from "@nextui-org/react";
export function AppProvider(props: AppProviderProps) {
By default, there is a ripple effect on press in Button and Card component and can be disabled by setting the prop `disableRipple` individually. Since v2.4.0, it can be disabled globally by setting `disableRipple` to `NextUIProvider`.
```tsx
"use client";
import {type ReactNode} from "react";
import {NextUIProvider} from "@nextui-org/react";
export function AppProvider(props: AppProviderProps) {
We can control whether `framer-motion` animations are skipped within the application. This property is automatically enabled (`true`) when the `disableAnimation` prop is set to `true`, effectively skipping all `framer-motion` animations. To retain `framer-motion` animations while using the `disableAnimation` prop for other purposes, set this to `false`. However, note that animations in NextUI Components are still omitted if the `disableAnimation` prop is `true`.
```tsx
"use client";
import {type ReactNode} from "react";
import {NextUIProvider} from "@nextui-org/react";
export function AppProvider(props: AppProviderProps) {
We can set `validationBehavior` to either `native` or `aria` to control whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA. If it is not specified, `aria` will be used by default.
```tsx
"use client";
import {type ReactNode} from "react";
import {NextUIProvider} from "@nextui-org/react";
export function AppProvider(props: AppProviderProps) {
We've refactored the init flow view to provide a better user experience.
The latest flow view output:
```bash
┌ Create a new project
│
◇ Select a template (Enter to select)
│ ● App (A Next.js 14 with app directory template pre-configured with NextUI (v2) and Tailwind CSS.)
│ ○ Pages (A Next.js 14 with pages directory template pre-configured with NextUI (v2) and Tailwind CSS.)
│ ○ Vite (A Vite template pre-configured with NextUI (v2) and Tailwind CSS.)
│
◇ New project name (Enter to skip with default name)
│ my-nextui-app
│
◇ Select a package manager (Enter to select)
│ ● npm
│ ○ yarn
│ ○ pnpm
│ ○ bun
│
◇ Template created successfully!
│
◇ Next steps ───────╮
│ │
│ cd my-nextui-app │
│ npm install │
│ │
├────────────────────╯
│
└ 🚀 Get started with npm run dev
```
### Add Vite Template
We've introduced a new Vite template pre-configured with NextUI v2 and TailwindCSS. The following command is to initialize a new Vite project named `my-vite-app`.
```bash
nextui init my-vite-app -t vite
```
### Package Manager Flag
We've introduced a new flag `-p` (or `--package`) to init command to allow users to choose the package manager to use for the new project. By default, `npm` is used. For example, the following command will initialize a new NextUI project with the app template named my-nextui-app using pnpm package manager.
```bash
nextui init my-nextui-app -t app -p pnpm
```
### no-cache Flag
We've introduced a new flag `--no-cache` to allow users to disable the cache. By default, the data will be cached for 30 mins after the first request. It is useful when the data is cached, and you wish to upgrade to the new version just released after the first request. In this way, you can run the following command
```bash
nextui --no-cache upgrade
```
### Upgrade Version Output
You can now run the upgrade command and see the summary version of the package you are upgrading to.
The `doctor` command now checks for peerDependencies and displays the incorrect peerDependencies. (See [nextui-org/nextui#2954](https://github.com/nextui-org/nextui/issues/2954) for more).
<Spacer y={4} />
## React Aria Packages Upgrades
We've upgraded and fixed React Aria packages dependencies across our components. This update focuses on enhancing accessibility, ensuring better compatibility with the latest versions of React Aria, and resolving previously reported bugs.
<Spacer y={4} />
## Breaking Changes
### Export improved `cn` utility
> If you are using it from `@nextui-org/react`, no changes are required.
The new `cn` utility exported from the `@nextui-org/theme` package includes `tailwind-merge` to avoid conflicts between tailwindcss classes overrides and includes the config for NextUI custom classes.
If you are using the `cn` utility from the `@nextui-org/system`,
```diff-tsx
-import {cn} from "@nextui-org/system"
```
or `@nextui-org/system-rsc` package,
```diff-tsx
-import {cn} from "@nextui-org/system-rsc"
```
you need to update the import as follows:
```diff-tsx
+ import {cn} from "@nextui-org/theme"
```
<Spacer y={4} />
### Validation Behavior
Since v2.4.0, we've changed the default validation behavior to `aria` which means no native validation is applied. If you wish to use the native validation, you can set `validationBehavior` to `native` to the input components or set it to the Provider as stated above.
For those who use `validationBehavior="aria"`, `validate` will be no longer applied since it is only for native validation. Therefore, you need to switch to use `isInvalid` prop instead.
- Fixed focus on the first item when pressing Space / Enter key on dropdown menu open. [PR](https://github.com/nextui-org/nextui/pull/2970) - [@wingkwong](https://github.com/wingkwong)
- Fixed inputting spaces in textarea inside a Table row. [PR](https://github.com/nextui-org/nextui/pull/3020) - [@wingkwong](https://github.com/wingkwong)
- Fixed onSelectionChange can handle number [PR](https://github.com/nextui-org/nextui/pull/2937) - [@ryo-manba](https://github.com/ryo-manba)
- Fixed update type definition to prevent primitive values as items [PR](https://github.com/nextui-org/nextui/pull/2938) - [@ryo-manba](https://github.com/ryo-manba)
- Fixed display placeholder text when unselected for controlled. [PR](https://github.com/nextui-org/nextui/pull/3081) - [@ryo-manba](https://github.com/ryo-manba)
- Fixed the inert attribute in `CalendarMonth` and `CalendarPicker`. [PR](https://github.com/nextui-org/nextui/pull/3054) - [@ShrinidhiUpadhyaya](https://github.com/ShrinidhiUpadhyaya)
- Fixed hiding of unavailable dates in RangeCalendar. [PR](https://github.com/nextui-org/nextui/pull/3054) - [@ShrinidhiUpadhyaya](https://github.com/ShrinidhiUpadhyaya)
- Fixed calendar header controlled state on DatePicker. [PR](https://github.com/nextui-org/nextui/pull/2845) - [@chirokas](https://github.com/chirokas)
- Fixed 'Tap to click' behavior on macOS for Accordion and Tab. [PR](https://github.com/nextui-org/nextui/pull/2725) - [@ericfabreu](https://github.com/ericfabreu)
- Fixed incorrect margin on labels for RTL required inputs. [PR](https://github.com/nextui-org/nextui/pull/2781) - [@mrbadri](https://github.com/mrbadri)
- Fixed a type error in the onKeyDown event handler for the menu component. [PR](https://github.com/nextui-org/nextui/pull/3064) - [@Gaic4o](https://github.com/Gaic4o)
**Improvements**
- Added `destroyInactiveTabPanel` prop for Tabs component. [PR](https://github.com/nextui-org/nextui/pull/2973) - [@wingkwong](https://github.com/wingkwong)
- Added pointer-events-none to skeleton base. [PR](https://github.com/nextui-org/nextui/pull/2972) - [@wingkwong](https://github.com/wingkwong)
- Removed unnecessary origin-bottom in button. [PR](https://github.com/nextui-org/nextui/pull/2990) - [@wingkwong](https://github.com/wingkwong)
- Set overflow visible after skeleton loaded. [PR](https://github.com/nextui-org/nextui/pull/2986) - [@wingkwong](https://github.com/wingkwong)
- Kept date picker style consistent for different variants. [PR](https://github.com/nextui-org/nextui/pull/2901) - [@wingkwong](https://github.com/wingkwong)
- Calculated the correct value on mark click. [PR](https://github.com/nextui-org/nextui/pull/3017) - [@wingkwong](https://github.com/wingkwong)
- Added the correct peerDep version [PR](https://github.com/nextui-org/nextui/pull/3014) - [@winchesHe](https://github.com/winchesHe)
- Added missing export of TableRowProps type. [PR](https://github.com/nextui-org/nextui/pull/2866) - [@sapkra](https://github.com/sapkra)
- Changed validationBehavior from native to aria by default, with the option to change via props. [PR](https://github.com/nextui-org/nextui/pull/2987) - [@ryo-manba](https://github.com/ryo-manba)
- Made the VisuallyHidden elementType as span when the default parent element accepts only phrasing elements. [PR](https://github.com/nextui-org/nextui/pull/3013) - [@kosmotema](https://github.com/kosmotema)
- Refactored the useScrollPosition hook to improve performance and stability by using useCallback for the handler function and useRef for throttleTimeout. [PR](https://github.com/nextui-org/nextui/pull/3049) - [@Gaic4o](https://github.com/Gaic4o)
**Documentation**:
- Updated documentation to reflect the new features and changes in the components, API references, and CLI.
Special thanks to NextUI Team members [@kuri-sun](https://github.com/kuri-sun), [@ryo-manba](https://github.com/ryo-manba),
[@tianenpang](https://github.com/tianenpang), [@smultar](https://github.com/smultar) and contributors for their contributions to this release.
For a full list of changes, please refer to the [release notes](https://github.com/nextui-org/nextui/releases/tag/%40nextui-org%2Freact%402.4.0).
<Spacer y={6} />
Thanks for reading and happy coding! 🚀
---
## Community
We're excited to see the community adopt NextUI, raise issues, and provide feedback.
Whether it's a feature request, bug report, or a project to showcase, please get involved!
<Community />
## Contributing
PR's on NextUI are always welcome, please see our [contribution guidelines](https://github.com/nextui-org/nextui/blob/main/CONTRIBUTING.md) to learn how you can contribute to this project.
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
constApp=`import {Calendar} from "@nextui-org/react";
export default function App() {
return (
<Calendar
aria-label="Date (Page Behaviour)"
pageBehavior="single"
/>
);
}`;
constreact={
"/App.jsx":App,
};
exportdefault{
...react,
};
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.