@zentauri-ui/zentauri-components 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -0
- package/cli/cli.integration.test.ts +51 -0
- package/cli/index.mjs +664 -0
- package/cli/registry.json +36 -0
- package/cli/rewrite-imports.mjs +57 -0
- package/cli/rewrite-imports.test.ts +71 -0
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useBodyScrollLock/index.d.ts +2 -0
- package/dist/hooks/useBodyScrollLock/index.d.ts.map +1 -0
- package/dist/hooks/{useBodyScrollLock.d.ts → useBodyScrollLock/useBodyScrollLock.d.ts} +2 -3
- package/dist/hooks/useBodyScrollLock/useBodyScrollLock.d.ts.map +1 -0
- package/dist/hooks/useClickOutside/index.d.ts +2 -0
- package/dist/hooks/useClickOutside/index.d.ts.map +1 -0
- package/dist/hooks/{useClickOutside.d.ts → useClickOutside/useClickOutside.d.ts} +6 -7
- package/dist/hooks/useClickOutside/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useClipboard/index.d.ts +2 -0
- package/dist/hooks/useClipboard/index.d.ts.map +1 -0
- package/dist/hooks/{useClipboard.d.ts → useClipboard/useClipboard.d.ts} +3 -4
- package/dist/hooks/useClipboard/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useControllableState/index.d.ts +2 -0
- package/dist/hooks/useControllableState/index.d.ts.map +1 -0
- package/dist/hooks/{useControllableState.d.ts → useControllableState/useControllableState.d.ts} +3 -4
- package/dist/hooks/useControllableState/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useDebouncedValue/index.d.ts +2 -0
- package/dist/hooks/useDebouncedValue/index.d.ts.map +1 -0
- package/dist/hooks/{useDebouncedValue.d.ts → useDebouncedValue/useDebouncedValue.d.ts} +2 -3
- package/dist/hooks/useDebouncedValue/useDebouncedValue.d.ts.map +1 -0
- package/dist/hooks/useDisclosure/index.d.ts +2 -0
- package/dist/hooks/useDisclosure/index.d.ts.map +1 -0
- package/dist/hooks/{useDisclosure.d.ts → useDisclosure/useDisclosure.d.ts} +4 -5
- package/dist/hooks/useDisclosure/useDisclosure.d.ts.map +1 -0
- package/dist/hooks/useDocumentTitle/index.d.ts +2 -0
- package/dist/hooks/useDocumentTitle/index.d.ts.map +1 -0
- package/dist/hooks/{useDocumentTitle.d.ts → useDocumentTitle/useDocumentTitle.d.ts} +3 -4
- package/dist/hooks/useDocumentTitle/useDocumentTitle.d.ts.map +1 -0
- package/dist/hooks/useFocusManagement/index.d.ts +2 -0
- package/dist/hooks/useFocusManagement/index.d.ts.map +1 -0
- package/dist/hooks/{useFocusManagement.d.ts → useFocusManagement/useFocusManagement.d.ts} +3 -5
- package/dist/hooks/useFocusManagement/useFocusManagement.d.ts.map +1 -0
- package/dist/hooks/useHover/index.d.ts +2 -0
- package/dist/hooks/useHover/index.d.ts.map +1 -0
- package/dist/hooks/{useHover.d.ts → useHover/useHover.d.ts} +3 -5
- package/dist/hooks/useHover/useHover.d.ts.map +1 -0
- package/dist/hooks/useInView/index.d.ts +2 -0
- package/dist/hooks/useInView/index.d.ts.map +1 -0
- package/dist/hooks/{useInView.d.ts → useInView/useInView.d.ts} +4 -6
- package/dist/hooks/useInView/useInView.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts +2 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts.map +1 -0
- package/dist/hooks/{useIntersectionObserver.d.ts → useIntersectionObserver/useIntersectionObserver.d.ts} +4 -6
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.ts.map +1 -0
- package/dist/hooks/useIsMounted/index.d.ts +2 -0
- package/dist/hooks/useIsMounted/index.d.ts.map +1 -0
- package/dist/hooks/{useIsMounted.d.ts → useIsMounted/useIsMounted.d.ts} +2 -3
- package/dist/hooks/useIsMounted/useIsMounted.d.ts.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts +2 -0
- package/dist/hooks/useIsomorphicLayoutEffect/index.d.ts.map +1 -0
- package/dist/hooks/{useIsomorphicLayoutEffect.d.ts → useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts} +3 -5
- package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage/index.d.ts +2 -0
- package/dist/hooks/useLocalStorage/index.d.ts.map +1 -0
- package/dist/hooks/{useLocalStorage.d.ts → useLocalStorage/useLocalStorage.d.ts} +3 -4
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery/index.d.ts +2 -0
- package/dist/hooks/useMediaQuery/index.d.ts.map +1 -0
- package/dist/hooks/{useMediaQuery.d.ts → useMediaQuery/useMediaQuery.d.ts} +2 -3
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useNetworkStatus/index.d.ts +2 -0
- package/dist/hooks/useNetworkStatus/index.d.ts.map +1 -0
- package/dist/hooks/{useNetworkStatus.d.ts → useNetworkStatus/useNetworkStatus.d.ts} +2 -3
- package/dist/hooks/useNetworkStatus/useNetworkStatus.d.ts.map +1 -0
- package/dist/hooks/usePageVisibility/index.d.ts +2 -0
- package/dist/hooks/usePageVisibility/index.d.ts.map +1 -0
- package/dist/hooks/{usePageVisibility.d.ts → usePageVisibility/usePageVisibility.d.ts} +2 -3
- package/dist/hooks/usePageVisibility/usePageVisibility.d.ts.map +1 -0
- package/dist/hooks/usePagination/index.d.ts +2 -0
- package/dist/hooks/usePagination/index.d.ts.map +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +30 -0
- package/dist/hooks/usePagination/usePagination.d.ts.map +1 -0
- package/dist/hooks/usePrefersColorScheme/index.d.ts +2 -0
- package/dist/hooks/usePrefersColorScheme/index.d.ts.map +1 -0
- package/dist/hooks/{usePrefersColorScheme.d.ts → usePrefersColorScheme/usePrefersColorScheme.d.ts} +3 -4
- package/dist/hooks/usePrefersColorScheme/usePrefersColorScheme.d.ts.map +1 -0
- package/dist/hooks/usePrefersReducedMotion/index.d.ts +2 -0
- package/dist/hooks/usePrefersReducedMotion/index.d.ts.map +1 -0
- package/dist/hooks/{usePrefersReducedMotion.d.ts → usePrefersReducedMotion/usePrefersReducedMotion.d.ts} +2 -3
- package/dist/hooks/usePrefersReducedMotion/usePrefersReducedMotion.d.ts.map +1 -0
- package/dist/hooks/useResizeObserver/index.d.ts +2 -0
- package/dist/hooks/useResizeObserver/index.d.ts.map +1 -0
- package/dist/hooks/{useResizeObserver.d.ts → useResizeObserver/useResizeObserver.d.ts} +5 -7
- package/dist/hooks/useResizeObserver/useResizeObserver.d.ts.map +1 -0
- package/dist/hooks/useSessionStorage/index.d.ts +2 -0
- package/dist/hooks/useSessionStorage/index.d.ts.map +1 -0
- package/dist/hooks/{useSessionStorage.d.ts → useSessionStorage/useSessionStorage.d.ts} +3 -4
- package/dist/hooks/useSessionStorage/useSessionStorage.d.ts.map +1 -0
- package/dist/hooks/useThrottledCallback/index.d.ts +2 -0
- package/dist/hooks/useThrottledCallback/index.d.ts.map +1 -0
- package/dist/hooks/{useThrottledCallback.d.ts → useThrottledCallback/useThrottledCallback.d.ts} +2 -3
- package/dist/hooks/useThrottledCallback/useThrottledCallback.d.ts.map +1 -0
- package/dist/hooks/useToggle/index.d.ts +2 -0
- package/dist/hooks/useToggle/index.d.ts.map +1 -0
- package/dist/hooks/{useToggle.d.ts → useToggle/useToggle.d.ts} +2 -3
- package/dist/hooks/useToggle/useToggle.d.ts.map +1 -0
- package/dist/hooks/useWindowSize/index.d.ts +2 -0
- package/dist/hooks/useWindowSize/index.d.ts.map +1 -0
- package/dist/hooks/{useWindowSize.d.ts → useWindowSize/useWindowSize.d.ts} +3 -4
- package/dist/hooks/useWindowSize/useWindowSize.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/ui/accordion/accordion-base.d.ts +20 -0
- package/dist/ui/accordion/accordion-base.d.ts.map +1 -0
- package/dist/ui/accordion/accordion.d.ts +8 -0
- package/dist/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/ui/accordion/animated/accordion-content-animated.d.ts +6 -0
- package/dist/ui/accordion/animated/accordion-content-animated.d.ts.map +1 -0
- package/dist/ui/accordion/animated/accordion-root-animated.d.ts +6 -0
- package/dist/ui/accordion/animated/accordion-root-animated.d.ts.map +1 -0
- package/dist/ui/accordion/animated/animations.d.ts +6 -0
- package/dist/ui/accordion/animated/animations.d.ts.map +1 -0
- package/dist/ui/accordion/animated/index.d.ts +6 -0
- package/dist/ui/accordion/animated/index.d.ts.map +1 -0
- package/dist/ui/accordion/animated/types.d.ts +6 -0
- package/dist/ui/accordion/animated/types.d.ts.map +1 -0
- package/dist/ui/accordion/index.d.ts +5 -0
- package/dist/ui/accordion/index.d.ts.map +1 -0
- package/dist/ui/accordion/types.d.ts +39 -0
- package/dist/ui/accordion/types.d.ts.map +1 -0
- package/dist/ui/accordion/variants.d.ts +14 -0
- package/dist/ui/accordion/variants.d.ts.map +1 -0
- package/dist/ui/alert/alert-base.d.ts +28 -0
- package/dist/ui/alert/alert-base.d.ts.map +1 -0
- package/dist/ui/alert/alert.d.ts +6 -0
- package/dist/ui/alert/alert.d.ts.map +1 -0
- package/dist/ui/alert/animated/alert-animated.d.ts +3 -0
- package/dist/ui/alert/animated/alert-animated.d.ts.map +1 -0
- package/dist/ui/alert/animated/animations.d.ts +3 -0
- package/dist/ui/alert/animated/animations.d.ts.map +1 -0
- package/dist/ui/alert/animated/index.d.ts +4 -0
- package/dist/ui/alert/animated/index.d.ts.map +1 -0
- package/dist/ui/alert/animated/types.d.ts +8 -0
- package/dist/ui/alert/animated/types.d.ts.map +1 -0
- package/dist/ui/alert/index.d.ts +5 -0
- package/dist/ui/alert/index.d.ts.map +1 -0
- package/dist/ui/alert/types.d.ts +21 -0
- package/dist/ui/alert/types.d.ts.map +1 -0
- package/dist/ui/alert/variants.d.ts +11 -0
- package/dist/ui/alert/variants.d.ts.map +1 -0
- package/dist/ui/avatar/animated/animations.d.ts +3 -0
- package/dist/ui/avatar/animated/animations.d.ts.map +1 -0
- package/dist/ui/avatar/animated/avatar-animated.d.ts +6 -0
- package/dist/ui/avatar/animated/avatar-animated.d.ts.map +1 -0
- package/dist/ui/avatar/animated/index.d.ts +5 -0
- package/dist/ui/avatar/animated/index.d.ts.map +1 -0
- package/dist/ui/avatar/animated/types.d.ts +8 -0
- package/dist/ui/avatar/animated/types.d.ts.map +1 -0
- package/dist/ui/avatar/avatar-base.d.ts +25 -0
- package/dist/ui/avatar/avatar-base.d.ts.map +1 -0
- package/dist/ui/avatar/avatar.d.ts +8 -0
- package/dist/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/ui/avatar/index.d.ts +5 -0
- package/dist/ui/avatar/index.d.ts.map +1 -0
- package/dist/ui/avatar/types.d.ts +25 -0
- package/dist/ui/avatar/types.d.ts.map +1 -0
- package/dist/ui/avatar/variants.d.ts +8 -0
- package/dist/ui/avatar/variants.d.ts.map +1 -0
- package/dist/ui/badge/animated/animations.d.ts +3 -0
- package/dist/ui/badge/animated/animations.d.ts.map +1 -0
- package/dist/ui/badge/animated/badge-animated.d.ts +6 -0
- package/dist/ui/badge/animated/badge-animated.d.ts.map +1 -0
- package/dist/ui/badge/animated/index.d.ts +4 -0
- package/dist/ui/badge/animated/index.d.ts.map +1 -0
- package/dist/ui/badge/animated/types.d.ts +10 -0
- package/dist/ui/badge/animated/types.d.ts.map +1 -0
- package/dist/ui/badge/badge-base.d.ts +6 -0
- package/dist/ui/badge/badge-base.d.ts.map +1 -0
- package/dist/ui/badge/badge.d.ts +6 -0
- package/dist/ui/badge/badge.d.ts.map +1 -0
- package/dist/ui/badge/index.d.ts +4 -0
- package/dist/ui/badge/index.d.ts.map +1 -0
- package/dist/ui/badge/types.d.ts +17 -0
- package/dist/ui/badge/types.d.ts.map +1 -0
- package/dist/ui/badge/variants.d.ts +40 -0
- package/dist/ui/badge/variants.d.ts.map +1 -0
- package/dist/ui/breadcrumb/breadcrumb.d.ts +33 -0
- package/dist/ui/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb/index.d.ts +4 -0
- package/dist/ui/breadcrumb/index.d.ts.map +1 -0
- package/dist/ui/breadcrumb/types.d.ts +26 -0
- package/dist/ui/breadcrumb/types.d.ts.map +1 -0
- package/dist/ui/breadcrumb/variants.d.ts +11 -0
- package/dist/ui/breadcrumb/variants.d.ts.map +1 -0
- package/dist/ui/buttons/animated/animations.d.ts +3 -0
- package/dist/ui/buttons/animated/animations.d.ts.map +1 -0
- package/dist/ui/buttons/animated/button-animated.d.ts +6 -0
- package/dist/ui/buttons/animated/button-animated.d.ts.map +1 -0
- package/dist/ui/buttons/animated/index.d.ts +4 -0
- package/dist/ui/buttons/animated/index.d.ts.map +1 -0
- package/dist/ui/buttons/animated/types.d.ts +16 -0
- package/dist/ui/buttons/animated/types.d.ts.map +1 -0
- package/dist/ui/buttons/button-base.d.ts +6 -0
- package/dist/ui/buttons/button-base.d.ts.map +1 -0
- package/dist/ui/buttons/button.d.ts +6 -0
- package/dist/ui/buttons/button.d.ts.map +1 -0
- package/dist/ui/buttons/index.d.ts +4 -0
- package/dist/ui/buttons/index.d.ts.map +1 -0
- package/dist/ui/buttons/types.d.ts +10 -0
- package/dist/ui/buttons/types.d.ts.map +1 -0
- package/dist/{variants-Dd9pe-ov.d.mts → ui/buttons/variants.d.ts} +4 -7
- package/dist/ui/buttons/variants.d.ts.map +1 -0
- package/dist/ui/card/animated/animations.d.ts +7 -0
- package/dist/ui/card/animated/animations.d.ts.map +1 -0
- package/dist/ui/card/animated/card-animated.d.ts +6 -0
- package/dist/ui/card/animated/card-animated.d.ts.map +1 -0
- package/dist/ui/card/animated/index.d.ts +5 -0
- package/dist/ui/card/animated/index.d.ts.map +1 -0
- package/dist/ui/card/animated/types.d.ts +6 -0
- package/dist/ui/card/animated/types.d.ts.map +1 -0
- package/dist/ui/card/card-base.d.ts +26 -0
- package/dist/ui/card/card-base.d.ts.map +1 -0
- package/dist/ui/card/card.d.ts +6 -0
- package/dist/ui/card/card.d.ts.map +1 -0
- package/dist/ui/card/index.d.ts +5 -0
- package/dist/ui/card/index.d.ts.map +1 -0
- package/dist/ui/card/types.d.ts +29 -0
- package/dist/ui/card/types.d.ts.map +1 -0
- package/dist/ui/card/variants.d.ts +18 -0
- package/dist/ui/card/variants.d.ts.map +1 -0
- package/dist/ui/divider/animated/animations.d.ts +6 -0
- package/dist/ui/divider/animated/animations.d.ts.map +1 -0
- package/dist/ui/divider/animated/divider-animated.d.ts +6 -0
- package/dist/ui/divider/animated/divider-animated.d.ts.map +1 -0
- package/dist/ui/divider/animated/index.d.ts +3 -0
- package/dist/ui/divider/animated/index.d.ts.map +1 -0
- package/dist/ui/divider/animated/types.d.ts +8 -0
- package/dist/ui/divider/animated/types.d.ts.map +1 -0
- package/dist/ui/divider/divider-base.d.ts +6 -0
- package/dist/ui/divider/divider-base.d.ts.map +1 -0
- package/dist/ui/divider/divider.d.ts +6 -0
- package/dist/ui/divider/divider.d.ts.map +1 -0
- package/dist/ui/divider/index.d.ts +4 -0
- package/dist/ui/divider/index.d.ts.map +1 -0
- package/dist/ui/divider/types.d.ts +15 -0
- package/dist/ui/divider/types.d.ts.map +1 -0
- package/dist/ui/divider/variants.d.ts +14 -0
- package/dist/ui/divider/variants.d.ts.map +1 -0
- package/dist/ui/drawer/animated/animations.d.ts +3 -0
- package/dist/ui/drawer/animated/animations.d.ts.map +1 -0
- package/dist/ui/drawer/animated/drawer-content-animated.d.ts +6 -0
- package/dist/ui/drawer/animated/drawer-content-animated.d.ts.map +1 -0
- package/dist/ui/drawer/animated/index.d.ts +5 -0
- package/dist/ui/drawer/animated/index.d.ts.map +1 -0
- package/dist/ui/drawer/animated/types.d.ts +9 -0
- package/dist/ui/drawer/animated/types.d.ts.map +1 -0
- package/dist/ui/drawer/drawer-base.d.ts +35 -0
- package/dist/ui/drawer/drawer-base.d.ts.map +1 -0
- package/dist/ui/drawer/drawer.d.ts +2 -0
- package/dist/ui/drawer/drawer.d.ts.map +1 -0
- package/dist/ui/drawer/index.d.ts +4 -0
- package/dist/ui/drawer/index.d.ts.map +1 -0
- package/dist/ui/drawer/types.d.ts +33 -0
- package/dist/ui/drawer/types.d.ts.map +1 -0
- package/dist/ui/drawer/variants.d.ts +10 -0
- package/dist/ui/drawer/variants.d.ts.map +1 -0
- package/dist/ui/dropdown/dropdown.d.ts +6 -0
- package/dist/ui/dropdown/dropdown.d.ts.map +1 -0
- package/dist/ui/dropdown/index.d.ts +4 -0
- package/dist/ui/dropdown/index.d.ts.map +1 -0
- package/dist/ui/dropdown/types.d.ts +38 -0
- package/dist/ui/dropdown/types.d.ts.map +1 -0
- package/dist/ui/dropdown/variants.d.ts +12 -0
- package/dist/ui/dropdown/variants.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/animations.d.ts +3 -0
- package/dist/ui/empty-state/animated/animations.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/empty-state-animated.d.ts +6 -0
- package/dist/ui/empty-state/animated/empty-state-animated.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/index.d.ts +4 -0
- package/dist/ui/empty-state/animated/index.d.ts.map +1 -0
- package/dist/ui/empty-state/animated/types.d.ts +14 -0
- package/dist/ui/empty-state/animated/types.d.ts.map +1 -0
- package/dist/ui/empty-state/empty-state-base.d.ts +23 -0
- package/dist/ui/empty-state/empty-state-base.d.ts.map +1 -0
- package/dist/ui/empty-state/empty-state.d.ts +6 -0
- package/dist/ui/empty-state/empty-state.d.ts.map +1 -0
- package/dist/ui/empty-state/index.d.ts +5 -0
- package/dist/ui/empty-state/index.d.ts.map +1 -0
- package/dist/ui/empty-state/types.d.ts +15 -0
- package/dist/ui/empty-state/types.d.ts.map +1 -0
- package/dist/ui/empty-state/variants.d.ts +12 -0
- package/dist/ui/empty-state/variants.d.ts.map +1 -0
- package/dist/ui/file-upload/file-upload.d.ts +8 -0
- package/dist/ui/file-upload/file-upload.d.ts.map +1 -0
- package/dist/ui/file-upload/index.d.ts +4 -0
- package/dist/ui/file-upload/index.d.ts.map +1 -0
- package/dist/ui/file-upload/types.d.ts +18 -0
- package/dist/ui/file-upload/types.d.ts.map +1 -0
- package/dist/ui/file-upload/variants.d.ts +4 -0
- package/dist/ui/file-upload/variants.d.ts.map +1 -0
- package/dist/ui/inputs/animated/animations.d.ts +3 -0
- package/dist/ui/inputs/animated/animations.d.ts.map +1 -0
- package/dist/ui/inputs/animated/index.d.ts +4 -0
- package/dist/ui/inputs/animated/index.d.ts.map +1 -0
- package/dist/ui/inputs/animated/input-animated.d.ts +6 -0
- package/dist/ui/inputs/animated/input-animated.d.ts.map +1 -0
- package/dist/ui/inputs/animated/types.d.ts +16 -0
- package/dist/ui/inputs/animated/types.d.ts.map +1 -0
- package/dist/ui/inputs/index.d.ts +4 -0
- package/dist/ui/inputs/index.d.ts.map +1 -0
- package/dist/ui/inputs/input-base.d.ts +6 -0
- package/dist/ui/inputs/input-base.d.ts.map +1 -0
- package/dist/ui/inputs/input.d.ts +6 -0
- package/dist/ui/inputs/input.d.ts.map +1 -0
- package/dist/ui/inputs/types.d.ts +12 -0
- package/dist/ui/inputs/types.d.ts.map +1 -0
- package/dist/ui/inputs/variants.d.ts +7 -0
- package/dist/ui/inputs/variants.d.ts.map +1 -0
- package/dist/ui/modal/animated/animations.d.ts +3 -0
- package/dist/ui/modal/animated/animations.d.ts.map +1 -0
- package/dist/ui/modal/animated/index.d.ts +4 -0
- package/dist/ui/modal/animated/index.d.ts.map +1 -0
- package/dist/ui/modal/animated/modal-content-animated.d.ts +6 -0
- package/dist/ui/modal/animated/modal-content-animated.d.ts.map +1 -0
- package/dist/ui/modal/animated/types.d.ts +9 -0
- package/dist/ui/modal/animated/types.d.ts.map +1 -0
- package/dist/ui/modal/index.d.ts +5 -0
- package/dist/ui/modal/index.d.ts.map +1 -0
- package/dist/ui/modal/modal-base.d.ts +47 -0
- package/dist/ui/modal/modal-base.d.ts.map +1 -0
- package/dist/ui/modal/modal.d.ts +6 -0
- package/dist/ui/modal/modal.d.ts.map +1 -0
- package/dist/ui/modal/types.d.ts +26 -0
- package/dist/ui/modal/types.d.ts.map +1 -0
- package/dist/ui/modal/variants.d.ts +10 -0
- package/dist/ui/modal/variants.d.ts.map +1 -0
- package/dist/ui/pagination/index.d.ts +5 -0
- package/dist/ui/pagination/index.d.ts.map +1 -0
- package/dist/ui/pagination/pagination.d.ts +17 -0
- package/dist/ui/pagination/pagination.d.ts.map +1 -0
- package/dist/ui/pagination/types.d.ts +56 -0
- package/dist/ui/pagination/types.d.ts.map +1 -0
- package/dist/ui/pagination/variants.d.ts +12 -0
- package/dist/ui/pagination/variants.d.ts.map +1 -0
- package/dist/ui/progress/animated/animations.d.ts +3 -0
- package/dist/ui/progress/animated/animations.d.ts.map +1 -0
- package/dist/ui/progress/animated/index.d.ts +4 -0
- package/dist/ui/progress/animated/index.d.ts.map +1 -0
- package/dist/ui/progress/animated/progress-animated.d.ts +16 -0
- package/dist/ui/progress/animated/progress-animated.d.ts.map +1 -0
- package/dist/ui/progress/animated/types.d.ts +23 -0
- package/dist/ui/progress/animated/types.d.ts.map +1 -0
- package/dist/ui/progress/index.d.ts +5 -0
- package/dist/ui/progress/index.d.ts.map +1 -0
- package/dist/ui/progress/progress-base.d.ts +23 -0
- package/dist/ui/progress/progress-base.d.ts.map +1 -0
- package/dist/ui/progress/progress.d.ts +6 -0
- package/dist/ui/progress/progress.d.ts.map +1 -0
- package/dist/ui/progress/types.d.ts +28 -0
- package/dist/ui/progress/types.d.ts.map +1 -0
- package/dist/ui/progress/variants.d.ts +15 -0
- package/dist/ui/progress/variants.d.ts.map +1 -0
- package/dist/ui/select/index.d.ts +4 -0
- package/dist/ui/select/index.d.ts.map +1 -0
- package/dist/ui/select/select.d.ts +10 -0
- package/dist/ui/select/select.d.ts.map +1 -0
- package/dist/ui/select/types.d.ts +48 -0
- package/dist/ui/select/types.d.ts.map +1 -0
- package/dist/ui/select/variants.d.ts +14 -0
- package/dist/ui/select/variants.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/animations.d.ts +3 -0
- package/dist/ui/skeleton/animated/animations.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/index.d.ts +4 -0
- package/dist/ui/skeleton/animated/index.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/skeleton-animated.d.ts +22 -0
- package/dist/ui/skeleton/animated/skeleton-animated.d.ts.map +1 -0
- package/dist/ui/skeleton/animated/types.d.ts +30 -0
- package/dist/ui/skeleton/animated/types.d.ts.map +1 -0
- package/dist/ui/skeleton/index.d.ts +5 -0
- package/dist/ui/skeleton/index.d.ts.map +1 -0
- package/dist/ui/skeleton/skeleton-base.d.ts +24 -0
- package/dist/ui/skeleton/skeleton-base.d.ts.map +1 -0
- package/dist/ui/skeleton/skeleton.d.ts +2 -0
- package/dist/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton/types.d.ts +23 -0
- package/dist/ui/skeleton/types.d.ts.map +1 -0
- package/dist/{types-CK_vNRIb.d.mts → ui/skeleton/variants.d.ts} +9 -34
- package/dist/ui/skeleton/variants.d.ts.map +1 -0
- package/dist/ui/slider/index.d.ts +4 -0
- package/dist/ui/slider/index.d.ts.map +1 -0
- package/dist/ui/slider/slider.d.ts +51 -0
- package/dist/ui/slider/slider.d.ts.map +1 -0
- package/dist/ui/slider/types.d.ts +49 -0
- package/dist/ui/slider/types.d.ts.map +1 -0
- package/dist/ui/slider/variants.d.ts +13 -0
- package/dist/ui/slider/variants.d.ts.map +1 -0
- package/dist/ui/slider.js +21 -25
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/slider.mjs +21 -25
- package/dist/ui/slider.mjs.map +1 -1
- package/dist/ui/spinner/animated/index.d.ts +4 -0
- package/dist/ui/spinner/animated/index.d.ts.map +1 -0
- package/dist/ui/spinner/animated/spinner.d.ts +6 -0
- package/dist/ui/spinner/animated/spinner.d.ts.map +1 -0
- package/dist/ui/spinner/animated/types.d.ts +9 -0
- package/dist/ui/spinner/animated/types.d.ts.map +1 -0
- package/dist/ui/spinner/animated/variants.d.ts +6 -0
- package/dist/ui/spinner/animated/variants.d.ts.map +1 -0
- package/dist/ui/stepper/index.d.ts +4 -0
- package/dist/ui/stepper/index.d.ts.map +1 -0
- package/dist/ui/stepper/stepper.d.ts +33 -0
- package/dist/ui/stepper/stepper.d.ts.map +1 -0
- package/dist/ui/stepper/types.d.ts +25 -0
- package/dist/ui/stepper/types.d.ts.map +1 -0
- package/dist/ui/stepper/variants.d.ts +11 -0
- package/dist/ui/stepper/variants.d.ts.map +1 -0
- package/dist/ui/table/animated/animations.d.ts +3 -0
- package/dist/ui/table/animated/animations.d.ts.map +1 -0
- package/dist/ui/table/animated/index.d.ts +5 -0
- package/dist/ui/table/animated/index.d.ts.map +1 -0
- package/dist/ui/table/animated/table-animated.d.ts +5 -0
- package/dist/ui/table/animated/table-animated.d.ts.map +1 -0
- package/dist/ui/table/animated/types.d.ts +8 -0
- package/dist/ui/table/animated/types.d.ts.map +1 -0
- package/dist/ui/table/index.d.ts +4 -0
- package/dist/ui/table/index.d.ts.map +1 -0
- package/dist/ui/table/table-base.d.ts +38 -0
- package/dist/ui/table/table-base.d.ts.map +1 -0
- package/dist/ui/table/table.d.ts +2 -0
- package/dist/ui/table/table.d.ts.map +1 -0
- package/dist/ui/table/types.d.ts +33 -0
- package/dist/ui/table/types.d.ts.map +1 -0
- package/dist/ui/table/variants.d.ts +14 -0
- package/dist/ui/table/variants.d.ts.map +1 -0
- package/dist/ui/tabs/animated/animations.d.ts +5 -0
- package/dist/ui/tabs/animated/animations.d.ts.map +1 -0
- package/dist/ui/tabs/animated/index.d.ts +4 -0
- package/dist/ui/tabs/animated/index.d.ts.map +1 -0
- package/dist/ui/tabs/animated/tabs-content-animated.d.ts +6 -0
- package/dist/ui/tabs/animated/tabs-content-animated.d.ts.map +1 -0
- package/dist/ui/tabs/animated/types.d.ts +14 -0
- package/dist/ui/tabs/animated/types.d.ts.map +1 -0
- package/dist/ui/tabs/index.d.ts +4 -0
- package/dist/ui/tabs/index.d.ts.map +1 -0
- package/dist/ui/tabs/tabs-base.d.ts +8 -0
- package/dist/ui/tabs/tabs-base.d.ts.map +1 -0
- package/dist/ui/tabs/tabs.d.ts +2 -0
- package/dist/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/{types-zHcMUtKK.d.mts → ui/tabs/types.d.ts} +8 -10
- package/dist/ui/tabs/types.d.ts.map +1 -0
- package/dist/ui/tabs/variants.d.ts +11 -0
- package/dist/ui/tabs/variants.d.ts.map +1 -0
- package/dist/ui/toast/animated/animations.d.ts +3 -0
- package/dist/ui/toast/animated/animations.d.ts.map +1 -0
- package/dist/ui/toast/animated/index.d.ts +4 -0
- package/dist/ui/toast/animated/index.d.ts.map +1 -0
- package/dist/ui/toast/animated/toast-animated.d.ts +10 -0
- package/dist/ui/toast/animated/toast-animated.d.ts.map +1 -0
- package/dist/ui/toast/animated/types.d.ts +5 -0
- package/dist/ui/toast/animated/types.d.ts.map +1 -0
- package/dist/ui/toast/index.d.ts +4 -0
- package/dist/ui/toast/index.d.ts.map +1 -0
- package/dist/ui/toast/toast-base.d.ts +35 -0
- package/dist/ui/toast/toast-base.d.ts.map +1 -0
- package/dist/ui/toast/toast.d.ts +2 -0
- package/dist/ui/toast/toast.d.ts.map +1 -0
- package/dist/ui/toast/types.d.ts +45 -0
- package/dist/ui/toast/types.d.ts.map +1 -0
- package/dist/ui/toast/variants.d.ts +8 -0
- package/dist/ui/toast/variants.d.ts.map +1 -0
- package/dist/ui/toggle/animated/animations.d.ts +3 -0
- package/dist/ui/toggle/animated/animations.d.ts.map +1 -0
- package/dist/ui/toggle/animated/index.d.ts +4 -0
- package/dist/ui/toggle/animated/index.d.ts.map +1 -0
- package/dist/ui/toggle/animated/toggle-animated.d.ts +6 -0
- package/dist/ui/toggle/animated/toggle-animated.d.ts.map +1 -0
- package/dist/ui/toggle/animated/types.d.ts +9 -0
- package/dist/ui/toggle/animated/types.d.ts.map +1 -0
- package/dist/ui/toggle/index.d.ts +4 -0
- package/dist/ui/toggle/index.d.ts.map +1 -0
- package/dist/ui/toggle/toggle-base.d.ts +6 -0
- package/dist/ui/toggle/toggle-base.d.ts.map +1 -0
- package/dist/ui/toggle/toggle.d.ts +6 -0
- package/dist/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/ui/toggle/types.d.ts +14 -0
- package/dist/ui/toggle/types.d.ts.map +1 -0
- package/dist/ui/toggle/variants.d.ts +8 -0
- package/dist/ui/toggle/variants.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/animations.d.ts +3 -0
- package/dist/ui/tooltip/animated/animations.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/index.d.ts +4 -0
- package/dist/ui/tooltip/animated/index.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/tooltip-content-animated.d.ts +3 -0
- package/dist/ui/tooltip/animated/tooltip-content-animated.d.ts.map +1 -0
- package/dist/ui/tooltip/animated/types.d.ts +9 -0
- package/dist/ui/tooltip/animated/types.d.ts.map +1 -0
- package/dist/ui/tooltip/index.d.ts +4 -0
- package/dist/ui/tooltip/index.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip-base.d.ts +7 -0
- package/dist/ui/tooltip/tooltip-base.d.ts.map +1 -0
- package/dist/ui/tooltip/tooltip.d.ts +2 -0
- package/dist/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/{types-Cn7IcgkH.d.mts → ui/tooltip/types.d.ts} +7 -9
- package/dist/ui/tooltip/types.d.ts.map +1 -0
- package/dist/ui/tooltip/variants.d.ts +6 -0
- package/dist/ui/tooltip/variants.d.ts.map +1 -0
- package/dist/vitest-setup.d.ts +2 -0
- package/dist/vitest-setup.d.ts.map +1 -0
- package/package.json +19 -6
- package/src/hooks/index.ts +48 -0
- package/src/hooks/useBodyScrollLock/index.ts +1 -0
- package/src/hooks/useBodyScrollLock/useBodyScrollLock.test.ts +51 -0
- package/src/hooks/useBodyScrollLock/useBodyScrollLock.ts +48 -0
- package/src/hooks/useClickOutside/index.ts +5 -0
- package/src/hooks/useClickOutside/useClickOutside.test.tsx +60 -0
- package/src/hooks/useClickOutside/useClickOutside.ts +52 -0
- package/src/hooks/useClipboard/index.ts +1 -0
- package/src/hooks/useClipboard/useClipboard.test.ts +101 -0
- package/src/hooks/useClipboard/useClipboard.ts +69 -0
- package/src/hooks/useControllableState/index.ts +4 -0
- package/src/hooks/useControllableState/useControllableState.test.ts +59 -0
- package/src/hooks/useControllableState/useControllableState.ts +49 -0
- package/src/hooks/useDebouncedValue/index.ts +1 -0
- package/src/hooks/useDebouncedValue/useDebouncedValue.test.ts +74 -0
- package/{dist/hooks/useDebouncedValue.d.mts → src/hooks/useDebouncedValue/useDebouncedValue.ts} +17 -2
- package/src/hooks/useDisclosure/index.ts +5 -0
- package/src/hooks/useDisclosure/useDisclosure.test.ts +64 -0
- package/src/hooks/useDisclosure/useDisclosure.ts +62 -0
- package/src/hooks/useDocumentTitle/index.ts +4 -0
- package/src/hooks/useDocumentTitle/useDocumentTitle.test.ts +40 -0
- package/src/hooks/useDocumentTitle/useDocumentTitle.ts +58 -0
- package/src/hooks/useFocusManagement/index.ts +1 -0
- package/src/hooks/useFocusManagement/useFocusManagement.test.tsx +45 -0
- package/src/hooks/useFocusManagement/useFocusManagement.ts +77 -0
- package/src/hooks/useHover/index.ts +1 -0
- package/src/hooks/useHover/useHover.test.ts +45 -0
- package/src/hooks/useHover/useHover.ts +45 -0
- package/src/hooks/useInView/index.ts +1 -0
- package/src/hooks/useInView/useInView.test.ts +43 -0
- package/src/hooks/useInView/useInView.ts +28 -0
- package/src/hooks/useIntersectionObserver/index.ts +4 -0
- package/src/hooks/useIntersectionObserver/useIntersectionObserver.test.ts +75 -0
- package/src/hooks/useIntersectionObserver/useIntersectionObserver.ts +54 -0
- package/src/hooks/useIsMounted/index.ts +1 -0
- package/src/hooks/useIsMounted/useIsMounted.test.ts +25 -0
- package/{dist/hooks/useIsMounted.d.mts → src/hooks/useIsMounted/useIsMounted.ts} +14 -3
- package/src/hooks/useIsomorphicLayoutEffect/index.ts +1 -0
- package/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.test.ts +19 -0
- package/{dist/hooks/useIsomorphicLayoutEffect.d.mts → src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts} +5 -4
- package/src/hooks/useLocalStorage/index.ts +4 -0
- package/src/hooks/useLocalStorage/useLocalStorage.test.ts +99 -0
- package/src/hooks/useLocalStorage/useLocalStorage.ts +109 -0
- package/src/hooks/useMediaQuery/index.ts +1 -0
- package/src/hooks/useMediaQuery/useMediaQuery.test.ts +63 -0
- package/src/hooks/useMediaQuery/useMediaQuery.ts +37 -0
- package/src/hooks/useNetworkStatus/index.ts +1 -0
- package/src/hooks/useNetworkStatus/useNetworkStatus.test.ts +53 -0
- package/src/hooks/useNetworkStatus/useNetworkStatus.ts +33 -0
- package/src/hooks/usePageVisibility/index.ts +1 -0
- package/src/hooks/usePageVisibility/usePageVisibility.test.ts +21 -0
- package/src/hooks/usePageVisibility/usePageVisibility.ts +31 -0
- package/src/hooks/usePagination/index.ts +6 -0
- package/src/hooks/usePagination/usePagination.test.ts +139 -0
- package/src/hooks/usePagination/usePagination.ts +153 -0
- package/src/hooks/usePrefersColorScheme/index.ts +4 -0
- package/src/hooks/usePrefersColorScheme/usePrefersColorScheme.test.ts +53 -0
- package/src/hooks/usePrefersColorScheme/usePrefersColorScheme.ts +21 -0
- package/src/hooks/usePrefersReducedMotion/index.ts +1 -0
- package/src/hooks/usePrefersReducedMotion/usePrefersReducedMotion.test.ts +27 -0
- package/{dist/hooks/usePrefersReducedMotion.d.mts → src/hooks/usePrefersReducedMotion/usePrefersReducedMotion.ts} +7 -3
- package/src/hooks/useResizeObserver/index.ts +4 -0
- package/src/hooks/useResizeObserver/useResizeObserver.test.ts +68 -0
- package/src/hooks/useResizeObserver/useResizeObserver.ts +58 -0
- package/src/hooks/useSessionStorage/index.ts +4 -0
- package/src/hooks/useSessionStorage/useSessionStorage.test.ts +54 -0
- package/src/hooks/useSessionStorage/useSessionStorage.ts +84 -0
- package/src/hooks/useThrottledCallback/index.ts +1 -0
- package/src/hooks/useThrottledCallback/useThrottledCallback.test.ts +75 -0
- package/{dist/hooks/useThrottledCallback.d.mts → src/hooks/useThrottledCallback/useThrottledCallback.ts} +24 -2
- package/src/hooks/useToggle/index.ts +1 -0
- package/src/hooks/useToggle/useToggle.test.ts +40 -0
- package/src/hooks/useToggle/useToggle.ts +22 -0
- package/src/hooks/useWindowSize/index.ts +1 -0
- package/src/hooks/useWindowSize/useWindowSize.test.ts +23 -0
- package/src/hooks/useWindowSize/useWindowSize.ts +39 -0
- package/src/lib/utils.ts +25 -0
- package/src/ui/accordion/accordion-base.tsx +223 -0
- package/src/ui/accordion/accordion.test.tsx +146 -0
- package/src/ui/accordion/accordion.tsx +11 -0
- package/src/ui/accordion/animated/accordion-content-animated.tsx +46 -0
- package/src/ui/accordion/animated/accordion-root-animated.tsx +10 -0
- package/src/ui/accordion/animated/animations.ts +16 -0
- package/src/ui/accordion/animated/index.ts +7 -0
- package/src/ui/accordion/animated/types.ts +7 -0
- package/src/ui/accordion/index.ts +23 -0
- package/src/ui/accordion/types.ts +48 -0
- package/src/ui/accordion/variants.ts +115 -0
- package/src/ui/alert/alert-base.tsx +157 -0
- package/src/ui/alert/alert.test.tsx +150 -0
- package/src/ui/alert/alert.tsx +9 -0
- package/src/ui/alert/animated/alert-animated.tsx +20 -0
- package/src/ui/alert/animated/animations.ts +20 -0
- package/src/ui/alert/animated/index.ts +3 -0
- package/src/ui/alert/animated/types.ts +16 -0
- package/src/ui/alert/index.ts +22 -0
- package/src/ui/alert/types.ts +28 -0
- package/src/ui/alert/variants.ts +74 -0
- package/src/ui/avatar/animated/animations.ts +11 -0
- package/src/ui/avatar/animated/avatar-animated.tsx +25 -0
- package/src/ui/avatar/animated/index.ts +6 -0
- package/src/ui/avatar/animated/types.ts +16 -0
- package/src/ui/avatar/avatar-base.tsx +184 -0
- package/src/ui/avatar/avatar.test.tsx +51 -0
- package/src/ui/avatar/avatar.tsx +11 -0
- package/src/ui/avatar/index.ts +16 -0
- package/src/ui/avatar/types.ts +36 -0
- package/src/ui/avatar/variants.ts +52 -0
- package/src/ui/badge/animated/animations.ts +20 -0
- package/src/ui/badge/animated/badge-animated.tsx +28 -0
- package/src/ui/badge/animated/index.ts +5 -0
- package/src/ui/badge/animated/types.ts +18 -0
- package/src/ui/badge/badge-base.tsx +53 -0
- package/src/ui/badge/badge.test.tsx +48 -0
- package/src/ui/badge/badge.tsx +9 -0
- package/src/ui/badge/index.ts +5 -0
- package/src/ui/badge/types.ts +25 -0
- package/src/ui/badge/variants.ts +85 -0
- package/src/ui/breadcrumb/breadcrumb.test.tsx +62 -0
- package/src/ui/breadcrumb/breadcrumb.tsx +135 -0
- package/src/ui/breadcrumb/index.ts +28 -0
- package/src/ui/breadcrumb/types.ts +29 -0
- package/src/ui/breadcrumb/variants.ts +53 -0
- package/src/ui/buttons/animated/animations.ts +34 -0
- package/src/ui/buttons/animated/button-animated.tsx +70 -0
- package/src/ui/buttons/animated/index.ts +5 -0
- package/src/ui/buttons/animated/types.ts +29 -0
- package/src/ui/buttons/button-base.tsx +59 -0
- package/src/ui/buttons/button.test.tsx +480 -0
- package/src/ui/buttons/button.tsx +9 -0
- package/src/ui/buttons/index.ts +5 -0
- package/src/ui/buttons/types.ts +14 -0
- package/src/ui/buttons/variants.ts +77 -0
- package/src/ui/card/animated/animations.ts +32 -0
- package/src/ui/card/animated/card-animated.tsx +28 -0
- package/src/ui/card/animated/index.ts +12 -0
- package/src/ui/card/animated/types.ts +8 -0
- package/src/ui/card/card-base.tsx +146 -0
- package/src/ui/card/card.test.tsx +79 -0
- package/src/ui/card/card.tsx +11 -0
- package/src/ui/card/index.ts +21 -0
- package/src/ui/card/types.ts +42 -0
- package/src/ui/card/variants.ts +122 -0
- package/src/ui/divider/animated/animations.ts +27 -0
- package/src/ui/divider/animated/divider-animated.tsx +24 -0
- package/src/ui/divider/animated/index.ts +4 -0
- package/src/ui/divider/animated/types.ts +18 -0
- package/src/ui/divider/divider-base.tsx +80 -0
- package/src/ui/divider/divider.tsx +9 -0
- package/src/ui/divider/index.ts +14 -0
- package/src/ui/divider/types.ts +18 -0
- package/src/ui/divider/variants.ts +98 -0
- package/src/ui/drawer/animated/animations.ts +39 -0
- package/src/ui/drawer/animated/drawer-content-animated.tsx +101 -0
- package/src/ui/drawer/animated/index.ts +14 -0
- package/src/ui/drawer/animated/types.ts +18 -0
- package/src/ui/drawer/drawer-base.tsx +259 -0
- package/src/ui/drawer/drawer.test.tsx +132 -0
- package/src/ui/drawer/drawer.tsx +11 -0
- package/src/ui/drawer/index.ts +21 -0
- package/src/ui/drawer/types.ts +39 -0
- package/src/ui/drawer/variants.ts +122 -0
- package/src/ui/dropdown/dropdown.test.tsx +114 -0
- package/src/ui/dropdown/dropdown.tsx +179 -0
- package/src/ui/dropdown/index.ts +15 -0
- package/src/ui/dropdown/types.ts +68 -0
- package/src/ui/dropdown/variants.ts +138 -0
- package/src/ui/empty-state/animated/animations.ts +19 -0
- package/src/ui/empty-state/animated/empty-state-animated.tsx +23 -0
- package/src/ui/empty-state/animated/index.ts +7 -0
- package/src/ui/empty-state/animated/types.ts +26 -0
- package/src/ui/empty-state/empty-state-base.tsx +114 -0
- package/src/ui/empty-state/empty-state.tsx +9 -0
- package/src/ui/empty-state/index.ts +10 -0
- package/src/ui/empty-state/types.ts +19 -0
- package/src/ui/empty-state/variants.ts +51 -0
- package/src/ui/file-upload/file-upload.test.tsx +36 -0
- package/src/ui/file-upload/file-upload.tsx +119 -0
- package/src/ui/file-upload/index.ts +5 -0
- package/src/ui/file-upload/types.ts +21 -0
- package/src/ui/file-upload/variants.ts +29 -0
- package/src/ui/inputs/animated/animations.ts +36 -0
- package/src/ui/inputs/animated/index.ts +5 -0
- package/src/ui/inputs/animated/input-animated.tsx +124 -0
- package/src/ui/inputs/animated/types.ts +40 -0
- package/src/ui/inputs/index.ts +5 -0
- package/src/ui/inputs/input-base.tsx +114 -0
- package/src/ui/inputs/input.test.tsx +414 -0
- package/src/ui/inputs/input.tsx +8 -0
- package/src/ui/inputs/types.ts +18 -0
- package/src/ui/inputs/variants.ts +316 -0
- package/src/ui/modal/animated/animations.ts +29 -0
- package/src/ui/modal/animated/index.ts +5 -0
- package/src/ui/modal/animated/modal-content-animated.tsx +96 -0
- package/src/ui/modal/animated/types.ts +23 -0
- package/src/ui/modal/index.ts +21 -0
- package/src/ui/modal/modal-base.tsx +279 -0
- package/src/ui/modal/modal.test.tsx +129 -0
- package/src/ui/modal/modal.tsx +8 -0
- package/src/ui/modal/types.ts +31 -0
- package/src/ui/modal/variants.ts +109 -0
- package/src/ui/pagination/index.ts +13 -0
- package/src/ui/pagination/pagination.test.tsx +165 -0
- package/src/ui/pagination/pagination.tsx +237 -0
- package/src/ui/pagination/types.ts +66 -0
- package/src/ui/pagination/variants.ts +97 -0
- package/src/ui/progress/animated/animations.ts +9 -0
- package/src/ui/progress/animated/index.ts +17 -0
- package/src/ui/progress/animated/progress-animated.tsx +133 -0
- package/src/ui/progress/animated/types.ts +35 -0
- package/src/ui/progress/index.ts +10 -0
- package/src/ui/progress/progress-base.tsx +151 -0
- package/src/ui/progress/progress.test.tsx +84 -0
- package/src/ui/progress/progress.tsx +12 -0
- package/src/ui/progress/types.ts +33 -0
- package/src/ui/progress/variants.ts +105 -0
- package/src/ui/select/index.ts +25 -0
- package/src/ui/select/select.test.tsx +128 -0
- package/src/ui/select/select.tsx +221 -0
- package/src/ui/select/types.ts +77 -0
- package/src/ui/select/variants.ts +163 -0
- package/src/ui/skeleton/animated/animations.ts +15 -0
- package/src/ui/skeleton/animated/index.ts +20 -0
- package/src/ui/skeleton/animated/skeleton-animated.tsx +119 -0
- package/src/ui/skeleton/animated/types.ts +49 -0
- package/src/ui/skeleton/index.ts +24 -0
- package/src/ui/skeleton/skeleton-base.tsx +288 -0
- package/src/ui/skeleton/skeleton.tsx +8 -0
- package/src/ui/skeleton/types.ts +31 -0
- package/src/ui/skeleton/variants.ts +254 -0
- package/src/ui/slider/index.ts +22 -0
- package/src/ui/slider/slider.test.tsx +94 -0
- package/src/ui/slider/slider.tsx +728 -0
- package/src/ui/slider/types.ts +66 -0
- package/src/ui/slider/variants.ts +81 -0
- package/src/ui/spinner/animated/index.ts +5 -0
- package/src/ui/spinner/animated/spinner.test.tsx +41 -0
- package/src/ui/spinner/animated/spinner.tsx +143 -0
- package/src/ui/spinner/animated/types.ts +11 -0
- package/src/ui/spinner/animated/variants.ts +50 -0
- package/src/ui/stepper/index.ts +22 -0
- package/src/ui/stepper/stepper.test.tsx +183 -0
- package/src/ui/stepper/stepper.tsx +172 -0
- package/src/ui/stepper/types.ts +32 -0
- package/src/ui/stepper/variants.ts +69 -0
- package/src/ui/table/animated/animations.ts +9 -0
- package/src/ui/table/animated/index.ts +15 -0
- package/src/ui/table/animated/table-animated.tsx +15 -0
- package/src/ui/table/animated/types.ts +16 -0
- package/src/ui/table/index.ts +22 -0
- package/src/ui/table/table-base.tsx +197 -0
- package/src/ui/table/table.tsx +13 -0
- package/src/ui/table/types.ts +47 -0
- package/src/ui/table/variants.ts +105 -0
- package/src/ui/tabs/animated/animations.ts +48 -0
- package/src/ui/tabs/animated/index.ts +8 -0
- package/src/ui/tabs/animated/tabs-content-animated.tsx +46 -0
- package/src/ui/tabs/animated/types.ts +24 -0
- package/src/ui/tabs/index.ts +10 -0
- package/src/ui/tabs/tabs-base.tsx +185 -0
- package/src/ui/tabs/tabs.test.tsx +53 -0
- package/src/ui/tabs/tabs.tsx +2 -0
- package/src/ui/tabs/types.ts +88 -0
- package/src/ui/tabs/variants.ts +70 -0
- package/src/ui/toast/animated/animations.ts +17 -0
- package/src/ui/toast/animated/index.ts +9 -0
- package/src/ui/toast/animated/toast-animated.tsx +96 -0
- package/src/ui/toast/animated/types.ts +13 -0
- package/src/ui/toast/index.ts +26 -0
- package/src/ui/toast/toast-base.tsx +231 -0
- package/src/ui/toast/toast.test.tsx +102 -0
- package/src/ui/toast/toast.tsx +13 -0
- package/src/ui/toast/types.ts +57 -0
- package/src/ui/toast/variants.ts +73 -0
- package/src/ui/toggle/animated/animations.ts +9 -0
- package/src/ui/toggle/animated/index.ts +7 -0
- package/src/ui/toggle/animated/toggle-animated.tsx +76 -0
- package/src/ui/toggle/animated/types.ts +13 -0
- package/src/ui/toggle/index.ts +5 -0
- package/src/ui/toggle/toggle-base.tsx +70 -0
- package/src/ui/toggle/toggle.test.tsx +44 -0
- package/src/ui/toggle/toggle.tsx +9 -0
- package/src/ui/toggle/types.ts +18 -0
- package/src/ui/toggle/variants.ts +84 -0
- package/src/ui/tooltip/animated/animations.ts +16 -0
- package/src/ui/tooltip/animated/index.ts +10 -0
- package/src/ui/tooltip/animated/tooltip-content-animated.tsx +47 -0
- package/src/ui/tooltip/animated/types.ts +19 -0
- package/src/ui/tooltip/index.ts +17 -0
- package/src/ui/tooltip/tooltip-base.tsx +152 -0
- package/src/ui/tooltip/tooltip.test.tsx +84 -0
- package/src/ui/tooltip/tooltip.tsx +8 -0
- package/src/ui/tooltip/types.ts +57 -0
- package/src/ui/tooltip/variants.ts +61 -0
- package/dist/accordion-base-qVomr7f_.d.mts +0 -66
- package/dist/accordion-base-qVomr7f_.d.ts +0 -66
- package/dist/avatar-base-s4dYg-24.d.mts +0 -49
- package/dist/avatar-base-s4dYg-24.d.ts +0 -49
- package/dist/card-base-CIGac8D_.d.mts +0 -70
- package/dist/card-base-CIGac8D_.d.ts +0 -70
- package/dist/hooks/useBodyScrollLock.d.mts +0 -14
- package/dist/hooks/useClickOutside.d.mts +0 -23
- package/dist/hooks/useClipboard.d.mts +0 -22
- package/dist/hooks/useControllableState.d.mts +0 -22
- package/dist/hooks/useDisclosure.d.mts +0 -25
- package/dist/hooks/useDocumentTitle.d.mts +0 -19
- package/dist/hooks/useFocusManagement.d.mts +0 -24
- package/dist/hooks/useHover.d.mts +0 -15
- package/dist/hooks/useInView.d.mts +0 -19
- package/dist/hooks/useIntersectionObserver.d.mts +0 -19
- package/dist/hooks/useLocalStorage.d.mts +0 -22
- package/dist/hooks/useMediaQuery.d.mts +0 -13
- package/dist/hooks/useNetworkStatus.d.mts +0 -10
- package/dist/hooks/usePageVisibility.d.mts +0 -10
- package/dist/hooks/usePagination.d.mts +0 -5
- package/dist/hooks/usePagination.d.ts +0 -5
- package/dist/hooks/usePrefersColorScheme.d.mts +0 -10
- package/dist/hooks/useResizeObserver.d.mts +0 -23
- package/dist/hooks/useSessionStorage.d.mts +0 -22
- package/dist/hooks/useToggle.d.mts +0 -9
- package/dist/hooks/useWindowSize.d.mts +0 -14
- package/dist/hooks/utils.d.mts +0 -8
- package/dist/hooks/utils.d.ts +0 -8
- package/dist/index-ClPu5gDp.d.ts +0 -86
- package/dist/index-D4p9fn1o.d.mts +0 -86
- package/dist/progress-base-Cm1JODYA.d.mts +0 -66
- package/dist/progress-base-Cm1JODYA.d.ts +0 -66
- package/dist/types-C7N9UvRm.d.mts +0 -38
- package/dist/types-C7N9UvRm.d.ts +0 -38
- package/dist/types-CFpwSbpK.d.mts +0 -27
- package/dist/types-CFpwSbpK.d.ts +0 -27
- package/dist/types-CK_vNRIb.d.ts +0 -63
- package/dist/types-Ca3t5aC_.d.mts +0 -31
- package/dist/types-Ca3t5aC_.d.ts +0 -31
- package/dist/types-Cn7IcgkH.d.ts +0 -32
- package/dist/types-CtFK7mFE.d.mts +0 -34
- package/dist/types-CtFK7mFE.d.ts +0 -34
- package/dist/types-DMkTQsWg.d.mts +0 -46
- package/dist/types-DMkTQsWg.d.ts +0 -46
- package/dist/types-DN400jNg.d.mts +0 -28
- package/dist/types-DN400jNg.d.ts +0 -28
- package/dist/types-vcZcRc6w.d.mts +0 -24
- package/dist/types-vcZcRc6w.d.ts +0 -24
- package/dist/types-zHcMUtKK.d.ts +0 -42
- package/dist/ui/accordion/animated.d.mts +0 -24
- package/dist/ui/accordion/animated.d.ts +0 -24
- package/dist/ui/accordion.d.mts +0 -14
- package/dist/ui/accordion.d.ts +0 -14
- package/dist/ui/alert/animated.d.mts +0 -18
- package/dist/ui/alert/animated.d.ts +0 -18
- package/dist/ui/alert.d.mts +0 -36
- package/dist/ui/alert.d.ts +0 -36
- package/dist/ui/avatar/animated.d.mts +0 -22
- package/dist/ui/avatar/animated.d.ts +0 -22
- package/dist/ui/avatar.d.mts +0 -13
- package/dist/ui/avatar.d.ts +0 -13
- package/dist/ui/badge/animated.d.mts +0 -22
- package/dist/ui/badge/animated.d.ts +0 -22
- package/dist/ui/badge.d.mts +0 -13
- package/dist/ui/badge.d.ts +0 -13
- package/dist/ui/breadcrumb.d.mts +0 -71
- package/dist/ui/breadcrumb.d.ts +0 -71
- package/dist/ui/buttons/animated.d.mts +0 -27
- package/dist/ui/buttons/animated.d.ts +0 -27
- package/dist/ui/buttons.d.mts +0 -19
- package/dist/ui/buttons.d.ts +0 -19
- package/dist/ui/card/animated.d.mts +0 -23
- package/dist/ui/card/animated.d.ts +0 -23
- package/dist/ui/card.d.mts +0 -13
- package/dist/ui/card.d.ts +0 -13
- package/dist/ui/divider/animated.d.mts +0 -19
- package/dist/ui/divider/animated.d.ts +0 -19
- package/dist/ui/divider.d.mts +0 -13
- package/dist/ui/divider.d.ts +0 -13
- package/dist/ui/drawer/animated.d.mts +0 -23
- package/dist/ui/drawer/animated.d.ts +0 -23
- package/dist/ui/drawer.d.mts +0 -80
- package/dist/ui/drawer.d.ts +0 -80
- package/dist/ui/dropdown.d.mts +0 -50
- package/dist/ui/dropdown.d.ts +0 -50
- package/dist/ui/empty-state/animated.d.mts +0 -24
- package/dist/ui/empty-state/animated.d.ts +0 -24
- package/dist/ui/empty-state.d.mts +0 -34
- package/dist/ui/empty-state.d.ts +0 -34
- package/dist/ui/file-upload.d.mts +0 -32
- package/dist/ui/file-upload.d.ts +0 -32
- package/dist/ui/inputs/animated.d.mts +0 -27
- package/dist/ui/inputs/animated.d.ts +0 -27
- package/dist/ui/inputs.d.mts +0 -21
- package/dist/ui/inputs.d.ts +0 -21
- package/dist/ui/modal/animated.d.mts +0 -21
- package/dist/ui/modal/animated.d.ts +0 -21
- package/dist/ui/modal.d.mts +0 -46
- package/dist/ui/modal.d.ts +0 -46
- package/dist/ui/pagination.d.mts +0 -36
- package/dist/ui/pagination.d.ts +0 -36
- package/dist/ui/progress/animated.d.mts +0 -41
- package/dist/ui/progress/animated.d.ts +0 -41
- package/dist/ui/progress.d.mts +0 -13
- package/dist/ui/progress.d.ts +0 -13
- package/dist/ui/select.d.mts +0 -73
- package/dist/ui/select.d.ts +0 -73
- package/dist/ui/skeleton/animated.d.mts +0 -56
- package/dist/ui/skeleton/animated.d.ts +0 -56
- package/dist/ui/skeleton.d.mts +0 -29
- package/dist/ui/skeleton.d.ts +0 -29
- package/dist/ui/slider.d.mts +0 -83
- package/dist/ui/slider.d.ts +0 -83
- package/dist/ui/spinner/animated.d.mts +0 -22
- package/dist/ui/spinner/animated.d.ts +0 -22
- package/dist/ui/stepper.d.mts +0 -64
- package/dist/ui/stepper.d.ts +0 -64
- package/dist/ui/table/animated.d.mts +0 -21
- package/dist/ui/table/animated.d.ts +0 -21
- package/dist/ui/table.d.mts +0 -87
- package/dist/ui/table.d.ts +0 -87
- package/dist/ui/tabs/animated.d.mts +0 -25
- package/dist/ui/tabs/animated.d.ts +0 -25
- package/dist/ui/tabs.d.mts +0 -24
- package/dist/ui/tabs.d.ts +0 -24
- package/dist/ui/toast/animated.d.mts +0 -23
- package/dist/ui/toast/animated.d.ts +0 -23
- package/dist/ui/toast.d.mts +0 -41
- package/dist/ui/toast.d.ts +0 -41
- package/dist/ui/toggle/animated.d.mts +0 -22
- package/dist/ui/toggle/animated.d.ts +0 -22
- package/dist/ui/toggle.d.mts +0 -13
- package/dist/ui/toggle.d.ts +0 -13
- package/dist/ui/tooltip/animated.d.mts +0 -17
- package/dist/ui/tooltip/animated.d.ts +0 -17
- package/dist/ui/tooltip.d.mts +0 -19
- package/dist/ui/tooltip.d.ts +0 -19
- package/dist/variants-CYODHI8b.d.mts +0 -10
- package/dist/variants-CYODHI8b.d.ts +0 -10
- package/dist/variants-Dd9pe-ov.d.ts +0 -8
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { createRef } from "react";
|
|
2
|
+
import { render, screen, within } from "@testing-library/react";
|
|
3
|
+
import userEvent from "@testing-library/user-event";
|
|
4
|
+
import { describe, expect, it, vi } from "vitest";
|
|
5
|
+
|
|
6
|
+
import { ButtonAnimated } from "./animated";
|
|
7
|
+
import { Button } from "./button";
|
|
8
|
+
import type { ButtonAnimation } from "./animated/types";
|
|
9
|
+
|
|
10
|
+
/** Stable selector contract for consumers of the design-system Button. */
|
|
11
|
+
const BUTTON_SLOT_SELECTOR = '[data-slot="button"]';
|
|
12
|
+
|
|
13
|
+
function getButtonSlot(container: HTMLElement = document.body) {
|
|
14
|
+
const elements = container.querySelectorAll(BUTTON_SLOT_SELECTOR);
|
|
15
|
+
expect(
|
|
16
|
+
elements.length,
|
|
17
|
+
`Expected exactly one element matching ${BUTTON_SLOT_SELECTOR} in the document, but found ${elements.length}`,
|
|
18
|
+
).toBe(1);
|
|
19
|
+
return elements[0] as HTMLElement;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
describe("Button (component library)", () => {
|
|
23
|
+
describe("public contract and metadata", () => {
|
|
24
|
+
it("should expose a stable displayName for devtools and documentation consumers", () => {
|
|
25
|
+
expect(
|
|
26
|
+
Button.displayName,
|
|
27
|
+
"Button.displayName must be set for library discoverability",
|
|
28
|
+
).toBe("Button");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("should stamp data-slot on the root element so apps can target the primitive without role ambiguity", () => {
|
|
32
|
+
render(<Button>Label</Button>);
|
|
33
|
+
const root = getButtonSlot();
|
|
34
|
+
expect(
|
|
35
|
+
root.getAttribute("data-slot"),
|
|
36
|
+
"data-slot must equal 'button' for the documented contract",
|
|
37
|
+
).toBe("button");
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe("default rendering (button mode)", () => {
|
|
42
|
+
it("should render a native button element with implicit button role for assistive technologies", () => {
|
|
43
|
+
render(<Button>Save changes</Button>);
|
|
44
|
+
const control = screen.getByRole("button", { name: "Save changes" });
|
|
45
|
+
expect(
|
|
46
|
+
control.tagName,
|
|
47
|
+
"Default variant must render a BUTTON element",
|
|
48
|
+
).toBe("BUTTON");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("should default type to button so it does not accidentally submit parent forms", () => {
|
|
52
|
+
render(<Button>Neutral</Button>);
|
|
53
|
+
const control = screen.getByRole("button", { name: "Neutral" });
|
|
54
|
+
expect(
|
|
55
|
+
control.getAttribute("type"),
|
|
56
|
+
"type must default to 'button' inside forms",
|
|
57
|
+
).toBe("button");
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("should render provided text children as the accessible name", () => {
|
|
61
|
+
render(<Button>Continue to checkout</Button>);
|
|
62
|
+
expect(
|
|
63
|
+
screen.getByRole("button", { name: "Continue to checkout" }),
|
|
64
|
+
"Visible label must map to the control's accessible name",
|
|
65
|
+
).toBeVisible();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("should support complex children while preserving a single root slot", () => {
|
|
69
|
+
render(
|
|
70
|
+
<Button>
|
|
71
|
+
<span data-testid="leading-icon" aria-hidden="true">
|
|
72
|
+
→
|
|
73
|
+
</span>
|
|
74
|
+
<span>Next</span>
|
|
75
|
+
</Button>,
|
|
76
|
+
);
|
|
77
|
+
const root = getButtonSlot();
|
|
78
|
+
expect(
|
|
79
|
+
within(root).getByTestId("leading-icon"),
|
|
80
|
+
"Leading decoration must stay inside the button root",
|
|
81
|
+
).toBeInTheDocument();
|
|
82
|
+
expect(
|
|
83
|
+
screen.getByRole("button", { name: "Next" }),
|
|
84
|
+
"Name from text content must remain resolvable",
|
|
85
|
+
).toBeInTheDocument();
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
describe("props: type (native button semantics)", () => {
|
|
90
|
+
it("should forward type='submit' for form submission controls", () => {
|
|
91
|
+
render(<Button type="submit">Send</Button>);
|
|
92
|
+
expect(
|
|
93
|
+
screen.getByRole("button", { name: "Send" }).getAttribute("type"),
|
|
94
|
+
"Consumers must be able to opt into submit behavior explicitly",
|
|
95
|
+
).toBe("submit");
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("should forward type='reset' for form reset controls", () => {
|
|
99
|
+
render(<Button type="reset">Clear</Button>);
|
|
100
|
+
expect(
|
|
101
|
+
screen.getByRole("button", { name: "Clear" }).getAttribute("type"),
|
|
102
|
+
"Consumers must be able to opt into reset behavior explicitly",
|
|
103
|
+
).toBe("reset");
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe("props: appearance (variant class application)", () => {
|
|
108
|
+
it("should apply default appearance styles from the variant recipe", () => {
|
|
109
|
+
render(<Button>Default</Button>);
|
|
110
|
+
const root = getButtonSlot();
|
|
111
|
+
expect(
|
|
112
|
+
root.className,
|
|
113
|
+
"Default appearance must include the default surface token classes",
|
|
114
|
+
).toMatch(/bg-slate-50/);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("should apply secondary appearance when appearance='secondary'", () => {
|
|
118
|
+
render(<Button appearance="secondary">Secondary</Button>);
|
|
119
|
+
const root = getButtonSlot();
|
|
120
|
+
expect(
|
|
121
|
+
root.className,
|
|
122
|
+
"Secondary appearance must switch to the slate surface recipe",
|
|
123
|
+
).toMatch(/bg-slate-800/);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("should apply destructive appearance when appearance='destructive'", () => {
|
|
127
|
+
render(<Button appearance="destructive">Delete</Button>);
|
|
128
|
+
const root = getButtonSlot();
|
|
129
|
+
expect(
|
|
130
|
+
root.className,
|
|
131
|
+
"Destructive appearance must surface danger styling",
|
|
132
|
+
).toMatch(/bg-rose-600/);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("should apply outline appearance when appearance='outline'", () => {
|
|
136
|
+
render(<Button appearance="outline">Outline</Button>);
|
|
137
|
+
const root = getButtonSlot();
|
|
138
|
+
expect(
|
|
139
|
+
root.className,
|
|
140
|
+
"Outline appearance must include border and translucent surface classes",
|
|
141
|
+
).toMatch(/border-white\/10/);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it("should apply gradient appearance tokens for gradient presets", () => {
|
|
145
|
+
render(<Button appearance="gradient-blue">Gradient</Button>);
|
|
146
|
+
const root = getButtonSlot();
|
|
147
|
+
expect(
|
|
148
|
+
root.className,
|
|
149
|
+
"Gradient-blue appearance must include directional gradient utilities",
|
|
150
|
+
).toMatch(/bg-gradient-to-r/);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
describe("props: size", () => {
|
|
155
|
+
it("should apply medium size classes by default", () => {
|
|
156
|
+
render(<Button>MD</Button>);
|
|
157
|
+
const root = getButtonSlot();
|
|
158
|
+
expect(
|
|
159
|
+
root.className,
|
|
160
|
+
"Default size must map to the md recipe (responsive height utilities)",
|
|
161
|
+
).toMatch(/h-9/);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("should apply small size recipe when size='sm'", () => {
|
|
165
|
+
render(<Button size="sm">SM</Button>);
|
|
166
|
+
const root = getButtonSlot();
|
|
167
|
+
expect(root.className, "Small size must use the sm height scale").toMatch(
|
|
168
|
+
/h-7/,
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it("should apply icon size recipe when size='icon'", () => {
|
|
173
|
+
render(
|
|
174
|
+
<Button size="icon" aria-label="Open menu">
|
|
175
|
+
☰
|
|
176
|
+
</Button>,
|
|
177
|
+
);
|
|
178
|
+
const root = getButtonSlot();
|
|
179
|
+
expect(
|
|
180
|
+
root.className,
|
|
181
|
+
"Icon size must enforce square dimensions",
|
|
182
|
+
).toMatch(/h-10/);
|
|
183
|
+
expect(
|
|
184
|
+
root.className,
|
|
185
|
+
"Icon size must enforce square dimensions",
|
|
186
|
+
).toMatch(/w-10/);
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
describe("props: className composition", () => {
|
|
191
|
+
it("should merge consumer className with generated variant classes", () => {
|
|
192
|
+
render(
|
|
193
|
+
<Button className="my-custom-trigger" appearance="secondary">
|
|
194
|
+
Merge
|
|
195
|
+
</Button>,
|
|
196
|
+
);
|
|
197
|
+
const root = getButtonSlot();
|
|
198
|
+
expect(
|
|
199
|
+
root.className,
|
|
200
|
+
"Consumer class names must not replace variant output",
|
|
201
|
+
).toMatch(/bg-slate-800/);
|
|
202
|
+
expect(
|
|
203
|
+
root.className,
|
|
204
|
+
"Consumer class names must be appended for Tailwind overrides",
|
|
205
|
+
).toMatch(/my-custom-trigger/);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
describe("props: disabled state", () => {
|
|
210
|
+
it("should mark the control disabled in the DOM and omit it from the tab order", () => {
|
|
211
|
+
render(<Button disabled>Unavailable</Button>);
|
|
212
|
+
const control = screen.getByRole("button", { name: "Unavailable" });
|
|
213
|
+
expect(
|
|
214
|
+
control,
|
|
215
|
+
"Disabled buttons must expose the disabled property to assistive tech",
|
|
216
|
+
).toBeDisabled();
|
|
217
|
+
expect(
|
|
218
|
+
control.getAttribute("tabindex"),
|
|
219
|
+
"Unless overridden, disabled buttons should not be focused via tab",
|
|
220
|
+
).not.toBe("0");
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it("should not invoke onClick when the control is disabled", async () => {
|
|
224
|
+
const user = userEvent.setup();
|
|
225
|
+
const handleClick = vi.fn();
|
|
226
|
+
render(
|
|
227
|
+
<Button disabled onClick={handleClick}>
|
|
228
|
+
Blocked
|
|
229
|
+
</Button>,
|
|
230
|
+
);
|
|
231
|
+
await user.click(screen.getByRole("button", { name: "Blocked" }));
|
|
232
|
+
expect(
|
|
233
|
+
handleClick,
|
|
234
|
+
"Pointer interaction on disabled buttons must not run handlers",
|
|
235
|
+
).not.toHaveBeenCalled();
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
describe("event handlers", () => {
|
|
240
|
+
it("should call onClick once per activation with pointer input", async () => {
|
|
241
|
+
const user = userEvent.setup();
|
|
242
|
+
const handleClick = vi.fn();
|
|
243
|
+
render(<Button onClick={handleClick}>Click me</Button>);
|
|
244
|
+
await user.click(screen.getByRole("button", { name: "Click me" }));
|
|
245
|
+
expect(
|
|
246
|
+
handleClick,
|
|
247
|
+
"onClick must fire for enabled primary actions",
|
|
248
|
+
).toHaveBeenCalledTimes(1);
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
it("should forward onKeyDown for keyboard-driven interactions", async () => {
|
|
252
|
+
const user = userEvent.setup();
|
|
253
|
+
const handleKeyDown = vi.fn();
|
|
254
|
+
render(<Button onKeyDown={handleKeyDown}>Keyboard</Button>);
|
|
255
|
+
const control = screen.getByRole("button", { name: "Keyboard" });
|
|
256
|
+
control.focus();
|
|
257
|
+
await user.keyboard("{Enter}");
|
|
258
|
+
expect(
|
|
259
|
+
handleKeyDown,
|
|
260
|
+
"onKeyDown must receive keyboard events on the button",
|
|
261
|
+
).toHaveBeenCalled();
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it("should forward onFocus and onBlur for focus management patterns", async () => {
|
|
265
|
+
const user = userEvent.setup();
|
|
266
|
+
const handleFocus = vi.fn();
|
|
267
|
+
const handleBlur = vi.fn();
|
|
268
|
+
render(
|
|
269
|
+
<div>
|
|
270
|
+
<Button onFocus={handleFocus} onBlur={handleBlur}>
|
|
271
|
+
Focus ring
|
|
272
|
+
</Button>
|
|
273
|
+
<button type="button">Other</button>
|
|
274
|
+
</div>,
|
|
275
|
+
);
|
|
276
|
+
const control = screen.getByRole("button", { name: "Focus ring" });
|
|
277
|
+
await user.click(control);
|
|
278
|
+
expect(
|
|
279
|
+
handleFocus,
|
|
280
|
+
"onFocus must run when the button receives focus",
|
|
281
|
+
).toHaveBeenCalledTimes(1);
|
|
282
|
+
await user.click(screen.getByRole("button", { name: "Other" }));
|
|
283
|
+
expect(
|
|
284
|
+
handleBlur,
|
|
285
|
+
"onBlur must run when focus leaves the button",
|
|
286
|
+
).toHaveBeenCalledTimes(1);
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
describe("ref forwarding", () => {
|
|
291
|
+
it("should attach ref to the underlying button element in button mode", () => {
|
|
292
|
+
const ref = createRef<HTMLButtonElement>();
|
|
293
|
+
render(
|
|
294
|
+
<Button ref={ref} type="button">
|
|
295
|
+
Ref target
|
|
296
|
+
</Button>,
|
|
297
|
+
);
|
|
298
|
+
expect(
|
|
299
|
+
ref.current,
|
|
300
|
+
"ref must point at the actual DOM node for imperative focus/measure APIs",
|
|
301
|
+
).toBeInstanceOf(HTMLButtonElement);
|
|
302
|
+
expect(
|
|
303
|
+
ref.current?.textContent,
|
|
304
|
+
"ref node must be the rendered button instance",
|
|
305
|
+
).toContain("Ref target");
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
it("should attach ref to the underlying anchor element in link mode", () => {
|
|
309
|
+
const ref = createRef<HTMLAnchorElement>();
|
|
310
|
+
render(
|
|
311
|
+
<Button as="link" ref={ref} href="/settings">
|
|
312
|
+
Settings
|
|
313
|
+
</Button>,
|
|
314
|
+
);
|
|
315
|
+
expect(
|
|
316
|
+
ref.current,
|
|
317
|
+
"ref must point at the anchor for link mode",
|
|
318
|
+
).toBeInstanceOf(HTMLAnchorElement);
|
|
319
|
+
expect(
|
|
320
|
+
ref.current?.getAttribute("href"),
|
|
321
|
+
"ref node must include the consumer href",
|
|
322
|
+
).toBe("/settings");
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
describe("passthrough DOM and ARIA attributes", () => {
|
|
327
|
+
it("should forward arbitrary data-* attributes for integration test hooks", () => {
|
|
328
|
+
render(<Button data-testid="primary-cta">Go</Button>);
|
|
329
|
+
expect(
|
|
330
|
+
screen.getByTestId("primary-cta"),
|
|
331
|
+
"data-testid must be preserved on the root element",
|
|
332
|
+
).toBe(getButtonSlot());
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
it("should respect aria-label when the visible label is decorative or missing", () => {
|
|
336
|
+
render(
|
|
337
|
+
<Button aria-label="Close dialog" size="icon">
|
|
338
|
+
×
|
|
339
|
+
</Button>,
|
|
340
|
+
);
|
|
341
|
+
expect(
|
|
342
|
+
screen.getByRole("button", { name: "Close dialog" }),
|
|
343
|
+
"Icon-only buttons must remain nameable via aria-label",
|
|
344
|
+
).toBeInTheDocument();
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
it("should forward aria-expanded for toggle / menu button patterns", () => {
|
|
348
|
+
render(
|
|
349
|
+
<Button aria-expanded="true" aria-controls="menu-id">
|
|
350
|
+
Menu
|
|
351
|
+
</Button>,
|
|
352
|
+
);
|
|
353
|
+
const control = screen.getByRole("button", { name: "Menu" });
|
|
354
|
+
expect(
|
|
355
|
+
control.getAttribute("aria-expanded"),
|
|
356
|
+
"aria-expanded must pass through unchanged",
|
|
357
|
+
).toBe("true");
|
|
358
|
+
expect(
|
|
359
|
+
control.getAttribute("aria-controls"),
|
|
360
|
+
"aria-controls must pass through unchanged",
|
|
361
|
+
).toBe("menu-id");
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
it("should forward id for label association", () => {
|
|
365
|
+
render(
|
|
366
|
+
<>
|
|
367
|
+
<label htmlFor="agree">Agree</label>
|
|
368
|
+
<Button id="agree" type="button">
|
|
369
|
+
checkbox stand-in
|
|
370
|
+
</Button>
|
|
371
|
+
</>,
|
|
372
|
+
);
|
|
373
|
+
const control = document.getElementById("agree");
|
|
374
|
+
expect(control, "id must be applied to the interactive root").toBe(
|
|
375
|
+
getButtonSlot(),
|
|
376
|
+
);
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
describe("link mode (as='link')", () => {
|
|
381
|
+
it("should render an anchor with href and implicit link role", () => {
|
|
382
|
+
render(
|
|
383
|
+
<Button as="link" href="/docs/getting-started">
|
|
384
|
+
Read docs
|
|
385
|
+
</Button>,
|
|
386
|
+
);
|
|
387
|
+
const link = screen.getByRole("link", { name: "Read docs" });
|
|
388
|
+
expect(link.tagName, "Link mode must render an A element").toBe("A");
|
|
389
|
+
expect(
|
|
390
|
+
link.getAttribute("href"),
|
|
391
|
+
"href must be forwarded for navigation",
|
|
392
|
+
).toBe("/docs/getting-started");
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
it("should add rel='noopener noreferrer' when target is _blank", () => {
|
|
396
|
+
render(
|
|
397
|
+
<Button as="link" href="https://example.com" target="_blank">
|
|
398
|
+
External
|
|
399
|
+
</Button>,
|
|
400
|
+
);
|
|
401
|
+
const link = screen.getByRole("link", { name: "External" });
|
|
402
|
+
expect(
|
|
403
|
+
link.getAttribute("rel"),
|
|
404
|
+
"External tabs must include noopener/noreferrer for tab safety",
|
|
405
|
+
).toBe("noopener noreferrer");
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it("should omit rel when target is not _blank", () => {
|
|
409
|
+
render(
|
|
410
|
+
<Button as="link" href="/internal" target="_self">
|
|
411
|
+
Internal
|
|
412
|
+
</Button>,
|
|
413
|
+
);
|
|
414
|
+
const link = screen.getByRole("link", { name: "Internal" });
|
|
415
|
+
expect(
|
|
416
|
+
link.getAttribute("rel"),
|
|
417
|
+
"rel should not be forced for same-context navigation",
|
|
418
|
+
).toBeNull();
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
it("should still stamp data-slot on anchors for consistent styling hooks", () => {
|
|
422
|
+
render(
|
|
423
|
+
<Button as="link" href="/pricing">
|
|
424
|
+
Pricing
|
|
425
|
+
</Button>,
|
|
426
|
+
);
|
|
427
|
+
expect(
|
|
428
|
+
getButtonSlot().tagName,
|
|
429
|
+
"Link mode must keep the same data-slot contract",
|
|
430
|
+
).toBe("A");
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
describe("props: animation presets (smoke)", () => {
|
|
435
|
+
const animations: ButtonAnimation[] = [
|
|
436
|
+
"none",
|
|
437
|
+
"lift",
|
|
438
|
+
"press",
|
|
439
|
+
"glow",
|
|
440
|
+
"tilt",
|
|
441
|
+
"bounce",
|
|
442
|
+
];
|
|
443
|
+
|
|
444
|
+
it.each(animations)(
|
|
445
|
+
"should render without throwing when animation=%s",
|
|
446
|
+
(animation) => {
|
|
447
|
+
const { unmount } = render(
|
|
448
|
+
<ButtonAnimated animation={animation} appearance="secondary">
|
|
449
|
+
{animation}
|
|
450
|
+
</ButtonAnimated>,
|
|
451
|
+
);
|
|
452
|
+
expect(
|
|
453
|
+
getButtonSlot(),
|
|
454
|
+
`Animation preset '${animation}' must produce a mounted root`,
|
|
455
|
+
).toBeVisible();
|
|
456
|
+
unmount();
|
|
457
|
+
},
|
|
458
|
+
);
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
describe("accessibility checklist", () => {
|
|
462
|
+
it("should expose focus styles via focus-visible classes in the class list", () => {
|
|
463
|
+
render(<Button>Focusable</Button>);
|
|
464
|
+
const root = getButtonSlot();
|
|
465
|
+
expect(
|
|
466
|
+
root.className,
|
|
467
|
+
"Library buttons must ship focus-visible ring utilities for keyboard users",
|
|
468
|
+
).toMatch(/focus-visible:ring-2/);
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
it("should include disabled opacity utilities for visual vs AT state alignment", () => {
|
|
472
|
+
render(<Button disabled>Faded</Button>);
|
|
473
|
+
const root = getButtonSlot();
|
|
474
|
+
expect(
|
|
475
|
+
root.className,
|
|
476
|
+
"Disabled styling must include opacity treatment from the recipe",
|
|
477
|
+
).toMatch(/disabled:opacity-50/);
|
|
478
|
+
});
|
|
479
|
+
});
|
|
480
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// button.tsx — default static entry (no framer-motion)
|
|
2
|
+
import { ButtonBase } from "./button-base";
|
|
3
|
+
import type { ButtonProps } from "./types";
|
|
4
|
+
|
|
5
|
+
export const Button = (props: ButtonProps) => {
|
|
6
|
+
return <ButtonBase {...props} />;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Button.displayName = "Button";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentPropsWithRef } from "react";
|
|
3
|
+
|
|
4
|
+
import type { buttonVariants } from "./variants";
|
|
5
|
+
|
|
6
|
+
export type ButtonSharedStatic = VariantProps<typeof buttonVariants>;
|
|
7
|
+
|
|
8
|
+
export type ButtonProps =
|
|
9
|
+
| (ButtonSharedStatic & ComponentPropsWithRef<"button"> & {
|
|
10
|
+
as?: "button";
|
|
11
|
+
})
|
|
12
|
+
| (ButtonSharedStatic & ComponentPropsWithRef<"a"> & { as: "link" });
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
export const buttonVariants = cva(
|
|
4
|
+
[
|
|
5
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl",
|
|
6
|
+
"text-sm font-medium ring-offset-slate-950 transition-colors",
|
|
7
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-300 focus-visible:ring-offset-2",
|
|
8
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
9
|
+
"select-none",
|
|
10
|
+
],
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
appearance: {
|
|
14
|
+
default:
|
|
15
|
+
"bg-slate-50 text-slate-950 shadow-[0_1px_2px_rgba(15,23,42,0.12)] hover:bg-white",
|
|
16
|
+
secondary: "bg-slate-800 text-slate-50 hover:bg-slate-700",
|
|
17
|
+
destructive: "bg-rose-600 text-white hover:bg-rose-600",
|
|
18
|
+
outline:
|
|
19
|
+
"border border-white/10 bg-white/5 text-slate-50 hover:bg-white/10",
|
|
20
|
+
ghost: "bg-transparent text-slate-200 hover:bg-white/5",
|
|
21
|
+
link: "bg-transparent text-cyan-300 underline-offset-4 hover:underline",
|
|
22
|
+
glass:
|
|
23
|
+
"border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15",
|
|
24
|
+
emerald: "bg-emerald-600 text-white hover:bg-emerald-600",
|
|
25
|
+
indigo: "bg-indigo-600 text-white hover:bg-indigo-600",
|
|
26
|
+
purple: "bg-purple-600 text-white hover:bg-purple-600",
|
|
27
|
+
pink: "bg-pink-600 text-white hover:bg-pink-600",
|
|
28
|
+
rose: "bg-rose-600 text-white hover:bg-rose-600",
|
|
29
|
+
sky: "bg-sky-600 text-white hover:bg-sky-600",
|
|
30
|
+
teal: "bg-teal-600 text-white hover:bg-teal-600",
|
|
31
|
+
yellow: "bg-yellow-600 text-white hover:bg-yellow-600",
|
|
32
|
+
orange: "bg-orange-600 text-white hover:bg-orange-600",
|
|
33
|
+
gray: "bg-gray-600 text-white hover:bg-gray-600",
|
|
34
|
+
amber: "bg-amber-600 text-white hover:bg-amber-600",
|
|
35
|
+
violet: "bg-violet-600 text-white hover:bg-violet-600",
|
|
36
|
+
"gradient-blue":
|
|
37
|
+
"bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-600 hover:to-purple-600",
|
|
38
|
+
"gradient-green":
|
|
39
|
+
"bg-gradient-to-r from-green-600 to-lime-600 text-white hover:from-green-600 hover:to-lime-600",
|
|
40
|
+
"gradient-red":
|
|
41
|
+
"bg-gradient-to-r from-red-600 to-pink-600 text-white hover:from-red-600 hover:to-pink-600",
|
|
42
|
+
"gradient-yellow":
|
|
43
|
+
"bg-gradient-to-r from-yellow-600 to-orange-600 text-white hover:from-yellow-600 hover:to-orange-600",
|
|
44
|
+
"gradient-purple":
|
|
45
|
+
"bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-600 hover:to-pink-600",
|
|
46
|
+
"gradient-teal":
|
|
47
|
+
"bg-gradient-to-r from-teal-600 to-cyan-600 text-white hover:from-teal-600 hover:to-cyan-600",
|
|
48
|
+
"gradient-indigo":
|
|
49
|
+
"bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-600 hover:to-purple-600",
|
|
50
|
+
"gradient-pink":
|
|
51
|
+
"bg-gradient-to-r from-pink-600 to-rose-600 text-white hover:from-pink-600 hover:to-rose-600",
|
|
52
|
+
"gradient-orange":
|
|
53
|
+
"bg-gradient-to-r from-orange-600 to-red-600 text-white hover:from-orange-600 hover:to-red-600",
|
|
54
|
+
},
|
|
55
|
+
size: {
|
|
56
|
+
sm: "h-7 md:h-9 px-3 text-xs",
|
|
57
|
+
md: "h-9 md:h-11 px-4",
|
|
58
|
+
lg: "h-10 md:h-12 px-5 text-base",
|
|
59
|
+
xl: "h-12 md:h-14 px-6 text-lg",
|
|
60
|
+
"2xl": "h-14 md:h-16 px-6 md:px-8 text-xl",
|
|
61
|
+
"3xl": "h-16 md:h-18 px-8 md:px-10 text-2xl",
|
|
62
|
+
"4xl": "h-18 md:h-20 px-10 md:px-12 text-2xl",
|
|
63
|
+
"5xl": "h-20 md:h-22 px-12 md:px-14 text-2xl",
|
|
64
|
+
"6xl": "h-22 md:h-24 px-14 md:px-16 text-2xl",
|
|
65
|
+
"7xl": "h-24 md:h-26 px-16 md:px-18 text-2xl",
|
|
66
|
+
"8xl": "h-26 md:h-28 px-20 text-2xl",
|
|
67
|
+
"9xl": "h-24 md:h-30 px-18 md:px-22 text-2xl",
|
|
68
|
+
"10xl": "h-26 md:h-32 px-20 md:px-24 text-2xl",
|
|
69
|
+
icon: "h-10 w-10",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
appearance: "default",
|
|
74
|
+
size: "md",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
|
|
3
|
+
import type { CardAnimation } from "./types";
|
|
4
|
+
|
|
5
|
+
type CardPresetMotionProps = Pick<
|
|
6
|
+
HTMLMotionProps<"article">,
|
|
7
|
+
"style" | "transition" | "whileHover" | "whileTap"
|
|
8
|
+
>;
|
|
9
|
+
|
|
10
|
+
export type CardAnimationPresets = Record<CardAnimation, CardPresetMotionProps>;
|
|
11
|
+
|
|
12
|
+
export const cardAnimationPresets: CardAnimationPresets = {
|
|
13
|
+
none: {},
|
|
14
|
+
lift: {
|
|
15
|
+
whileHover: { y: -4, scale: 1.01 },
|
|
16
|
+
whileTap: { y: 0, scale: 0.995 },
|
|
17
|
+
transition: { type: "spring", stiffness: 380, damping: 26 },
|
|
18
|
+
},
|
|
19
|
+
glow: {
|
|
20
|
+
whileHover: {
|
|
21
|
+
boxShadow:
|
|
22
|
+
"0 0 0 1px rgba(255,255,255,0.18), 0 22px 48px rgba(15,23,42,0.45)",
|
|
23
|
+
},
|
|
24
|
+
transition: { duration: 0.22, ease: "easeOut" },
|
|
25
|
+
},
|
|
26
|
+
tilt: {
|
|
27
|
+
whileHover: { rotateX: 4, rotateY: -4, scale: 1.01 },
|
|
28
|
+
whileTap: { rotateX: 0, rotateY: 0, scale: 0.99 },
|
|
29
|
+
transition: { type: "spring", stiffness: 280, damping: 22 },
|
|
30
|
+
style: { transformStyle: "preserve-3d" },
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { motion } from "framer-motion";
|
|
4
|
+
|
|
5
|
+
import { cardAnimationPresets } from "./animations";
|
|
6
|
+
import { CardBase } from "../card-base";
|
|
7
|
+
import type { CardBaseProps } from "../types";
|
|
8
|
+
import type { CardAnimatedProps } from "./types";
|
|
9
|
+
|
|
10
|
+
export function CardAnimated({
|
|
11
|
+
animation = "none",
|
|
12
|
+
...props
|
|
13
|
+
}: CardAnimatedProps) {
|
|
14
|
+
const motionProps = cardAnimationPresets[animation];
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<CardBase
|
|
18
|
+
{...({
|
|
19
|
+
as: motion.article,
|
|
20
|
+
initial: false,
|
|
21
|
+
...motionProps,
|
|
22
|
+
...props,
|
|
23
|
+
} as CardBaseProps)}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
CardAnimated.displayName = "CardAnimated";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
export { CardAnimated } from "./card-animated";
|
|
4
|
+
export {
|
|
5
|
+
CardBody,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardFooter,
|
|
8
|
+
CardHeader,
|
|
9
|
+
CardTitle,
|
|
10
|
+
} from "../card-base";
|
|
11
|
+
export type { CardAnimatedProps } from "./types";
|
|
12
|
+
export { cardAnimationPresets } from "./animations";
|