@hua-labs/ui 2.1.1 → 2.2.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 +1 -1
- package/dist/{ComponentLayout-DrZpz0yv.d.mts → ComponentLayout-BhM4VSoq.d.mts} +1 -1
- package/dist/advanced-dashboard.d.mts +1 -1
- package/dist/advanced-dashboard.mjs +3 -3
- package/dist/advanced-dashboard.mjs.map +1 -1
- package/dist/advanced-emotion.mjs +1 -1
- package/dist/advanced-motion.d.mts +9 -6
- package/dist/advanced-motion.mjs +1 -1
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.mjs +2 -2
- package/dist/advanced.mjs.map +1 -1
- package/dist/chunk-5DPW7SVD.mjs +4 -0
- package/dist/{chunk-AOSXB5JJ.mjs.map → chunk-5DPW7SVD.mjs.map} +1 -1
- package/dist/chunk-5L5HIPKA.mjs +3 -0
- package/dist/{chunk-3GAUTZXQ.mjs.map → chunk-5L5HIPKA.mjs.map} +1 -1
- package/dist/chunk-A5YOVVM5.mjs +3 -0
- package/dist/chunk-A5YOVVM5.mjs.map +1 -0
- package/dist/chunk-CNW22G24.mjs +13 -0
- package/dist/chunk-CNW22G24.mjs.map +1 -0
- package/dist/chunk-CW66UBQG.mjs +3 -0
- package/dist/{chunk-6HVJFEDA.mjs.map → chunk-CW66UBQG.mjs.map} +1 -1
- package/dist/chunk-EAZEI74V.mjs +3 -0
- package/dist/chunk-EAZEI74V.mjs.map +1 -0
- package/dist/chunk-EPY3432E.mjs +3 -0
- package/dist/{chunk-MDLCJASB.mjs.map → chunk-EPY3432E.mjs.map} +1 -1
- package/dist/chunk-F2M4YDDQ.mjs +3 -0
- package/dist/{chunk-OZNST3EZ.mjs.map → chunk-F2M4YDDQ.mjs.map} +1 -1
- package/dist/chunk-FHMFDCX2.mjs +3 -0
- package/dist/{chunk-4NJE7D6X.mjs.map → chunk-FHMFDCX2.mjs.map} +1 -1
- package/dist/chunk-HBIUCLFL.mjs +3 -0
- package/dist/chunk-HBIUCLFL.mjs.map +1 -0
- package/dist/chunk-HEBXAFRY.mjs +3 -0
- package/dist/{chunk-KJZGOL2Z.mjs.map → chunk-HEBXAFRY.mjs.map} +1 -1
- package/dist/chunk-IG47LMOD.mjs +3 -0
- package/dist/{chunk-42RGFEL2.mjs.map → chunk-IG47LMOD.mjs.map} +1 -1
- package/dist/chunk-J47ZEXEL.mjs +3 -0
- package/dist/{chunk-3CCF7U3P.mjs.map → chunk-J47ZEXEL.mjs.map} +1 -1
- package/dist/chunk-K2FOFIST.mjs +3 -0
- package/dist/{chunk-IJSYSNM5.mjs.map → chunk-K2FOFIST.mjs.map} +1 -1
- package/dist/chunk-LL6QPRD7.mjs +3 -0
- package/dist/{chunk-TZ4YSHMC.mjs.map → chunk-LL6QPRD7.mjs.map} +1 -1
- package/dist/chunk-NMJLOK6M.mjs +3 -0
- package/dist/{chunk-KYRIUUQP.mjs.map → chunk-NMJLOK6M.mjs.map} +1 -1
- package/dist/chunk-O24K56OS.mjs +3 -0
- package/dist/chunk-O24K56OS.mjs.map +1 -0
- package/dist/chunk-OIWG3IJ7.mjs +3 -0
- package/dist/chunk-OIWG3IJ7.mjs.map +1 -0
- package/dist/chunk-OLLU7ZFH.mjs +3 -0
- package/dist/{chunk-XL4KTJ4L.mjs.map → chunk-OLLU7ZFH.mjs.map} +1 -1
- package/dist/chunk-Q76JW7X5.mjs +73 -0
- package/dist/chunk-Q76JW7X5.mjs.map +1 -0
- package/dist/chunk-QEMPERUK.mjs +3 -0
- package/dist/chunk-QEMPERUK.mjs.map +1 -0
- package/dist/chunk-QRM66RQG.mjs +3 -0
- package/dist/{chunk-N56BUOCD.mjs.map → chunk-QRM66RQG.mjs.map} +1 -1
- package/dist/chunk-QRRP7TGF.mjs +13 -0
- package/dist/{chunk-RS6RKW5U.mjs.map → chunk-QRRP7TGF.mjs.map} +1 -1
- package/dist/chunk-SD6XGDAC.mjs +3 -0
- package/dist/chunk-SD6XGDAC.mjs.map +1 -0
- package/dist/chunk-SDFVGFXT.mjs +3 -0
- package/dist/{chunk-CVWWS25A.mjs.map → chunk-SDFVGFXT.mjs.map} +1 -1
- package/dist/chunk-SMLDNOV3.mjs +8 -0
- package/dist/{chunk-ZXZIHU7J.mjs.map → chunk-SMLDNOV3.mjs.map} +1 -1
- package/dist/{chunk-FX57OSYG.mjs → chunk-TAP6MYDW.mjs} +2 -2
- package/dist/{chunk-FX57OSYG.mjs.map → chunk-TAP6MYDW.mjs.map} +1 -1
- package/dist/{chunk-WP7VFE77.mjs → chunk-TBZ645BI.mjs} +2 -2
- package/dist/{chunk-WP7VFE77.mjs.map → chunk-TBZ645BI.mjs.map} +1 -1
- package/dist/{chunk-TXBZZJNR.mjs → chunk-V2DNYJR6.mjs} +2 -2
- package/dist/{chunk-TXBZZJNR.mjs.map → chunk-V2DNYJR6.mjs.map} +1 -1
- package/dist/{chunk-Z74YUUVT.mjs → chunk-VBABZXL7.mjs} +2 -2
- package/dist/{chunk-Z74YUUVT.mjs.map → chunk-VBABZXL7.mjs.map} +1 -1
- package/dist/chunk-WYBSHTGY.mjs +3 -0
- package/dist/{chunk-DYNBM24D.mjs.map → chunk-WYBSHTGY.mjs.map} +1 -1
- package/dist/chunk-ZQUMJQYV.mjs +3 -0
- package/dist/chunk-ZQUMJQYV.mjs.map +1 -0
- package/dist/chunk-ZY23NOT4.mjs +3 -0
- package/dist/chunk-ZY23NOT4.mjs.map +1 -0
- package/dist/components/Action.d.ts.map +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/Dropdown.d.ts +0 -50
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Progress.d.ts +2 -2
- package/dist/components/advanced/AnimatedGradient.d.ts.map +1 -1
- package/dist/components/advanced/Carousel.d.ts.map +1 -1
- package/dist/components/advanced/ImageReveal.d.ts.map +1 -1
- package/dist/components/advanced/Parallax.d.ts +9 -6
- package/dist/components/advanced/Parallax.d.ts.map +1 -1
- package/dist/components/advanced/TextReveal.d.ts.map +1 -1
- package/dist/data.mjs +2 -2
- package/dist/data.mjs.map +1 -1
- package/dist/feedback.mjs +1 -1
- package/dist/form.mjs +4 -4
- package/dist/form.mjs.map +1 -1
- package/dist/{icons-DmhQEH_E.d.mts → icons-DcOBy9Hf.d.mts} +4 -0
- package/dist/iconsax-extended.mjs +2 -2
- package/dist/iconsax-extended.mjs.map +1 -1
- package/dist/index.d.mts +6 -87
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/interactive.mjs.map +1 -1
- package/dist/landing.mjs +7 -7
- package/dist/landing.mjs.map +1 -1
- package/dist/lib/icon-providers.d.ts +9 -25
- package/dist/lib/icon-providers.d.ts.map +1 -1
- package/dist/lib/icons.d.ts +4 -0
- package/dist/lib/icons.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/navigation.d.mts +1 -1
- package/dist/navigation.mjs +1 -1
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlay.d.mts +0 -50
- package/dist/overlay.mjs +1 -1
- package/dist/overlay.mjs.map +1 -1
- package/dist/sdui.mjs +1 -1
- package/dist/sdui.mjs.map +1 -1
- package/dist/theme.d.mts +85 -0
- package/dist/theme.d.ts +14 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.mjs +3 -0
- package/dist/theme.mjs.map +1 -0
- package/package.json +18 -14
- package/dist/advanced-dashboard.js +0 -39
- package/dist/advanced-dashboard.js.map +0 -1
- package/dist/advanced-emotion.js +0 -2
- package/dist/advanced-emotion.js.map +0 -1
- package/dist/advanced-motion.js +0 -82
- package/dist/advanced-motion.js.map +0 -1
- package/dist/advanced.js +0 -112
- package/dist/advanced.js.map +0 -1
- package/dist/chunk-3CCF7U3P.mjs +0 -3
- package/dist/chunk-3GAUTZXQ.mjs +0 -3
- package/dist/chunk-42RGFEL2.mjs +0 -3
- package/dist/chunk-4NJE7D6X.mjs +0 -3
- package/dist/chunk-6HVJFEDA.mjs +0 -3
- package/dist/chunk-7OYT3QSY.mjs +0 -3
- package/dist/chunk-7OYT3QSY.mjs.map +0 -1
- package/dist/chunk-ANYZ56VB.mjs +0 -3
- package/dist/chunk-ANYZ56VB.mjs.map +0 -1
- package/dist/chunk-AOSXB5JJ.mjs +0 -4
- package/dist/chunk-B544MRF7.mjs +0 -3
- package/dist/chunk-B544MRF7.mjs.map +0 -1
- package/dist/chunk-CVWWS25A.mjs +0 -3
- package/dist/chunk-DYNBM24D.mjs +0 -3
- package/dist/chunk-IJSYSNM5.mjs +0 -3
- package/dist/chunk-KJZGOL2Z.mjs +0 -3
- package/dist/chunk-KYRIUUQP.mjs +0 -3
- package/dist/chunk-LSA7DU3N.mjs +0 -73
- package/dist/chunk-LSA7DU3N.mjs.map +0 -1
- package/dist/chunk-MDLCJASB.mjs +0 -3
- package/dist/chunk-N56BUOCD.mjs +0 -3
- package/dist/chunk-OFYITQXI.mjs +0 -13
- package/dist/chunk-OFYITQXI.mjs.map +0 -1
- package/dist/chunk-OZNST3EZ.mjs +0 -3
- package/dist/chunk-RS6RKW5U.mjs +0 -13
- package/dist/chunk-TZ4YSHMC.mjs +0 -3
- package/dist/chunk-U6CTBZ2U.mjs +0 -3
- package/dist/chunk-U6CTBZ2U.mjs.map +0 -1
- package/dist/chunk-XCZMLKPK.mjs +0 -3
- package/dist/chunk-XCZMLKPK.mjs.map +0 -1
- package/dist/chunk-XGHT7WMO.mjs +0 -3
- package/dist/chunk-XGHT7WMO.mjs.map +0 -1
- package/dist/chunk-XL4KTJ4L.mjs +0 -3
- package/dist/chunk-ZXZIHU7J.mjs +0 -8
- package/dist/data.js +0 -3
- package/dist/data.js.map +0 -1
- package/dist/feedback.js +0 -12
- package/dist/feedback.js.map +0 -1
- package/dist/form.js +0 -8
- package/dist/form.js.map +0 -1
- package/dist/iconsax-extended.js +0 -3
- package/dist/iconsax-extended.js.map +0 -1
- package/dist/iconsax.js +0 -3
- package/dist/iconsax.js.map +0 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -1
- package/dist/interactive.js +0 -2
- package/dist/interactive.js.map +0 -1
- package/dist/landing.js +0 -100
- package/dist/landing.js.map +0 -1
- package/dist/lib/phosphor-icons.d.ts +0 -6
- package/dist/lib/phosphor-icons.d.ts.map +0 -1
- package/dist/navigation.js +0 -12
- package/dist/navigation.js.map +0 -1
- package/dist/overlay.js +0 -3
- package/dist/overlay.js.map +0 -1
- package/dist/sdui.js +0 -9
- package/dist/sdui.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
2
|
export { I as Input, L as Label, N as NumberInput, c as NumberInputProps, S as Switch } from './Switch-Dzm5TLR3.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { e as emotionIcons, s as statusIcons, I as IconName } from './icons-
|
|
5
|
-
export { i as iconCategories } from './icons-
|
|
6
|
-
import { A as AllIconName } from './ComponentLayout-
|
|
7
|
-
export { C as ComponentLayout, P as ProjectIconName, g as getIconNameForProvider, i as iconNames, a as iconProviderMapping, b as isValidIconName } from './ComponentLayout-
|
|
4
|
+
import { e as emotionIcons, s as statusIcons, I as IconName } from './icons-DcOBy9Hf.mjs';
|
|
5
|
+
export { i as iconCategories } from './icons-DcOBy9Hf.mjs';
|
|
6
|
+
import { A as AllIconName } from './ComponentLayout-BhM4VSoq.mjs';
|
|
7
|
+
export { C as ComponentLayout, P as ProjectIconName, g as getIconNameForProvider, i as iconNames, a as iconProviderMapping, b as isValidIconName } from './ComponentLayout-BhM4VSoq.mjs';
|
|
8
8
|
export { M as Modal, a as ModalProps } from './Modal-CrXmb3Ll.mjs';
|
|
9
9
|
export { C as Container, a as ContainerProps, b as Section, c as SectionHeaderConfig, S as SectionProps, s as sectionVariants } from './Section-BWzyshgX.mjs';
|
|
10
10
|
export { Alert, AlertError, AlertInfo, AlertSuccess, AlertWarning, LoadingSpinner, Toast, ToastProvider, Tooltip, TooltipDark, TooltipLight, useToast, useToastSafe } from './feedback.mjs';
|
|
11
|
+
export { ThemeProvider, ThemeProviderProps, ThemeProviderState, useTheme } from './theme.mjs';
|
|
11
12
|
import { ClassValue } from 'clsx';
|
|
12
13
|
import { C as Color, S as Size$1, E as ExtendedVariant } from './common-YLvZxA_K.mjs';
|
|
13
14
|
export { B as BaseVariant } from './common-YLvZxA_K.mjs';
|
|
@@ -734,88 +735,6 @@ interface ScrollToTopProps extends React$1.HTMLAttributes<HTMLButtonElement> {
|
|
|
734
735
|
*/
|
|
735
736
|
declare const ScrollToTop: ({ className, threshold, smooth, icon, size, variant, showOnMount, ...props }: ScrollToTopProps) => react_jsx_runtime.JSX.Element;
|
|
736
737
|
|
|
737
|
-
type Theme = "light" | "dark" | "system";
|
|
738
|
-
/**
|
|
739
|
-
* ThemeProvider 컴포넌트의 props / ThemeProvider component props
|
|
740
|
-
* @typedef {Object} ThemeProviderProps
|
|
741
|
-
* @property {React.ReactNode} children - 자식 컴포넌트 / Child components
|
|
742
|
-
* @property {"light" | "dark" | "system"} [defaultTheme="light"] - 기본 테마 / Default theme
|
|
743
|
-
* @property {string} [storageKey="hua-ui-theme"] - localStorage 키 / localStorage key
|
|
744
|
-
* @property {boolean} [enableSystem=true] - 시스템 테마 감지 활성화 / Enable system theme detection
|
|
745
|
-
* @property {boolean} [enableTransition=true] - 테마 전환 애니메이션 활성화 / Enable theme transition animation
|
|
746
|
-
*/
|
|
747
|
-
interface ThemeProviderProps {
|
|
748
|
-
children: React$1.ReactNode;
|
|
749
|
-
defaultTheme?: Theme;
|
|
750
|
-
storageKey?: string;
|
|
751
|
-
enableSystem?: boolean;
|
|
752
|
-
enableTransition?: boolean;
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* ThemeProvider의 상태 타입 / ThemeProvider state type
|
|
756
|
-
* @typedef {Object} ThemeProviderState
|
|
757
|
-
* @property {"light" | "dark" | "system"} theme - 현재 테마 / Current theme
|
|
758
|
-
* @property {(theme: "light" | "dark" | "system") => void} setTheme - 테마 설정 함수 / Theme setter function
|
|
759
|
-
* @property {"light" | "dark"} resolvedTheme - 실제 적용된 테마 (system일 경우 시스템 테마) / Actually applied theme (system theme when system is selected)
|
|
760
|
-
* @property {() => void} toggleTheme - 테마 토글 함수 / Theme toggle function
|
|
761
|
-
*/
|
|
762
|
-
interface ThemeProviderState {
|
|
763
|
-
theme: Theme;
|
|
764
|
-
setTheme: (theme: Theme) => void;
|
|
765
|
-
resolvedTheme: "light" | "dark";
|
|
766
|
-
toggleTheme: () => void;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* ThemeProvider 컴포넌트 / ThemeProvider component
|
|
770
|
-
*
|
|
771
|
-
* 테마 관리를 위한 Context Provider 컴포넌트입니다.
|
|
772
|
-
* localStorage에 테마를 저장하고, 시스템 테마를 감지할 수 있습니다.
|
|
773
|
-
* useTheme 훅을 통해 테마 상태에 접근할 수 있습니다.
|
|
774
|
-
*
|
|
775
|
-
* Context Provider component for theme management.
|
|
776
|
-
* Saves theme to localStorage and can detect system theme.
|
|
777
|
-
* Access theme state through useTheme hook.
|
|
778
|
-
*
|
|
779
|
-
* @component
|
|
780
|
-
* @example
|
|
781
|
-
* // 기본 사용 / Basic usage
|
|
782
|
-
* <ThemeProvider>
|
|
783
|
-
* <App />
|
|
784
|
-
* </ThemeProvider>
|
|
785
|
-
*
|
|
786
|
-
* @example
|
|
787
|
-
* // 커스텀 설정 / Custom settings
|
|
788
|
-
* <ThemeProvider
|
|
789
|
-
* defaultTheme="dark"
|
|
790
|
-
* storageKey="my-app-theme"
|
|
791
|
-
* enableSystem={true}
|
|
792
|
-
* enableTransition={true}
|
|
793
|
-
* >
|
|
794
|
-
* <App />
|
|
795
|
-
* </ThemeProvider>
|
|
796
|
-
*
|
|
797
|
-
* @param {ThemeProviderProps} props - ThemeProvider 컴포넌트의 props / ThemeProvider component props
|
|
798
|
-
* @returns {JSX.Element} ThemeProvider 컴포넌트 / ThemeProvider component
|
|
799
|
-
*/
|
|
800
|
-
declare function ThemeProvider({ children, defaultTheme, // system에서 light로 변경
|
|
801
|
-
storageKey, enableSystem, enableTransition, ...props }: ThemeProviderProps): React$1.ReactElement;
|
|
802
|
-
/**
|
|
803
|
-
* useTheme 훅 / useTheme hook
|
|
804
|
-
*
|
|
805
|
-
* ThemeProvider의 테마 상태에 접근하는 훅입니다.
|
|
806
|
-
* ThemeProvider 내부에서만 사용할 수 있습니다.
|
|
807
|
-
*
|
|
808
|
-
* Hook to access ThemeProvider's theme state.
|
|
809
|
-
* Can only be used inside ThemeProvider.
|
|
810
|
-
*
|
|
811
|
-
* @example
|
|
812
|
-
* const { theme, setTheme, resolvedTheme, toggleTheme } = useTheme()
|
|
813
|
-
*
|
|
814
|
-
* @returns {ThemeProviderState} 테마 상태와 함수들 / Theme state and functions
|
|
815
|
-
* @throws {Error} ThemeProvider 외부에서 사용 시 에러 발생 / Error when used outside ThemeProvider
|
|
816
|
-
*/
|
|
817
|
-
declare const useTheme: () => ThemeProviderState;
|
|
818
|
-
|
|
819
738
|
/**
|
|
820
739
|
* ThemeToggle 컴포넌트의 props / ThemeToggle component props
|
|
821
740
|
* @typedef {Object} ThemeToggleProps
|
|
@@ -1703,4 +1622,4 @@ interface UseWindowSizeOptions {
|
|
|
1703
1622
|
*/
|
|
1704
1623
|
declare function useWindowSize(options?: UseWindowSizeOptions): UseWindowSizeReturn;
|
|
1705
1624
|
|
|
1706
|
-
export { Action, type ActionButton, ActionToolbar, type ActionToolbarProps, AllIconName, Avatar, AvatarFallback, AvatarImage, Badge, Button, type ButtonProps, COMPONENT_MOTION_DEFAULTS, CSS_MOTION_VARS, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Color, type ColorStyleConfig, type ColorStyles, DURATIONS, Divider, EASING_FUNCTIONS, EmotionIcon, ErrorIcon, ExtendedVariant, Grid, HUA_SPRING_EASING, type HoverEffect, ICON_ALIASES, Icon, type IconConfig, IconName, type IconProps, IconProvider, type IconProviderProps, type IconSet, Link, LoadingIcon, type MicroMotionConfig, type MicroMotionPreset, type MicroMotionState, Panel, type PhosphorWeight, Progress, ProgressError, ProgressGroup, ProgressInfo, ProgressSuccess, ProgressWarning, type Rounded, ScrollArea, ScrollToTop, type Shadow, Size$1 as Size, type SizeStyles, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonImage, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText, SkeletonUserProfile, Slot, type SlotProps, Stack, StatusIcon, SuccessIcon,
|
|
1625
|
+
export { Action, type ActionButton, ActionToolbar, type ActionToolbarProps, AllIconName, Avatar, AvatarFallback, AvatarImage, Badge, Button, type ButtonProps, COMPONENT_MOTION_DEFAULTS, CSS_MOTION_VARS, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Color, type ColorStyleConfig, type ColorStyles, DURATIONS, Divider, EASING_FUNCTIONS, EmotionIcon, ErrorIcon, ExtendedVariant, Grid, HUA_SPRING_EASING, type HoverEffect, ICON_ALIASES, Icon, type IconConfig, IconName, type IconProps, IconProvider, type IconProviderProps, type IconSet, Link, LoadingIcon, type MicroMotionConfig, type MicroMotionPreset, type MicroMotionState, Panel, type PhosphorWeight, Progress, ProgressError, ProgressGroup, ProgressInfo, ProgressSuccess, ProgressWarning, type Rounded, ScrollArea, ScrollToTop, type Shadow, Size$1 as Size, type SizeStyles, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonCircle, SkeletonImage, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText, SkeletonUserProfile, Slot, type SlotProps, Stack, StatusIcon, SuccessIcon, ThemeToggle, Toggle, type ToggleProps, type UseInViewOptions, type UseInViewReturn, type UseMouseOptions, type UseMouseReturn, type UseScrollProgressOptions, type UseScrollProgressReturn, type UseWindowSizeOptions, type UseWindowSizeReturn, cn, composeRefs, conditionalClass, createColorStyles, createGradient, createHoverStyles, createRoundedStyles, createShadowStyles, createSizeStyles, createVariantStyles, defaultIconConfig, emotionIcons, formatRelativeTime, getDefaultStrokeWidth, getIconAliases, getMicroMotionClasses, isGradientVariant, isTextWhite, merge, mergeIf, mergeMap, mergeProps, resolveIconAlias, responsive, statusIcons, useColorStyles, useIconContext, useInView, useMicroMotion, useMouse, useReducedMotion, useScrollProgress, useWindowSize, withDarkMode, withOpacity };
|
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{a as Modal}from'./chunk-
|
|
2
|
+
export{c as ToastProvider,a as useToast,b as useToastSafe}from'./chunk-WYBSHTGY.mjs';export{a as Modal}from'./chunk-HBIUCLFL.mjs';export{a as Progress,d as ProgressError,f as ProgressGroup,e as ProgressInfo,b as ProgressSuccess,c as ProgressWarning}from'./chunk-IG47LMOD.mjs';export{a as Alert,d as AlertError,e as AlertInfo,b as AlertSuccess,c as AlertWarning}from'./chunk-V2DNYJR6.mjs';export{b as Section,a as sectionVariants}from'./chunk-VBABZXL7.mjs';export{a as Container}from'./chunk-SDFVGFXT.mjs';import {b}from'./chunk-A5YOVVM5.mjs';export{a as ThemeProvider,b as useTheme}from'./chunk-A5YOVVM5.mjs';export{a as ComponentLayout}from'./chunk-TAP6MYDW.mjs';export{a as Avatar,c as AvatarFallback,b as AvatarImage}from'./chunk-K2FOFIST.mjs';export{g as HUA_SPRING_EASING,a as createColorStyles,h as createHoverStyles,e as createRoundedStyles,f as createShadowStyles,d as createSizeStyles,c as createVariantStyles,b as useColorStyles}from'./chunk-EPY3432E.mjs';export{a as Tooltip,c as TooltipDark,b as TooltipLight}from'./chunk-5L5HIPKA.mjs';export{a as Skeleton,g as SkeletonAvatar,f as SkeletonCard,c as SkeletonCircle,h as SkeletonImage,j as SkeletonList,d as SkeletonRectangle,e as SkeletonRounded,k as SkeletonTable,b as SkeletonText,i as SkeletonUserProfile}from'./chunk-SMLDNOV3.mjs';import {a as a$2}from'./chunk-CW66UBQG.mjs';export{a as Card,e as CardContent,d as CardDescription,f as CardFooter,b as CardHeader,c as CardTitle}from'./chunk-CW66UBQG.mjs';export{a as Badge}from'./chunk-J47ZEXEL.mjs';export{a as NumberInput}from'./chunk-OLLU7ZFH.mjs';export{b as Input,c as Label,d as Switch}from'./chunk-F2M4YDDQ.mjs';import {d}from'./chunk-O24K56OS.mjs';export{d as Button,c as Slot,a as composeRefs,b as mergeProps}from'./chunk-O24K56OS.mjs';import {a}from'./chunk-SD6XGDAC.mjs';export{a as useReducedMotion}from'./chunk-SD6XGDAC.mjs';export{a as LoadingSpinner}from'./chunk-QRRP7TGF.mjs';import'./chunk-HEBXAFRY.mjs';import {l,d as d$1}from'./chunk-ZQUMJQYV.mjs';export{m as EmotionIcon,q as ErrorIcon,e as ICON_ALIASES,l as Icon,j as IconProvider,o as LoadingIcon,n as StatusIcon,p as SuccessIcon,h as defaultIconConfig,a as emotionIcons,i as getDefaultStrokeWidth,g as getIconAliases,c as iconCategories,f as resolveIconAlias,b as statusIcons,k as useIconContext}from'./chunk-ZQUMJQYV.mjs';import {a as a$1}from'./chunk-QEMPERUK.mjs';export{e as cn,c as formatRelativeTime,a as merge,b as mergeIf,d as mergeMap}from'./chunk-QEMPERUK.mjs';import'./chunk-EAZEI74V.mjs';import U,{useCallback,useState,useRef,useMemo,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';import {cva}from'class-variance-authority';var me=typeof window!="undefined",fe=U.forwardRef(({className:r,children:e,actionType:t="primary",feedback:n="ripple",particleEffect:o=false,rippleEffect:s=false,soundEffect:i=false,hapticFeedback:a$2=false,transparency:l=1,blurIntensity:p=0,glowIntensity:b=0,glowColor:g="rgba(91,140,255,.8)",loading:u=false,iconOnly:h=false,disabled:c,...m},S)=>{let y=a(),w=U.useCallback(M=>{var H;if(a$2&&me&&"vibrate"in navigator&&!y)try{(H=navigator.vibrate)==null||H.call(navigator,30);}catch{}if(i&&!y&&me)try{let P=window.AudioContext||window.webkitAudioContext;if(!P)return;let T=new P,k=T.createOscillator(),A=T.createGain();k.connect(A),A.connect(T.destination),k.frequency.value=800,k.type="sine",A.gain.setValueAtTime(.1,T.currentTime),A.gain.exponentialRampToValueAtTime(.01,T.currentTime+.1),k.start(T.currentTime),k.stop(T.currentTime+.1);}catch{}if(s&&!y&&M.currentTarget){let P=M.currentTarget,T=P.getBoundingClientRect(),k=M.clientX-T.left,A=M.clientY-T.top,N=Math.max(T.width,T.height),L=document.createElement("span");if(L.style.cssText=`
|
|
3
3
|
position: absolute;
|
|
4
4
|
border-radius: 50%;
|
|
5
5
|
background: rgba(255, 255, 255, 0.6);
|
|
6
|
-
width: ${
|
|
7
|
-
height: ${
|
|
8
|
-
left: ${
|
|
9
|
-
top: ${A-
|
|
6
|
+
width: ${N}px;
|
|
7
|
+
height: ${N}px;
|
|
8
|
+
left: ${k-N/2}px;
|
|
9
|
+
top: ${A-N/2}px;
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
animation: ripple-animation 0.6s ease-out;
|
|
12
|
-
`,!document.getElementById("ripple-animation-style")){let
|
|
12
|
+
`,!document.getElementById("ripple-animation-style")){let v=document.createElement("style");v.id="ripple-animation-style",v.textContent=`
|
|
13
13
|
@keyframes ripple-animation {
|
|
14
14
|
to {
|
|
15
15
|
transform: scale(4);
|
|
16
16
|
opacity: 0;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
`,document.head.appendChild(
|
|
19
|
+
`,document.head.appendChild(v);}P.style.position="relative",P.style.overflow="hidden",P.appendChild(L),setTimeout(()=>{L.remove();},600);}if(o&&!y&&M.currentTarget){let P=M.currentTarget,T=P.getBoundingClientRect(),k=M.clientX-T.left,A=M.clientY-T.top;for(let N=0;N<5;N++){let L=document.createElement("span"),v=Math.PI*2*N/5,oe=30+Math.random()*20,je=Math.cos(v)*oe,Xe=Math.sin(v)*oe;if(L.style.cssText=`
|
|
20
20
|
position: absolute;
|
|
21
21
|
width: 4px;
|
|
22
22
|
height: 4px;
|
|
23
|
-
background: ${
|
|
23
|
+
background: ${g||"rgba(91,140,255,0.8)"};
|
|
24
24
|
border-radius: 50%;
|
|
25
|
-
left: ${
|
|
25
|
+
left: ${k}px;
|
|
26
26
|
top: ${A}px;
|
|
27
27
|
pointer-events: none;
|
|
28
|
-
animation: particle-animation-${
|
|
29
|
-
`,!document.getElementById(`particle-animation-${
|
|
30
|
-
@keyframes particle-animation-${
|
|
28
|
+
animation: particle-animation-${N} 0.5s ease-out forwards;
|
|
29
|
+
`,!document.getElementById(`particle-animation-${N}`)){let q=document.createElement("style");q.id=`particle-animation-${N}`,q.textContent=`
|
|
30
|
+
@keyframes particle-animation-${N} {
|
|
31
31
|
to {
|
|
32
|
-
transform: translate(${
|
|
32
|
+
transform: translate(${je}px, ${Xe}px) scale(0);
|
|
33
33
|
opacity: 0;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`,document.head.appendChild(Q);}P.style.position="relative",P.appendChild(L),setTimeout(()=>{L.remove();},500);}}},[a,s,i,n,v,c]),u=U.useMemo(()=>({"--action-opacity":String(l),"--action-blur":`${f}px`,"--action-glow-size":`${h}px`,"--action-glow-color":c}),[l,f,h,c]),x=U.useMemo(()=>b("hua-action relative inline-flex items-center rounded-xl px-4 py-2 font-medium","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/60",d$1&&"cursor-wait opacity-80",g&&"justify-center",r),[r,d$1,g]);if("href"in p&&p.href){let{onClick:T,href:H,...P}=p;return jsx(d,{ref:k,href:H,className:x,style:u,onClick:S=>{if(m||d$1){S.preventDefault(),S.stopPropagation();return}w(S),T==null||T(S);},"aria-busy":d$1||void 0,"aria-label":g?P["aria-label"]:void 0,"data-action":t,"data-feedback":o,"data-reduced-motion":v?"true":"false",disabled:m,...P,children:e})}let{onClick:I,...O}=p;return jsx(d,{ref:k,className:x,style:u,onClick:T=>{m||d$1||(w(T),I==null||I(T));},disabled:m,"aria-busy":d$1||void 0,"aria-label":g?O["aria-label"]:void 0,"data-action":t,"data-feedback":o,"data-reduced-motion":v?"true":"false",...O,children:e})});fe.displayName="Action";var gr=cva("transition-colors duration-200",{variants:{variant:{default:"text-foreground hover:text-muted-foreground",primary:"text-primary hover:text-primary/80",secondary:"text-muted-foreground hover:text-foreground",ghost:"text-muted-foreground hover:text-foreground",underline:"text-primary hover:text-primary/80 underline hover:no-underline"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"md"}});function br({href:r,children:e,className:t,variant:o="default",size:n="md",external:i=false,onClick:s}){return jsx("a",{href:r,className:b(gr({variant:o,size:n}),t),target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,onClick:s,children:e})}var yr=cva("grid",{variants:{gap:{none:"gap-0",sm:"gap-4",md:"gap-6",lg:"gap-8",xl:"gap-12"}},defaultVariants:{gap:"md"}}),wr={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-6",7:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-7",8:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-8",9:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-9",10:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-10",11:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-11",12:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-12"},Tr={none:"gap-x-0",sm:"gap-x-4",md:"gap-x-6",lg:"gap-x-8",xl:"gap-x-12"},Mr={none:"gap-y-0",sm:"gap-y-4",md:"gap-y-6",lg:"gap-y-8",xl:"gap-y-12"},ge=U.forwardRef(({className:r,cols:e=1,gap:t="md",gapX:o,gapY:n,responsive:i=true,...s},a)=>jsx("div",{ref:a,className:b(yr({gap:o?void 0:t}),i?wr[e]:`grid-cols-${e}`,o&&Tr[o],n&&Mr[n],r),...s}));ge.displayName="Grid";var Er=cva("",{variants:{direction:{vertical:"flex flex-col",horizontal:"flex flex-row"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{direction:"vertical",align:"start",justify:"start"}}),Cr={vertical:{none:"",sm:"space-y-4",md:"space-y-6",lg:"space-y-8",xl:"space-y-12"},horizontal:{none:"",sm:"space-x-4",md:"space-x-6",lg:"space-x-8",xl:"space-x-12"}},be=U.forwardRef(({className:r,direction:e="vertical",spacing:t="md",align:o="start",justify:n="start",wrap:i=false,...s},a)=>jsx("div",{ref:a,className:b(Er({direction:e,align:o,justify:n}),Cr[e][t],i&&"flex-wrap",r),...s}));be.displayName="Stack";var Rr={horizontal:"w-full",vertical:"h-full"},Ir={horizontal:{none:"",sm:"my-4",md:"my-6",lg:"my-8",xl:"my-12"},vertical:{none:"",sm:"mx-4",md:"mx-6",lg:"mx-8",xl:"mx-12"}};function Ar(r,e,t){return e==="dashed"||e==="dotted"?{horizontal:{sm:"border-t",md:"border-t-2",lg:"border-t-4"},vertical:{sm:"border-l",md:"border-l-2",lg:"border-l-4"}}[r][t]:{horizontal:{sm:"h-px",md:"h-0.5",lg:"h-1"},vertical:{sm:"w-px",md:"w-0.5",lg:"w-1"}}[r][t]}function he(r,e){switch(e){case "dashed":return "border-dashed";case "dotted":return "border-dotted";case "gradient":return r==="horizontal"?"bg-gradient-to-r from-transparent via-border to-transparent":"bg-gradient-to-b from-transparent via-border to-transparent";case "glass":return r==="horizontal"?"bg-gradient-to-r from-transparent via-white/30 to-transparent":"bg-gradient-to-b from-transparent via-white/30 to-transparent";default:return ""}}function Lr(r,e){return r==="dashed"||r==="dotted"?{default:"border-border",muted:"border-muted",primary:"border-primary/30",secondary:"border-secondary"}[e]:{default:"bg-border",muted:"bg-muted",primary:"bg-primary/30",secondary:"bg-secondary"}[e]}var ve=U.forwardRef(({className:r,orientation:e="horizontal",variant:t="solid",size:o="md",spacing:n="md",color:i="default",...s},a)=>jsx("div",{ref:a,className:b("flex-shrink-0",Rr[e],Ar(e,t,o),t==="gradient"?he(e,t):Lr(t,i),t!=="gradient"&&he(e,t),Ir[e][n],r),...s}));ve.displayName="Divider";var zr=U.memo(ve);var Ur=cva("transition-all duration-300",{variants:{style:{default:"bg-card text-card-foreground border border-border",solid:"bg-card text-card-foreground border border-border",glass:"bg-white/60 dark:bg-white/10 backdrop-blur-md border border-border/50 dark:border-white/20",outline:"bg-transparent border border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border",neon:"bg-muted/50 dark:bg-background border border-cyan-300/30 dark:border-cyan-400/30 shadow-lg shadow-cyan-200/20 dark:shadow-cyan-400/20",holographic:"bg-gradient-to-br from-white/20 via-purple-500/20 to-cyan-500/20 backdrop-blur-sm border border-white/30",cyberpunk:"bg-card dark:bg-background border-2 border-pink-400 dark:border-pink-500 shadow-lg shadow-pink-300/30 dark:shadow-pink-500/30",minimal:"bg-card dark:bg-background border border-border shadow-sm",luxury:"bg-gradient-to-br from-amber-50 to-yellow-100 dark:from-amber-950 dark:to-yellow-950 border border-amber-200 dark:border-amber-800 shadow-xl"},effect:{none:"",glow:"shadow-2xl shadow-primary/20 dark:shadow-primary/20",shadow:"shadow-xl",gradient:"bg-gradient-to-r from-primary/10 via-purple-500/10 to-cyan-500/10",animated:"animate-pulse"},padding:{none:"p-0",small:"p-3",sm:"p-3",medium:"p-6",md:"p-6",large:"p-8",lg:"p-8",xl:"p-12",custom:""},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full",custom:""}},defaultVariants:{style:"default",effect:"none",padding:"md",rounded:"lg"}}),ye=U.forwardRef(({className:r,style:e="default",effect:t="none",transparency:o=1,blurIntensity:n=0,borderOpacity:i=1,shadowOpacity:s=1,glowIntensity:a$1=0,glowColor:l="blue",particleEffect:f=false,hoverEffect:h=false,animationEffect:c=false,padding:d="md",customPadding:g,rounded:m="lg",customRounded:p,background:k="solid",gradientColors:v=["#3B82F6","#8B5CF6"],patternType:w="dots",backgroundImage:u,backgroundVideo:x,interactive:I=false,hoverScale:O=1.05,hoverRotate:W=0,hoverGlow:T=false,children:H,...P},M)=>{let S=U.useMemo(()=>{switch(w){case "dots":return "radial-gradient(circle, #000 1px, transparent 1px)";case "lines":return "linear-gradient(45deg, #000 1px, transparent 1px)";case "grid":return "linear-gradient(#000 1px, transparent 1px), linear-gradient(90deg, #000 1px, transparent 1px)";case "waves":return "repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.1) 10px, rgba(0,0,0,0.1) 20px)";default:return ""}},[w]),A=U.useMemo(()=>{let y={opacity:o};switch(n>0&&(y.backdropFilter=`blur(${n}px)`),i<1&&(y.borderColor=`rgba(0, 0, 0, ${i})`),s<1&&(y.boxShadow=`0 4px 6px -1px rgba(0, 0, 0, ${s*.1})`),a$1>0&&(y.boxShadow=`${y.boxShadow||""}, 0 0 ${a$1*10}px ${l}`),k){case "gradient":y.background=`linear-gradient(135deg, ${v.join(", ")})`;break;case "pattern":y.backgroundImage=S;break;case "image":u&&(y.backgroundImage=`url(${u})`,y.backgroundSize="cover",y.backgroundPosition="center");break;}return y},[o,n,i,s,a$1,l,k,v,S,u]),E=U.useMemo(()=>{if(!I)return "";let y=[];return O!==1&&y.push(`hover:scale-${O}`),W!==0&&y.push(`hover:rotate-${W}`),T&&y.push("hover:shadow-2xl hover:shadow-cyan-500/30"),y.join(" ")},[I,O,W,T]),L=U.useMemo(()=>b("panel-component",`panel-${e}`,`panel-effect-${t}`,Ur({style:e,effect:t,padding:g?"custom":d,rounded:p?"custom":m}),g,p,E,r),[e,t,d,g,m,p,E,r]);return jsxs("div",{className:"relative",children:[k==="video"&&x&&jsx("video",{className:"absolute inset-0 w-full h-full object-cover rounded-lg",autoPlay:true,muted:true,loop:true,playsInline:true,children:jsx("source",{src:x,type:"video/mp4"})}),f&&jsx("div",{className:"absolute inset-0 pointer-events-none"}),jsx(a,{ref:M,className:L,style:A,...P,children:H}),c&&jsx("div",{className:"absolute inset-0 pointer-events-none"})]})});ye.displayName="Panel";var Me=U.forwardRef(({isSelectMode:r=false,totalCount:e=0,selectedCount:t=0,actions:o=[],selectModeActions:n=[],onToggleSelectMode:i,onToggleSelectAll:s,onCancelSelect:a,loading:l$1=false,className:f,...h},c)=>{let d$1=useCallback(m=>{switch(m){case "red":return "bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300";case "blue":return "bg-indigo-100 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-300";case "green":return "bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300";default:return "bg-muted text-muted-foreground"}},[]),g=useCallback((m,p)=>jsxs(d,{variant:m.variant||"outline",size:"sm",onClick:m.onClick,disabled:m.disabled||l$1,className:b("flex-1 sm:flex-initial",m.className),children:[m.icon&&jsx(l,{name:m.icon,className:"h-4 w-4 sm:h-3.5 sm:w-3.5 mr-1 sm:mr-1.5"}),jsx("span",{className:"hidden sm:inline",children:m.label}),jsx("span",{className:"sm:hidden",children:m.labelMobile||m.label}),m.badge&&m.badge.count>0&&jsx("span",{className:b("ml-1.5",d$1(m.badge.color),"px-1.5 py-0.5 rounded-full text-xs font-semibold"),children:m.badge.count})]},p),[d$1,l$1]);return jsx("div",{ref:c,className:b("mb-4 bg-background rounded-lg shadow-sm border border-border p-3 sm:p-4",f),...h,children:r?jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&jsxs(d,{variant:"outline",size:"sm",onClick:s,className:"flex-1 sm:flex-initial min-w-[100px]",children:[jsx(l,{name:t===e?"square":"check",className:"h-4 w-4 sm:h-3.5 sm:w-3.5 mr-1 sm:mr-1.5"}),jsx("span",{className:"hidden sm:inline",children:t===e?"\uC804\uCCB4 \uD574\uC81C":"\uC804\uCCB4 \uC120\uD0DD"}),jsx("span",{className:"sm:hidden",children:t===e?"\uD574\uC81C":"\uC804\uCCB4"})]}),n.map((m,p)=>jsx("div",{className:b("flex-1 sm:flex-initial min-w-[100px]",m.className),children:g(m,`select-${p}`)},`select-action-${p}`)),a&&jsx(d,{variant:"outline",size:"sm",onClick:a,className:"flex-1 sm:flex-initial min-w-[80px]",children:"\uCDE8\uC18C"})]}):jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i&&jsxs(d,{variant:"outline",size:"sm",onClick:i,disabled:e===0,className:"flex-1 sm:flex-initial min-w-[80px] sm:min-w-[auto] px-2 sm:px-3",title:e===0?"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uC5EC\uB7EC \uD56D\uBAA9 \uC120\uD0DD",children:[jsx(l,{name:"check",className:"h-4 w-4 sm:h-3.5 sm:w-3.5"}),jsx("span",{className:"hidden sm:inline ml-1.5 sm:ml-2",children:"\uC120\uD0DD"})]}),o.map((m,p)=>jsx("div",{className:b("flex-1 sm:flex-initial min-w-[100px]",m.className),children:g(m,`action-${p}`)},`action-${p}`))]})})});Me.displayName="ActionToolbar";var $r=U.memo(Me);var Pe=U.forwardRef(({className:r,variant:e="default",size:t="md",pressed:o,onPressedChange:n,label:i,description:s,icon:a,iconPosition:l="left",onClick:f,...h},c)=>{let[d,g]=U.useState(false),m=o!==void 0,p=m?o:d,k=u=>{m||g(!p),n==null||n(!p),f==null||f(u);},v={sm:"h-7 px-3 text-sm",md:"h-9 px-4 text-base",lg:"h-11 px-5 text-lg"},w={default:p?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted text-foreground hover:bg-muted/80",outline:p?"border-2 border-primary bg-primary/10 text-primary hover:bg-primary/15":"border-2 border-border bg-transparent text-foreground hover:bg-muted",filled:p?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted/50 text-foreground hover:bg-muted",ghost:p?"bg-primary/10 text-primary hover:bg-primary/15":"bg-transparent text-foreground hover:bg-muted",glass:p?"bg-white/20 backdrop-blur-sm border border-white/30 text-white hover:bg-white/30 dark:bg-primary/20 dark:border-primary/50 dark:hover:bg-primary/30":"bg-white/10 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 dark:bg-muted/10 dark:border-border/50 dark:text-foreground dark:hover:bg-muted/20"};return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("button",{type:"button",ref:c,className:b("inline-flex items-center justify-center gap-2 rounded-md font-medium transition-all duration-200","focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",v[t],w[e],r),onClick:k,"aria-pressed":p,...h,children:[a&&l==="left"&&jsx("span",{className:"flex-shrink-0",children:a}),i&&jsx("span",{children:i}),a&&l==="right"&&jsx("span",{className:"flex-shrink-0",children:a})]}),s&&jsx("div",{className:"flex flex-col",children:jsx("p",{className:"text-sm text-muted-foreground",children:s})})]})});Pe.displayName="Toggle";var Ee=U.forwardRef(({children:r,className:e,orientation:t="vertical",scrollHideDelay:o=600,type:n="hover",...i},s)=>{let[a,l]=U.useState(false),f=U.useRef(void 0),h=()=>{(n==="hover"||n==="always")&&l(true);},c=()=>{n==="hover"&&(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{l(false);},o));};return U.useEffect(()=>{n==="always"&&l(true);},[n]),U.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx("div",{ref:s,className:b("relative overflow-auto scrollbar-thin",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",a?"scrollbar-visible":"scrollbar-hidden",e),onMouseEnter:h,onMouseLeave:c,...i,children:r})});Ee.displayName="ScrollArea";var Dr=U.forwardRef(({orientation:r="vertical",className:e,...t},o)=>jsx("div",{ref:o,className:b("flex touch-none select-none transition-colors duration-150 ease-out",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...t}));Dr.displayName="ScrollBar";function Ie(r={}){let{threshold:e=400,showOnMount:t=false,smooth:o=true}=r,[n,i]=useState(t),[s,a]=useState(false);return useEffect(()=>{a(true);},[]),useEffect(()=>{if(!s)return;let f=()=>{typeof window!="undefined"&&i(window.pageYOffset>e);};return f(),window.addEventListener("scroll",f,{passive:true}),window.addEventListener("resize",f,{passive:true}),()=>{window.removeEventListener("scroll",f),window.removeEventListener("resize",f);}},[e,s]),{isVisible:n,scrollToTop:()=>{typeof window!="undefined"&&(o?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0));},mounted:s}}var Vr=({className:r,threshold:e=400,smooth:t=true,icon:o="arrowUp",size:n="md",variant:i="default",showOnMount:s=false,...a})=>{let{isVisible:l$1,scrollToTop:f}=Ie({threshold:e,showOnMount:s,smooth:t}),c={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-10 h-10 sm:w-12 sm:h-12",lg:"w-12 h-12 sm:w-14 sm:h-14"},d={default:"bg-white/20 backdrop-blur-md border border-white/30 text-white hover:bg-white/30 dark:bg-muted/20 dark:border-border/50 dark:text-foreground dark:hover:bg-muted/30",primary:"bg-primary/70 backdrop-blur-md border border-primary/40 text-white hover:bg-primary/80 transition-all duration-300 dark:bg-primary/70 dark:border-primary/40 dark:hover:bg-primary/80",secondary:"bg-muted/80 backdrop-blur-md border border-border text-foreground hover:bg-muted/90 dark:bg-muted/50 dark:border-border dark:text-foreground dark:hover:bg-muted/60",outline:"border border-white/40 bg-white/15 backdrop-blur-md text-white hover:bg-white/25 dark:border-border/50 dark:bg-muted/15 dark:text-foreground dark:hover:bg-muted/25",ghost:"bg-transparent hover:bg-white/15 backdrop-blur-md text-white dark:text-foreground dark:hover:bg-muted/25"};return jsx("button",{onClick:f,className:b("fixed z-[9999] rounded-full transition-all duration-500 ease-in-out","flex items-center justify-center","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:ring-ring/50","transform hover:scale-105 active:scale-95",l$1?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",r,c[n],d[i]),"aria-label":"Scroll to top",...a,children:jsx(l,{name:o,className:"w-5 h-5"})})};var Gr={theme:"system",setTheme:()=>null,resolvedTheme:"light",toggleTheme:()=>null},ze=createContext(Gr);function Wr({children:r,defaultTheme:e="light",storageKey:t="hua-ui-theme",enableSystem:o=true,enableTransition:n=true,...i}){let[s,a]=useState(e),[l,f]=useState("light");useEffect(()=>{if(typeof window!="undefined"){let c=localStorage.getItem(t);c&&a(c);}},[t]),useEffect(()=>{let c=window.document.documentElement;if(c.classList.remove("light","dark"),s==="system"&&o){let d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";c.classList.add(d),f(d);}else c.classList.add(s),f(s);n&&c.classList.add("transition-colors","duration-300");},[s,o,n]),useEffect(()=>{if(s==="system"&&o){let c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{let g=c.matches?"dark":"light";f(g),document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(g);};return c.addEventListener("change",d),()=>c.removeEventListener("change",d)}},[s,o]);let h={theme:s,setTheme:c=>{typeof window!="undefined"&&localStorage.setItem(t,c),a(c);},resolvedTheme:l,toggleTheme:()=>{let c=l==="light"?"dark":"light";typeof window!="undefined"&&localStorage.setItem(t,c),a(c);}};return jsx(ze.Provider,{...i,value:h,children:r})}var ee=()=>{let r=useContext(ze);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r};function jr({className:r,size:e="md",variant:t="button",showLabel:o=false,label:n={light:"\uB77C\uC774\uD2B8",dark:"\uB2E4\uD06C",system:"\uC2DC\uC2A4\uD15C"},...i}){let{theme:s,setTheme:a,resolvedTheme:l$1}=ee(),f={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},h={sm:16,md:20,lg:24},c=()=>s==="system"?jsx(l,{name:"monitor",size:h[e]}):l$1==="dark"?jsx(l,{name:"moon",size:h[e]}):jsx(l,{name:"sun",size:h[e],className:"text-amber-600"}),d=()=>{s==="system"?a("light"):s==="light"?a("dark"):s==="dark"&&a("light");};return t==="icon"?jsx("button",{onClick:d,className:b("inline-flex items-center justify-center rounded-lg transition-all duration-300 hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",f[e],r),...i,children:jsxs("div",{className:"relative flex items-center justify-center w-full h-full",children:[jsx("div",{className:b("absolute inset-0 flex items-center justify-center transition-all duration-300",l$1==="dark"?"rotate-0 opacity-100":"rotate-90 opacity-0"),children:jsx(l,{name:"moon",size:h[e],className:"text-indigo-500"})}),jsx("div",{className:b("absolute inset-0 flex items-center justify-center transition-all duration-300",l$1==="dark"?"rotate-90 opacity-0":"rotate-0 opacity-100"),children:jsx(l,{name:"sun",size:h[e],className:"text-amber-600 dark:text-yellow-500"})})]})}):t==="switch"?jsxs("button",{onClick:d,className:b("relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-300 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",l$1==="dark"?"bg-primary":"bg-muted",r),...i,children:[jsx("span",{className:b("inline-block h-4 w-4 transform rounded-full bg-white transition-transform duration-300 shadow-lg",l$1==="dark"?"translate-x-6":"translate-x-1")}),jsxs("div",{className:"absolute inset-0 flex items-center justify-between px-1.5",children:[jsx(l,{name:"sun",size:12,className:"text-amber-600 dark:text-yellow-500 opacity-0"}),jsx(l,{name:"moon",size:12,className:"text-indigo-500 opacity-0"})]})]}):jsxs("button",{onClick:d,className:b("inline-flex items-center gap-3 rounded-lg px-4 py-3 text-sm font-medium transition-all duration-300 hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",r),...i,children:[c(),o&&jsx("span",{className:"text-foreground",children:s==="system"?n.system:s==="dark"?n.dark:n.light})]})}var Oe=["home","menu","close","search","settings","user","bell","arrowLeft","arrowRight","arrowUp","arrowDown","chevronLeft","chevronRight","chevronUp","chevronDown","add","edit","delete","remove","check","share","download","upload","save","copy","refresh","search","loader","success","error","warning","info","alertCircle","heart","star","bookmark","logIn","logOut","shield","key","lock","unlock","eye","eyeOff","users","userPlus","chart","barChart","pieChart","trendingUp","trendingDown","activity","database","zap","circle","dollarSign","dollar","currency","fileText","file","folder","book","bookOpen","image","video","camera","message","messageSquare","phone","mail","send","play","pause","mic","headphones","smile","frown","meh","laugh","angry","thumbsUp","thumbsDown","clock","timer","calendar","calendarDays","monitor","sun","moon","sparkle","sparkles","lightbulb","brain","globe","deviceMobile","smartphone","floppyDisk","externalLink","link","moreHorizontal","moreVertical","rocket","ticket","clipboard","wifi","wifiOff","cpu","mask"],Xr=d$1;function Jr(r){return r in d$1||Oe.includes(r)}function Qr(r,e){let t=d$1[r];return t&&t[e]||null}function He(r,e){return `${r} dark:${e}`}function Ue(r,e,t="to-r"){return b(`bg-gradient-${t}`,`from-${r}`,`to-${e}`)}function Be(r,e){return `${r}/${e}`}function $e(r){return r==="gradient"||r==="solid"}function De(r){return r==="gradient"}function Ve(r,e,t,o,n){return b(r,e&&`sm:${e}`,t&&`md:${t}`,o&&`lg:${o}`,n&&`xl:${n}`)}function _e(r,e,t){return r?e:t||""}var F={subtle:"cubic-bezier(0.25, 0.1, 0.25, 1)",soft:"cubic-bezier(0.22, 1, 0.36, 1)",springy:"cubic-bezier(0.34, 1.56, 0.64, 1)",bouncy:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",snappy:"cubic-bezier(0.19, 1, 0.22, 1)"},te={subtle:150,soft:250,springy:300,bouncy:400,snappy:180},X={preset:"springy",scale:.008,translateY:-0.5},Kr={button:{preset:"springy",duration:180,scale:.008,translateY:-0.5},card:{preset:"soft",duration:220,scale:.005,translateY:-1},menuItem:{preset:"subtle",duration:150,translateX:1},modal:{preset:"springy",duration:250,scale:.01},dropdown:{preset:"soft",duration:180,translateY:-2},tooltip:{preset:"snappy",duration:120,scale:.02},checkbox:{preset:"springy",duration:200,scale:.03},switch:{preset:"springy",duration:180}},qr={"--hua-motion-duration":"180ms","--hua-motion-easing":F.springy,"--hua-motion-scale-hover":"1.008","--hua-motion-scale-active":"0.992","--hua-motion-translate-y":"-0.5px"};function oo(r={}){let{preset:e=X.preset,duration:t=te[e]||200,delay:o=0,scale:n=X.scale,translateY:i=X.translateY,translateX:s=0,rotate:a=0,disabled:l=false,enableHover:f=true,enablePress:h=true,enableFocus:c=false}=r,[d,g]=useState({isHovered:false,isPressed:false,isFocused:false,isAnimating:false}),m=useRef(null),p=useCallback(u=>{m.current&&clearTimeout(m.current),u?(g(x=>({...x,isAnimating:true})),m.current=setTimeout(()=>{g(x=>({...x,isAnimating:false}));},t+o)):g(x=>({...x,isAnimating:false}));},[t,o]),k=useMemo(()=>({onMouseEnter:()=>{l||!f||(g(u=>({...u,isHovered:true})),p(true));},onMouseLeave:()=>{l||(g(u=>({...u,isHovered:false,isPressed:false})),p(true));},onMouseDown:()=>{l||!h||(g(u=>({...u,isPressed:true})),p(true));},onMouseUp:()=>{l||(g(u=>({...u,isPressed:false})),p(true));},onFocus:()=>{l||!c||(g(u=>({...u,isFocused:true})),p(true));},onBlur:()=>{l||(g(u=>({...u,isFocused:false})),p(true));}}),[l,f,h,c,p]),v=useMemo(()=>{if(l)return {transform:"none",transition:"none",willChange:"auto"};let u=[],x=F[e]||F.springy;return d.isHovered&&!d.isPressed&&(n&&u.push(`scale(${1+n})`),i&&u.push(`translateY(${i}px)`),s&&u.push(`translateX(${s}px)`),a&&u.push(`rotate(${a}deg)`)),d.isPressed&&(n&&u.push(`scale(${1-n*.5})`),i&&u.push(`translateY(${Math.abs(i)*.5}px)`)),d.isFocused&&!d.isHovered&&!d.isPressed&&n&&u.push(`scale(${1+n*.5})`),{transform:u.length>0?u.join(" "):"none",transition:`transform ${t}ms ${x} ${o}ms`,willChange:d.isAnimating?"transform":"auto"}},[d,l,e,t,o,n,i,s,a]),w=useMemo(()=>l?"":["transform-gpu"].join(" "),[l]);return useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),{state:d,style:v,handlers:k,className:w}}function no(r="springy",e={}){let{enableHover:t=true,enableActive:o=true,enableFocus:n=false}=e,i=["transform-gpu","transition-transform"],s={subtle:"duration-150",soft:"duration-250",springy:"duration-200",bouncy:"duration-300",snappy:"duration-150"}[r];return i.push(s),t&&i.push("hover:scale-[1.02]","hover:-translate-y-0.5"),o&&i.push("active:scale-[0.98]","active:translate-y-0"),n&&i.push("focus:scale-[1.01]"),i.join(" ")}function We(r={}){let{threshold:e=0,rootMargin:t="0px",triggerOnce:o=false,onChange:n}=r,i=useRef(null),[s,a]=useState(false),[l,f]=useState(null),h=useRef(false);return useEffect(()=>{let c=i.current;if(!c||o&&h.current)return;let d=new IntersectionObserver(([g])=>{let m=g.isIntersecting;o&&m&&(h.current=true),a(m),f(g),n==null||n(g);},{threshold:e,rootMargin:t});return d.observe(c),()=>{d.disconnect();}},[e,t,o,n]),{ref:i,inView:s,entry:l}}function Ye(r={}){let{target:e="page",throttle:t=16}=r,o=useRef(null),[n,i]=useState(0),[s,a]=useState(0),[l,f]=useState(0),[h,c]=useState(false),[d,g]=useState(null),m=useRef(0),p=useRef(null),k=useRef(0),v=useCallback(()=>{let w=Date.now();if(!(w-k.current<t)){if(k.current=w,e==="page"){let u=window.scrollY,x=document.documentElement.scrollHeight-window.innerHeight,I=x>0?Math.min(u/x,1):0;i(I),a(u),f(window.scrollX),g(u>m.current?"down":"up"),m.current=u;}else if(o.current){let u=o.current,x=u.scrollTop,I=u.scrollHeight-u.clientHeight,O=I>0?Math.min(x/I,1):0;i(O),a(x),f(u.scrollLeft),g(x>m.current?"down":"up"),m.current=x;}c(true),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{c(false);},150);}},[e,t]);return useEffect(()=>{if(e==="page")return v(),window.addEventListener("scroll",v,{passive:true}),window.addEventListener("resize",v,{passive:true}),()=>{window.removeEventListener("scroll",v),window.removeEventListener("resize",v),p.current&&clearTimeout(p.current);};{let w=o.current;return w?(w.addEventListener("scroll",v,{passive:true}),()=>{w.removeEventListener("scroll",v),p.current&&clearTimeout(p.current);}):void 0}},[e,v]),{ref:o,progress:n,scrollY:s,scrollX:l,isScrolling:h,direction:d}}function je(r={}){let{type:e="page",touch:t=false,throttle:o=0}=r,n=useRef(null),[i,s]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,isInside:false,isMoving:false}),a=useRef(0),l=useRef(null),f=useCallback((h,c)=>{let d=Date.now();if(o>0&&d-a.current<o)return;a.current=d;let g=h,m=c,p=0,k=0,v=0,w=0,u=false;if(e==="page"&&(g=h+window.scrollX,m=c+window.scrollY),n.current){let x=n.current.getBoundingClientRect();p=h-x.left,k=c-x.top,v=p/x.width,w=k/x.height,u=h>=x.left&&h<=x.right&&c>=x.top&&c<=x.bottom;}s({x:g,y:m,elementX:p,elementY:k,elementPositionX:v,elementPositionY:w,isInside:u,isMoving:true}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{s(x=>({...x,isMoving:false}));},150);},[e,o]);return useEffect(()=>{let h=d=>{f(d.clientX,d.clientY);},c=d=>{d.touches.length>0&&f(d.touches[0].clientX,d.touches[0].clientY);};return window.addEventListener("mousemove",h,{passive:true}),t&&window.addEventListener("touchmove",c,{passive:true}),()=>{window.removeEventListener("mousemove",h),t&&window.removeEventListener("touchmove",c),l.current&&clearTimeout(l.current);}},[f,t]),{ref:n,...i}}function Xe(){let[r,e]=useState(false);return useEffect(()=>{if(typeof window=="undefined")return;let t=window.matchMedia("(prefers-reduced-motion: reduce)");e(t.matches);let o=n=>{e(n.matches);};return t.addEventListener("change",o),()=>{t.removeEventListener("change",o);}},[]),r}function Je(r={}){let{throttle:e=100,mobileBreakpoint:t=768,tabletBreakpoint:o=1024}=r,[n,i]=useState({width:typeof window!="undefined"?window.innerWidth:0,height:typeof window!="undefined"?window.innerHeight:0,isMobile:false,isTablet:false,isDesktop:true}),s=useCallback(()=>{let a=window.innerWidth,l=window.innerHeight;i({width:a,height:l,isMobile:a<t,isTablet:a>=t&&a<o,isDesktop:a>=o});},[t,o]);return useEffect(()=>{if(typeof window=="undefined")return;s();let a,l=()=>{clearTimeout(a),a=setTimeout(s,e);};return window.addEventListener("resize",l,{passive:true}),()=>{window.removeEventListener("resize",l),clearTimeout(a);}},[s,e]),n}export{fe as Action,$r as ActionToolbar,Kr as COMPONENT_MOTION_DEFAULTS,qr as CSS_MOTION_VARS,te as DURATIONS,zr as Divider,F as EASING_FUNCTIONS,ge as Grid,br as Link,ye as Panel,Ee as ScrollArea,Vr as ScrollToTop,be as Stack,Wr as ThemeProvider,jr as ThemeToggle,Pe as Toggle,_e as conditionalClass,Ue as createGradient,Qr as getIconNameForProvider,no as getMicroMotionClasses,Oe as iconNames,Xr as iconProviderMapping,De as isGradientVariant,$e as isTextWhite,Jr as isValidIconName,Ve as responsive,We as useInView,oo as useMicroMotion,je as useMouse,Xe as useReducedMotion,Ye as useScrollProgress,ee as useTheme,Je as useWindowSize,He as withDarkMode,Be as withOpacity};//# sourceMappingURL=index.mjs.map
|
|
36
|
+
`,document.head.appendChild(q);}P.style.position="relative",P.appendChild(L),setTimeout(()=>{L.remove();},500);}}},[a$2,i,s,o,y,g]),d$1=U.useMemo(()=>({"--action-opacity":String(l),"--action-blur":`${p}px`,"--action-glow-size":`${b}px`,"--action-glow-color":g}),[l,p,b,g]),x=U.useMemo(()=>a$1("hua-action relative inline-flex items-center rounded-xl px-4 py-2 font-medium","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/60",u&&"cursor-wait opacity-80",h&&"justify-center",r),[r,u,h]);if("href"in m&&m.href){let{onClick:M,href:H,...P}=m;return jsx(d,{ref:S,href:H,className:x,style:d$1,onClick:k=>{if(c||u){k.preventDefault(),k.stopPropagation();return}w(k),M==null||M(k);},"aria-busy":u||void 0,"aria-label":h?P["aria-label"]:void 0,"data-action":t,"data-feedback":n,"data-reduced-motion":y?"true":"false",disabled:c,...P,children:e})}let{onClick:I,...O}=m;return jsx(d,{ref:S,className:x,style:d$1,onClick:M=>{c||u||(w(M),I==null||I(M));},disabled:c,"aria-busy":u||void 0,"aria-label":h?O["aria-label"]:void 0,"data-action":t,"data-feedback":n,"data-reduced-motion":y?"true":"false",...O,children:e})});fe.displayName="Action";var mr=cva("transition-colors duration-200",{variants:{variant:{default:"text-foreground hover:text-muted-foreground",primary:"text-primary hover:text-primary/80",secondary:"text-muted-foreground hover:text-foreground",ghost:"text-muted-foreground hover:text-foreground",underline:"text-primary hover:text-primary/80 underline hover:no-underline"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"md"}});function pr({href:r,children:e,className:t,variant:n="default",size:o="md",external:s=false,onClick:i}){return jsx("a",{href:r,className:a$1(mr({variant:n,size:o}),t),target:s?"_blank":void 0,rel:s?"noopener noreferrer":void 0,onClick:i,children:e})}var hr=cva("grid",{variants:{gap:{none:"gap-0",sm:"gap-4",md:"gap-6",lg:"gap-8",xl:"gap-12"}},defaultVariants:{gap:"md"}}),xr={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-6",7:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-7",8:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-8",9:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-9",10:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-10",11:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-11",12:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-12"},yr={none:"gap-x-0",sm:"gap-x-4",md:"gap-x-6",lg:"gap-x-8",xl:"gap-x-12"},vr={none:"gap-y-0",sm:"gap-y-4",md:"gap-y-6",lg:"gap-y-8",xl:"gap-y-12"},ge=U.forwardRef(({className:r,cols:e=1,gap:t="md",gapX:n,gapY:o,responsive:s=true,...i},a)=>jsx("div",{ref:a,className:a$1(hr({gap:n?void 0:t}),s?xr[e]:`grid-cols-${e}`,n&&yr[n],o&&vr[o],r),...i}));ge.displayName="Grid";var Sr=cva("",{variants:{direction:{vertical:"flex flex-col",horizontal:"flex flex-row"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{direction:"vertical",align:"start",justify:"start"}}),kr={vertical:{none:"",sm:"space-y-4",md:"space-y-6",lg:"space-y-8",xl:"space-y-12"},horizontal:{none:"",sm:"space-x-4",md:"space-x-6",lg:"space-x-8",xl:"space-x-12"}},be=U.forwardRef(({className:r,direction:e="vertical",spacing:t="md",align:n="start",justify:o="start",wrap:s=false,...i},a)=>jsx("div",{ref:a,className:a$1(Sr({direction:e,align:n,justify:o}),kr[e][t],s&&"flex-wrap",r),...i}));be.displayName="Stack";var Nr={horizontal:"w-full",vertical:"h-full"},Cr={horizontal:{none:"",sm:"my-4",md:"my-6",lg:"my-8",xl:"my-12"},vertical:{none:"",sm:"mx-4",md:"mx-6",lg:"mx-8",xl:"mx-12"}};function Rr(r,e,t){return e==="dashed"||e==="dotted"?{horizontal:{sm:"border-t",md:"border-t-2",lg:"border-t-4"},vertical:{sm:"border-l",md:"border-l-2",lg:"border-l-4"}}[r][t]:{horizontal:{sm:"h-px",md:"h-0.5",lg:"h-1"},vertical:{sm:"w-px",md:"w-0.5",lg:"w-1"}}[r][t]}function he(r,e){switch(e){case "dashed":return "border-dashed";case "dotted":return "border-dotted";case "gradient":return r==="horizontal"?"bg-gradient-to-r from-transparent via-border to-transparent":"bg-gradient-to-b from-transparent via-border to-transparent";case "glass":return r==="horizontal"?"bg-gradient-to-r from-transparent via-white/30 to-transparent":"bg-gradient-to-b from-transparent via-white/30 to-transparent";default:return ""}}function Er(r,e){return r==="dashed"||r==="dotted"?{default:"border-border",muted:"border-muted",primary:"border-primary/30",secondary:"border-secondary"}[e]:{default:"bg-border",muted:"bg-muted",primary:"bg-primary/30",secondary:"bg-secondary"}[e]}var ye=U.forwardRef(({className:r,orientation:e="horizontal",variant:t="solid",size:n="md",spacing:o="md",color:s="default",...i},a)=>jsx("div",{ref:a,className:a$1("flex-shrink-0",Nr[e],Rr(e,t,n),t==="gradient"?he(e,t):Er(t,s),t!=="gradient"&&he(e,t),Cr[e][o],r),...i}));ye.displayName="Divider";var Ir=U.memo(ye);var zr=cva("transition-all duration-300",{variants:{style:{default:"bg-card text-card-foreground border border-border",solid:"bg-card text-card-foreground border border-border",glass:"bg-white/60 dark:bg-white/10 backdrop-blur-md border border-border/50 dark:border-white/20",outline:"bg-transparent border border-border",elevated:"bg-card text-card-foreground shadow-lg border border-border",neon:"bg-muted/50 dark:bg-background border border-cyan-300/30 dark:border-cyan-400/30 shadow-lg shadow-cyan-200/20 dark:shadow-cyan-400/20",holographic:"bg-gradient-to-br from-white/20 via-purple-500/20 to-cyan-500/20 backdrop-blur-sm border border-white/30",cyberpunk:"bg-card dark:bg-background border-2 border-pink-400 dark:border-pink-500 shadow-lg shadow-pink-300/30 dark:shadow-pink-500/30",minimal:"bg-card dark:bg-background border border-border shadow-sm",luxury:"bg-gradient-to-br from-amber-50 to-yellow-100 dark:from-amber-950 dark:to-yellow-950 border border-amber-200 dark:border-amber-800 shadow-xl"},effect:{none:"",glow:"shadow-2xl shadow-primary/20 dark:shadow-primary/20",shadow:"shadow-xl",gradient:"bg-gradient-to-r from-primary/10 via-purple-500/10 to-cyan-500/10",animated:"animate-pulse"},padding:{none:"p-0",small:"p-3",sm:"p-3",medium:"p-6",md:"p-6",large:"p-8",lg:"p-8",xl:"p-12",custom:""},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full",custom:""}},defaultVariants:{style:"default",effect:"none",padding:"md",rounded:"lg"}}),ve=U.forwardRef(({className:r,style:e="default",effect:t="none",transparency:n=1,blurIntensity:o=0,borderOpacity:s=1,shadowOpacity:i=1,glowIntensity:a=0,glowColor:l="blue",particleEffect:p=false,hoverEffect:b=false,animationEffect:g=false,padding:u="md",customPadding:h,rounded:c="lg",customRounded:m,background:S="solid",gradientColors:y=["#3B82F6","#8B5CF6"],patternType:w="dots",backgroundImage:d,backgroundVideo:x,interactive:I=false,hoverScale:O=1.05,hoverRotate:G=0,hoverGlow:M=false,children:H,...P},T)=>{let k=U.useMemo(()=>{switch(w){case "dots":return "radial-gradient(circle, #000 1px, transparent 1px)";case "lines":return "linear-gradient(45deg, #000 1px, transparent 1px)";case "grid":return "linear-gradient(#000 1px, transparent 1px), linear-gradient(90deg, #000 1px, transparent 1px)";case "waves":return "repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.1) 10px, rgba(0,0,0,0.1) 20px)";default:return ""}},[w]),A=U.useMemo(()=>{let v={opacity:n};switch(o>0&&(v.backdropFilter=`blur(${o}px)`),s<1&&(v.borderColor=`rgba(0, 0, 0, ${s})`),i<1&&(v.boxShadow=`0 4px 6px -1px rgba(0, 0, 0, ${i*.1})`),a>0&&(v.boxShadow=`${v.boxShadow||""}, 0 0 ${a*10}px ${l}`),S){case "gradient":v.background=`linear-gradient(135deg, ${y.join(", ")})`;break;case "pattern":v.backgroundImage=k;break;case "image":d&&(v.backgroundImage=`url(${d})`,v.backgroundSize="cover",v.backgroundPosition="center");break;}return v},[n,o,s,i,a,l,S,y,k,d]),N=U.useMemo(()=>{if(!I)return "";let v=[];return O!==1&&v.push(`hover:scale-${O}`),G!==0&&v.push(`hover:rotate-${G}`),M&&v.push("hover:shadow-2xl hover:shadow-cyan-500/30"),v.join(" ")},[I,O,G,M]),L=U.useMemo(()=>a$1("panel-component",`panel-${e}`,`panel-effect-${t}`,zr({style:e,effect:t,padding:h?"custom":u,rounded:m?"custom":c}),h,m,N,r),[e,t,u,h,c,m,N,r]);return jsxs("div",{className:"relative",children:[S==="video"&&x&&jsx("video",{className:"absolute inset-0 w-full h-full object-cover rounded-lg",autoPlay:true,muted:true,loop:true,playsInline:true,children:jsx("source",{src:x,type:"video/mp4"})}),p&&jsx("div",{className:"absolute inset-0 pointer-events-none"}),jsx(a$2,{ref:T,className:L,style:A,...P,children:H}),g&&jsx("div",{className:"absolute inset-0 pointer-events-none"})]})});ve.displayName="Panel";var Te=U.forwardRef(({isSelectMode:r=false,totalCount:e=0,selectedCount:t=0,actions:n=[],selectModeActions:o=[],onToggleSelectMode:s,onToggleSelectAll:i,onCancelSelect:a,loading:l$1=false,className:p,...b},g)=>{let u=useCallback(c=>{switch(c){case "red":return "bg-red-100 dark:bg-red-900 text-red-700 dark:text-red-300";case "blue":return "bg-indigo-100 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-300";case "green":return "bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300";default:return "bg-muted text-muted-foreground"}},[]),h=useCallback((c,m)=>jsxs(d,{variant:c.variant||"outline",size:"sm",onClick:c.onClick,disabled:c.disabled||l$1,className:a$1("flex-1 sm:flex-initial",c.className),children:[c.icon&&jsx(l,{name:c.icon,className:"h-4 w-4 sm:h-3.5 sm:w-3.5 mr-1 sm:mr-1.5"}),jsx("span",{className:"hidden sm:inline",children:c.label}),jsx("span",{className:"sm:hidden",children:c.labelMobile||c.label}),c.badge&&c.badge.count>0&&jsx("span",{className:a$1("ml-1.5",u(c.badge.color),"px-1.5 py-0.5 rounded-full text-xs font-semibold"),children:c.badge.count})]},m),[u,l$1]);return jsx("div",{ref:g,className:a$1("mb-4 bg-background rounded-lg shadow-sm border border-border p-3 sm:p-4",p),...b,children:r?jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i&&jsxs(d,{variant:"outline",size:"sm",onClick:i,className:"flex-1 sm:flex-initial min-w-[100px]",children:[jsx(l,{name:t===e?"square":"check",className:"h-4 w-4 sm:h-3.5 sm:w-3.5 mr-1 sm:mr-1.5"}),jsx("span",{className:"hidden sm:inline",children:t===e?"\uC804\uCCB4 \uD574\uC81C":"\uC804\uCCB4 \uC120\uD0DD"}),jsx("span",{className:"sm:hidden",children:t===e?"\uD574\uC81C":"\uC804\uCCB4"})]}),o.map((c,m)=>jsx("div",{className:a$1("flex-1 sm:flex-initial min-w-[100px]",c.className),children:h(c,`select-${m}`)},`select-action-${m}`)),a&&jsx(d,{variant:"outline",size:"sm",onClick:a,className:"flex-1 sm:flex-initial min-w-[80px]",children:"\uCDE8\uC18C"})]}):jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&jsxs(d,{variant:"outline",size:"sm",onClick:s,disabled:e===0,className:"flex-1 sm:flex-initial min-w-[80px] sm:min-w-[auto] px-2 sm:px-3",title:e===0?"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uC5EC\uB7EC \uD56D\uBAA9 \uC120\uD0DD",children:[jsx(l,{name:"check",className:"h-4 w-4 sm:h-3.5 sm:w-3.5"}),jsx("span",{className:"hidden sm:inline ml-1.5 sm:ml-2",children:"\uC120\uD0DD"})]}),n.map((c,m)=>jsx("div",{className:a$1("flex-1 sm:flex-initial min-w-[100px]",c.className),children:h(c,`action-${m}`)},`action-${m}`))]})})});Te.displayName="ActionToolbar";var Hr=U.memo(Te);var Pe=U.forwardRef(({className:r,variant:e="default",size:t="md",pressed:n,onPressedChange:o,label:s,description:i,icon:a,iconPosition:l="left",onClick:p,...b},g)=>{let[u,h]=U.useState(false),c=n!==void 0,m=c?n:u,S=d=>{c||h(!m),o==null||o(!m),p==null||p(d);},y={sm:"h-7 px-3 text-sm",md:"h-9 px-4 text-base",lg:"h-11 px-5 text-lg"},w={default:m?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted text-foreground hover:bg-muted/80",outline:m?"border-2 border-primary bg-primary/10 text-primary hover:bg-primary/15":"border-2 border-border bg-transparent text-foreground hover:bg-muted",filled:m?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted/50 text-foreground hover:bg-muted",ghost:m?"bg-primary/10 text-primary hover:bg-primary/15":"bg-transparent text-foreground hover:bg-muted",glass:m?"bg-white/20 backdrop-blur-sm border border-white/30 text-white hover:bg-white/30 dark:bg-primary/20 dark:border-primary/50 dark:hover:bg-primary/30":"bg-white/10 backdrop-blur-sm border border-white/20 text-white hover:bg-white/20 dark:bg-muted/10 dark:border-border/50 dark:text-foreground dark:hover:bg-muted/20"};return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("button",{type:"button",ref:g,className:a$1("inline-flex items-center justify-center gap-2 rounded-md font-medium transition-all duration-200","focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",y[t],w[e],r),onClick:S,"aria-pressed":m,...b,children:[a&&l==="left"&&jsx("span",{className:"flex-shrink-0",children:a}),s&&jsx("span",{children:s}),a&&l==="right"&&jsx("span",{className:"flex-shrink-0",children:a})]}),i&&jsx("div",{className:"flex flex-col",children:jsx("p",{className:"text-sm text-muted-foreground",children:i})})]})});Pe.displayName="Toggle";var Ne=U.forwardRef(({children:r,className:e,orientation:t="vertical",scrollHideDelay:n=600,type:o="hover",...s},i)=>{let[a,l]=U.useState(false),p=U.useRef(void 0),b=()=>{(o==="hover"||o==="always")&&l(true);},g=()=>{o==="hover"&&(p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{l(false);},n));};return U.useEffect(()=>{o==="always"&&l(true);},[o]),U.useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]),jsx("div",{ref:i,className:a$1("relative overflow-auto scrollbar-thin",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",a?"scrollbar-visible":"scrollbar-hidden",e),onMouseEnter:b,onMouseLeave:g,...s,children:r})});Ne.displayName="ScrollArea";var Ur=U.forwardRef(({orientation:r="vertical",className:e,...t},n)=>jsx("div",{ref:n,className:a$1("flex touch-none select-none transition-colors duration-150 ease-out",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...t}));Ur.displayName="ScrollBar";function Ie(r={}){let{threshold:e=400,showOnMount:t=false,smooth:n=true}=r,[o,s]=useState(t),[i,a]=useState(false);return useEffect(()=>{a(true);},[]),useEffect(()=>{if(!i)return;let p=()=>{typeof window!="undefined"&&s(window.pageYOffset>e);};return p(),window.addEventListener("scroll",p,{passive:true}),window.addEventListener("resize",p,{passive:true}),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",p);}},[e,i]),{isVisible:o,scrollToTop:()=>{typeof window!="undefined"&&(n?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0));},mounted:i}}var Br=({className:r,threshold:e=400,smooth:t=true,icon:n="arrowUp",size:o="md",variant:s="default",showOnMount:i=false,...a})=>{let{isVisible:l$1,scrollToTop:p}=Ie({threshold:e,showOnMount:i,smooth:t}),g={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-10 h-10 sm:w-12 sm:h-12",lg:"w-12 h-12 sm:w-14 sm:h-14"},u={default:"bg-white/20 backdrop-blur-md border border-white/30 text-white hover:bg-white/30 dark:bg-muted/20 dark:border-border/50 dark:text-foreground dark:hover:bg-muted/30",primary:"bg-primary/70 backdrop-blur-md border border-primary/40 text-white hover:bg-primary/80 transition-all duration-300 dark:bg-primary/70 dark:border-primary/40 dark:hover:bg-primary/80",secondary:"bg-muted/80 backdrop-blur-md border border-border text-foreground hover:bg-muted/90 dark:bg-muted/50 dark:border-border dark:text-foreground dark:hover:bg-muted/60",outline:"border border-white/40 bg-white/15 backdrop-blur-md text-white hover:bg-white/25 dark:border-border/50 dark:bg-muted/15 dark:text-foreground dark:hover:bg-muted/25",ghost:"bg-transparent hover:bg-white/15 backdrop-blur-md text-white dark:text-foreground dark:hover:bg-muted/25"};return jsx("button",{onClick:p,className:a$1("fixed z-[9999] rounded-full transition-all duration-500 ease-in-out","flex items-center justify-center","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:ring-ring/50","transform hover:scale-105 active:scale-95",l$1?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",r,g[o],u[s]),"aria-label":"Scroll to top",...a,children:jsx(l,{name:n,className:"w-5 h-5"})})};function $r({className:r,size:e="md",variant:t="button",showLabel:n=false,label:o={light:"\uB77C\uC774\uD2B8",dark:"\uB2E4\uD06C",system:"\uC2DC\uC2A4\uD15C"},...s}){let{theme:i,setTheme:a,resolvedTheme:l$1}=b(),p={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-14 w-14"},b$1={sm:16,md:20,lg:24},g=()=>i==="system"?jsx(l,{name:"monitor",size:b$1[e]}):l$1==="dark"?jsx(l,{name:"moon",size:b$1[e]}):jsx(l,{name:"sun",size:b$1[e],className:"text-amber-600"}),u=()=>{i==="system"?a("light"):i==="light"?a("dark"):i==="dark"&&a("light");};return t==="icon"?jsx("button",{onClick:u,className:a$1("inline-flex items-center justify-center rounded-lg transition-all duration-300 hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",p[e],r),...s,children:jsxs("div",{className:"relative flex items-center justify-center w-full h-full",children:[jsx("div",{className:a$1("absolute inset-0 flex items-center justify-center transition-all duration-300",l$1==="dark"?"rotate-0 opacity-100":"rotate-90 opacity-0"),children:jsx(l,{name:"moon",size:b$1[e],className:"text-indigo-500"})}),jsx("div",{className:a$1("absolute inset-0 flex items-center justify-center transition-all duration-300",l$1==="dark"?"rotate-90 opacity-0":"rotate-0 opacity-100"),children:jsx(l,{name:"sun",size:b$1[e],className:"text-amber-600 dark:text-yellow-500"})})]})}):t==="switch"?jsxs("button",{onClick:u,className:a$1("relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-300 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",l$1==="dark"?"bg-primary":"bg-muted",r),...s,children:[jsx("span",{className:a$1("inline-block h-4 w-4 transform rounded-full bg-white transition-transform duration-300 shadow-lg",l$1==="dark"?"translate-x-6":"translate-x-1")}),jsxs("div",{className:"absolute inset-0 flex items-center justify-between px-1.5",children:[jsx(l,{name:"sun",size:12,className:"text-amber-600 dark:text-yellow-500 opacity-0"}),jsx(l,{name:"moon",size:12,className:"text-indigo-500 opacity-0"})]})]}):jsxs("button",{onClick:u,className:a$1("inline-flex items-center gap-3 rounded-lg px-4 py-3 text-sm font-medium transition-all duration-300 hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 focus-visible:ring-offset-2",r),...s,children:[g(),n&&jsx("span",{className:"text-foreground",children:i==="system"?o.system:i==="dark"?o.dark:o.light})]})}var Le=["home","menu","close","search","settings","user","bell","arrowLeft","arrowRight","arrowUp","arrowDown","chevronLeft","chevronRight","chevronUp","chevronDown","add","edit","delete","remove","check","share","download","upload","save","copy","refresh","search","loader","success","error","warning","info","alertCircle","heart","star","bookmark","logIn","logOut","shield","key","lock","unlock","eye","eyeOff","users","userPlus","chart","barChart","pieChart","trendingUp","trendingDown","activity","database","zap","circle","dollarSign","dollar","currency","fileText","file","folder","book","bookOpen","image","video","camera","message","messageSquare","phone","mail","send","play","pause","mic","headphones","smile","frown","meh","laugh","angry","thumbsUp","thumbsDown","clock","timer","calendar","calendarDays","monitor","sun","moon","sparkle","sparkles","lightbulb","brain","globe","deviceMobile","smartphone","floppyDisk","externalLink","link","moreHorizontal","moreVertical","rocket","ticket","clipboard","wifi","wifiOff","cpu","mask"],Dr=d$1;function Vr(r){return r in d$1||Le.includes(r)}function _r(r,e){let t=d$1[r];return t&&t[e]||null}function ze(r,e){return `${r} dark:${e}`}function Oe(r,e,t="to-r"){return a$1(`bg-gradient-${t}`,`from-${r}`,`to-${e}`)}function He(r,e){return `${r}/${e}`}function Ue(r){return r==="gradient"||r==="solid"}function Be(r){return r==="gradient"}function $e(r,e,t,n,o){return a$1(r,e&&`sm:${e}`,t&&`md:${t}`,n&&`lg:${n}`,o&&`xl:${o}`)}function De(r,e,t){return r?e:t||""}var _={subtle:"cubic-bezier(0.25, 0.1, 0.25, 1)",soft:"cubic-bezier(0.22, 1, 0.36, 1)",springy:"cubic-bezier(0.34, 1.56, 0.64, 1)",bouncy:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",snappy:"cubic-bezier(0.19, 1, 0.22, 1)"},ee={subtle:150,soft:250,springy:300,bouncy:400,snappy:180},J={preset:"springy",scale:.008,translateY:-0.5},Fr={button:{preset:"springy",duration:180,scale:.008,translateY:-0.5},card:{preset:"soft",duration:220,scale:.005,translateY:-1},menuItem:{preset:"subtle",duration:150,translateX:1},modal:{preset:"springy",duration:250,scale:.01},dropdown:{preset:"soft",duration:180,translateY:-2},tooltip:{preset:"snappy",duration:120,scale:.02},checkbox:{preset:"springy",duration:200,scale:.03},switch:{preset:"springy",duration:180}},Gr={"--hua-motion-duration":"180ms","--hua-motion-easing":_.springy,"--hua-motion-scale-hover":"1.008","--hua-motion-scale-active":"0.992","--hua-motion-translate-y":"-0.5px"};function Jr(r={}){let{preset:e=J.preset,duration:t=ee[e]||200,delay:n=0,scale:o=J.scale,translateY:s=J.translateY,translateX:i=0,rotate:a=0,disabled:l=false,enableHover:p=true,enablePress:b=true,enableFocus:g=false}=r,[u,h]=useState({isHovered:false,isPressed:false,isFocused:false,isAnimating:false}),c=useRef(null),m=useCallback(d=>{c.current&&clearTimeout(c.current),d?(h(x=>({...x,isAnimating:true})),c.current=setTimeout(()=>{h(x=>({...x,isAnimating:false}));},t+n)):h(x=>({...x,isAnimating:false}));},[t,n]),S=useMemo(()=>({onMouseEnter:()=>{l||!p||(h(d=>({...d,isHovered:true})),m(true));},onMouseLeave:()=>{l||(h(d=>({...d,isHovered:false,isPressed:false})),m(true));},onMouseDown:()=>{l||!b||(h(d=>({...d,isPressed:true})),m(true));},onMouseUp:()=>{l||(h(d=>({...d,isPressed:false})),m(true));},onFocus:()=>{l||!g||(h(d=>({...d,isFocused:true})),m(true));},onBlur:()=>{l||(h(d=>({...d,isFocused:false})),m(true));}}),[l,p,b,g,m]),y=useMemo(()=>{if(l)return {transform:"none",transition:"none",willChange:"auto"};let d=[],x=_[e]||_.springy;return u.isHovered&&!u.isPressed&&(o&&d.push(`scale(${1+o})`),s&&d.push(`translateY(${s}px)`),i&&d.push(`translateX(${i}px)`),a&&d.push(`rotate(${a}deg)`)),u.isPressed&&(o&&d.push(`scale(${1-o*.5})`),s&&d.push(`translateY(${Math.abs(s)*.5}px)`)),u.isFocused&&!u.isHovered&&!u.isPressed&&o&&d.push(`scale(${1+o*.5})`),{transform:d.length>0?d.join(" "):"none",transition:`transform ${t}ms ${x} ${n}ms`,willChange:u.isAnimating?"transform":"auto"}},[u,l,e,t,n,o,s,i,a]),w=useMemo(()=>l?"":["transform-gpu"].join(" "),[l]);return useEffect(()=>()=>{c.current&&clearTimeout(c.current);},[]),{state:u,style:y,handlers:S,className:w}}function Kr(r="springy",e={}){let{enableHover:t=true,enableActive:n=true,enableFocus:o=false}=e,s=["transform-gpu","transition-transform"],i={subtle:"duration-150",soft:"duration-250",springy:"duration-200",bouncy:"duration-300",snappy:"duration-150"}[r];return s.push(i),t&&s.push("hover:scale-[1.02]","hover:-translate-y-0.5"),n&&s.push("active:scale-[0.98]","active:translate-y-0"),o&&s.push("focus:scale-[1.01]"),s.join(" ")}function Fe(r={}){let{threshold:e=0,rootMargin:t="0px",triggerOnce:n=false,onChange:o}=r,s=useRef(null),[i,a]=useState(false),[l,p]=useState(null),b=useRef(false);return useEffect(()=>{let g=s.current;if(!g||n&&b.current)return;let u=new IntersectionObserver(([h])=>{let c=h.isIntersecting;n&&c&&(b.current=true),a(c),p(h),o==null||o(h);},{threshold:e,rootMargin:t});return u.observe(g),()=>{u.disconnect();}},[e,t,n,o]),{ref:s,inView:i,entry:l}}function Ge(r={}){let{target:e="page",throttle:t=16}=r,n=useRef(null),[o,s]=useState(0),[i,a]=useState(0),[l,p]=useState(0),[b,g]=useState(false),[u,h]=useState(null),c=useRef(0),m=useRef(null),S=useRef(0),y=useCallback(()=>{let w=Date.now();if(!(w-S.current<t)){if(S.current=w,e==="page"){let d=window.scrollY,x=document.documentElement.scrollHeight-window.innerHeight,I=x>0?Math.min(d/x,1):0;s(I),a(d),p(window.scrollX),h(d>c.current?"down":"up"),c.current=d;}else if(n.current){let d=n.current,x=d.scrollTop,I=d.scrollHeight-d.clientHeight,O=I>0?Math.min(x/I,1):0;s(O),a(x),p(d.scrollLeft),h(x>c.current?"down":"up"),c.current=x;}g(true),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{g(false);},150);}},[e,t]);return useEffect(()=>{if(e==="page")return y(),window.addEventListener("scroll",y,{passive:true}),window.addEventListener("resize",y,{passive:true}),()=>{window.removeEventListener("scroll",y),window.removeEventListener("resize",y),m.current&&clearTimeout(m.current);};{let w=n.current;return w?(w.addEventListener("scroll",y,{passive:true}),()=>{w.removeEventListener("scroll",y),m.current&&clearTimeout(m.current);}):void 0}},[e,y]),{ref:n,progress:o,scrollY:i,scrollX:l,isScrolling:b,direction:u}}function We(r={}){let{type:e="page",touch:t=false,throttle:n=0}=r,o=useRef(null),[s,i]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,isInside:false,isMoving:false}),a=useRef(0),l=useRef(null),p=useCallback((b,g)=>{let u=Date.now();if(n>0&&u-a.current<n)return;a.current=u;let h=b,c=g,m=0,S=0,y=0,w=0,d=false;if(e==="page"&&(h=b+window.scrollX,c=g+window.scrollY),o.current){let x=o.current.getBoundingClientRect();m=b-x.left,S=g-x.top,y=m/x.width,w=S/x.height,d=b>=x.left&&b<=x.right&&g>=x.top&&g<=x.bottom;}i({x:h,y:c,elementX:m,elementY:S,elementPositionX:y,elementPositionY:w,isInside:d,isMoving:true}),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{i(x=>({...x,isMoving:false}));},150);},[e,n]);return useEffect(()=>{let b=u=>{p(u.clientX,u.clientY);},g=u=>{u.touches.length>0&&p(u.touches[0].clientX,u.touches[0].clientY);};return window.addEventListener("mousemove",b,{passive:true}),t&&window.addEventListener("touchmove",g,{passive:true}),()=>{window.removeEventListener("mousemove",b),t&&window.removeEventListener("touchmove",g),l.current&&clearTimeout(l.current);}},[p,t]),{ref:o,...s}}function Ye(r={}){let{throttle:e=100,mobileBreakpoint:t=768,tabletBreakpoint:n=1024}=r,[o,s]=useState({width:typeof window!="undefined"?window.innerWidth:0,height:typeof window!="undefined"?window.innerHeight:0,isMobile:false,isTablet:false,isDesktop:true}),i=useCallback(()=>{let a=window.innerWidth,l=window.innerHeight;s({width:a,height:l,isMobile:a<t,isTablet:a>=t&&a<n,isDesktop:a>=n});},[t,n]);return useEffect(()=>{if(typeof window=="undefined")return;i();let a,l=()=>{clearTimeout(a),a=setTimeout(i,e);};return window.addEventListener("resize",l,{passive:true}),()=>{window.removeEventListener("resize",l),clearTimeout(a);}},[i,e]),o}export{fe as Action,Hr as ActionToolbar,Fr as COMPONENT_MOTION_DEFAULTS,Gr as CSS_MOTION_VARS,ee as DURATIONS,Ir as Divider,_ as EASING_FUNCTIONS,ge as Grid,pr as Link,ve as Panel,Ne as ScrollArea,Br as ScrollToTop,be as Stack,$r as ThemeToggle,Pe as Toggle,De as conditionalClass,Oe as createGradient,_r as getIconNameForProvider,Kr as getMicroMotionClasses,Le as iconNames,Dr as iconProviderMapping,Be as isGradientVariant,Ue as isTextWhite,Vr as isValidIconName,$e as responsive,Fe as useInView,Jr as useMicroMotion,We as useMouse,Ge as useScrollProgress,Ye as useWindowSize,ze as withDarkMode,He as withOpacity};//# sourceMappingURL=index.mjs.map
|
|
37
37
|
//# sourceMappingURL=index.mjs.map
|