feat(root): react aria id generation replaced by React 18 useId hook

This commit is contained in:
Junior Garcia 2023-03-28 15:30:32 -03:00
parent 6e0bd77b70
commit 0205998b6b
80 changed files with 416 additions and 79 deletions

View File

@ -1,5 +1,19 @@
# @nextui-org/accordion
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230328182900
- @nextui-org/shared-icons@0.0.0-dev-v2-20230328182900
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/aria-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230327000832
### Patch Changes

View File

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

View File

@ -1,5 +1,17 @@
# @nextui-org/avatar
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/use-image@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/avatar",
"version": "0.0.0-dev-v2-20230326233509",
"version": "0.0.0-dev-v2-20230328182900",
"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,16 @@
# @nextui-org/badge
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,18 @@
# @nextui-org/button
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/spinner@0.0.0-dev-v2-20230328182900
- @nextui-org/drip@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,17 @@
# @nextui-org/card
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/drip@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/checkbox
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/checkbox",
"version": "0.0.0-dev-v2-20230326233509",
"version": "0.0.0-dev-v2-20230328182900",
"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,17 @@
# @nextui-org/chip
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230328182900
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230327000832
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/code
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/drip
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/link
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/link",
"version": "0.0.0-dev-v2-20230326233509",
"version": "0.0.0-dev-v2-20230328182900",
"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"

View File

@ -1,5 +1,18 @@
# @nextui-org/pagination
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-icons@0.0.0-dev-v2-20230328182900
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/use-pagination@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230327000832
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/radio
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,18 @@
# @nextui-org/snippet
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/use-clipboard@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/tooltip@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/spinner
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,16 @@
# @nextui-org/switch
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -159,6 +159,7 @@ DisableAnimation.args = {
export const WithThumbIcon = Template.bind({});
WithThumbIcon.args = {
...defaultProps,
size: "xl",
thumbIcon: (props: SwitchThumbIconProps) =>
props.isSelected ? (
<SunFilledIcon className={props.className} />
@ -170,6 +171,7 @@ WithThumbIcon.args = {
export const WithIcons = WithIconsTemplate.bind({});
WithIcons.args = {
...defaultProps,
size: "xl",
};
export const Controlled = ControlledTemplate.bind({});

View File

@ -1,5 +1,19 @@
# @nextui-org/tooltip
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/framer-transitions@0.0.0-dev-v2-20230328182900
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/react-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/aria-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -4,7 +4,7 @@ import type {OverlayTriggerProps} from "@react-types/overlays";
import type {HTMLMotionProps} from "framer-motion";
import type {TooltipPlacement} from "./types";
import {ReactNode, Ref, useEffect, useImperativeHandle} from "react";
import {ReactNode, Ref, useEffect, useId, useImperativeHandle} from "react";
import {useTooltipTriggerState} from "@react-stately/tooltip";
import {mergeProps} from "@react-aria/utils";
import {useTooltip as useReactAriaTooltip, useTooltipTrigger} from "@react-aria/tooltip";
@ -151,6 +151,8 @@ export function useTooltip(originalProps: UseTooltipProps) {
const triggerRef = useRef<HTMLElement>(null);
const overlayRef = useRef<HTMLDivElement>(null);
const tooltipId = useId();
const immediate = closeDelay === 0;
const isOpen = state.isOpen && !isDisabled;
@ -232,10 +234,11 @@ export function useTooltip(originalProps: UseTooltipProps) {
(props = {}, _ref: Ref<any> | null | undefined = null) => ({
...mergeProps(triggerProps, props),
ref: mergeRefs(_ref, triggerRef),
"aria-describedby": isOpen ? tooltipId : undefined,
onPointerEnter: () => state.open(),
onPointerLeave: () => isDismissable && state.close(),
}),
[isDismissable, triggerRef, triggerProps],
[triggerProps, isOpen, tooltipId, isDismissable, state],
);
const getTooltipProps = useCallback<PropGetter>(
@ -243,8 +246,18 @@ export function useTooltip(originalProps: UseTooltipProps) {
ref: overlayRef,
className: slots.base({class: baseStyles}),
...mergeProps(tooltipProps, positionProps, overlayProps, otherProps),
id: tooltipId,
}),
[overlayRef, slots, styles, tooltipProps, positionProps, overlayProps, otherProps],
[
baseStyles,
overlayProps,
otherProps,
overlayRef,
positionProps,
slots,
tooltipId,
tooltipProps,
],
);
const getArrowProps = useCallback<PropGetter>(

View File

@ -1,5 +1,17 @@
# @nextui-org/user
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/avatar@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326233509
### Patch Changes

View File

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

View File

@ -1,5 +1,31 @@
# @nextui-org/react
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/pagination@0.0.0-dev-v2-20230328182900
- @nextui-org/accordion@0.0.0-dev-v2-20230328182900
- @nextui-org/checkbox@0.0.0-dev-v2-20230328182900
- @nextui-org/snippet@0.0.0-dev-v2-20230328182900
- @nextui-org/spinner@0.0.0-dev-v2-20230328182900
- @nextui-org/tooltip@0.0.0-dev-v2-20230328182900
- @nextui-org/avatar@0.0.0-dev-v2-20230328182900
- @nextui-org/button@0.0.0-dev-v2-20230328182900
- @nextui-org/switch@0.0.0-dev-v2-20230328182900
- @nextui-org/badge@0.0.0-dev-v2-20230328182900
- @nextui-org/radio@0.0.0-dev-v2-20230328182900
- @nextui-org/card@0.0.0-dev-v2-20230328182900
- @nextui-org/chip@0.0.0-dev-v2-20230328182900
- @nextui-org/code@0.0.0-dev-v2-20230328182900
- @nextui-org/drip@0.0.0-dev-v2-20230328182900
- @nextui-org/link@0.0.0-dev-v2-20230328182900
- @nextui-org/user@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
- @nextui-org/theme@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230327000832
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/system
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/system",
"version": "0.0.0-dev-v2-20230326202948",
"version": "0.0.0-dev-v2-20230328182900",
"description": "NextUI system primitives",
"keywords": [
"system"
@ -33,9 +33,6 @@
"prepack": "clean-package",
"postpack": "clean-package restore"
},
"dependencies": {
"@react-aria/ssr": "^3.5.0"
},
"peerDependencies": {
"react": ">=18"
},

View File

@ -1,3 +1,2 @@
export * from "./theme-provider";
export * from "./types";
export * from "./utils";

View File

@ -1,10 +0,0 @@
import React, {ReactNode} from "react";
import {SSRProvider} from "@react-aria/ssr";
export interface NextUIProviderProps {
children?: ReactNode;
}
export const NextUIProvider: React.FC<NextUIProviderProps> = ({children}) => {
return <SSRProvider>{children}</SSRProvider>;
};

View File

@ -1,5 +1,11 @@
# @nextui-org/theme
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -140,12 +140,8 @@ const toggle = tv({
thumb: "transition-none",
},
false: {
wrapper: "transition-background",
thumb: [
"transition",
"group-active:translate-x-1",
"data-[checked=true]:group-active:translate-x-[90%]",
],
wrapper: "transition-background !duration-500",
thumb: "transition-transform !ease-soft-spring !duration-500",
leftIcon: [
"opacity-0",
"scale-50",
@ -164,7 +160,7 @@ const toggle = tv({
},
defaultVariants: {
color: "primary",
size: "md",
size: "lg",
isDisabled: false,
disableAnimation: false,
},

View File

@ -202,6 +202,9 @@ const corePlugin = (config: ConfigObject | ConfigFunction = {}, defaultTheme: De
0: "0ms",
250: "250ms",
},
transitionTimingFunction: {
"soft-spring": "cubic-bezier(0.155, 1.105, 0.295, 1.12)",
},
...animations,
},
},

View File

@ -1,5 +1,11 @@
# @nextui-org/use-clipboard
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,13 @@
# @nextui-org/use-image
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/use-safe-layout-effect@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/use-is-mounted
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,13 @@
# @nextui-org/use-pagination
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/use-pagination",
"version": "0.0.0-dev-v2-20230326202948",
"version": "0.0.0-dev-v2-20230328182900",
"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,13 @@
# @nextui-org/use-real-shape
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/dom-utils@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/use-ref-state
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/use-resize
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/use-safe-layout-effect
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/use-ssr
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -134,7 +134,7 @@ import {link, button} from "@nextui-org/theme";
<br/>
<div class="block text-xs text-neutral-400">
Last updated on <time datetime="2023-03-07">March 26, 2023</time>
Last updated on <time datetime="2023-03-07">March 27, 2023</time>
</div>

View File

@ -1,5 +1,13 @@
# @nextui-org/aria-utils
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/system@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/dom-utils
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,14 @@
# @nextui-org/framer-transitions
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -39,14 +39,10 @@ export interface CollapseTransitionOptions {
const defaultTransitions = {
exit: {
height: {
duration: 0.2,
ease: TRANSITION_EASINGS.ease,
},
opacity: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease,
},
y: {
opacity: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease,
},
@ -57,27 +53,21 @@ const defaultTransitions = {
ease: TRANSITION_EASINGS.softSpring,
},
opacity: {
duration: 0.8,
ease: TRANSITION_EASINGS.ease,
},
y: {
duration: 0.6,
duration: 0.5,
ease: TRANSITION_EASINGS.ease,
},
},
};
const variants: Variants<CollapseTransitionOptions> = {
enter: ({animateOpacity, endingHeight, endingY, transition, transitionEnd, delay}) => ({
enter: ({animateOpacity, endingHeight, transition, transitionEnd, delay}) => ({
...(animateOpacity && {opacity: 1}),
y: endingY,
height: endingHeight,
transitionEnd: transitionEnd?.enter,
transition: transition?.enter ?? withDelay.enter(defaultTransitions.enter, delay),
}),
exit: ({animateOpacity, startingHeight, transition, startingY, transitionEnd, delay}) => ({
exit: ({animateOpacity, startingHeight, transition, transitionEnd, delay}) => ({
...(animateOpacity && {opacity: isNumeric(startingHeight) ? 1 : 0}),
y: startingY,
height: startingHeight,
transitionEnd: transitionEnd?.exit,
transition: transition?.exit ?? withDelay.exit(defaultTransitions.exit, delay),
@ -98,8 +88,6 @@ export const CollapseTransition = forwardRef<HTMLDivElement, CollapseTransitionP
animateOpacity = true,
startingHeight = 0,
endingHeight = "auto",
startingY = 10,
endingY = 0,
style,
className,
transition,
@ -136,8 +124,6 @@ export const CollapseTransition = forwardRef<HTMLDivElement, CollapseTransitionP
const custom = {
startingHeight,
endingHeight,
startingY,
endingY,
animateOpacity,
transition: !mounted ? {enter: {duration: 0}} : transition,
transitionEnd: {

View File

@ -1,5 +1,14 @@
# @nextui-org/react-utils
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
- Updated dependencies
- @nextui-org/shared-utils@0.0.0-dev-v2-20230328182900
- @nextui-org/system@0.0.0-dev-v2-20230328182900
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/shared-icons
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230327000832
### Patch Changes

View File

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

View File

@ -1,5 +1,11 @@
# @nextui-org/shared-utils
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

@ -1,6 +1,6 @@
{
"name": "@nextui-org/shared-utils",
"version": "0.0.0-dev-v2-20230326202948",
"version": "0.0.0-dev-v2-20230328182900",
"description": "NextUI system primitives",
"keywords": [
"system"

View File

@ -1,5 +1,11 @@
# @nextui-org/test-utils
## 0.0.0-dev-v2-20230328182900
### Patch Changes
- React aria id generation replaced by React 18 useId hook, transitions improved
## 0.0.0-dev-v2-20230326202948
### Patch Changes

View File

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