@flikk/ui 1.0.0-beta.1 → 1.0.0-beta.3
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/components/ai/ApprovalCard/ApprovalCard.js +2 -2
- package/dist/components/ai/ApprovalCard/ApprovalCard.types.d.ts +2 -2
- package/dist/components/ai/PromptInput/PromptInput.js +173 -13
- package/dist/components/ai/PromptInput/PromptInput.theme.js +1 -0
- package/dist/components/ai/PromptInput/PromptInput.types.d.ts +20 -0
- package/dist/components/core/Accordion/Accordion.theme.js +2 -2
- package/dist/components/core/Alert/Alert.js +2 -2
- package/dist/components/core/Alert/Alert.types.d.ts +2 -2
- package/dist/components/core/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/core/AlertDialog/AlertDialog.types.d.ts +2 -2
- package/dist/components/core/Badge/Badge.js +11 -9
- package/dist/components/core/Badge/Badge.theme.js +13 -14
- package/dist/components/core/Badge/Badge.types.d.ts +6 -1
- package/dist/components/core/Button/Button.theme.js +8 -9
- package/dist/components/core/Calendar/Calendar.theme.js +1 -1
- package/dist/components/core/Card/Card.d.ts +2 -2
- package/dist/components/core/Card/Card.js +6 -7
- package/dist/components/core/Card/Card.theme.js +4 -4
- package/dist/components/core/Card/Card.types.d.ts +5 -20
- package/dist/components/core/Card/CardSubtitle.d.ts +3 -0
- package/dist/components/core/Card/CardSubtitle.js +11 -0
- package/dist/components/core/Card/index.d.ts +2 -2
- package/dist/components/core/CommandPalette/CommandItem.d.ts +1 -1
- package/dist/components/core/CommandPalette/CommandItem.js +2 -2
- package/dist/components/core/CommandPalette/CommandPalette.js +2 -2
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +2 -2
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -2
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +1 -1
- package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
- package/dist/components/core/Drawer/Drawer.d.ts +13 -1
- package/dist/components/core/Drawer/Drawer.js +23 -10
- package/dist/components/core/Drawer/Drawer.theme.js +1 -1
- package/dist/components/core/Drawer/Drawer.types.d.ts +21 -4
- package/dist/components/core/Drawer/DrawerHeader.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerHeader.js +14 -0
- package/dist/components/core/Drawer/DrawerSubtitle.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerSubtitle.js +11 -0
- package/dist/components/core/Drawer/DrawerTitle.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerTitle.js +11 -0
- package/dist/components/core/Drawer/index.d.ts +1 -1
- package/dist/components/core/Dropdown/Dropdown.types.d.ts +4 -4
- package/dist/components/core/Dropdown/DropdownItem.js +2 -2
- package/dist/components/core/Empty/Empty.js +2 -2
- package/dist/components/core/Empty/Empty.theme.d.ts +1 -1
- package/dist/components/core/Empty/Empty.theme.js +3 -3
- package/dist/components/core/Empty/Empty.types.d.ts +2 -2
- package/dist/components/core/MenuItem/MenuItem.js +2 -2
- package/dist/components/core/MenuItem/MenuItem.theme.d.ts +1 -2
- package/dist/components/core/MenuItem/MenuItem.theme.js +7 -9
- package/dist/components/core/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/components/core/Message/Message.d.ts +3 -2
- package/dist/components/core/Message/Message.js +30 -24
- package/dist/components/core/Message/Message.theme.d.ts +1 -1
- package/dist/components/core/Message/Message.theme.js +22 -24
- package/dist/components/core/Message/Message.types.d.ts +0 -7
- package/dist/components/core/Message/MessageList.animations.d.ts +6 -0
- package/dist/components/core/Message/MessageList.animations.js +32 -0
- package/dist/components/core/Message/MessageList.d.ts +5 -0
- package/dist/components/core/Message/MessageList.js +78 -0
- package/dist/components/core/Message/MessageList.theme.d.ts +2 -0
- package/dist/components/core/Message/MessageList.theme.js +6 -0
- package/dist/components/core/Message/MessageList.types.d.ts +32 -0
- package/dist/components/core/Message/index.d.ts +2 -0
- package/dist/components/core/Modal/Modal.d.ts +2 -2
- package/dist/components/core/Modal/Modal.js +5 -5
- package/dist/components/core/Modal/Modal.theme.js +5 -5
- package/dist/components/core/Modal/Modal.types.d.ts +4 -4
- package/dist/components/core/Modal/ModalSubtitle.d.ts +5 -0
- package/dist/components/core/Modal/ModalSubtitle.js +11 -0
- package/dist/components/core/ModalStack/ModalStack.animations.js +3 -3
- package/dist/components/core/ModalStack/ModalStackModal.js +3 -3
- package/dist/components/core/PageHeading/PageHeading.d.ts +8 -0
- package/dist/components/core/PageHeading/PageHeading.js +28 -0
- package/dist/components/core/PageHeading/PageHeading.theme.d.ts +2 -0
- package/dist/components/core/PageHeading/PageHeading.theme.js +11 -0
- package/dist/components/core/PageHeading/PageHeading.types.d.ts +55 -0
- package/dist/components/core/PageHeading/PageHeadingActions.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingActions.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingBackButton.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +12 -0
- package/dist/components/core/PageHeading/PageHeadingIcon.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingIcon.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingSubtitle.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingSubtitle.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingTitle.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingTitle.js +11 -0
- package/dist/components/core/PageHeading/index.d.ts +2 -0
- package/dist/components/core/Popover/Popover.theme.js +1 -1
- package/dist/components/core/Segmented/Segmented.theme.js +3 -3
- package/dist/components/core/Sidebar/Sidebar.js +1 -0
- package/dist/components/core/SocialIcon/SocialIcon.d.ts +3 -0
- package/dist/components/core/SocialIcon/SocialIcon.js +30 -0
- package/dist/components/core/SocialIcon/SocialIcon.theme.d.ts +2 -0
- package/dist/components/core/SocialIcon/SocialIcon.theme.js +12 -0
- package/dist/components/core/SocialIcon/SocialIcon.types.d.ts +18 -0
- package/dist/components/core/SocialIcon/index.d.ts +2 -0
- package/dist/components/core/SocialIcon/platforms.d.ts +17 -0
- package/dist/components/core/SocialIcon/platforms.js +234 -0
- package/dist/components/core/Toast/Toast.js +4 -4
- package/dist/components/core/Toast/Toast.theme.js +1 -1
- package/dist/components/core/Toast/Toast.types.d.ts +9 -9
- package/dist/components/core/Toast/useToast.js +6 -6
- package/dist/components/core/index.d.ts +2 -7
- package/dist/components/core/index.js +9 -19
- package/dist/components/{core → data-display}/DescriptionList/DescriptionList.theme.js +1 -1
- package/dist/components/{core → data-display}/Feed/Feed.js +2 -2
- package/dist/components/data-display/GanttChart/GanttChart.animations.d.ts +4 -0
- package/dist/components/data-display/GanttChart/GanttChart.animations.js +21 -0
- package/dist/components/data-display/GanttChart/GanttChart.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttChart.js +170 -0
- package/dist/components/data-display/GanttChart/GanttChart.theme.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +23 -0
- package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +162 -0
- package/dist/components/data-display/GanttChart/GanttChart.types.js +9 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.d.ts +80 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.js +274 -0
- package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +82 -0
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +35 -0
- package/dist/components/data-display/GanttChart/GanttGroupBar.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttGroupBar.js +26 -0
- package/dist/components/data-display/GanttChart/GanttMilestone.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttMilestone.js +44 -0
- package/dist/components/data-display/GanttChart/GanttProgressCircle.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttProgressCircle.js +11 -0
- package/dist/components/data-display/GanttChart/GanttSplitter.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttSplitter.js +39 -0
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.d.ts +7 -0
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +23 -0
- package/dist/components/data-display/GanttChart/GanttTableHeader.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttTableHeader.js +13 -0
- package/dist/components/data-display/GanttChart/GanttTablePanel.d.ts +6 -0
- package/dist/components/data-display/GanttChart/GanttTablePanel.js +20 -0
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +30 -0
- package/dist/components/data-display/GanttChart/GanttTaskBar.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +206 -0
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +17 -0
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.d.ts +7 -0
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +33 -0
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +43 -0
- package/dist/components/data-display/GanttChart/GanttToolbar.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttToolbar.js +28 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDates.d.ts +12 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDates.js +25 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.d.ts +25 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +144 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttLayout.d.ts +2 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttLayout.js +33 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.d.ts +6 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.js +32 -0
- package/dist/components/data-display/GanttChart/index.d.ts +3 -0
- package/dist/components/{core → data-display}/KPI/KPI.js +10 -8
- package/dist/components/{core → data-display}/KPI/KPI.theme.js +2 -1
- package/dist/components/{core → data-display}/KPI/KPI.types.d.ts +5 -5
- package/dist/components/{core → data-display}/KPI/index.d.ts +1 -0
- package/dist/components/{core → data-display}/Metric/Metric.js +4 -7
- package/dist/components/{core → data-display}/Metric/Metric.theme.js +9 -9
- package/dist/components/{core → data-display}/Metric/Metric.types.d.ts +6 -6
- package/dist/components/{core → data-display}/Table/Table.theme.js +2 -2
- package/dist/components/{core → data-display}/Table/TableActions.js +8 -8
- package/dist/components/{core → data-display}/Table/TableColumnManager.js +4 -4
- package/dist/components/{core → data-display}/Table/TableFilter.js +3 -3
- package/dist/components/data-display/Table/TablePagination.js +25 -0
- package/dist/components/{core → data-display}/Table/TableRow.js +1 -1
- package/dist/components/{core → data-display}/Table/TableSelectionHeader.js +1 -1
- package/dist/components/data-display/index.d.ts +7 -0
- package/dist/components/data-display/index.js +20 -0
- package/dist/components/effects/Aurora/Aurora.d.ts +24 -0
- package/dist/components/effects/Aurora/Aurora.js +119 -0
- package/dist/components/effects/Aurora/Aurora.types.d.ts +15 -0
- package/dist/components/effects/Aurora/index.d.ts +2 -0
- package/dist/components/effects/DotPattern/DotPattern.d.ts +18 -0
- package/dist/components/effects/DotPattern/DotPattern.js +65 -0
- package/dist/components/effects/DotPattern/DotPattern.types.d.ts +47 -0
- package/dist/components/effects/DotPattern/index.d.ts +2 -0
- package/dist/components/effects/GridPattern/GridPattern.d.ts +18 -0
- package/dist/components/effects/GridPattern/GridPattern.js +64 -0
- package/dist/components/effects/GridPattern/GridPattern.types.d.ts +47 -0
- package/dist/components/effects/GridPattern/index.d.ts +2 -0
- package/dist/components/effects/MagneticElement/MagneticElement.d.ts +30 -0
- package/dist/components/effects/MagneticElement/MagneticElement.js +110 -0
- package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +44 -0
- package/dist/components/effects/MagneticElement/index.d.ts +2 -0
- package/dist/components/effects/MorphingText/MorphingText.d.ts +17 -0
- package/dist/components/effects/MorphingText/MorphingText.js +91 -0
- package/dist/components/effects/MorphingText/MorphingText.types.d.ts +18 -0
- package/dist/components/effects/MorphingText/index.d.ts +2 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.d.ts +28 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.js +61 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.types.d.ts +35 -0
- package/dist/components/effects/NoiseOverlay/index.d.ts +2 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +26 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.js +71 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +11 -0
- package/dist/components/effects/ParallaxSection/index.d.ts +2 -0
- package/dist/components/effects/Particles/Particles.d.ts +22 -0
- package/dist/components/effects/Particles/Particles.js +33 -0
- package/dist/components/effects/Particles/Particles.scene.d.ts +3 -0
- package/dist/components/effects/Particles/Particles.scene.js +284 -0
- package/dist/components/effects/Particles/Particles.types.d.ts +65 -0
- package/dist/components/effects/Particles/index.d.ts +2 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.d.ts +3 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +75 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.d.ts +7 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.js +12 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +47 -0
- package/dist/components/effects/ProgressiveBlur/index.d.ts +2 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.d.ts +29 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.js +121 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.types.d.ts +25 -0
- package/dist/components/effects/ScrollReveal/index.d.ts +2 -0
- package/dist/components/effects/Spotlight/Spotlight.d.ts +36 -0
- package/dist/components/effects/Spotlight/Spotlight.js +112 -0
- package/dist/components/effects/Spotlight/Spotlight.types.d.ts +29 -0
- package/dist/components/effects/Spotlight/index.d.ts +2 -0
- package/dist/components/effects/StickyScroll/StickyScroll.d.ts +30 -0
- package/dist/components/effects/StickyScroll/StickyScroll.js +128 -0
- package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +19 -0
- package/dist/components/effects/StickyScroll/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +24 -0
- package/dist/components/effects/index.js +12 -0
- package/dist/components/forms/Checkbox/Checkbox.js +3 -3
- package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -5
- package/dist/components/forms/ColorPicker/ColorPicker.theme.js +2 -2
- package/dist/components/forms/CronInput/CronInput.d.ts +3 -0
- package/dist/components/forms/CronInput/CronInput.js +107 -0
- package/dist/components/forms/CronInput/CronInput.theme.d.ts +6 -0
- package/dist/components/forms/CronInput/CronInput.theme.js +84 -0
- package/dist/components/forms/CronInput/CronInput.types.d.ts +98 -0
- package/dist/components/forms/CronInput/CronInput.utils.d.ts +67 -0
- package/dist/components/forms/CronInput/CronInput.utils.js +505 -0
- package/dist/components/forms/CronInput/index.d.ts +4 -0
- package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
- package/dist/components/forms/FileUpload/FileUpload.js +78 -0
- package/dist/components/forms/InputOTP/InputOTP.theme.js +1 -1
- package/dist/components/forms/Mention/Mention.d.ts +3 -0
- package/dist/components/forms/Mention/Mention.js +410 -0
- package/dist/components/forms/Mention/Mention.theme.d.ts +6 -0
- package/dist/components/forms/Mention/Mention.theme.js +56 -0
- package/dist/components/forms/Mention/Mention.types.d.ts +111 -0
- package/dist/components/forms/Mention/index.d.ts +3 -0
- package/dist/components/forms/Radio/Radio.js +8 -12
- package/dist/components/forms/Radio/Radio.theme.js +28 -5
- package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +2 -0
- package/dist/components/forms/SelectableCard/SelectableCard.animations.js +9 -0
- package/dist/components/forms/SelectableCard/SelectableCard.d.ts +5 -0
- package/dist/components/forms/SelectableCard/SelectableCard.js +58 -0
- package/dist/components/forms/SelectableCard/SelectableCard.theme.d.ts +2 -0
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +38 -0
- package/dist/components/forms/SelectableCard/SelectableCard.types.d.ts +34 -0
- package/dist/components/forms/SelectableCard/SelectableCardContext.d.ts +3 -0
- package/dist/components/forms/SelectableCard/SelectableCardContext.js +12 -0
- package/dist/components/forms/SelectableCard/SelectableCardGroup.d.ts +3 -0
- package/dist/components/forms/SelectableCard/SelectableCardGroup.js +37 -0
- package/dist/components/forms/SelectableCard/index.d.ts +3 -0
- package/dist/components/forms/TimePicker/TimePickerContent.js +78 -1
- package/dist/components/forms/TransferList/TransferList.animations.d.ts +10 -0
- package/dist/components/forms/TransferList/TransferList.animations.js +32 -0
- package/dist/components/forms/TransferList/TransferList.d.ts +28 -0
- package/dist/components/forms/TransferList/TransferList.js +199 -0
- package/dist/components/forms/TransferList/TransferList.theme.d.ts +6 -0
- package/dist/components/forms/TransferList/TransferList.theme.js +60 -0
- package/dist/components/forms/TransferList/TransferList.types.d.ts +101 -0
- package/dist/components/forms/TransferList/index.d.ts +3 -0
- package/dist/components/forms/index.d.ts +13 -0
- package/dist/components/forms/index.js +87 -0
- package/dist/components/layout/FormLayout/FormLayout.d.ts +8 -0
- package/dist/components/layout/FormLayout/FormLayout.js +22 -0
- package/dist/components/layout/FormLayout/FormLayout.theme.d.ts +2 -0
- package/dist/components/layout/FormLayout/FormLayout.theme.js +16 -0
- package/dist/components/layout/FormLayout/FormLayout.types.d.ts +61 -0
- package/dist/components/layout/FormLayout/FormLayoutBody.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutBody.js +91 -0
- package/dist/components/layout/FormLayout/FormLayoutFooter.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutFooter.js +12 -0
- package/dist/components/layout/FormLayout/FormLayoutHeader.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutHeader.js +12 -0
- package/dist/components/layout/FormLayout/FormLayoutSection.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutSection.js +12 -0
- package/dist/components/layout/FormLayout/index.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayout.d.ts +7 -0
- package/dist/components/layout/PageLayout/PageLayout.js +33 -0
- package/dist/components/layout/PageLayout/PageLayout.theme.d.ts +2 -0
- package/dist/components/layout/PageLayout/PageLayout.theme.js +10 -0
- package/dist/components/layout/PageLayout/PageLayout.types.d.ts +39 -0
- package/dist/components/layout/PageLayout/PageLayoutContent.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutContent.js +12 -0
- package/dist/components/layout/PageLayout/PageLayoutHeader.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutHeader.js +12 -0
- package/dist/components/layout/PageLayout/PageLayoutSidebar.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutSidebar.js +12 -0
- package/dist/components/layout/PageLayout/index.d.ts +3 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +208 -167
- package/dist/styles.css +1 -1
- package/dist/utils/dateUtils.d.ts +30 -0
- package/dist/utils/dateUtils.js +58 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +9 -2
- package/dist/components/core/Card/CardDescription.d.ts +0 -3
- package/dist/components/core/Card/CardDescription.js +0 -11
- package/dist/components/core/Modal/ModalDescription.d.ts +0 -5
- package/dist/components/core/Modal/ModalDescription.js +0 -11
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.d.ts +0 -34
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.js +0 -218
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.theme.d.ts +0 -9
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.types.d.ts +0 -48
- package/dist/components/core/ProgressiveBlur/index.d.ts +0 -2
- package/dist/components/core/Table/TablePagination.js +0 -25
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.js +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.theme.js +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/KPI/KPI.d.ts +0 -0
- /package/dist/components/{core → data-display}/KPI/KPI.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/Metric.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/Metric.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.animations.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.animations.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.filterUtils.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.filterUtils.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.utils.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.utils.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableActions.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableActionsMenu.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableActionsMenu.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableBody.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableBody.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableCell.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableCell.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableColumnManager.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableDeclarative.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableDeclarative.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableFilter.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableHeader.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableHeader.js +0 -0
- /package/dist/components/{core → data-display}/Table/TablePagination.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableRow.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableSelectionHeader.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.js +0 -0
- /package/dist/components/{core → data-display}/Table/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/index.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.animations.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.animations.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.theme.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineContent.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineContent.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineItem.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineItem.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineMarker.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineMarker.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/index.d.ts +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { progressiveBlurTheme } from './ProgressiveBlur.theme.js';
|
|
5
|
+
|
|
6
|
+
const DEFAULT_LAYERS = 8;
|
|
7
|
+
const DEFAULT_MAX_BLUR = 64;
|
|
8
|
+
const DEFAULT_SIZE = "30%";
|
|
9
|
+
/**
|
|
10
|
+
* Generate exponentially distributed blur levels (powers of 2).
|
|
11
|
+
* e.g. for 8 layers with max 64: [0.5, 1, 2, 4, 8, 16, 32, 64]
|
|
12
|
+
*/
|
|
13
|
+
function generateBlurLevels(layers, maxBlur) {
|
|
14
|
+
return Array.from({ length: layers }, (_, i) => maxBlur * Math.pow(2, i - (layers - 1)));
|
|
15
|
+
}
|
|
16
|
+
const GRADIENT_DIRECTIONS = {
|
|
17
|
+
top: "to top",
|
|
18
|
+
bottom: "to bottom",
|
|
19
|
+
left: "to left",
|
|
20
|
+
right: "to right",
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Renders a single blur instance for one position.
|
|
24
|
+
*/
|
|
25
|
+
const BlurInstance = forwardRef(({ position, blurLevels, size, theme, className, style, ...rest }, ref) => {
|
|
26
|
+
const isVertical = position === "top" || position === "bottom";
|
|
27
|
+
const direction = GRADIENT_DIRECTIONS[position];
|
|
28
|
+
const n = blurLevels.length;
|
|
29
|
+
const containerStyle = {
|
|
30
|
+
...(isVertical ? { height: size } : { width: size }),
|
|
31
|
+
...style,
|
|
32
|
+
};
|
|
33
|
+
return (jsx("div", { ref: ref, className: cn(theme.baseStyle, theme.positions[position], className), style: containerStyle, ...rest, children: blurLevels.map((blur, i) => {
|
|
34
|
+
// MagicUI mask formula: each layer has a 1-step fade-in, 1-step solid,
|
|
35
|
+
// and 1-step fade-out. Adjacent layers overlap by 2 steps, creating
|
|
36
|
+
// smooth transitions. Values beyond 100% are clamped by the browser.
|
|
37
|
+
const step = 100 / n;
|
|
38
|
+
const gradient = `linear-gradient(${direction}, transparent ${i * step}%, black ${(i + 1) * step}%, black ${(i + 2) * step}%, transparent ${(i + 3) * step}%)`;
|
|
39
|
+
const layerStyle = {
|
|
40
|
+
maskImage: gradient,
|
|
41
|
+
WebkitMaskImage: gradient,
|
|
42
|
+
backdropFilter: `blur(${blur}px)`,
|
|
43
|
+
WebkitBackdropFilter: `blur(${blur}px)`,
|
|
44
|
+
zIndex: i + 1,
|
|
45
|
+
};
|
|
46
|
+
return (jsx("div", { className: theme.layerStyle, style: layerStyle }, i));
|
|
47
|
+
}) }));
|
|
48
|
+
});
|
|
49
|
+
BlurInstance.displayName = "BlurInstance";
|
|
50
|
+
const ProgressiveBlur = forwardRef(({ position = "bottom", blurLevels: blurLevelsProp, layers = DEFAULT_LAYERS, blurIntensity = DEFAULT_MAX_BLUR, size = DEFAULT_SIZE, className, theme: themeOverrides, ...rest }, ref) => {
|
|
51
|
+
const theme = useMemo(() => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return ({
|
|
54
|
+
baseStyle: (_a = themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.baseStyle) !== null && _a !== void 0 ? _a : progressiveBlurTheme.baseStyle,
|
|
55
|
+
positions: {
|
|
56
|
+
...progressiveBlurTheme.positions,
|
|
57
|
+
...themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.positions,
|
|
58
|
+
},
|
|
59
|
+
layerStyle: (_b = themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.layerStyle) !== null && _b !== void 0 ? _b : progressiveBlurTheme.layerStyle,
|
|
60
|
+
});
|
|
61
|
+
}, [themeOverrides]);
|
|
62
|
+
const blurLevels = useMemo(() => blurLevelsProp !== null && blurLevelsProp !== void 0 ? blurLevelsProp : generateBlurLevels(layers, blurIntensity), [blurLevelsProp, layers, blurIntensity]);
|
|
63
|
+
const positions = Array.isArray(position)
|
|
64
|
+
? position
|
|
65
|
+
: [position];
|
|
66
|
+
// Single position — render directly, forward ref and remaining props
|
|
67
|
+
if (positions.length === 1) {
|
|
68
|
+
return (jsx(BlurInstance, { ref: ref, position: positions[0], blurLevels: blurLevels, size: size, theme: theme, className: className, ...rest }));
|
|
69
|
+
}
|
|
70
|
+
// Multiple positions — render one BlurInstance per position
|
|
71
|
+
return (jsx(Fragment, { children: positions.map((pos) => (jsx(BlurInstance, { position: pos, blurLevels: blurLevels, size: size, theme: theme, className: className, ...rest }, pos))) }));
|
|
72
|
+
});
|
|
73
|
+
ProgressiveBlur.displayName = "ProgressiveBlur";
|
|
74
|
+
|
|
75
|
+
export { ProgressiveBlur };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProgressiveBlurPosition } from "./ProgressiveBlur.types";
|
|
2
|
+
export interface ProgressiveBlurTheme {
|
|
3
|
+
baseStyle: string;
|
|
4
|
+
positions: Record<ProgressiveBlurPosition, string>;
|
|
5
|
+
layerStyle: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const progressiveBlurTheme: ProgressiveBlurTheme;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const progressiveBlurTheme = {
|
|
2
|
+
baseStyle: "absolute pointer-events-none z-10",
|
|
3
|
+
positions: {
|
|
4
|
+
top: "top-0 left-0 right-0",
|
|
5
|
+
bottom: "bottom-0 left-0 right-0",
|
|
6
|
+
left: "left-0 top-0 bottom-0",
|
|
7
|
+
right: "right-0 top-0 bottom-0",
|
|
8
|
+
},
|
|
9
|
+
layerStyle: "absolute inset-0",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { progressiveBlurTheme };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ProgressiveBlurPosition = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export interface ProgressiveBlurProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Position(s) where the blur effect should be applied.
|
|
6
|
+
* Can be a single position or array of positions.
|
|
7
|
+
* @default "bottom"
|
|
8
|
+
*/
|
|
9
|
+
position?: ProgressiveBlurPosition | ProgressiveBlurPosition[];
|
|
10
|
+
/**
|
|
11
|
+
* Custom blur levels array (in pixels) for fine-grained control.
|
|
12
|
+
* If provided, overrides `layers` and `blurIntensity`.
|
|
13
|
+
* @example [0.5, 1, 2, 4, 8, 16, 32, 64]
|
|
14
|
+
*/
|
|
15
|
+
blurLevels?: number[];
|
|
16
|
+
/**
|
|
17
|
+
* Number of blur layers to generate.
|
|
18
|
+
* More layers = smoother gradient, but more DOM nodes.
|
|
19
|
+
* Ignored if `blurLevels` is provided.
|
|
20
|
+
* @default 8
|
|
21
|
+
*/
|
|
22
|
+
layers?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum blur value in pixels for auto-generated levels.
|
|
25
|
+
* Ignored if `blurLevels` is provided.
|
|
26
|
+
* @default 64
|
|
27
|
+
*/
|
|
28
|
+
blurIntensity?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the blur region.
|
|
31
|
+
* Height for top/bottom positions, width for left/right positions.
|
|
32
|
+
* @default "30%"
|
|
33
|
+
*/
|
|
34
|
+
size?: string;
|
|
35
|
+
/** Custom className for styling overrides */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Theme overrides */
|
|
38
|
+
theme?: ProgressiveBlurThemeOverrides;
|
|
39
|
+
}
|
|
40
|
+
export interface ProgressiveBlurThemeOverrides {
|
|
41
|
+
/** Base styles for each blur instance container */
|
|
42
|
+
baseStyle?: string;
|
|
43
|
+
/** Position-specific styles */
|
|
44
|
+
positions?: Partial<Record<ProgressiveBlurPosition, string>>;
|
|
45
|
+
/** Styles for each individual blur layer div */
|
|
46
|
+
layerStyle?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ScrollRevealProps } from './ScrollReveal.types';
|
|
3
|
+
/**
|
|
4
|
+
* ScrollReveal
|
|
5
|
+
*
|
|
6
|
+
* Intersection-observer wrapper that triggers an entrance animation when
|
|
7
|
+
* its children scroll into the viewport.
|
|
8
|
+
*
|
|
9
|
+
* Supports six built-in presets, custom variants, stagger-children timing,
|
|
10
|
+
* and respects the `prefers-reduced-motion` media query.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ScrollReveal preset="fadeUp">
|
|
15
|
+
* <h2>Hello world</h2>
|
|
16
|
+
* </ScrollReveal>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // Stagger children
|
|
22
|
+
* <ScrollReveal preset="fadeUp" stagger={0.12}>
|
|
23
|
+
* <Card />
|
|
24
|
+
* <Card />
|
|
25
|
+
* <Card />
|
|
26
|
+
* </ScrollReveal>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const ScrollReveal: React.ForwardRefExoticComponent<ScrollRevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default, { useRef } from 'react';
|
|
3
|
+
import { useReducedMotion, useInView, motion } from 'motion/react';
|
|
4
|
+
import { cn } from '../../../utils/cn.js';
|
|
5
|
+
|
|
6
|
+
/* ------------------------------------------------------------------ */
|
|
7
|
+
/* Animation presets */
|
|
8
|
+
/* ------------------------------------------------------------------ */
|
|
9
|
+
const PRESET_VARIANTS = {
|
|
10
|
+
fadeUp: {
|
|
11
|
+
hidden: { opacity: 0, y: 32 },
|
|
12
|
+
visible: { opacity: 1, y: 0 },
|
|
13
|
+
},
|
|
14
|
+
fadeDown: {
|
|
15
|
+
hidden: { opacity: 0, y: -32 },
|
|
16
|
+
visible: { opacity: 1, y: 0 },
|
|
17
|
+
},
|
|
18
|
+
fadeLeft: {
|
|
19
|
+
hidden: { opacity: 0, x: -32 },
|
|
20
|
+
visible: { opacity: 1, x: 0 },
|
|
21
|
+
},
|
|
22
|
+
fadeRight: {
|
|
23
|
+
hidden: { opacity: 0, x: 32 },
|
|
24
|
+
visible: { opacity: 1, x: 0 },
|
|
25
|
+
},
|
|
26
|
+
scaleUp: {
|
|
27
|
+
hidden: { opacity: 0, scale: 0.85 },
|
|
28
|
+
visible: { opacity: 1, scale: 1 },
|
|
29
|
+
},
|
|
30
|
+
blur: {
|
|
31
|
+
hidden: { opacity: 0, filter: 'blur(8px)' },
|
|
32
|
+
visible: { opacity: 1, filter: 'blur(0px)' },
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
/* ------------------------------------------------------------------ */
|
|
36
|
+
/* Component */
|
|
37
|
+
/* ------------------------------------------------------------------ */
|
|
38
|
+
/**
|
|
39
|
+
* ScrollReveal
|
|
40
|
+
*
|
|
41
|
+
* Intersection-observer wrapper that triggers an entrance animation when
|
|
42
|
+
* its children scroll into the viewport.
|
|
43
|
+
*
|
|
44
|
+
* Supports six built-in presets, custom variants, stagger-children timing,
|
|
45
|
+
* and respects the `prefers-reduced-motion` media query.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <ScrollReveal preset="fadeUp">
|
|
50
|
+
* <h2>Hello world</h2>
|
|
51
|
+
* </ScrollReveal>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* // Stagger children
|
|
57
|
+
* <ScrollReveal preset="fadeUp" stagger={0.12}>
|
|
58
|
+
* <Card />
|
|
59
|
+
* <Card />
|
|
60
|
+
* <Card />
|
|
61
|
+
* </ScrollReveal>
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
const ScrollReveal = React__default.forwardRef(({ preset = 'fadeUp', variants: customVariants, threshold = 0.1, rootMargin = '0px 0px -50px 0px', once = true, delay = 0, duration = 0.6, stagger = 0, className, children,
|
|
65
|
+
// Destructure HTML event handlers that conflict with motion's API
|
|
66
|
+
onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, onAnimationStart: _onAnimationStart, ...restProps }, ref) => {
|
|
67
|
+
const shouldReduceMotion = useReducedMotion();
|
|
68
|
+
const internalRef = useRef(null);
|
|
69
|
+
const isInView = useInView(internalRef, {
|
|
70
|
+
once,
|
|
71
|
+
amount: threshold,
|
|
72
|
+
margin: rootMargin,
|
|
73
|
+
});
|
|
74
|
+
// When reduced motion is preferred, render content immediately.
|
|
75
|
+
if (shouldReduceMotion) {
|
|
76
|
+
return (jsx("div", { ref: (node) => {
|
|
77
|
+
internalRef.current = node;
|
|
78
|
+
if (typeof ref === 'function')
|
|
79
|
+
ref(node);
|
|
80
|
+
else if (ref)
|
|
81
|
+
ref.current = node;
|
|
82
|
+
}, className: className, ...restProps, children: children }));
|
|
83
|
+
}
|
|
84
|
+
// Build variants --------------------------------------------------
|
|
85
|
+
const presetData = customVariants !== null && customVariants !== void 0 ? customVariants : PRESET_VARIANTS[preset];
|
|
86
|
+
const motionVariants = {
|
|
87
|
+
hidden: presetData.hidden,
|
|
88
|
+
visible: {
|
|
89
|
+
...presetData.visible,
|
|
90
|
+
transition: {
|
|
91
|
+
duration,
|
|
92
|
+
delay,
|
|
93
|
+
ease: [0.25, 0.1, 0.25, 1], // cubic-bezier easeOut
|
|
94
|
+
...(stagger > 0
|
|
95
|
+
? { staggerChildren: stagger, delayChildren: delay }
|
|
96
|
+
: {}),
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
// When stagger is used, each direct child needs to be a motion element.
|
|
101
|
+
// We wrap each child in a motion.div that inherits parent variants.
|
|
102
|
+
const content = stagger > 0
|
|
103
|
+
? React__default.Children.map(children, (child) => (jsx(motion.div, { variants: {
|
|
104
|
+
hidden: presetData.hidden,
|
|
105
|
+
visible: {
|
|
106
|
+
...presetData.visible,
|
|
107
|
+
transition: { duration, ease: [0.25, 0.1, 0.25, 1] },
|
|
108
|
+
},
|
|
109
|
+
}, children: child })))
|
|
110
|
+
: children;
|
|
111
|
+
return (jsx(motion.div, { ref: (node) => {
|
|
112
|
+
internalRef.current = node;
|
|
113
|
+
if (typeof ref === 'function')
|
|
114
|
+
ref(node);
|
|
115
|
+
else if (ref)
|
|
116
|
+
ref.current = node;
|
|
117
|
+
}, className: cn(className), variants: motionVariants, initial: "hidden", animate: isInView ? 'visible' : 'hidden', ...restProps, children: content }));
|
|
118
|
+
});
|
|
119
|
+
ScrollReveal.displayName = 'ScrollReveal';
|
|
120
|
+
|
|
121
|
+
export { ScrollReveal };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Variants } from 'motion/react';
|
|
2
|
+
export type ScrollRevealPreset = 'fadeUp' | 'fadeDown' | 'fadeLeft' | 'fadeRight' | 'scaleUp' | 'blur';
|
|
3
|
+
export interface ScrollRevealProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Animation preset (default 'fadeUp') */
|
|
5
|
+
preset?: ScrollRevealPreset;
|
|
6
|
+
/** Custom animation variants (overrides preset) */
|
|
7
|
+
variants?: {
|
|
8
|
+
hidden: Variants['hidden'];
|
|
9
|
+
visible: Variants['visible'];
|
|
10
|
+
};
|
|
11
|
+
/** Intersection threshold 0-1 (default 0.1) */
|
|
12
|
+
threshold?: number;
|
|
13
|
+
/** Root margin for early/late triggering (default '0px 0px -50px 0px') */
|
|
14
|
+
rootMargin?: string;
|
|
15
|
+
/** Only animate once (default true) */
|
|
16
|
+
once?: boolean;
|
|
17
|
+
/** Animation delay in seconds (default 0) */
|
|
18
|
+
delay?: number;
|
|
19
|
+
/** Animation duration in seconds (default 0.6) */
|
|
20
|
+
duration?: number;
|
|
21
|
+
/** Stagger children by this amount in seconds (default 0) */
|
|
22
|
+
stagger?: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SpotlightProps } from "./Spotlight.types";
|
|
3
|
+
/**
|
|
4
|
+
* Spotlight Component
|
|
5
|
+
*
|
|
6
|
+
* A mouse-following radial gradient that creates a subtle surface illumination
|
|
7
|
+
* effect. Tracks the mouse position within the parent element and renders a
|
|
8
|
+
* smooth, animated glow that follows the cursor.
|
|
9
|
+
*
|
|
10
|
+
* The parent container should have `position: relative` and `overflow: hidden`.
|
|
11
|
+
*
|
|
12
|
+
* Unlike SpotlightBorder (which highlights borders), this component illuminates
|
|
13
|
+
* the surface area itself with a soft radial gradient.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <div className="relative overflow-hidden bg-gray-900 rounded-lg p-8">
|
|
18
|
+
* <Spotlight color="var(--color-primary)" intensity={0.2} />
|
|
19
|
+
* <span className="relative z-10">Hover over me</span>
|
|
20
|
+
* </div>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Custom spring and size
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <div className="relative overflow-hidden bg-slate-800 rounded-xl p-12">
|
|
26
|
+
* <Spotlight
|
|
27
|
+
* size={500}
|
|
28
|
+
* color="#8b5cf6"
|
|
29
|
+
* intensity={0.25}
|
|
30
|
+
* springConfig={{ damping: 20, stiffness: 150 }}
|
|
31
|
+
* />
|
|
32
|
+
* <h2 className="relative z-10 text-white">Interactive card</h2>
|
|
33
|
+
* </div>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const Spotlight: React.FC<SpotlightProps>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useState, useCallback } from 'react';
|
|
3
|
+
import { useReducedMotion, useMotionValue, useSpring, motion } from 'motion/react';
|
|
4
|
+
import { cn } from '../../../utils/cn.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Spotlight Component
|
|
8
|
+
*
|
|
9
|
+
* A mouse-following radial gradient that creates a subtle surface illumination
|
|
10
|
+
* effect. Tracks the mouse position within the parent element and renders a
|
|
11
|
+
* smooth, animated glow that follows the cursor.
|
|
12
|
+
*
|
|
13
|
+
* The parent container should have `position: relative` and `overflow: hidden`.
|
|
14
|
+
*
|
|
15
|
+
* Unlike SpotlightBorder (which highlights borders), this component illuminates
|
|
16
|
+
* the surface area itself with a soft radial gradient.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <div className="relative overflow-hidden bg-gray-900 rounded-lg p-8">
|
|
21
|
+
* <Spotlight color="var(--color-primary)" intensity={0.2} />
|
|
22
|
+
* <span className="relative z-10">Hover over me</span>
|
|
23
|
+
* </div>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example Custom spring and size
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <div className="relative overflow-hidden bg-slate-800 rounded-xl p-12">
|
|
29
|
+
* <Spotlight
|
|
30
|
+
* size={500}
|
|
31
|
+
* color="#8b5cf6"
|
|
32
|
+
* intensity={0.25}
|
|
33
|
+
* springConfig={{ damping: 20, stiffness: 150 }}
|
|
34
|
+
* />
|
|
35
|
+
* <h2 className="relative z-10 text-white">Interactive card</h2>
|
|
36
|
+
* </div>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
const Spotlight = ({ size = 300, color = "var(--color-primary)", intensity = 0.15, springConfig = { damping: 30, stiffness: 200 }, className, style, ...props }) => {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
const shouldReduceMotion = useReducedMotion();
|
|
42
|
+
const containerRef = useRef(null);
|
|
43
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
44
|
+
// Raw mouse position motion values
|
|
45
|
+
const mouseX = useMotionValue(0);
|
|
46
|
+
const mouseY = useMotionValue(0);
|
|
47
|
+
// Spring-animated values for smooth following
|
|
48
|
+
const springX = useSpring(mouseX, {
|
|
49
|
+
damping: (_a = springConfig.damping) !== null && _a !== void 0 ? _a : 30,
|
|
50
|
+
stiffness: (_b = springConfig.stiffness) !== null && _b !== void 0 ? _b : 200,
|
|
51
|
+
});
|
|
52
|
+
const springY = useSpring(mouseY, {
|
|
53
|
+
damping: (_c = springConfig.damping) !== null && _c !== void 0 ? _c : 30,
|
|
54
|
+
stiffness: (_d = springConfig.stiffness) !== null && _d !== void 0 ? _d : 200,
|
|
55
|
+
});
|
|
56
|
+
// Use raw values when reduced motion is preferred
|
|
57
|
+
const x = shouldReduceMotion ? mouseX : springX;
|
|
58
|
+
const y = shouldReduceMotion ? mouseY : springY;
|
|
59
|
+
const handleMouseMove = useCallback((event) => {
|
|
60
|
+
var _a;
|
|
61
|
+
const parent = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
62
|
+
if (!parent)
|
|
63
|
+
return;
|
|
64
|
+
const rect = parent.getBoundingClientRect();
|
|
65
|
+
mouseX.set(event.clientX - rect.left);
|
|
66
|
+
mouseY.set(event.clientY - rect.top);
|
|
67
|
+
}, [mouseX, mouseY]);
|
|
68
|
+
const handleMouseEnter = useCallback((event) => {
|
|
69
|
+
var _a;
|
|
70
|
+
// Set position immediately on enter to avoid animating from origin
|
|
71
|
+
const parent = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
72
|
+
if (parent) {
|
|
73
|
+
const rect = parent.getBoundingClientRect();
|
|
74
|
+
const posX = event.clientX - rect.left;
|
|
75
|
+
const posY = event.clientY - rect.top;
|
|
76
|
+
mouseX.set(posX);
|
|
77
|
+
mouseY.set(posY);
|
|
78
|
+
// Jump springs to current position to avoid initial slide-in
|
|
79
|
+
if (!shouldReduceMotion) {
|
|
80
|
+
springX.jump(posX);
|
|
81
|
+
springY.jump(posY);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
setIsHovered(true);
|
|
85
|
+
}, [mouseX, mouseY, springX, springY, shouldReduceMotion]);
|
|
86
|
+
const handleMouseLeave = useCallback(() => {
|
|
87
|
+
setIsHovered(false);
|
|
88
|
+
}, []);
|
|
89
|
+
const halfSize = size / 2;
|
|
90
|
+
return (jsx("div", { ref: containerRef, className: cn("absolute inset-0 pointer-events-none", className), style: {
|
|
91
|
+
// Re-enable pointer events so we can track mouse within this layer.
|
|
92
|
+
// The layer itself is visually transparent to interaction.
|
|
93
|
+
pointerEvents: "auto",
|
|
94
|
+
...style,
|
|
95
|
+
}, onMouseMove: handleMouseMove, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, "aria-hidden": "true", ...props, children: jsx(motion.div, { className: "absolute pointer-events-none", style: {
|
|
96
|
+
width: size,
|
|
97
|
+
height: size,
|
|
98
|
+
borderRadius: "50%",
|
|
99
|
+
x,
|
|
100
|
+
y,
|
|
101
|
+
marginLeft: -halfSize,
|
|
102
|
+
marginTop: -halfSize,
|
|
103
|
+
background: `radial-gradient(circle at center, ${color}, transparent 70%)`,
|
|
104
|
+
opacity: isHovered ? intensity : 0,
|
|
105
|
+
transition: shouldReduceMotion
|
|
106
|
+
? "opacity 0s"
|
|
107
|
+
: "opacity 0.3s ease-in-out",
|
|
108
|
+
} }) }));
|
|
109
|
+
};
|
|
110
|
+
Spotlight.displayName = "Spotlight";
|
|
111
|
+
|
|
112
|
+
export { Spotlight };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SpotlightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Diameter of the spotlight glow in pixels.
|
|
5
|
+
* @default 300
|
|
6
|
+
*/
|
|
7
|
+
size?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Color of the spotlight glow.
|
|
10
|
+
* Accepts any valid CSS color value or CSS variable reference.
|
|
11
|
+
* @default "var(--color-primary)"
|
|
12
|
+
*/
|
|
13
|
+
color?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Peak opacity of the spotlight glow (0-1).
|
|
16
|
+
* @default 0.15
|
|
17
|
+
*/
|
|
18
|
+
intensity?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Spring animation configuration for the mouse-following behavior.
|
|
21
|
+
* @default { damping: 30, stiffness: 200 }
|
|
22
|
+
*/
|
|
23
|
+
springConfig?: {
|
|
24
|
+
damping?: number;
|
|
25
|
+
stiffness?: number;
|
|
26
|
+
};
|
|
27
|
+
/** Additional className for style overrides (shadcn pattern). */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StickyScrollProps } from './StickyScroll.types';
|
|
3
|
+
/**
|
|
4
|
+
* StickyScroll
|
|
5
|
+
*
|
|
6
|
+
* Creates an Apple-style sticky scroll experience where one column stays
|
|
7
|
+
* pinned while the other scrolls. As each scrolling section enters the
|
|
8
|
+
* viewport, the sticky content transitions to match.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <StickyScroll
|
|
13
|
+
* sections={[
|
|
14
|
+
* {
|
|
15
|
+
* id: 'design',
|
|
16
|
+
* title: 'Design System',
|
|
17
|
+
* description: 'Build consistent interfaces with a shared design language.',
|
|
18
|
+
* content: <img src="/design.png" alt="Design system" />,
|
|
19
|
+
* },
|
|
20
|
+
* {
|
|
21
|
+
* id: 'develop',
|
|
22
|
+
* title: 'Developer Experience',
|
|
23
|
+
* description: 'TypeScript-first components with full IntelliSense.',
|
|
24
|
+
* content: <img src="/develop.png" alt="Developer experience" />,
|
|
25
|
+
* },
|
|
26
|
+
* ]}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const StickyScroll: React.ForwardRefExoticComponent<StickyScrollProps & React.RefAttributes<HTMLDivElement>>;
|