feat(popover): a11y improved, titleProps passed by render props, form auto focus added

This commit is contained in:
Junior Garcia 2023-04-07 12:51:36 -03:00
parent 855c8817ed
commit 5d819b7939
93 changed files with 1005 additions and 79 deletions

View File

@ -1,5 +1,35 @@
# @nextui-org/accordion
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/use-aria-accordion-item@0.0.0-dev-v2-20230407155017
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/use-aria-accordion-item@0.0.0-dev-v2-20230407131834
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/accordion",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",

View File

@ -1,5 +1,29 @@
# @nextui-org/avatar
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/use-image@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/use-image@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/avatar",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"keywords": [
"avatar"

View File

@ -1,5 +1,27 @@
# @nextui-org/badge
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/badge",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Badges are used as a small numerical value or status descriptor for UI elements.",
"keywords": [
"badge"

View File

@ -1,5 +1,31 @@
# @nextui-org/button
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/spinner@0.0.0-dev-v2-20230407155017
- @nextui-org/drip@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/spinner@0.0.0-dev-v2-20230407131834
- @nextui-org/drip@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/button",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Buttons allow users to perform actions and choose with a single tap.",
"keywords": [
"button"

View File

@ -1,5 +1,29 @@
# @nextui-org/card
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/drip@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/drip@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/card",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
"keywords": [
"card"

View File

@ -1,5 +1,27 @@
# @nextui-org/checkbox
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/checkbox",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"keywords": [
"checkbox"

View File

@ -1,5 +1,29 @@
# @nextui-org/chip
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/chip",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Chips help people enter information, make selections, filter content, or trigger actions.",
"keywords": [
"chip"

View File

@ -1,5 +1,27 @@
# @nextui-org/code
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/code",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Code is a component used to display inline code.",
"keywords": [
"code"

View File

@ -1,5 +1,27 @@
# @nextui-org/drip
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/drip",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A ripple effect for ensuring that the user fells the system is reacting instantaneously",
"keywords": [
"drip"

View File

@ -1,5 +1,31 @@
# @nextui-org/input
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/use-aria-field@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/use-aria-field@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/input",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "The input component is designed for capturing user input within a text field.",
"keywords": [
"input"

View File

@ -13,7 +13,7 @@ import {chain, filterDOMProps, mergeProps} from "@react-aria/utils";
import {useAriaTextField} from "./use-aria-textfield";
export interface Props extends HTMLNextUIProps<"input"> {
export interface Props extends Omit<HTMLNextUIProps<"input">, keyof InputVariantProps> {
/**
* Ref to the DOM node.
*/

View File

@ -1,5 +1,27 @@
# @nextui-org/link
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/link",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an &lt;a&gt;",
"keywords": [
"link"

View File

@ -1,5 +1,31 @@
# @nextui-org/pagination
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/use-pagination@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/use-pagination@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/pagination",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "The Pagination component allows you to display active page and navigate between multiple pages.",
"keywords": [
"pagination"

View File

@ -1,5 +1,33 @@
# @nextui-org/popover
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/button@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/button@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/popover",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A popover is an overlay element positioned relative to a trigger.",
"keywords": [
"popover"
@ -54,6 +54,7 @@
"framer-motion": "^10.11.2"
},
"devDependencies": {
"@nextui-org/input": "workspace:*",
"@react-types/overlays": "^3.7.1",
"@react-types/button": "^3.7.2",
"clean-package": "2.2.0",

View File

@ -1,18 +1,20 @@
import type {AriaDialogProps} from "@react-aria/dialog";
import {ReactNode, useMemo, useRef} from "react";
import {DOMAttributes, ReactNode, useMemo, useRef} from "react";
import {forwardRef} from "@nextui-org/system";
import {DismissButton} from "@react-aria/overlays";
import {FocusScope} from "@react-aria/focus";
import {TRANSITION_VARIANTS} from "@nextui-org/framer-transitions";
import {motion} from "framer-motion";
import {getTransformOrigins} from "@nextui-org/aria-utils";
import {useDialog} from "@react-aria/dialog";
import {mergeProps} from "@react-aria/utils";
import {FocusableElement} from "@react-types/shared";
import {usePopoverContext} from "./popover-context";
export interface PopoverContentProps extends AriaDialogProps {
children: ReactNode;
children: ReactNode | ((titleProps: DOMAttributes<FocusableElement>) => ReactNode);
}
const PopoverContent = forwardRef<PopoverContentProps, "section">((props, _) => {
@ -33,7 +35,7 @@ const PopoverContent = forwardRef<PopoverContentProps, "section">((props, _) =>
const Component = as || OverlayComponent || "div";
const dialogRef = useRef(null);
const {dialogProps} = useDialog(
const {dialogProps, titleProps} = useDialog(
{
role: "dialog",
},
@ -50,7 +52,9 @@ const PopoverContent = forwardRef<PopoverContentProps, "section">((props, _) =>
<>
<DismissButton onDismiss={onClose} />
<Component {...getDialogProps(mergeProps(dialogProps, otherProps))} ref={dialogRef}>
{children}
<FocusScope contain restoreFocus>
{typeof children === "function" ? children(titleProps) : children}
</FocusScope>
{arrowContent}
</Component>
<DismissButton onDismiss={onClose} />

View File

@ -59,6 +59,7 @@ export interface Props extends HTMLNextUIProps<"div"> {
* ```ts
* <Popover styles={{
* base:"base-classes",
* trigger: "trigger-classes",
* arrow: "arrow-classes",
* }} />
* ```
@ -166,6 +167,7 @@ export function usePopover(originalProps: UsePopoverProps) {
(props = {}, _ref: Ref<any> | null | undefined = null) => {
return {
...mergeProps(triggerProps, props),
className: slots.trigger({class: clsx(styles?.trigger, props.className)}),
ref: mergeRefs(_ref, triggerRef),
"aria-controls": popoverId,
"aria-haspopup": "dialog",

View File

@ -2,6 +2,7 @@ import React from "react";
import {ComponentStory, ComponentMeta} from "@storybook/react";
import {popover, ButtonVariantProps} from "@nextui-org/theme";
import {Button} from "@nextui-org/button";
import {Input} from "@nextui-org/input";
import {Popover, PopoverTrigger, PopoverContent, PopoverProps} from "../src";
@ -102,13 +103,33 @@ const Template: ComponentStory<typeof Popover> = (args: PopoverProps) => {
return (
<Popover {...args}>
<PopoverTrigger>
<Button disableAnimation={args.disableAnimation}>Open popover</Button>
<Button disableAnimation={!!args.disableAnimation}>Open popover</Button>
</PopoverTrigger>
{content}
</Popover>
);
};
const WithTitlePropsTemplate: ComponentStory<typeof Popover> = (args: PopoverProps) => {
return (
<Popover {...args}>
<PopoverTrigger>
<Button disableAnimation={!!args.disableAnimation}>Open popover</Button>
</PopoverTrigger>
<PopoverContent>
{(titleProps) => (
<div className="px-1 py-2">
<h3 className="text-sm font-bold" {...titleProps}>
Popover Content
</h3>
<div className="text-xs">This is a content of the popover</div>
</div>
)}
</PopoverContent>
</Popover>
);
};
const OpenChangeTemplate: ComponentStory<typeof Popover> = (args: PopoverProps) => {
const [isOpen, setIsOpen] = React.useState(false);
@ -339,6 +360,29 @@ const OffsetTemplate: ComponentStory<typeof Popover> = (args: PopoverProps) => (
</div>
);
const WithFormTemplate: ComponentStory<typeof Popover> = (args: PopoverProps) => (
<Popover {...args}>
<PopoverTrigger>
<Button>Open popover</Button>
</PopoverTrigger>
<PopoverContent>
{(titleProps) => (
<div className="px-1 py-2 w-full">
<p className="text-sm font-bold text-foreground" {...titleProps}>
Dimensions
</p>
<div className="mt-2 flex flex-col gap-2 w-full">
<Input defaultValue="100%" label="Width" size="sm" variant="bordered" />
<Input defaultValue="300px" label="Max. width" size="sm" variant="bordered" />
<Input defaultValue="24px" label="Height" size="sm" variant="bordered" />
<Input defaultValue="30px" label="Max. height" size="sm" variant="bordered" />
</div>
</div>
)}
</PopoverContent>
</Popover>
);
export const Default = Template.bind({});
Default.args = {
...defaultProps,
@ -350,6 +394,12 @@ DisableAnimation.args = {
disableAnimation: true,
};
export const TriggerForeground = Template.bind({});
TriggerForeground.args = {
...defaultProps,
isTriggerForeground: true,
};
export const WithArrow = Template.bind({});
WithArrow.args = {
...defaultProps,
@ -378,3 +428,18 @@ WithOffset.args = {
...defaultProps,
color: "warning",
};
export const WithTitleProps = WithTitlePropsTemplate.bind({});
WithTitleProps.args = {
...defaultProps,
};
export const WithForm = WithFormTemplate.bind({});
WithForm.args = {
...defaultProps,
showArrow: true,
offset: 10,
placement: "bottom",
variant: "shadow",
className: "w-[280px] bg-white dark:bg-content1",
};

View File

@ -1,5 +1,31 @@
# @nextui-org/progress
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/use-aria-label@0.0.0-dev-v2-20230407155017
- @nextui-org/use-is-mounted@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/use-aria-label@0.0.0-dev-v2-20230407131834
- @nextui-org/use-is-mounted@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/progress",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Progress bars show either determinate or indeterminate progress of an operation over time.",
"keywords": [
"progress"

View File

@ -1,5 +1,27 @@
# @nextui-org/radio
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/radio",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Radios allow users to select a single option from a list of mutually exclusive options.",
"keywords": [
"radio"

View File

@ -1,5 +1,31 @@
# @nextui-org/snippet
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/use-clipboard@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/tooltip@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/use-clipboard@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/tooltip@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/snippet",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Display a snippet of copyable code for the command line.",
"keywords": [
"snippet"

View File

@ -1,5 +1,27 @@
# @nextui-org/spinner
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/spinner",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Loaders express an unspecified wait time or display the length of a process.",
"keywords": [
"loading",

View File

@ -1,5 +1,27 @@
# @nextui-org/switch
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/switch",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A switch is similar to a checkbox, but represents on/off values as opposed to selection.",
"keywords": [
"switch"

View File

@ -1,5 +1,31 @@
# @nextui-org/tooltip
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407155017
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230407131834
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/aria-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/tooltip",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A React Component for rendering dynamically positioned Tooltips",
"keywords": [
"tooltip"

View File

@ -9,7 +9,7 @@ import {getTransformOrigins} from "@nextui-org/aria-utils";
import {UseTooltipProps, useTooltip} from "./use-tooltip";
export interface TooltipProps extends Omit<UseTooltipProps, "ref"> {}
export interface TooltipProps extends Omit<UseTooltipProps, "ref" | "disableTriggerFocus"> {}
const Tooltip = forwardRef<TooltipProps, "div">((props, ref) => {
const {

View File

@ -1,5 +1,29 @@
# @nextui-org/user
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/avatar@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/avatar@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/user",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Flexible User Profile Component.",
"keywords": [
"user"

View File

@ -1,5 +1,63 @@
# @nextui-org/react
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/pagination@0.0.0-dev-v2-20230407155017
- @nextui-org/accordion@0.0.0-dev-v2-20230407155017
- @nextui-org/checkbox@0.0.0-dev-v2-20230407155017
- @nextui-org/progress@0.0.0-dev-v2-20230407155017
- @nextui-org/popover@0.0.0-dev-v2-20230407155017
- @nextui-org/snippet@0.0.0-dev-v2-20230407155017
- @nextui-org/spinner@0.0.0-dev-v2-20230407155017
- @nextui-org/tooltip@0.0.0-dev-v2-20230407155017
- @nextui-org/avatar@0.0.0-dev-v2-20230407155017
- @nextui-org/button@0.0.0-dev-v2-20230407155017
- @nextui-org/switch@0.0.0-dev-v2-20230407155017
- @nextui-org/badge@0.0.0-dev-v2-20230407155017
- @nextui-org/input@0.0.0-dev-v2-20230407155017
- @nextui-org/radio@0.0.0-dev-v2-20230407155017
- @nextui-org/card@0.0.0-dev-v2-20230407155017
- @nextui-org/chip@0.0.0-dev-v2-20230407155017
- @nextui-org/code@0.0.0-dev-v2-20230407155017
- @nextui-org/drip@0.0.0-dev-v2-20230407155017
- @nextui-org/link@0.0.0-dev-v2-20230407155017
- @nextui-org/user@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
- @nextui-org/theme@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/pagination@0.0.0-dev-v2-20230407131834
- @nextui-org/accordion@0.0.0-dev-v2-20230407131834
- @nextui-org/checkbox@0.0.0-dev-v2-20230407131834
- @nextui-org/progress@0.0.0-dev-v2-20230407131834
- @nextui-org/popover@0.0.0-dev-v2-20230407131834
- @nextui-org/snippet@0.0.0-dev-v2-20230407131834
- @nextui-org/spinner@0.0.0-dev-v2-20230407131834
- @nextui-org/tooltip@0.0.0-dev-v2-20230407131834
- @nextui-org/avatar@0.0.0-dev-v2-20230407131834
- @nextui-org/button@0.0.0-dev-v2-20230407131834
- @nextui-org/switch@0.0.0-dev-v2-20230407131834
- @nextui-org/badge@0.0.0-dev-v2-20230407131834
- @nextui-org/input@0.0.0-dev-v2-20230407131834
- @nextui-org/radio@0.0.0-dev-v2-20230407131834
- @nextui-org/card@0.0.0-dev-v2-20230407131834
- @nextui-org/chip@0.0.0-dev-v2-20230407131834
- @nextui-org/code@0.0.0-dev-v2-20230407131834
- @nextui-org/drip@0.0.0-dev-v2-20230407131834
- @nextui-org/link@0.0.0-dev-v2-20230407131834
- @nextui-org/user@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
- @nextui-org/theme@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/react",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "🚀 Beautiful and modern React UI library.",
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://nextui.org",

View File

@ -1,5 +1,17 @@
# @nextui-org/system
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/system",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "NextUI system primitives",
"keywords": [
"system"

View File

@ -1,5 +1,17 @@
# @nextui-org/theme
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/theme",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "The default theme for NextUI components",
"keywords": [
"theme",

View File

@ -6,11 +6,11 @@ import {colorVariants, ringClasses} from "../utils";
/**
* Popover wrapper **Tailwind Variants** component
*
* const { base, arrow } = popover({...})
* const { base, trigger, arrow } = popover({...})
*
* @example
* <div>
* <button>your trigger</button>
* <button className={trigger()} aria-expanded="true/false">your trigger</button>
* <div className={base()}>
* // popover content
* <span className={arrow()} data-placement="top/bottom/left/right..." /> // arrow
@ -32,6 +32,7 @@ const popover = tv({
"text-base",
"!outline-none",
],
trigger: [],
arrow: [
"-z-10",
"absolute",
@ -78,9 +79,9 @@ const popover = tv({
arrow: "border-2 border-inherit !bg-background",
},
light: {base: "!bg-transparent", arrow: "hidden"},
faded: {base: "border-1.5", arrow: "border-1.5 border-inherit"},
faded: {base: "border", arrow: "border border-inherit"},
flat: {base: ""},
shadow: {base: ""},
shadow: {base: "border border-neutral-100", arrow: "border border-neutral-100"},
},
color: {
neutral: {base: colorVariants.solid.neutral},
@ -108,11 +109,19 @@ const popover = tv({
disableAnimation: {
true: {base: "animate-none"},
},
isTriggerForeground: {
true: {},
false: {
trigger: ["aria-expanded:scale-95", "aria-expanded:opacity-70", "subpixel-antialiased"],
},
},
},
defaultVariants: {
variant: "solid",
color: "neutral",
radius: "lg",
radius: "xl",
disableAnimation: false,
isTriggerForeground: false,
},
compoundVariants: [
// shadow / color

View File

@ -1,5 +1,17 @@
# @nextui-org/use-aria-accordion-item
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-aria-accordion-item",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Internal impl for react aria accordion item",
"keywords": [
"use-aria-accordion-item"

View File

@ -1,5 +1,23 @@
# @nextui-org/use-aria-field
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/use-aria-slot-id@0.0.0-dev-v2-20230407155017
- @nextui-org/use-aria-label@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/use-aria-slot-id@0.0.0-dev-v2-20230407131834
- @nextui-org/use-aria-label@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-aria-field",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Based on react-aria useField hook, provides the accessibility implementation for input fields",
"keywords": [
"use-aria-field"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-aria-label
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-aria-label",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Based on react-aria label hook, it provides the accessibility implementation for labels and their associated elements. Labels provide context for user inputs.",
"keywords": [
"use-aria-label"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-aria-slot-id
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-aria-slot-id",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Based on react-aria useSlotId, used to generate an id, and after render check if that id is rendered",
"keywords": [
"use-aria-slot-id"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-clipboard
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-clipboard",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Wrapper around navigator.clipboard with feedback timeout",
"keywords": [
"use-clipboard"

View File

@ -1,5 +1,21 @@
# @nextui-org/use-image
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/use-safe-layout-effect@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/use-safe-layout-effect@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-image",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "React hook for progressing image loading",
"keywords": [
"use-image"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-is-mounted
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-is-mounted",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "This hook can be used to render client-based components or run client logic",
"keywords": [
"use-is-mounted"

View File

@ -1,5 +1,21 @@
# @nextui-org/use-pagination
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-pagination",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "State management hook for Pagination component, it lets you manage pagination with controlled and uncontrolled state",
"keywords": [
"use-pagination"

View File

@ -1,5 +1,21 @@
# @nextui-org/use-real-shape
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/dom-utils@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-real-shape",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Hook that returns the real dimensions of an element",
"keywords": [
"use-real-shape"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-ref-state
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-ref-state",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Hook for saving the state in a ref value",
"keywords": [
"use-ref-state"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-resize
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-resize",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Hook that adds an event listener to the resize window event",
"keywords": [
"use-resize"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-safe-layout-effect
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-safe-layout-effect",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "",
"keywords": [
"use-safe-layout-effect"

View File

@ -1,5 +1,17 @@
# @nextui-org/use-ssr
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-ssr",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "",
"keywords": [
"use-ssr"

View File

@ -1,5 +1,21 @@
# @nextui-org/aria-utils
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/system@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/system@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/aria-utils",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A package for managing @react-aria nextui utils.",
"keywords": [
"aria-utils"

View File

@ -1,5 +1,17 @@
# @nextui-org/dom-utils
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/dom-utils",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "NextUI DOM Utilities",
"keywords": [
"dom-utils"

View File

@ -1,5 +1,23 @@
# @nextui-org/framer-transitions
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/framer-transitions",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A set of framer motion transitions for react",
"keywords": [
"framer-transitions"

View File

@ -1,5 +1,23 @@
# @nextui-org/react-utils
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407155017
- @nextui-org/system@0.0.0-dev-v2-20230407155017
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230407131834
- @nextui-org/system@0.0.0-dev-v2-20230407131834
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/react-utils",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A package for sharing react components and utilities",
"keywords": [
"react-utils"

View File

@ -1,5 +1,17 @@
# @nextui-org/shared-icons
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/shared-icons",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "Internal icons set, commonly used in the components stories",
"keywords": [
"icons-utils"

View File

@ -1,5 +1,17 @@
# @nextui-org/shared-utils
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/shared-utils",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A set of NextUI utilities",
"keywords": [
"system"

View File

@ -1,5 +1,17 @@
# @nextui-org/test-utils
## 0.0.0-dev-v2-20230407155017
### Patch Changes
- Popover a11y improved, titleProps passed by render props, form auto focus added
## 0.0.0-dev-v2-20230407131834
### Patch Changes
- Popover trigger scale down when is open
## 0.0.0-dev-v2-20230407125356
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/test-utils",
"version": "0.0.0-dev-v2-20230407125356",
"version": "0.0.0-dev-v2-20230407155017",
"description": "A set of utilities for react testing",
"keywords": [
"test-utils"

51
pnpm-lock.yaml generated
View File

@ -985,6 +985,9 @@ importers:
specifier: ^10.11.2
version: 10.11.2(react-dom@18.2.0)(react@18.2.0)
devDependencies:
'@nextui-org/input':
specifier: workspace:*
version: link:../input
'@react-types/button':
specifier: ^3.7.2
version: 3.7.2(react@18.2.0)
@ -4485,7 +4488,7 @@ packages:
chalk: 4.1.2
convert-source-map: 1.9.0
fast-json-stable-stringify: 2.1.0
graceful-fs: 4.2.6
graceful-fs: 4.2.11
jest-haste-map: 26.6.2
jest-regex-util: 26.0.0
jest-util: 26.6.2
@ -10447,7 +10450,7 @@ packages:
chownr: 1.1.4
figgy-pudding: 3.5.2
glob: 7.2.3
graceful-fs: 4.2.6
graceful-fs: 4.2.11
infer-owner: 1.0.4
lru-cache: 5.1.1
mississippi: 3.0.0
@ -11357,7 +11360,7 @@ packages:
resolution: {integrity: sha512-0Cbj7gyvFVApzpK/uhCtQ/9kE9UnYpxMzaq5nQQC/Dh4iaj5fxp7iEFIullrYwzj8nf0qnsI1Qsx34hAeAebvw==}
engines: {node: '>=8'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
make-dir: 3.1.0
nested-error-stacks: 2.1.1
p-event: 4.2.0
@ -11877,7 +11880,7 @@ packages:
engines: {node: '>=10'}
dependencies:
globby: 11.1.0
graceful-fs: 4.2.6
graceful-fs: 4.2.11
is-glob: 4.0.3
is-path-cwd: 2.2.0
is-path-inside: 3.0.3
@ -12229,7 +12232,7 @@ packages:
resolution: {integrity: sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==}
engines: {node: '>=6.9.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
memory-fs: 0.4.1
tapable: 1.1.3
dev: true
@ -12238,7 +12241,7 @@ packages:
resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==}
engines: {node: '>=6.9.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
memory-fs: 0.5.0
tapable: 1.1.3
dev: true
@ -12247,7 +12250,7 @@ packages:
resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==}
engines: {node: '>=10.13.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
tapable: 2.2.1
dev: true
@ -14105,7 +14108,7 @@ packages:
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
engines: {node: '>=12'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.0
dev: true
@ -14114,7 +14117,7 @@ packages:
resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==}
engines: {node: '>=14.14'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.0
dev: true
@ -14142,7 +14145,7 @@ packages:
engines: {node: '>=10'}
dependencies:
at-least-node: 1.0.0
graceful-fs: 4.2.6
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.0
dev: true
@ -14165,7 +14168,7 @@ packages:
/fs-write-stream-atomic@1.0.10:
resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
iferr: 0.1.5
imurmurhash: 0.1.4
readable-stream: 2.3.8
@ -15973,7 +15976,7 @@ packages:
'@types/node': 15.12.4
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.6
graceful-fs: 4.2.11
jest-regex-util: 26.0.0
jest-serializer: 26.6.2
jest-util: 26.6.2
@ -16176,7 +16179,7 @@ packages:
engines: {node: '>= 10.14.2'}
dependencies:
'@types/node': 15.12.4
graceful-fs: 4.2.6
graceful-fs: 4.2.11
dev: true
/jest-snapshot@28.1.3:
@ -16217,7 +16220,7 @@ packages:
'@jest/types': 26.6.2
'@types/node': 15.12.4
chalk: 4.1.2
graceful-fs: 4.2.6
graceful-fs: 4.2.11
is-ci: 2.0.0
micromatch: 4.0.5
dev: true
@ -16458,7 +16461,7 @@ packages:
/jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
optionalDependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
dev: true
/jsonfile@6.1.0:
@ -16466,7 +16469,7 @@ packages:
dependencies:
universalify: 2.0.0
optionalDependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
dev: true
/jsonparse@1.3.1:
@ -16696,7 +16699,7 @@ packages:
resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
parse-json: 2.2.0
pify: 2.3.0
pinkie-promise: 2.0.1
@ -16708,7 +16711,7 @@ packages:
resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==}
engines: {node: '>=4'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
parse-json: 4.0.0
pify: 3.0.0
strip-bom: 3.0.0
@ -16723,7 +16726,7 @@ packages:
resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==}
engines: {node: '>=6'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
js-yaml: 3.14.1
pify: 4.0.1
strip-bom: 3.0.0
@ -18573,7 +18576,7 @@ packages:
resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==}
engines: {node: '>=0.10.0'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
pify: 2.3.0
pinkie-promise: 2.0.1
dev: true
@ -19993,7 +19996,7 @@ packages:
resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==}
engines: {node: '>=6'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
js-yaml: 3.14.1
pify: 4.0.1
strip-bom: 3.0.0
@ -20024,7 +20027,7 @@ packages:
resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==}
engines: {node: '>=0.10'}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
micromatch: 3.1.10(supports-color@6.1.0)
readable-stream: 2.3.8
transitivePeerDependencies:
@ -22851,7 +22854,7 @@ packages:
/watchpack@1.7.5:
resolution: {integrity: sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==}
dependencies:
graceful-fs: 4.2.6
graceful-fs: 4.2.11
neo-async: 2.6.2
optionalDependencies:
chokidar: 3.5.3
@ -22865,7 +22868,7 @@ packages:
engines: {node: '>=10.13.0'}
dependencies:
glob-to-regexp: 0.4.1
graceful-fs: 4.2.6
graceful-fs: 4.2.11
dev: true
/wcwidth@1.0.1: