@mks2508/mks-ui 0.2.0 → 0.3.1
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/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts.map +1 -0
- package/dist/react-ui/components/MorphingPopover/index.d.ts +46 -0
- package/dist/react-ui/components/MorphingPopover/index.d.ts.map +1 -0
- package/dist/react-ui/components/MorphingPopover/index.js +119 -0
- package/dist/react-ui/components/MorphingPopover/morphing-popover.module.js +5 -0
- package/dist/react-ui/components/index.d.ts.map +1 -0
- package/dist/react-ui/hooks/Animation/UseAutoHeight.d.ts +30 -0
- package/dist/react-ui/hooks/Animation/UseAutoHeight.d.ts.map +1 -0
- package/dist/react-ui/hooks/Animation/UseAutoHeight.js +80 -0
- package/dist/react-ui/hooks/DOM/UseIsInView.d.ts +32 -0
- package/dist/react-ui/hooks/DOM/UseIsInView.d.ts.map +1 -0
- package/dist/react-ui/hooks/DOM/UseIsInView.js +33 -0
- package/dist/react-ui/hooks/Formatting/UseListFormat.d.ts +49 -0
- package/dist/react-ui/hooks/Formatting/UseListFormat.d.ts.map +1 -0
- package/dist/react-ui/hooks/Formatting/UseListFormat.js +105 -0
- package/dist/react-ui/hooks/State/UseControlledState.d.ts.map +1 -0
- package/dist/react-ui/hooks/State/UseControlledState.js +34 -0
- package/dist/react-ui/hooks/State/UseDataState.d.ts +21 -0
- package/dist/react-ui/hooks/State/UseDataState.d.ts.map +1 -0
- package/dist/react-ui/hooks/State/UseDataState.js +63 -0
- package/dist/react-ui/hooks/index.d.ts +16 -0
- package/dist/react-ui/hooks/index.d.ts.map +1 -0
- package/dist/react-ui/hooks/index.js +5 -0
- package/dist/react-ui/icons/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/activity.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.js +75 -0
- package/dist/react-ui/icons/lucide-animated/arrow-down-to-line.d.ts +23 -0
- package/dist/react-ui/icons/lucide-animated/arrow-down-to-line.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/arrow-down-to-line.js +45 -0
- package/dist/react-ui/icons/lucide-animated/arrow-up.d.ts +23 -0
- package/dist/react-ui/icons/lucide-animated/arrow-up.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/arrow-up.js +41 -0
- package/dist/react-ui/icons/lucide-animated/bell-electric.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/bell-electric.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/bell-electric.js +202 -0
- package/dist/react-ui/icons/lucide-animated/bell.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/bell.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/bell.js +65 -0
- package/dist/react-ui/icons/lucide-animated/bot.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/bot.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/bot.js +118 -0
- package/dist/react-ui/icons/lucide-animated/box.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/box.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/box.js +86 -0
- package/dist/react-ui/icons/lucide-animated/check.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/check.js +23 -0
- package/dist/react-ui/icons/lucide-animated/circle-check.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/circle-check.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/circle-check.js +76 -0
- package/dist/react-ui/icons/lucide-animated/delete.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/delete.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/delete.js +110 -0
- package/dist/react-ui/icons/lucide-animated/download.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/download.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/download.js +70 -0
- package/dist/react-ui/icons/lucide-animated/edit-2.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/edit-2.js +23 -0
- package/dist/react-ui/icons/lucide-animated/globe.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/globe.js +31 -0
- package/dist/react-ui/icons/lucide-animated/home.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/home.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/home.js +68 -0
- package/dist/react-ui/icons/lucide-animated/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/layers.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/layers.js +27 -0
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +130 -0
- package/dist/react-ui/icons/lucide-animated/list.d.ts +23 -0
- package/dist/react-ui/icons/lucide-animated/list.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/list.js +78 -0
- package/dist/react-ui/icons/lucide-animated/package.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/package.js +28 -0
- package/dist/react-ui/icons/lucide-animated/palette.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/palette.js +49 -0
- package/dist/react-ui/icons/lucide-animated/plus.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/plus.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/plus.js +59 -0
- package/dist/react-ui/icons/lucide-animated/refresh-cw.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/refresh-cw.js +28 -0
- package/dist/react-ui/icons/lucide-animated/rocket.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/rocket.js +28 -0
- package/dist/react-ui/icons/lucide-animated/save.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/save.js +27 -0
- package/dist/react-ui/icons/lucide-animated/search.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/search.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/search.js +78 -0
- package/dist/react-ui/icons/lucide-animated/settings.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/settings.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/settings.js +63 -0
- package/dist/react-ui/icons/lucide-animated/terminal.d.ts +24 -0
- package/dist/react-ui/icons/lucide-animated/terminal.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/terminal.js +36 -0
- package/dist/react-ui/icons/lucide-animated/trash-2.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/trash-2.js +39 -0
- package/dist/react-ui/icons/lucide-animated/trending-down.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/trending-down.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/trending-down.js +123 -0
- package/dist/react-ui/icons/lucide-animated/trending-up.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/trending-up.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/trending-up.js +123 -0
- package/dist/react-ui/icons/lucide-animated/type.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/type.js +37 -0
- package/dist/react-ui/icons/lucide-animated/upload.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/upload.js +32 -0
- package/dist/react-ui/icons/lucide-animated/x.d.ts +11 -0
- package/dist/react-ui/icons/lucide-animated/x.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/x.js +68 -0
- package/dist/react-ui/index.d.ts.map +1 -0
- package/dist/react-ui/index.js +108 -0
- package/dist/react-ui/lib/get-strict-context.d.ts +30 -0
- package/dist/react-ui/lib/get-strict-context.d.ts.map +1 -0
- package/dist/react-ui/lib/get-strict-context.js +40 -0
- package/dist/react-ui/lib/index.d.ts.map +1 -0
- package/dist/react-ui/lib/utils.d.ts.map +1 -0
- package/dist/react-ui/lib/utils.js +27 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +31 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/AutoHeight/index.js +52 -0
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +44 -0
- package/dist/react-ui/primitives/CountingNumber/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/CountingNumber/index.js +97 -0
- package/dist/react-ui/primitives/Highlight/Highlight.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/Highlight/index.d.ts +48 -0
- package/dist/react-ui/primitives/Highlight/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/Highlight/index.js +396 -0
- package/dist/react-ui/primitives/Slot/index.d.ts +53 -0
- package/dist/react-ui/primitives/Slot/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/Slot/index.js +65 -0
- package/dist/react-ui/primitives/index.d.ts +13 -0
- package/dist/react-ui/primitives/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/index.js +22 -0
- package/dist/react-ui/primitives/waapi/Morph/Morph.types.d.ts +76 -0
- package/dist/react-ui/primitives/waapi/Morph/Morph.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/MorphContext.d.ts +11 -0
- package/dist/react-ui/primitives/waapi/Morph/MorphContext.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/MorphContext.js +19 -0
- package/dist/react-ui/primitives/waapi/Morph/index.d.ts +23 -0
- package/dist/react-ui/primitives/waapi/Morph/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/index.js +45 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/index.d.ts +12 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.d.ts +38 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.js +78 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.d.ts +23 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.js +140 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.d.ts +28 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.js +77 -0
- package/dist/react-ui/primitives/waapi/Morph/useMorph.d.ts +27 -0
- package/dist/react-ui/primitives/waapi/Morph/useMorph.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Morph/useMorph.js +86 -0
- package/dist/react-ui/primitives/waapi/Reorder/Reorder.types.d.ts +168 -0
- package/dist/react-ui/primitives/waapi/Reorder/Reorder.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Reorder/index.d.ts +25 -0
- package/dist/react-ui/primitives/waapi/Reorder/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Reorder/index.js +186 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorder.d.ts +26 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorder.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorder.js +48 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.d.ts +33 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.js +137 -0
- package/dist/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.d.ts +47 -0
- package/dist/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.js +72 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +10 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.types.d.ts +74 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/index.d.ts +33 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingNumber/index.js +354 -0
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +25 -0
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.types.d.ts +57 -0
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingText/index.d.ts +26 -0
- package/dist/react-ui/primitives/waapi/SlidingText/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/SlidingText/index.js +105 -0
- package/dist/react-ui/primitives/waapi/core/animationConstants.d.ts +156 -0
- package/dist/react-ui/primitives/waapi/core/animationConstants.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/animationConstants.js +180 -0
- package/dist/react-ui/primitives/waapi/core/index.d.ts +16 -0
- package/dist/react-ui/primitives/waapi/core/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/index.js +5 -0
- package/dist/react-ui/primitives/waapi/core/types.d.ts +143 -0
- package/dist/react-ui/primitives/waapi/core/types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.d.ts +32 -0
- package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.js +322 -0
- package/dist/react-ui/primitives/waapi/core/useElementRegistry.d.ts +21 -0
- package/dist/react-ui/primitives/waapi/core/useElementRegistry.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/useElementRegistry.js +65 -0
- package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.d.ts +20 -0
- package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.js +99 -0
- package/dist/react-ui/primitives/waapi/core/usePositionCapture.d.ts +24 -0
- package/dist/react-ui/primitives/waapi/core/usePositionCapture.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/core/usePositionCapture.js +75 -0
- package/dist/react-ui/primitives/waapi/index.d.ts +33 -0
- package/dist/react-ui/primitives/waapi/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/index.js +18 -0
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/Accordion.styles.js +54 -0
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/index.js +266 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.js +29 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/index.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/index.js +319 -0
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Badge/Badge.styles.js +30 -0
- package/dist/react-ui/ui/Badge/Badge.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Badge/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Badge/index.js +34 -0
- package/dist/react-ui/ui/Button/Button.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Button/Button.styles.js +40 -0
- package/dist/react-ui/ui/Button/Button.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Button/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Button/index.js +103 -0
- package/dist/react-ui/ui/Card/Card.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/Card.styles.js +24 -0
- package/dist/react-ui/ui/Card/Card.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/index.js +82 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.js +34 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/index.js +158 -0
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Combobox/Combobox.styles.js +17 -0
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Combobox/index.d.ts +60 -0
- package/dist/react-ui/ui/Combobox/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Combobox/index.js +216 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +30 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/index.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/index.js +42 -0
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +35 -0
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/DataCard/DataCard.styles.js +114 -0
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +135 -0
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts.map +1 -0
- package/dist/react-ui/ui/DataCard/index.d.ts +129 -0
- package/dist/react-ui/ui/DataCard/index.d.ts.map +1 -0
- package/dist/react-ui/ui/DataCard/index.js +276 -0
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/Dialog.styles.js +29 -0
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +221 -0
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/index.js +265 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.js +16 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts.map +1 -0
- package/dist/react-ui/ui/DropdownMenu/index.d.ts +50 -0
- package/dist/react-ui/ui/DropdownMenu/index.d.ts.map +1 -0
- package/dist/react-ui/ui/DropdownMenu/index.js +181 -0
- package/dist/react-ui/ui/Field/Field.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Field/Field.styles.js +27 -0
- package/dist/react-ui/ui/Field/Field.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Field/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Field/index.js +145 -0
- package/dist/react-ui/ui/Input/Input.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/Input.styles.js +5 -0
- package/dist/react-ui/ui/Input/Input.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/index.js +29 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.js +34 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/index.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/index.js +81 -0
- package/dist/react-ui/ui/Label/Label.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/Label.styles.js +5 -0
- package/dist/react-ui/ui/Label/Label.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/index.js +24 -0
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/Menu.styles.js +32 -0
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +328 -0
- package/dist/react-ui/ui/Menu/Menu.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/index.js +636 -0
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/Popover.styles.js +26 -0
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +204 -0
- package/dist/react-ui/ui/Popover/Popover.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/index.js +237 -0
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/Progress.styles.js +30 -0
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +148 -0
- package/dist/react-ui/ui/Progress/Progress.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/index.js +170 -0
- package/dist/react-ui/ui/Select/Select.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Select/Select.styles.js +15 -0
- package/dist/react-ui/ui/Select/Select.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Select/index.d.ts +38 -0
- package/dist/react-ui/ui/Select/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Select/index.js +136 -0
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/Separator.styles.js +5 -0
- package/dist/react-ui/ui/Separator/Separator.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/index.js +29 -0
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/Switch.styles.js +41 -0
- package/dist/react-ui/ui/Switch/Switch.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/index.js +199 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.js +26 -0
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +201 -0
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/index.js +308 -0
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +16 -0
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/TextFlow/TextFlow.types.d.ts +101 -0
- package/dist/react-ui/ui/TextFlow/TextFlow.types.d.ts.map +1 -0
- package/dist/react-ui/ui/TextFlow/index.d.ts +26 -0
- package/dist/react-ui/ui/TextFlow/index.d.ts.map +1 -0
- package/dist/react-ui/ui/TextFlow/index.js +187 -0
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/Textarea.styles.js +5 -0
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/index.js +24 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.js +26 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +203 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/index.js +219 -0
- package/dist/react-ui/ui/index.d.ts +32 -0
- package/dist/react-ui/ui/index.d.ts.map +1 -0
- package/dist/react-ui/ui/index.js +39 -0
- package/package.json +14 -10
- package/src/react-ui/components/MorphingPopover/index.tsx +186 -0
- package/src/react-ui/hooks/Formatting/UseListFormat.ts +134 -0
- package/src/react-ui/hooks/index.ts +20 -0
- package/src/react-ui/icons/lucide-animated/activity.tsx +109 -0
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +124 -0
- package/src/react-ui/icons/lucide-animated/bell.tsx +93 -0
- package/src/react-ui/icons/lucide-animated/bot.tsx +122 -0
- package/src/react-ui/icons/lucide-animated/box.tsx +117 -0
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +107 -0
- package/src/react-ui/icons/lucide-animated/delete.tsx +133 -0
- package/src/react-ui/icons/lucide-animated/download.tsx +99 -0
- package/src/react-ui/icons/lucide-animated/home.tsx +103 -0
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +143 -0
- package/src/react-ui/icons/lucide-animated/plus.tsx +92 -0
- package/src/react-ui/icons/lucide-animated/search.tsx +94 -0
- package/src/react-ui/icons/lucide-animated/settings.tsx +92 -0
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +151 -0
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +150 -0
- package/src/react-ui/icons/lucide-animated/x.tsx +102 -0
- package/src/react-ui/primitives/AutoHeight/index.tsx +74 -0
- package/src/react-ui/primitives/CountingNumber/index.tsx +147 -0
- package/src/react-ui/primitives/Highlight/index.tsx +577 -0
- package/src/react-ui/primitives/Slot/index.tsx +128 -0
- package/src/react-ui/primitives/index.ts +16 -0
- package/src/react-ui/primitives/waapi/Morph/Morph.types.ts +106 -0
- package/src/react-ui/primitives/waapi/Morph/MorphContext.tsx +21 -0
- package/src/react-ui/primitives/waapi/Morph/index.tsx +56 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/index.ts +12 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.ts +88 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.ts +175 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.ts +86 -0
- package/src/react-ui/primitives/waapi/Morph/useMorph.ts +100 -0
- package/src/react-ui/primitives/waapi/Reorder/Reorder.types.ts +177 -0
- package/src/react-ui/primitives/waapi/Reorder/index.tsx +260 -0
- package/src/react-ui/primitives/waapi/Reorder/useReorder.ts +46 -0
- package/src/react-ui/primitives/waapi/Reorder/useReorderPresence.ts +208 -0
- package/src/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.ts +104 -0
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.ts +14 -0
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.types.ts +84 -0
- package/src/react-ui/primitives/waapi/SlidingNumber/index.tsx +474 -0
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.styles.ts +32 -0
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.types.ts +69 -0
- package/src/react-ui/primitives/waapi/SlidingText/index.tsx +140 -0
- package/src/react-ui/primitives/waapi/core/animationConstants.ts +215 -0
- package/src/react-ui/primitives/waapi/core/index.ts +53 -0
- package/src/react-ui/primitives/waapi/core/types.ts +200 -0
- package/src/react-ui/primitives/waapi/core/useAnimationOrchestrator.ts +429 -0
- package/src/react-ui/primitives/waapi/core/useElementRegistry.ts +80 -0
- package/src/react-ui/primitives/waapi/core/useFLIPAnimation.ts +137 -0
- package/src/react-ui/primitives/waapi/core/usePositionCapture.ts +105 -0
- package/src/react-ui/primitives/waapi/index.ts +116 -0
- package/src/react-ui/styles/animations.css +369 -0
- package/src/react-ui/ui/Accordion/index.tsx +362 -0
- package/src/react-ui/ui/AlertDialog/index.tsx +540 -0
- package/src/react-ui/ui/Badge/index.tsx +34 -0
- package/src/react-ui/ui/Button/index.tsx +155 -0
- package/src/react-ui/ui/Card/index.tsx +130 -0
- package/src/react-ui/ui/Checkbox/index.tsx +233 -0
- package/src/react-ui/ui/Combobox/index.tsx +331 -0
- package/src/react-ui/ui/CornerBracket/index.tsx +49 -0
- package/src/react-ui/ui/DataCard/DataCard.styles.ts +150 -0
- package/src/react-ui/ui/DataCard/DataCard.types.ts +146 -0
- package/src/react-ui/ui/DataCard/index.tsx +406 -0
- package/src/react-ui/ui/Dialog/index.tsx +452 -0
- package/src/react-ui/ui/DropdownMenu/index.tsx +300 -0
- package/src/react-ui/ui/Field/index.tsx +254 -0
- package/src/react-ui/ui/Input/index.tsx +32 -0
- package/src/react-ui/ui/InputGroup/index.tsx +147 -0
- package/src/react-ui/ui/Label/index.tsx +27 -0
- package/src/react-ui/ui/Menu/Menu.types.ts +425 -0
- package/src/react-ui/ui/Menu/index.tsx +900 -0
- package/src/react-ui/ui/Popover/index.tsx +422 -0
- package/src/react-ui/ui/Progress/Progress.types.ts +162 -0
- package/src/react-ui/ui/Progress/index.tsx +254 -0
- package/src/react-ui/ui/Select/index.tsx +225 -0
- package/src/react-ui/ui/Separator/index.tsx +37 -0
- package/src/react-ui/ui/Switch/index.tsx +253 -0
- package/src/react-ui/ui/Tabs/Tabs.types.ts +250 -0
- package/src/react-ui/ui/Tabs/index.tsx +421 -0
- package/src/react-ui/ui/TextFlow/TextFlow.styles.ts +36 -0
- package/src/react-ui/ui/TextFlow/TextFlow.types.ts +118 -0
- package/src/react-ui/ui/TextFlow/index.tsx +276 -0
- package/src/react-ui/ui/Textarea/index.tsx +27 -0
- package/src/react-ui/ui/Tooltip/index.tsx +394 -0
- package/src/react-ui/ui/index.ts +37 -0
- package/dist/react/components/MorphingPopover/MorphingPopover.types.d.ts.map +0 -1
- package/dist/react/components/MorphingPopover/index.d.ts +0 -46
- package/dist/react/components/MorphingPopover/index.d.ts.map +0 -1
- package/dist/react/components/MorphingPopover/index.js +0 -119
- package/dist/react/components/MorphingPopover/morphing-popover.module.js +0 -5
- package/dist/react/components/index.d.ts.map +0 -1
- package/dist/react/hooks/Animation/UseAutoHeight.d.ts +0 -30
- package/dist/react/hooks/Animation/UseAutoHeight.d.ts.map +0 -1
- package/dist/react/hooks/Animation/UseAutoHeight.js +0 -80
- package/dist/react/hooks/DOM/UseIsInView.d.ts +0 -32
- package/dist/react/hooks/DOM/UseIsInView.d.ts.map +0 -1
- package/dist/react/hooks/DOM/UseIsInView.js +0 -33
- package/dist/react/hooks/State/UseControlledState.d.ts.map +0 -1
- package/dist/react/hooks/State/UseControlledState.js +0 -34
- package/dist/react/hooks/State/UseDataState.d.ts +0 -21
- package/dist/react/hooks/State/UseDataState.d.ts.map +0 -1
- package/dist/react/hooks/State/UseDataState.js +0 -63
- package/dist/react/hooks/index.d.ts +0 -14
- package/dist/react/hooks/index.d.ts.map +0 -1
- package/dist/react/hooks/index.js +0 -4
- package/dist/react/icons/index.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/activity.d.ts +0 -11
- package/dist/react/icons/lucide-animated/activity.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/activity.js +0 -75
- package/dist/react/icons/lucide-animated/arrow-down-to-line.d.ts +0 -23
- package/dist/react/icons/lucide-animated/arrow-down-to-line.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/arrow-down-to-line.js +0 -45
- package/dist/react/icons/lucide-animated/arrow-up.d.ts +0 -23
- package/dist/react/icons/lucide-animated/arrow-up.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/arrow-up.js +0 -41
- package/dist/react/icons/lucide-animated/bell-electric.d.ts +0 -11
- package/dist/react/icons/lucide-animated/bell-electric.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/bell-electric.js +0 -202
- package/dist/react/icons/lucide-animated/bell.d.ts +0 -11
- package/dist/react/icons/lucide-animated/bell.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/bell.js +0 -65
- package/dist/react/icons/lucide-animated/bot.d.ts +0 -11
- package/dist/react/icons/lucide-animated/bot.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/bot.js +0 -118
- package/dist/react/icons/lucide-animated/box.d.ts +0 -11
- package/dist/react/icons/lucide-animated/box.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/box.js +0 -86
- package/dist/react/icons/lucide-animated/check.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/check.js +0 -23
- package/dist/react/icons/lucide-animated/circle-check.d.ts +0 -11
- package/dist/react/icons/lucide-animated/circle-check.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/circle-check.js +0 -76
- package/dist/react/icons/lucide-animated/delete.d.ts +0 -11
- package/dist/react/icons/lucide-animated/delete.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/delete.js +0 -110
- package/dist/react/icons/lucide-animated/download.d.ts +0 -11
- package/dist/react/icons/lucide-animated/download.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/download.js +0 -70
- package/dist/react/icons/lucide-animated/edit-2.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/edit-2.js +0 -23
- package/dist/react/icons/lucide-animated/globe.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/globe.js +0 -31
- package/dist/react/icons/lucide-animated/home.d.ts +0 -11
- package/dist/react/icons/lucide-animated/home.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/home.js +0 -68
- package/dist/react/icons/lucide-animated/index.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/layers.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/layers.js +0 -27
- package/dist/react/icons/lucide-animated/layout-panel-top.d.ts +0 -11
- package/dist/react/icons/lucide-animated/layout-panel-top.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/layout-panel-top.js +0 -130
- package/dist/react/icons/lucide-animated/list.d.ts +0 -23
- package/dist/react/icons/lucide-animated/list.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/list.js +0 -78
- package/dist/react/icons/lucide-animated/package.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/package.js +0 -28
- package/dist/react/icons/lucide-animated/palette.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/palette.js +0 -49
- package/dist/react/icons/lucide-animated/plus.d.ts +0 -11
- package/dist/react/icons/lucide-animated/plus.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/plus.js +0 -59
- package/dist/react/icons/lucide-animated/refresh-cw.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/refresh-cw.js +0 -28
- package/dist/react/icons/lucide-animated/rocket.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/rocket.js +0 -28
- package/dist/react/icons/lucide-animated/save.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/save.js +0 -27
- package/dist/react/icons/lucide-animated/search.d.ts +0 -11
- package/dist/react/icons/lucide-animated/search.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/search.js +0 -78
- package/dist/react/icons/lucide-animated/settings.d.ts +0 -11
- package/dist/react/icons/lucide-animated/settings.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/settings.js +0 -63
- package/dist/react/icons/lucide-animated/terminal.d.ts +0 -24
- package/dist/react/icons/lucide-animated/terminal.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/terminal.js +0 -36
- package/dist/react/icons/lucide-animated/trash-2.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/trash-2.js +0 -39
- package/dist/react/icons/lucide-animated/trending-down.d.ts +0 -11
- package/dist/react/icons/lucide-animated/trending-down.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/trending-down.js +0 -123
- package/dist/react/icons/lucide-animated/trending-up.d.ts +0 -11
- package/dist/react/icons/lucide-animated/trending-up.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/trending-up.js +0 -123
- package/dist/react/icons/lucide-animated/type.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/type.js +0 -37
- package/dist/react/icons/lucide-animated/upload.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/upload.js +0 -32
- package/dist/react/icons/lucide-animated/x.d.ts +0 -11
- package/dist/react/icons/lucide-animated/x.d.ts.map +0 -1
- package/dist/react/icons/lucide-animated/x.js +0 -68
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/lib/get-strict-context.d.ts +0 -30
- package/dist/react/lib/get-strict-context.d.ts.map +0 -1
- package/dist/react/lib/get-strict-context.js +0 -40
- package/dist/react/lib/index.d.ts.map +0 -1
- package/dist/react/lib/utils.d.ts.map +0 -1
- package/dist/react/lib/utils.js +0 -27
- package/dist/react/primitives/AutoHeight/index.d.ts +0 -31
- package/dist/react/primitives/AutoHeight/index.d.ts.map +0 -1
- package/dist/react/primitives/AutoHeight/index.js +0 -52
- package/dist/react/primitives/CountingNumber/index.d.ts +0 -44
- package/dist/react/primitives/CountingNumber/index.d.ts.map +0 -1
- package/dist/react/primitives/CountingNumber/index.js +0 -97
- package/dist/react/primitives/Highlight/Highlight.types.d.ts.map +0 -1
- package/dist/react/primitives/Highlight/index.d.ts +0 -48
- package/dist/react/primitives/Highlight/index.d.ts.map +0 -1
- package/dist/react/primitives/Highlight/index.js +0 -396
- package/dist/react/primitives/Slot/index.d.ts +0 -53
- package/dist/react/primitives/Slot/index.d.ts.map +0 -1
- package/dist/react/primitives/Slot/index.js +0 -65
- package/dist/react/primitives/index.d.ts +0 -12
- package/dist/react/primitives/index.d.ts.map +0 -1
- package/dist/react/primitives/index.js +0 -4
- package/dist/react/ui/Accordion/Accordion.styles.d.ts.map +0 -1
- package/dist/react/ui/Accordion/Accordion.styles.js +0 -54
- package/dist/react/ui/Accordion/Accordion.types.d.ts.map +0 -1
- package/dist/react/ui/Accordion/index.d.ts.map +0 -1
- package/dist/react/ui/Accordion/index.js +0 -266
- package/dist/react/ui/AlertDialog/AlertDialog.styles.d.ts.map +0 -1
- package/dist/react/ui/AlertDialog/AlertDialog.styles.js +0 -29
- package/dist/react/ui/AlertDialog/AlertDialog.types.d.ts.map +0 -1
- package/dist/react/ui/AlertDialog/index.d.ts.map +0 -1
- package/dist/react/ui/AlertDialog/index.js +0 -319
- package/dist/react/ui/Badge/Badge.styles.d.ts.map +0 -1
- package/dist/react/ui/Badge/Badge.styles.js +0 -30
- package/dist/react/ui/Badge/Badge.types.d.ts.map +0 -1
- package/dist/react/ui/Badge/index.d.ts.map +0 -1
- package/dist/react/ui/Badge/index.js +0 -34
- package/dist/react/ui/Button/Button.styles.d.ts.map +0 -1
- package/dist/react/ui/Button/Button.styles.js +0 -40
- package/dist/react/ui/Button/Button.types.d.ts.map +0 -1
- package/dist/react/ui/Button/index.d.ts.map +0 -1
- package/dist/react/ui/Button/index.js +0 -103
- package/dist/react/ui/Card/Card.styles.d.ts.map +0 -1
- package/dist/react/ui/Card/Card.styles.js +0 -24
- package/dist/react/ui/Card/Card.types.d.ts.map +0 -1
- package/dist/react/ui/Card/index.d.ts.map +0 -1
- package/dist/react/ui/Card/index.js +0 -82
- package/dist/react/ui/Checkbox/Checkbox.styles.d.ts.map +0 -1
- package/dist/react/ui/Checkbox/Checkbox.styles.js +0 -34
- package/dist/react/ui/Checkbox/Checkbox.types.d.ts.map +0 -1
- package/dist/react/ui/Checkbox/index.d.ts.map +0 -1
- package/dist/react/ui/Checkbox/index.js +0 -158
- package/dist/react/ui/Combobox/Combobox.styles.d.ts.map +0 -1
- package/dist/react/ui/Combobox/Combobox.styles.js +0 -17
- package/dist/react/ui/Combobox/Combobox.types.d.ts.map +0 -1
- package/dist/react/ui/Combobox/index.d.ts +0 -60
- package/dist/react/ui/Combobox/index.d.ts.map +0 -1
- package/dist/react/ui/Combobox/index.js +0 -216
- package/dist/react/ui/CornerBracket/CornerBracket.styles.d.ts.map +0 -1
- package/dist/react/ui/CornerBracket/CornerBracket.styles.js +0 -30
- package/dist/react/ui/CornerBracket/CornerBracket.types.d.ts.map +0 -1
- package/dist/react/ui/CornerBracket/index.d.ts.map +0 -1
- package/dist/react/ui/CornerBracket/index.js +0 -42
- package/dist/react/ui/Dialog/Dialog.styles.d.ts.map +0 -1
- package/dist/react/ui/Dialog/Dialog.styles.js +0 -29
- package/dist/react/ui/Dialog/Dialog.types.d.ts +0 -221
- package/dist/react/ui/Dialog/Dialog.types.d.ts.map +0 -1
- package/dist/react/ui/Dialog/index.d.ts.map +0 -1
- package/dist/react/ui/Dialog/index.js +0 -265
- package/dist/react/ui/DropdownMenu/DropdownMenu.styles.d.ts.map +0 -1
- package/dist/react/ui/DropdownMenu/DropdownMenu.styles.js +0 -16
- package/dist/react/ui/DropdownMenu/DropdownMenu.types.d.ts.map +0 -1
- package/dist/react/ui/DropdownMenu/index.d.ts +0 -50
- package/dist/react/ui/DropdownMenu/index.d.ts.map +0 -1
- package/dist/react/ui/DropdownMenu/index.js +0 -181
- package/dist/react/ui/Field/Field.styles.d.ts.map +0 -1
- package/dist/react/ui/Field/Field.styles.js +0 -27
- package/dist/react/ui/Field/Field.types.d.ts.map +0 -1
- package/dist/react/ui/Field/index.d.ts.map +0 -1
- package/dist/react/ui/Field/index.js +0 -145
- package/dist/react/ui/Input/Input.styles.d.ts.map +0 -1
- package/dist/react/ui/Input/Input.styles.js +0 -5
- package/dist/react/ui/Input/Input.types.d.ts.map +0 -1
- package/dist/react/ui/Input/index.d.ts.map +0 -1
- package/dist/react/ui/Input/index.js +0 -29
- package/dist/react/ui/InputGroup/InputGroup.styles.d.ts.map +0 -1
- package/dist/react/ui/InputGroup/InputGroup.styles.js +0 -34
- package/dist/react/ui/InputGroup/InputGroup.types.d.ts.map +0 -1
- package/dist/react/ui/InputGroup/index.d.ts.map +0 -1
- package/dist/react/ui/InputGroup/index.js +0 -81
- package/dist/react/ui/Label/Label.styles.d.ts.map +0 -1
- package/dist/react/ui/Label/Label.styles.js +0 -5
- package/dist/react/ui/Label/Label.types.d.ts.map +0 -1
- package/dist/react/ui/Label/index.d.ts.map +0 -1
- package/dist/react/ui/Label/index.js +0 -24
- package/dist/react/ui/Menu/Menu.styles.d.ts.map +0 -1
- package/dist/react/ui/Menu/Menu.styles.js +0 -32
- package/dist/react/ui/Menu/Menu.types.d.ts +0 -328
- package/dist/react/ui/Menu/Menu.types.d.ts.map +0 -1
- package/dist/react/ui/Menu/index.d.ts.map +0 -1
- package/dist/react/ui/Menu/index.js +0 -636
- package/dist/react/ui/Popover/Popover.styles.d.ts.map +0 -1
- package/dist/react/ui/Popover/Popover.styles.js +0 -26
- package/dist/react/ui/Popover/Popover.types.d.ts +0 -204
- package/dist/react/ui/Popover/Popover.types.d.ts.map +0 -1
- package/dist/react/ui/Popover/index.d.ts.map +0 -1
- package/dist/react/ui/Popover/index.js +0 -237
- package/dist/react/ui/Progress/Progress.styles.d.ts.map +0 -1
- package/dist/react/ui/Progress/Progress.styles.js +0 -30
- package/dist/react/ui/Progress/Progress.types.d.ts +0 -148
- package/dist/react/ui/Progress/Progress.types.d.ts.map +0 -1
- package/dist/react/ui/Progress/index.d.ts.map +0 -1
- package/dist/react/ui/Progress/index.js +0 -170
- package/dist/react/ui/Select/Select.styles.d.ts.map +0 -1
- package/dist/react/ui/Select/Select.styles.js +0 -15
- package/dist/react/ui/Select/Select.types.d.ts.map +0 -1
- package/dist/react/ui/Select/index.d.ts +0 -38
- package/dist/react/ui/Select/index.d.ts.map +0 -1
- package/dist/react/ui/Select/index.js +0 -136
- package/dist/react/ui/Separator/Separator.styles.d.ts.map +0 -1
- package/dist/react/ui/Separator/Separator.styles.js +0 -5
- package/dist/react/ui/Separator/Separator.types.d.ts.map +0 -1
- package/dist/react/ui/Separator/index.d.ts.map +0 -1
- package/dist/react/ui/Separator/index.js +0 -29
- package/dist/react/ui/Switch/Switch.styles.d.ts.map +0 -1
- package/dist/react/ui/Switch/Switch.styles.js +0 -41
- package/dist/react/ui/Switch/Switch.types.d.ts.map +0 -1
- package/dist/react/ui/Switch/index.d.ts.map +0 -1
- package/dist/react/ui/Switch/index.js +0 -199
- package/dist/react/ui/Tabs/Tabs.styles.d.ts.map +0 -1
- package/dist/react/ui/Tabs/Tabs.styles.js +0 -26
- package/dist/react/ui/Tabs/Tabs.types.d.ts +0 -201
- package/dist/react/ui/Tabs/Tabs.types.d.ts.map +0 -1
- package/dist/react/ui/Tabs/index.d.ts.map +0 -1
- package/dist/react/ui/Tabs/index.js +0 -308
- package/dist/react/ui/Textarea/Textarea.styles.d.ts.map +0 -1
- package/dist/react/ui/Textarea/Textarea.styles.js +0 -5
- package/dist/react/ui/Textarea/Textarea.types.d.ts.map +0 -1
- package/dist/react/ui/Textarea/index.d.ts.map +0 -1
- package/dist/react/ui/Textarea/index.js +0 -24
- package/dist/react/ui/Tooltip/Tooltip.styles.d.ts.map +0 -1
- package/dist/react/ui/Tooltip/Tooltip.styles.js +0 -26
- package/dist/react/ui/Tooltip/Tooltip.types.d.ts +0 -203
- package/dist/react/ui/Tooltip/Tooltip.types.d.ts.map +0 -1
- package/dist/react/ui/Tooltip/index.d.ts.map +0 -1
- package/dist/react/ui/Tooltip/index.js +0 -219
- package/dist/react/ui/index.d.ts +0 -31
- package/dist/react/ui/index.d.ts.map +0 -1
- package/dist/react/ui/index.js +0 -37
- package/dist/react.js +0 -88
- package/src/react/components/MorphingPopover/index.tsx +0 -186
- package/src/react/hooks/index.ts +0 -17
- package/src/react/icons/lucide-animated/activity.tsx +0 -109
- package/src/react/icons/lucide-animated/bell-electric.tsx +0 -124
- package/src/react/icons/lucide-animated/bell.tsx +0 -93
- package/src/react/icons/lucide-animated/bot.tsx +0 -122
- package/src/react/icons/lucide-animated/box.tsx +0 -117
- package/src/react/icons/lucide-animated/circle-check.tsx +0 -107
- package/src/react/icons/lucide-animated/delete.tsx +0 -133
- package/src/react/icons/lucide-animated/download.tsx +0 -99
- package/src/react/icons/lucide-animated/home.tsx +0 -103
- package/src/react/icons/lucide-animated/layout-panel-top.tsx +0 -143
- package/src/react/icons/lucide-animated/plus.tsx +0 -92
- package/src/react/icons/lucide-animated/search.tsx +0 -94
- package/src/react/icons/lucide-animated/settings.tsx +0 -92
- package/src/react/icons/lucide-animated/trending-down.tsx +0 -151
- package/src/react/icons/lucide-animated/trending-up.tsx +0 -150
- package/src/react/icons/lucide-animated/x.tsx +0 -102
- package/src/react/primitives/AutoHeight/index.tsx +0 -74
- package/src/react/primitives/CountingNumber/index.tsx +0 -147
- package/src/react/primitives/Highlight/index.tsx +0 -577
- package/src/react/primitives/Slot/index.tsx +0 -128
- package/src/react/primitives/index.ts +0 -13
- package/src/react/ui/Accordion/index.tsx +0 -362
- package/src/react/ui/AlertDialog/index.tsx +0 -540
- package/src/react/ui/Badge/index.tsx +0 -34
- package/src/react/ui/Button/index.tsx +0 -155
- package/src/react/ui/Card/index.tsx +0 -130
- package/src/react/ui/Checkbox/index.tsx +0 -233
- package/src/react/ui/Combobox/index.tsx +0 -331
- package/src/react/ui/CornerBracket/index.tsx +0 -49
- package/src/react/ui/Dialog/index.tsx +0 -452
- package/src/react/ui/DropdownMenu/index.tsx +0 -300
- package/src/react/ui/Field/index.tsx +0 -254
- package/src/react/ui/Input/index.tsx +0 -32
- package/src/react/ui/InputGroup/index.tsx +0 -147
- package/src/react/ui/Label/index.tsx +0 -27
- package/src/react/ui/Menu/Menu.types.ts +0 -425
- package/src/react/ui/Menu/index.tsx +0 -900
- package/src/react/ui/Popover/index.tsx +0 -422
- package/src/react/ui/Progress/Progress.types.ts +0 -162
- package/src/react/ui/Progress/index.tsx +0 -254
- package/src/react/ui/Select/index.tsx +0 -225
- package/src/react/ui/Separator/index.tsx +0 -37
- package/src/react/ui/Switch/index.tsx +0 -253
- package/src/react/ui/Tabs/Tabs.types.ts +0 -250
- package/src/react/ui/Tabs/index.tsx +0 -421
- package/src/react/ui/Textarea/index.tsx +0 -27
- package/src/react/ui/Tooltip/index.tsx +0 -394
- package/src/react/ui/index.ts +0 -34
- /package/dist/{react → react-ui}/components/MorphingPopover/MorphingPopover.types.d.ts +0 -0
- /package/dist/{react/components/MorphingPopover/morphing-popover.module-BkcZcmVy.css → react-ui/components/MorphingPopover/morphing-popover.module-BycNI8nU.css} +0 -0
- /package/dist/{react → react-ui}/components/index.d.ts +0 -0
- /package/dist/{react → react-ui}/components/index.js +0 -0
- /package/dist/{react → react-ui}/hooks/State/UseControlledState.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/index.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/index.js +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/check.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/edit-2.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/globe.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/index.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/index.js +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/layers.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/package.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/palette.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/refresh-cw.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/rocket.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/save.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/trash-2.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/type.d.ts +0 -0
- /package/dist/{react → react-ui}/icons/lucide-animated/upload.d.ts +0 -0
- /package/dist/{react → react-ui}/index.d.ts +0 -0
- /package/dist/{react → react-ui}/lib/index.d.ts +0 -0
- /package/dist/{react → react-ui}/lib/index.js +0 -0
- /package/dist/{react → react-ui}/lib/utils.d.ts +0 -0
- /package/dist/{react → react-ui}/primitives/Highlight/Highlight.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Accordion/Accordion.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Accordion/Accordion.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Accordion/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/AlertDialog/AlertDialog.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/AlertDialog/AlertDialog.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/AlertDialog/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Badge/Badge.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Badge/Badge.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Badge/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Button/Button.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Button/Button.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Button/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Card/Card.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Card/Card.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Card/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Checkbox/Checkbox.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Checkbox/Checkbox.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Checkbox/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Combobox/Combobox.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Combobox/Combobox.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/CornerBracket/CornerBracket.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/CornerBracket/CornerBracket.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/CornerBracket/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Dialog/Dialog.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Dialog/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/DropdownMenu/DropdownMenu.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/DropdownMenu/DropdownMenu.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Field/Field.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Field/Field.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Field/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Input/Input.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Input/Input.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Input/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/InputGroup/InputGroup.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/InputGroup/InputGroup.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/InputGroup/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Label/Label.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Label/Label.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Label/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Menu/Menu.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Menu/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Popover/Popover.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Popover/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Progress/Progress.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Progress/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Select/Select.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Select/Select.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Separator/Separator.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Separator/Separator.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Separator/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Switch/Switch.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Switch/Switch.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Switch/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Tabs/Tabs.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Tabs/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Textarea/Textarea.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Textarea/Textarea.types.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Textarea/index.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Tooltip/Tooltip.styles.d.ts +0 -0
- /package/dist/{react → react-ui}/ui/Tooltip/index.d.ts +0 -0
- /package/src/{react → react-ui}/components/MorphingPopover/MorphingPopover.types.ts +0 -0
- /package/src/{react → react-ui}/components/MorphingPopover/morphing-popover.module.css +0 -0
- /package/src/{react → react-ui}/components/index.ts +0 -0
- /package/src/{react → react-ui}/hooks/Animation/UseAutoHeight.tsx +0 -0
- /package/src/{react → react-ui}/hooks/DOM/UseIsInView.tsx +0 -0
- /package/src/{react → react-ui}/hooks/State/UseControlledState.tsx +0 -0
- /package/src/{react → react-ui}/hooks/State/UseDataState.tsx +0 -0
- /package/src/{react → react-ui}/icons/index.ts +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/arrow-down-to-line.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/arrow-up.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/check.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/edit-2.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/globe.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/index.ts +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/layers.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/list.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/package.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/palette.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/refresh-cw.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/rocket.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/save.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/terminal.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/trash-2.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/type.tsx +0 -0
- /package/src/{react → react-ui}/icons/lucide-animated/upload.tsx +0 -0
- /package/src/{react → react-ui}/index.ts +0 -0
- /package/src/{react → react-ui}/lib/get-strict-context.tsx +0 -0
- /package/src/{react → react-ui}/lib/index.ts +0 -0
- /package/src/{react → react-ui}/lib/utils.ts +0 -0
- /package/src/{react → react-ui}/primitives/Highlight/Highlight.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Accordion/Accordion.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Accordion/Accordion.types.ts +0 -0
- /package/src/{react → react-ui}/ui/AlertDialog/AlertDialog.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/AlertDialog/AlertDialog.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Badge/Badge.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Badge/Badge.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Button/Button.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Button/Button.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Card/Card.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Card/Card.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Checkbox/Checkbox.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Checkbox/Checkbox.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Combobox/Combobox.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Combobox/Combobox.types.ts +0 -0
- /package/src/{react → react-ui}/ui/CornerBracket/CornerBracket.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/CornerBracket/CornerBracket.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Dialog/Dialog.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Dialog/Dialog.types.ts +0 -0
- /package/src/{react → react-ui}/ui/DropdownMenu/DropdownMenu.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/DropdownMenu/DropdownMenu.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Field/Field.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Field/Field.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Input/Input.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Input/Input.types.ts +0 -0
- /package/src/{react → react-ui}/ui/InputGroup/InputGroup.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/InputGroup/InputGroup.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Label/Label.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Label/Label.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Menu/Menu.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Popover/Popover.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Popover/Popover.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Progress/Progress.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Select/Select.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Select/Select.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Separator/Separator.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Separator/Separator.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Switch/Switch.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Switch/Switch.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Tabs/Tabs.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Textarea/Textarea.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Textarea/Textarea.types.ts +0 -0
- /package/src/{react → react-ui}/ui/Tooltip/Tooltip.styles.ts +0 -0
- /package/src/{react → react-ui}/ui/Tooltip/Tooltip.types.ts +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for separator animation coordination.
|
|
3
|
+
*
|
|
4
|
+
* When a token exits, determines which separators should animate:
|
|
5
|
+
* 1. The exiting token's own separator (if it has one)
|
|
6
|
+
* 2. If the exiting token is the last visible, the previous token's separator
|
|
7
|
+
*
|
|
8
|
+
* @module primitives/waapi/Reorder/utils/separatorCoordination
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Calculate which separator IDs should animate along with an exiting item.
|
|
13
|
+
*
|
|
14
|
+
* Logic:
|
|
15
|
+
* - If the exiting item is NOT the last in the list, animate its own separator
|
|
16
|
+
* - If the exiting item IS the last in the list, animate the previous item's separator
|
|
17
|
+
* (because the previous item will become the new last and shouldn't have a separator)
|
|
18
|
+
*
|
|
19
|
+
* @param exitingId - The ID of the item being removed
|
|
20
|
+
* @param currentKeys - Set of all current (non-exiting) item keys
|
|
21
|
+
* @param exitingIds - Set of all currently exiting item IDs
|
|
22
|
+
* @param orderedKeys - Array of keys in render order
|
|
23
|
+
* @returns Array of separator IDs to animate
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Items: [A, B, C, D] with separators after A, B, C
|
|
28
|
+
* // Removing C (not last):
|
|
29
|
+
* calculateSeparatorCoordination('C', {'A','B','D'}, {'C'}, ['A','B','C','D'])
|
|
30
|
+
* // Returns: ['C'] - animate C's separator
|
|
31
|
+
*
|
|
32
|
+
* // Removing D (last item):
|
|
33
|
+
* calculateSeparatorCoordination('D', {'A','B','C'}, {'D'}, ['A','B','C','D'])
|
|
34
|
+
* // Returns: ['C'] - animate C's separator (C becomes new last)
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export function calculateSeparatorCoordination(
|
|
38
|
+
exitingId: string,
|
|
39
|
+
currentKeys: Set<string>,
|
|
40
|
+
exitingIds: Set<string>,
|
|
41
|
+
orderedKeys: string[]
|
|
42
|
+
): string[] {
|
|
43
|
+
const additionalSeparators: string[] = [];
|
|
44
|
+
|
|
45
|
+
const visibleKeys = orderedKeys.filter(
|
|
46
|
+
key => currentKeys.has(key) || exitingIds.has(key)
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const indexInVisible = visibleKeys.indexOf(exitingId);
|
|
50
|
+
if (indexInVisible === -1) {
|
|
51
|
+
return additionalSeparators;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const isLastVisible = indexInVisible === visibleKeys.length - 1;
|
|
55
|
+
const isNotLastVisible = indexInVisible < visibleKeys.length - 1;
|
|
56
|
+
|
|
57
|
+
if (isNotLastVisible) {
|
|
58
|
+
additionalSeparators.push(exitingId);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (isLastVisible && indexInVisible > 0) {
|
|
62
|
+
const previousKey = visibleKeys[indexInVisible - 1];
|
|
63
|
+
if (previousKey && !exitingIds.has(previousKey)) {
|
|
64
|
+
additionalSeparators.push(previousKey);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return additionalSeparators;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Determine if a separator should be visible based on position and animation state.
|
|
73
|
+
*
|
|
74
|
+
* @param _tokenId - The token ID to check (unused, kept for API compatibility)
|
|
75
|
+
* @param tokenIndex - Index of the token in the visible list
|
|
76
|
+
* @param totalVisible - Total number of visible tokens
|
|
77
|
+
* @param separatorPhase - Current animation phase of the separator
|
|
78
|
+
* @returns Whether the separator should be rendered
|
|
79
|
+
*/
|
|
80
|
+
export function shouldShowSeparator(
|
|
81
|
+
_tokenId: string,
|
|
82
|
+
tokenIndex: number,
|
|
83
|
+
totalVisible: number,
|
|
84
|
+
separatorPhase?: 'idle' | 'exit-coordinated' | 'flip-coordinated' | 'completed'
|
|
85
|
+
): boolean {
|
|
86
|
+
if (tokenIndex >= totalVisible - 1) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (!separatorPhase) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
switch (separatorPhase) {
|
|
95
|
+
case 'idle':
|
|
96
|
+
case 'exit-coordinated':
|
|
97
|
+
case 'flip-coordinated':
|
|
98
|
+
return true;
|
|
99
|
+
case 'completed':
|
|
100
|
+
return false;
|
|
101
|
+
default:
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { StyleSlots } from '@/core/types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Style slots for SlidingNumber component
|
|
6
|
+
*/
|
|
7
|
+
export type SlidingNumberSlot = 'root';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Base styles for SlidingNumber component
|
|
11
|
+
*/
|
|
12
|
+
export const slidingNumberBaseStyles: StyleSlots<SlidingNumberSlot> = {
|
|
13
|
+
root: 'waapi-sliding-number',
|
|
14
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format options for number display using Intl.NumberFormat
|
|
3
|
+
*/
|
|
4
|
+
export interface IFormatOptions {
|
|
5
|
+
/** Number formatting style */
|
|
6
|
+
style?: 'decimal' | 'currency' | 'percent';
|
|
7
|
+
/** Currency code (required when style is 'currency') */
|
|
8
|
+
currency?: string;
|
|
9
|
+
/** Locale for formatting (e.g., 'en-US', 'es-ES') */
|
|
10
|
+
locale?: string;
|
|
11
|
+
/** Minimum fraction digits */
|
|
12
|
+
minimumFractionDigits?: number;
|
|
13
|
+
/** Maximum fraction digits */
|
|
14
|
+
maximumFractionDigits?: number;
|
|
15
|
+
/** Whether to use grouping separators */
|
|
16
|
+
useGrouping?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Props for SlidingNumber component
|
|
21
|
+
*
|
|
22
|
+
* Animated number transitions with format preservation using WAAPI slot-machine-style animation.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* // Basic counter
|
|
27
|
+
* <SlidingNumber value={1234} duration={700} />
|
|
28
|
+
*
|
|
29
|
+
* // Currency
|
|
30
|
+
* <SlidingNumber
|
|
31
|
+
* value={99.99}
|
|
32
|
+
* format={{ style: 'currency', currency: 'USD' }}
|
|
33
|
+
* />
|
|
34
|
+
*
|
|
35
|
+
* // With motion blur
|
|
36
|
+
* <SlidingNumber value={500} motionBlur={true} digitHeight={60} />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export interface ISlidingNumberProps {
|
|
40
|
+
/** The numeric value to display */
|
|
41
|
+
value: number;
|
|
42
|
+
|
|
43
|
+
/** Animation duration in milliseconds */
|
|
44
|
+
duration?: number;
|
|
45
|
+
|
|
46
|
+
/** Font size for the number display */
|
|
47
|
+
fontSize?: string;
|
|
48
|
+
|
|
49
|
+
/** Font weight for the number display */
|
|
50
|
+
fontWeight?: string;
|
|
51
|
+
|
|
52
|
+
/** Text color */
|
|
53
|
+
color?: string;
|
|
54
|
+
|
|
55
|
+
/** Height of each digit row in pixels */
|
|
56
|
+
digitHeight?: number;
|
|
57
|
+
|
|
58
|
+
/** Delay between digit animations in milliseconds */
|
|
59
|
+
stagger?: number;
|
|
60
|
+
|
|
61
|
+
/** Enable motion blur effect during animation */
|
|
62
|
+
motionBlur?: boolean;
|
|
63
|
+
|
|
64
|
+
/** Number formatting options */
|
|
65
|
+
format?: IFormatOptions;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Animation direction trend
|
|
69
|
+
* - 1: Always animate upward (increasing)
|
|
70
|
+
* - -1: Always animate downward (decreasing)
|
|
71
|
+
* - 0: Auto (shorter path)
|
|
72
|
+
*/
|
|
73
|
+
trend?: -1 | 0 | 1;
|
|
74
|
+
|
|
75
|
+
/** Physics-based animation configuration */
|
|
76
|
+
animationConfig?: {
|
|
77
|
+
/** Overshoot amount (higher = more bounce) */
|
|
78
|
+
overshoot?: number;
|
|
79
|
+
/** Mass of the animated object */
|
|
80
|
+
mass?: number;
|
|
81
|
+
/** Spring stiffness */
|
|
82
|
+
stiffness?: number;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef, useMemo, useLayoutEffect } from 'react';
|
|
4
|
+
import type { ISlidingNumberProps, IFormatOptions } from './SlidingNumber.types';
|
|
5
|
+
import { cn } from '@/react-ui/lib/utils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* SlidingNumber - Animated number transitions with format preservation
|
|
9
|
+
*
|
|
10
|
+
* Uses WAAPI slot-machine-style animation with optional motion blur.
|
|
11
|
+
* Supports Intl.NumberFormat for currency, percentage, and decimal formatting.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Basic counter
|
|
16
|
+
* <SlidingNumber value={1234} />
|
|
17
|
+
*
|
|
18
|
+
* // Currency with animation
|
|
19
|
+
* <SlidingNumber
|
|
20
|
+
* value={99.99}
|
|
21
|
+
* format={{ style: 'currency', currency: 'USD' }}
|
|
22
|
+
* duration={700}
|
|
23
|
+
* />
|
|
24
|
+
*
|
|
25
|
+
* // Percentage
|
|
26
|
+
* <SlidingNumber
|
|
27
|
+
* value={75.5}
|
|
28
|
+
* format={{ style: 'percent' }}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const SlidingNumber = ({
|
|
33
|
+
value,
|
|
34
|
+
duration = 700,
|
|
35
|
+
fontSize = '3rem',
|
|
36
|
+
fontWeight = '700',
|
|
37
|
+
color = '#000',
|
|
38
|
+
digitHeight = 60,
|
|
39
|
+
stagger = 30,
|
|
40
|
+
motionBlur = true,
|
|
41
|
+
format,
|
|
42
|
+
trend = 0,
|
|
43
|
+
animationConfig,
|
|
44
|
+
}: ISlidingNumberProps): React.ReactElement => {
|
|
45
|
+
const computedEasing = useMemo(() => {
|
|
46
|
+
if (animationConfig) {
|
|
47
|
+
const { overshoot = 1, stiffness = 1, mass = 1 } = animationConfig;
|
|
48
|
+
const p1 = 0.34 * stiffness;
|
|
49
|
+
const p2 = 1 + 0.56 * overshoot;
|
|
50
|
+
const p3 = 0.64 / mass;
|
|
51
|
+
return `cubic-bezier(${Math.min(p1, 1).toFixed(2)}, ${Math.min(p2, 2).toFixed(2)}, ${Math.min(p3, 1).toFixed(2)}, 1)`;
|
|
52
|
+
}
|
|
53
|
+
return 'cubic-bezier(0.34, 1.56, 0.64, 1)';
|
|
54
|
+
}, [animationConfig]);
|
|
55
|
+
|
|
56
|
+
const currentChars = useMemo(() => parseNumberToChars(value, format), [value, format]);
|
|
57
|
+
const prevKeysRef = useRef<Set<string>>(new Set());
|
|
58
|
+
const isFirstRenderRef = useRef(true);
|
|
59
|
+
|
|
60
|
+
const enteringKeys = useMemo(() => {
|
|
61
|
+
if (isFirstRenderRef.current) return new Set<string>();
|
|
62
|
+
const entering = new Set<string>();
|
|
63
|
+
currentChars.forEach((c) => {
|
|
64
|
+
if (!prevKeysRef.current.has(c.key)) {
|
|
65
|
+
entering.add(c.key);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return entering;
|
|
69
|
+
}, [currentChars]);
|
|
70
|
+
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
isFirstRenderRef.current = false;
|
|
73
|
+
prevKeysRef.current = new Set(currentChars.map((c) => c.key));
|
|
74
|
+
}, [currentChars]);
|
|
75
|
+
|
|
76
|
+
const getDelay = (position: number) => {
|
|
77
|
+
const absPos = Math.abs(position);
|
|
78
|
+
return (absPos - 1) * stagger;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<div
|
|
83
|
+
className={cn('waapi-sliding-number')}
|
|
84
|
+
style={{
|
|
85
|
+
display: 'inline-flex',
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
fontSize,
|
|
88
|
+
fontWeight,
|
|
89
|
+
color,
|
|
90
|
+
fontVariantNumeric: 'tabular-nums',
|
|
91
|
+
fontFamily: 'system-ui, -apple-system, sans-serif',
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
{currentChars.map((item) => {
|
|
96
|
+
const isEntering = enteringKeys.has(item.key);
|
|
97
|
+
|
|
98
|
+
if (item.isDigit) {
|
|
99
|
+
return (
|
|
100
|
+
<Digit
|
|
101
|
+
key={item.key}
|
|
102
|
+
digit={Number.parseInt(item.char)}
|
|
103
|
+
duration={duration}
|
|
104
|
+
digitHeight={digitHeight}
|
|
105
|
+
delay={getDelay(item.position)}
|
|
106
|
+
motionBlur={motionBlur}
|
|
107
|
+
easing={computedEasing}
|
|
108
|
+
isEntering={isEntering}
|
|
109
|
+
trend={trend}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<Symbol key={item.key} char={item.char} isEntering={isEntering} duration={duration} easing={computedEasing} />
|
|
116
|
+
);
|
|
117
|
+
})}
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
SlidingNumber.displayName = 'SlidingNumber';
|
|
123
|
+
|
|
124
|
+
// ============================================================================
|
|
125
|
+
// Types
|
|
126
|
+
// ============================================================================
|
|
127
|
+
|
|
128
|
+
interface ICharItem {
|
|
129
|
+
char: string;
|
|
130
|
+
key: string;
|
|
131
|
+
isDigit: boolean;
|
|
132
|
+
position: number;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface IDigitProps {
|
|
136
|
+
digit: number;
|
|
137
|
+
duration: number;
|
|
138
|
+
digitHeight: number;
|
|
139
|
+
delay: number;
|
|
140
|
+
motionBlur: boolean;
|
|
141
|
+
easing: string;
|
|
142
|
+
isEntering: boolean;
|
|
143
|
+
trend: -1 | 0 | 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface ISymbolProps {
|
|
147
|
+
char: string;
|
|
148
|
+
isEntering: boolean;
|
|
149
|
+
duration: number;
|
|
150
|
+
easing: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ============================================================================
|
|
154
|
+
// Utilities
|
|
155
|
+
// ============================================================================
|
|
156
|
+
|
|
157
|
+
function parseNumberToChars(value: number, format?: IFormatOptions): ICharItem[] {
|
|
158
|
+
const locale = format?.locale || 'en-US';
|
|
159
|
+
const options: Intl.NumberFormatOptions = {
|
|
160
|
+
style: format?.style || 'decimal',
|
|
161
|
+
minimumFractionDigits: format?.minimumFractionDigits,
|
|
162
|
+
maximumFractionDigits: format?.maximumFractionDigits,
|
|
163
|
+
useGrouping: format?.useGrouping ?? true,
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
if (format?.style === 'currency' && format?.currency) {
|
|
167
|
+
options.currency = format.currency;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const formatter = new Intl.NumberFormat(locale, options);
|
|
171
|
+
const parts = formatter.formatToParts(value);
|
|
172
|
+
|
|
173
|
+
const result: ICharItem[] = [];
|
|
174
|
+
|
|
175
|
+
let integerDigitCount = 0;
|
|
176
|
+
parts.forEach((part) => {
|
|
177
|
+
if (part.type === 'integer') {
|
|
178
|
+
integerDigitCount += part.value.length;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
let integerIndex = integerDigitCount;
|
|
183
|
+
let fractionIndex = 0;
|
|
184
|
+
let groupCount = 0;
|
|
185
|
+
|
|
186
|
+
parts.forEach((part, partIdx) => {
|
|
187
|
+
if (part.type === 'integer') {
|
|
188
|
+
for (const char of part.value) {
|
|
189
|
+
result.push({
|
|
190
|
+
char,
|
|
191
|
+
key: `int-${integerIndex}`,
|
|
192
|
+
isDigit: true,
|
|
193
|
+
position: integerIndex,
|
|
194
|
+
});
|
|
195
|
+
integerIndex--;
|
|
196
|
+
}
|
|
197
|
+
} else if (part.type === 'fraction') {
|
|
198
|
+
for (const char of part.value) {
|
|
199
|
+
fractionIndex++;
|
|
200
|
+
result.push({
|
|
201
|
+
char,
|
|
202
|
+
key: `frac-${fractionIndex}`,
|
|
203
|
+
isDigit: true,
|
|
204
|
+
position: -fractionIndex,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
} else if (part.type === 'decimal') {
|
|
208
|
+
result.push({ char: part.value, key: 'decimal', isDigit: false, position: 0 });
|
|
209
|
+
} else if (part.type === 'group') {
|
|
210
|
+
groupCount++;
|
|
211
|
+
result.push({ char: part.value, key: `group-${groupCount}`, isDigit: false, position: 0 });
|
|
212
|
+
} else if (part.type === 'currency') {
|
|
213
|
+
result.push({ char: part.value, key: `currency-${partIdx}`, isDigit: false, position: 0 });
|
|
214
|
+
} else if (part.type === 'percentSign') {
|
|
215
|
+
result.push({ char: part.value, key: 'percent', isDigit: false, position: 0 });
|
|
216
|
+
} else {
|
|
217
|
+
result.push({ char: part.value, key: `symbol-${partIdx}`, isDigit: false, position: 0 });
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
return result;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ============================================================================
|
|
225
|
+
// Symbol Component (non-digit characters)
|
|
226
|
+
// ============================================================================
|
|
227
|
+
|
|
228
|
+
function Symbol({ char, isEntering, duration, easing }: ISymbolProps) {
|
|
229
|
+
const ref = useRef<HTMLSpanElement>(null);
|
|
230
|
+
const hasAnimatedRef = useRef(false);
|
|
231
|
+
|
|
232
|
+
useLayoutEffect(() => {
|
|
233
|
+
if (!ref.current || !isEntering || hasAnimatedRef.current) return;
|
|
234
|
+
hasAnimatedRef.current = true;
|
|
235
|
+
|
|
236
|
+
ref.current.animate(
|
|
237
|
+
[
|
|
238
|
+
{ opacity: 0, transform: 'scale(0.8)' },
|
|
239
|
+
{ opacity: 1, transform: 'scale(1)' },
|
|
240
|
+
],
|
|
241
|
+
{
|
|
242
|
+
duration: duration * 0.3,
|
|
243
|
+
easing,
|
|
244
|
+
fill: 'forwards',
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}, [isEntering, duration, easing]);
|
|
248
|
+
|
|
249
|
+
return (
|
|
250
|
+
<span
|
|
251
|
+
ref={ref}
|
|
252
|
+
style={{
|
|
253
|
+
display: 'inline-block',
|
|
254
|
+
whiteSpace: 'pre',
|
|
255
|
+
opacity: isEntering ? 0 : 1,
|
|
256
|
+
}}
|
|
257
|
+
>
|
|
258
|
+
{char}
|
|
259
|
+
</span>
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// ============================================================================
|
|
264
|
+
// Digit Component (animated numbers)
|
|
265
|
+
// ============================================================================
|
|
266
|
+
|
|
267
|
+
function Digit({ digit, duration, digitHeight, delay, motionBlur, easing, isEntering, trend }: IDigitProps) {
|
|
268
|
+
const columnRef = useRef<HTMLDivElement>(null);
|
|
269
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
270
|
+
const animationRef = useRef<Animation | null>(null);
|
|
271
|
+
const filterId = useRef(`blur-${Math.random().toString(36).slice(2, 9)}`).current;
|
|
272
|
+
|
|
273
|
+
const currentOffsetRef = useRef<number | null>(null);
|
|
274
|
+
const targetDigitRef = useRef(digit);
|
|
275
|
+
const hasInitializedRef = useRef(false);
|
|
276
|
+
|
|
277
|
+
const sequence = useMemo(() => {
|
|
278
|
+
const seq: number[] = [];
|
|
279
|
+
for (let cycle = -1; cycle <= 1; cycle++) {
|
|
280
|
+
for (let d = 0; d <= 9; d++) {
|
|
281
|
+
seq.push(d);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return seq;
|
|
285
|
+
}, []);
|
|
286
|
+
|
|
287
|
+
useLayoutEffect(() => {
|
|
288
|
+
if (!hasInitializedRef.current) {
|
|
289
|
+
hasInitializedRef.current = true;
|
|
290
|
+
const offset = -(digit + 10) * digitHeight;
|
|
291
|
+
currentOffsetRef.current = offset;
|
|
292
|
+
targetDigitRef.current = digit;
|
|
293
|
+
|
|
294
|
+
if (columnRef.current) {
|
|
295
|
+
columnRef.current.style.transform = `translateY(${offset}px)`;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}, [digit, digitHeight]);
|
|
299
|
+
|
|
300
|
+
useLayoutEffect(() => {
|
|
301
|
+
if (!containerRef.current || !isEntering) return;
|
|
302
|
+
|
|
303
|
+
containerRef.current.animate(
|
|
304
|
+
[
|
|
305
|
+
{ opacity: 0, transform: 'scale(0.5) translateY(-20px)' },
|
|
306
|
+
{ opacity: 1, transform: 'scale(1) translateY(0)' },
|
|
307
|
+
],
|
|
308
|
+
{
|
|
309
|
+
duration: duration * 0.4,
|
|
310
|
+
easing,
|
|
311
|
+
fill: 'forwards',
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
}, [isEntering, duration, easing]);
|
|
315
|
+
|
|
316
|
+
useEffect(() => {
|
|
317
|
+
targetDigitRef.current = digit;
|
|
318
|
+
|
|
319
|
+
if (!hasInitializedRef.current) return;
|
|
320
|
+
|
|
321
|
+
const currentDigit =
|
|
322
|
+
currentOffsetRef.current !== null
|
|
323
|
+
? (((Math.round(-currentOffsetRef.current / digitHeight) - 10) % 10) + 10) % 10
|
|
324
|
+
: digit;
|
|
325
|
+
|
|
326
|
+
if (digit === currentDigit && currentOffsetRef.current !== null) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
animateToDigit(digit);
|
|
331
|
+
}, [digit, digitHeight]);
|
|
332
|
+
|
|
333
|
+
const animateToDigit = (target: number) => {
|
|
334
|
+
if (!columnRef.current || !containerRef.current) return;
|
|
335
|
+
|
|
336
|
+
if (animationRef.current) {
|
|
337
|
+
const computedStyle = getComputedStyle(columnRef.current);
|
|
338
|
+
const matrix = new DOMMatrix(computedStyle.transform);
|
|
339
|
+
currentOffsetRef.current = matrix.m42;
|
|
340
|
+
animationRef.current.cancel();
|
|
341
|
+
animationRef.current = null;
|
|
342
|
+
columnRef.current.style.transform = `translateY(${currentOffsetRef.current}px)`;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const rawIndex = currentOffsetRef.current !== null ? -currentOffsetRef.current / digitHeight : target + 10;
|
|
346
|
+
|
|
347
|
+
const currentDigitFromOffset = (((Math.round(rawIndex) - 10) % 10) + 10) % 10;
|
|
348
|
+
const from = currentDigitFromOffset;
|
|
349
|
+
|
|
350
|
+
if (target === from && currentOffsetRef.current !== null) {
|
|
351
|
+
const normalizedOffset = -(target + 10) * digitHeight;
|
|
352
|
+
if (columnRef.current) {
|
|
353
|
+
const currentAnim = animationRef.current as Animation | null;
|
|
354
|
+
if (currentAnim) {
|
|
355
|
+
currentAnim.cancel();
|
|
356
|
+
}
|
|
357
|
+
columnRef.current.style.transform = `translateY(${normalizedOffset}px)`;
|
|
358
|
+
}
|
|
359
|
+
currentOffsetRef.current = normalizedOffset;
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
let diff: number;
|
|
364
|
+
if (trend === 1) {
|
|
365
|
+
diff = target >= from ? target - from : 10 - from + target;
|
|
366
|
+
} else if (trend === -1) {
|
|
367
|
+
diff = target <= from ? target - from : target - from - 10;
|
|
368
|
+
} else {
|
|
369
|
+
diff = target - from;
|
|
370
|
+
if (diff > 5) diff -= 10;
|
|
371
|
+
else if (diff < -5) diff += 10;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const startOffset = currentOffsetRef.current ?? -(from + 10) * digitHeight;
|
|
375
|
+
const endOffset = startOffset - diff * digitHeight;
|
|
376
|
+
|
|
377
|
+
const blurEl = document.getElementById(filterId)?.querySelector('feGaussianBlur');
|
|
378
|
+
if (motionBlur && blurEl) {
|
|
379
|
+
const intensity = Math.min(Math.abs(diff) * 1.2, 6);
|
|
380
|
+
blurEl.setAttribute('stdDeviation', `0,${intensity}`);
|
|
381
|
+
containerRef.current.style.filter = `url(#${filterId})`;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const anim = columnRef.current.animate(
|
|
385
|
+
[{ transform: `translateY(${startOffset}px)` }, { transform: `translateY(${endOffset}px)` }],
|
|
386
|
+
{
|
|
387
|
+
duration,
|
|
388
|
+
delay,
|
|
389
|
+
easing,
|
|
390
|
+
fill: 'forwards',
|
|
391
|
+
}
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
animationRef.current = anim;
|
|
395
|
+
|
|
396
|
+
anim.onfinish = () => {
|
|
397
|
+
const normalizedOffset = -(target + 10) * digitHeight;
|
|
398
|
+
if (columnRef.current) {
|
|
399
|
+
anim.cancel();
|
|
400
|
+
columnRef.current.style.transform = `translateY(${normalizedOffset}px)`;
|
|
401
|
+
}
|
|
402
|
+
currentOffsetRef.current = normalizedOffset;
|
|
403
|
+
|
|
404
|
+
if (containerRef.current) {
|
|
405
|
+
containerRef.current.style.filter = 'none';
|
|
406
|
+
}
|
|
407
|
+
if (blurEl) {
|
|
408
|
+
blurEl.setAttribute('stdDeviation', '0,0');
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
animationRef.current = null;
|
|
412
|
+
|
|
413
|
+
if (targetDigitRef.current !== target) {
|
|
414
|
+
requestAnimationFrame(() => {
|
|
415
|
+
animateToDigit(targetDigitRef.current);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
anim.oncancel = () => {
|
|
421
|
+
animationRef.current = null;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
return (
|
|
426
|
+
<>
|
|
427
|
+
<svg style={{ position: 'absolute', width: 0, height: 0 }} aria-hidden="true">
|
|
428
|
+
<defs>
|
|
429
|
+
<filter id={filterId}>
|
|
430
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="0,0" />
|
|
431
|
+
</filter>
|
|
432
|
+
</defs>
|
|
433
|
+
</svg>
|
|
434
|
+
|
|
435
|
+
<div
|
|
436
|
+
ref={containerRef}
|
|
437
|
+
style={{
|
|
438
|
+
position: 'relative',
|
|
439
|
+
height: `${digitHeight}px`,
|
|
440
|
+
overflow: 'hidden',
|
|
441
|
+
width: '0.65em',
|
|
442
|
+
textAlign: 'center',
|
|
443
|
+
opacity: isEntering ? 0 : 1,
|
|
444
|
+
}}
|
|
445
|
+
>
|
|
446
|
+
<div
|
|
447
|
+
ref={columnRef}
|
|
448
|
+
style={{
|
|
449
|
+
position: 'absolute',
|
|
450
|
+
left: 0,
|
|
451
|
+
right: 0,
|
|
452
|
+
willChange: 'transform',
|
|
453
|
+
}}
|
|
454
|
+
>
|
|
455
|
+
{sequence.map((d, i) => (
|
|
456
|
+
<div
|
|
457
|
+
key={i}
|
|
458
|
+
style={{
|
|
459
|
+
height: `${digitHeight}px`,
|
|
460
|
+
display: 'flex',
|
|
461
|
+
alignItems: 'center',
|
|
462
|
+
justifyContent: 'center',
|
|
463
|
+
}}
|
|
464
|
+
>
|
|
465
|
+
{d}
|
|
466
|
+
</div>
|
|
467
|
+
))}
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
</>
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export type { ISlidingNumberProps, IFormatOptions };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StyleSlots } from '@/core/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Style slots for SlidingText component
|
|
5
|
+
*/
|
|
6
|
+
export type SlidingTextSlot = 'root' | 'content' | 'token';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Base styles for SlidingText component
|
|
10
|
+
*/
|
|
11
|
+
export const slidingTextBaseStyles: StyleSlots<SlidingTextSlot> = {
|
|
12
|
+
root: 'waapi-sliding-text-container',
|
|
13
|
+
content: 'waapi-sliding-text-content',
|
|
14
|
+
token: 'waapi-sliding-text-token',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* CSS classes for animation states
|
|
19
|
+
*/
|
|
20
|
+
export const slidingTextAnimationClasses = {
|
|
21
|
+
enterFrom: 'enter-from',
|
|
22
|
+
enterTo: 'enter-to',
|
|
23
|
+
exitActive: 'exit-active',
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* CSS classes for direction variants
|
|
28
|
+
*/
|
|
29
|
+
export const slidingTextDirectionClasses = {
|
|
30
|
+
vertical: 'waapi-direction-vertical',
|
|
31
|
+
horizontal: 'waapi-direction-horizontal',
|
|
32
|
+
} as const;
|