835 Commits

Author SHA1 Message Date
Shrinidhi Upadhyaya
bf68c91b9a
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>
2024-05-24 16:21:48 -03:00
Eric Abreu
8048dcc0c3
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
2024-05-24 16:20:44 -03:00
աӄա
3b14c21e02
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
2024-05-24 16:19:46 -03:00
Ryo Matsukawa
540aa2124b
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>
2024-05-22 17:50:39 -03:00
Artem Pitikin
06ecd213cf
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
2024-05-20 21:03:29 +08:00
Ryo Matsukawa
a2133009f7
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
2024-05-19 16:49:06 -03:00
Ryo Matsukawa
c8f792ccd7
fix(component): update type definition to prevent primitive values as items (#2953)
* fix: update type definition to prevent primitive values as items

* fix: typecheck
2024-05-19 16:42:29 -03:00
աӄա
7df2c71ecc
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
2024-05-19 16:40:28 -03:00
աӄա
ca8554ccff
feat(date-picker): add missing ref to input wrapper (#3011)
* fix(date-picker): add missing ref to input wrapper

* feat(changeset): add changeset
2024-05-19 10:23:03 -03:00
աӄա
5329de42d2
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
2024-05-19 10:12:57 -03:00
աӄա
9d63259eea
fix(table): v2 input/textarea don't allow spaces inside a table (#3020)
* fix(table): set onKeyDownCapture to undefined

* feat(changeset): add changeset
2024-05-19 10:05:51 -03:00
Junior Garcia
422770cc6b
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
2024-05-12 23:13:54 -03:00
աӄա
e34c5e307d
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
2024-05-12 23:00:28 -03:00
Shawn Dong
10497f1a97
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>
2024-05-12 22:38:56 -03:00
աӄա
633f9d208b
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
2024-05-04 13:18:33 -03:00
աӄա
76f4dd8e76
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
2024-05-04 13:17:04 -03:00
աӄա
dc245874ce
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>
2024-05-04 13:09:56 -03:00
Junior Garcia
73d9695994
refactor(root): react aria packages fixed (#2944) 2024-05-04 12:17:21 -03:00
աӄա
9acf3eada0
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
2024-05-03 16:24:29 -03:00
Junior Garcia
e3afa4789a
Cn utility refactor (#2915)
* refactor(core): cn utility adjusted and moved to the theme package

* chore(root): changeset

* fix(storybook): stories that used cn
2024-04-29 17:34:01 -03:00
Paul Tiedtke
5f5ad7a1dd
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>
2024-04-29 15:21:20 +08:00
աӄա
2a2a0692ca
fix(date-picker): keep date picker style consistent for different variants (#2908) 2024-04-29 15:20:24 +08:00
Shrinidhi Upadhyaya
c83ff382b9
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>
2024-04-29 13:16:22 +08:00
Junior Garcia
aba1716edc
chore(root): reat-aria packages updated (#2889) 2024-04-28 11:55:52 -03:00
github-actions[bot]
1a033fe6f8
ci(changesets): version packages (#2825)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-24 17:04:22 -03:00
Junior Garcia
765c04e2a5
fix(ripple): z-index adjusted (#2853)
* fix(ripple): z-index adjusted

* fix(ripple): z-index changed
2024-04-24 16:37:50 -03:00
Junior Garcia
e9fef9bd92
fix(calendar): fix #2820 #2857 maximum update depth exceeded on Calendar & RangeCalendar (#2861) 2024-04-24 16:17:40 -03:00
Ryo Matsukawa
308b32c0f1
fix(date-picker): filter out non-DOM props to prevent console errors (#2833)
* fix(date-picker): filter out non-DOM props to prevent console errors

* chore: added test to confirm no warning
2024-04-22 15:59:58 -03:00
աӄա
3552353203
fix(input): isClearable & add test cases to input (#2796)
* 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
2024-04-22 15:30:26 -03:00
Ryo Matsukawa
1cc5215ce6
fix: missing aria labels in date range picker (#2832)
* fix(date-range-picker): ensure label props are reflected in aria labels

* docs: added missing label to date range picker

* chore: add changesets

* Update .changeset/gentle-pigs-admire.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-04-22 21:38:22 +08:00
black197
1dacf52f30
fix(input): keep input component's position in innerWrapper steady (#2072)
* fix(input): make position of `input` steady (#2069)

* chore: changeset

* refactor(input): remove key prop
2024-04-21 20:12:34 +08:00
CAEB Wallace
6b96ea9c9c
fix(progress): turn twMerge true to fix custom styling (#2668)
* 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>
2024-04-21 18:46:38 +08:00
Paul Tiedtke
d532a9da7a
fix: missing export of TableRowProps type (#2584)
* fix: missing export of TableRowProps type

* chore(changeset): add changeset

---------

Co-authored-by: աɨռɢӄաօռɢ <wingkwong.code@gmail.com>
2024-04-21 17:40:04 +08:00
github-actions[bot]
51095b1628
ci(changesets): version packages (#2787) 2024-04-18 19:47:12 -03:00
աӄա
2bc1d1a58b
feat(dropdown): test cases (#2786)
* 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>
2024-04-18 13:59:58 -03:00
Junior Garcia
183a4a6cfd
fix(popover): trigger disabled prop warning (#2784) 2024-04-18 13:22:31 -03:00
github-actions[bot]
a644544dfb
ci(changesets): version packages (#2776)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-18 08:56:43 -03:00
Junior Garcia
9e5dd8ce37 fix(popover): ref not beign passed 2024-04-18 08:48:42 -03:00
chirokas
69f713cb05
fix(checkbox): omit non-react props on checkbox-group (#2772) 2024-04-18 08:20:35 -03:00
github-actions[bot]
d820d9397a
ci(changesets): version packages (#2767)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-17 23:57:49 -03:00
աӄա
f89356691c
fix(popover): isDisabled prop on a DOM element (#2741)
* fix(popover): isDisabled prop on a DOM element

* refactor(popover): filter non-react props

* fix(dropdown): tests

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-17 23:50:42 -03:00
Junior Garcia
6b56e43a35
Fix DropdownItem onPress (#2746)
* chore(dropdown): missing events added

* fix(menu): item selection events

* chore(menu): changeset
2024-04-17 23:27:36 -03:00
github-actions[bot]
4ca6e2c1f6
ci(changesets): version packages (#2745)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-17 11:03:40 -03:00
Shrinidhi Upadhyaya
2126ea1863
fix(table): add empty content only when table size is 0 #2742 (#2747)
* fix(table): add empty content only when table size is 0 #2742

* fix(table): added changeset

---------

Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de>
2024-04-17 10:56:47 -03:00
աӄա
cadbb30cfb
fix(checkbox): checkbox controlled state (#2754)
* fix(checkbox): checkbox controlled state

* feat(checkbox): add @nextui-org/use-callback-ref

* chore(deps): pnpm-lock.yaml

* fix(checkbox): handle checkbox group

* fix(checkbox): rely on react aria logic (#2760)

* fix(checkbox): add missing dependency in useCheckbox hook

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-17 10:43:57 -03:00
Junior Garcia
f728c0542c
fix(radio): omit non-react props on radio-group (#2761) 2024-04-17 09:47:56 -03:00
Junior Garcia
158c2aa004
refactor(calendar): cell tab index fixed, width property added (#2744)
* refactor(calendar): cell tab index fixed, width property added

* chore(date-picker): remove needless omit
2024-04-16 16:39:19 -03:00
github-actions[bot]
098d7884cf
ci(changesets): version packages (#2738)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2024-04-16 13:37:32 -03:00
Junior Garcia
60c61aaf0c
fix(modal): inside and outside scroll (#2739) 2024-04-16 13:31:35 -03:00
Junior Garcia
fdbfa1f299
fix(date-picker): invalid and disabled props removed (#2737) 2024-04-16 12:37:50 -03:00