@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,39 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { CSSProperties, HTMLAttributes, ReactNode, Ref, RefObject } from "react";
|
|
3
|
+
|
|
4
|
+
import type { drawerContentVariants, drawerTriggerVariants } from "./variants";
|
|
5
|
+
|
|
6
|
+
export type DrawerContentVariantProps = VariantProps<typeof drawerContentVariants>;
|
|
7
|
+
|
|
8
|
+
export type DrawerProps = {
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type DrawerTriggerProps = HTMLAttributes<HTMLButtonElement> & {
|
|
16
|
+
ref?: Ref<HTMLButtonElement>;
|
|
17
|
+
appearance?: VariantProps<typeof drawerTriggerVariants>["appearance"];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type DrawerContentProps = DrawerContentVariantProps & {
|
|
21
|
+
className?: string;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
ref?: Ref<HTMLDivElement>;
|
|
24
|
+
id?: string;
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type DrawerSectionProps = {
|
|
29
|
+
className?: string;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type DrawerCtx = {
|
|
34
|
+
open: boolean;
|
|
35
|
+
setOpen: (next: boolean) => void;
|
|
36
|
+
titleId: string;
|
|
37
|
+
descriptionId: string;
|
|
38
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
39
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
export const drawerOverlayVariants = cva(
|
|
4
|
+
"fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm",
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
export const drawerTriggerVariants = cva(
|
|
8
|
+
"relative inline-flex shrink-0 cursor-pointer rounded-md border",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
appearance: {
|
|
12
|
+
default: "bg-slate-950",
|
|
13
|
+
glass: "border-white/15 bg-slate-950/70 backdrop-blur-xl",
|
|
14
|
+
sky: "border-sky-600 bg-sky-950/70 backdrop-blur-xl",
|
|
15
|
+
rose: "border-rose-600 bg-rose-950/70 backdrop-blur-xl",
|
|
16
|
+
purple: "border-purple-600 bg-purple-950/70 backdrop-blur-xl",
|
|
17
|
+
pink: "border-pink-600 bg-pink-950/70 backdrop-blur-xl",
|
|
18
|
+
orange: "border-orange-600 bg-orange-950/70 backdrop-blur-xl",
|
|
19
|
+
yellow: "border-yellow-600 bg-yellow-950/70 backdrop-blur-xl",
|
|
20
|
+
teal: "border-teal-600 bg-teal-950/70 backdrop-blur-xl",
|
|
21
|
+
indigo: "border-indigo-600 bg-indigo-950/70 backdrop-blur-xl",
|
|
22
|
+
emerald: "border-emerald-600 bg-emerald-950/70 backdrop-blur-xl",
|
|
23
|
+
gray: "border-gray-600 bg-gray-950/70 backdrop-blur-xl",
|
|
24
|
+
amber: "border-amber-600 bg-amber-950/70 backdrop-blur-xl",
|
|
25
|
+
violet: "border-violet-600 bg-violet-950/70 backdrop-blur-xl",
|
|
26
|
+
"gradient-blue":
|
|
27
|
+
"border-gradient-to-r from-blue-600 to-purple-600 bg-gradient-to-r from-blue-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
28
|
+
"gradient-green":
|
|
29
|
+
"border-gradient-to-r from-green-600 to-lime-600 bg-gradient-to-r from-green-950/70 to-lime-950/70 backdrop-blur-xl",
|
|
30
|
+
"gradient-red":
|
|
31
|
+
"border-gradient-to-r from-red-600 to-pink-600 bg-gradient-to-r from-red-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
32
|
+
"gradient-yellow":
|
|
33
|
+
"border-gradient-to-r from-yellow-600 to-orange-600 bg-gradient-to-r from-yellow-950/70 to-orange-950/70 backdrop-blur-xl",
|
|
34
|
+
"gradient-purple":
|
|
35
|
+
"border-gradient-to-r from-purple-600 to-pink-600 bg-gradient-to-r from-purple-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
36
|
+
"gradient-teal":
|
|
37
|
+
"border-gradient-to-r from-teal-600 to-cyan-600 bg-gradient-to-r from-teal-950/70 to-cyan-950/70 backdrop-blur-xl",
|
|
38
|
+
"gradient-indigo":
|
|
39
|
+
"border-gradient-to-r from-indigo-600 to-purple-600 bg-gradient-to-r from-indigo-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
40
|
+
"gradient-pink":
|
|
41
|
+
"border-gradient-to-r from-pink-600 to-rose-600 bg-gradient-to-r from-pink-950/70 to-rose-950/70 backdrop-blur-xl",
|
|
42
|
+
"gradient-orange":
|
|
43
|
+
"border-gradient-to-r from-orange-600 to-red-600 bg-gradient-to-r from-orange-950/70 to-red-950/70 backdrop-blur-xl",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
appearance: "default",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export const drawerContentVariants = cva(
|
|
53
|
+
"fixed z-50 flex max-h-[min(92vh,900px)] flex-col border border-white/10 bg-slate-950 p-6 text-slate-50 shadow-[0_24px_80px_rgba(15,23,42,0.55)] focus:outline-none",
|
|
54
|
+
{
|
|
55
|
+
variants: {
|
|
56
|
+
side: {
|
|
57
|
+
left: "left-0 top-0 h-full w-[min(100%,420px)]",
|
|
58
|
+
right: "right-0 top-0 h-full w-[min(100%,420px)]",
|
|
59
|
+
top: "left-0 top-0 w-full max-h-[min(92vh,520px)]",
|
|
60
|
+
bottom: "bottom-0 left-0 w-full max-h-[min(92vh,520px)]",
|
|
61
|
+
},
|
|
62
|
+
size: {
|
|
63
|
+
sm: "",
|
|
64
|
+
md: "",
|
|
65
|
+
lg: "",
|
|
66
|
+
xl: "",
|
|
67
|
+
full: "",
|
|
68
|
+
},
|
|
69
|
+
appearance: {
|
|
70
|
+
default: "bg-slate-950",
|
|
71
|
+
glass: "border-white/15 bg-slate-950/70 backdrop-blur-xl",
|
|
72
|
+
sky: "border-sky-600 bg-sky-950/70 backdrop-blur-xl",
|
|
73
|
+
rose: "border-rose-600 bg-rose-950/70 backdrop-blur-xl",
|
|
74
|
+
purple: "border-purple-600 bg-purple-950/70 backdrop-blur-xl",
|
|
75
|
+
pink: "border-pink-600 bg-pink-950/70 backdrop-blur-xl",
|
|
76
|
+
orange: "border-orange-600 bg-orange-950/70 backdrop-blur-xl",
|
|
77
|
+
yellow: "border-yellow-600 bg-yellow-950/70 backdrop-blur-xl",
|
|
78
|
+
teal: "border-teal-600 bg-teal-950/70 backdrop-blur-xl",
|
|
79
|
+
indigo: "border-indigo-600 bg-indigo-950/70 backdrop-blur-xl",
|
|
80
|
+
emerald: "border-emerald-600 bg-emerald-950/70 backdrop-blur-xl",
|
|
81
|
+
gray: "border-gray-600 bg-gray-950/70 backdrop-blur-xl",
|
|
82
|
+
amber: "border-amber-600 bg-amber-950/70 backdrop-blur-xl",
|
|
83
|
+
violet: "border-violet-600 bg-violet-950/70 backdrop-blur-xl",
|
|
84
|
+
"gradient-blue":
|
|
85
|
+
"border-gradient-to-r from-blue-600 to-purple-600 bg-gradient-to-r from-blue-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
86
|
+
"gradient-green":
|
|
87
|
+
"border-gradient-to-r from-green-600 to-lime-600 bg-gradient-to-r from-green-950/70 to-lime-950/70 backdrop-blur-xl",
|
|
88
|
+
"gradient-red":
|
|
89
|
+
"border-gradient-to-r from-red-600 to-pink-600 bg-gradient-to-r from-red-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
90
|
+
"gradient-yellow":
|
|
91
|
+
"border-gradient-to-r from-yellow-600 to-orange-600 bg-gradient-to-r from-yellow-950/70 to-orange-950/70 backdrop-blur-xl",
|
|
92
|
+
"gradient-purple":
|
|
93
|
+
"border-gradient-to-r from-purple-600 to-pink-600 bg-gradient-to-r from-purple-950/70 to-pink-950/70 backdrop-blur-xl",
|
|
94
|
+
"gradient-teal":
|
|
95
|
+
"border-gradient-to-r from-teal-600 to-cyan-600 bg-gradient-to-r from-teal-950/70 to-cyan-950/70 backdrop-blur-xl",
|
|
96
|
+
"gradient-indigo":
|
|
97
|
+
"border-gradient-to-r from-indigo-600 to-purple-600 bg-gradient-to-r from-indigo-950/70 to-purple-950/70 backdrop-blur-xl",
|
|
98
|
+
"gradient-pink":
|
|
99
|
+
"border-gradient-to-r from-pink-600 to-rose-600 bg-gradient-to-r from-pink-950/70 to-rose-950/70 backdrop-blur-xl",
|
|
100
|
+
"gradient-orange":
|
|
101
|
+
"border-gradient-to-r from-orange-600 to-red-600 bg-gradient-to-r from-orange-950/70 to-red-950/70 backdrop-blur-xl",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
compoundVariants: [
|
|
105
|
+
{ side: "left", size: "sm", class: "w-[min(100%,320px)]" },
|
|
106
|
+
{ side: "left", size: "md", class: "w-[min(100%,420px)]" },
|
|
107
|
+
{ side: "left", size: "lg", class: "w-[min(100%,520px)]" },
|
|
108
|
+
{ side: "left", size: "xl", class: "w-[min(100%,640px)]" },
|
|
109
|
+
{ side: "left", size: "full", class: "w-full max-w-none" },
|
|
110
|
+
{ side: "right", size: "sm", class: "w-[min(100%,320px)]" },
|
|
111
|
+
{ side: "right", size: "md", class: "w-[min(100%,420px)]" },
|
|
112
|
+
{ side: "right", size: "lg", class: "w-[min(100%,520px)]" },
|
|
113
|
+
{ side: "right", size: "xl", class: "w-[min(100%,640px)]" },
|
|
114
|
+
{ side: "right", size: "full", class: "w-full max-w-none" },
|
|
115
|
+
],
|
|
116
|
+
defaultVariants: {
|
|
117
|
+
side: "right",
|
|
118
|
+
size: "md",
|
|
119
|
+
appearance: "default",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
);
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
|
2
|
+
import userEvent from "@testing-library/user-event";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Dropdown,
|
|
7
|
+
DropdownContent,
|
|
8
|
+
DropdownItem,
|
|
9
|
+
DropdownTrigger,
|
|
10
|
+
} from "./dropdown";
|
|
11
|
+
|
|
12
|
+
describe("Dropdown", () => {
|
|
13
|
+
it("should show menu content when the trigger is clicked", async () => {
|
|
14
|
+
const user = userEvent.setup();
|
|
15
|
+
render(
|
|
16
|
+
<Dropdown>
|
|
17
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
18
|
+
<DropdownContent>
|
|
19
|
+
<DropdownItem value="a">Alpha</DropdownItem>
|
|
20
|
+
</DropdownContent>
|
|
21
|
+
</Dropdown>,
|
|
22
|
+
);
|
|
23
|
+
await user.click(screen.getByRole("button", { name: "Menu" }));
|
|
24
|
+
expect(screen.getByText("Alpha")).toBeVisible();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("should close the menu after selecting an item when multiSelect is false", async () => {
|
|
28
|
+
const user = userEvent.setup();
|
|
29
|
+
render(
|
|
30
|
+
<Dropdown defaultOpen>
|
|
31
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
32
|
+
<DropdownContent>
|
|
33
|
+
<DropdownItem value="a">Alpha</DropdownItem>
|
|
34
|
+
</DropdownContent>
|
|
35
|
+
</Dropdown>,
|
|
36
|
+
);
|
|
37
|
+
await user.click(screen.getByText("Alpha"));
|
|
38
|
+
await waitFor(() => {
|
|
39
|
+
expect(screen.queryByText("Alpha")).not.toBeInTheDocument();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("should keep the menu open after selecting when multiSelect is true", async () => {
|
|
44
|
+
const user = userEvent.setup();
|
|
45
|
+
render(
|
|
46
|
+
<Dropdown defaultOpen multiSelect>
|
|
47
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
48
|
+
<DropdownContent>
|
|
49
|
+
<DropdownItem value="a">Alpha</DropdownItem>
|
|
50
|
+
<DropdownItem value="b">Beta</DropdownItem>
|
|
51
|
+
</DropdownContent>
|
|
52
|
+
</Dropdown>,
|
|
53
|
+
);
|
|
54
|
+
await user.click(screen.getByText("Alpha"));
|
|
55
|
+
expect(screen.getByText("Beta")).toBeInTheDocument();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("should invoke onSelect when an item is picked", async () => {
|
|
59
|
+
const user = userEvent.setup();
|
|
60
|
+
const handleSelect = vi.fn();
|
|
61
|
+
render(
|
|
62
|
+
<Dropdown defaultOpen>
|
|
63
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
64
|
+
<DropdownContent>
|
|
65
|
+
<DropdownItem value="a" onSelect={handleSelect}>
|
|
66
|
+
Alpha
|
|
67
|
+
</DropdownItem>
|
|
68
|
+
</DropdownContent>
|
|
69
|
+
</Dropdown>,
|
|
70
|
+
);
|
|
71
|
+
await user.click(screen.getByText("Alpha"));
|
|
72
|
+
expect(handleSelect).toHaveBeenCalledTimes(1);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it("should close when clicking outside the menu", async () => {
|
|
76
|
+
const user = userEvent.setup();
|
|
77
|
+
render(
|
|
78
|
+
<div>
|
|
79
|
+
<Dropdown defaultOpen>
|
|
80
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
81
|
+
<DropdownContent>
|
|
82
|
+
<DropdownItem value="a">Alpha</DropdownItem>
|
|
83
|
+
</DropdownContent>
|
|
84
|
+
</Dropdown>
|
|
85
|
+
<button type="button">Outside</button>
|
|
86
|
+
</div>,
|
|
87
|
+
);
|
|
88
|
+
expect(screen.getByText("Alpha")).toBeInTheDocument();
|
|
89
|
+
await user.click(screen.getByRole("button", { name: "Outside" }));
|
|
90
|
+
await waitFor(() => {
|
|
91
|
+
expect(screen.queryByText("Alpha")).not.toBeInTheDocument();
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("should activate an item with Enter while focused", () => {
|
|
96
|
+
const handleSelect = vi.fn();
|
|
97
|
+
render(
|
|
98
|
+
<Dropdown defaultOpen>
|
|
99
|
+
<DropdownTrigger>Menu</DropdownTrigger>
|
|
100
|
+
<DropdownContent>
|
|
101
|
+
<DropdownItem value="a" onSelect={handleSelect}>
|
|
102
|
+
Alpha
|
|
103
|
+
</DropdownItem>
|
|
104
|
+
</DropdownContent>
|
|
105
|
+
</Dropdown>,
|
|
106
|
+
);
|
|
107
|
+
const item = screen
|
|
108
|
+
.getByText("Alpha")
|
|
109
|
+
.closest('div[tabindex="0"]') as HTMLElement;
|
|
110
|
+
item.focus();
|
|
111
|
+
fireEvent.keyDown(item, { key: "Enter" });
|
|
112
|
+
expect(handleSelect).toHaveBeenCalledTimes(1);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useState, useRef, useEffect } from "react";
|
|
4
|
+
import { FiCheck } from "react-icons/fi";
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
|
+
import type {
|
|
7
|
+
DropdownContextType,
|
|
8
|
+
DropdownProps,
|
|
9
|
+
DropdownTriggerProps,
|
|
10
|
+
DropdownContentProps,
|
|
11
|
+
DropdownItemProps,
|
|
12
|
+
} from "./types";
|
|
13
|
+
import { triggerVariants, contentVariants, itemVariants } from "./variants";
|
|
14
|
+
import { useClickOutside } from "../../hooks/useClickOutside";
|
|
15
|
+
|
|
16
|
+
/* =========================
|
|
17
|
+
Context
|
|
18
|
+
========================= */
|
|
19
|
+
const DropdownContext = createContext<DropdownContextType | null>(null);
|
|
20
|
+
|
|
21
|
+
const useDropdown = () => {
|
|
22
|
+
const ctx = useContext(DropdownContext);
|
|
23
|
+
if (!ctx) throw new Error("Use inside Dropdown");
|
|
24
|
+
return ctx;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/* =========================
|
|
28
|
+
Root
|
|
29
|
+
========================= */
|
|
30
|
+
export const Dropdown = ({
|
|
31
|
+
children,
|
|
32
|
+
defaultOpen = false,
|
|
33
|
+
open: controlledOpen,
|
|
34
|
+
onOpenChange,
|
|
35
|
+
multiSelect = false,
|
|
36
|
+
}: DropdownProps) => {
|
|
37
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
38
|
+
const [selectedValues, setSelectedValues] = useState<string[]>([]);
|
|
39
|
+
|
|
40
|
+
const open = controlledOpen ?? uncontrolledOpen;
|
|
41
|
+
|
|
42
|
+
const setOpen = (val: boolean) => {
|
|
43
|
+
if (controlledOpen !== undefined) {
|
|
44
|
+
onOpenChange?.(val);
|
|
45
|
+
} else {
|
|
46
|
+
setUncontrolledOpen(val);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const toggle = () => setOpen(!open);
|
|
51
|
+
|
|
52
|
+
const toggleSelect = (value: string) => {
|
|
53
|
+
if (!multiSelect) {
|
|
54
|
+
setSelectedValues([value]);
|
|
55
|
+
setOpen(false);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
setSelectedValues((prev) =>
|
|
60
|
+
prev.includes(value) ? prev.filter((v) => v !== value) : [...prev, value],
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<DropdownContext.Provider
|
|
66
|
+
value={{
|
|
67
|
+
open,
|
|
68
|
+
setOpen,
|
|
69
|
+
toggle,
|
|
70
|
+
selectedValues,
|
|
71
|
+
toggleSelect,
|
|
72
|
+
multiSelect,
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<div className="relative inline-block">{children}</div>
|
|
76
|
+
</DropdownContext.Provider>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/* =========================
|
|
81
|
+
Trigger
|
|
82
|
+
========================= */
|
|
83
|
+
export const DropdownTrigger = ({
|
|
84
|
+
children,
|
|
85
|
+
className,
|
|
86
|
+
variant,
|
|
87
|
+
size,
|
|
88
|
+
...props
|
|
89
|
+
}: DropdownTriggerProps) => {
|
|
90
|
+
const { toggle } = useDropdown();
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<button
|
|
94
|
+
onClick={toggle}
|
|
95
|
+
className={cn(triggerVariants({ variant, size }), className)}
|
|
96
|
+
{...props}
|
|
97
|
+
>
|
|
98
|
+
{children}
|
|
99
|
+
</button>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/* =========================
|
|
104
|
+
Content
|
|
105
|
+
========================= */
|
|
106
|
+
export const DropdownContent = ({
|
|
107
|
+
children,
|
|
108
|
+
className,
|
|
109
|
+
placement = "bottom",
|
|
110
|
+
spacing = "default",
|
|
111
|
+
divider,
|
|
112
|
+
...props
|
|
113
|
+
}: DropdownContentProps) => {
|
|
114
|
+
const { open, setOpen } = useDropdown();
|
|
115
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
116
|
+
|
|
117
|
+
// click outside
|
|
118
|
+
useClickOutside({ ref, setOpen });
|
|
119
|
+
|
|
120
|
+
if (!open) return null;
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div
|
|
124
|
+
ref={ref}
|
|
125
|
+
className={cn(
|
|
126
|
+
contentVariants({ placement, spacing }),
|
|
127
|
+
className,
|
|
128
|
+
divider && "divide-y divide-current",
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/* =========================
|
|
138
|
+
Item
|
|
139
|
+
========================= */
|
|
140
|
+
export const DropdownItem = ({
|
|
141
|
+
children,
|
|
142
|
+
value,
|
|
143
|
+
className,
|
|
144
|
+
variant,
|
|
145
|
+
onSelect,
|
|
146
|
+
leftIcon,
|
|
147
|
+
rightIcon,
|
|
148
|
+
...props
|
|
149
|
+
}: DropdownItemProps) => {
|
|
150
|
+
const { toggleSelect, selectedValues } = useDropdown();
|
|
151
|
+
const isSelected = selectedValues.includes(value);
|
|
152
|
+
|
|
153
|
+
const handleClick = () => {
|
|
154
|
+
toggleSelect(value);
|
|
155
|
+
onSelect?.();
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<div
|
|
160
|
+
tabIndex={0}
|
|
161
|
+
onClick={handleClick}
|
|
162
|
+
onKeyDown={(e) => {
|
|
163
|
+
if (e.key === "Enter") handleClick();
|
|
164
|
+
}}
|
|
165
|
+
className={cn(itemVariants({ variant }), className)}
|
|
166
|
+
{...props}
|
|
167
|
+
>
|
|
168
|
+
<div className="flex items-center gap-2">
|
|
169
|
+
{leftIcon}
|
|
170
|
+
{children}
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div className="flex items-center gap-2">
|
|
174
|
+
{isSelected && <FiCheck />}
|
|
175
|
+
{rightIcon}
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Dropdown,
|
|
5
|
+
DropdownTrigger,
|
|
6
|
+
DropdownContent,
|
|
7
|
+
DropdownItem,
|
|
8
|
+
} from "./dropdown";
|
|
9
|
+
export type {
|
|
10
|
+
DropdownProps,
|
|
11
|
+
DropdownTriggerProps,
|
|
12
|
+
DropdownContentProps,
|
|
13
|
+
DropdownItemProps,
|
|
14
|
+
} from "./types";
|
|
15
|
+
export { triggerVariants, contentVariants, itemVariants } from "./variants";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export type DropdownContextType = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen: (open: boolean) => void;
|
|
6
|
+
toggle: () => void;
|
|
7
|
+
selectedValues: string[];
|
|
8
|
+
toggleSelect: (value: string) => void;
|
|
9
|
+
multiSelect: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type Variant =
|
|
13
|
+
| "default"
|
|
14
|
+
| "outline"
|
|
15
|
+
| "ghost"
|
|
16
|
+
| "white"
|
|
17
|
+
| "black"
|
|
18
|
+
| "sky"
|
|
19
|
+
| "rose"
|
|
20
|
+
| "purple"
|
|
21
|
+
| "pink"
|
|
22
|
+
| "orange"
|
|
23
|
+
| "yellow"
|
|
24
|
+
| "teal"
|
|
25
|
+
| "indigo"
|
|
26
|
+
| "emerald"
|
|
27
|
+
| "gray"
|
|
28
|
+
| "amber"
|
|
29
|
+
| "violet"
|
|
30
|
+
| "gradient-blue"
|
|
31
|
+
| "gradient-green"
|
|
32
|
+
| "gradient-red"
|
|
33
|
+
| "gradient-yellow"
|
|
34
|
+
| "gradient-purple"
|
|
35
|
+
| "gradient-teal"
|
|
36
|
+
| "gradient-indigo"
|
|
37
|
+
| "gradient-pink"
|
|
38
|
+
| "gradient-orange";
|
|
39
|
+
|
|
40
|
+
export type DropdownProps = {
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
defaultOpen?: boolean;
|
|
43
|
+
open?: boolean;
|
|
44
|
+
onOpenChange?: (open: boolean) => void;
|
|
45
|
+
multiSelect?: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type DropdownTriggerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
variant?: Variant;
|
|
51
|
+
size?: "sm" | "md" | "lg";
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type DropdownContentProps = HTMLAttributes<HTMLDivElement> & {
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
57
|
+
spacing?: "none" | "default" | "sm" | "md" | "lg" | "xl";
|
|
58
|
+
divider?: boolean;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type DropdownItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
value: string;
|
|
64
|
+
onSelect?: () => void;
|
|
65
|
+
leftIcon?: ReactNode;
|
|
66
|
+
rightIcon?: ReactNode;
|
|
67
|
+
variant?: Variant;
|
|
68
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
export const triggerVariants = cva(
|
|
4
|
+
"inline-flex items-center justify-between rounded-md font-medium transition focus:outline-none cursor-pointer",
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-gray-900 text-white",
|
|
9
|
+
outline: "border border-gray-300",
|
|
10
|
+
ghost: "bg-transparent",
|
|
11
|
+
white: "bg-white text-gray-900",
|
|
12
|
+
black: "bg-black text-white",
|
|
13
|
+
sky: "border border-sky-600 text-sky-600",
|
|
14
|
+
rose: "border border-rose-600 text-rose-600",
|
|
15
|
+
purple: "border border-purple-600 text-purple-600",
|
|
16
|
+
pink: "border border-pink-600 text-pink-600",
|
|
17
|
+
orange: "border border-orange-600 text-orange-600",
|
|
18
|
+
yellow: "border border-yellow-600 text-yellow-600",
|
|
19
|
+
teal: "border border-teal-600 text-teal-600",
|
|
20
|
+
indigo: "border border-indigo-600 text-indigo-600",
|
|
21
|
+
emerald: "border border-emerald-600 text-emerald-600",
|
|
22
|
+
gray: "border border-gray-600 text-gray-600",
|
|
23
|
+
amber: "border border-amber-600 text-amber-600",
|
|
24
|
+
violet: "border border-violet-600 text-violet-600",
|
|
25
|
+
"gradient-blue":
|
|
26
|
+
"bg-gradient-to-r from-blue-600 to-purple-600 text-gradient-to-r from-blue-600 to-purple-600",
|
|
27
|
+
"gradient-green":
|
|
28
|
+
"bg-gradient-to-r from-green-600 to-lime-600 text-gradient-to-r from-green-600 to-lime-600",
|
|
29
|
+
"gradient-red":
|
|
30
|
+
"bg-gradient-to-r from-red-600 to-pink-600 text-gradient-to-r from-red-600 to-pink-600",
|
|
31
|
+
"gradient-yellow":
|
|
32
|
+
"bg-gradient-to-r from-yellow-600 to-orange-600 text-gradient-to-r from-yellow-600 to-orange-600",
|
|
33
|
+
"gradient-purple":
|
|
34
|
+
"bg-gradient-to-r from-purple-600 to-pink-600 text-gradient-to-r from-purple-600 to-pink-600",
|
|
35
|
+
"gradient-teal":
|
|
36
|
+
"bg-gradient-to-r from-teal-600 to-cyan-600 text-gradient-to-r from-teal-600 to-cyan-600",
|
|
37
|
+
"gradient-indigo":
|
|
38
|
+
"bg-gradient-to-r from-indigo-600 to-purple-600 text-gradient-to-r from-indigo-600 to-purple-600",
|
|
39
|
+
"gradient-pink":
|
|
40
|
+
"bg-gradient-to-r from-pink-600 to-rose-600 text-gradient-to-r from-pink-600 to-rose-600",
|
|
41
|
+
"gradient-orange":
|
|
42
|
+
"bg-gradient-to-r from-orange-600 to-red-600 text-gradient-to-r from-orange-600 to-red-600",
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
sm: "px-2 py-1 text-sm",
|
|
46
|
+
md: "px-3 py-2 text-base",
|
|
47
|
+
lg: "px-4 py-3 text-lg",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "md",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
export const contentVariants = cva(
|
|
58
|
+
"absolute min-w-[200px] rounded-md p-2 shadow-md z-50 border",
|
|
59
|
+
{
|
|
60
|
+
variants: {
|
|
61
|
+
placement: {
|
|
62
|
+
top: "bottom-full mb-2",
|
|
63
|
+
bottom: "top-full mt-2",
|
|
64
|
+
left: "right-full mr-2",
|
|
65
|
+
right: "left-full ml-2",
|
|
66
|
+
},
|
|
67
|
+
spacing: {
|
|
68
|
+
none: "space-y-0",
|
|
69
|
+
default: "space-y-1",
|
|
70
|
+
sm: "space-y-2",
|
|
71
|
+
md: "space-y-3",
|
|
72
|
+
lg: "space-y-4",
|
|
73
|
+
xl: "space-y-5",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
placement: "bottom",
|
|
78
|
+
spacing: "default",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
export const itemVariants = cva(
|
|
84
|
+
"flex items-center justify-between px-3 py-2 text-sm cursor-pointer rounded-md transition-colors",
|
|
85
|
+
{
|
|
86
|
+
variants: {
|
|
87
|
+
variant: {
|
|
88
|
+
default: "hover:bg-gray-100 hover:text-gray-900 text-gray-100",
|
|
89
|
+
outline:
|
|
90
|
+
"hover:bg-gray-100 hover:text-gray-900 border border-white text-gray-100",
|
|
91
|
+
ghost:
|
|
92
|
+
"hover:bg-gray-100 hover:text-gray-900 bg-transparent text-gray-100",
|
|
93
|
+
white: "hover:bg-gray-100 hover:text-gray-900 bg-white text-gray-900",
|
|
94
|
+
black: "hover:bg-gray-100 hover:text-gray-900 bg-black text-white",
|
|
95
|
+
sky: "hover:bg-sky-100 hover:text-sky-600 bg-sky-200 text-sky-800",
|
|
96
|
+
rose: "hover:bg-rose-100 hover:text-rose-600 bg-rose-200 text-rose-800",
|
|
97
|
+
purple:
|
|
98
|
+
"hover:bg-purple-100 hover:text-purple-600 bg-purple-200 text-purple-800",
|
|
99
|
+
pink: "hover:bg-pink-100 hover:text-pink-600 bg-pink-200 text-pink-800",
|
|
100
|
+
orange:
|
|
101
|
+
"hover:bg-orange-100 hover:text-orange-600 bg-orange-200 text-orange-800",
|
|
102
|
+
yellow:
|
|
103
|
+
"hover:bg-yellow-100 hover:text-yellow-600 bg-yellow-200 text-yellow-800",
|
|
104
|
+
teal: "hover:bg-teal-100 hover:text-teal-600 bg-teal-200 text-teal-800",
|
|
105
|
+
indigo:
|
|
106
|
+
"hover:bg-indigo-100 hover:text-indigo-600 bg-indigo-200 text-indigo-800",
|
|
107
|
+
emerald:
|
|
108
|
+
"hover:bg-emerald-100 hover:text-emerald-600 bg-emerald-200 text-emerald-800",
|
|
109
|
+
gray: "hover:bg-gray-100 hover:text-gray-900 bg-gray-200 text-gray-800",
|
|
110
|
+
amber:
|
|
111
|
+
"hover:bg-amber-100 hover:text-amber-600 bg-amber-200 text-amber-800",
|
|
112
|
+
violet:
|
|
113
|
+
"hover:bg-violet-100 hover:text-violet-600 bg-violet-200 text-violet-800",
|
|
114
|
+
"gradient-blue":
|
|
115
|
+
"hover:bg-gradient-to-r from-blue-600 to-purple-600 hover:text-blue-900 bg-gradient-to-r from-blue-200 to-purple-200 text-blue-800",
|
|
116
|
+
"gradient-green":
|
|
117
|
+
"hover:bg-gradient-to-r from-green-600 to-lime-600 hover:text-green-900 bg-gradient-to-r from-green-200 to-lime-200 text-green-800",
|
|
118
|
+
"gradient-red":
|
|
119
|
+
"hover:bg-gradient-to-r from-red-600 to-pink-600 hover:text-red-900 bg-gradient-to-r from-red-200 to-pink-200 text-red-800",
|
|
120
|
+
"gradient-yellow":
|
|
121
|
+
"hover:bg-gradient-to-r from-yellow-600 to-orange-600 hover:text-yellow-900 bg-gradient-to-r from-yellow-200 to-orange-200 text-yellow-800",
|
|
122
|
+
"gradient-purple":
|
|
123
|
+
"hover:bg-gradient-to-r from-purple-600 to-pink-600 hover:text-purple-900 bg-gradient-to-r from-purple-200 to-pink-200 text-purple-800",
|
|
124
|
+
"gradient-teal":
|
|
125
|
+
"hover:bg-gradient-to-r from-teal-600 to-cyan-600 hover:text-teal-900 bg-gradient-to-r from-teal-200 to-cyan-200 text-teal-800",
|
|
126
|
+
"gradient-indigo":
|
|
127
|
+
"hover:bg-gradient-to-r from-indigo-600 to-purple-600 hover:text-indigo-900 bg-gradient-to-r from-indigo-200 to-purple-200 text-indigo-800",
|
|
128
|
+
"gradient-pink":
|
|
129
|
+
"hover:bg-gradient-to-r from-pink-600 to-rose-600 hover:text-pink-900 bg-gradient-to-r from-pink-200 to-rose-200 text-pink-800",
|
|
130
|
+
"gradient-orange":
|
|
131
|
+
"hover:bg-gradient-to-r from-orange-600 to-red-600 hover:text-orange-900 bg-gradient-to-r from-orange-200 to-red-200 text-orange-800",
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
defaultVariants: {
|
|
135
|
+
variant: "default",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
);
|