Compare commits

...

48 Commits

Author SHA1 Message Date
Junior Garcia 7d294e3a04 Revert "fix: fixed pagination scale animation (#1552)" (#1553)
This reverts commit 8fcc8b3767.
2023-09-02 20:45:49 +00:00
github-actions[bot] 43906f639e ci(changesets): version packages (#1550)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-09-02 20:40:07 +00:00
Jakob Guddas 8fcc8b3767 fix: fixed pagination scale animation (#1552) 2023-09-02 15:45:27 -03:00
Jakob Guddas 28477447d3 fix: resolved cursor issues in pagination (#1222)
* fix: resolved cursor issues in pagination

* chore: added comment

* kick: trigger ci

* Create eighty-knives-heal.md
2023-09-02 18:01:38 +00:00
Junior Garcia fc3c6b9431 chore(root): tailwind variants upgraded (#1551)
* chore(root): tailwind variants upgraded

* fix(theme): prettier
2023-09-02 17:46:36 +00:00
Junior Garcia 59fda3772f fix(navbar-menu): dismiss buttons removed to fix the scroll (#1549) 2023-09-02 15:41:38 +00:00
Troye d8d2b87cb8 fix(docs): table async pagination (#1491)
* fix(docs): change to swr

* chore(table): change to swr

* fix(table): keep the pagination when switching pages

* chore(repo): pnpm lockfile updated
2023-09-02 12:56:39 +00:00
github-actions[bot] 64571e468c ci(changesets): version packages (#1514)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-09-01 21:09:05 +00:00
Junior Garcia faf26acd23 fix(snippet): invalid props (#1546) 2023-09-01 20:52:16 +00:00
Junior Garcia cac56faf29 chore(docs): hero tooltip arrow removed (#1547) 2023-09-01 20:45:41 +00:00
Junior Garcia 09fe1d3141 Fix/1531 (#1545)
* fix(tabs): title prop was being passed to html element

* chore(tabs): changeset
2023-09-01 20:44:46 +00:00
Junior Garcia a9e324b351 fix(listbox): dynamic items types (#1544) 2023-09-01 20:42:20 +00:00
Junior Garcia 043b8420cf Fix/1492 (#1543)
* fix(select): select & input styles fixed

* chore(input): extra data attr added to input wrapper
2023-09-01 20:42:15 +00:00
Junior Garcia 57909accde Fix/1298 (#1542)
* fix(modal): focus trap added

* chore(navbar): changeset added
2023-09-01 20:42:08 +00:00
Vansh Shah 7a17256268 Solved error in Listbox Component (#1530) 2023-08-31 14:06:13 -03:00
MisterHims bf2bc265ee feat: adding some adjustements on listbox and dropdown doc pages (#1520)
* fix: some typo and renamed use infinite scroll call on async section of select docpage

* fix(listbox-docpage): note doublon from the with icons section

* fix(switch-docpage): add a missing whitespace

* fix(dropdown-docpage): remove note doublon

* fix(dropdown-docpage): adding DropdownSection dependencu into the with-section code

* fix(dropdown-docpage): do not need Button component on custom-trigger section code

* fix(dropdown-docpage): fixed typo missing letter on dropdown-item list

* fix(dropdown-section): add missing comma
2023-08-29 18:05:55 +00:00
MisterHims cf6bf749a1 feat: adding some ajustements on listbox and dropdown doc pages (#1518) 2023-08-29 13:20:51 -03:00
Tianen Pang 641bf0885b feat(system): extend props for nextui provider (#1513) 2023-08-28 13:00:24 -03:00
MisterHims 40b42001f9 fix: some typo and renamed use infinite scroll call on async section of select docpage (#1509) 2023-08-27 19:30:49 -03:00
github-actions[bot] 789a7209a2 ci(changesets): version packages (#1500)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-08-26 14:57:11 +00:00
Junior Garcia 021aa16d96 chore(docs): inter font applied to tailwind config 2023-08-26 11:30:06 -03:00
Junior Garcia eb8a1fcc01 chore(docs): font family chnaged to inter 2023-08-26 11:24:28 -03:00
Junior Garcia 9b42a2fca1 fix(docs): select typo 2023-08-26 11:15:15 -03:00
Junior Garcia 5702287e56 fix(popover): arrow color (#1501) 2023-08-26 14:13:04 +00:00
Jakob Guddas 290cce15be fix: show focus ring when table row is focused in read mode (#1303)
* fix: show focus ring when table row is focused in read mode

* Create witty-trees-buy.md
2023-08-26 13:41:35 +00:00
github-actions[bot] 27bde30839 ci(changesets): version packages (#1499)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-08-26 13:39:00 +00:00
Junior Garcia 6be3bc3516 fix(docs): textarea readonly typo 2023-08-26 10:30:13 -03:00
T/once e4113b05ce fix(navbar): unable to Close NavbarMenu (#1496)
* add mode wait to AnimatePresence

* add changeset
2023-08-26 13:29:27 +00:00
Junior Garcia a3a95e7196 Merge branch 'main' of github.com:nextui-org/nextui 2023-08-26 10:27:22 -03:00
Junior Garcia 8731159702 fix(docs): font family 2023-08-26 10:27:08 -03:00
Hyuuh b6adb2ae8c docs(components): 📝 change to the new rsc link (#1493)
The new docs for Next.js RSC has been moved to a new section.
2023-08-25 17:29:00 +00:00
github-actions[bot] cd2d9b70a9 ci(changesets): version packages (#1477)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-08-23 03:26:47 +00:00
Junior Garcia a371e1a5fa Fix/tooltip arrow position (#1474)
* feat(blog): rss auto-discovery added

* fix(blog): feed.xml author name

* fix(tooltip): arrow position

* chore(tooltip): changeset
2023-08-23 03:11:15 +00:00
github-actions[bot] 5cdc4d1d87 ci(changesets): version packages (#1475)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-08-23 03:11:05 +00:00
Junior Garcia 22c6e070dd Fix/1469 (#1476)
* feat(blog): rss auto-discovery added

* fix(blog): feed.xml author name

* fix(docs): sandpack files filter
2023-08-23 03:10:41 +00:00
Junior Garcia 0714192838 Merge branch 'main' of github.com:nextui-org/nextui 2023-08-23 00:02:41 -03:00
Junior Garcia ae9f300d45 Fix/1468 (#1472)
* feat(blog): rss auto-discovery added

* fix(blog): feed.xml author name

* fix(select): size prop

* chore(root): changeset
2023-08-23 02:59:03 +00:00
Junior Garcia a16dac04c8 Merge branch 'main' of github.com:nextui-org/nextui 2023-08-22 23:49:47 -03:00
Junior Garcia 94db001961 Chore/docs improvemements (#1473)
* feat(blog): rss auto-discovery added

* fix(blog): feed.xml author name

* chore(docs): pnpm script modified
2023-08-23 02:46:37 +00:00
Junior Garcia d77cf7658b Feat/add rss auto discovery (#1471)
* feat(blog): rss auto-discovery added

* fix(blog): feed.xml author name
2023-08-23 02:43:58 +00:00
Junior Garcia 46c47f7e6e fix(blog): feed.xml author name 2023-08-22 12:37:26 -03:00
Junior Garcia 35b9741663 feat(blog): rss auto-discovery added 2023-08-22 12:34:35 -03:00
github-actions[bot] 2b82ba86eb ci(changesets): version packages (#1465)
Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
2023-08-21 22:15:21 +00:00
Junior Garcia 904f538779 Chore/update react aria packages (#1463)
* fix(dropdown): popover and dropdown fixes

* fix(popover): arrow animation, shouldCloseOnInteractOutside function usage fixed

* chore(root): changeset

* chore(root): react-aria utils pkg updated

* fix(root): changesets

* fix(root): changeset
2023-08-21 22:06:36 +00:00
nirmalkumar 609e9f4c11 fix -( Image-Tag issue in Cover-image.ts ) (#1462) 2023-08-21 21:16:33 +00:00
github-actions[bot] e3dabac9f5 ci(changesets): version packages (#1461) 2023-08-21 12:28:39 -03:00
Junior Garcia 4e94c11528 fix(dropdown): popover and dropdown fixes (#1458) 2023-08-21 12:07:28 -03:00
João Vitor a17b6c7502 docs(tooltip): decrease zIndex so it doesn't overlap other elements (#1454)
* fix(navbar): z-index issue on desktop

* Revert "fix(navbar): z-index issue on desktop"

This reverts commit 227b79e5c6493084ee31a62fd5b13079c8a4a2e4.

* docs(tooltip): decrease the zIndex
2023-08-21 14:29:03 +00:00
142 changed files with 5032 additions and 5112 deletions
@@ -11,8 +11,8 @@ import {
Spinner,
Pagination,
} from "@nextui-org/react";
import {useAsyncList} from "@react-stately/data";
import {useCallback, useMemo, useState} from "react";
import {useMemo, useState} from "react";
import useSWR from "swr";
type SWCharacter = {
name: string;
@@ -21,50 +21,23 @@ type SWCharacter = {
birth_year: string;
};
const fetcher = (...args: Parameters<typeof fetch>) => fetch(...args).then((res) => res.json());
export default function Page() {
const [page, setPage] = useState(1);
const [total, setTotal] = useState(0);
const [isLoading, setIsLoading] = useState(true);
const {data, isLoading} = useSWR<{
count: number;
results: SWCharacter[];
}>(`https://swapi.py4e.com/api/people?page=${page}`, fetcher, {
keepPreviousData: true,
});
const rowsPerPage = 10;
let list = useAsyncList<SWCharacter>({
async load({signal, cursor}) {
// If no cursor is available, then we're loading the first page.
// Otherwise, the cursor is the next URL to load, as returned from the previous page.
const res = await fetch(cursor || "https://swapi.py4e.com/api/people/?search=", {signal});
let json = await res.json();
setTotal(json.count);
setIsLoading(false);
return {
items: json.results,
cursor: json.next,
};
},
});
const pages = Math.ceil(total / rowsPerPage);
const items = useMemo(() => {
const start = (page - 1) * rowsPerPage;
const end = start + rowsPerPage;
return list.items.slice(start, end);
}, [page, list.items?.length]);
const onPaginationChange = useCallback(
(page: number) => {
setIsLoading(true);
if (page >= list.items.length / rowsPerPage) {
list.loadMore();
}
setPage(page);
},
[list.items.length],
);
const pages = useMemo(() => {
return data?.count ? Math.ceil(data.count / rowsPerPage) : 0;
}, [data?.count, rowsPerPage]);
return (
<div className="p-6">
@@ -80,7 +53,7 @@ export default function Page() {
color="primary"
page={page}
total={pages}
onChange={onPaginationChange}
onChange={(page) => setPage(page)}
/>
</div>
) : null
@@ -96,8 +69,8 @@ export default function Page() {
<TableColumn key="birth_year">Birth year</TableColumn>
</TableHeader>
<TableBody
isLoading={isLoading && !items.length}
items={items}
isLoading={isLoading || data?.results.length === 0}
items={data?.results ?? []}
loadingContent={<Spinner />}
>
{(item) => (
+2 -1
View File
@@ -24,7 +24,8 @@ export async function GET() {
url: `${siteConfig.siteUrl}/blog/${post.slug}`,
guid: `${siteConfig.siteUrl}/blog/${post.slug}`,
date: post.date,
author: `${author} <${siteConfig.email}>`,
// @ts-ignore - name does exist
author: `${author.name} <${siteConfig.email}>`,
categories: post.tags ?? [],
});
});
+6
View File
@@ -53,6 +53,12 @@ export const metadata: Metadata = {
},
],
creator: "jrgarciadev",
alternates: {
canonical: "https://nextui.org",
types: {
"application/rss+xml": [{url: "https://nextui.org/feed.xml", title: "NextUI RSS Feed"}],
},
},
viewport:
"viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0",
};
@@ -81,7 +81,7 @@ export const ComponentLinks = ({
)}
{rscCompatible && (
<ButtonLink
href="https://nextjs.org/docs/getting-started/react-essentials#server-components"
href="https://nextjs.org/docs/app/building-your-application/rendering/server-components"
startContent={<NextJsIcon size={18} />}
tooltip={
<p>
@@ -105,12 +105,14 @@ export const FloatingComponents: React.FC<{}> = () => {
{isMounted && (
<Tooltip
showArrow
className="text-sm animate-[levitate_14s_ease_infinite]"
color="secondary"
content="Developers love Next.js"
isOpen={!isTablet}
placement="top"
style={{
zIndex: 39,
}}
>
<Button
className="absolute left-[200px] top-[160px] max-w-fit animate-[levitate_14s_ease_infinite_0.5s]"
@@ -59,7 +59,10 @@ export const useSandpack = ({
if (key.includes("App") && !key.includes(mimeType)) {
return acc;
}
if (typescriptStrict && key.includes("js")) {
if (typescriptStrict && currentTemplate === "vite-react-ts" && key.includes("js")) {
return acc;
}
if (currentTemplate === "vite-react" && key.includes("ts")) {
return acc;
}
// @ts-ignore
+2 -2
View File
@@ -1,6 +1,6 @@
import {DM_Sans} from "next/font/google";
import {Inter} from "next/font/google";
export const fontSans = DM_Sans({
export const fontSans = Inter({
variable: "--font-sans",
adjustFontFallback: true,
display: "optional",
@@ -73,7 +73,7 @@ export default function App() {
/>
<CardFooter className="absolute bg-black/40 bottom-0 z-10 border-t-1 border-default-600 dark:border-default-100">
<div className="flex flex-grow gap-2 items-center">
<img
<Image
alt="Breathing app icon"
className="rounded-full w-10 h-11 bg-black"
src="/images/breathing-app-icon.jpeg"
@@ -1,4 +1,4 @@
const App = `import {Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Button, Avatar, User} from "@nextui-org/react";
const App = `import {Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Avatar, User} from "@nextui-org/react";
export default function App() {
return (
@@ -100,7 +100,7 @@ const DeleteDocumentIcon = `export const DeleteDocumentIcon = (props) => (
</svg>
);`;
const App = `import {Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Button, cn} from "@nextui-org/react";
const App = `import {Dropdown, DropdownTrigger, DropdownMenu, DropdownSection, DropdownItem, Button, cn} from "@nextui-org/react";
import {AddNoteIcon} from "./AddNoteIcon.jsx";
import {CopyDocumentIcon} from "./CopyDocumentIcon.jsx";
import {EditDocumentIcon} from "./EditDocumentIcon.jsx";
@@ -1,4 +1,4 @@
const ListboxWrapper = `const ListboxWrapper = ({children}) => (
const ListboxWrapper = `export const ListboxWrapper = ({children}) => (
<div className="w-[260px] border-small px-1 py-2 rounded-small border-default-200 dark:border-default-100">
{children}
</div>
@@ -137,7 +137,7 @@ const usePokemonList = `export function usePokemonList({fetchDelay = 0} = {}) {
};`;
const App = `import {Select, SelectItem} from "@nextui-org/react";
import {useInfiniteScroll} from "@nextui-org/use-infinity-scroll";
import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";
import {usePokemonList} from "./usePokemonList";
export default function App() {
@@ -1,50 +1,22 @@
const App = `import {Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Pagination, Spinner, getKeyValue} from "@nextui-org/react";
import {useAsyncList} from "@react-stately/data";
import useSWR from "swr";
const fetcher = (...args) => fetch(...args).then((res) => res.json());
export default function App() {
const [page, setPage] = React.useState(1);
const [total, setTotal] = React.useState(0);
const [isLoading, setIsLoading] = React.useState(true);
const {data, isLoading} = useSWR(\`https://swapi.py4e.com/api/people?page=\$\{page\}\`, fetcher, {
keepPreviousData: true,
});
const rowsPerPage = 10;
let list = useAsyncList({
async load({signal, cursor}) {
// If no cursor is available, then we're loading the first page.
// Otherwise, the cursor is the next URL to load, as returned from the previous page.
const res = await fetch(cursor || "https://swapi.py4e.com/api/people/?search=", {signal});
let json = await res.json();
const pages = useMemo(() => {
return data?.count ? Math.ceil(data.count / rowsPerPage) : 0;
}, [data?.count, rowsPerPage]);
setTotal(json.count);
setIsLoading(false);
return {
items: json.results,
cursor: json.next,
};
},
});
const pages = Math.ceil(total / rowsPerPage);
const items = React.useMemo(() => {
const start = (page - 1) * rowsPerPage;
const end = start + rowsPerPage;
return list.items.slice(start, end);
}, [page, list.items?.length]);
const onPaginationChange = React.useCallback(
(page) => {
setIsLoading(true);
if (page >= list.items.length / rowsPerPage) {
list.loadMore();
}
setPage(page);
},
[list.items.length],
);
const loadingState = isLoading || data?.results.length === 0 ? "loading" : "idle";
return (
<Table
@@ -59,14 +31,12 @@ export default function App() {
color="primary"
page={page}
total={pages}
onChange={onPaginationChange}
onChange={(page) => setPage(page)}
/>
</div>
) : null
}
classNames={{
table: "min-h-[400px]",
}}
{...args}
>
<TableHeader>
<TableColumn key="name">Name</TableColumn>
@@ -75,12 +45,12 @@ export default function App() {
<TableColumn key="birth_year">Birth year</TableColumn>
</TableHeader>
<TableBody
isLoading={isLoading && !items.length}
items={items}
items={data?.results ?? []}
loadingContent={<Spinner />}
loadingState={loadingState}
>
{(item) => (
<TableRow key={item.name}>
<TableRow key={item?.name}>
{(columnKey) => <TableCell>{getKeyValue(item, columnKey)}</TableCell>}
</TableRow>
)}
@@ -113,7 +113,7 @@ It is possible to add icons to the dropdown items using the `startContent` / `en
<CodeDemo title="With Icons" highlightedLines="23,30,37,47" files={dropdownContent.icons} />
> **Note**: Note: If you use `currentColor` as the icon color, the icon will have the same color as the item text.
> **Note**: If you use `currentColor` as the icon color, the icon will have the same color as the item text.
### With Description
@@ -156,7 +156,7 @@ Dropdown has 2 components with slots the `DropdownItem` and `DropdownSection` co
- **wrapper**: The `title` and `description` wrapper.
- **title**: The title of the dropdown item.
- **description**: The description of the dropdown item.
- **shortcut**: The shorcut slot.
- **shortcut**: The shortcut slot.
- **selectedIcon**: The selected icon slot. This is only visible when the item is selected.
### DropdownSection
@@ -93,7 +93,7 @@ It is possible to add icons to the listbox items using the `startContent` / `end
<CodeDemo title="With Icons" highlightedLines="23,30,38" files={listboxContent.icons} />
> **Note**: Note: If you use `currentColor` as the icon color, the icon will have the same color as the item text.
> **Note**: If you use `currentColor` as the icon color, the icon will have the same color as the item text.
### With Description
+13 -12
View File
@@ -91,7 +91,7 @@ the select.
<CodeDemo title="Start Content" highlightedLines="9" files={selectContent.startContent} />
### Item Start Content
### Item Start & End Content
Since the `Select` component uses the [Listbox](/docs/components/listbox) component under the hood, you can
use the `startContent` and `endContent` properties of the `SelectItem` component to add content to the start
@@ -101,7 +101,7 @@ and end of the select item.
### Custom Selector Icon
By default the select uses a `crevron-down` icon as the selector icon which rotates when the select is open. You can
By default the select uses a `chevron-down` icon as the selector icon which rotates when the select is open. You can
customize this icon by passing a custom one to the `selectorIcon` property.
<CodeDemo title="Custom Selector Icon" files={selectContent.customSelectorIcon} />
@@ -174,22 +174,22 @@ You can customize the sections style by using the `classNames` property of the `
<CodeDemo title="Custom Sections Style" files={selectContent.customSectionsStyle} />
### Asyncronous Loading
### Asynchronous Loading
Select supports asyncronous loading, in the example below we are using a custom hook to fetch the [Pokemon API](https://pokeapi.co/api/v2/pokemon) data in combination with the `useInfinityScroll` hook to load more data when the user reaches the end of the list.
Select supports asynchronous loading, in the example below we are using a custom hook to fetch the [Pokemon API](https://pokeapi.co/api/v2/pokemon) data in combination with the `useInfiniteScroll` hook to load more data when the user reaches the end of the list.
The `isLoading` prop is used to show a loading indicator intead of the selector icon when the data is being fetched.
The `isLoading` prop is used to show a loading indicator instead of the selector icon when the data is being fetched.
<PackageManagers
commands={{
npm: "npm install @nextui-org/use-infinity-scroll",
yarn: "yarn add @nextui-org/use-infinity-scroll",
pnpm: "pnpm add @nextui-org/use-infinity-scroll",
npm: "npm install @nextui-org/use-infinite-scroll",
yarn: "yarn add @nextui-org/use-infinite-scroll",
pnpm: "pnpm add @nextui-org/use-infinite-scroll",
}}
/>
```jsx
import {useInfinityScroll} from "@nextui-org/use-infinity-scroll";
import {useInfiniteScroll} from "@nextui-org/use-infinite-scroll";
```
<Spacer y={2} />
@@ -197,7 +197,7 @@ import {useInfinityScroll} from "@nextui-org/use-infinity-scroll";
<CodeDemo
asIframe
typescriptStrict={true}
title="Asyncronous Loading"
title="Asynchronous Loading"
hideWindowActions={true}
resizeEnabled={false}
displayMode="always"
@@ -230,7 +230,7 @@ Using `onChange`:
files={selectContent.multipleControlledOnChange}
/>
### Mutliple With Chips
### Multiple With Chips
You can render any component as the select value by using the `renderValue` property. In this example we are
using the [Chip](/docs/components/chip) component to render the selected items.
@@ -254,6 +254,7 @@ the popover and listbox components.
- **base**: The main wrapper of the select. This wraps the rest of the slots.
- **label**: The label of the select.
- **mainWrapper**: Wraps the `helperWrapper` and the `trigger` slots.
- **trigger**: The trigger of the select. This wraps the label the inner wrapper and the selector icon.
- **innerWrapper**: The wrapper of the select content. This wraps the start/end content and the select value.
- **selectorIcon**: The selector icon of the select. This is the icon that rotates when the select is open (`data-open`).
@@ -369,7 +370,7 @@ the popover and listbox components.
| 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 scroll shadow component. | - |
| classNames | `Record<"base" "label" "trigger" "innerWrapper" "selectorIcon" "value" "listboxWrapper" "listbox" "popover" "helperWrapper" "description" "errorMessage", string>` | Allows to set custom class names for the dropdown item slots. | - |
| classNames | `Record<"base" "label" "trigger" "mainWrapper" "innerWrapper" "selectorIcon" "value" "listboxWrapper" "listbox" "popover" "helperWrapper" "description" "errorMessage", string>` | Allows to set custom class names for the dropdown item slots. | - |
### Select Events
+1 -1
View File
@@ -67,7 +67,7 @@ You can also add icons to start and end of the switch by using `startContent` an
- **wrapper**: The wrapper of the start icon, end icon and thumb.
- **thumb**: The thumb element of the switch. It is the circle element.
- **label**: The label slot of the switch.
- **startContent**:The icon slot at the start of the switch.
- **startContent**: The icon slot at the start of the switch.
- **endContent**: The icon slot at the end of the switch.
- **thumbIcon**: The icon slot inside the thumb.
+1 -2
View File
@@ -257,8 +257,7 @@ You can use the [Pagination](/components/pagination) component to paginate the t
### Async Pagination
It is also possible to use the [Pagination](/components/pagination) component to paginate the table asynchronously. To fetch the data, we are using the `useAsyncList` hook from [@react-stately/data](https://react-spectrum.adobe.com/react-stately/useAsyncList.html).
Please check the installation instructions in the [Sorting Rows](#sorting-rows) section.
It is also possible to use the [Pagination](/components/pagination) component to paginate the table asynchronously. To fetch the data, we are using the `useSWR` hook from [SWR](https://swr.vercel.app/docs/pagination).
<CodeDemo
asIframe
+6 -5
View File
@@ -13,7 +13,7 @@ Tabs organize content into multiple sections and allow users to navigate between
---
<CarbonAd/>
<CarbonAd />
## Import
@@ -157,10 +157,11 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to
### Tab Props
| Attribute | Type | Description | Default |
| ---------- | ----------- | ----------------------- | ------- |
| children\* | `ReactNode` | The content of the tab. | - |
| title | `ReactNode` | The title of the tab. | - |
| Attribute | Type | Description | Default |
| ---------- | ----------- | ------------------------------------------------------------------------------------------ | ------- |
| children\* | `ReactNode` | The content of the tab. | - |
| title | `ReactNode` | The title of the tab. | - |
| titleValue | `string` | A string representation of the item's contents. Use this when the `title` is not readable. | - |
#### Motion Props
@@ -32,7 +32,7 @@ Textarea component is a multi-line Input which allows you to write large texts.
<CodeDemo title="Disabled" files={textareaContent.disabled} />
### Readonly
### Read Only
<CodeDemo title="Readonly" files={textareaContent.readonly} />
+2 -2
View File
@@ -49,7 +49,7 @@ const { nextui } = require("@nextui-org/react");
module.exports = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -85,7 +85,7 @@ some functionalities of NextUI components may not work properly.
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
+12 -8
View File
@@ -62,13 +62,13 @@ the following code to your `tailwind.config.js` file:
```js {8,13-14}
// tailwind.config.js
const { nextui } = require("@nextui-org/react");
import {nextui} from "@nextui-org/react";
/** @type {import('tailwindcss').Config} */
module.exports = {
const config = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -76,6 +76,8 @@ module.exports = {
darkMode: "class",
plugins: [nextui()]
}
export default config;
```
### Setup Provider
@@ -146,7 +148,7 @@ export default function Page() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -197,13 +199,13 @@ the following code to your `tailwind.config.js` file:
```js {8,13-14}
// tailwind.config.js
const { nextui } = require("@nextui-org/react");
import {nextui} from "@nextui-org/react";
/** @type {import('tailwindcss').Config} */
module.exports = {
const config = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -211,6 +213,8 @@ module.exports = {
darkMode: "class",
plugins: [nextui()]
}
export default config;
```
### Setup Provider
@@ -253,7 +257,7 @@ export default function Page() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
+2 -2
View File
@@ -48,7 +48,7 @@ import type { Config} from 'tailwindcss'
export default {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -100,7 +100,7 @@ export default function App() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
+2 -2
View File
@@ -47,7 +47,7 @@ const { nextui } = require("@nextui-org/react");
module.exports = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -85,7 +85,7 @@ ReactDOM.createRoot(document.getElementById('root')).render(
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -87,7 +87,7 @@ function App() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -203,7 +203,7 @@ function App() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -57,7 +57,7 @@ const { nextui } = require("@nextui-org/react");
module.exports = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -136,7 +136,7 @@ export default function Page() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -177,7 +177,7 @@ const { nextui } = require("@nextui-org/react");
module.exports = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -227,7 +227,7 @@ export default function Page() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
@@ -275,7 +275,7 @@ const { nextui } = require("@nextui-org/react");
module.exports = {
content: [
// ...
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {},
@@ -327,7 +327,7 @@ export default function Page() {
If you are using pnpm, you need to add the following code to your `.npmrc` file:
```bash
public-hoist-pattern[]=*@nextui-org/theme*
public-hoist-pattern[]=*@nextui-org/*
```
After modfiying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
+8 -7
View File
@@ -18,17 +18,17 @@
"@codesandbox/sandpack-react": "^2.6.4",
"@mapbox/rehype-prism": "^0.6.0",
"@nextui-org/aria-utils": "workspace:*",
"@nextui-org/badge": "workspace:*",
"@nextui-org/code": "workspace:*",
"@nextui-org/divider": "workspace:*",
"@nextui-org/kbd": "workspace:*",
"@nextui-org/react": "workspace:*",
"@nextui-org/shared-icons": "workspace:*",
"@nextui-org/shared-utils": "workspace:*",
"@nextui-org/theme": "workspace:*",
"@nextui-org/spacer": "workspace:*",
"@nextui-org/kbd": "workspace:*",
"@nextui-org/code": "workspace:*",
"@nextui-org/badge": "workspace:*",
"@nextui-org/skeleton": "workspace:*",
"@nextui-org/spacer": "workspace:*",
"@nextui-org/spinner": "workspace:*",
"@nextui-org/divider": "workspace:*",
"@nextui-org/theme": "workspace:*",
"@nextui-org/use-clipboard": "workspace:*",
"@nextui-org/use-infinite-scroll": "workspace:*",
"@nextui-org/use-is-mobile": "workspace:*",
@@ -84,7 +84,8 @@
"scroll-into-view-if-needed": "3.0.10",
"sharp": "^0.32.1",
"shelljs": "^0.8.4",
"tailwind-variants": "^0.1.13",
"swr": "^2.2.1",
"tailwind-variants": "^0.1.14",
"unified": "^9.2.2",
"unist-util-visit": "^4.1.2",
"zustand": "^4.3.8"
+1 -1
View File
@@ -61,7 +61,7 @@ module.exports = {
highlighted: `${commonColors.purple[500]} 1px 0 0, ${commonColors.purple[500]} -1px 0 0`,
},
fontFamily: {
sans: ["DM Sans", ...defaultTheme.fontFamily.sans],
sans: ["var(--font-sans)", ...defaultTheme.fontFamily.sans],
serif: defaultTheme.fontFamily.serif,
mono: defaultTheme.fontFamily.mono,
},
+4 -2
View File
@@ -141,6 +141,8 @@
}
},
"engines": {
"node": ">=16.x"
}
"node": ">=16.x",
"pnpm": ">=8.x"
},
"packageManager": "pnpm@8.7.0"
}
@@ -1,5 +1,45 @@
# @nextui-org/accordion
## 2.0.19
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/divider@2.0.16
- @nextui-org/system@2.0.7
- @nextui-org/aria-utils@2.0.7
- @nextui-org/framer-transitions@2.0.7
## 2.0.18
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/divider@2.0.15
- @nextui-org/aria-utils@2.0.6
- @nextui-org/framer-transitions@2.0.6
## 2.0.17
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/divider@2.0.14
## 2.0.16
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/divider@2.0.13
- @nextui-org/theme@2.1.2
## 2.0.15
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/accordion",
"version": "2.0.15",
"version": "2.0.19",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/avatar
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/avatar",
"version": "2.0.13",
"version": "2.0.17",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"keywords": [
"avatar"
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/badge
## 2.0.15
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system-rsc@2.0.4
## 2.0.14
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system-rsc@2.0.3
## 2.0.13
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/system-rsc@2.0.3
## 2.0.12
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
- @nextui-org/system-rsc@2.0.3
## 2.0.11
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/badge",
"version": "2.0.11",
"version": "2.0.15",
"description": "Badges are used as a small numerical value or status descriptor for UI elements.",
"keywords": [
"badge"
+40
View File
@@ -1,5 +1,45 @@
# @nextui-org/button
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/ripple@2.0.17
- @nextui-org/spinner@2.0.15
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/ripple@2.0.16
- @nextui-org/spinner@2.0.14
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/ripple@2.0.15
- @nextui-org/spinner@2.0.13
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/spinner@2.0.12
- @nextui-org/ripple@2.0.14
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/button",
"version": "2.0.13",
"version": "2.0.17",
"description": "Buttons allow users to perform actions and choose with a single tap.",
"keywords": [
"button"
+36
View File
@@ -1,5 +1,41 @@
# @nextui-org/card
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/ripple@2.0.17
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/ripple@2.0.16
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/ripple@2.0.15
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/ripple@2.0.14
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/card",
"version": "2.0.13",
"version": "2.0.17",
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
"keywords": [
"card"
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/checkbox
## 2.0.18
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.17
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.16
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.15
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/checkbox",
"version": "2.0.14",
"version": "2.0.18",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"keywords": [
"checkbox"
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/chip
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/chip",
"version": "2.0.13",
"version": "2.0.17",
"description": "Chips help people enter information, make selections, filter content, or trigger actions.",
"keywords": [
"chip"
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/code
## 2.0.15
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system-rsc@2.0.4
## 2.0.14
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system-rsc@2.0.3
## 2.0.13
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/system-rsc@2.0.3
## 2.0.12
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
- @nextui-org/system-rsc@2.0.3
## 2.0.11
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/code",
"version": "2.0.11",
"version": "2.0.15",
"description": "Code is a component used to display inline code.",
"keywords": [
"code"
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/divider
## 2.0.16
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system-rsc@2.0.4
## 2.0.15
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system-rsc@2.0.3
## 2.0.14
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/system-rsc@2.0.3
## 2.0.13
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
- @nextui-org/system-rsc@2.0.3
## 2.0.12
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/divider",
"version": "2.0.12",
"version": "2.0.16",
"description": ". A separator is a visual divider between two groups of content",
"keywords": [
"divider"
+47
View File
@@ -1,5 +1,52 @@
# @nextui-org/dropdown
## 2.1.6
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/menu@2.0.7
- @nextui-org/popover@2.1.5
- @nextui-org/system@2.0.7
## 2.1.5
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/popover@2.1.4
- @nextui-org/menu@2.0.6
## 2.1.4
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/menu@2.0.5
- @nextui-org/popover@2.1.3
## 2.1.3
### Patch Changes
- Updated dependencies [[`904f53877`](https://github.com/nextui-org/nextui/commit/904f5387793cf8cc594d4ff8c32e378439a8e4fa)]:
- @nextui-org/menu@2.0.4
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/popover@2.1.2
- @nextui-org/menu@2.0.3
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/dropdown",
"version": "2.1.1",
"version": "2.1.6",
"description": "A dropdown displays a list of actions or options that a user can choose.",
"keywords": [
"dropdown"
@@ -2,19 +2,18 @@ import {PopoverContent} from "@nextui-org/popover";
import {FocusScope} from "@react-aria/focus";
import {forwardRef} from "@nextui-org/system";
import {Menu, MenuProps} from "@nextui-org/menu";
import {mergeRefs} from "@nextui-org/react-utils";
import {useDropdownContext} from "./dropdown-context";
export interface DropdownMenuProps extends Omit<MenuProps, "menuProps"> {}
const DropdownMenu = forwardRef<"ul", DropdownMenuProps>((props, ref) => {
const {menuRef, menuProps} = useDropdownContext();
const {getMenuProps} = useDropdownContext();
return (
<PopoverContent>
<FocusScope contain restoreFocus>
<Menu ref={mergeRefs(ref, menuRef)} menuProps={menuProps} {...props} />
<Menu {...getMenuProps(props, ref)} />
</FocusScope>
</PopoverContent>
);
@@ -10,6 +10,7 @@ import {clsx} from "@nextui-org/shared-utils";
import {ReactRef, mergeRefs} from "@nextui-org/react-utils";
import {useMemo, useRef} from "react";
import {mergeProps} from "@react-aria/utils";
import {MenuProps} from "@nextui-org/menu";
interface Props extends HTMLNextUIProps<"div"> {
/**
@@ -92,6 +93,15 @@ export function useDropdown(props: UseDropdownProps) {
[className],
);
const onMenuAction = (menuCloseOnSelect?: boolean) => {
if (menuCloseOnSelect !== undefined && !menuCloseOnSelect) {
return;
}
if (closeOnSelect) {
state.close();
}
};
const getPopoverProps: PropGetter = (props = {}) => ({
state,
placement,
@@ -113,12 +123,24 @@ export function useDropdown(props: UseDropdownProps) {
props = {},
_ref: Ref<any> | null | undefined = null,
) => {
// These props are not needed for the menu trigger since it is handled by the popover trigger.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const {onKeyDown, onPress, onPressStart, ...otherMenuTriggerProps} = menuTriggerProps;
return {
...mergeProps(menuTriggerProps, props),
...mergeProps(otherMenuTriggerProps, props),
ref: mergeRefs(_ref, triggerRef),
};
};
const getMenuProps = (props?: Partial<MenuProps>, _ref: Ref<any> | null | undefined = null) => {
return {
ref: mergeRefs(_ref, menuRef),
menuProps,
...mergeProps(props, {onAction: () => onMenuAction(props?.closeOnSelect)}),
} as MenuProps;
};
return {
Component,
menuRef,
@@ -129,6 +151,7 @@ export function useDropdown(props: UseDropdownProps) {
autoFocus: state.focusStrategy || true,
disableAnimation,
getPopoverProps,
getMenuProps,
getMenuTriggerProps,
};
}
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/image
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/image",
"version": "2.0.13",
"version": "2.0.17",
"description": "A simple image component",
"keywords": [
"image"
+38
View File
@@ -1,5 +1,43 @@
# @nextui-org/input
## 2.1.5
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.1.4
### Patch Changes
- [#1543](https://github.com/nextui-org/nextui/pull/1543) [`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #1492 \n
- Select adn Input spaces fixed on helper wrapper
- New select wrapper added `mainWrapper` which contains the helperWrapper and the trigger slots
- Outside input with start content fixed
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.1.3
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/input",
"version": "2.1.1",
"version": "2.1.5",
"description": "The input component is designed for capturing user input within a text field.",
"keywords": [
"input"
+5 -6
View File
@@ -17,8 +17,9 @@ const Input = forwardRef<"input", InputProps>((props, ref) => {
labelPlacement,
hasPlaceholder,
hasHelper,
isLabelOutside,
isLabelOutsideAsPlaceholder,
shouldLabelBeOutside,
shouldLabelBeInside,
errorMessage,
getBaseProps,
getLabelProps,
@@ -82,7 +83,7 @@ const Input = forwardRef<"input", InputProps>((props, ref) => {
return (
<div {...getMainWrapperProps()}>
<div {...getInputWrapperProps()}>
{labelPlacement === "outside" && !hasPlaceholder ? labelContent : null}
{isLabelOutsideAsPlaceholder ? labelContent : null}
{innerWrapper}
</div>
{helperWrapper}
@@ -103,7 +104,7 @@ const Input = forwardRef<"input", InputProps>((props, ref) => {
labelPlacement,
helperWrapper,
shouldLabelBeOutside,
shouldLabelBeInside,
isLabelOutsideAsPlaceholder,
hasPlaceholder,
labelContent,
innerWrapper,
@@ -117,9 +118,7 @@ const Input = forwardRef<"input", InputProps>((props, ref) => {
return (
<Component {...getBaseProps()}>
{shouldLabelBeOutside && (labelPlacement === "outside-left" || hasPlaceholder)
? labelContent
: null}
{isLabelOutside ? labelContent : null}
{mainWrapper}
</Component>
);
+13 -1
View File
@@ -173,6 +173,13 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
const shouldLabelBeInside = labelPlacement === "inside";
const hasStartContent = !!startContent;
const isLabelOutside = shouldLabelBeOutside
? labelPlacement === "outside-left" ||
hasPlaceholder ||
(labelPlacement === "outside" && hasStartContent)
: false;
const isLabelOutsideAsPlaceholder =
labelPlacement === "outside" && !hasPlaceholder && !hasStartContent;
const slots = useMemo(
() =>
@@ -285,6 +292,8 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
(props = {}) => {
return {
"data-hover": dataAttr(isHovered),
"data-focus-visible": dataAttr(isFocusVisible),
"data-focus": dataAttr(isFocused),
className: slots.inputWrapper({
class: clsx(classNames?.inputWrapper, !!inputValue ? "is-filled" : ""),
}),
@@ -300,7 +309,7 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
},
};
},
[slots, isHovered, inputValue, classNames?.inputWrapper],
[slots, isHovered, isFocusVisible, isFocused, inputValue, classNames?.inputWrapper],
);
const getInnerWrapperProps: PropGetter = useCallback(
@@ -387,6 +396,9 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
isClearable,
isInvalid,
hasHelper,
hasStartContent,
isLabelOutside,
isLabelOutsideAsPlaceholder,
shouldLabelBeOutside,
shouldLabelBeInside,
hasPlaceholder,
@@ -74,7 +74,7 @@ const Template = (args) => (
);
const MirrorTemplate = (args) => (
<div className="w-full max-w-xl flex flex-row gap-4">
<div className="w-full max-w-xl flex flex-row items-end gap-4">
<Input {...args} />
<Input {...args} placeholder="Enter your email" />
</div>
@@ -170,7 +170,7 @@ const StartContentTemplate = (args) => (
<div className="w-full max-w-xl flex flex-row items-end gap-4">
<Input
{...args}
placeholder="you@example.com"
// placeholder="you@example.com"
startContent={
<MailFilledIcon className="text-2xl text-default-400 pointer-events-none flex-shrink-0" />
}
@@ -489,7 +489,7 @@ export const WithDescription = {
args: {
...defaultProps,
description: "We'll never share your email with anyone else.",
description: "We'll never share your email with anyone else. ",
},
};
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/kbd
## 2.0.16
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system-rsc@2.0.4
## 2.0.15
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system-rsc@2.0.3
## 2.0.14
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/system-rsc@2.0.3
## 2.0.13
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
- @nextui-org/system-rsc@2.0.3
## 2.0.12
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/kbd",
"version": "2.0.12",
"version": "2.0.16",
"description": "The keyboard key components indicates which key or set of keys used to execute a specificv action",
"keywords": [
"kbd"
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/link
## 2.0.18
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.17
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.16
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.15
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/link",
"version": "2.0.14",
"version": "2.0.18",
"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"
+46
View File
@@ -1,5 +1,51 @@
# @nextui-org/listbox
## 2.1.6
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/divider@2.0.16
- @nextui-org/system@2.0.7
- @nextui-org/aria-utils@2.0.7
## 2.1.5
### Patch Changes
- [#1544](https://github.com/nextui-org/nextui/pull/1544) [`a9e324b35`](https://github.com/nextui-org/nextui/commit/a9e324b3515bab9883f3911747351ee69f9afb9d) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #1503 Listbox dynamic items types fixed
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/divider@2.0.15
- @nextui-org/aria-utils@2.0.6
## 2.1.4
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/divider@2.0.14
## 2.1.3
### Patch Changes
- [#1463](https://github.com/nextui-org/nextui/pull/1463) [`904f53877`](https://github.com/nextui-org/nextui/commit/904f5387793cf8cc594d4ff8c32e378439a8e4fa) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - React aria utils pkg updated
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/divider@2.0.13
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
@@ -107,9 +107,9 @@ describe("Listbox", () => {
const wrapper = render(
<Listbox aria-label="Actions" items={listboxItems}>
{(section: any) => (
{(section) => (
<ListboxSection aria-label={section.title} items={section.children} title={section.title}>
{(item: any) => <ListboxItem key={item.key}>{item.name}</ListboxItem>}
{(item) => <ListboxItem key={item.key}>{item.name}</ListboxItem>}
</ListboxSection>
)}
</Listbox>,
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/listbox",
"version": "2.1.1",
"version": "2.1.6",
"description": "A listbox displays a list of options and allows a user to select one or more of them.",
"keywords": [
"listbox"
@@ -44,7 +44,7 @@
"@nextui-org/divider": "workspace:*",
"@nextui-org/aria-utils": "workspace:*",
"@nextui-org/use-is-mobile": "workspace:*",
"@react-aria/utils": "^3.18.0",
"@react-aria/utils": "^3.19.0",
"@react-aria/listbox": "^3.10.0",
"@react-stately/list": "^3.9.0",
"@react-aria/focus": "^3.13.0",
+12 -5
View File
@@ -1,14 +1,16 @@
import type {ForwardedRef, ReactElement, Ref} from "react";
import {forwardRef} from "@nextui-org/system";
import {UseListboxProps, useListbox} from "./use-listbox";
import ListboxSection from "./listbox-section";
import ListboxItem from "./listbox-item";
export interface ListboxProps extends UseListboxProps {}
interface Props<T> extends UseListboxProps<T> {}
const Listbox = forwardRef<"ul", ListboxProps>((props, ref) => {
function Listbox<T extends object>(props: Props<T>, ref: ForwardedRef<HTMLUListElement>) {
const {Component, state, getBaseProps, color, disableAnimation, variant, itemClasses} =
useListbox({...props, ref});
useListbox<T>({...props, ref});
return (
<Component {...getBaseProps()}>
@@ -35,8 +37,13 @@ const Listbox = forwardRef<"ul", ListboxProps>((props, ref) => {
})}
</Component>
);
});
}
Listbox.displayName = "NextUI.Listbox";
export default Listbox;
export type ListboxProps<T = object> = Props<T> & {ref?: Ref<HTMLElement>};
// forwardRef doesn't support generic parameters, so cast the result to the correct type
export default forwardRef(Listbox) as <T = object>(props: ListboxProps<T>) => ReactElement;
Listbox.displayName = "NextUI.Listbox";
+22 -2
View File
@@ -1,4 +1,6 @@
import {AriaListBoxOptions, useListBox as useAriaListbox} from "@react-aria/listbox";
import type {KeyboardDelegate} from "@react-types/shared";
import {AriaListBoxProps, useListBox as useAriaListbox} from "@react-aria/listbox";
import {HTMLNextUIProps, PropGetter} from "@nextui-org/system";
import {listbox, ListboxVariantProps} from "@nextui-org/theme";
import {ListState, useListState} from "@react-stately/list";
@@ -7,6 +9,24 @@ import {useMemo} from "react";
import {ListboxItemProps} from "./listbox-item";
interface AriaListBoxOptions<T> extends AriaListBoxProps<T> {
/** Whether the listbox uses virtual scrolling. */
isVirtualized?: boolean;
/**
* An optional keyboard delegate implementation for type to select,
* to override the default.
*/
keyboardDelegate?: KeyboardDelegate;
/**
* Whether the listbox items should use virtual focus instead of being focused directly.
*/
shouldUseVirtualFocus?: boolean;
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean;
/** Whether options should be focused when the user hovers over them. */
shouldFocusOnHover?: boolean;
}
interface Props<T> extends Omit<HTMLNextUIProps<"ul">, "children"> {
/**
* Ref to the DOM node.
@@ -37,7 +57,7 @@ interface Props<T> extends Omit<HTMLNextUIProps<"ul">, "children"> {
export type UseListboxProps<T = object> = Props<T> & AriaListBoxOptions<T> & ListboxVariantProps;
export function useListbox(props: UseListboxProps) {
export function useListbox<T extends object>(props: UseListboxProps<T>) {
const {
ref,
as,
@@ -201,7 +201,6 @@ const MultipleSelectionTemplate = ({color, variant, ...args}: ListboxProps) => {
<Listbox
disallowEmptySelection
aria-label="Actions"
closeOnSelect={false}
color={color}
selectedKeys={selected}
selectionMode="multiple"
+44
View File
@@ -1,5 +1,49 @@
# @nextui-org/menu
## 2.0.7
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/divider@2.0.16
- @nextui-org/system@2.0.7
- @nextui-org/aria-utils@2.0.7
## 2.0.6
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/divider@2.0.15
- @nextui-org/aria-utils@2.0.6
## 2.0.5
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/divider@2.0.14
## 2.0.4
### Patch Changes
- [#1463](https://github.com/nextui-org/nextui/pull/1463) [`904f53877`](https://github.com/nextui-org/nextui/commit/904f5387793cf8cc594d4ff8c32e378439a8e4fa) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - React aria utils pkg updated
## 2.0.3
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/divider@2.0.13
- @nextui-org/theme@2.1.2
## 2.0.2
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/menu",
"version": "2.0.2",
"version": "2.0.7",
"description": "A menu displays a list of options and allows a user to select one or more of them.",
"keywords": [
"menu"
@@ -45,7 +45,7 @@
"@nextui-org/shared-utils": "workspace:*",
"@nextui-org/react-utils": "workspace:*",
"@react-aria/menu": "^3.10.1",
"@react-aria/utils": "^3.18.0",
"@react-aria/utils": "^3.19.0",
"@react-stately/menu": "^3.5.3",
"@react-stately/tree": "^3.7.0",
"@react-aria/focus": "^3.13.0",
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/modal
## 2.0.19
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
- @nextui-org/framer-transitions@2.0.7
## 2.0.18
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/framer-transitions@2.0.6
## 2.0.17
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.16
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.15
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/modal",
"version": "2.0.15",
"version": "2.0.19",
"description": "Displays a dialog with a custom content that requires attention or provides additional information.",
"keywords": [
"modal"
+44
View File
@@ -1,5 +1,49 @@
# @nextui-org/navbar
## 2.0.18
### Patch Changes
- [#1549](https://github.com/nextui-org/nextui/pull/1549) [`59fda3772`](https://github.com/nextui-org/nextui/commit/59fda3772fe4f05dc24266e69f4f6ac5e201506d) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Navbar menu scroll fixed
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
- @nextui-org/framer-transitions@2.0.7
## 2.0.17
### Patch Changes
- [#1542](https://github.com/nextui-org/nextui/pull/1542) [`57909accd`](https://github.com/nextui-org/nextui/commit/57909accdeda233c9ea0c0bb3409f7fed260a9b0) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #1298 navbar-menu focus trapping fixed
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/framer-transitions@2.0.6
## 2.0.16
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.15
### Patch Changes
- [#1496](https://github.com/nextui-org/nextui/pull/1496) [`e4113b05c`](https://github.com/nextui-org/nextui/commit/e4113b05ced165a0b09eb05da2b7822ef304bb7d) Thanks [@TIMMLOPK](https://github.com/TIMMLOPK)! - fix unable to close NavbarMenu
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/navbar",
"version": "2.0.13",
"version": "2.0.18",
"description": "A responsive navigation header positioned on top side of your page that includes support for branding, links, navigation, collapse and more.",
"keywords": [
"navbar"
@@ -58,7 +58,7 @@ const NavbarMenu = forwardRef<"ul", NavbarMenuProps>((props, ref) => {
</ul>
</MenuWrapper>
) : (
<AnimatePresence>
<AnimatePresence mode="wait">
{isMenuOpen ? (
<MenuWrapper>
<motion.ul
@@ -1,5 +1,48 @@
# @nextui-org/pagination
## 2.0.18
### Patch Changes
- [#1222](https://github.com/nextui-org/nextui/pull/1222) [`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb) Thanks [@jguddas](https://github.com/jguddas)! - fix: resolved cursor issues in pagination
- The cursor does not animate anymore on initial render and non page change prop changes.
- The cursor hover state now looks good with disableAnimation set.
- The animated cursor is now transparent to the cursor (pointer-events: none).
- [#1552](https://github.com/nextui-org/nextui/pull/1552) [`8fcc8b376`](https://github.com/nextui-org/nextui/commit/8fcc8b37670fc1c7823d2ef78ad459078d6c76f4) Thanks [@jguddas](https://github.com/jguddas)! - fix: fixed pagination scale animation
For animations of the pagination cursor to be enabled data-moving needs to be set to true.
We are now setting the data-moving to false 300ms after setting the cursor scale to 1.
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.17
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.16
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.15
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/pagination",
"version": "2.0.14",
"version": "2.0.18",
"description": "The Pagination component allows you to display active page and navigate between multiple pages.",
"keywords": [
"pagination"
@@ -175,42 +175,47 @@ export function usePagination(originalProps: UsePaginationProps) {
}
}
function scrollTo(value: number) {
function scrollTo(value: number, skipAnimation: boolean) {
const map = getItemsRefMap();
const node = map.get(value);
if (!node || !cursorRef.current) return;
// clean up the previous cursor timer (if any)
cursorTimer.current && clearTimeout(cursorTimer.current);
if (node) {
// scroll parent to the item
scrollIntoView(node, {
scrollMode: "always",
behavior: "smooth",
block: "start",
inline: "start",
boundary: domRef.current,
});
// scroll parent to the item
scrollIntoView(node, {
scrollMode: "always",
behavior: "smooth",
block: "start",
inline: "start",
boundary: domRef.current,
});
// get position of the item
const {offsetLeft} = node;
// get position of the item
const {offsetLeft} = node;
// move the cursor to the item
if (cursorRef.current) {
cursorRef.current.setAttribute("data-moving", "true");
cursorRef.current.style.transform = `translateX(${offsetLeft}px) scale(1.1)`;
}
cursorTimer.current = setTimeout(() => {
// reset the scale of the cursor
if (cursorRef.current) {
cursorRef.current.setAttribute("data-moving", "false");
cursorRef.current.style.transform = `translateX(${offsetLeft}px) scale(1)`;
}
cursorTimer.current && clearTimeout(cursorTimer.current);
}, CURSOR_TRANSITION_TIMEOUT);
// only shows the animation when the page changes, not on intial render or layout shift
if (skipAnimation) {
cursorRef.current.setAttribute("data-moving", "false");
cursorRef.current.style.transform = `translateX(${offsetLeft}px) scale(1)`;
return;
}
// move the cursor to the item
cursorRef.current.setAttribute("data-moving", "true");
cursorRef.current.style.transform = `translateX(${offsetLeft}px) scale(1.1)`;
cursorTimer.current = setTimeout(() => {
// reset the scale of the cursor
if (cursorRef.current) {
cursorRef.current.setAttribute("data-moving", "false");
cursorRef.current.style.transform = `translateX(${offsetLeft}px) scale(1)`;
}
cursorTimer.current && clearTimeout(cursorTimer.current);
}, CURSOR_TRANSITION_TIMEOUT);
}
const {range, activePage, setPage, previous, next, first, last} = useBasePagination({
@@ -223,15 +228,19 @@ export function usePagination(originalProps: UsePaginationProps) {
onChange,
});
const activePageRef = useRef(activePage);
useEffect(() => {
if (activePage && !originalProps.disableAnimation) {
scrollTo(activePage);
scrollTo(activePage, activePage === activePageRef.current);
}
activePageRef.current = activePage;
}, [
activePage,
originalProps.disableAnimation,
originalProps.isCompact,
originalProps.disableCursorAnimation,
originalProps.dotsJump,
originalProps.isCompact,
originalProps.showControls,
]);
const slots = useMemo(
+40
View File
@@ -1,5 +1,45 @@
# @nextui-org/popover
## 2.1.5
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/button@2.0.17
- @nextui-org/system@2.0.7
- @nextui-org/aria-utils@2.0.7
- @nextui-org/framer-transitions@2.0.7
## 2.1.4
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/button@2.0.16
- @nextui-org/aria-utils@2.0.6
- @nextui-org/framer-transitions@2.0.6
## 2.1.3
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/button@2.0.15
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/button@2.0.14
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/popover",
"version": "2.1.1",
"version": "2.1.5",
"description": "A popover is an overlay element positioned relative to a trigger.",
"keywords": [
"popover"
@@ -73,6 +73,8 @@ const FreeSoloPopover = forwardRef<"div", FreeSoloPopoverProps>((props, ref) =>
getArrowProps,
} = usePopover({
...props,
// avoid closing the popover when navigating with the keyboard
shouldCloseOnInteractOutside: undefined,
ref,
});
@@ -59,8 +59,8 @@ const PopoverContent = forwardRef<"div", PopoverContentProps>((props, _) => {
{!isNonModal && <DismissButton onDismiss={onClose} />}
<Component {...getDialogProps(mergeProps(dialogProps, otherProps))} ref={dialogRef}>
{typeof children === "function" ? children(titleProps) : children}
{arrowContent}
</Component>
{arrowContent}
<DismissButton onDismiss={onClose} />
</>
);
@@ -50,6 +50,7 @@ export function useReactAriaPopover(
shouldCloseOnBlur = true,
placement: placementProp = "top",
containerPadding,
shouldCloseOnInteractOutside,
isNonModal: isNonModalProp,
isKeyboardDismissDisabled,
...otherProps
@@ -64,6 +65,14 @@ export function useReactAriaPopover(
shouldCloseOnBlur,
isDismissable: !isNonModal,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
? shouldCloseOnInteractOutside
: (element) => {
// Don't close if the click is within the trigger or the popover itself
let trigger = triggerRef?.current;
return !trigger || !trigger.contains(element);
},
},
popoverRef,
);
@@ -99,6 +99,7 @@ export function usePopover(originalProps: UsePopoverProps) {
crossOffset = 0,
boundaryElement,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside,
motionProps,
className,
classNames,
@@ -148,6 +149,7 @@ export function usePopover(originalProps: UsePopoverProps) {
shouldFlip,
containerPadding,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside,
},
state,
);
@@ -194,7 +196,7 @@ export function usePopover(originalProps: UsePopoverProps) {
(props = {}, _ref: Ref<any> | null | undefined = null) => {
return {
"aria-haspopup": "dialog",
...mergeProps(!triggerRefProp ? triggerProps : {}, props),
...mergeProps(triggerProps, props),
className: slots.trigger({class: clsx(classNames?.trigger, props.className)}),
ref: mergeRefs(_ref, triggerRef),
};
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/progress
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/progress",
"version": "2.0.13",
"version": "2.0.17",
"description": "Progress bars show either determinate or indeterminate progress of an operation over time.",
"keywords": [
"progress"
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/radio
## 2.0.18
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.17
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.16
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.15
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/radio",
"version": "2.0.14",
"version": "2.0.18",
"description": "Radios allow users to select a single option from a list of mutually exclusive options.",
"keywords": [
"radio"
+32
View File
@@ -1,5 +1,37 @@
# @nextui-org/ripple
## 2.0.17
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.0.16
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.0.15
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.0.14
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.0.13
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/ripple",
"version": "2.0.13",
"version": "2.0.17",
"description": "A simple implementation to display a ripple animation when the source component is clicked",
"keywords": [
"ripple"
@@ -1,5 +1,37 @@
# @nextui-org/scroll-shadow
## 2.1.5
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system@2.0.7
## 2.1.4
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
## 2.1.3
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/scroll-shadow",
"version": "2.1.1",
"version": "2.1.5",
"description": "A component that applies top and bottom shadows when content overflows on scroll.",
"keywords": [
"scroll-shadow"
+71
View File
@@ -1,5 +1,76 @@
# @nextui-org/select
## 2.1.7
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/listbox@2.1.6
- @nextui-org/popover@2.1.5
- @nextui-org/scroll-shadow@2.1.5
- @nextui-org/spinner@2.0.15
- @nextui-org/system@2.0.7
- @nextui-org/aria-utils@2.0.7
## 2.1.6
### Patch Changes
- [#1543](https://github.com/nextui-org/nextui/pull/1543) [`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #1492 \n
- Select adn Input spaces fixed on helper wrapper
- New select wrapper added `mainWrapper` which contains the helperWrapper and the trigger slots
- Outside input with start content fixed
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`a9e324b35`](https://github.com/nextui-org/nextui/commit/a9e324b3515bab9883f3911747351ee69f9afb9d), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/listbox@2.1.5
- @nextui-org/system@2.0.6
- @nextui-org/popover@2.1.4
- @nextui-org/scroll-shadow@2.1.4
- @nextui-org/spinner@2.0.14
- @nextui-org/aria-utils@2.0.6
## 2.1.5
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/listbox@2.1.4
- @nextui-org/popover@2.1.3
- @nextui-org/scroll-shadow@2.1.3
- @nextui-org/spinner@2.0.13
## 2.1.4
### Patch Changes
- [#1472](https://github.com/nextui-org/nextui/pull/1472) [`ae9f300d4`](https://github.com/nextui-org/nextui/commit/ae9f300d4571aab367935d996fe95fbbfa36e22b) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix #1468 size prop fixed in Select component
## 2.1.3
### Patch Changes
- [#1463](https://github.com/nextui-org/nextui/pull/1463) [`904f53877`](https://github.com/nextui-org/nextui/commit/904f5387793cf8cc594d4ff8c32e378439a8e4fa) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - React aria utils pkg updated
- Updated dependencies [[`904f53877`](https://github.com/nextui-org/nextui/commit/904f5387793cf8cc594d4ff8c32e378439a8e4fa)]:
- @nextui-org/listbox@2.1.3
## 2.1.2
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/scroll-shadow@2.1.2
- @nextui-org/listbox@2.1.2
- @nextui-org/popover@2.1.2
- @nextui-org/spinner@2.0.12
- @nextui-org/theme@2.1.2
## 2.1.1
### Patch Changes
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/select",
"version": "2.1.1",
"version": "2.1.7",
"description": "A select displays a collapsible list of options and allows a user to select one of them.",
"keywords": [
"select"
@@ -52,12 +52,13 @@
"@nextui-org/use-aria-multiselect": "workspace:*",
"@react-aria/focus": "^3.13.0",
"@react-aria/interactions": "^3.16.0",
"@react-aria/utils": "^3.18.0",
"@react-aria/utils": "^3.19.0",
"@react-aria/visually-hidden": "^3.8.3",
"@react-types/shared": "^3.19.0"
},
"devDependencies": {
"@nextui-org/avatar": "workspace:*",
"@nextui-org/input": "workspace:*",
"@nextui-org/chip": "workspace:*",
"framer-motion": "^10.15.1",
"@nextui-org/use-infinite-scroll": "workspace:*",
+16 -13
View File
@@ -36,6 +36,7 @@ function Select<T extends object>(props: Props<T>, ref: ForwardedRef<HTMLSelectE
getListboxProps,
getPopoverProps,
getSpinnerProps,
getMainWrapperProps,
shouldLabelBeOutside,
getInnerWrapperProps,
getHiddenSelectProps,
@@ -115,20 +116,22 @@ function Select<T extends object>(props: Props<T>, ref: ForwardedRef<HTMLSelectE
<div {...getBaseProps()}>
<HiddenSelect {...getHiddenSelectProps()} />
{shouldLabelBeOutside ? labelContent : null}
<Component {...getTriggerProps()}>
{!shouldLabelBeOutside ? labelContent : null}
<div {...getInnerWrapperProps()}>
{startContent}
<span {...getValueProps()}>
{renderSelectedItem}
{state.selectedItems && <VisuallyHidden>,</VisuallyHidden>}
</span>
{endContent}
</div>
{renderIndicator}
</Component>
<div {...getMainWrapperProps()}>
<Component {...getTriggerProps()}>
{!shouldLabelBeOutside ? labelContent : null}
<div {...getInnerWrapperProps()}>
{startContent}
<span {...getValueProps()}>
{renderSelectedItem}
{state.selectedItems && <VisuallyHidden>,</VisuallyHidden>}
</span>
{endContent}
</div>
{renderIndicator}
</Component>
{helperWrapper}
</div>
{disableAnimation ? popoverContent : <AnimatePresence>{popoverContent}</AnimatePresence>}
{helperWrapper}
</div>
);
}
+18 -5
View File
@@ -41,7 +41,7 @@ export type SelectedItemProps<T = object> = {
export type SelectedItems<T = object> = Array<SelectedItemProps<T>>;
interface Props<T> extends HTMLNextUIProps<"select"> {
interface Props<T> extends Omit<HTMLNextUIProps<"select">, keyof SelectVariantProps> {
/**
* Ref to the DOM node.
*/
@@ -124,12 +124,11 @@ interface Props<T> extends HTMLNextUIProps<"select"> {
export type UseSelectProps<T> = Omit<Props<T>, keyof MultiSelectProps<T>> &
MultiSelectProps<T> &
SelectVariantProps &
CollectionProps<T>;
CollectionProps<T> &
SelectVariantProps;
export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
const disableAnimation = originalProps.disableAnimation ?? false;
let {
@@ -309,12 +308,13 @@ export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
const getBaseProps: PropGetter = useCallback(
(props = {}) => ({
"data-filled": dataAttr(isFilled),
"data-has-helper": dataAttr(hasHelper),
className: slots.base({
class: clsx(baseStyles, props.className),
}),
...props,
}),
[slots, isFilled, baseStyles],
[slots, hasHelper, isFilled, baseStyles],
);
const getTriggerProps: PropGetter = useCallback(
@@ -492,6 +492,18 @@ export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
[slots, classNames?.description],
);
const getMainWrapperProps: PropGetter = useCallback(
(props = {}) => {
return {
...props,
className: slots.mainWrapper({
class: clsx(classNames?.mainWrapper, props?.className),
}),
};
},
[slots, classNames?.mainWrapper],
);
const getErrorMessageProps: PropGetter = useCallback(
(props = {}) => {
return {
@@ -547,6 +559,7 @@ export function useSelect<T extends object>(originalProps: UseSelectProps<T>) {
getListboxProps,
getPopoverProps,
getSpinnerProps,
getMainWrapperProps,
getListboxWrapperProps,
getHiddenSelectProps,
getInnerWrapperProps,
+34
View File
@@ -1,5 +1,39 @@
# @nextui-org/skeleton
## 2.0.15
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/system-rsc@2.0.4
## 2.0.14
### Patch Changes
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system-rsc@2.0.3
## 2.0.13
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/system-rsc@2.0.3
## 2.0.12
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/theme@2.1.2
- @nextui-org/system-rsc@2.0.3
## 2.0.11
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/skeleton",
"version": "2.0.11",
"version": "2.0.15",
"description": "Skeleton is used to display the loading state of some component.",
"keywords": [
"skeleton"
+49
View File
@@ -1,5 +1,54 @@
# @nextui-org/snippet
## 2.0.21
### Patch Changes
- Updated dependencies [[`28477447d`](https://github.com/nextui-org/nextui/commit/28477447d3dc9d87fdc6dea666ae4ce76e7c5bfb), [`fc3c6b943`](https://github.com/nextui-org/nextui/commit/fc3c6b9431c0c6bcb4af5e2a0be0fc50f652b182)]:
- @nextui-org/theme@2.1.5
- @nextui-org/button@2.0.17
- @nextui-org/tooltip@2.0.20
- @nextui-org/system@2.0.7
## 2.0.20
### Patch Changes
- [#1546](https://github.com/nextui-org/nextui/pull/1546) [`faf26acd2`](https://github.com/nextui-org/nextui/commit/faf26acd239dcffcab71ef63d1d2708990f19bec) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Snippet invalid props fixed
- Updated dependencies [[`043b8420c`](https://github.com/nextui-org/nextui/commit/043b8420cfb659cbb6bb36404807ec3cc8ac8592), [`641bf0885`](https://github.com/nextui-org/nextui/commit/641bf0885b6af2d7f36f27d83716a441975a5ca5)]:
- @nextui-org/theme@2.1.4
- @nextui-org/system@2.0.6
- @nextui-org/button@2.0.16
- @nextui-org/tooltip@2.0.19
## 2.0.19
### Patch Changes
- Updated dependencies [[`5702287e5`](https://github.com/nextui-org/nextui/commit/5702287e5622a8f0a0326c7cc0c200808c7971a8)]:
- @nextui-org/theme@2.1.3
- @nextui-org/button@2.0.15
- @nextui-org/tooltip@2.0.18
## 2.0.18
### Patch Changes
- Updated dependencies [[`a371e1a5f`](https://github.com/nextui-org/nextui/commit/a371e1a5fa698aaf1d2aa1c8beb6d3df6eaad57a)]:
- @nextui-org/tooltip@2.0.17
## 2.0.17
### Patch Changes
- [#1458](https://github.com/nextui-org/nextui/pull/1458) [`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix dropdown trigger events and popover arrow styles
- Updated dependencies [[`4e94c115`](https://github.com/nextui-org/nextui/commit/4e94c115281c2774424d687877e036a9af1bce01)]:
- @nextui-org/tooltip@2.0.16
- @nextui-org/button@2.0.14
- @nextui-org/theme@2.1.2
## 2.0.16
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nextui-org/snippet",
"version": "2.0.16",
"version": "2.0.21",
"description": "Display a snippet of copyable code for the command line.",
"keywords": [
"snippet"

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