From ed66bef2e7133f1ac0a410dad964950a27283ec1 Mon Sep 17 00:00:00 2001 From: Bobby <8290615@qq.com> Date: Thu, 22 Feb 2024 15:37:45 +0800 Subject: [PATCH] fix: remove all use client --- .changeset/big-zebras-boil.md | 6 ++++++ packages/react/src/avatar/avatar-group.tsx | 2 -- packages/react/src/avatar/avatar.tsx | 2 -- packages/react/src/avatar/index.ts | 2 -- packages/react/src/button/button.tsx | 2 -- packages/react/src/button/close-button.tsx | 2 -- packages/react/src/button/icon-button.tsx | 2 -- packages/react/src/button/index.ts | 2 -- packages/react/src/card/card.tsx | 2 -- packages/react/src/card/index.ts | 2 -- packages/react/src/checkbox/checkbox-group.tsx | 2 -- packages/react/src/checkbox/checkbox.tsx | 2 -- packages/react/src/checkbox/index.tsx | 2 -- packages/react/src/chip/chip.tsx | 2 -- packages/react/src/chip/index.ts | 2 -- packages/react/src/divider/divider.tsx | 2 -- packages/react/src/divider/index.ts | 2 -- packages/react/src/drawer/drawer.tsx | 2 -- packages/react/src/drawer/index.ts | 2 -- packages/react/src/image/base-image.tsx | 2 -- packages/react/src/image/image.tsx | 2 -- packages/react/src/image/index.ts | 2 -- packages/react/src/input/index.ts | 2 -- packages/react/src/input/input.tsx | 2 -- packages/react/src/input/textarea.tsx | 2 -- packages/react/src/input/use-input.ts | 2 -- packages/react/src/link/index.ts | 2 -- packages/react/src/link/link.tsx | 2 -- packages/react/src/listbox/index.ts | 2 -- packages/react/src/listbox/listbox-item.tsx | 2 -- packages/react/src/listbox/listbox-section.tsx | 2 -- packages/react/src/listbox/listbox.tsx | 2 -- packages/react/src/menu/index.ts | 2 -- packages/react/src/menu/menu-item.tsx | 2 -- packages/react/src/menu/menu-section.tsx | 2 -- packages/react/src/menu/menu.tsx | 2 -- packages/react/src/modal/index.ts | 2 -- packages/react/src/modal/modal-body.tsx | 2 -- packages/react/src/modal/modal-close-button.tsx | 2 -- packages/react/src/modal/modal-content.tsx | 2 -- packages/react/src/modal/modal-footer.tsx | 2 -- packages/react/src/modal/modal-header.tsx | 2 -- packages/react/src/modal/modal.tsx | 2 -- packages/react/src/modal/use-disclosure.ts | 2 -- packages/react/src/number-input/index.ts | 2 -- packages/react/src/number-input/number-input.tsx | 2 -- packages/react/src/overlay-arrow/index.ts | 2 -- packages/react/src/overlay-arrow/overlay-arrow.tsx | 2 -- packages/react/src/popover/base-popover.tsx | 2 -- packages/react/src/popover/index.ts | 2 -- packages/react/src/popover/popover.tsx | 2 -- packages/react/src/popover/use-popover.ts | 1 - packages/react/src/provider/index.tsx | 2 -- packages/react/src/radio/index.ts | 2 -- packages/react/src/radio/radio-group.tsx | 2 -- packages/react/src/radio/radio.tsx | 2 -- packages/react/src/ripple/index.ts | 2 -- packages/react/src/ripple/ripple.tsx | 2 -- packages/react/src/ripple/use-ripple.ts | 2 -- packages/react/src/select/index.ts | 2 -- packages/react/src/select/select.tsx | 2 -- packages/react/src/switch/index.ts | 2 -- packages/react/src/switch/switch.tsx | 2 -- packages/react/src/tabs/index.ts | 2 -- packages/react/src/tabs/tabs.tsx | 2 -- packages/react/src/text-field/index.ts | 2 -- packages/react/src/text-field/text-field.tsx | 2 -- packages/react/src/tooltip/index.ts | 2 -- packages/react/src/tooltip/tooltip.tsx | 2 -- packages/theme/src/components/input.ts | 2 +- 70 files changed, 7 insertions(+), 136 deletions(-) create mode 100644 .changeset/big-zebras-boil.md diff --git a/.changeset/big-zebras-boil.md b/.changeset/big-zebras-boil.md new file mode 100644 index 0000000..6ff8432 --- /dev/null +++ b/.changeset/big-zebras-boil.md @@ -0,0 +1,6 @@ +--- +"@alice-ui/react": patch +"@alice-ui/theme": patch +--- + +Rmove all use client diff --git a/packages/react/src/avatar/avatar-group.tsx b/packages/react/src/avatar/avatar-group.tsx index 51b6bd8..5454a3b 100644 --- a/packages/react/src/avatar/avatar-group.tsx +++ b/packages/react/src/avatar/avatar-group.tsx @@ -1,5 +1,3 @@ -'use client'; - import { getValidChildren } from '@alice-ui/react-utils'; import { clsx, compact } from '@alice-ui/shared-utils'; import { avatarGroup } from '@alice-ui/theme'; diff --git a/packages/react/src/avatar/avatar.tsx b/packages/react/src/avatar/avatar.tsx index fb834a9..3f80b9d 100644 --- a/packages/react/src/avatar/avatar.tsx +++ b/packages/react/src/avatar/avatar.tsx @@ -1,5 +1,3 @@ -'use client'; - import { useImage } from '@alice-ui/hooks'; import { clsx, dataAttr } from '@alice-ui/shared-utils'; import { AvatarSlots, AvatarVariantProps, SlotsToClasses, avatar } from '@alice-ui/theme'; diff --git a/packages/react/src/avatar/index.ts b/packages/react/src/avatar/index.ts index bc2dd6a..833028f 100644 --- a/packages/react/src/avatar/index.ts +++ b/packages/react/src/avatar/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Avatar } from './avatar'; import { AvatarGroup } from './avatar-group'; diff --git a/packages/react/src/button/button.tsx b/packages/react/src/button/button.tsx index 3782a49..361b079 100644 --- a/packages/react/src/button/button.tsx +++ b/packages/react/src/button/button.tsx @@ -1,5 +1,3 @@ -'use client'; - import type { ButtonVariantProps } from '@alice-ui/theme'; import { button } from '@alice-ui/theme'; import { diff --git a/packages/react/src/button/close-button.tsx b/packages/react/src/button/close-button.tsx index 7cec175..eb50186 100644 --- a/packages/react/src/button/close-button.tsx +++ b/packages/react/src/button/close-button.tsx @@ -1,5 +1,3 @@ -'use client'; - import { XMarkIcon } from '@alice-ui/icons'; import { ForwardedRef, forwardRef } from 'react'; import { IconButton, IconButtonProps } from './icon-button'; diff --git a/packages/react/src/button/icon-button.tsx b/packages/react/src/button/icon-button.tsx index 0e448bf..ddbdd7e 100644 --- a/packages/react/src/button/icon-button.tsx +++ b/packages/react/src/button/icon-button.tsx @@ -1,5 +1,3 @@ -'use client'; - import type { ButtonVariantProps } from '@alice-ui/theme'; import { button } from '@alice-ui/theme'; import { ForwardedRef, cloneElement, forwardRef, isValidElement, useMemo } from 'react'; diff --git a/packages/react/src/button/index.ts b/packages/react/src/button/index.ts index eed845d..c698d77 100644 --- a/packages/react/src/button/index.ts +++ b/packages/react/src/button/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Button } from './button'; import { CloseButton } from './close-button'; import { IconButton } from './icon-button'; diff --git a/packages/react/src/card/card.tsx b/packages/react/src/card/card.tsx index bce5cb6..16a6564 100644 --- a/packages/react/src/card/card.tsx +++ b/packages/react/src/card/card.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx, dataAttr } from '@alice-ui/shared-utils'; import { CardReturnType, diff --git a/packages/react/src/card/index.ts b/packages/react/src/card/index.ts index 33ddde4..b292f35 100644 --- a/packages/react/src/card/index.ts +++ b/packages/react/src/card/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Card } from './card'; import { CardBody } from './card-body'; import { CardFooter } from './card-footer'; diff --git a/packages/react/src/checkbox/checkbox-group.tsx b/packages/react/src/checkbox/checkbox-group.tsx index e901b30..d10669e 100644 --- a/packages/react/src/checkbox/checkbox-group.tsx +++ b/packages/react/src/checkbox/checkbox-group.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { CheckboxGroupSlots, CheckboxVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { checkboxGroup } from '@alice-ui/theme'; diff --git a/packages/react/src/checkbox/checkbox.tsx b/packages/react/src/checkbox/checkbox.tsx index a11f779..bf5285f 100644 --- a/packages/react/src/checkbox/checkbox.tsx +++ b/packages/react/src/checkbox/checkbox.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { CheckboxSlots, CheckboxVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { checkbox } from '@alice-ui/theme'; diff --git a/packages/react/src/checkbox/index.tsx b/packages/react/src/checkbox/index.tsx index d4bfa7c..e5db4bd 100644 --- a/packages/react/src/checkbox/index.tsx +++ b/packages/react/src/checkbox/index.tsx @@ -1,5 +1,3 @@ -'use client'; - import { Checkbox } from './checkbox'; import { CheckboxGroup } from './checkbox-group'; import { CheckboxIcon } from './checkbox-icon'; diff --git a/packages/react/src/chip/chip.tsx b/packages/react/src/chip/chip.tsx index 8ecc03d..5d6b808 100644 --- a/packages/react/src/chip/chip.tsx +++ b/packages/react/src/chip/chip.tsx @@ -1,5 +1,3 @@ -'use client'; - import { XCircleFilledIcon } from '@alice-ui/icons'; import { clsx } from '@alice-ui/shared-utils'; import type { ChipSlots, ChipVariantProps, SlotsToClasses } from '@alice-ui/theme'; diff --git a/packages/react/src/chip/index.ts b/packages/react/src/chip/index.ts index 211ce3f..56aafbc 100644 --- a/packages/react/src/chip/index.ts +++ b/packages/react/src/chip/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Chip } from './chip'; // export types diff --git a/packages/react/src/divider/divider.tsx b/packages/react/src/divider/divider.tsx index be9718b..73d2d8a 100644 --- a/packages/react/src/divider/divider.tsx +++ b/packages/react/src/divider/divider.tsx @@ -1,5 +1,3 @@ -'use client'; - import { divider } from '@alice-ui/theme'; import { useMemo } from 'react'; import { Separator, SeparatorProps } from 'react-aria-components'; diff --git a/packages/react/src/divider/index.ts b/packages/react/src/divider/index.ts index 10d577c..3fb0c0c 100644 --- a/packages/react/src/divider/index.ts +++ b/packages/react/src/divider/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Divider } from './divider'; // export types diff --git a/packages/react/src/drawer/drawer.tsx b/packages/react/src/drawer/drawer.tsx index f007e54..c982cc5 100644 --- a/packages/react/src/drawer/drawer.tsx +++ b/packages/react/src/drawer/drawer.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { DrawerSlots, DrawerVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { drawer } from '@alice-ui/theme'; diff --git a/packages/react/src/drawer/index.ts b/packages/react/src/drawer/index.ts index 76a6ac5..19eb742 100644 --- a/packages/react/src/drawer/index.ts +++ b/packages/react/src/drawer/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { ModalBody } from '../modal/modal-body'; import { ModalCloseButton } from '../modal/modal-close-button'; import { ModalContent } from '../modal/modal-content'; diff --git a/packages/react/src/image/base-image.tsx b/packages/react/src/image/base-image.tsx index 54dee9e..316ae3c 100644 --- a/packages/react/src/image/base-image.tsx +++ b/packages/react/src/image/base-image.tsx @@ -1,5 +1,3 @@ -'use client'; - import { FallbackStrategy, shouldShowFallbackImage, useImage } from '@alice-ui/hooks'; import { dataAttr } from '@alice-ui/shared-utils'; import { ForwardedRef, ImgHTMLAttributes, forwardRef } from 'react'; diff --git a/packages/react/src/image/image.tsx b/packages/react/src/image/image.tsx index 4854e28..00e73e1 100644 --- a/packages/react/src/image/image.tsx +++ b/packages/react/src/image/image.tsx @@ -1,5 +1,3 @@ -'use client'; - import { useImage as useImageBase } from '@alice-ui/hooks'; import { clsx, dataAttr } from '@alice-ui/shared-utils'; import type { ImageSlots, ImageVariantProps, SlotsToClasses } from '@alice-ui/theme'; diff --git a/packages/react/src/image/index.ts b/packages/react/src/image/index.ts index ee4bb88..3695cc4 100644 --- a/packages/react/src/image/index.ts +++ b/packages/react/src/image/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { BaseImage } from './base-image'; import { Image } from './image'; diff --git a/packages/react/src/input/index.ts b/packages/react/src/input/index.ts index 65c5912..f782753 100644 --- a/packages/react/src/input/index.ts +++ b/packages/react/src/input/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Input } from './input'; import { TextArea } from './textarea'; diff --git a/packages/react/src/input/input.tsx b/packages/react/src/input/input.tsx index c2c837d..b59b36a 100644 --- a/packages/react/src/input/input.tsx +++ b/packages/react/src/input/input.tsx @@ -1,5 +1,3 @@ -'use client'; - import { XCircleFilledIcon } from '@alice-ui/icons'; import { clsx } from '@alice-ui/shared-utils'; import type { InputSlots, InputVariantProps, SlotsToClasses } from '@alice-ui/theme'; diff --git a/packages/react/src/input/textarea.tsx b/packages/react/src/input/textarea.tsx index 39b7521..3ad4576 100644 --- a/packages/react/src/input/textarea.tsx +++ b/packages/react/src/input/textarea.tsx @@ -1,5 +1,3 @@ -'use client'; - import { XCircleFilledIcon } from '@alice-ui/icons'; import { clsx } from '@alice-ui/shared-utils'; import type { InputSlots, InputVariantProps, SlotsToClasses } from '@alice-ui/theme'; diff --git a/packages/react/src/input/use-input.ts b/packages/react/src/input/use-input.ts index 32847ee..e761ec5 100644 --- a/packages/react/src/input/use-input.ts +++ b/packages/react/src/input/use-input.ts @@ -1,5 +1,3 @@ -'use client'; - import { dataAttr } from '@alice-ui/shared-utils'; import { InputHTMLAttributes, Ref, TextareaHTMLAttributes, useCallback } from 'react'; import { mergeProps, useFocusRing, useHover, usePress } from 'react-aria'; diff --git a/packages/react/src/link/index.ts b/packages/react/src/link/index.ts index 4f6ccec..2943c0b 100644 --- a/packages/react/src/link/index.ts +++ b/packages/react/src/link/index.ts @@ -1,5 +1,3 @@ -'use client'; - // export types export type { LinkRenderProps } from 'react-aria-components'; export type { LinkProps } from './link'; diff --git a/packages/react/src/link/link.tsx b/packages/react/src/link/link.tsx index 525856d..16d3918 100644 --- a/packages/react/src/link/link.tsx +++ b/packages/react/src/link/link.tsx @@ -1,5 +1,3 @@ -'use client'; - import type { LinkVariantProps } from '@alice-ui/theme'; import { link } from '@alice-ui/theme'; import { ForwardedRef, forwardRef, useMemo } from 'react'; diff --git a/packages/react/src/listbox/index.ts b/packages/react/src/listbox/index.ts index 2c155bc..45ccecf 100644 --- a/packages/react/src/listbox/index.ts +++ b/packages/react/src/listbox/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { ListBox } from './listbox'; import { ListBoxItem } from './listbox-item'; import { ListBoxSection } from './listbox-section'; diff --git a/packages/react/src/listbox/listbox-item.tsx b/packages/react/src/listbox/listbox-item.tsx index 10ed9a5..122bf0d 100644 --- a/packages/react/src/listbox/listbox-item.tsx +++ b/packages/react/src/listbox/listbox-item.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuItemSlots, MenuItemVariantProps, SlotsToClasses, menuItem } from '@alice-ui/theme'; import { ReactNode, useContext, useMemo } from 'react'; diff --git a/packages/react/src/listbox/listbox-section.tsx b/packages/react/src/listbox/listbox-section.tsx index 9aa5ed3..7eece0c 100644 --- a/packages/react/src/listbox/listbox-section.tsx +++ b/packages/react/src/listbox/listbox-section.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuSectionSlots, SlotsToClasses, menuSection } from '@alice-ui/theme'; import { ReactNode, useMemo } from 'react'; diff --git a/packages/react/src/listbox/listbox.tsx b/packages/react/src/listbox/listbox.tsx index f04faf9..14fbf82 100644 --- a/packages/react/src/listbox/listbox.tsx +++ b/packages/react/src/listbox/listbox.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuSlots, MenuVariantProps, SlotsToClasses, menu } from '@alice-ui/theme'; import { createContext, useMemo } from 'react'; diff --git a/packages/react/src/menu/index.ts b/packages/react/src/menu/index.ts index 23f0ce2..579a857 100644 --- a/packages/react/src/menu/index.ts +++ b/packages/react/src/menu/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Menu } from './menu'; import { MenuItem } from './menu-item'; import { MenuSection } from './menu-section'; diff --git a/packages/react/src/menu/menu-item.tsx b/packages/react/src/menu/menu-item.tsx index 61aaf9c..3c5fb4a 100644 --- a/packages/react/src/menu/menu-item.tsx +++ b/packages/react/src/menu/menu-item.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuItemSlots, MenuItemVariantProps, SlotsToClasses, menuItem } from '@alice-ui/theme'; import { ReactNode, useContext, useMemo } from 'react'; diff --git a/packages/react/src/menu/menu-section.tsx b/packages/react/src/menu/menu-section.tsx index 47cd8c8..0b59a75 100644 --- a/packages/react/src/menu/menu-section.tsx +++ b/packages/react/src/menu/menu-section.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuSectionSlots, SlotsToClasses, menuSection } from '@alice-ui/theme'; import { ReactNode, useMemo } from 'react'; diff --git a/packages/react/src/menu/menu.tsx b/packages/react/src/menu/menu.tsx index ed5a08f..1ed3a50 100644 --- a/packages/react/src/menu/menu.tsx +++ b/packages/react/src/menu/menu.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { MenuSlots, MenuVariantProps, SlotsToClasses, menu } from '@alice-ui/theme'; import { createContext, useMemo } from 'react'; diff --git a/packages/react/src/modal/index.ts b/packages/react/src/modal/index.ts index 6278a36..cc27bb1 100644 --- a/packages/react/src/modal/index.ts +++ b/packages/react/src/modal/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Modal } from './modal'; import { ModalBody } from './modal-body'; import { ModalCloseButton } from './modal-close-button'; diff --git a/packages/react/src/modal/modal-body.tsx b/packages/react/src/modal/modal-body.tsx index 2d12e85..6796ab3 100644 --- a/packages/react/src/modal/modal-body.tsx +++ b/packages/react/src/modal/modal-body.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { ForwardedRef, forwardRef, useContext } from 'react'; diff --git a/packages/react/src/modal/modal-close-button.tsx b/packages/react/src/modal/modal-close-button.tsx index c781782..e30ef15 100644 --- a/packages/react/src/modal/modal-close-button.tsx +++ b/packages/react/src/modal/modal-close-button.tsx @@ -1,5 +1,3 @@ -'use client'; - import { callAllHandlers, clsx } from '@alice-ui/shared-utils'; import { ForwardedRef, forwardRef, useContext } from 'react'; import { CloseButton, CloseButtonProps } from '../button'; diff --git a/packages/react/src/modal/modal-content.tsx b/packages/react/src/modal/modal-content.tsx index 1413e67..5ddb08b 100644 --- a/packages/react/src/modal/modal-content.tsx +++ b/packages/react/src/modal/modal-content.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { useContext } from 'react'; import { Dialog, DialogProps } from 'react-aria-components'; diff --git a/packages/react/src/modal/modal-footer.tsx b/packages/react/src/modal/modal-footer.tsx index 57b795f..097b165 100644 --- a/packages/react/src/modal/modal-footer.tsx +++ b/packages/react/src/modal/modal-footer.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { ForwardedRef, forwardRef, useContext } from 'react'; diff --git a/packages/react/src/modal/modal-header.tsx b/packages/react/src/modal/modal-header.tsx index 3502666..a806ca6 100644 --- a/packages/react/src/modal/modal-header.tsx +++ b/packages/react/src/modal/modal-header.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import { useContext } from 'react'; import { Heading, HeadingProps } from 'react-aria-components'; diff --git a/packages/react/src/modal/modal.tsx b/packages/react/src/modal/modal.tsx index b2fc090..20ca6fc 100644 --- a/packages/react/src/modal/modal.tsx +++ b/packages/react/src/modal/modal.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { DrawerReturnType, diff --git a/packages/react/src/modal/use-disclosure.ts b/packages/react/src/modal/use-disclosure.ts index c1d2013..0784459 100644 --- a/packages/react/src/modal/use-disclosure.ts +++ b/packages/react/src/modal/use-disclosure.ts @@ -1,5 +1,3 @@ -'use client'; - import { useCallbackRef } from '@alice-ui/hooks'; import { chain } from '@react-aria/utils'; import { useControlledState } from '@react-stately/utils'; diff --git a/packages/react/src/number-input/index.ts b/packages/react/src/number-input/index.ts index 8122069..f068728 100644 --- a/packages/react/src/number-input/index.ts +++ b/packages/react/src/number-input/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { NumberInput } from './number-input'; // export types diff --git a/packages/react/src/number-input/number-input.tsx b/packages/react/src/number-input/number-input.tsx index bc80f51..6097979 100644 --- a/packages/react/src/number-input/number-input.tsx +++ b/packages/react/src/number-input/number-input.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { ButtonVariantProps, diff --git a/packages/react/src/overlay-arrow/index.ts b/packages/react/src/overlay-arrow/index.ts index 46d2c91..e64e95e 100644 --- a/packages/react/src/overlay-arrow/index.ts +++ b/packages/react/src/overlay-arrow/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { OverlayArrow } from './overlay-arrow'; // export types diff --git a/packages/react/src/overlay-arrow/overlay-arrow.tsx b/packages/react/src/overlay-arrow/overlay-arrow.tsx index d82e115..a75456a 100644 --- a/packages/react/src/overlay-arrow/overlay-arrow.tsx +++ b/packages/react/src/overlay-arrow/overlay-arrow.tsx @@ -1,8 +1,6 @@ /** * This code comes from react-aria-components */ -'use client'; - import { createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes } from 'react'; import { PlacementAxis } from 'react-aria'; import { ContextValue, useContextProps } from 'react-aria-components'; diff --git a/packages/react/src/popover/base-popover.tsx b/packages/react/src/popover/base-popover.tsx index 780eaa8..067f9bb 100644 --- a/packages/react/src/popover/base-popover.tsx +++ b/packages/react/src/popover/base-popover.tsx @@ -1,8 +1,6 @@ /** * This code comes from react-aria-components/Popover */ -'use client'; - import { filterDOMProps, mergeProps } from '@react-aria/utils'; import { ForwardedRef, RefObject, forwardRef, useContext } from 'react'; import { AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps } from 'react-aria'; diff --git a/packages/react/src/popover/index.ts b/packages/react/src/popover/index.ts index 73e58c0..5d1ccaa 100644 --- a/packages/react/src/popover/index.ts +++ b/packages/react/src/popover/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { BasePopover } from './base-popover'; import { Popover, PopoverTrigger } from './popover'; diff --git a/packages/react/src/popover/popover.tsx b/packages/react/src/popover/popover.tsx index 20d42d8..b5f4c8b 100644 --- a/packages/react/src/popover/popover.tsx +++ b/packages/react/src/popover/popover.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { PopoverSlots, PopoverVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { popover } from '@alice-ui/theme'; diff --git a/packages/react/src/popover/use-popover.ts b/packages/react/src/popover/use-popover.ts index 883e5bc..39c1e60 100644 --- a/packages/react/src/popover/use-popover.ts +++ b/packages/react/src/popover/use-popover.ts @@ -1,4 +1,3 @@ -'use client'; /** * This code comes from @react-aria/overlays */ diff --git a/packages/react/src/provider/index.tsx b/packages/react/src/provider/index.tsx index 72d7d9c..c65cf86 100644 --- a/packages/react/src/provider/index.tsx +++ b/packages/react/src/provider/index.tsx @@ -1,5 +1,3 @@ -'use client'; - import type { ModalProviderProps } from '@react-aria/overlays'; import { I18nProvider, I18nProviderProps, OverlayProvider, RouterProvider } from 'react-aria'; diff --git a/packages/react/src/radio/index.ts b/packages/react/src/radio/index.ts index 10933f3..06157e0 100644 --- a/packages/react/src/radio/index.ts +++ b/packages/react/src/radio/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Radio } from './radio'; import { RadioGroup } from './radio-group'; diff --git a/packages/react/src/radio/radio-group.tsx b/packages/react/src/radio/radio-group.tsx index f4e840f..38261be 100644 --- a/packages/react/src/radio/radio-group.tsx +++ b/packages/react/src/radio/radio-group.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { RadioGroupSlots, SlotsToClasses } from '@alice-ui/theme'; import { RadioVariantProps, radioGroup } from '@alice-ui/theme'; diff --git a/packages/react/src/radio/radio.tsx b/packages/react/src/radio/radio.tsx index 4d84cea..89a08e0 100644 --- a/packages/react/src/radio/radio.tsx +++ b/packages/react/src/radio/radio.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { RadioSlots, RadioVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { radio } from '@alice-ui/theme'; diff --git a/packages/react/src/ripple/index.ts b/packages/react/src/ripple/index.ts index 32858a8..4aa2174 100644 --- a/packages/react/src/ripple/index.ts +++ b/packages/react/src/ripple/index.ts @@ -1,5 +1,3 @@ -'use client'; - import Ripple from './ripple'; // export types diff --git a/packages/react/src/ripple/ripple.tsx b/packages/react/src/ripple/ripple.tsx index 728a610..7a8ae15 100644 --- a/packages/react/src/ripple/ripple.tsx +++ b/packages/react/src/ripple/ripple.tsx @@ -1,5 +1,3 @@ -'use client'; - import { AnimatePresence, HTMLMotionProps, motion } from 'framer-motion'; import { FC } from 'react'; import { useIsSSR } from 'react-aria'; diff --git a/packages/react/src/ripple/use-ripple.ts b/packages/react/src/ripple/use-ripple.ts index ae8891c..0af9945 100644 --- a/packages/react/src/ripple/use-ripple.ts +++ b/packages/react/src/ripple/use-ripple.ts @@ -1,5 +1,3 @@ -'use client'; - import { useCallback, useEffect, useState } from 'react'; export type RippleType = { diff --git a/packages/react/src/select/index.ts b/packages/react/src/select/index.ts index 8cdd3d4..8576764 100644 --- a/packages/react/src/select/index.ts +++ b/packages/react/src/select/index.ts @@ -1,5 +1,3 @@ -'use client'; - import type { ListBoxItemProps, ListBoxSectionProps } from '../listbox'; import { ListBoxItem, ListBoxSection } from '../listbox'; diff --git a/packages/react/src/select/select.tsx b/packages/react/src/select/select.tsx index 6359bee..d3a67e3 100644 --- a/packages/react/src/select/select.tsx +++ b/packages/react/src/select/select.tsx @@ -1,5 +1,3 @@ -'use client'; - import { ChevronDownIcon } from '@alice-ui/icons'; import { clsx } from '@alice-ui/shared-utils'; import { SelectSlots, SelectVariantProps, SlotsToClasses, select } from '@alice-ui/theme'; diff --git a/packages/react/src/switch/index.ts b/packages/react/src/switch/index.ts index b161dde..c511d89 100644 --- a/packages/react/src/switch/index.ts +++ b/packages/react/src/switch/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Switch } from './switch'; // export types diff --git a/packages/react/src/switch/switch.tsx b/packages/react/src/switch/switch.tsx index aa301cb..2aa1f5e 100644 --- a/packages/react/src/switch/switch.tsx +++ b/packages/react/src/switch/switch.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { SlotsToClasses, ToggleSlots, ToggleVariantProps } from '@alice-ui/theme'; import { toggle } from '@alice-ui/theme'; diff --git a/packages/react/src/tabs/index.ts b/packages/react/src/tabs/index.ts index ee2321a..0ccc865 100644 --- a/packages/react/src/tabs/index.ts +++ b/packages/react/src/tabs/index.ts @@ -1,5 +1,3 @@ -'use client'; - // export types export type { TabListProps, TabPanelProps, TabProps } from 'react-aria-components'; export type { TabsProps } from './tabs'; diff --git a/packages/react/src/tabs/tabs.tsx b/packages/react/src/tabs/tabs.tsx index 7f6e857..a591767 100644 --- a/packages/react/src/tabs/tabs.tsx +++ b/packages/react/src/tabs/tabs.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { SlotsToClasses, TabsReturnType, TabsSlots, TabsVariantProps } from '@alice-ui/theme'; import { filterVariantProps, tabs } from '@alice-ui/theme'; diff --git a/packages/react/src/text-field/index.ts b/packages/react/src/text-field/index.ts index 48198e8..3f61d6f 100644 --- a/packages/react/src/text-field/index.ts +++ b/packages/react/src/text-field/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Label, Text } from 'react-aria-components'; import { TextField } from './text-field'; diff --git a/packages/react/src/text-field/text-field.tsx b/packages/react/src/text-field/text-field.tsx index 52633c2..57a21ba 100644 --- a/packages/react/src/text-field/text-field.tsx +++ b/packages/react/src/text-field/text-field.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { SlotsToClasses, TextFieldSlots } from '@alice-ui/theme'; import { textField } from '@alice-ui/theme'; diff --git a/packages/react/src/tooltip/index.ts b/packages/react/src/tooltip/index.ts index 6bc2352..392a3b4 100644 --- a/packages/react/src/tooltip/index.ts +++ b/packages/react/src/tooltip/index.ts @@ -1,5 +1,3 @@ -'use client'; - import { Tooltip, TooltipTrigger } from './tooltip'; // export types diff --git a/packages/react/src/tooltip/tooltip.tsx b/packages/react/src/tooltip/tooltip.tsx index 2a17acf..bd8ecaf 100644 --- a/packages/react/src/tooltip/tooltip.tsx +++ b/packages/react/src/tooltip/tooltip.tsx @@ -1,5 +1,3 @@ -'use client'; - import { clsx } from '@alice-ui/shared-utils'; import type { PopoverSlots, PopoverVariantProps, SlotsToClasses } from '@alice-ui/theme'; import { popover } from '@alice-ui/theme'; diff --git a/packages/theme/src/components/input.ts b/packages/theme/src/components/input.ts index a7f4f1f..649f633 100644 --- a/packages/theme/src/components/input.ts +++ b/packages/theme/src/components/input.ts @@ -96,7 +96,7 @@ const input = tv({ 'border-2', 'border-default-200', 'data-[hovered=true]:border-default-400', - 'data-[focused=true]:border-default-foreground', + 'data-[focused=true]:!border-default-foreground', 'transition-colors', 'motion-reduce:transition-none', 'data-[invalid=true]:!border-danger',