* 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>
2024-05-27 19:51:30 -03:00
405 changed files with 24554 additions and 14778 deletions
@@ -230,7 +230,7 @@ The disabled option(s) will be displayed in the bottom of the list.
### Doctor Command add peerDependencies check
The `doctor` command now checks for peerDependencies and displays the incorrect peerDependencies, relation: [nextui-org/nextui#2954](https://github.com/nextui-org/nextui/issues/2954).
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} />
@@ -268,6 +268,20 @@ you need to update the import as follows:
<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.
By default, a message `No results found.` will be shown if there is no result matching a query with your filter. You can customize the empty content message by modifying the `emptyContent` in `listboxProps`.
By default, `Autocomplete` uses a `"contains"` function from [useFilter](https://react-spectrum.adobe.com/react-aria/useFilter.html) to filter the
@@ -254,7 +261,7 @@ The following example uses the `defaultFilter` prop to filter the list of option
### Asynchronous Filtering
Autocomplete supports asynchronous filtering, in the example below we are using the [useAyncList](https://react-spectrum.adobe.com/react-stately/useAsyncList.html) function
Autocomplete supports asynchronous filtering, in the example below we are using the [useAsyncList](https://react-spectrum.adobe.com/react-stately/useAsyncList.html) function
from [react-aria](https://react-spectrum.adobe.com) to handle asynchronous loading and filtering of data from a server.
<PackageManagers
@@ -275,6 +282,7 @@ import {useAsyncList} from "@react-stately/data";
typescriptStrict={true}
title="Asynchronous Filtering"
showPreview={false}
showOpenInCodeSandbox={false}
highlightedLines="27-29,33"
files={autocompleteContent.asyncFiltering}
/>
@@ -301,6 +309,7 @@ import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";
@@ -163,7 +162,7 @@ You can customize any part of the avatar by using the `classNames` prop, each `s
- **data-focus-visible**:
When the avatar is being focused with the keyboard. Based on [useFocusRing](https://react-spectrum.adobe.com/react-aria/useFocusRing.html), it is applied when `isFocusable` is `true` or when the `as` property is assigned as `button`.
@@ -109,7 +109,7 @@ In case you need to customize the checkbox even further, you can use the `useChe
| validationState | `valid` \| `invalid` | Whether the inputs should display its "valid" or "invalid" visual styling. (**Deprecated**) use **isInvalid** instead. | - |
| description | `ReactNode` | The checkbox group description. | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | The checkbox group error message. | - |
| validate | `(value: string[]) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| validate | `(value: string[]) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Validation errors are displayed upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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.| `aria` |
| isDisabled | `boolean` | Whether the checkbox group is disabled. | `false` |
| isRequired | `boolean` | Whether user checkboxes are required on the input before form submission. | `false` |
@@ -13,8 +13,6 @@ Checkboxes allow users to select multiple items from a list of individual items,
---
## Installation
<PackageManagers
@@ -70,6 +68,8 @@ The `isIndeterminate` prop sets a `Checkbox` to an indeterminate state, overridi
### Custom Check Icon
> By default, `IconProps` will be passed to your icon component. Please make sure that `isSelected`, `isIndeterminate`, and `disableAnimation` are not passed to a DOM element.
You can also pass an error message as a function. This allows for dynamic error message handling based on the [ValidationResult]((https://github.com/adobe/react-spectrum/blob/1cacbf1d438675feb3859fee54b17e620b458d9c/packages/%40react-types/shared/src/inputs.d.ts#L44-L51)).
You can use the `value` and `onChange` properties to control the input value.
@@ -243,7 +247,7 @@ import {parseZonedDateTime} from "@internationalized/date";
- **description**: The description of the date-input.
- **errorMessage**: The error message of the date-input.
<Spacer y={4} />{" "}
<Spacer y={4} />
## Data Attributes
@@ -299,7 +303,7 @@ import {parseZonedDateTime} from "@internationalized/date";
| locale | `string` | The locale to display and edit the value according to. | - |
| description | `ReactNode` | A description for the date input. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Display validation errors upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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.| `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date input. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date input. | - |
You can also pass an error message as a function. This allows for dynamic error message handling based on the [ValidationResult]((https://github.com/adobe/react-spectrum/blob/1cacbf1d438675feb3859fee54b17e620b458d9c/packages/%40react-types/shared/src/inputs.d.ts#L44-L51)).
<CodeDemo title="With Month and Year Pickers" files={datePickerContent.withMonthAndYearPickers} />
@@ -266,7 +270,7 @@ import {I18nProvider} from "@react-aria/i18n";
- **timeInputLabel**: The time-input component's label element.
- **timeInput**: The time-input component element.
<Spacer y={4} />{" "}
<Spacer y={4} />
## Data Attributes
@@ -285,7 +289,7 @@ import {I18nProvider} from "@react-aria/i18n";
- **data-disabled**:
When the date-picker is disabled. Based on `isDisabled` prop.
<Spacer y={4} />{" "}
<Spacer y={4} />
## Accessibility
@@ -295,7 +299,7 @@ import {I18nProvider} from "@react-aria/i18n";
- Date segments are editable using an easy to use numeric keypad, and all interactions are accessible using touch-based screen readers.
- Integrates with HTML forms, supporting required, minimum and maximum values, unavailable dates, custom validation functions, realtime validation, and server-side validation errors
<Spacer y={4} />{" "}
<Spacer y={4} />
## API
@@ -313,7 +317,7 @@ import {I18nProvider} from "@react-aria/i18n";
| placeholderValue | `ZonedDateTime` \| `CalendarDate` \| `CalendarDateTime` \| `undefined` \| `null` | The placeholder of the date-picker. | - |
| description | `ReactNode` | A description for the date-picker. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Display validation errors upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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.| `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date-picker. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date-picker. | - |
@@ -342,6 +346,7 @@ import {I18nProvider} from "@react-aria/i18n";
| timeInputProps | `TimeInputProps` | Props to be passed to the time input component. | `{ size: "sm", variant: "light", radius: "full", isIconOnly: true }` |
| disableAnimation | `boolean` | Whether to disable all animations in the date picker. Including the DateInput, Button, Calendar, and Popover. | `false` |
| classNames | `Record<"base" \| "selectorButton" \| "selectorIcon" \| "popoverContent" \| "calendar" \| "calendarContent" \| "timeInputLabel" \| "timeInput", string>` | Allows to set custom class names for the date-picker slots. | - |
| dateInputClassNames | `Record<"base"| "label"| "inputWrapper"| "innerWrapper"| "input"| "helperWrapper"| "description"| "errorMessage", string>` | Allows to set custom class names for the [date input slots](/docs/components/date-input#slots). | - |
You can also pass an error message as a function. This allows for dynamic error message handling based on the [ValidationResult]((https://github.com/adobe/react-spectrum/blob/1cacbf1d438675feb3859fee54b17e620b458d9c/packages/%40react-types/shared/src/inputs.d.ts#L44-L51)).
@@ -354,7 +362,7 @@ import {I18nProvider} from "@react-aria/i18n";
| placeholderValue | `ZonedDateTime` \| `CalendarDate` \| `CalendarDateTime` \| `undefined` \| `null` | The placeholder of the date-range-picker. | - |
| description | `ReactNode` | A description for the date-range-picker. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: RangeValue<MappedDateValue<DateValue>>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: RangeValue<MappedDateValue<DateValue>>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Display validation errors upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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. | `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date-range-picker. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date-range-picker. | - |
| onAction | `(key: React.Key) => void` | Handler that is called when an item is selected. |
| onSelectionChange | `(keys: React.Key[]) => void` | Handler that is called when the selection changes. |
| onSelectionChange | `(keys: "all" \| Set<React.Key> & {anchorKey?: string; currentKey?: string}) => void` | Handler that is called when the selection changes. |
| onClose | `() => void` | Handler that is called when the menu should close after selecting an item. |
@@ -155,7 +155,7 @@ In case you need to customize the input even further, you can use the `useInput`
files={inputContent.customImpl}
/>
<Spacer y={4} />{" "}
<Spacer y={4} />
## Data Attributes
@@ -178,7 +178,7 @@ In case you need to customize the input even further, you can use the `useInput`
- **data-disabled**:
When the input is disabled. Based on `isDisabled` prop.
<Spacer y={4} />{" "}
<Spacer y={4} />
## Accessibility
@@ -188,7 +188,7 @@ In case you need to customize the input even further, you can use the `useInput`
- Required and invalid states exposed to assistive technology via ARIA.
- Support for description and error message help text linked to the input via ARIA.
<Spacer y={4} />{" "}
<Spacer y={4} />
## API
@@ -207,7 +207,7 @@ In case you need to customize the input even further, you can use the `useInput`
| placeholder | `string` | The placeholder of the input. | - |
| description | `ReactNode` | A description for the input. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | An error message for the input. It is only shown when `isInvalid` is set to `true` | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Validation errors are displayed upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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.| `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the input. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the input. | - |
| description | `ReactNode` | Radio group description . | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | Radio group error message. | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Validation errors are displayed upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - |
| validationBehavior | `native` \| `aria` | 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.| `aria` |
| isDisabled | `boolean` | Whether the radio group is disabled. | `false` |
| isRequired | `boolean` | Whether user checkboxes are required on the input before form submission. | `false` |
@@ -226,7 +226,7 @@ Here's the example to customize `topContent` and `bottomContent` to have some pr
| isDateUnavailable | `(date: DateValue) => boolean` | Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. | - | |
| createCalendar | `(calendar: SupportedCalendars) => Calendar \| null` | This function helps to reduce the bundle size by providing a custom calendar system. You can also use the NextUIProvider to provide the createCalendar function to all nested components. | `all<br> calendars` | |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the field. | - | |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError | true | null | undefined` | Validate time input values when committing (e.g. on blur), and return error messages for invalid values. | - | |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), returning error messages for invalid values. Validation errors are displayed upon form submission if `validationBehavior` is set to `native`. For real-time validation, use the `isInvalid` prop.| - | |
| hideDisabledDates | `boolean` | Whether to hide the disabled or invalid dates. | `false` | |
| disableAnimation | `boolean` | Whether to disable the animation of the calendar. | `false` | |
@@ -285,6 +285,14 @@ the popover and listbox components.
- **data-filled**:
Indicates if the select has a value, is focused, has start/end content or is open.
- **data-has-value**:
Indicates if the select has selected item(s).
- **data-has-label**:
Indicates if the select has a label. Based on `label` prop.
- **data-has-helper**:
Indicates if the select has helper text. Based on `errorMessage` or `description` prop.
- **data-invalid**:
Indicates if the select is invalid. Based on `isInvalid` prop.
`Select` has the following attributes on the `trigger` element:
@@ -351,9 +359,9 @@ the popover and listbox components.
| children\* | `ReactNode[]` | The children to render. Usually a list of `SelectItem` and `SelectSection` elements. | - |
| items | [`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) | Item objects in the select. (dynamic) | - |
| selectionMode | `single` \| `multiple` | The type of selection that is allowed in the collection. | - |
| selectedKeys | `all` \| `React.Key[]` | The currently selected keys in the collection (controlled). | - |
| disabledKeys | `all` \| `React.Key[]` | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | - |
| defaultSelectedKeys | `all` \| `React.Key[]` | The initial selected keys in the collection (uncontrolled). | - |
| selectedKeys | `all` \| `Iterable<React.Key>` | The currently selected keys in the collection (controlled). | - |
| disabledKeys | `Iterable<React.Key>` | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | - |
| defaultSelectedKeys | `all` \| `Iterable<React.Key>` | The initial selected keys in the collection (uncontrolled). | - |
| variant | `flat` \| `bordered` \| `faded` \| `underlined` | The variant of the select. | `flat` |
| color | `default` \| `primary` \| `secondary` \| `success` \| `warning` \| `danger` | The color of the select. | `default` |
| size | `sm` \| `md` \| `lg` | The size of the select. | `md` |
@@ -392,7 +400,7 @@ the popover and listbox components.
@@ -223,6 +223,7 @@ sure to install it before using the sorting feature.
npm: "npm install @react-stately/data",
yarn: "yarn add @react-stately/data",
pnpm: "pnpm add @react-stately/data",
bun: "bun add @react-stately/data",
}}
/>
@@ -288,6 +289,23 @@ It is also possible to use the [Pagination](/components/pagination) component to
Table also supports infinite pagination. To do so, you can use the `useAsyncList` hook from [@react-stately/data](https://react-spectrum.adobe.com/react-stately/useAsyncList.html) and
@@ -255,7 +255,6 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to
| disabledKeys | `React.Key[]` | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | - |
| selectedKey | `React.Key` | The key for the currently selected item. | - |
| defaultSelectedKey | `React.Key` | The key for the initially selected item. | - |
| disallowEmptySelection | `boolean` | Whether the tabs should allow empty selection. | `false` |
| shouldSelectOnPressUp | `boolean` | Whether the tabs selection should occur on press up instead of press down. | `true` |
| keyboardActivation | `automatic` \| `manual` | Whether tabs are activated automatically on focus or manually. | `automatic` |
| motionProps | [MotionProps](#motion-props) | The props to modify the cursor framer motion animation. Use the `variants` API to create your own animation. | - |
@@ -265,6 +264,7 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to
| classNames | `Record<"base"| "tabList"| "tab"| "tabContent"| "cursor" | "panel", string>` | Allows to set custom class names for the card slots. | - |
| placement | `top` \| `bottom` \| `start` \| `end` | The position of the tabs. | `top` |
| isVertical | `boolean` | Whether the tabs are vertical. | `false` |
| destroyInactiveTabPanel | `boolean` | Whether to destroy inactive tab panel when switching tabs. Inactive tab panels are inert and cannot be interacted with. | `true` |
### Tabs Events
@@ -286,7 +286,6 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to
| ping | `string` | A space-separated list of URLs to ping when the link is followed. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#ping). | - |
| referrerPolicy | `HTMLAttributeReferrerPolicy` | How much of the referrer to send when following the link. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy). | - |
| shouldSelectOnPressUp | `boolean` | Whether the tab selection should occur on press up instead of press down. | - |
| destroyInactiveTabPanel | `boolean` | Whether to destroy inactive tab panel when switching tabs. Inactive tab panels are inert and cannot be interacted with. | `true` |
#### Motion Props
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.