Compare commits

...

28 Commits

Author SHA1 Message Date
github-actions[bot] 8cd964dd14 ci(changesets): version packages (beta) (#4095) 2024-11-16 15:49:48 -03:00
Junior Garcia b9d5d49251 Feat/virtualization for autocomplete (#4094)
* feat: add react-window virtualization for autocomplete

* fix: wrong imports and wrong sizing

* fix: update pnpm lock

* chore: add test cases for large dataset (1000 and 10000 items)

* chore: move virtualized-listbox to listbox components folder, implement isVirtualized conditional

* feat: implement dynamic listboxheight n item height, add story

* chore: rename props, remove unnecessary line changes

* fix: maxHeight style 256px for default, conditional usage of virtualizer

* feat: migrate to tan-stack virtual. (todo: fix scroll shadow)

* feat: virtualization support

---------

Co-authored-by: Vincentius Roger Kuswara <vincentiusrkuswara@gmail.com>
2024-11-16 15:46:56 -03:00
Junior Garcia f81ad5ebba feat: new demo added to alert 2024-11-16 15:02:49 -03:00
github-actions[bot] 4c70a80279 ci(changesets): version packages (beta) (#4093)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-16 14:38:09 -03:00
Junior Garcia 528668db85 Beta/custom runner (#4092)
* chore: custom runner test

* chore: custom runner test

* chore: remove 2 from older changeset
2024-11-16 14:36:23 -03:00
Junior Garcia 05d39f8c86 chore: custom runner test (#4091) 2024-11-16 14:29:57 -03:00
Junior Garcia ef4da2641e chore: custom runnner added 2024-11-16 14:28:24 -03:00
github-actions[bot] a210621441 ci(changesets): version packages (beta) (#4087)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-16 11:47:16 -03:00
Junior Garcia f69fe47b5b chore: pnpm cleaned (#4086) 2024-11-16 11:45:12 -03:00
github-actions[bot] d2882d4f39 ci(changesets): version packages (beta) (#4084)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-16 11:18:03 -03:00
Junior Garcia 35058262c6 chore: new changeset (#4083) 2024-11-16 11:16:23 -03:00
Junior Garcia 7dcb718927 chore: improve navabr colors 2024-11-16 11:06:33 -03:00
Junior Garcia 3f1a11add6 chore: fix build 2024-11-16 10:58:02 -03:00
Junior Garcia f25782d4b9 feat: add number of stars and credits 2024-11-16 09:38:24 -03:00
github-actions[bot] f0520d48db ci(changesets): version packages (beta) (#4074)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-15 21:34:53 -03:00
Junior Garcia 70dc759838 feat: alert styles improved (#4073) 2024-11-15 21:30:46 -03:00
github-actions[bot] b2e8d9bc91 ci(changesets): version packages (beta) (#4072)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-15 16:57:48 -03:00
Junior Garcia 31349c178b feat: alert styles improved (#4071) 2024-11-15 16:55:51 -03:00
github-actions[bot] 6b341eb2e1 ci(changesets): version packages (beta) (#4058) 2024-11-14 19:33:44 -03:00
Junior Garcia d947b92833 feat: drawer improvements (#4057) 2024-11-14 19:31:38 -03:00
github-actions[bot] 08f1f1ed82 ci(changesets): version packages (beta) (#4056)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-14 17:02:07 -03:00
Junior Garcia 0f55c491b7 feat: alert design improved (#4054) 2024-11-14 16:59:59 -03:00
github-actions[bot] 27ebcbe252 ci(changesets): version packages (beta) (#4041)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-13 16:48:05 -03:00
աӄա 5339b2571e fix: support inert value with boolean type for react 19 (#4039) 2024-11-13 16:30:17 -03:00
github-actions[bot] a0af4c901c ci(changesets): version packages (beta) (#4012)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 18:20:52 -03:00
Maharshi Alpesh 54be700e04 fix(theme): making select and input themes consistent (#3881) 2024-11-07 10:30:10 -03:00
github-actions[bot] 2038fd6e1d ci(changesets): version packages (beta) (#4011)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 09:36:49 -03:00
Junior Garcia ef432eb539 Beta/react 19 support (#4010)
* fix: react 19 as peer dep

* fix: react 19 as peer dep

* chore: support framer-motion alpha version
2024-11-07 09:35:03 -03:00
229 changed files with 10606 additions and 3285 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"@nextui-org/drawer": patch
"@nextui-org/modal": patch
---
Drawer styles and transition improved
+86
View File
@@ -0,0 +1,86 @@
---
"@nextui-org/accordion": patch
"@nextui-org/alert": patch
"@nextui-org/autocomplete": patch
"@nextui-org/avatar": patch
"@nextui-org/badge": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/button": patch
"@nextui-org/calendar": patch
"@nextui-org/card": patch
"@nextui-org/checkbox": patch
"@nextui-org/chip": patch
"@nextui-org/code": patch
"@nextui-org/date-input": patch
"@nextui-org/date-picker": patch
"@nextui-org/divider": patch
"@nextui-org/drawer": patch
"@nextui-org/dropdown": patch
"@nextui-org/image": patch
"@nextui-org/input": patch
"@nextui-org/kbd": patch
"@nextui-org/link": patch
"@nextui-org/listbox": patch
"@nextui-org/menu": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/pagination": patch
"@nextui-org/popover": patch
"@nextui-org/progress": patch
"@nextui-org/radio": patch
"@nextui-org/ripple": patch
"@nextui-org/scroll-shadow": patch
"@nextui-org/select": patch
"@nextui-org/skeleton": patch
"@nextui-org/slider": patch
"@nextui-org/snippet": patch
"@nextui-org/spacer": patch
"@nextui-org/spinner": patch
"@nextui-org/switch": patch
"@nextui-org/table": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
"@nextui-org/user": patch
"@nextui-org/react": patch
"@nextui-org/system": patch
"@nextui-org/system-rsc": patch
"@nextui-org/theme": patch
"@nextui-org/use-aria-accordion": patch
"@nextui-org/use-aria-accordion-item": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-aria-modal-overlay": patch
"@nextui-org/use-aria-multiselect": patch
"@nextui-org/use-aria-toggle-button": patch
"@nextui-org/use-callback-ref": patch
"@nextui-org/use-clipboard": patch
"@nextui-org/use-data-scroll-overflow": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-draggable": patch
"@nextui-org/use-image": patch
"@nextui-org/use-infinite-scroll": patch
"@nextui-org/use-intersection-observer": patch
"@nextui-org/use-is-mobile": patch
"@nextui-org/use-is-mounted": patch
"@nextui-org/use-measure": patch
"@nextui-org/use-pagination": patch
"@nextui-org/use-real-shape": patch
"@nextui-org/use-ref-state": patch
"@nextui-org/use-resize": patch
"@nextui-org/use-safe-layout-effect": patch
"@nextui-org/use-scroll-position": patch
"@nextui-org/use-ssr": patch
"@nextui-org/use-theme": patch
"@nextui-org/use-update-effect": patch
"@nextui-org/aria-utils": patch
"@nextui-org/dom-animation": patch
"@nextui-org/framer-utils": patch
"@nextui-org/react-rsc-utils": patch
"@nextui-org/react-utils": patch
"@nextui-org/shared-icons": patch
"@nextui-org/shared-utils": patch
"@nextui-org/test-utils": patch
---
Test new runner
+7
View File
@@ -0,0 +1,7 @@
---
"@nextui-org/calendar": patch
"@nextui-org/tabs": patch
"@nextui-org/shared-utils": patch
---
support inert value with boolean type for react 19 (#4038)
+6
View File
@@ -0,0 +1,6 @@
---
"@nextui-org/alert": patch
"@nextui-org/theme": patch
---
Alert styles improved
+11
View File
@@ -90,10 +90,12 @@
},
"changesets": [
"calm-trees-serve",
"cold-dolls-vanish",
"curly-zoos-thank",
"dirty-moles-refuse",
"dull-bags-divide",
"empty-helper-wrapper-div",
"famous-experts-buy",
"fast-horses-explode",
"few-jars-flow",
"flat-pants-accept",
@@ -107,25 +109,34 @@
"light-needles-behave",
"mean-mangos-occur",
"mighty-birds-deny",
"moody-rabbits-shop",
"neat-donkeys-accept",
"new-cougars-collect",
"pink-beans-sit",
"plenty-scissors-love",
"poor-moose-double",
"poor-sheep-repair",
"popular-pigs-begin",
"proud-chicken-impress",
"quick-geckos-punch",
"red-camels-build",
"selfish-baboons-know",
"shy-mails-live",
"silly-candles-wonder",
"sixty-ties-knock",
"slimy-cats-brush",
"slow-paws-punch",
"smooth-mayflies-wonder",
"soft-apricots-sleep",
"sour-seas-buy",
"swift-news-complain",
"tame-planes-think",
"ten-paws-relate",
"tender-buses-sort",
"thirty-cheetahs-guess",
"tricky-fans-draw",
"twelve-papayas-clean",
"twelve-trains-smile",
"two-waves-own",
"wild-jobs-explain",
"witty-socks-bathe"
+7
View File
@@ -0,0 +1,7 @@
---
"@nextui-org/autocomplete": patch
"@nextui-org/listbox": patch
"@nextui-org/theme": patch
---
Virtualization support added to Listbox & Autocomplete
+7
View File
@@ -0,0 +1,7 @@
---
"@nextui-org/alert": patch
"@nextui-org/theme": patch
"@nextui-org/shared-icons": patch
---
Alert design improved
+86
View File
@@ -0,0 +1,86 @@
---
"@nextui-org/accordion": patch
"@nextui-org/alert": patch
"@nextui-org/autocomplete": patch
"@nextui-org/avatar": patch
"@nextui-org/badge": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/button": patch
"@nextui-org/calendar": patch
"@nextui-org/card": patch
"@nextui-org/checkbox": patch
"@nextui-org/chip": patch
"@nextui-org/code": patch
"@nextui-org/date-input": patch
"@nextui-org/date-picker": patch
"@nextui-org/divider": patch
"@nextui-org/drawer": patch
"@nextui-org/dropdown": patch
"@nextui-org/image": patch
"@nextui-org/input": patch
"@nextui-org/kbd": patch
"@nextui-org/link": patch
"@nextui-org/listbox": patch
"@nextui-org/menu": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/pagination": patch
"@nextui-org/popover": patch
"@nextui-org/progress": patch
"@nextui-org/radio": patch
"@nextui-org/ripple": patch
"@nextui-org/scroll-shadow": patch
"@nextui-org/select": patch
"@nextui-org/skeleton": patch
"@nextui-org/slider": patch
"@nextui-org/snippet": patch
"@nextui-org/spacer": patch
"@nextui-org/spinner": patch
"@nextui-org/switch": patch
"@nextui-org/table": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
"@nextui-org/user": patch
"@nextui-org/react": patch
"@nextui-org/system": patch
"@nextui-org/system-rsc": patch
"@nextui-org/theme": patch
"@nextui-org/use-aria-accordion": patch
"@nextui-org/use-aria-accordion-item": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-aria-modal-overlay": patch
"@nextui-org/use-aria-multiselect": patch
"@nextui-org/use-aria-toggle-button": patch
"@nextui-org/use-callback-ref": patch
"@nextui-org/use-clipboard": patch
"@nextui-org/use-data-scroll-overflow": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-draggable": patch
"@nextui-org/use-image": patch
"@nextui-org/use-infinite-scroll": patch
"@nextui-org/use-intersection-observer": patch
"@nextui-org/use-is-mobile": patch
"@nextui-org/use-is-mounted": patch
"@nextui-org/use-measure": patch
"@nextui-org/use-pagination": patch
"@nextui-org/use-real-shape": patch
"@nextui-org/use-ref-state": patch
"@nextui-org/use-resize": patch
"@nextui-org/use-safe-layout-effect": patch
"@nextui-org/use-scroll-position": patch
"@nextui-org/use-ssr": patch
"@nextui-org/use-theme": patch
"@nextui-org/use-update-effect": patch
"@nextui-org/aria-utils": patch
"@nextui-org/dom-animation": patch
"@nextui-org/framer-utils": patch
"@nextui-org/react-rsc-utils": patch
"@nextui-org/react-utils": patch
"@nextui-org/shared-icons": patch
"@nextui-org/shared-utils": patch
"@nextui-org/test-utils": patch
---
framer-motion alpha version added
+6
View File
@@ -0,0 +1,6 @@
---
"@nextui-org/alert": patch
"@nextui-org/theme": patch
---
Alert compoentn styles improved
+86
View File
@@ -0,0 +1,86 @@
---
"@nextui-org/accordion": patch
"@nextui-org/alert": patch
"@nextui-org/autocomplete": patch
"@nextui-org/avatar": patch
"@nextui-org/badge": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/button": patch
"@nextui-org/calendar": patch
"@nextui-org/card": patch
"@nextui-org/checkbox": patch
"@nextui-org/chip": patch
"@nextui-org/code": patch
"@nextui-org/date-input": patch
"@nextui-org/date-picker": patch
"@nextui-org/divider": patch
"@nextui-org/drawer": patch
"@nextui-org/dropdown": patch
"@nextui-org/image": patch
"@nextui-org/input": patch
"@nextui-org/kbd": patch
"@nextui-org/link": patch
"@nextui-org/listbox": patch
"@nextui-org/menu": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/pagination": patch
"@nextui-org/popover": patch
"@nextui-org/progress": patch
"@nextui-org/radio": patch
"@nextui-org/ripple": patch
"@nextui-org/scroll-shadow": patch
"@nextui-org/select": patch
"@nextui-org/skeleton": patch
"@nextui-org/slider": patch
"@nextui-org/snippet": patch
"@nextui-org/spacer": patch
"@nextui-org/spinner": patch
"@nextui-org/switch": patch
"@nextui-org/table": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
"@nextui-org/user": patch
"@nextui-org/react": patch
"@nextui-org/system": patch
"@nextui-org/system-rsc": patch
"@nextui-org/theme": patch
"@nextui-org/use-aria-accordion": patch
"@nextui-org/use-aria-accordion-item": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-aria-modal-overlay": patch
"@nextui-org/use-aria-multiselect": patch
"@nextui-org/use-aria-toggle-button": patch
"@nextui-org/use-callback-ref": patch
"@nextui-org/use-clipboard": patch
"@nextui-org/use-data-scroll-overflow": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-draggable": patch
"@nextui-org/use-image": patch
"@nextui-org/use-infinite-scroll": patch
"@nextui-org/use-intersection-observer": patch
"@nextui-org/use-is-mobile": patch
"@nextui-org/use-is-mounted": patch
"@nextui-org/use-measure": patch
"@nextui-org/use-pagination": patch
"@nextui-org/use-real-shape": patch
"@nextui-org/use-ref-state": patch
"@nextui-org/use-resize": patch
"@nextui-org/use-safe-layout-effect": patch
"@nextui-org/use-scroll-position": patch
"@nextui-org/use-ssr": patch
"@nextui-org/use-theme": patch
"@nextui-org/use-update-effect": patch
"@nextui-org/aria-utils": patch
"@nextui-org/dom-animation": patch
"@nextui-org/framer-utils": patch
"@nextui-org/react-rsc-utils": patch
"@nextui-org/react-utils": patch
"@nextui-org/shared-icons": patch
"@nextui-org/shared-utils": patch
"@nextui-org/test-utils": patch
---
Pnpm clean
+86
View File
@@ -0,0 +1,86 @@
---
"@nextui-org/accordion": patch
"@nextui-org/alert": patch
"@nextui-org/autocomplete": patch
"@nextui-org/avatar": patch
"@nextui-org/badge": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/button": patch
"@nextui-org/calendar": patch
"@nextui-org/card": patch
"@nextui-org/checkbox": patch
"@nextui-org/chip": patch
"@nextui-org/code": patch
"@nextui-org/date-input": patch
"@nextui-org/date-picker": patch
"@nextui-org/divider": patch
"@nextui-org/drawer": patch
"@nextui-org/dropdown": patch
"@nextui-org/image": patch
"@nextui-org/input": patch
"@nextui-org/kbd": patch
"@nextui-org/link": patch
"@nextui-org/listbox": patch
"@nextui-org/menu": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/pagination": patch
"@nextui-org/popover": patch
"@nextui-org/progress": patch
"@nextui-org/radio": patch
"@nextui-org/ripple": patch
"@nextui-org/scroll-shadow": patch
"@nextui-org/select": patch
"@nextui-org/skeleton": patch
"@nextui-org/slider": patch
"@nextui-org/snippet": patch
"@nextui-org/spacer": patch
"@nextui-org/spinner": patch
"@nextui-org/switch": patch
"@nextui-org/table": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
"@nextui-org/user": patch
"@nextui-org/react": patch
"@nextui-org/system": patch
"@nextui-org/system-rsc": patch
"@nextui-org/theme": patch
"@nextui-org/use-aria-accordion": patch
"@nextui-org/use-aria-accordion-item": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-aria-modal-overlay": patch
"@nextui-org/use-aria-multiselect": patch
"@nextui-org/use-aria-toggle-button": patch
"@nextui-org/use-callback-ref": patch
"@nextui-org/use-clipboard": patch
"@nextui-org/use-data-scroll-overflow": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-draggable": patch
"@nextui-org/use-image": patch
"@nextui-org/use-infinite-scroll": patch
"@nextui-org/use-intersection-observer": patch
"@nextui-org/use-is-mobile": patch
"@nextui-org/use-is-mounted": patch
"@nextui-org/use-measure": patch
"@nextui-org/use-pagination": patch
"@nextui-org/use-real-shape": patch
"@nextui-org/use-ref-state": patch
"@nextui-org/use-resize": patch
"@nextui-org/use-safe-layout-effect": patch
"@nextui-org/use-scroll-position": patch
"@nextui-org/use-ssr": patch
"@nextui-org/use-theme": patch
"@nextui-org/use-update-effect": patch
"@nextui-org/aria-utils": patch
"@nextui-org/dom-animation": patch
"@nextui-org/framer-utils": patch
"@nextui-org/react-rsc-utils": patch
"@nextui-org/react-utils": patch
"@nextui-org/shared-icons": patch
"@nextui-org/shared-utils": patch
"@nextui-org/test-utils": patch
---
Fix build 2
+5
View File
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---
making input and select styling consistent(#3876)
+1 -1
View File
@@ -14,7 +14,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
prerelease:
name: changesets pre-release
runs-on: ubuntu-latest
runs-on: ubuntu-latest-m
permissions:
contents: write
pull-requests: write
+42
View File
@@ -0,0 +1,42 @@
name: Update Stats
on:
schedule:
# Runs every Monday at 00:00 UTC
- cron: '0 0 * * 1'
# Allow manual trigger
workflow_dispatch:
jobs:
update-stats:
name: Update Stats
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Install
uses: ./.github/common-actions/install
- name: Update search metadata
run: pnpm update:search-meta
- name: Update GitHub info
run: pnpm update:github-info
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "chore(stats): update project statistics"
title: "chore(stats): 📊 Update project statistics"
body: |
This PR updates the project statistics including:
- Search metadata
- GitHub repository information
This is an automated PR generated weekly.
branch: chore/update-stats
base: main
delete-branch: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -171,7 +171,7 @@ function TreeItem<T>(props: TreeItemProps<T>) {
</span>
{isUpdated && (
<Chip
className="ml-1 py-1 text-tiny text-default-400 bg-default-100/50"
className="ml-1 py-1 text-tiny text-default-500 dark:text-default-400 bg-default-100 dark:bg-default-100/50"
color="default"
size="sm"
variant="flat"
+36
View File
@@ -1,8 +1,11 @@
"use client";
import {usePathname} from "next/navigation";
import {Link} from "@nextui-org/react";
import {getCurrentYear} from "@/utils/time";
import {XIcon, GithubIcon, DiscordIcon} from "@/components/icons";
import {siteConfig} from "@/config/site";
export const Footer = () => {
const pathname = usePathname();
@@ -11,12 +14,45 @@ export const Footer = () => {
return null;
}
const isDocs = pathname.includes("/docs");
return (
<footer className="container mx-auto max-w-7xl pb-12 px-12">
<div className="flex flex-col justify-center items-center gap-1">
<p className="text-sm text-default-400">
© {getCurrentYear()} NextUI Inc. All rights reserved.
</p>
{isDocs ? (
<div className="flex items-center gap-1">
<Link
isExternal
aria-label="Discord"
className="p-1"
href={siteConfig.links.discord}
rel="noopener noreferrer"
>
<DiscordIcon className="text-default-600 dark:text-default-500" />
</Link>
<Link
isExternal
aria-label="X"
className="p-1"
href={siteConfig.links.twitter}
rel="noopener noreferrer"
>
<XIcon className="text-default-600 dark:text-default-500" />
</Link>
<Link
isExternal
aria-label="Github"
className="p-1"
href={siteConfig.links.github}
rel="noopener noreferrer"
>
<GithubIcon className="text-default-600 dark:text-default-500" />
</Link>
</div>
) : null}
</div>
</footer>
);
+1 -1
View File
@@ -11,7 +11,7 @@ export const MoonIcon = ({size = 24, width, height, ...props}: IconSvgProps) =>
{...props}
>
<path
d="M20.742,13.045c-0.677,0.18-1.376,0.271-2.077,0.271c-2.135,0-4.14-0.83-5.646-2.336c-2.008-2.008-2.799-4.967-2.064-7.723 c0.092-0.345-0.007-0.713-0.259-0.965C10.444,2.04,10.077,1.938,9.73,2.034C8.028,2.489,6.476,3.382,5.241,4.616 c-3.898,3.898-3.898,10.243,0,14.143c1.889,1.889,4.401,2.93,7.072,2.93c2.671,0,5.182-1.04,7.07-2.929 c1.236-1.237,2.13-2.791,2.583-4.491c0.092-0.345-0.008-0.713-0.26-0.965C21.454,13.051,21.085,12.951,20.742,13.045z M17.97,17.346c-1.511,1.511-3.52,2.343-5.656,2.343c-2.137,0-4.146-0.833-5.658-2.344c-3.118-3.119-3.118-8.195,0-11.314 c0.602-0.602,1.298-1.102,2.06-1.483c-0.222,2.885,0.814,5.772,2.89,7.848c2.068,2.069,4.927,3.12,7.848,2.891 C19.072,16.046,18.571,16.743,17.97,17.346z"
d="M21.25 12C21.25 14.4533 20.2754 16.806 18.5407 18.5407C16.806 20.2754 14.4533 21.25 12 21.25V22.75C17.937 22.75 22.75 17.937 22.75 12H21.25ZM12 21.25C9.54675 21.25 7.19397 20.2754 5.45926 18.5407C3.72455 16.806 2.75 14.4533 2.75 12H1.25C1.25 17.937 6.063 22.75 12 22.75V21.25ZM2.75 12C2.75 9.54675 3.72455 7.19397 5.45926 5.45926C7.19397 3.72455 9.54675 2.75 12 2.75V1.25C6.063 1.25 1.25 6.063 1.25 12H2.75ZM15.5 14.25C13.975 14.25 12.5125 13.6442 11.4341 12.5659C10.3558 11.4875 9.75 10.025 9.75 8.5H8.25C8.25 10.4228 9.01384 12.2669 10.3735 13.6265C11.7331 14.9862 13.5772 15.75 15.5 15.75V14.25ZM20.425 11.469C19.9133 12.3176 19.191 13.0197 18.3281 13.5069C17.4652 13.9942 16.491 14.2501 15.5 14.25V15.75C16.7494 15.7504 17.9777 15.4279 19.0657 14.8138C20.1537 14.1997 21.0646 13.3148 21.71 12.245L20.425 11.469ZM9.75 8.5C9.74986 7.50903 10.0058 6.53483 10.4931 5.67193C10.9803 4.80902 11.6824 4.08669 12.531 3.575L11.755 2.291C10.6854 2.93628 9.80058 3.84701 9.18649 4.93486C8.57239 6.02271 8.2498 7.25078 8.25 8.5H9.75ZM12 2.75C11.9497 2.74903 11.9002 2.73811 11.8542 2.71785C11.8082 2.6976 11.7666 2.66842 11.732 2.632C11.6898 2.58965 11.6613 2.53568 11.65 2.477C11.646 2.446 11.648 2.356 11.755 2.291L12.531 3.575C13.034 3.271 13.196 2.714 13.137 2.276C13.075 1.821 12.717 1.25 12 1.25V2.75ZM21.71 12.245C21.644 12.352 21.554 12.354 21.523 12.35C21.4643 12.3387 21.4103 12.3102 21.368 12.268C21.3316 12.2334 21.3024 12.1918 21.2821 12.1458C21.2619 12.0998 21.251 12.0503 21.25 12H22.75C22.75 11.283 22.179 10.925 21.724 10.863C21.286 10.804 20.729 10.966 20.425 11.469L21.71 12.245Z"
fill="currentColor"
/>
</svg>
+26
View File
@@ -16,3 +16,29 @@ export const SunFilledIcon = ({size = 24, width, height, ...props}: IconSvgProps
</g>
</svg>
);
export const SunLinearIcon = ({size = 24, width, height, ...props}: IconSvgProps) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height={size || height}
role="presentation"
viewBox="0 0 24 24"
width={size || width}
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7C9.23858 7 7 9.23858 7 12C7 14.7614 9.23858 17 12 17Z"
stroke="currentColor"
strokeWidth="1.5"
/>
<path
d="M12 2V4M12 20V22M4 12H2M22 12H20M19.778 4.223L17.556 6.254M4.222 4.223L6.444 6.254M6.444 17.556L4.222 19.778M19.778 19.777L17.556 17.555"
stroke="currentColor"
strokeLinecap="round"
strokeWidth="1.5"
/>
</svg>
);
+23 -56
View File
@@ -33,12 +33,13 @@ import {currentVersion} from "@/utils/version";
import {siteConfig} from "@/config/site";
import {Route} from "@/libs/docs/page";
import {LargeLogo, SmallLogo, ThemeSwitch} from "@/components";
import {XIcon, GithubIcon, DiscordIcon, SearchLinearIcon} from "@/components/icons";
import {GithubIcon, SearchLinearIcon} from "@/components/icons";
import {useIsMounted} from "@/hooks/use-is-mounted";
import {DocsSidebar} from "@/components/docs/sidebar";
import {useCmdkStore} from "@/components/cmdk";
import {FbRoadmapLink} from "@/components/featurebase/fb-roadmap-link";
import {trackEvent} from "@/utils/va";
import githubInfo from "@/config/github-info.json";
export interface NavbarProps {
routes: Route[];
@@ -92,22 +93,26 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
const searchButton = (
<Button
aria-label="Quick search"
className="text-sm font-normal text-default-500 bg-default-400/20 dark:bg-default-500/20"
className="border-1 px-3 border-default-200 rounded-full text-small font-normal text-default-500 bg-transparent"
endContent={
<Kbd className="hidden py-0.5 px-2 lg:inline-block" keys={commandKey}>
<Kbd
className="hidden text-xs rounded-full py-0.5 px-1.5 lg:inline-block"
keys={commandKey}
>
K
</Kbd>
}
startContent={
<SearchLinearIcon
className="text-base text-default-400 pointer-events-none flex-shrink-0"
size={18}
size={16}
strokeWidth={2}
/>
}
variant="bordered"
onPress={handleOpenCmdk}
>
Quick Search...
Search
</Button>
);
@@ -236,35 +241,9 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
Figma
</NextLink>
</NavbarItem>
{/* hide feedback and changelog at this moment */}
{/* <NavbarItem>
<NextLink className={navLinkClasses} color="foreground" href="#">
<FbChangelogButton key="changelog" userName="" />
</NextLink>
</NavbarItem>
<NavbarItem>
<NextLink className={navLinkClasses} color="foreground" href="#">
<FbFeedbackButton key="feedback" userEmail="" />
</NextLink>
</NavbarItem> */}
<NavbarItem>
<FbRoadmapLink className={navLinkClasses} />
</NavbarItem>
{/* <NavbarItem>
<Chip
as={NextLink}
className="hover:bg-default-100 border-default-200/80 dark:border-default-100/80 transition-colors cursor-pointer"
color="secondary"
href="/blog/v2.2.0"
variant="dot"
onClick={() => handlePressNavbarItem("Introducing v2.2.0", "/blog/v2.2.0")}
>
Introducing v2.2.0&nbsp;
<span aria-label="rocket emoji" role="img">
🚀
</span>
</Chip>
</NavbarItem> */}
</ul>
</NavbarContent>
@@ -274,8 +253,8 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
isExternal
aria-label="Github"
className="p-1"
href="https://github.com/nextui-org/nextui"
onClick={() => handlePressNavbarItem("Github", "https://github.com/nextui-org/nextui")}
href={siteConfig.links.github}
onPress={() => handlePressNavbarItem("Github", siteConfig.links.github)}
>
<GithubIcon className="text-default-600 dark:text-default-500" />
</Link>
@@ -321,37 +300,25 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
</span>
</Chip>
</NavbarItem>
<NavbarItem className="hidden sm:flex">
<Link
isExternal
aria-label="X"
className="p-1"
href={siteConfig.links.twitter}
onPress={() => handlePressNavbarItem("Twitter", siteConfig.links.twitter)}
>
<XIcon className="text-default-600 dark:text-default-500" />
</Link>
<Link
isExternal
aria-label="Discord"
className="p-1"
href={siteConfig.links.discord}
onPress={() => handlePressNavbarItem("Discord", siteConfig.links.discord)}
>
<DiscordIcon className="text-default-600 dark:text-default-500" />
</Link>
<NavbarItem className="hidden sm:flex gap-2">
{searchButton}
<Link
isExternal
aria-label="Github"
className="p-1"
className="flex gap-1 items-center h-10 px-2 border-1 border-default-200 rounded-full text-default-600 dark:text-default-500"
href={siteConfig.links.github}
onPress={() => handlePressNavbarItem("Github", siteConfig.links.github)}
>
<GithubIcon className="text-default-600 dark:text-default-500" />
<GithubIcon />
<span className="text-small font-medium">{githubInfo.stars.formatted}</span>
</Link>
<ThemeSwitch />
<ThemeSwitch
className="border-1 border-default-200 rounded-full h-full min-w-10 min-h-10 flex items-center justify-center"
classNames={{
wrapper: "!text-default-400 dark:!text-default-500",
}}
/>
</NavbarItem>
<NavbarItem className="hidden lg:flex">{searchButton}</NavbarItem>
{/* <NavbarItem className="hidden md:flex">
<Button
isExternal
+4 -4
View File
@@ -7,7 +7,7 @@ import {useTheme} from "next-themes";
import {clsx} from "@nextui-org/shared-utils";
import {useIsSSR} from "@react-aria/ssr";
import {SunFilledIcon, MoonFilledIcon} from "@/components/icons";
import {SunLinearIcon, MoonIcon} from "@/components/icons";
import {trackEvent} from "@/utils/va";
export interface ThemeSwitchProps {
@@ -58,8 +58,8 @@ export const ThemeSwitch: FC<ThemeSwitchProps> = ({className, classNames}) => {
"rounded-lg",
"flex items-center justify-center",
"group-data-[selected=true]:bg-transparent",
"!text-default-600 dark:!text-default-500",
"pt-px",
"!text-default-600 dark:!text-default-300",
"pt-0",
"px-0",
"mx-0",
],
@@ -67,7 +67,7 @@ export const ThemeSwitch: FC<ThemeSwitchProps> = ({className, classNames}) => {
),
})}
>
{!isSelected || isSSR ? <SunFilledIcon size={22} /> : <MoonFilledIcon size={22} />}
{!isSelected || isSSR ? <SunLinearIcon size={22} /> : <MoonIcon size={22} />}
</div>
</Component>
);
+6
View File
@@ -0,0 +1,6 @@
{
"stars": { "raw": 22002, "formatted": "22K" },
"forks": 1536,
"subscribers": 85,
"openIssues": 433
}
+16 -26
View File
@@ -143,14 +143,15 @@
"key": "autocomplete",
"title": "Autocomplete",
"keywords": "autocomplete, auto suggest, search, typeahead",
"path": "/docs/components/autocomplete.mdx"
"path": "/docs/components/autocomplete.mdx",
"updated": true
},
{
"key": "alert",
"title": "Alert",
"keywords": "alert, notification, message",
"path": "/docs/components/alert.mdx",
"isNew": true
"newPost": true
},
{
"key": "avatar",
@@ -162,8 +163,7 @@
"key": "badge",
"title": "Badge",
"keywords": "badge, markers, status indication, count display",
"path": "/docs/components/badge.mdx",
"updated": true
"path": "/docs/components/badge.mdx"
},
{
"key": "breadcrumbs",
@@ -175,14 +175,14 @@
"key": "button",
"title": "Button",
"keywords": "button, interactive, action trigger, click events",
"path": "/docs/components/button.mdx"
"path": "/docs/components/button.mdx",
"updated": true
},
{
"key": "calendar",
"title": "Calendar",
"keywords": "calendar, date picker, month picker, year picker",
"path": "/docs/components/calendar.mdx",
"newPost": true
"path": "/docs/components/calendar.mdx"
},
{
"key": "card",
@@ -194,8 +194,7 @@
"key": "checkbox",
"title": "Checkbox",
"keywords": "checkbox, binary choice, selection control, toggle",
"path": "/docs/components/checkbox.mdx",
"updated": true
"path": "/docs/components/checkbox.mdx"
},
{
"key": "checkbox-group",
@@ -225,22 +224,18 @@
"key": "date-input",
"title": "Date Input",
"keywords": "date-input, time, input, timezone",
"path": "/docs/components/date-input.mdx",
"newPost": true
},
"path": "/docs/components/date-input.mdx" },
{
"key": "date-picker",
"title": "Date Picker",
"keywords": "date-picker, time, input, timezone",
"path": "/docs/components/date-picker.mdx",
"newPost": true
"path": "/docs/components/date-picker.mdx"
},
{
"key": "date-range-picker",
"title": "Date Range Picker",
"keywords": "date-range-picker, date-picker, time, input, timezone",
"path": "/docs/components/date-range-picker.mdx",
"newPost": true
"path": "/docs/components/date-range-picker.mdx"
},
{
"key": "divider",
@@ -332,8 +327,7 @@
"key": "range-calendar",
"title": "Range Calendar",
"keywords": "range calendar, date picker, month picker, year picker",
"path": "/docs/components/range-calendar.mdx",
"newPost": true
"path": "/docs/components/range-calendar.mdx"
},
{
"key": "scroll-shadow",
@@ -351,8 +345,7 @@
"key": "skeleton",
"title": "Skeleton",
"keywords": "skeleton, loading state, placeholder, content preview",
"path": "/docs/components/skeleton.mdx",
"updated": true
"path": "/docs/components/skeleton.mdx"
},
{
"key": "slider",
@@ -394,8 +387,7 @@
"key": "tabs",
"title": "Tabs",
"keywords": "tabs, section navigation, categorized content, tabbed interface",
"path": "/docs/components/tabs.mdx",
"updated": true
"path": "/docs/components/tabs.mdx"
},
{
"key": "textarea",
@@ -407,15 +399,13 @@
"key": "time-input",
"title": "Time Input",
"keywords": "timeinput, time, input, timezone",
"path": "/docs/components/time-input.mdx",
"newPost": true
"path": "/docs/components/time-input.mdx"
},
{
"key": "tooltip",
"title": "Tooltip",
"keywords": "tooltip, hint, descriptive message, hover info",
"path": "/docs/components/tooltip.mdx",
"updated": true
"path": "/docs/components/tooltip.mdx"
},
{
"key": "user",
File diff suppressed because it is too large Load Diff
@@ -13,6 +13,8 @@ export default function App() {
title={title}
description={description}
isVisible={isVisible}
variant="faded"
color="success"
onClose={() => setIsVisible(false)}
/>
) : (
@@ -1,33 +1,190 @@
const App = `import {Alert} from "@nextui-org/react";
const AppTs = `import {Alert, Button} from "@nextui-org/react";
const CustomAlert = React.forwardRef<HTMLDivElement, AlertProps>(
(
{title, children, variant = "faded", color = "secondary", className, classNames, ...props},
ref,
) => {
const colorClass = React.useMemo(() => {
switch (color) {
case "default":
return "before:bg-default-300";
case "primary":
return "before:bg-primary";
case "secondary":
return "before:bg-secondary";
case "success":
return "before:bg-success";
case "warning":
return "before:bg-warning";
case "danger":
return "before:bg-danger";
default:
return "before:bg-default-200";
}
}, []);
return (
<Alert
ref={ref}
classNames={{
...classNames,
base: cn(
[
"bg-default-50 dark:bg-background shadow-sm",
"border-1 border-default-200 dark:border-default-100",
"relative before:content-[''] before:absolute before:z-10",
"before:left-0 before:top-[-1px] before:bottom-[-1px] before:w-1",
"rounded-l-none border-l-0",
colorClass,
],
classNames?.base,
className,
),
mainWrapper: cn("pt-1", classNames?.mainWrapper),
iconWrapper: cn("dark:bg-transparent", classNames?.iconWrapper),
}}
color={color}
title={title}
variant={variant}
{...props}
>
{children}
</Alert>
);
},
);
CustomAlert.displayName = "CustomAlert";
export default function App() {
const title = "Success";
const description = "Thanks for subscribing to our newsletter!";
const colors = ["default", "primary", "secondary", "success", "warning", "danger"];
return (
<div className="flex items-center justify-center w-full">
<div className="flex flex-col w-full gap-y-6">
{colors.map((color) => (
<CustomAlert
key={color}
color={color}
title="The documents you requested are ready to be viewed"
>
<div className="flex items-center gap-1 mt-3">
<Button
className="bg-background text-default-700 font-medium border-1 shadow-small"
size="sm"
variant="bordered"
>
View documents
</Button>
<Button
className="text-default-500 font-medium underline underline-offset-4"
size="sm"
variant="light"
>
Maybe later
</Button>
</div>
</CustomAlert>
))}
</div>
);
}`;
const App = `import {Alert, Button} from "@nextui-org/react";
const CustomAlert = React.forwardRef(
(
{title, children, variant = "faded", color = "secondary", className, classNames = {}, ...props},
ref,
) => {
const colorClass = React.useMemo(() => {
switch (color) {
case "default":
return "before:bg-default-300";
case "primary":
return "before:bg-primary";
case "secondary":
return "before:bg-secondary";
case "success":
return "before:bg-success";
case "warning":
return "before:bg-warning";
case "danger":
return "before:bg-danger";
default:
return "before:bg-default-200";
}
}, []);
return (
<Alert
title={title}
description={description}
ref={ref}
classNames={{
base: [
"bg-background",
"border",
"border-foreground-400",
"shadow",
"hover:bg-slate-200",
"cursor-pointer",
],
title: ["text-base", "text-foreground", "font-semibold"],
description: ["text-base", "text-foreground-600"],
...classNames,
base: cn(
[
"bg-default-50 dark:bg-background shadow-sm",
"border-1 border-default-200 dark:border-default-100",
"relative before:content-[''] before:absolute before:z-10",
"before:left-0 before:top-[-1px] before:bottom-[-1px] before:w-1",
"rounded-l-none border-l-0",
colorClass,
],
classNames.base,
className,
),
mainWrapper: cn("pt-1", classNames.mainWrapper),
iconWrapper: cn("dark:bg-transparent", classNames.iconWrapper),
}}
/>
color={color}
title={title}
variant={variant}
{...props}
>
{children}
</Alert>
);
},
);
CustomAlert.displayName = "CustomAlert";
export default function App() {
const colors = ["default", "primary", "secondary", "success", "warning", "danger"];
return (
<div className="flex flex-col w-full gap-y-6">
{colors.map((color) => (
<CustomAlert
key={color}
color={color}
title="The documents you requested are ready to be viewed"
>
<div className="flex items-center gap-1 mt-3">
<Button
className="bg-background text-default-700 font-medium border-1 shadow-small"
size="sm"
variant="bordered"
>
View documents
</Button>
<Button
className="text-default-500 font-medium underline underline-offset-4"
size="sm"
variant="light"
>
Maybe later
</Button>
</div>
</CustomAlert>
))}
</div>
);
}`;
const react = {
"/App.jsx": App,
"/App.tsx": AppTs,
};
export default {
@@ -5,7 +5,9 @@ import customImpl from "./custom-impl";
import customStyles from "./custom-styles";
import variants from "./variants";
import withIcon from "./with-icon";
import withAction from "./with-action";
import controlled from "./controlled";
import withoutIcon from "./without-icon";
export const alertContent = {
colors,
@@ -15,5 +17,7 @@ export const alertContent = {
customStyles,
variants,
withIcon,
withAction,
controlled,
withoutIcon,
};
@@ -3,15 +3,9 @@ const App = `import {Alert} from "@nextui-org/react";
export default function App() {
return (
<div className="flex flex-col gap-4 w-full">
<Alert variant="solid">
A solid variant alert
</Alert>
<Alert variant="bordered">
A bordered variant alert
</Alert>
<Alert variant="flat">
A flat variant alert
</Alert>
{["solid", "bordered", "flat", "faded"].map((variant) => (
<Alert key={variant} variant={variant} color="secondary" title={\`This is a \${variant} variant alert\`}/>
))}
</div>
);
}`;
@@ -0,0 +1,29 @@
const App = `import {Alert, Button} from "@nextui-org/react";
export default function App() {
const [isVisible, setIsVisible] = React.useState(true);
return (
<div className="flex items-center justify-center w-full">
<Alert
color="warning"
description="Upgrade to a paid plan to continue"
endContent={
<Button color="warning" size="sm" variant="flat">
Upgrade
</Button>
}
title="You have no credits left"
variant="faded"
/>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -0,0 +1,26 @@
const App = `import {Alert} from "@nextui-org/react";
export default function App() {
const title = "This is an alert";
const description = "Thanks for subscribing to our newsletter!";
return (
<div className="flex items-center justify-center w-full">
<Alert
title={title}
description={description}
hideIcon
color="success"
variant="faded"
/>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -26,6 +26,10 @@ import customSectionsStyle from "./custom-sections-style";
import customStyles from "./custom-styles";
import customEmptyContentMessage from "./custom-empty-content-message";
import readOnly from "./read-only";
import virtualization from "./virtualization";
import virtualizationTenThousand from "./virtualization-ten-thousand";
import virtualizationMaxListboxHeight from "./virtualization-max-listbox-height";
import virtualizationCustomItemHeight from "./virtualization-custom-item-height";
export const autocompleteContent = {
usage,
@@ -56,4 +60,8 @@ export const autocompleteContent = {
customStyles,
customEmptyContentMessage,
readOnly,
virtualization,
virtualizationTenThousand,
virtualizationMaxListboxHeight,
virtualizationCustomItemHeight,
};
@@ -0,0 +1,65 @@
const App = `import {Autocomplete, AutocompleteItem} from "@nextui-org/react";
const generateItems = (n) => {
const items = [
"Cat",
"Dog",
"Elephant",
"Lion",
"Tiger",
"Giraffe",
"Dolphin",
"Penguin",
"Zebra",
"Shark",
"Whale",
"Otter",
"Crocodile",
];
const dataset = [];
for (let i = 0; i < n; i++) {
const item = items[i % items.length];
dataset.push({
label: \`\${item}\${i}\`,
value: \`\${item.toLowerCase()}\${i}\`,
description: "Sample description",
});
}
return dataset;
};
export default function App() {
const items = generateItems(1000);
return (
<div className="flex w-full flex-wrap md:flex-nowrap gap-4">
<Autocomplete
isVirtualized
label="Search from 1000 items"
className="max-w-xs"
defaultItems={items}
placeholder="Search..."
maxListboxHeight={400}
itemHeight={40}
>
{(item) => (
<AutocompleteItem key={item.value}>
{item.label}
</AutocompleteItem>
)}
</Autocomplete>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -0,0 +1,64 @@
const App = `import {Autocomplete, AutocompleteItem} from "@nextui-org/react";
const generateItems = (n) => {
const items = [
"Cat",
"Dog",
"Elephant",
"Lion",
"Tiger",
"Giraffe",
"Dolphin",
"Penguin",
"Zebra",
"Shark",
"Whale",
"Otter",
"Crocodile",
];
const dataset = [];
for (let i = 0; i < n; i++) {
const item = items[i % items.length];
dataset.push({
label: \`\${item}\${i}\`,
value: \`\${item.toLowerCase()}\${i}\`,
description: "Sample description",
});
}
return dataset;
};
export default function App() {
const items = generateItems(1000);
return (
<div className="flex w-full flex-wrap md:flex-nowrap gap-4">
<Autocomplete
isVirtualized
label="Search from 1000 items"
className="max-w-xs"
defaultItems={items}
placeholder="Search..."
maxListboxHeight={400}
>
{(item) => (
<AutocompleteItem key={item.value}>
{item.label}
</AutocompleteItem>
)}
</Autocomplete>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -0,0 +1,63 @@
const App = `import {Autocomplete, AutocompleteItem} from "@nextui-org/react";
const generateItems = (n) => {
const items = [
"Cat",
"Dog",
"Elephant",
"Lion",
"Tiger",
"Giraffe",
"Dolphin",
"Penguin",
"Zebra",
"Shark",
"Whale",
"Otter",
"Crocodile",
];
const dataset = [];
for (let i = 0; i < n; i++) {
const item = items[i % items.length];
dataset.push({
label: \`\${item}\${i}\`,
value: \`\${item.toLowerCase()}\${i}\`,
description: "Sample description",
});
}
return dataset;
};
export default function App() {
const items = generateItems(10000);
return (
<div className="flex w-full flex-wrap md:flex-nowrap gap-4">
<Autocomplete
isVirtualized
label="Search from 1000 items"
className="max-w-xs"
defaultItems={items}
placeholder="Search..."
>
{(item) => (
<AutocompleteItem key={item.value}>
{item.label}
</AutocompleteItem>
)}
</Autocomplete>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -0,0 +1,63 @@
const App = `import {Autocomplete, AutocompleteItem} from "@nextui-org/react";
const generateItems = (n) => {
const items = [
"Cat",
"Dog",
"Elephant",
"Lion",
"Tiger",
"Giraffe",
"Dolphin",
"Penguin",
"Zebra",
"Shark",
"Whale",
"Otter",
"Crocodile",
];
const dataset = [];
for (let i = 0; i < n; i++) {
const item = items[i % items.length];
dataset.push({
label: \`\${item}\${i}\`,
value: \`\${item.toLowerCase()}\${i}\`,
description: "Sample description",
});
}
return dataset;
};
export default function App() {
const items = generateItems(1000);
return (
<div className="flex w-full flex-wrap md:flex-nowrap gap-4">
<Autocomplete
isVirtualized
label="Search from 1000 items"
className="max-w-xs"
defaultItems={items}
placeholder="Search..."
>
{(item) => (
<AutocompleteItem key={item.value}>
{item.label}
</AutocompleteItem>
)}
</Autocomplete>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -0,0 +1,337 @@
const App = `import {Drawer, DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, Button, useDisclosure, Image, Link, Tooltip, Avatar, AvatarGroup} from "@nextui-org/react";
export default function App() {
const {isOpen, onOpen, onOpenChange} = useDisclosure();
return (
<>
<Button
className="text-default-500"
endContent={
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path
d="M5.75 1.25a.75.75 0 1 0-1.5 0v.823l-.392.044c-.9.121-1.658.38-2.26.982s-.861 1.36-.982 2.26C.5 6.225.5 7.328.5 8.695v.11l.117 3.337c.121.9.38 1.658.982 2.26s1.36.861 2.26.982c.867.117 1.969.117 3.337.117h1.658l3.337-.117c.9-.121 1.658-.38 2.26-.982s.861-1.36.982-2.26c.117-.867.117-1.969.117-3.337v-.11l-.117-3.337c-.121-.9-.38-1.658-.982-2.26s-1.36-.861-2.26-.982l-.44-.048V1.25a.75.75 0 0 0-1.5 0v.756L8.853 2H7.195q-.78-.002-1.445.006zm4.5 3v-.744L8.798 3.5H7.25l-1.5.007v.743a.75.75 0 1 1-1.5 0v-.67l-.192.023c-.734.099-1.122.279-1.399.556s-.457.665-.556 1.399C2.002 6.313 2 7.315 2 8.75l.103 3.192c.099.734.279 1.122.556 1.399s.665.457 1.399.556c.755.101 1.756.103 3.192.103h1.548l3.192-.103c.734-.099 1.122-.279 1.399-.556s.457-.665.556-1.399c.102-.755.103-1.757.103-3.192l-.103-3.192c-.099-.734-.279-1.122-.556-1.399s-.665-.457-1.399-.556l-.241-.028v.675a.75.75 0 0 1-1.5 0zm-5 3.5a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0m0 3.5a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0M8 8.5A.75.75 0 1 0 8 7a.75.75 0 1 0 0 1.5m.75 2.75a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0M11.5 8.5a.75.75 0 1 0 0-1.5.75.75 0 1 0 0 1.5m.75 2.75a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
}
variant="flat"
onPress={onOpen}
>
See Event
</Button>
<Drawer
hideCloseButton
backdrop="blur"
classNames={{
base: "data-[placement=right]:sm:m-2 data-[placement=left]:sm:m-2 rounded-medium",
}}
isOpen={isOpen}
onOpenChange={onOpenChange}
>
<DrawerContent>
{(onClose) => (
<>
<DrawerHeader className="absolute top-0 inset-x-0 z-50 flex flex-row gap-2 px-2 py-2 border-b border-default-200/50 justify-between bg-content1/50 backdrop-saturate-150 backdrop-blur-lg">
<Tooltip content="Close">
<Button
isIconOnly
className="text-default-400"
size="sm"
variant="light"
onPress={onClose}
>
<svg
fill="none"
height="20"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m13 17 5-5-5-5M6 17l5-5-5-5" />
</svg>
</Button>
</Tooltip>
<div className="w-full flex justify-start gap-2">
<Button
className="font-medium text-small text-default-500"
size="sm"
startContent={
<svg
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.85.75c-.908 0-1.702.328-2.265.933-.558.599-.835 1.41-.835 2.29V7.88c0 .801.23 1.548.697 2.129.472.587 1.15.96 1.951 1.06a.75.75 0 1 0 .185-1.489c-.435-.054-.752-.243-.967-.51-.219-.273-.366-.673-.366-1.19V3.973c0-.568.176-.993.433-1.268.25-.27.632-.455 1.167-.455h4.146c.479 0 .828.146 1.071.359.246.215.43.54.497.979a.75.75 0 0 0 1.483-.23c-.115-.739-.447-1.4-.99-1.877C9.51 1 8.796.75 7.996.75zM7.9 4.828c-.908 0-1.702.326-2.265.93-.558.6-.835 1.41-.835 2.29v3.905c0 .879.275 1.69.833 2.289.563.605 1.357.931 2.267.931h4.144c.91 0 1.705-.326 2.268-.931.558-.599.833-1.41.833-2.289V8.048c0-.879-.275-1.69-.833-2.289-.563-.605-1.357-.931-2.267-.931zm-1.6 3.22c0-.568.176-.992.432-1.266.25-.27.632-.454 1.168-.454h4.145c.54 0 .92.185 1.17.453.255.274.43.698.43 1.267v3.905c0 .569-.175.993-.43 1.267-.25.268-.631.453-1.17.453H7.898c-.54 0-.92-.185-1.17-.453-.255-.274-.43-.698-.43-1.267z"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
}
variant="flat"
>
Copy Link
</Button>
<Button
className="font-medium text-small text-default-500"
endContent={
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M7 17 17 7M7 7h10v10" />
</svg>
}
size="sm"
variant="flat"
>
Event Page
</Button>
</div>
<div className="flex gap-1 items-center">
<Tooltip content="Previous">
<Button isIconOnly className="text-default-500" size="sm" variant="flat">
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m18 15-6-6-6 6" />
</svg>
</Button>
</Tooltip>
<Tooltip content="Next">
<Button isIconOnly className="text-default-500" size="sm" variant="flat">
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m6 9 6 6 6-6" />
</svg>
</Button>
</Tooltip>
</div>
</DrawerHeader>
<DrawerBody className="pt-16">
<div className="flex w-full justify-center items-center pt-4">
<Image
isBlurred
isZoomed
alt="Event image"
className="aspect-square w-full hover:scale-110"
height={300}
src="https://nextuipro.nyc3.cdn.digitaloceanspaces.com/components-images/places/san-francisco.png"
/>
</div>
<div className="flex flex-col gap-2 py-4">
<h1 className="text-2xl font-bold leading-7">SF Bay Area Meetup in November</h1>
<p className="text-sm text-default-500">
555 California St, San Francisco, CA 94103
</p>
<div className="mt-4 flex flex-col gap-3">
<div className="flex gap-3 items-center">
<div className="flex-none border-1 border-default-200/50 rounded-small text-center w-11 overflow-hidden">
<div className="text-tiny bg-default-100 py-0.5 text-default-500">Nov</div>
<div className="flex items-center justify-center font-semibold text-medium h-6 text-default-500">
19
</div>
</div>
<div className="flex flex-col gap-0.5">
<p className="text-medium text-foreground font-medium">
Tuesday, November 19
</p>
<p className="text-small text-default-500">5:00 PM - 9:00 PM PST</p>
</div>
</div>
<div className="flex gap-3 items-center">
<div className="flex items-center justify-center border-1 border-default-200/50 rounded-small w-11 h-11">
<svg
className="text-default-500"
height="20"
viewBox="0 0 16 16"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<g
fill="none"
fillRule="evenodd"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
>
<path d="M2 6.854C2 11.02 7.04 15 8 15s6-3.98 6-8.146C14 3.621 11.314 1 8 1S2 3.62 2 6.854" />
<path d="M9.5 6.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
</g>
</svg>
</div>
<div className="flex flex-col gap-0.5">
<Link
isExternal
showAnchorIcon
anchorIcon={
<svg
className="group-hover:text-inherit text-default-400 transition-[color,transform] group-hover:-translate-y-0.5 group-hover:translate-x-0.5"
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M7 17 17 7M7 7h10v10" />
</svg>
}
className="group gap-x-0.5 text-medium text-foreground font-medium"
href="https://www.google.com/maps/place/555+California+St,+San+Francisco,+CA+94103"
rel="noreferrer noopener"
>
555 California St suite 500
</Link>
<p className="text-small text-default-500">San Francisco, California</p>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-medium font-medium">About the event</span>
<div className="text-medium text-default-500 flex flex-col gap-2">
<p>
Hey Bay Area! We are excited to announce our next meetup on Tuesday,
November 19th.
</p>
<p>
Join us for an evening of insightful discussions and hands-on workshops
focused on the latest developments in web development and design. Our
featured speakers will share their experiences with modern frontend
frameworks, responsive design patterns, and emerging web technologies.
You&apos;ll have the opportunity to network with fellow developers and
designers while enjoying refreshments and snacks.
</p>
<p>
During the main session, we&apos;ll dive deep into practical examples of
building scalable applications, exploring best practices for component
architecture, and understanding advanced state management techniques. Our
interactive workshop portion will let you apply these concepts directly,
with experienced mentors available to provide guidance and answer your
questions. Whether you&apos;re a seasoned developer or just starting your
journey, you&apos;ll find valuable takeaways from this session.
</p>
<p className="mt-4">
Brought to you by the{" "}
<Link className="text-default-700" href="https://nextui.org">
NextUI team
</Link>
.
</p>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-small text-default-500">Hosted By</span>
<div className="flex gap-2 items-center">
<Avatar
name="NextUI"
size="sm"
src="https://nextui.org/android-chrome-192x192.png"
/>
<span className="text-small text-default-500">NextUI Team</span>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-small text-default-500">105 Going</span>
<div className="flex gap-2 items-center">
<AvatarGroup
isBordered
classNames={{
base: "pl-2",
count: "text-default-500 text-tiny bg-default-100",
}}
size="sm"
total={101}
>
<Tooltip content="Alex">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Alex"
src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/>
</Tooltip>
<Tooltip content="Joe">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Joe"
src="https://i.pravatar.cc/150?u=a04258114e290267084"
/>
</Tooltip>
<Tooltip content="John">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="John"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/>
</Tooltip>
<Tooltip content="Jane">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Jane"
src="https://i.pravatar.cc/150?u=a04258114e29026702d"
/>
</Tooltip>
</AvatarGroup>
</div>
</div>
</div>
</div>
</DrawerBody>
<DrawerFooter className="flex flex-col gap-1">
<Link className="text-default-400" href="mailto:hello@nextui.org" size="sm">
Contact the host
</Link>
<Link className="text-default-400" href="mailto:hello@nextui.org" size="sm">
Report event
</Link>
</DrawerFooter>
</>
)}
</DrawerContent>
</Drawer>
</>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};
@@ -5,6 +5,7 @@ import placement from "./placement";
import form from "./form";
import backdrop from "./backdrop";
import customMotion from "./custom-motion";
import customStyles from "./custom-styles";
export const drawerContent = {
usage,
@@ -14,4 +15,5 @@ export const drawerContent = {
form,
backdrop,
customMotion,
customStyles,
};
+31 -3
View File
@@ -55,11 +55,23 @@ Alert comes with 6 color variants to convey different meanings.
<CodeDemo title="Radius" files={alertContent.radius} />
### With Icon
### Custom Icon
By default, Alert displays an appropriate icon based on the `color` prop. You can override this by providing a custom icon using the `icon` prop.
<CodeDemo title="With Icon" files={alertContent.withIcon} />
<CodeDemo title="Custom Icon" files={alertContent.withIcon} />
### Without Icon
You can hide the icon by setting the `hideIcon` prop to `true`.
<CodeDemo title="Without Icon" files={alertContent.withoutIcon} />
### With Action
Alert supports an `endContent` prop for additional actions.
<CodeDemo title="With Action" files={alertContent.withAction} />
### Controlled Visibility
@@ -92,6 +104,18 @@ Alert has the following attributes on the `base` element:
<Spacer y={4} />
### Slots
Alert has the following slots:
- `base`: The main alert container element
- `title`: The title element
- `description`: The description element
- `mainWrapper`: The wrapper for the title and description content
- `closeButton`: The close button element
- `iconWrapper`: The wrapper for the alert icon
- `alertIcon`: The alert icon element
## Accessibility
- Alert has role of `alert`
@@ -110,10 +134,14 @@ Alert has the following attributes on the `base` element:
| icon | `ReactNode` | The alert icon - overrides the default icon | - |
| description | `ReactNode` | The alert description | - |
| color | `default` \| `primary` \| `secondary` \| `success` \| `warning` \| `danger` | The alert color theme | `default` |
| variant | `solid` \| `bordered` \| `flat` | The alert variant | `flat` |
| variant | `solid` \| `bordered` \| `flat` \| `faded` | The alert variant | `flat` |
| radius | `none` \| `sm` \| `md` \| `lg` \| `full` | The alert border radius | `md` |
| startContent | `ReactNode` | The alert start content | - |
| endContent | `ReactNode` | The alert end content | - |
| isVisible | `boolean` | Whether the alert is visible | - |
| isClosable | `boolean` | Whether the alert can be closed | `false` |
| hideIcon | `boolean` | Whether the icon is hidden | `false` |
| hideIconWrapper | `boolean` | Whether the icon wrapper is hidden | `false` |
| closeButtonProps | `ButtonProps` | Props for the close button | - |
### Alert Events
@@ -13,7 +13,7 @@ An autocomplete combines a text input with a listbox, allowing users to filter a
---
<CarbonAd/>
<CarbonAd />
## Installation
@@ -24,11 +24,10 @@ An autocomplete combines a text input with a listbox, allowing users to filter a
npm: "npm install @nextui-org/autocomplete",
yarn: "yarn add @nextui-org/autocomplete",
pnpm: "pnpm add @nextui-org/autocomplete",
bun: "bun add @nextui-org/autocomplete"
bun: "bun add @nextui-org/autocomplete",
}}
/>
## Import
NextUI exports 3 autocomplete-related components:
@@ -84,7 +83,7 @@ the end of the label and the autocomplete will be required.
### Read Only
If you pass the `isReadOnly` property to the Autocomplete, the Listbox will open to display
If you pass the `isReadOnly` property to the Autocomplete, the Listbox will open to display
all available options, but users won't be able to select any of the listed options.
<CodeDemo title="Read Only" highlightedLines="8" files={autocompleteContent.readOnly} />
@@ -243,7 +242,10 @@ You can customize the autocomplete items by modifying the `AutocompleteItem` chi
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`.
<CodeDemo title="Custom Empty Content Message" files={autocompleteContent.customEmptyContentMessage} />
<CodeDemo
title="Custom Empty Content Message"
files={autocompleteContent.customEmptyContentMessage}
/>
### Custom Filtering
@@ -316,6 +318,36 @@ import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";
files={autocompleteContent.asyncLoadingItems}
/>
### Virtualization
Autocomplete supports virtualization, in the example below we are using the `isVirtualized` prop to enable virtualization.
<CodeDemo
title="Virtualization"
highlightedLines="41"
files={autocompleteContent.virtualization}
/>
> **Note**: The virtualization strategy is based on the [@tanstack/react-virtual](https://tanstack.com/virtual/latest) package, which provides efficient rendering of large lists by only rendering items that are visible in the viewport.
#### Ten Thousand Items
Virtualization with 10,000 items.
<CodeDemo title="Ten Thousand Items" files={autocompleteContent.virtualizationTenThousand} />
#### Max Listbox Height
The `maxListboxHeight` prop is used to set the maximum height of the listbox. This is required when using virtualization. By default, it's set to `256`.
<CodeDemo title="Max Listbox Height" files={autocompleteContent.virtualizationMaxListboxHeight} />
#### Custom Item Height
The `itemHeight` prop is used to set the height of each item in the listbox. This is required when using virtualization. By default, it's set to `32`.
<CodeDemo title="Custom Item Height" files={autocompleteContent.virtualizationCustomItemHeight} />
### With Sections
You can use the `AutocompleteSection` component to group autocomplete items.
@@ -412,57 +444,60 @@ properties to customize the popover, listbox and input components.
### Autocomplete Props
| Attribute | Type | Description | Default |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| children\* | `ReactNode[]` | The children to render. Usually a list of `AutocompleteItem` and `AutocompleteSection` elements. | - |
| label | `ReactNode` | The content to display as the label. | - |
| name | `string` | The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | - |
| variant | `flat` \| `bordered` \| `faded` \| `underlined` | The variant of the Autocomplete. | `flat` |
| color | `default` \| `primary` \| `secondary` \| `success` \| `warning` \| `danger` | The color of the Autocomplete. | `default` |
| size | `sm` \| `md` \| `lg` | The size of the Autocomplete. | `md` |
| radius | `none` \| `sm` \| `md` \| `lg` \| `full` | The radius of the Autocomplete. | - |
| items | [`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) | The list of Autocomplete items. (controlled) | - |
| defaultItems | [`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) | The list of Autocomplete items (uncontrolled). | - |
| inputValue | `string` | The value of the Autocomplete input (controlled). | - |
| defaultInputValue | `string` | The value of the Autocomplete input (uncontrolled). | - |
| allowsCustomValue | `boolean` | Whether the Autocomplete allows a non-item matching input value to be set. | `false` |
| allowsEmptyCollection | `boolean` | Whether the autocomplete allows the menu to be open when the collection is empty. | `true` |
| shouldCloseOnBlur | `boolean` | Whether the Autocomplete should close when the input is blurred. | `true` |
| placeholder | `string` | Temporary text that occupies the text input when it is empty. | - |
| description | `ReactNode` | A description for the field. Provides a hint such as specific requirements for what to choose. | - |
| menuTrigger | `focus` \| `input` \| `manual` | The action that causes the menu to open. | `focus` |
| labelPlacement | `inside` \| `outside` \| `outside-left` | The position of the label. | `inside` |
| selectedKey | `React.Key` | The currently selected key in the collection (controlled). | - |
| defaultSelectedKey | `React.Key` | The initial selected key in the collection (uncontrolled). | - |
| disabledKeys | `all` \| `React.Key[]` | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | An error message to display below the field. | - |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError true null undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| 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 Autocomplete. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the Autocomplete. | - |
| autoFocus | `boolean` | Whether the Autocomplete should be focused on render. | `false` |
| defaultFilter | `(textValue: string, inputValue: string) => boolean` | The filter function used to determine if a option should be included in the Autocomplete list. | - |
| filterOptions | [Intl.CollatorOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator) | The options used to create the collator used for filtering. | `{ sensitivity: 'base'}` |
| isReadOnly | `boolean` | Whether the Autocomplete is read only. | `false` |
| isRequired | `boolean` | Whether the Autocomplete is required. | `false` |
| isInvalid | `boolean` | Whether the Autocomplete is invalid. | `false` |
| isDisabled | `boolean` | Whether the Autocomplete is disabled. | `false` |
| fullWidth | `boolean` | Whether the input should take up the width of its parent. | `true` |
| selectorIcon | `ReactNode` | The icon that represents the autocomplete open state. Usually a chevron icon. | - |
| clearIcon | `ReactNode` | The icon to be used in the clear button. Usually a cross icon. | - |
| showScrollIndicators | `boolean` | Whether the scroll indicators should be shown when the listbox is scrollable. | `true` |
| scrollRef | `React.RefObject<HTMLElement>` | A ref to the scrollable element. | - |
| inputProps | [InputProps](/docs/components/input#api) | Props to be passed to the Input component. | - |
| popoverProps | [PopoverProps](/docs/components/popover#api) | Props to be passed to the Popover component. | - |
| listboxProps | [ListboxProps](/docs/components/listbox#api) | Props to be passed to the Listbox component. | - |
| scrollShadowProps | [ScrollShadowProps](/docs/components/scroll-shadow#api) | Props to be passed to the ScrollShadow component. | - |
| selectorButtonProps | [ButtonProps](/docs/components/button#api) | Props to be passed to the selector button. | - |
| clearButtonProps | [ButtonProps](/docs/components/button#api) | Props to be passed to the clear button. | - |
| isClearable | `boolean` | Whether the clear button should be shown. | `true` |
| disableClearable | `boolean` | Whether the clear button should be hidden. (**Deprecated**) Use `isClearable` instead. | `false` |
| disableAnimation | `boolean` | Whether the Autocomplete should be animated. | `true` |
| disableSelectorIconRotation | `boolean` | Whether the select should disable the rotation of the selector icon. | `false` |
| classNames | `Record<"base" "listboxWrapper" "listbox" "popoverContent" "endContentWrapper" "clearButton" "selectorButton", string>` | Allows to set custom class names for the Autocomplete slots. | - |
| Attribute | Type | Description | Default |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| children\* | `ReactNode[]` | The children to render. Usually a list of `AutocompleteItem` and `AutocompleteSection` elements. | - |
| label | `ReactNode` | The content to display as the label. | - |
| name | `string` | The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | - |
| variant | `flat` \| `bordered` \| `faded` \| `underlined` | The variant of the Autocomplete. | `flat` |
| color | `default` \| `primary` \| `secondary` \| `success` \| `warning` \| `danger` | The color of the Autocomplete. | `default` |
| size | `sm` \| `md` \| `lg` | The size of the Autocomplete. | `md` |
| radius | `none` \| `sm` \| `md` \| `lg` \| `full` | The radius of the Autocomplete. | - |
| items | [`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) | The list of Autocomplete items. (controlled) | - |
| defaultItems | [`Iterable<T>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) | The list of Autocomplete items (uncontrolled). | - |
| inputValue | `string` | The value of the Autocomplete input (controlled). | - |
| defaultInputValue | `string` | The value of the Autocomplete input (uncontrolled). | - |
| allowsCustomValue | `boolean` | Whether the Autocomplete allows a non-item matching input value to be set. | `false` |
| allowsEmptyCollection | `boolean` | Whether the autocomplete allows the menu to be open when the collection is empty. | `true` |
| shouldCloseOnBlur | `boolean` | Whether the Autocomplete should close when the input is blurred. | `true` |
| placeholder | `string` | Temporary text that occupies the text input when it is empty. | - |
| description | `ReactNode` | A description for the field. Provides a hint such as specific requirements for what to choose. | - |
| menuTrigger | `focus` \| `input` \| `manual` | The action that causes the menu to open. | `focus` |
| labelPlacement | `inside` \| `outside` \| `outside-left` | The position of the label. | `inside` |
| selectedKey | `React.Key` | The currently selected key in the collection (controlled). | - |
| defaultSelectedKey | `React.Key` | The initial selected key in the collection (uncontrolled). | - |
| disabledKeys | `all` \| `React.Key[]` | The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | An error message to display below the field. | - |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError true null undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| 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 Autocomplete. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the Autocomplete. | - |
| autoFocus | `boolean` | Whether the Autocomplete should be focused on render. | `false` |
| defaultFilter | `(textValue: string, inputValue: string) => boolean` | The filter function used to determine if a option should be included in the Autocomplete list. | - |
| filterOptions | [Intl.CollatorOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator) | The options used to create the collator used for filtering. | `{ sensitivity: 'base'}` |
| maxListboxHeight | `number` | The maximum height of the listbox in pixels. Required when using virtualization. | `256` |
| itemHeight | `number` | The fixed height of each item in pixels. Required when using virtualization. | `32` |
| isVirtualized | `boolean` | Whether to enable virtualization. By default, it's enabled when the number of items exceeds 50. | `undefined` |
| isReadOnly | `boolean` | Whether the Autocomplete is read only. | `false` |
| isRequired | `boolean` | Whether the Autocomplete is required. | `false` |
| isInvalid | `boolean` | Whether the Autocomplete is invalid. | `false` |
| isDisabled | `boolean` | Whether the Autocomplete is disabled. | `false` |
| fullWidth | `boolean` | Whether the input should take up the width of its parent. | `true` |
| selectorIcon | `ReactNode` | The icon that represents the autocomplete open state. Usually a chevron icon. | - |
| clearIcon | `ReactNode` | The icon to be used in the clear button. Usually a cross icon. | - |
| showScrollIndicators | `boolean` | Whether the scroll indicators should be shown when the listbox is scrollable. | `true` |
| scrollRef | `React.RefObject<HTMLElement>` | A ref to the scrollable element. | - |
| inputProps | [InputProps](/docs/components/input#api) | Props to be passed to the Input component. | - |
| popoverProps | [PopoverProps](/docs/components/popover#api) | Props to be passed to the Popover component. | - |
| listboxProps | [ListboxProps](/docs/components/listbox#api) | Props to be passed to the Listbox component. | - |
| scrollShadowProps | [ScrollShadowProps](/docs/components/scroll-shadow#api) | Props to be passed to the ScrollShadow component. | - |
| selectorButtonProps | [ButtonProps](/docs/components/button#api) | Props to be passed to the selector button. | - |
| clearButtonProps | [ButtonProps](/docs/components/button#api) | Props to be passed to the clear button. | - |
| isClearable | `boolean` | Whether the clear button should be shown. | `true` |
| disableClearable | `boolean` | Whether the clear button should be hidden. (**Deprecated**) Use `isClearable` instead. | `false` |
| disableAnimation | `boolean` | Whether the Autocomplete should be animated. | `true` |
| disableSelectorIconRotation | `boolean` | Whether the select should disable the rotation of the selector icon. | `false` |
| classNames | `Record<"base" "listboxWrapper" "listbox" "popoverContent" "endContentWrapper" "clearButton" "selectorButton", string>` | Allows to set custom class names for the Autocomplete slots. | - |
### Autocomplete Events
@@ -115,6 +115,15 @@ Drawer offers a `motionProps` property to customize the `enter` / `exit` animati
> Learn more about Framer motion variants [here](https://www.framer.com/motion/animation/#variants).
### Custom Styles
<CodeDemo title="Custom Styles" files={drawerContent.customStyles} />
<b>Credits</b>
The Drawer component design is inspired by [Luma](https://x.com/LumaHQ).
## Slots
- **wrapper**: The wrapper slot of the drawer. It wraps the `base` and the `backdrop` slots.
+3 -1
View File
@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "rimraf .contentlayer && concurrently \"contentlayer2 dev\" \"next dev\"",
"build": "contentlayer2 build && next build",
"build": "contentlayer2 build && next build ",
"build:analyze": "ANALYZE=true next build",
"start": "next start",
"lint": "next lint",
@@ -12,10 +12,12 @@
"preinstall": "node preinstall.js",
"build:sponsors": "tsx scripts/build-sponsors.ts",
"update:search-meta": "tsx scripts/update-search-meta.ts",
"update:github-info": "tsx scripts/update-github-info.ts",
"postbuild": "next-sitemap"
},
"dependencies": {
"@codesandbox/sandpack-react": "^2.6.4",
"@emotion/is-prop-valid": "^1.3.1",
"@iconify/icons-solar": "^1.2.3",
"@iconify/react": "^4.1.1",
"@internationalized/date": "3.5.5",
+75 -62
View File
@@ -1,65 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://nextui.org/feed.xml</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/figma</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/accordion</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/autocomplete</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/avatar</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/badge</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/breadcrumbs</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/button</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/card</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/checkbox-group</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/checkbox</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/chip</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/circular-progress</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/code</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/divider</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/dropdown</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/image</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/input</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/kbd</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/link</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/listbox</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/modal</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/navbar</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/pagination</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/popover</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/progress</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/radio-group</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/scroll-shadow</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/select</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/skeleton</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/slider</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/snippet</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/spacer</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/spinner</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/switch</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/table</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/tabs</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/textarea</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/tooltip</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/user</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/astro</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/nextjs</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/remix</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/vite</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/design-principles</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/installation</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/introduction</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/routing</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/upgrade-to-v2</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/colors</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/create-theme</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/custom-variants</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/customize-theme</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/dark-mode</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/layout</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/override-styles</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/theme</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/nextui-v2</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.1.0</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.2.0</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog</loc><lastmod>2024-02-02T20:24:45.107Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/feed.xml</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/figma</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/nextui-v2</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.1.0</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.2.0</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.3.0</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog/v2.4.0</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/blog</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/api-references/cli-api</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/api-references/nextui-provider</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/colors</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/create-theme</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/custom-variants</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/customize-theme</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/dark-mode</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/layout</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/override-styles</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/customization/theme</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/accordion</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/alert</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/autocomplete</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/avatar</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/badge</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/breadcrumbs</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/button</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/calendar</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/card</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/checkbox-group</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/checkbox</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/chip</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/circular-progress</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/code</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/date-input</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/date-picker</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/date-range-picker</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/divider</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/drawer</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/dropdown</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/image</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/input</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/kbd</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/link</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/listbox</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/modal</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/navbar</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/pagination</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/popover</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/progress</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/radio-group</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/range-calendar</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/scroll-shadow</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/select</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/skeleton</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/slider</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/snippet</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/spacer</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/spinner</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/switch</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/table</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/tabs</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/textarea</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/time-input</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/tooltip</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/components/user</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/astro</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/nextjs</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/remix</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/frameworks/vite</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/cli</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/design-principles</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/installation</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/introduction</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/routing</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextui.org/docs/guide/upgrade-to-v2</loc><lastmod>2024-11-16T13:54:50.591Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
+61
View File
@@ -0,0 +1,61 @@
/* eslint-disable no-console */
import path from "path";
import fs from 'fs';
import prettier from 'prettier';
import fetch from 'node-fetch';
import { formatCompactNumber } from '../utils/number';
const configFolder = "config";
interface GithubInfo {
stars: {
raw: number;
formatted: string;
};
forks: number;
subscribers: number;
openIssues: number;
}
async function getGithubInfo() {
try {
const response = await fetch('https://api.github.com/repos/nextui-org/nextui');
const data = await response.json() as any;
const githubInfo: GithubInfo = {
stars: {
raw: data.stargazers_count,
formatted: formatCompactNumber(data.stargazers_count)
},
forks: data.forks_count,
subscribers: data.subscribers_count,
openIssues: data.open_issues_count,
};
// Format JSON with prettier
const formattedJson = prettier.format(JSON.stringify(githubInfo), {
parser: 'json',
printWidth: 80,
tabWidth: 2,
semi: true,
});
// Create config folder if it doesn't exist
if (!fs.existsSync(configFolder)) {
fs.mkdirSync(configFolder);
}
// Write to github-info.json
const outPath = path.join(process.cwd(), configFolder, 'github-info.json');
fs.writeFileSync(outPath, formattedJson);
console.log("[NextUI] GitHub info updated successfully ✅");
} catch (error) {
console.error("[ERROR 🔥]:", error);
}
}
getGithubInfo();
+25
View File
@@ -0,0 +1,25 @@
/**
* Formats a number into a shortened string representation (e.g., 1K, 1.5M, 2B)
* @param number The number to format
* @param decimals Number of decimal places to show (default: 1)
* @returns Formatted string
*/
export function formatCompactNumber(number: number, decimals: number = 1): string {
if (number === 0) return "0";
const absNumber = Math.abs(number);
const sign = number < 0 ? "-" : "";
if (absNumber < 1000) {
return sign + absNumber.toString();
}
const suffixes = ["", "K", "M", "B", "T"];
const exponent = Math.min(Math.floor(Math.log10(absNumber) / 3), suffixes.length - 1);
const shortNumber = (absNumber / Math.pow(1000, exponent)).toFixed(decimals);
// Remove trailing zeros after decimal point
const formattedNumber = parseFloat(shortNumber).toString();
return sign + formattedNumber + suffixes[exponent];
}
@@ -1,5 +1,88 @@
# @nextui-org/accordion
## 2.1.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/divider@2.1.0-beta.7
- @nextui-org/use-aria-accordion@2.1.0-beta.6
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/dom-animation@2.0.1-beta.6
- @nextui-org/framer-utils@2.0.26-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/divider@2.1.0-beta.6
- @nextui-org/use-aria-accordion@2.1.0-beta.5
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/dom-animation@2.0.1-beta.5
- @nextui-org/framer-utils@2.0.26-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/divider@2.1.0-beta.5
- @nextui-org/use-aria-accordion@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/dom-animation@2.0.1-beta.4
- @nextui-org/framer-utils@2.0.26-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
- @nextui-org/divider@2.1.0-beta.4
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/divider@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/framer-utils@2.0.26-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/divider@2.1.0-beta.3
- @nextui-org/use-aria-accordion@2.1.0-beta.3
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/dom-animation@2.0.1-beta.3
- @nextui-org/framer-utils@2.0.26-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/accordion",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.8",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",
@@ -40,8 +40,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
+85
View File
@@ -1,5 +1,90 @@
# @nextui-org/alert
## 2.1.0-beta.10
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/button@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.9
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/button@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.8
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/button@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.7
### Patch Changes
- [#4073](https://github.com/nextui-org/nextui/pull/4073) [`70dc75983`](https://github.com/nextui-org/nextui/commit/70dc7598388022fca04255c3c1623468a38a3803) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Alert compoentn styles improved
- Updated dependencies []:
- @nextui-org/button@2.1.0-beta.4
## 2.1.0-beta.6
### Patch Changes
- [#4071](https://github.com/nextui-org/nextui/pull/4071) [`31349c178`](https://github.com/nextui-org/nextui/commit/31349c178b9b2bd0be9856bc09126a37be68901a) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Alert styles improved
- Updated dependencies []:
- @nextui-org/button@2.1.0-beta.4
## 2.1.0-beta.5
### Patch Changes
- [#4054](https://github.com/nextui-org/nextui/pull/4054) [`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Alert design improved
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
- @nextui-org/button@2.1.0-beta.4
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/button@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/alert",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.10",
"description": "Alerts are temporary notifications that provide concise feedback about an action or event.",
"keywords": [
"alert"
@@ -38,8 +38,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
@@ -47,9 +47,9 @@
"@nextui-org/react-utils": "workspace:*",
"@nextui-org/shared-icons": "workspace:*",
"@nextui-org/shared-utils": "workspace:*",
"@nextui-org/button": "workspace:*",
"@react-stately/utils": "3.10.1",
"@react-aria/utils": "3.24.1",
"@nextui-org/button": "workspace:*"
"@react-aria/utils": "3.24.1"
},
"devDependencies": {
"@nextui-org/system": "workspace:*",
+11 -5
View File
@@ -24,15 +24,16 @@ const iconMap = {
export type AlertColor = keyof typeof iconMap;
export interface AlertProps extends Omit<UseAlertProps, "hasDescription"> {
color: AlertColor;
}
export interface AlertProps extends Omit<UseAlertProps, "hasDescription"> {}
const Alert = forwardRef<"div", AlertProps>((props, ref) => {
const {
title,
icon,
children,
description,
endContent,
startContent,
isClosable,
domRef,
handleClose,
@@ -45,6 +46,7 @@ const Alert = forwardRef<"div", AlertProps>((props, ref) => {
isVisible,
onClose,
getAlertIconProps,
getIconWrapperProps,
} = useAlert({...props, ref});
if (!isVisible) return null;
@@ -55,12 +57,16 @@ const Alert = forwardRef<"div", AlertProps>((props, ref) => {
return (
<div ref={domRef} role="alert" {...getBaseProps()}>
{customIcon || <IconComponent {...getAlertIconProps()} />}
{startContent}
<div {...getIconWrapperProps()}>
{customIcon || <IconComponent {...getAlertIconProps()} />}
</div>
<div {...getMainWrapperProps()}>
{title && <div {...getTitleProps()}>{title}</div>}
{!isEmpty(description) && <div {...getDescriptionProps()}>{description}</div>}
{children}
</div>
{endContent}
{(isClosable || onClose) && (
<Button
isIconOnly
+25 -4
View File
@@ -27,6 +27,14 @@ interface Props extends HTMLNextUIProps<"div"> {
* Icon to be displayed in the alert - overrides the default icon
*/
icon?: ReactNode;
/**
* Content to be displayed in the end side of the alert
*/
endContent?: ReactNode;
/**
* Content to be displayed in the start side of the alert
*/
startContent?: ReactNode;
/**
* Whether the alert is visible.
* @default false
@@ -81,17 +89,21 @@ export function useAlert(originalProps: UseAlertProps) {
const {
as,
title: titleProp,
title,
children,
description,
onClose,
isClosable,
ref,
icon,
startContent,
endContent,
isVisible: isVisibleProp,
isDefaultVisible,
onVisibleChange,
closeButtonProps = {},
closeButtonProps = {
size: "sm",
},
classNames,
...otherProps
} = props;
@@ -102,8 +114,6 @@ export function useAlert(originalProps: UseAlertProps) {
onVisibleChange,
);
const title = titleProp || children;
const Component = as || "div";
const shouldFilterDOMProps = typeof Component === "string";
@@ -168,12 +178,22 @@ export function useAlert(originalProps: UseAlertProps) {
[slots, classNames?.alertIcon],
);
const getIconWrapperProps = useCallback<PropGetter>(
() => ({
className: slots.iconWrapper({class: classNames?.iconWrapper}),
}),
[slots, classNames?.iconWrapper],
);
return {
title,
icon,
children,
description,
isClosable,
domRef,
endContent,
startContent,
getBaseProps,
getMainWrapperProps,
getDescriptionProps,
@@ -184,5 +204,6 @@ export function useAlert(originalProps: UseAlertProps) {
isVisible,
onClose,
getAlertIconProps,
getIconWrapperProps,
};
}
@@ -1,9 +1,9 @@
import React from "react";
import {Meta} from "@storybook/react";
import {alert} from "@nextui-org/theme";
import {alert, cn} from "@nextui-org/theme";
import {Button} from "@nextui-org/button";
import {Alert} from "../src";
import {Alert, AlertProps} from "../src";
export default {
title: "Components/Alert",
@@ -19,7 +19,7 @@ export default {
control: {
type: "select",
},
options: ["solid", "flat", "bordered"],
options: ["solid", "flat", "bordered", "faded"],
},
radius: {
control: {
@@ -78,7 +78,7 @@ const RadiusTemplate = (args) => {
const VariantTemplate = (args) => {
return (
<div className="flex flex-col w-full">
{["solid", "flat", "bordered"].map((variant) => (
{["solid", "flat", "bordered", "faded"].map((variant) => (
<div key={variant} className="w-full flex items-center my-3">
<Alert {...args} isClosable title={`This is a ${variant} alert`} variant={variant} />
</div>
@@ -103,6 +103,114 @@ const CloseableTemplate = (args) => {
);
};
const WithEndContentTemplate = (args) => {
return (
<Alert
{...args}
color="warning"
description="Upgrade to a paid plan to continue"
endContent={
<Button color="warning" size="sm" variant="flat">
Upgrade
</Button>
}
title="You have no credits left"
variant="faded"
/>
);
};
const CustomAlert = React.forwardRef<HTMLDivElement, AlertProps>(
(
{title, children, variant = "faded", color = "secondary", className, classNames, ...props},
ref,
) => {
const colorClass = React.useMemo(() => {
switch (color) {
case "default":
return "before:bg-default-300";
case "primary":
return "before:bg-primary";
case "secondary":
return "before:bg-secondary";
case "success":
return "before:bg-success";
case "warning":
return "before:bg-warning";
case "danger":
return "before:bg-danger";
default:
return `before:bg-default-200`;
}
}, []);
return (
<Alert
ref={ref}
classNames={{
...classNames,
base: cn(
[
"bg-default-50 dark:bg-background shadow-sm",
"border-1 border-default-200 dark:border-default-100",
"relative before:content-[''] before:absolute before:z-10",
"before:left-0 before:top-[-1px] before:bottom-[-1px] before:w-1",
"rounded-l-none border-l-0",
colorClass,
],
classNames?.base,
className,
),
mainWrapper: cn("pt-1", classNames?.mainWrapper),
iconWrapper: cn("dark:bg-transparent", classNames?.iconWrapper),
}}
color={color}
title={title}
variant={variant}
{...props}
>
<div className="flex items-center gap-1 mt-3">{children}</div>
</Alert>
);
},
);
CustomAlert.displayName = "CustomAlert";
const CustomStylesTemplate = (args) => {
const colors = ["default", "primary", "secondary", "success", "warning", "danger"];
return (
<div className="flex flex-col w-full gap-y-6">
{colors.map((color) => (
<CustomAlert
{...args}
key={color}
color={color}
title="The documents you requested are ready to be viewed"
>
<div className="flex items-center gap-1 mt-3">
<Button
className="bg-background text-default-700 font-medium border-1 shadow-small"
size="sm"
variant="bordered"
>
View documents
</Button>
<Button
className="text-default-500 font-medium underline underline-offset-4"
size="sm"
variant="light"
>
Maybe later
</Button>
</div>
</CustomAlert>
))}
</div>
);
};
export const Default = {
render: Template,
args: {
@@ -122,6 +230,7 @@ export const Color = {
render: ColorTemplate,
args: {
...defaultProps,
variant: "faded",
},
};
@@ -172,21 +281,16 @@ export const Closable = {
},
};
export const CustomWithClassNames = {
render: Template,
export const WithEndContent = {
render: WithEndContentTemplate,
args: {
...defaultProps,
},
};
export const CustomStyles = {
render: CustomStylesTemplate,
args: {
...defaultProps,
classNames: {
base: [
"bg-background",
"border",
"border-foreground-400",
"shadow",
"hover:bg-slate-200",
"cursor-pointer",
],
title: ["text-base", "text-foreground", "font-semibold"],
description: ["text-base", "text-foreground-600"],
},
},
};
@@ -1,5 +1,127 @@
# @nextui-org/autocomplete
## 2.2.0-beta.11
### Patch Changes
- [#4094](https://github.com/nextui-org/nextui/pull/4094) [`b9d5d4925`](https://github.com/nextui-org/nextui/commit/b9d5d492519778a4bf071748ec9f2b4e25d8373f) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Virtualization support added to Listbox & Autocomplete
- Updated dependencies [[`b9d5d4925`](https://github.com/nextui-org/nextui/commit/b9d5d492519778a4bf071748ec9f2b4e25d8373f)]:
- @nextui-org/listbox@2.2.0-beta.8
- @nextui-org/button@2.1.0-beta.7
- @nextui-org/input@2.3.0-beta.9
- @nextui-org/popover@2.2.0-beta.8
- @nextui-org/scroll-shadow@2.2.0-beta.7
- @nextui-org/spinner@2.1.0-beta.7
## 2.2.0-beta.10
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/button@2.1.0-beta.7
- @nextui-org/input@2.3.0-beta.9
- @nextui-org/listbox@2.2.0-beta.7
- @nextui-org/popover@2.2.0-beta.8
- @nextui-org/scroll-shadow@2.2.0-beta.7
- @nextui-org/spinner@2.1.0-beta.7
- @nextui-org/use-aria-button@2.1.0-beta.6
- @nextui-org/use-safe-layout-effect@2.0.7-beta.4
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.9
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/button@2.1.0-beta.6
- @nextui-org/input@2.3.0-beta.8
- @nextui-org/listbox@2.2.0-beta.6
- @nextui-org/popover@2.2.0-beta.7
- @nextui-org/scroll-shadow@2.2.0-beta.6
- @nextui-org/spinner@2.1.0-beta.6
- @nextui-org/use-aria-button@2.1.0-beta.5
- @nextui-org/use-safe-layout-effect@2.0.7-beta.3
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.8
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/button@2.1.0-beta.5
- @nextui-org/input@2.3.0-beta.7
- @nextui-org/listbox@2.2.0-beta.5
- @nextui-org/popover@2.2.0-beta.6
- @nextui-org/scroll-shadow@2.2.0-beta.5
- @nextui-org/spinner@2.1.0-beta.5
- @nextui-org/use-aria-button@2.1.0-beta.4
- @nextui-org/use-safe-layout-effect@2.0.7-beta.2
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.7
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/input@2.3.0-beta.6
- @nextui-org/listbox@2.2.0-beta.4
- @nextui-org/popover@2.2.0-beta.5
- @nextui-org/scroll-shadow@2.2.0-beta.4
- @nextui-org/spinner@2.1.0-beta.4
## 2.2.0-beta.6
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/input@2.3.0-beta.5
- @nextui-org/listbox@2.2.0-beta.4
- @nextui-org/popover@2.2.0-beta.5
- @nextui-org/scroll-shadow@2.2.0-beta.4
- @nextui-org/spinner@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.5
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/button@2.1.0-beta.3
- @nextui-org/input@2.3.0-beta.4
- @nextui-org/listbox@2.2.0-beta.3
- @nextui-org/popover@2.2.0-beta.4
- @nextui-org/scroll-shadow@2.2.0-beta.3
- @nextui-org/spinner@2.1.0-beta.3
- @nextui-org/use-aria-button@2.1.0-beta.3
- @nextui-org/use-safe-layout-effect@2.0.7-beta.1
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.4
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/autocomplete",
"version": "2.2.0-beta.4",
"version": "2.2.0-beta.11",
"description": "An autocomplete combines a text input with a listbox, allowing users to filter a list of options to items matching a query.",
"keywords": [
"autocomplete"
@@ -36,9 +36,9 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"framer-motion": ">=11.5.6",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@nextui-org/aria-utils": "workspace:*",
@@ -110,13 +110,30 @@ interface Props<T> extends Omit<HTMLNextUIProps<"input">, keyof ComboBoxProps<T>
* Callback fired when the select menu is closed.
*/
onClose?: () => void;
/**
* Whether to enable virtualization of the listbox items.
* By default, virtualization is automatically enabled when the number of items is greater than 50.
* @default undefined
*/
isVirtualized?: boolean;
}
export type UseAutocompleteProps<T> = Props<T> &
Omit<InputProps, "children" | "value" | "isClearable" | "defaultValue" | "classNames"> &
ComboBoxProps<T> &
AsyncLoadable &
AutocompleteVariantProps;
AutocompleteVariantProps & {
/**
* The height of each item in the listbox.
* This is required for virtualized listboxes to calculate the height of each item.
*/
itemHeight?: number;
/**
* The max height of the listbox (which will be rendered in a popover).
* This is required for virtualized listboxes to set the maximum height of the listbox.
*/
maxListboxHeight?: number;
};
export function useAutocomplete<T extends object>(originalProps: UseAutocompleteProps<T>) {
const globalContext = useProviderContext();
@@ -158,6 +175,9 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
clearButtonProps = {},
showScrollIndicators = true,
allowsCustomValue = false,
isVirtualized,
maxListboxHeight = 256,
itemHeight = 32,
validationBehavior = globalContext?.validationBehavior ?? "aria",
className,
classNames,
@@ -425,14 +445,25 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
onClick: chain(slotsProps.inputProps.onClick, otherProps.onClick),
} as unknown as InputProps);
const getListBoxProps = () =>
({
const getListBoxProps = () => {
// Use isVirtualized prop if defined, otherwise fallback to default behavior
const shouldVirtualize = isVirtualized ?? state.collection.size > 50;
return {
state,
ref: listBoxRef,
isVirtualized: shouldVirtualize,
virtualization: shouldVirtualize
? {
maxListboxHeight,
itemHeight,
}
: undefined,
...mergeProps(slotsProps.listboxProps, listBoxProps, {
shouldHighlightOnFocus: true,
}),
} as ListboxProps);
} as ListboxProps;
};
const getPopoverProps = (props: DOMAttributes = {}) => {
const popoverProps = mergeProps(slotsProps.popoverProps, props);
@@ -479,6 +510,9 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
props?.className,
),
}),
style: {
maxHeight: originalProps.maxListboxHeight ?? 256,
},
});
const getEndContentWrapperProps: PropGetter = (props: any = {}) => ({
@@ -100,6 +100,58 @@ const items = animalsData.map((item) => (
</AutocompleteItem>
));
interface LargeDatasetSchema {
label: string;
value: string;
description: string;
}
function generateLargeDataset(n: number): LargeDatasetSchema[] {
const dataset: LargeDatasetSchema[] = [];
const items = [
"Cat",
"Dog",
"Elephant",
"Lion",
"Tiger",
"Giraffe",
"Dolphin",
"Penguin",
"Zebra",
"Shark",
"Whale",
"Otter",
"Crocodile",
];
for (let i = 0; i < n; i++) {
const item = items[i % items.length];
dataset.push({
label: `${item}${i}`,
value: `${item.toLowerCase()}${i}`,
description: "Sample description",
});
}
return dataset;
}
const LargeDatasetTemplate = (args: AutocompleteProps & {numItems: number}) => {
const largeDataset = generateLargeDataset(args.numItems);
return (
<Autocomplete label={`Search from ${args.numItems} items`} {...args}>
{largeDataset.map((item, index) => (
<AutocompleteItem key={index} value={item.value}>
{item.label}
</AutocompleteItem>
))}
</Autocomplete>
);
};
const Template = (args: AutocompleteProps) => (
<Autocomplete label="Favorite Animal" {...args}>
<AutocompleteItem key="red_panda">Red Panda</AutocompleteItem>
@@ -1061,3 +1113,42 @@ export const FullyControlled = {
...defaultProps,
},
};
export const OneThousandList = {
render: LargeDatasetTemplate,
args: {
...defaultProps,
placeholder: "Search...",
numItems: 1000,
},
};
export const TenThousandList = {
render: LargeDatasetTemplate,
args: {
...defaultProps,
placeholder: "Search...",
numItems: 10000,
},
};
export const CustomMaxListboxHeight = {
render: LargeDatasetTemplate,
args: {
...defaultProps,
placeholder: "Search...",
numItems: 1000,
maxListboxHeight: 400,
},
};
export const CustomItemHeight = {
render: LargeDatasetTemplate,
args: {
...defaultProps,
placeholder: "Search...",
numItems: 1000,
maxListboxHeight: 400,
itemHeight: 40,
},
};
+52
View File
@@ -1,5 +1,57 @@
# @nextui-org/avatar
## 2.1.0-beta.10
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/use-image@2.0.7-beta.9
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.9
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/use-image@2.0.7-beta.8
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.8
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/use-image@2.0.7-beta.7
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.7
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.6
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/use-image@2.0.7-beta.6
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.5
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/avatar",
"version": "2.1.0-beta.5",
"version": "2.1.0-beta.10",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"keywords": [
"avatar"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+48
View File
@@ -1,5 +1,53 @@
# @nextui-org/badge
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/badge",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "Badges are used as a small numerical value or status descriptor for UI elements.",
"keywords": [
"badge"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
@@ -1,5 +1,64 @@
# @nextui-org/breadcrumbs
## 2.1.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/breadcrumbs",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.8",
"description": "Breadcrumbs display a hierarchy of links to the current page or resource in an application.",
"keywords": [
"breadcrumbs"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+62
View File
@@ -1,5 +1,67 @@
# @nextui-org/button
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/ripple@2.1.0-beta.7
- @nextui-org/spinner@2.1.0-beta.7
- @nextui-org/use-aria-button@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/ripple@2.1.0-beta.6
- @nextui-org/spinner@2.1.0-beta.6
- @nextui-org/use-aria-button@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/ripple@2.1.0-beta.5
- @nextui-org/spinner@2.1.0-beta.5
- @nextui-org/use-aria-button@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/ripple@2.1.0-beta.4
- @nextui-org/spinner@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/ripple@2.1.0-beta.3
- @nextui-org/spinner@2.1.0-beta.3
- @nextui-org/use-aria-button@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/button",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "Buttons allow users to perform actions and choose with a single tap.",
"keywords": [
"button"
@@ -34,9 +34,9 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"framer-motion": ">=11.5.6",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+80
View File
@@ -1,5 +1,85 @@
# @nextui-org/calendar
## 2.1.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/button@2.1.0-beta.7
- @nextui-org/use-aria-button@2.1.0-beta.6
- @nextui-org/dom-animation@2.0.1-beta.6
- @nextui-org/framer-utils@2.0.26-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/button@2.1.0-beta.6
- @nextui-org/use-aria-button@2.1.0-beta.5
- @nextui-org/dom-animation@2.0.1-beta.5
- @nextui-org/framer-utils@2.0.26-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/button@2.1.0-beta.5
- @nextui-org/use-aria-button@2.1.0-beta.4
- @nextui-org/dom-animation@2.0.1-beta.4
- @nextui-org/framer-utils@2.0.26-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
- @nextui-org/button@2.1.0-beta.4
## 2.1.0-beta.4
### Patch Changes
- [#4039](https://github.com/nextui-org/nextui/pull/4039) [`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7) Thanks [@wingkwong](https://github.com/wingkwong)! - support inert value with boolean type for react 19 (#4038)
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/framer-utils@2.0.26-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/button@2.1.0-beta.3
- @nextui-org/use-aria-button@2.1.0-beta.3
- @nextui-org/dom-animation@2.0.1-beta.3
- @nextui-org/framer-utils@2.0.26-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/calendar",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.8",
"description": "A calendar displays one or more date grids and allows users to select a single date.",
"keywords": [
"calendar"
@@ -36,8 +36,8 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@nextui-org/react-utils": "workspace:*",
@@ -4,7 +4,7 @@ import {HTMLNextUIProps} from "@nextui-org/system";
import {useLocale} from "@react-aria/i18n";
import {useCalendarGrid} from "@react-aria/calendar";
import {m} from "framer-motion";
import {dataAttr} from "@nextui-org/shared-utils";
import {dataAttr, getInertValue} from "@nextui-org/shared-utils";
import {CalendarCell} from "./calendar-cell";
import {slideVariants} from "./calendar-transitions";
@@ -40,9 +40,8 @@ export function CalendarMonth(props: CalendarMonthProps) {
className={slots?.gridBodyRow({class: classNames?.gridBodyRow})}
data-slot="grid-body-row"
// makes the browser ignore the element and its children when tabbing
// TODO: invert inert when switching to React 19 (ref: https://github.com/facebook/react/issues/17157)
// @ts-ignore
inert={isHeaderExpanded ? "" : undefined}
inert={getInertValue(!!isHeaderExpanded)}
>
{state
.getDatesInWeek(weekIndex, startDate)
@@ -2,6 +2,7 @@ import type {CalendarPickerProps} from "./use-calendar-picker";
import {HTMLNextUIProps} from "@nextui-org/system";
import {useCallback} from "react";
import {getInertValue} from "@nextui-org/shared-utils";
import {CalendarPickerItem} from "./calendar-picker-item";
import {useCalendarPicker} from "./use-calendar-picker";
@@ -66,9 +67,8 @@ export function CalendarPicker(props: CalendarPickerProps) {
})}
data-slot="picker-wrapper"
// makes the browser ignore the element and its children when tabbing
// TODO: invert inert when switching to React 19 (ref: https://github.com/facebook/react/issues/17157)
// @ts-ignore
inert={isHeaderExpanded ? undefined : ""}
inert={getInertValue(!isHeaderExpanded)}
>
<div
ref={highlightRef}
+57
View File
@@ -1,5 +1,62 @@
# @nextui-org/card
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/ripple@2.1.0-beta.7
- @nextui-org/use-aria-button@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/ripple@2.1.0-beta.6
- @nextui-org/use-aria-button@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/ripple@2.1.0-beta.5
- @nextui-org/use-aria-button@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/ripple@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/ripple@2.1.0-beta.3
- @nextui-org/use-aria-button@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/card",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
"keywords": [
"card"
@@ -34,9 +34,9 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"framer-motion": ">=11.5.6",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+56
View File
@@ -1,5 +1,61 @@
# @nextui-org/checkbox
## 2.2.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/use-callback-ref@2.0.7-beta.4
- @nextui-org/use-safe-layout-effect@2.0.7-beta.4
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/use-callback-ref@2.0.7-beta.3
- @nextui-org/use-safe-layout-effect@2.0.7-beta.3
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/use-callback-ref@2.0.7-beta.2
- @nextui-org/use-safe-layout-effect@2.0.7-beta.2
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/use-callback-ref@2.0.7-beta.1
- @nextui-org/use-safe-layout-effect@2.0.7-beta.1
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/checkbox",
"version": "2.2.0-beta.2",
"version": "2.2.0-beta.7",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"keywords": [
"checkbox"
@@ -36,8 +36,8 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@nextui-org/react-utils": "workspace:*",
+59
View File
@@ -1,5 +1,64 @@
# @nextui-org/chip
## 2.1.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/chip",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.8",
"description": "Chips help people enter information, make selections, filter content, or trigger actions.",
"keywords": [
"chip"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+53
View File
@@ -1,5 +1,58 @@
# @nextui-org/code
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/system-rsc@2.2.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/system-rsc@2.2.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/system-rsc@2.2.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/system-rsc@2.2.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/system-rsc@2.2.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/code",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "Code is a component used to display inline code.",
"keywords": [
"code"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0"
},
"dependencies": {
@@ -1,5 +1,53 @@
# @nextui-org/date-input
## 2.2.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/date-input",
"version": "2.2.0-beta.2",
"version": "2.2.0-beta.7",
"description": "A date input allows users to enter and edit date and time values using a keyboard.",
"keywords": [
"date-field"
@@ -36,8 +36,8 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@nextui-org/react-utils": "workspace:*",
@@ -1,5 +1,93 @@
# @nextui-org/date-picker
## 2.2.0-beta.9
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/button@2.1.0-beta.7
- @nextui-org/calendar@2.1.0-beta.8
- @nextui-org/date-input@2.2.0-beta.7
- @nextui-org/popover@2.2.0-beta.8
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.8
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/button@2.1.0-beta.6
- @nextui-org/calendar@2.1.0-beta.7
- @nextui-org/date-input@2.2.0-beta.6
- @nextui-org/popover@2.2.0-beta.7
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.7
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/button@2.1.0-beta.5
- @nextui-org/calendar@2.1.0-beta.6
- @nextui-org/date-input@2.2.0-beta.5
- @nextui-org/popover@2.2.0-beta.6
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.6
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/calendar@2.1.0-beta.5
- @nextui-org/date-input@2.2.0-beta.4
- @nextui-org/popover@2.2.0-beta.5
## 2.2.0-beta.5
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/calendar@2.1.0-beta.4
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/button@2.1.0-beta.4
- @nextui-org/date-input@2.2.0-beta.4
- @nextui-org/popover@2.2.0-beta.5
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.4
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/button@2.1.0-beta.3
- @nextui-org/calendar@2.1.0-beta.3
- @nextui-org/date-input@2.2.0-beta.3
- @nextui-org/popover@2.2.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.3
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/date-picker",
"version": "2.2.0-beta.3",
"version": "2.2.0-beta.9",
"description": "A date picker combines a DateInput and a Calendar popover to allow users to enter or select a date and time value.",
"keywords": [
"date-picker"
@@ -36,8 +36,8 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@internationalized/date": "3.5.5",
+52
View File
@@ -1,5 +1,57 @@
# @nextui-org/divider
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/system-rsc@2.2.0-beta.6
- @nextui-org/react-rsc-utils@2.0.15-beta.4
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/system-rsc@2.2.0-beta.5
- @nextui-org/react-rsc-utils@2.0.15-beta.3
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/system-rsc@2.2.0-beta.4
- @nextui-org/react-rsc-utils@2.0.15-beta.2
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/system-rsc@2.2.0-beta.3
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/system-rsc@2.2.0-beta.3
- @nextui-org/react-rsc-utils@2.0.15-beta.1
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/divider",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": ". A separator is a visual divider between two groups of content",
"keywords": [
"divider"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0"
},
"dependencies": {
+74
View File
@@ -1,5 +1,79 @@
# @nextui-org/drawer
## 2.1.0-beta.9
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/modal@2.1.0-beta.9
- @nextui-org/framer-utils@2.0.26-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.8
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/modal@2.1.0-beta.8
- @nextui-org/framer-utils@2.0.26-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.7
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/modal@2.1.0-beta.7
- @nextui-org/framer-utils@2.0.26-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.6
### Patch Changes
- [#4057](https://github.com/nextui-org/nextui/pull/4057) [`d947b9283`](https://github.com/nextui-org/nextui/commit/d947b92833c8e4abc16dae72466cdb922313e9c8) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Drawer styles and transition improved
- Updated dependencies [[`d947b9283`](https://github.com/nextui-org/nextui/commit/d947b92833c8e4abc16dae72466cdb922313e9c8)]:
- @nextui-org/modal@2.1.0-beta.6
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies []:
- @nextui-org/modal@2.1.0-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/modal@2.1.0-beta.4
- @nextui-org/framer-utils@2.0.26-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/modal@2.1.0-beta.3
- @nextui-org/framer-utils@2.0.26-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+6 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/drawer",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.9",
"description": "Used to render a content that slides in from the side of the screen.",
"keywords": [
"drawer"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
@@ -50,7 +50,10 @@
"@nextui-org/system": "workspace:*",
"@nextui-org/input": "workspace:*",
"@nextui-org/checkbox": "workspace:*",
"@nextui-org/tooltip": "workspace:*",
"@nextui-org/image": "workspace:*",
"@nextui-org/button": "workspace:*",
"@nextui-org/avatar": "workspace:*",
"@nextui-org/link": "workspace:*",
"@nextui-org/switch": "workspace:*",
"@nextui-org/shared-icons": "workspace:*",
+6 -8
View File
@@ -4,7 +4,7 @@ import {drawer} from "@nextui-org/theme";
import {ReactRef, useDOMRef} from "@nextui-org/react-utils";
import {useCallback, useMemo} from "react";
import {TRANSITION_EASINGS} from "@nextui-org/framer-utils";
import {clsx} from "@nextui-org/shared-utils";
import {clsx, isEmpty} from "@nextui-org/shared-utils";
import {PropGetter} from "@nextui-org/system";
interface Props extends Omit<ModalProps, "placement" | "scrollBehavior" | "children"> {
@@ -39,7 +39,7 @@ export function useDrawer(originalProps: UseDrawerProps) {
const domRef = useDOMRef(ref);
const motionProps = useMemo(() => {
if (drawerMotionProps !== void 0) return drawerMotionProps;
if (!isEmpty(drawerMotionProps)) return drawerMotionProps;
const key = placement === "left" || placement === "right" ? "x" : "y";
@@ -49,9 +49,8 @@ export function useDrawer(originalProps: UseDrawerProps) {
[key]: 0,
transition: {
[key]: {
bounce: 0,
duration: 0.3,
ease: TRANSITION_EASINGS.ease,
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut,
},
},
},
@@ -59,9 +58,8 @@ export function useDrawer(originalProps: UseDrawerProps) {
[key]: placement === "top" || placement === "left" ? "-100%" : "100%",
transition: {
[key]: {
bounce: 0,
duration: 0.6,
ease: TRANSITION_EASINGS.ease,
duration: 0.1,
ease: TRANSITION_EASINGS.easeIn,
},
},
},
@@ -6,6 +6,9 @@ import {Button} from "@nextui-org/button";
import {Input} from "@nextui-org/input";
import {Checkbox} from "@nextui-org/checkbox";
import {Link} from "@nextui-org/link";
import {Tooltip} from "@nextui-org/tooltip";
import {Image} from "@nextui-org/image";
import {Avatar, AvatarGroup} from "@nextui-org/avatar";
import {MailFilledIcon, LockFilledIcon} from "@nextui-org/shared-icons";
import {useDisclosure} from "@nextui-org/use-disclosure";
@@ -165,6 +168,335 @@ const PlacementTemplate = (args: DrawerProps) => {
);
};
const CustomStylesTemplate = (args: DrawerProps) => {
const {isOpen, onOpen, onOpenChange} = useDisclosure({defaultOpen: args.defaultOpen});
return (
<>
<Button
className="text-default-500"
endContent={
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
<path
d="M5.75 1.25a.75.75 0 1 0-1.5 0v.823l-.392.044c-.9.121-1.658.38-2.26.982s-.861 1.36-.982 2.26C.5 6.225.5 7.328.5 8.695v.11l.117 3.337c.121.9.38 1.658.982 2.26s1.36.861 2.26.982c.867.117 1.969.117 3.337.117h1.658l3.337-.117c.9-.121 1.658-.38 2.26-.982s.861-1.36.982-2.26c.117-.867.117-1.969.117-3.337v-.11l-.117-3.337c-.121-.9-.38-1.658-.982-2.26s-1.36-.861-2.26-.982l-.44-.048V1.25a.75.75 0 0 0-1.5 0v.756L8.853 2H7.195q-.78-.002-1.445.006zm4.5 3v-.744L8.798 3.5H7.25l-1.5.007v.743a.75.75 0 1 1-1.5 0v-.67l-.192.023c-.734.099-1.122.279-1.399.556s-.457.665-.556 1.399C2.002 6.313 2 7.315 2 8.75l.103 3.192c.099.734.279 1.122.556 1.399s.665.457 1.399.556c.755.101 1.756.103 3.192.103h1.548l3.192-.103c.734-.099 1.122-.279 1.399-.556s.457-.665.556-1.399c.102-.755.103-1.757.103-3.192l-.103-3.192c-.099-.734-.279-1.122-.556-1.399s-.665-.457-1.399-.556l-.241-.028v.675a.75.75 0 0 1-1.5 0zm-5 3.5a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0m0 3.5a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0M8 8.5A.75.75 0 1 0 8 7a.75.75 0 1 0 0 1.5m.75 2.75a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0M11.5 8.5a.75.75 0 1 0 0-1.5.75.75 0 1 0 0 1.5m.75 2.75a.75.75 0 1 1-1.5 0 .75.75 0 1 1 1.5 0"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
}
variant="flat"
onPress={onOpen}
>
See Event
</Button>
<Drawer
{...args}
hideCloseButton
backdrop="blur"
classNames={{
base: "data-[placement=right]:sm:m-2 data-[placement=left]:sm:m-2 rounded-medium",
}}
isOpen={isOpen}
onOpenChange={onOpenChange}
>
<DrawerContent>
{(onClose) => (
<>
<DrawerHeader className="absolute top-0 inset-x-0 z-50 flex flex-row gap-2 px-2 py-2 border-b border-default-200/50 justify-between bg-content1/50 backdrop-saturate-150 backdrop-blur-lg">
<Tooltip content="Close">
<Button
isIconOnly
className="text-default-400"
size="sm"
variant="light"
onPress={onClose}
>
<svg
fill="none"
height="20"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m13 17 5-5-5-5M6 17l5-5-5-5" />
</svg>
</Button>
</Tooltip>
<div className="w-full flex justify-start gap-2">
<Button
className="font-medium text-small text-default-500"
size="sm"
startContent={
<svg
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.85.75c-.908 0-1.702.328-2.265.933-.558.599-.835 1.41-.835 2.29V7.88c0 .801.23 1.548.697 2.129.472.587 1.15.96 1.951 1.06a.75.75 0 1 0 .185-1.489c-.435-.054-.752-.243-.967-.51-.219-.273-.366-.673-.366-1.19V3.973c0-.568.176-.993.433-1.268.25-.27.632-.455 1.167-.455h4.146c.479 0 .828.146 1.071.359.246.215.43.54.497.979a.75.75 0 0 0 1.483-.23c-.115-.739-.447-1.4-.99-1.877C9.51 1 8.796.75 7.996.75zM7.9 4.828c-.908 0-1.702.326-2.265.93-.558.6-.835 1.41-.835 2.29v3.905c0 .879.275 1.69.833 2.289.563.605 1.357.931 2.267.931h4.144c.91 0 1.705-.326 2.268-.931.558-.599.833-1.41.833-2.289V8.048c0-.879-.275-1.69-.833-2.289-.563-.605-1.357-.931-2.267-.931zm-1.6 3.22c0-.568.176-.992.432-1.266.25-.27.632-.454 1.168-.454h4.145c.54 0 .92.185 1.17.453.255.274.43.698.43 1.267v3.905c0 .569-.175.993-.43 1.267-.25.268-.631.453-1.17.453H7.898c-.54 0-.92-.185-1.17-.453-.255-.274-.43-.698-.43-1.267z"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
}
variant="flat"
>
Copy Link
</Button>
<Button
className="font-medium text-small text-default-500"
endContent={
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M7 17 17 7M7 7h10v10" />
</svg>
}
size="sm"
variant="flat"
>
Event Page
</Button>
</div>
<div className="flex gap-1 items-center">
<Tooltip content="Previous">
<Button isIconOnly className="text-default-500" size="sm" variant="flat">
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m18 15-6-6-6 6" />
</svg>
</Button>
</Tooltip>
<Tooltip content="Next">
<Button isIconOnly className="text-default-500" size="sm" variant="flat">
<svg
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="m6 9 6 6 6-6" />
</svg>
</Button>
</Tooltip>
</div>
</DrawerHeader>
<DrawerBody className="pt-16">
<div className="flex w-full justify-center items-center pt-4">
<Image
isBlurred
isZoomed
alt="Event image"
className="aspect-square w-full hover:scale-110"
height={300}
src="https://nextuipro.nyc3.cdn.digitaloceanspaces.com/components-images/places/san-francisco.png"
/>
</div>
<div className="flex flex-col gap-2 py-4">
<h1 className="text-2xl font-bold leading-7">SF Bay Area Meetup in November</h1>
<p className="text-sm text-default-500">
555 California St, San Francisco, CA 94103
</p>
<div className="mt-4 flex flex-col gap-3">
<div className="flex gap-3 items-center">
<div className="flex-none border-1 border-default-200/50 rounded-small text-center w-11 overflow-hidden">
<div className="text-tiny bg-default-100 py-0.5 text-default-500">Nov</div>
<div className="flex items-center justify-center font-semibold text-medium h-6 text-default-500">
19
</div>
</div>
<div className="flex flex-col gap-0.5">
<p className="text-medium text-foreground font-medium">
Tuesday, November 19
</p>
<p className="text-small text-default-500">5:00 PM - 9:00 PM PST</p>
</div>
</div>
<div className="flex gap-3 items-center">
<div className="flex items-center justify-center border-1 border-default-200/50 rounded-small w-11 h-11">
<svg
className="text-default-500"
height="20"
viewBox="0 0 16 16"
width="20"
xmlns="http://www.w3.org/2000/svg"
>
<g
fill="none"
fillRule="evenodd"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
>
<path d="M2 6.854C2 11.02 7.04 15 8 15s6-3.98 6-8.146C14 3.621 11.314 1 8 1S2 3.62 2 6.854" />
<path d="M9.5 6.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
</g>
</svg>
</div>
<div className="flex flex-col gap-0.5">
<Link
isExternal
showAnchorIcon
anchorIcon={
<svg
className="group-hover:text-inherit text-default-400 transition-[color,transform] group-hover:-translate-y-0.5 group-hover:translate-x-0.5"
fill="none"
height="16"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M7 17 17 7M7 7h10v10" />
</svg>
}
className="group gap-x-0.5 text-medium text-foreground font-medium"
href="https://www.google.com/maps/place/555+California+St,+San+Francisco,+CA+94103"
rel="noreferrer noopener"
>
555 California St suite 500
</Link>
<p className="text-small text-default-500">San Francisco, California</p>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-medium font-medium">About the event</span>
<div className="text-medium text-default-500 flex flex-col gap-2">
<p>
Hey Bay Area! We are excited to announce our next meetup on Tuesday,
November 19th.
</p>
<p>
Join us for an evening of insightful discussions and hands-on workshops
focused on the latest developments in web development and design. Our
featured speakers will share their experiences with modern frontend
frameworks, responsive design patterns, and emerging web technologies.
You&apos;ll have the opportunity to network with fellow developers and
designers while enjoying refreshments and snacks.
</p>
<p>
During the main session, we&apos;ll dive deep into practical examples of
building scalable applications, exploring best practices for component
architecture, and understanding advanced state management techniques. Our
interactive workshop portion will let you apply these concepts directly,
with experienced mentors available to provide guidance and answer your
questions. Whether you&apos;re a seasoned developer or just starting your
journey, you&apos;ll find valuable takeaways from this session.
</p>
<p className="mt-4">
Brought to you by the{" "}
<Link className="text-default-700" href="https://nextui.org">
NextUI team
</Link>
.
</p>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-small text-default-500">Hosted By</span>
<div className="flex gap-2 items-center">
<Avatar
name="NextUI"
size="sm"
src="https://nextui.org/android-chrome-192x192.png"
/>
<span className="text-small text-default-500">NextUI Team</span>
</div>
</div>
<div className="flex flex-col mt-4 gap-3 items-start">
<span className="text-small text-default-500">105 Going</span>
<div className="flex gap-2 items-center">
<AvatarGroup
isBordered
classNames={{
base: "pl-2",
count: "text-default-500 text-tiny bg-default-100",
}}
size="sm"
total={101}
>
<Tooltip content="Alex">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Alex"
src="https://i.pravatar.cc/150?u=a04258114e29026708c"
/>
</Tooltip>
<Tooltip content="Joe">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Joe"
src="https://i.pravatar.cc/150?u=a04258114e290267084"
/>
</Tooltip>
<Tooltip content="John">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="John"
src="https://i.pravatar.cc/150?u=a04258a2462d826712d"
/>
</Tooltip>
<Tooltip content="Jane">
<Avatar
className="data-[hover=true]:!translate-x-0"
name="Jane"
src="https://i.pravatar.cc/150?u=a04258114e29026702d"
/>
</Tooltip>
</AvatarGroup>
</div>
</div>
</div>
</div>
</DrawerBody>
<DrawerFooter className="flex flex-col gap-1">
<Link className="text-default-400" href="mailto:hello@nextui.org" size="sm">
Contact the host
</Link>
<Link className="text-default-400" href="mailto:hello@nextui.org" size="sm">
Report event
</Link>
</DrawerFooter>
</>
)}
</DrawerContent>
</Drawer>
</>
);
};
export const Default = {
render: Template,
args: {
@@ -216,3 +548,10 @@ export const CustomMotion = {
},
},
};
export const CustomStyles = {
render: CustomStylesTemplate,
args: {
...defaultProps,
},
};
+63
View File
@@ -1,5 +1,68 @@
# @nextui-org/dropdown
## 2.2.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/menu@2.1.0-beta.7
- @nextui-org/popover@2.2.0-beta.8
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/menu@2.1.0-beta.6
- @nextui-org/popover@2.2.0-beta.7
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/menu@2.1.0-beta.5
- @nextui-org/popover@2.2.0-beta.6
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.5
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/menu@2.1.0-beta.4
- @nextui-org/popover@2.2.0-beta.5
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.4
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/menu@2.1.0-beta.3
- @nextui-org/popover@2.2.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.3
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/dropdown",
"version": "2.2.0-beta.3",
"version": "2.2.0-beta.8",
"description": "A dropdown displays a list of actions or options that a user can choose.",
"keywords": [
"dropdown"
@@ -36,9 +36,9 @@
"peerDependencies": {
"@nextui-org/system": ">=2.3.0-beta.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"framer-motion": ">=11.5.6",
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0"
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@nextui-org/aria-utils": "workspace:*",
+52
View File
@@ -1,5 +1,57 @@
# @nextui-org/image
## 2.1.0-beta.10
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/use-image@2.0.7-beta.9
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.9
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/use-image@2.0.7-beta.8
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.8
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/use-image@2.0.7-beta.7
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.7
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.6
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/use-image@2.0.7-beta.6
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.5
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/image",
"version": "2.1.0-beta.5",
"version": "2.1.0-beta.10",
"description": "A simple image component",
"keywords": [
"image"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+63
View File
@@ -1,5 +1,68 @@
# @nextui-org/input
## 2.3.0-beta.9
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/use-safe-layout-effect@2.0.7-beta.4
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.3.0-beta.8
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/use-safe-layout-effect@2.0.7-beta.3
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.3.0-beta.7
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/use-safe-layout-effect@2.0.7-beta.2
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.3.0-beta.6
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
## 2.3.0-beta.5
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.3.0-beta.4
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/use-safe-layout-effect@2.0.7-beta.1
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.3.0-beta.3
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/input",
"version": "2.3.0-beta.3",
"version": "2.3.0-beta.9",
"description": "The input component is designed for capturing user input within a text field.",
"keywords": [
"input"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+53
View File
@@ -1,5 +1,58 @@
# @nextui-org/kbd
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/system-rsc@2.2.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/system-rsc@2.2.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/system-rsc@2.2.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/system-rsc@2.2.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/system-rsc@2.2.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/kbd",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "The keyboard key components indicates which key or set of keys used to execute a specificv action",
"keywords": [
"kbd"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0"
},
"dependencies": {
+63
View File
@@ -1,5 +1,68 @@
# @nextui-org/link
## 2.1.0-beta.8
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/use-aria-link@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-icons@2.0.10-beta.6
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.7
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/use-aria-link@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-icons@2.0.10-beta.5
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.6
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/use-aria-link@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-icons@2.0.10-beta.4
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.5
### Patch Changes
- Updated dependencies [[`0f55c491b`](https://github.com/nextui-org/nextui/commit/0f55c491b73da8944f9b38f2ad7486d1b89f8b7a)]:
- @nextui-org/shared-icons@2.0.10-beta.3
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/use-aria-link@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-icons@2.0.10-beta.2
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/link",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.8",
"description": "Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an &lt;a&gt;",
"keywords": [
"link"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
+71
View File
@@ -1,5 +1,76 @@
# @nextui-org/listbox
## 2.2.0-beta.8
### Patch Changes
- [#4094](https://github.com/nextui-org/nextui/pull/4094) [`b9d5d4925`](https://github.com/nextui-org/nextui/commit/b9d5d492519778a4bf071748ec9f2b4e25d8373f) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Virtualization support added to Listbox & Autocomplete
- Updated dependencies []:
- @nextui-org/divider@2.1.0-beta.7
## 2.2.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/divider@2.1.0-beta.7
- @nextui-org/use-is-mobile@2.1.0-beta.6
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.2.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/divider@2.1.0-beta.6
- @nextui-org/use-is-mobile@2.1.0-beta.5
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.2.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/divider@2.1.0-beta.5
- @nextui-org/use-is-mobile@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.2.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/divider@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.2.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/divider@2.1.0-beta.3
- @nextui-org/use-is-mobile@2.1.0-beta.3
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.2.0-beta.2
### Patch Changes
+12 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/listbox",
"version": "2.2.0-beta.2",
"version": "2.2.0-beta.8",
"description": "A listbox displays a list of options and allows a user to select one or more of them.",
"keywords": [
"listbox"
@@ -34,17 +34,18 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},
"dependencies": {
"@nextui-org/aria-utils": "workspace:*",
"@nextui-org/divider": "workspace:*",
"@nextui-org/react-utils": "workspace:*",
"@nextui-org/shared-utils": "workspace:*",
"@nextui-org/divider": "workspace:*",
"@nextui-org/aria-utils": "workspace:*",
"@nextui-org/use-is-mobile": "workspace:*",
"@tanstack/react-virtual": "^3.10.9",
"@react-aria/utils": "3.25.2",
"@react-aria/listbox": "3.13.3",
"@react-stately/list": "3.10.8",
@@ -54,14 +55,14 @@
"@react-types/shared": "3.24.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
"@nextui-org/system": "workspace:*",
"clean-package": "2.2.0",
"@nextui-org/avatar": "workspace:*",
"@nextui-org/chip": "workspace:*",
"@nextui-org/scroll-shadow": "workspace:*",
"@nextui-org/shared-icons": "workspace:*",
"@nextui-org/stories-utils": "workspace:*",
"@nextui-org/scroll-shadow": "workspace:*",
"@nextui-org/chip": "workspace:*",
"@nextui-org/avatar": "workspace:*",
"@nextui-org/system": "workspace:*",
"@nextui-org/theme": "workspace:*",
"clean-package": "2.2.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
+22 -3
View File
@@ -2,13 +2,26 @@ import {ForwardedRef, ReactElement, Ref} from "react";
import {forwardRef} from "@nextui-org/system";
import {mergeProps} from "@react-aria/utils";
import {UseListboxProps, useListbox} from "./use-listbox";
import {UseListboxProps, UseListboxReturn, useListbox} from "./use-listbox";
import ListboxSection from "./listbox-section";
import ListboxItem from "./listbox-item";
import VirtualizedListbox from "./virtualized-listbox";
interface Props<T> extends UseListboxProps<T> {}
export interface VirtualizationProps {
maxListboxHeight: number;
itemHeight: number;
}
interface Props<T> extends UseListboxProps<T> {
isVirtualized?: boolean;
virtualization?: VirtualizationProps;
}
function Listbox<T extends object>(props: Props<T>, ref: ForwardedRef<HTMLUListElement>) {
const {isVirtualized, ...restProps} = props;
const useListboxProps = useListbox<T>({...restProps, ref});
const {
Component,
state,
@@ -24,7 +37,13 @@ function Listbox<T extends object>(props: Props<T>, ref: ForwardedRef<HTMLUListE
disableAnimation,
getEmptyContentProps,
getListProps,
} = useListbox<T>({...props, ref});
} = useListboxProps;
if (isVirtualized) {
return (
<VirtualizedListbox {...(props as Props<T>)} {...(useListboxProps as UseListboxReturn)} />
);
}
const content = (
<Component {...getListProps()}>
@@ -0,0 +1,159 @@
import {ReactElement, useRef} from "react";
import {forwardRef} from "@nextui-org/system";
import {mergeProps} from "@react-aria/utils";
import {useVirtualizer} from "@tanstack/react-virtual";
import {isEmpty} from "@nextui-org/shared-utils";
import ListboxItem from "./listbox-item";
import ListboxSection from "./listbox-section";
import {VirtualizationProps} from "./listbox";
import {UseListboxReturn} from "./use-listbox";
interface Props extends UseListboxReturn {
isVirtualized?: boolean;
virtualization?: VirtualizationProps;
}
function VirtualizedListbox(props: Props) {
const {
Component,
state,
color,
variant,
itemClasses,
getBaseProps,
topContent,
bottomContent,
hideEmptyContent,
hideSelectedIcon,
shouldHighlightOnFocus,
disableAnimation,
getEmptyContentProps,
getListProps,
} = props;
const {virtualization} = props;
if (
!virtualization ||
(!isEmpty(virtualization) && !virtualization.maxListboxHeight && !virtualization.itemHeight)
) {
throw new Error(
"You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.",
);
}
const {maxListboxHeight, itemHeight} = virtualization;
const listHeight = Math.min(maxListboxHeight, itemHeight * state.collection.size);
const parentRef = useRef(null);
const rowVirtualizer = useVirtualizer({
count: state.collection.size,
getScrollElement: () => parentRef.current,
estimateSize: () => itemHeight,
});
const virtualItems = rowVirtualizer.getVirtualItems();
const renderRow = ({
index,
style: virtualizerStyle,
}: {
index: number;
style: React.CSSProperties;
}) => {
const item = [...state.collection][index];
const itemProps = {
color,
item,
state,
variant,
disableAnimation,
hideSelectedIcon,
...item.props,
};
if (item.type === "section") {
return (
<ListboxSection
key={item.key}
{...itemProps}
itemClasses={itemClasses}
style={{...virtualizerStyle, ...itemProps.style}}
/>
);
}
let listboxItem = (
<ListboxItem
key={item.key}
{...itemProps}
classNames={mergeProps(itemClasses, item.props?.classNames)}
shouldHighlightOnFocus={shouldHighlightOnFocus}
style={{...virtualizerStyle, ...itemProps.style}}
/>
);
if (item.wrapper) {
listboxItem = item.wrapper(listboxItem);
}
return listboxItem;
};
const content = (
<Component {...getListProps()}>
{!state.collection.size && !hideEmptyContent && (
<li>
<div {...getEmptyContentProps()} />
</li>
)}
<div
ref={parentRef}
style={{
height: maxListboxHeight,
overflow: "auto",
}}
>
{listHeight > 0 && itemHeight > 0 && (
<div
style={{
height: `${rowVirtualizer.getTotalSize()}px`,
width: "100%",
position: "relative",
}}
>
{virtualItems.map((virtualItem) =>
renderRow({
index: virtualItem.index,
style: {
position: "absolute",
top: 0,
left: 0,
width: "100%",
height: `${virtualItem.size}px`,
transform: `translateY(${virtualItem.start}px)`,
},
}),
)}
</div>
)}
</div>
</Component>
);
return (
<div {...getBaseProps()}>
{topContent}
{content}
{bottomContent}
</div>
);
}
VirtualizedListbox.displayName = "NextUI.VirtualizedListbox";
// forwardRef doesn't support generic parameters, so cast the result to the correct type
export default forwardRef(VirtualizedListbox) as (props: Props) => ReactElement;
+66
View File
@@ -1,5 +1,71 @@
# @nextui-org/menu
## 2.1.0-beta.7
### Patch Changes
- [#4092](https://github.com/nextui-org/nextui/pull/4092) [`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Test new runner
- Updated dependencies [[`528668db8`](https://github.com/nextui-org/nextui/commit/528668db85b98b46473cb1e214780b7468cdadba)]:
- @nextui-org/divider@2.1.0-beta.7
- @nextui-org/use-aria-menu@2.1.0-beta.6
- @nextui-org/use-is-mobile@2.1.0-beta.6
- @nextui-org/aria-utils@2.1.0-beta.7
- @nextui-org/react-utils@2.0.18-beta.7
- @nextui-org/shared-utils@2.0.9-beta.7
## 2.1.0-beta.6
### Patch Changes
- [#4086](https://github.com/nextui-org/nextui/pull/4086) [`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Pnpm clean
- Updated dependencies [[`f69fe47b5`](https://github.com/nextui-org/nextui/commit/f69fe47b5b8f6f3a77a7a8c20d8715263fa32acb)]:
- @nextui-org/divider@2.1.0-beta.6
- @nextui-org/use-aria-menu@2.1.0-beta.5
- @nextui-org/use-is-mobile@2.1.0-beta.5
- @nextui-org/aria-utils@2.1.0-beta.6
- @nextui-org/react-utils@2.0.18-beta.6
- @nextui-org/shared-utils@2.0.9-beta.6
## 2.1.0-beta.5
### Patch Changes
- [#4083](https://github.com/nextui-org/nextui/pull/4083) [`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix build
- Updated dependencies [[`35058262c`](https://github.com/nextui-org/nextui/commit/35058262c61628fb42907f529c4417886aa12bb2)]:
- @nextui-org/divider@2.1.0-beta.5
- @nextui-org/use-aria-menu@2.1.0-beta.4
- @nextui-org/use-is-mobile@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.5
- @nextui-org/react-utils@2.0.18-beta.5
- @nextui-org/shared-utils@2.0.9-beta.5
## 2.1.0-beta.4
### Patch Changes
- Updated dependencies [[`5339b2571`](https://github.com/nextui-org/nextui/commit/5339b2571e6d73ca6efe2acd34d88669419db9f7)]:
- @nextui-org/shared-utils@2.0.9-beta.4
- @nextui-org/divider@2.1.0-beta.4
- @nextui-org/aria-utils@2.1.0-beta.4
- @nextui-org/react-utils@2.0.18-beta.4
## 2.1.0-beta.3
### Patch Changes
- [#4010](https://github.com/nextui-org/nextui/pull/4010) [`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - framer-motion alpha version added
- Updated dependencies [[`ef432eb53`](https://github.com/nextui-org/nextui/commit/ef432eb539714fded6cab86a2185956fb103e0df)]:
- @nextui-org/divider@2.1.0-beta.3
- @nextui-org/use-aria-menu@2.1.0-beta.3
- @nextui-org/use-is-mobile@2.1.0-beta.3
- @nextui-org/aria-utils@2.1.0-beta.3
- @nextui-org/react-utils@2.0.18-beta.3
- @nextui-org/shared-utils@2.0.9-beta.3
## 2.1.0-beta.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/menu",
"version": "2.1.0-beta.2",
"version": "2.1.0-beta.7",
"description": "A menu displays a list of options and allows a user to select one or more of them.",
"keywords": [
"menu"
@@ -34,8 +34,8 @@
"postpack": "clean-package restore"
},
"peerDependencies": {
"react": ">=18 || ^19.0.0-rc.0",
"react-dom": ">=18 || ^19.0.0-rc.0",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@nextui-org/theme": ">=2.3.0-beta.0",
"@nextui-org/system": ">=2.3.0-beta.0"
},

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