Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d294e3a04 | |||
| 43906f639e | |||
| 8fcc8b3767 | |||
| 28477447d3 | |||
| fc3c6b9431 | |||
| 59fda3772f | |||
| d8d2b87cb8 | |||
| 64571e468c | |||
| faf26acd23 | |||
| cac56faf29 | |||
| 09fe1d3141 | |||
| a9e324b351 | |||
| 043b8420cf | |||
| 57909accde | |||
| 7a17256268 | |||
| bf2bc265ee | |||
| cf6bf749a1 | |||
| 641bf0885b | |||
| 40b42001f9 | |||
| 789a7209a2 | |||
| 021aa16d96 | |||
| eb8a1fcc01 | |||
| 9b42a2fca1 | |||
| 5702287e56 | |||
| 290cce15be | |||
| 27bde30839 | |||
| 6be3bc3516 | |||
| e4113b05ce | |||
| a3a95e7196 | |||
| 8731159702 | |||
| b6adb2ae8c | |||
| cd2d9b70a9 | |||
| a371e1a5fa | |||
| 5cdc4d1d87 | |||
| 22c6e070dd | |||
| 0714192838 | |||
| ae9f300d45 | |||
| a16dac04c8 | |||
| 94db001961 | |||
| d77cf7658b | |||
| 46c47f7e6e | |||
| 35b9741663 | |||
| 2b82ba86eb | |||
| 904f538779 | |||
| 609e9f4c11 | |||
| e3dabac9f5 | |||
| 4e94c11528 | |||
| a17b6c7502 |
@@ -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) => (
|
||||
|
||||
@@ -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 ?? [],
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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} />
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
@@ -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,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",
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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,6 +1,6 @@
|
||||
{
|
||||
"name": "@nextui-org/image",
|
||||
"version": "2.0.13",
|
||||
"version": "2.0.17",
|
||||
"description": "A simple image component",
|
||||
"keywords": [
|
||||
"image"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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. ",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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 <a>",
|
||||
"keywords": [
|
||||
"link"
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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,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(
|
||||
|
||||
@@ -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,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),
|
||||
};
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:*",
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
@@ -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,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
Reference in New Issue
Block a user