@flikk/ui 1.0.0-beta.26 → 1.0.0-beta.29
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/bg/1.webp +0 -0
- package/dist/bg/10.webp +0 -0
- package/dist/bg/11.webp +0 -0
- package/dist/bg/12.webp +0 -0
- package/dist/bg/13.webp +0 -0
- package/dist/bg/14.webp +0 -0
- package/dist/bg/15.webp +0 -0
- package/dist/bg/16.webp +0 -0
- package/dist/bg/17.webp +0 -0
- package/dist/bg/18.webp +0 -0
- package/dist/bg/19.webp +0 -0
- package/dist/bg/2.webp +0 -0
- package/dist/bg/20.webp +0 -0
- package/dist/bg/21.webp +0 -0
- package/dist/bg/22.webp +0 -0
- package/dist/bg/3.webp +0 -0
- package/dist/bg/4.webp +0 -0
- package/dist/bg/5.webp +0 -0
- package/dist/bg/6.webp +0 -0
- package/dist/bg/7.webp +0 -0
- package/dist/bg/8.webp +0 -0
- package/dist/bg/9.webp +0 -0
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +7 -140
- package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -85
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/canvas/Background.d.ts +19 -0
- package/dist/components/canvas/Background.js +23 -0
- package/dist/components/canvas/BaseNode.d.ts +15 -0
- package/dist/components/canvas/BaseNode.js +20 -0
- package/dist/components/canvas/CanvasToolbar.d.ts +34 -0
- package/dist/components/canvas/CanvasToolbar.js +34 -0
- package/dist/components/canvas/Edge.d.ts +35 -0
- package/dist/components/canvas/Edge.js +97 -0
- package/dist/components/canvas/EdgeLayer.d.ts +18 -0
- package/dist/components/canvas/EdgeLayer.js +111 -0
- package/dist/components/canvas/Handle.d.ts +11 -0
- package/dist/components/canvas/Handle.js +63 -0
- package/dist/components/canvas/MiniMap.d.ts +22 -0
- package/dist/components/canvas/MiniMap.js +105 -0
- package/dist/components/canvas/NodeCanvas.d.ts +10 -0
- package/dist/components/canvas/NodeCanvas.js +477 -0
- package/dist/components/canvas/NodeCanvas.theme.d.ts +7 -0
- package/dist/components/canvas/NodeCanvas.theme.js +9 -0
- package/dist/components/canvas/NodeCanvas.types.d.ts +187 -0
- package/dist/components/canvas/NodeControls.d.ts +25 -0
- package/dist/components/canvas/NodeControls.js +40 -0
- package/dist/components/canvas/NodeRenderer.d.ts +19 -0
- package/dist/components/canvas/NodeRenderer.js +117 -0
- package/dist/components/canvas/changes.d.ts +11 -0
- package/dist/components/canvas/changes.js +76 -0
- package/dist/components/canvas/context/CanvasContext.d.ts +32 -0
- package/dist/components/canvas/context/CanvasContext.js +14 -0
- package/dist/components/canvas/context/ConnectionContext.d.ts +33 -0
- package/dist/components/canvas/context/ConnectionContext.js +13 -0
- package/dist/components/canvas/context/HandleRegistry.d.ts +24 -0
- package/dist/components/canvas/context/HandleRegistry.js +15 -0
- package/dist/components/canvas/context/InteractionContext.d.ts +18 -0
- package/dist/components/canvas/context/InteractionContext.js +14 -0
- package/dist/components/canvas/context/NodeIdContext.d.ts +3 -0
- package/dist/components/canvas/context/NodeIdContext.js +15 -0
- package/dist/components/canvas/hooks/useConnection.d.ts +17 -0
- package/dist/components/canvas/hooks/useConnection.js +29 -0
- package/dist/components/canvas/hooks/useMarquee.d.ts +25 -0
- package/dist/components/canvas/hooks/useMarquee.js +91 -0
- package/dist/components/canvas/hooks/useNodeDrag.d.ts +23 -0
- package/dist/components/canvas/hooks/useNodeDrag.js +110 -0
- package/dist/components/canvas/hooks/usePanZoom.d.ts +30 -0
- package/dist/components/canvas/hooks/usePanZoom.js +189 -0
- package/dist/components/canvas/hooks/useViewport.d.ts +21 -0
- package/dist/components/canvas/hooks/useViewport.js +35 -0
- package/dist/components/canvas/index.d.ts +14 -0
- package/dist/components/canvas/index.js +12 -0
- package/dist/components/canvas/layout.d.ts +22 -0
- package/dist/components/canvas/layout.js +67 -0
- package/dist/components/canvas/utils.d.ts +4 -0
- package/dist/components/canvas/utils.js +16 -0
- package/dist/components/charts/AreaChart/AreaChart.js +136 -101
- package/dist/components/charts/AreaChart/AreaChart.types.d.ts +5 -5
- package/dist/components/charts/AreaChart/AreaChart.types.js +1 -0
- package/dist/components/charts/BarChart/BarChart.js +207 -143
- package/dist/components/charts/BarChart/BarChart.types.d.ts +4 -4
- package/dist/components/charts/BarChart/BarChart.types.js +1 -0
- package/dist/components/charts/ComboChart/ComboChart.types.d.ts +2 -2
- package/dist/components/charts/LineChart/LineChart.js +88 -72
- package/dist/components/charts/LineChart/LineChart.types.d.ts +3 -3
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/RadarChart/RadarChart.theme.js +5 -2
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +62 -72
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +10 -1
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +3 -9
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +33 -33
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +2 -2
- package/dist/components/charts/hooks/index.d.ts +2 -0
- package/dist/components/charts/hooks/useChartDimensions.d.ts +29 -0
- package/dist/components/charts/hooks/useChartDimensions.js +42 -0
- package/dist/components/charts/shared/ChartTooltip/ChartTooltip.theme.js +1 -1
- package/dist/components/charts/types/chart.types.d.ts +11 -2
- package/dist/components/charts/types/chart.types.js +10 -3
- package/dist/components/core/Avatar/Avatar.js +5 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.js +5 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +4 -2
- package/dist/components/core/Badge/Badge.js +1 -1
- package/dist/components/core/Badge/Badge.theme.js +16 -15
- package/dist/components/core/Button/Button.js +1 -1
- package/dist/components/core/Button/Button.theme.js +3 -3
- package/dist/components/core/Calendar/Calendar.theme.js +1 -1
- package/dist/components/core/Card/Card.js +7 -3
- package/dist/components/core/Card/Card.theme.js +3 -3
- package/dist/components/core/Card/Card.types.d.ts +27 -2
- package/dist/components/core/CommandPalette/CommandItem.js +4 -5
- package/dist/components/core/CommandPalette/CommandPalette.js +1 -1
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +11 -13
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +0 -2
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +14 -15
- package/dist/components/core/ContextMenu/ContextMenuItem.js +1 -1
- package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +1 -1
- package/dist/components/core/DotSeparator/DotSeparator.d.ts +3 -0
- package/dist/components/core/DotSeparator/DotSeparator.js +19 -0
- package/dist/components/core/DotSeparator/DotSeparator.theme.d.ts +2 -0
- package/dist/components/core/DotSeparator/DotSeparator.theme.js +10 -0
- package/dist/components/core/DotSeparator/DotSeparator.types.d.ts +25 -0
- package/dist/components/core/DotSeparator/index.d.ts +3 -0
- package/dist/components/core/Dropdown/Dropdown.theme.js +5 -6
- package/dist/components/core/Dropdown/DropdownItem.js +1 -1
- package/dist/components/core/Dropdown/DropdownMenu.js +58 -30
- package/dist/components/core/HeroCard/HeroCard.d.ts +5 -0
- package/dist/components/core/HeroCard/HeroCard.js +99 -0
- package/dist/components/core/HeroCard/HeroCard.theme.d.ts +3 -0
- package/dist/components/core/HeroCard/HeroCard.theme.js +8 -0
- package/dist/components/core/HeroCard/HeroCard.types.d.ts +70 -0
- package/dist/components/core/HeroCard/index.d.ts +4 -0
- package/dist/components/core/Kbd/Kbd.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +5 -2
- package/dist/components/core/MenuItem/MenuItem.theme.d.ts +6 -0
- package/dist/components/core/MenuItem/MenuItem.theme.js +19 -16
- package/dist/components/core/MenuItem/MenuItem.types.d.ts +2 -0
- package/dist/components/core/Modal/Modal.d.ts +1 -1
- package/dist/components/core/Modal/Modal.js +2 -7
- package/dist/components/core/Modal/Modal.theme.js +4 -8
- package/dist/components/core/Modal/Modal.types.d.ts +0 -10
- package/dist/components/core/Modal/index.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStack.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStack.types.d.ts +1 -2
- package/dist/components/core/ModalStack/ModalStackModal.d.ts +1 -1
- package/dist/components/core/ModalStack/ModalStackModal.js +2 -7
- package/dist/components/core/NavItem/NavItem.js +20 -4
- package/dist/components/core/NavItem/NavItem.theme.js +13 -2
- package/dist/components/core/PageHeading/PageHeading.theme.js +2 -2
- package/dist/components/core/Popover/Popover.theme.js +1 -1
- package/dist/components/core/Popover/Popover.types.d.ts +6 -2
- package/dist/components/core/Popover/PopoverBody.js +10 -3
- package/dist/components/core/ScrollArea/ScrollArea.js +242 -4
- package/dist/components/core/ScrollArea/ScrollArea.types.d.ts +12 -1
- package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.d.ts +4 -0
- package/dist/components/core/ScrollArea/smooth/SmoothScrollEngine.js +23 -0
- package/dist/components/core/ScrollArea/smooth/useSmoothScroll.js +4 -0
- package/dist/components/core/ScrollArea/smooth/useSmoothScroll.types.d.ts +5 -0
- package/dist/components/core/Segmented/Segmented.theme.js +2 -2
- package/dist/components/core/Sidebar/Sidebar.d.ts +2 -0
- package/dist/components/core/Sidebar/Sidebar.js +15 -7
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +92 -4
- package/dist/components/core/Sidebar/SidebarCard.d.ts +25 -0
- package/dist/components/core/Sidebar/SidebarCard.js +68 -0
- package/dist/components/core/Sidebar/SidebarCard.theme.d.ts +8 -0
- package/dist/components/core/Sidebar/SidebarCard.theme.js +18 -0
- package/dist/components/core/Sidebar/SidebarContent.js +5 -1
- package/dist/components/core/Sidebar/SidebarContext.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +10 -2
- package/dist/components/core/Sidebar/SidebarLogo.js +38 -3
- package/dist/components/core/Sidebar/SidebarSearch.d.ts +22 -0
- package/dist/components/core/Sidebar/SidebarSearch.js +135 -0
- package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +2 -2
- package/dist/components/core/Sidebar/index.d.ts +3 -1
- package/dist/components/core/Tag/Tag.js +29 -5
- package/dist/components/core/Tag/Tag.theme.js +13 -8
- package/dist/components/core/Tag/Tag.types.d.ts +7 -0
- package/dist/components/core/Tooltip/Tooltip.js +1 -1
- package/dist/components/core/Tooltip/Tooltip.theme.js +1 -2
- package/dist/components/core/index.d.ts +2 -0
- package/dist/components/core/index.js +6 -0
- package/dist/components/data-display/DescriptionList/DescriptionList.js +23 -7
- package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +10 -3
- package/dist/components/data-display/DescriptionList/DescriptionList.types.d.ts +49 -10
- package/dist/components/data-display/DescriptionList/index.d.ts +1 -1
- package/dist/components/data-display/Feed/Feed.js +28 -5
- package/dist/components/data-display/Feed/Feed.theme.js +1 -1
- package/dist/components/data-display/Feed/Feed.types.d.ts +32 -1
- package/dist/components/data-display/Feed/index.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChart.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChart.js +31 -4
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +19 -17
- package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +19 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.js +1 -1
- package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +1 -1
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +3 -3
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +7 -4
- package/dist/components/data-display/GanttChart/GanttMilestone.js +5 -5
- package/dist/components/data-display/GanttChart/GanttTablePanel.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +37 -16
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +2 -1
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +35 -11
- package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -2
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +3 -2
- package/dist/components/data-display/GanttChart/index.d.ts +1 -1
- package/dist/components/data-display/Metric/Metric.js +8 -8
- package/dist/components/data-display/Metric/Metric.theme.d.ts +3 -2
- package/dist/components/data-display/Metric/Metric.theme.js +50 -68
- package/dist/components/data-display/Metric/Metric.types.d.ts +19 -21
- package/dist/components/data-display/Table/Table.js +2 -2
- package/dist/components/data-display/Table/Table.theme.js +27 -9
- package/dist/components/data-display/Table/Table.types.d.ts +8 -0
- package/dist/components/data-display/Table/TableBody.js +2 -2
- package/dist/components/data-display/Table/TableCell.js +1 -1
- package/dist/components/data-display/Table/TableRow.d.ts +1 -1
- package/dist/components/data-display/Table/TableRow.js +9 -2
- package/dist/components/data-display/Timeline/Timeline.js +27 -5
- package/dist/components/data-display/Timeline/Timeline.theme.d.ts +10 -2
- package/dist/components/data-display/Timeline/Timeline.theme.js +14 -8
- package/dist/components/data-display/Timeline/Timeline.types.d.ts +48 -16
- package/dist/components/data-display/Timeline/Timeline.utils.d.ts +6 -0
- package/dist/components/data-display/Timeline/Timeline.utils.js +11 -0
- package/dist/components/data-display/Timeline/TimelineItem.js +13 -20
- package/dist/components/data-display/Timeline/TimelineMarker.js +10 -8
- package/dist/components/data-display/Timeline/index.d.ts +2 -2
- package/dist/components/effects/3d/index.d.ts +0 -2
- package/dist/components/effects/3d/index.js +0 -1
- package/dist/components/effects/Aurora/Aurora.d.ts +6 -17
- package/dist/components/effects/Aurora/Aurora.js +297 -131
- package/dist/components/effects/Aurora/Aurora.types.d.ts +6 -0
- package/dist/components/effects/DotPattern/DotPattern.js +1 -1
- package/dist/components/effects/Overlay/Overlay.theme.js +1 -2
- package/dist/components/effects/Preloader/Preloader.animations.d.ts +23 -0
- package/dist/components/effects/Preloader/Preloader.animations.js +150 -0
- package/dist/components/effects/Preloader/Preloader.d.ts +3 -0
- package/dist/components/effects/Preloader/Preloader.js +119 -0
- package/dist/components/effects/Preloader/Preloader.types.d.ts +63 -0
- package/dist/components/effects/Preloader/index.d.ts +2 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +25 -14
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +2 -0
- package/dist/components/effects/TiltCard/TiltCard.d.ts +12 -0
- package/dist/components/effects/TiltCard/TiltCard.glow.d.ts +28 -0
- package/dist/components/effects/TiltCard/TiltCard.glow.js +114 -0
- package/dist/components/effects/TiltCard/TiltCard.js +177 -0
- package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.d.ts → TiltCard/TiltCard.shaders.d.ts} +1 -1
- package/dist/components/effects/{SpotlightBorder/SpotlightBorder.shaders.js → TiltCard/TiltCard.shaders.js} +1 -1
- package/dist/components/effects/TiltCard/TiltCard.types.d.ts +88 -0
- package/dist/components/effects/TiltCard/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +4 -12
- package/dist/components/effects/index.js +2 -6
- package/dist/components/forms/Checkbox/Checkbox.js +7 -1
- package/dist/components/forms/Combobox/Combobox.js +1 -1
- package/dist/components/forms/Combobox/Combobox.theme.js +2 -4
- package/dist/components/forms/DatePicker/DatePicker.theme.js +11 -18
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -13
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.animations.d.ts +29 -0
- package/dist/components/forms/FileUpload/FileUpload.animations.js +19 -0
- package/dist/components/forms/FileUpload/FileUpload.js +85 -134
- package/dist/components/forms/FileUpload/FileUpload.theme.d.ts +2 -10
- package/dist/components/forms/FileUpload/FileUpload.theme.js +16 -30
- package/dist/components/forms/FileUpload/FileUpload.types.d.ts +26 -10
- package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
- package/dist/components/forms/Input/Input.theme.js +13 -10
- package/dist/components/forms/InputCounter/InputCounter.theme.js +1 -1
- package/dist/components/forms/Mention/Mention.js +152 -57
- package/dist/components/forms/Mention/Mention.theme.js +16 -23
- package/dist/components/forms/Mention/Mention.types.d.ts +12 -12
- package/dist/components/forms/Mention/Mention.utils.js +32 -4
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +5 -5
- package/dist/components/forms/Select/Select.js +2 -2
- package/dist/components/forms/Select/Select.theme.js +3 -3
- package/dist/components/forms/Slider/Slider.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.js +27 -15
- package/dist/components/forms/Switch/Switch.theme.d.ts +36 -6
- package/dist/components/forms/Switch/Switch.theme.js +33 -4
- package/dist/components/forms/Switch/Switch.types.d.ts +12 -2
- package/dist/components/forms/TimePicker/TimePicker.theme.js +1 -2
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -87
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +1 -1
- package/dist/components/forms/forms.theme.js +21 -16
- package/dist/components/forms/index.d.ts +0 -4
- package/dist/components/forms/index.js +0 -89
- package/dist/components/generative/GenerativeView.d.ts +21 -0
- package/dist/components/generative/GenerativeView.js +116 -0
- package/dist/components/generative/actions.d.ts +26 -0
- package/dist/components/generative/actions.js +51 -0
- package/dist/components/generative/index.d.ts +11 -0
- package/dist/components/generative/index.js +9 -0
- package/dist/components/generative/registry.d.ts +43 -0
- package/dist/components/generative/registry.js +114 -0
- package/dist/components/generative/resolvers.d.ts +35 -0
- package/dist/components/generative/resolvers.js +93 -0
- package/dist/components/generative/schema.generated.d.ts +2 -0
- package/dist/components/generative/schema.generated.js +1639 -0
- package/dist/components/generative/schemaTypes.d.ts +30 -0
- package/dist/components/generative/streaming.d.ts +39 -0
- package/dist/components/generative/streaming.js +283 -0
- package/dist/components/generative/tools.d.ts +21 -0
- package/dist/components/generative/tools.js +54 -0
- package/dist/components/generative/types.d.ts +41 -0
- package/dist/components/generative/useGenerativeStream.d.ts +37 -0
- package/dist/components/generative/useGenerativeStream.js +36 -0
- package/dist/components/generative/validate.d.ts +24 -0
- package/dist/components/generative/validate.js +259 -0
- package/dist/components/layout/AppShell/AppShell.d.ts +10 -0
- package/dist/components/layout/AppShell/AppShell.js +84 -0
- package/dist/components/layout/AppShell/AppShell.theme.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShell.theme.js +42 -0
- package/dist/components/layout/AppShell/AppShell.types.d.ts +127 -0
- package/dist/components/layout/AppShell/AppShellContext.d.ts +14 -0
- package/dist/components/layout/AppShell/AppShellContext.js +19 -0
- package/dist/components/layout/AppShell/AppShellFooter.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellFooter.js +12 -0
- package/dist/components/layout/AppShell/AppShellHeader.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellHeader.js +12 -0
- package/dist/components/layout/AppShell/AppShellMain.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellMain.js +19 -0
- package/dist/components/layout/AppShell/AppShellRightPanel.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellRightPanel.js +16 -0
- package/dist/components/layout/AppShell/AppShellSidebar.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellSidebar.js +16 -0
- package/dist/components/layout/AppShell/AppShellTopbar.d.ts +3 -0
- package/dist/components/layout/AppShell/AppShellTopbar.js +12 -0
- package/dist/components/layout/AppShell/index.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayout.js +1 -87
- package/dist/components/layout/Grid/Grid.d.ts +3 -0
- package/dist/components/layout/Grid/Grid.js +50 -0
- package/dist/components/layout/Grid/Grid.theme.d.ts +2 -0
- package/dist/components/layout/Grid/Grid.theme.js +35 -0
- package/dist/components/layout/Grid/Grid.types.d.ts +57 -0
- package/dist/components/layout/Grid/index.d.ts +3 -0
- package/dist/components/layout/Section/Section.d.ts +3 -0
- package/dist/components/layout/Section/Section.js +18 -0
- package/dist/components/layout/Section/Section.theme.d.ts +2 -0
- package/dist/components/layout/Section/Section.theme.js +10 -0
- package/dist/components/layout/Section/Section.types.d.ts +34 -0
- package/dist/components/layout/Section/index.d.ts +3 -0
- package/dist/components/layout/Stack/Stack.d.ts +3 -0
- package/dist/components/layout/Stack/Stack.js +19 -0
- package/dist/components/layout/Stack/Stack.theme.d.ts +2 -0
- package/dist/components/layout/Stack/Stack.theme.js +10 -0
- package/dist/components/layout/Stack/Stack.types.d.ts +39 -0
- package/dist/components/layout/Stack/index.d.ts +3 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.js +8 -0
- package/dist/generative.schema.json +1637 -0
- package/dist/hooks/useSelectPortal.d.ts +10 -2
- package/dist/hooks/useSelectPortal.js +45 -24
- package/dist/index.js +180 -174
- package/dist/registry.json +10205 -0
- package/dist/styles.css +1 -1
- package/dist/tools.json +1731 -0
- package/dist/utils/dateUtils.js +11 -1
- package/package.json +19 -4
- package/src/global.scss +82 -109
- package/src/styles/theme.css +707 -474
- package/dist/bg/1.jpg +0 -0
- package/dist/bg/10.jpg +0 -0
- package/dist/bg/11.jpg +0 -0
- package/dist/bg/14.jpg +0 -0
- package/dist/bg/15.jpg +0 -0
- package/dist/bg/16.jpg +0 -0
- package/dist/bg/17.jpg +0 -0
- package/dist/bg/18.jpg +0 -0
- package/dist/bg/19.jpg +0 -0
- package/dist/bg/2.jpg +0 -0
- package/dist/bg/20.jpg +0 -0
- package/dist/bg/21.jpg +0 -0
- package/dist/bg/22.jpg +0 -0
- package/dist/bg/23.jpg +0 -0
- package/dist/bg/24.jpg +0 -0
- package/dist/bg/3.jpg +0 -0
- package/dist/bg/4.jpg +0 -0
- package/dist/bg/5.jpg +0 -0
- package/dist/bg/6.jpg +0 -0
- package/dist/bg/7.jpg +0 -0
- package/dist/bg/8.jpg +0 -0
- package/dist/bg/9.jpg +0 -0
- package/dist/components/effects/MorphingText/MorphingText.d.ts +0 -17
- package/dist/components/effects/MorphingText/MorphingText.js +0 -125
- package/dist/components/effects/MorphingText/MorphingText.types.d.ts +0 -18
- package/dist/components/effects/MorphingText/index.d.ts +0 -2
- package/dist/components/effects/PageTransition/PageTransition.animations.d.ts +0 -8
- package/dist/components/effects/PageTransition/PageTransition.animations.js +0 -53
- package/dist/components/effects/PageTransition/PageTransition.d.ts +0 -3
- package/dist/components/effects/PageTransition/PageTransition.js +0 -82
- package/dist/components/effects/PageTransition/PageTransition.types.d.ts +0 -15
- package/dist/components/effects/PageTransition/index.d.ts +0 -2
- package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +0 -26
- package/dist/components/effects/ParallaxSection/ParallaxSection.js +0 -71
- package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +0 -11
- package/dist/components/effects/ParallaxSection/index.d.ts +0 -2
- package/dist/components/effects/Spotlight/Spotlight.d.ts +0 -36
- package/dist/components/effects/Spotlight/Spotlight.js +0 -112
- package/dist/components/effects/Spotlight/Spotlight.types.d.ts +0 -29
- package/dist/components/effects/Spotlight/index.d.ts +0 -2
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.d.ts +0 -18
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.js +0 -213
- package/dist/components/effects/SpotlightBorder/SpotlightBorder.types.d.ts +0 -61
- package/dist/components/effects/SpotlightBorder/index.d.ts +0 -2
- package/dist/components/effects/StickyScroll/StickyScroll.d.ts +0 -30
- package/dist/components/effects/StickyScroll/StickyScroll.js +0 -128
- package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +0 -19
- package/dist/components/effects/StickyScroll/index.d.ts +0 -2
- package/dist/components/forms/CronInput/CronInput.d.ts +0 -3
- package/dist/components/forms/CronInput/CronInput.js +0 -113
- package/dist/components/forms/CronInput/CronInput.theme.d.ts +0 -6
- package/dist/components/forms/CronInput/CronInput.theme.js +0 -84
- package/dist/components/forms/CronInput/CronInput.types.d.ts +0 -109
- package/dist/components/forms/CronInput/CronInput.utils.d.ts +0 -67
- package/dist/components/forms/CronInput/CronInput.utils.js +0 -505
- package/dist/components/forms/CronInput/index.d.ts +0 -4
- /package/dist/components/effects/{SpotlightBorder/SpotlightBorder.types.js → TiltCard/TiltCard.types.js} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { useReducedMotion } from 'motion/react';
|
|
4
|
+
import { cn } from '../../../utils/cn.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TiltCard wraps content in a damped 3D mouse tilt. The tilt is a pure CSS
|
|
8
|
+
* transform — no WebGL. The optional `glow` spotlight border lazy-loads the
|
|
9
|
+
* `three` peer dependency on demand (see TiltCard.glow.ts).
|
|
10
|
+
*
|
|
11
|
+
* The animation loop is demand-driven: it runs only while the pointer is near
|
|
12
|
+
* the card or the damped values are still settling, then stops — an idle
|
|
13
|
+
* TiltCard costs nothing per frame.
|
|
14
|
+
*/
|
|
15
|
+
const TiltCard = ({ children, tiltIntensity = 6, glow = false, variation = "rounded-rect", rounded, borderWidth = 2, glowColor = "#ffffff", spotlightSize = 0.4, spotlightEdge = 0.5, glowExtent = 20, glowIntensity = 0.6, shouldAnimate = true, className, style, ...props }) => {
|
|
16
|
+
const outerRef = useRef(null);
|
|
17
|
+
const contentRef = useRef(null);
|
|
18
|
+
const glowRef = useRef(null);
|
|
19
|
+
// Loop reads live prop values from refs so prop changes never tear down WebGL
|
|
20
|
+
const tiltRef = useRef(tiltIntensity);
|
|
21
|
+
tiltRef.current = tiltIntensity;
|
|
22
|
+
const glowParamsRef = useRef({ glowColor, spotlightSize, spotlightEdge, glowIntensity, borderWidth });
|
|
23
|
+
glowParamsRef.current = { glowColor, spotlightSize, spotlightEdge, glowIntensity, borderWidth };
|
|
24
|
+
// useReducedMotion is SSR-safe (null on server, real value after hydration)
|
|
25
|
+
const prefersReducedMotion = useReducedMotion();
|
|
26
|
+
const isAnimating = shouldAnimate && !prefersReducedMotion;
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const outer = outerRef.current;
|
|
29
|
+
const content = contentRef.current;
|
|
30
|
+
if (!outer || !content || !isAnimating)
|
|
31
|
+
return;
|
|
32
|
+
let disposed = false;
|
|
33
|
+
// Pointer in client coords — the handler does NO layout reads; the loop
|
|
34
|
+
// converts to content-local with one getBoundingClientRect per frame.
|
|
35
|
+
let pointer = null;
|
|
36
|
+
let cachedRect = null;
|
|
37
|
+
const st = { mx: -1e4, my: -1e4, dmx: -1e4, dmy: -1e4, rx: 0, ry: 0, raf: 0, running: false, last: 0 };
|
|
38
|
+
// How far outside the card the pointer still matters (glow lights up on approach)
|
|
39
|
+
const proximity = glow ? Math.max(glowExtent * 3, 120) : 0;
|
|
40
|
+
const loop = (now) => {
|
|
41
|
+
var _a;
|
|
42
|
+
if (disposed)
|
|
43
|
+
return;
|
|
44
|
+
const dt = Math.min(Math.max((now - st.last) / 1000, 0.001), 0.05);
|
|
45
|
+
st.last = now;
|
|
46
|
+
const rect = content.getBoundingClientRect();
|
|
47
|
+
cachedRect = rect;
|
|
48
|
+
if (pointer) {
|
|
49
|
+
const nx = pointer.x - rect.left;
|
|
50
|
+
const ny = pointer.y - rect.top;
|
|
51
|
+
// First arrival: snap the damped position instead of easing in from the
|
|
52
|
+
// far-away sentinel (easing from -10000 produces a violent tilt/glow sweep)
|
|
53
|
+
if (st.mx <= -9e3) {
|
|
54
|
+
st.dmx = nx;
|
|
55
|
+
st.dmy = ny;
|
|
56
|
+
}
|
|
57
|
+
st.mx = nx;
|
|
58
|
+
st.my = ny;
|
|
59
|
+
}
|
|
60
|
+
// dt-normalized damping — same feel at 60Hz and 120Hz
|
|
61
|
+
const aMouse = 1 - Math.exp(-12 * dt);
|
|
62
|
+
st.dmx += (st.mx - st.dmx) * aMouse;
|
|
63
|
+
st.dmy += (st.my - st.dmy) * aMouse;
|
|
64
|
+
const w = rect.width;
|
|
65
|
+
const h = rect.height;
|
|
66
|
+
// Gate on the DAMPED position — the tilt target derives from it, so the
|
|
67
|
+
// gate and the target must agree or transient positions leak through
|
|
68
|
+
const inside = !!pointer && st.dmx >= 0 && st.dmx <= w && st.dmy >= 0 && st.dmy <= h;
|
|
69
|
+
let targetRX = 0;
|
|
70
|
+
let targetRY = 0;
|
|
71
|
+
if (tiltRef.current > 0 && inside && w > 0 && h > 0) {
|
|
72
|
+
targetRY = (st.dmx / w - 0.5) * tiltRef.current;
|
|
73
|
+
targetRX = -(st.dmy / h - 0.5) * tiltRef.current;
|
|
74
|
+
}
|
|
75
|
+
const aTilt = 1 - Math.exp(-10 * dt);
|
|
76
|
+
st.rx += (targetRX - st.rx) * aTilt;
|
|
77
|
+
st.ry += (targetRY - st.ry) * aTilt;
|
|
78
|
+
const settledFlat = Math.abs(st.rx) < 0.01 && Math.abs(st.ry) < 0.01 && !inside;
|
|
79
|
+
outer.style.transform = settledFlat
|
|
80
|
+
? ""
|
|
81
|
+
: `perspective(1000px) rotateX(${st.rx}deg) rotateY(${st.ry}deg)`;
|
|
82
|
+
(_a = glowRef.current) === null || _a === void 0 ? void 0 : _a.render(st.dmx, st.dmy);
|
|
83
|
+
// Idle detection: stop once everything converged — a motionless hover
|
|
84
|
+
// renders nothing new. Any pointermove (or leave) restarts the loop.
|
|
85
|
+
const mouseSettled = Math.abs(st.mx - st.dmx) < 0.1 && Math.abs(st.my - st.dmy) < 0.1;
|
|
86
|
+
const tiltSettled = Math.abs(targetRX - st.rx) < 0.005 && Math.abs(targetRY - st.ry) < 0.005;
|
|
87
|
+
if (mouseSettled && tiltSettled) {
|
|
88
|
+
st.running = false;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
st.raf = requestAnimationFrame(loop);
|
|
92
|
+
};
|
|
93
|
+
const start = () => {
|
|
94
|
+
if (st.running || disposed)
|
|
95
|
+
return;
|
|
96
|
+
st.running = true;
|
|
97
|
+
st.last = performance.now();
|
|
98
|
+
st.raf = requestAnimationFrame(loop);
|
|
99
|
+
};
|
|
100
|
+
const onPointerMove = (e) => {
|
|
101
|
+
pointer = { x: e.clientX, y: e.clientY };
|
|
102
|
+
if (proximity > 0) {
|
|
103
|
+
// Document-level listener (glow reacts on approach): cheap pre-check
|
|
104
|
+
// against the cached rect so far-away moves don't wake the loop.
|
|
105
|
+
if (!cachedRect)
|
|
106
|
+
cachedRect = content.getBoundingClientRect();
|
|
107
|
+
const r = cachedRect;
|
|
108
|
+
if (e.clientX < r.left - proximity ||
|
|
109
|
+
e.clientX > r.right + proximity ||
|
|
110
|
+
e.clientY < r.top - proximity ||
|
|
111
|
+
e.clientY > r.bottom + proximity)
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
start();
|
|
115
|
+
};
|
|
116
|
+
const onPointerLeave = () => {
|
|
117
|
+
pointer = null;
|
|
118
|
+
st.mx = -1e4;
|
|
119
|
+
st.my = -1e4;
|
|
120
|
+
start(); // let the tilt ease back to rest, then the loop self-stops
|
|
121
|
+
};
|
|
122
|
+
const invalidateRect = () => {
|
|
123
|
+
cachedRect = null;
|
|
124
|
+
};
|
|
125
|
+
// Tilt-only: element-scoped listeners. Glow: document-scoped (the border
|
|
126
|
+
// lights up as the cursor approaches from outside).
|
|
127
|
+
const moveTarget = glow ? document : outer;
|
|
128
|
+
moveTarget.addEventListener("pointermove", onPointerMove, { passive: true });
|
|
129
|
+
const leaveTarget = glow ? document.documentElement : outer;
|
|
130
|
+
leaveTarget.addEventListener("pointerleave", onPointerLeave);
|
|
131
|
+
window.addEventListener("scroll", invalidateRect, { passive: true, capture: true });
|
|
132
|
+
const ro = new ResizeObserver(() => {
|
|
133
|
+
var _a;
|
|
134
|
+
invalidateRect();
|
|
135
|
+
(_a = glowRef.current) === null || _a === void 0 ? void 0 : _a.resize();
|
|
136
|
+
start(); // re-render the glow at the new size, then settle
|
|
137
|
+
});
|
|
138
|
+
ro.observe(content);
|
|
139
|
+
if (glow) {
|
|
140
|
+
import('./TiltCard.glow.js')
|
|
141
|
+
.then(({ createGlowEffect }) => {
|
|
142
|
+
if (disposed)
|
|
143
|
+
return;
|
|
144
|
+
const effect = createGlowEffect({ host: outer, content, variation, glowExtent, rounded });
|
|
145
|
+
effect.setParams(glowParamsRef.current);
|
|
146
|
+
effect.resize();
|
|
147
|
+
glowRef.current = effect;
|
|
148
|
+
start();
|
|
149
|
+
})
|
|
150
|
+
.catch((err) => {
|
|
151
|
+
if (process.env.NODE_ENV !== "production") {
|
|
152
|
+
console.error('[TiltCard] `glow` requires the optional "three" peer dependency.', err);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
return () => {
|
|
157
|
+
var _a;
|
|
158
|
+
disposed = true;
|
|
159
|
+
moveTarget.removeEventListener("pointermove", onPointerMove);
|
|
160
|
+
leaveTarget.removeEventListener("pointerleave", onPointerLeave);
|
|
161
|
+
window.removeEventListener("scroll", invalidateRect, { capture: true });
|
|
162
|
+
ro.disconnect();
|
|
163
|
+
cancelAnimationFrame(st.raf);
|
|
164
|
+
outer.style.transform = "";
|
|
165
|
+
(_a = glowRef.current) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
166
|
+
glowRef.current = null;
|
|
167
|
+
};
|
|
168
|
+
}, [isAnimating, glow, variation, glowExtent, rounded]);
|
|
169
|
+
// Live-update glow uniforms without tearing down the WebGL context
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
var _a;
|
|
172
|
+
(_a = glowRef.current) === null || _a === void 0 ? void 0 : _a.setParams({ glowColor, spotlightSize, spotlightEdge, glowIntensity, borderWidth });
|
|
173
|
+
}, [glowColor, spotlightSize, spotlightEdge, glowIntensity, borderWidth]);
|
|
174
|
+
return (jsx("div", { ref: outerRef, className: cn("relative overflow-visible", className), style: { ...style, ...(rounded ? { borderRadius: rounded } : {}) }, ...props, children: jsx("div", { ref: contentRef, className: "relative h-full w-full", style: { borderRadius: "inherit", zIndex: 20 }, children: children }) }));
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export { TiltCard };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TiltCardVariation = "rounded-rect" | "circle" | "circle-ring" | "triangle";
|
|
3
|
+
export declare const variationMap: Record<TiltCardVariation, number>;
|
|
4
|
+
/**
|
|
5
|
+
* TiltCard — wraps content in a damped 3D mouse tilt (pure CSS transform,
|
|
6
|
+
* no WebGL cost), with an optional `glow` spotlight border (lazy-loads the
|
|
7
|
+
* `three` optional peer dependency only when enabled).
|
|
8
|
+
*
|
|
9
|
+
* @example Tilt only — cheap, no WebGL
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <TiltCard tiltIntensity={6}>
|
|
12
|
+
* <Card>…</Card>
|
|
13
|
+
* </TiltCard>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example With the spotlight border glow
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <TiltCard glow glowColor="#3b82f6" borderWidth={2} glowExtent={30}>
|
|
19
|
+
* <Card className="bg-gray-900">…</Card>
|
|
20
|
+
* </TiltCard>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface TiltCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
/** Content to wrap with the effect */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Max tilt in degrees as the mouse moves across the card. 0 disables the tilt.
|
|
28
|
+
* @default 6
|
|
29
|
+
*/
|
|
30
|
+
tiltIntensity?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Enable the WebGL spotlight border (illuminates near the cursor with a soft
|
|
33
|
+
* outer glow). Lazy-loads `three` — without it, TiltCard never touches WebGL.
|
|
34
|
+
* ⚠️ Each glowing instance owns a WebGL context; browsers cap ~8–16 live
|
|
35
|
+
* contexts, so avoid enabling it on large collections of cards.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
glow?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Shape variation for the glow border
|
|
41
|
+
* @default 'rounded-rect'
|
|
42
|
+
*/
|
|
43
|
+
variation?: TiltCardVariation;
|
|
44
|
+
/**
|
|
45
|
+
* Border radius for the container (e.g., "1rem", "var(--card-radius)").
|
|
46
|
+
* Controls both the container clip and the shader's corner roundness.
|
|
47
|
+
* @default undefined (inherits from className like rounded-xl)
|
|
48
|
+
*/
|
|
49
|
+
rounded?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Glow border stroke width in pixels
|
|
52
|
+
* @default 2
|
|
53
|
+
*/
|
|
54
|
+
borderWidth?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Color of the glow border (any CSS color three.js can parse)
|
|
57
|
+
* @default '#ffffff'
|
|
58
|
+
*/
|
|
59
|
+
glowColor?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Size of the mouse-following spotlight (0-1)
|
|
62
|
+
* @default 0.4
|
|
63
|
+
*/
|
|
64
|
+
spotlightSize?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Edge softness of the spotlight (higher = softer falloff)
|
|
67
|
+
* @default 0.5
|
|
68
|
+
*/
|
|
69
|
+
spotlightEdge?: number;
|
|
70
|
+
/**
|
|
71
|
+
* How far the glow can spread outside the container in pixels.
|
|
72
|
+
* Also prevents clipping of child shadows.
|
|
73
|
+
* @default 20
|
|
74
|
+
*/
|
|
75
|
+
glowExtent?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Overall intensity of the glow halo (0-1)
|
|
78
|
+
* @default 0.6
|
|
79
|
+
*/
|
|
80
|
+
glowIntensity?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to animate (respects prefers-reduced-motion)
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
shouldAnimate?: boolean;
|
|
86
|
+
/** Additional className for the container */
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
@@ -14,8 +14,6 @@ export { Aurora } from "./Aurora";
|
|
|
14
14
|
export type { AuroraProps } from "./Aurora";
|
|
15
15
|
export { MagneticElement } from "./MagneticElement";
|
|
16
16
|
export type { MagneticElementProps } from "./MagneticElement";
|
|
17
|
-
export { MorphingText } from "./MorphingText";
|
|
18
|
-
export type { MorphingTextProps } from "./MorphingText";
|
|
19
17
|
export { GridPattern } from "./GridPattern";
|
|
20
18
|
export type { GridPatternProps, GridPatternFadeDirection, } from "./GridPattern";
|
|
21
19
|
export { DotPattern } from "./DotPattern";
|
|
@@ -24,18 +22,12 @@ export { StripePattern } from "./StripePattern";
|
|
|
24
22
|
export type { StripePatternProps, StripePatternFadeDirection, } from "./StripePattern";
|
|
25
23
|
export { NoiseOverlay } from "./NoiseOverlay";
|
|
26
24
|
export type { NoiseOverlayProps, NoiseBlendMode } from "./NoiseOverlay";
|
|
27
|
-
export {
|
|
28
|
-
export type {
|
|
29
|
-
export { SpotlightBorder } from "./SpotlightBorder";
|
|
30
|
-
export type { SpotlightBorderProps, SpotlightBorderVariation, } from "./SpotlightBorder";
|
|
31
|
-
export { ParallaxSection } from "./ParallaxSection";
|
|
32
|
-
export type { ParallaxSectionProps } from "./ParallaxSection";
|
|
25
|
+
export { TiltCard } from "./TiltCard";
|
|
26
|
+
export type { TiltCardProps, TiltCardVariation } from "./TiltCard";
|
|
33
27
|
export { ScrollReveal } from "./ScrollReveal";
|
|
34
28
|
export type { ScrollRevealProps, ScrollRevealPreset } from "./ScrollReveal";
|
|
35
|
-
export {
|
|
36
|
-
export type {
|
|
37
|
-
export { PageTransition } from "./PageTransition";
|
|
38
|
-
export type { PageTransitionProps, PageTransitionDirection, } from "./PageTransition";
|
|
29
|
+
export { Preloader } from "./Preloader";
|
|
30
|
+
export type { PreloaderProps, PreloaderDirection, PreloaderType, } from "./Preloader";
|
|
39
31
|
export { InteractiveCharacters } from "./InteractiveCharacters";
|
|
40
32
|
export type { InteractiveCharactersProps, CharacterState, CharacterSize, } from "./InteractiveCharacters";
|
|
41
33
|
export { InsetCircleButton, InsetPill } from "./Neumorphic";
|
|
@@ -6,17 +6,13 @@ export { Animated } from './Animated/Animated.js';
|
|
|
6
6
|
export { ProgressiveBlur } from './ProgressiveBlur/ProgressiveBlur.js';
|
|
7
7
|
export { Aurora } from './Aurora/Aurora.js';
|
|
8
8
|
export { MagneticElement } from './MagneticElement/MagneticElement.js';
|
|
9
|
-
export { MorphingText } from './MorphingText/MorphingText.js';
|
|
10
9
|
export { GridPattern } from './GridPattern/GridPattern.js';
|
|
11
10
|
export { DotPattern } from './DotPattern/DotPattern.js';
|
|
12
11
|
export { StripePattern } from './StripePattern/StripePattern.js';
|
|
13
12
|
export { NoiseOverlay } from './NoiseOverlay/NoiseOverlay.js';
|
|
14
|
-
export {
|
|
15
|
-
export { SpotlightBorder } from './SpotlightBorder/SpotlightBorder.js';
|
|
16
|
-
export { ParallaxSection } from './ParallaxSection/ParallaxSection.js';
|
|
13
|
+
export { TiltCard } from './TiltCard/TiltCard.js';
|
|
17
14
|
export { ScrollReveal } from './ScrollReveal/ScrollReveal.js';
|
|
18
|
-
export {
|
|
19
|
-
export { PageTransition } from './PageTransition/PageTransition.js';
|
|
15
|
+
export { Preloader } from './Preloader/Preloader.js';
|
|
20
16
|
export { InteractiveCharacters } from './InteractiveCharacters/InteractiveCharacters.js';
|
|
21
17
|
export { InsetCircleButton } from './Neumorphic/InsetCircleButton.js';
|
|
22
18
|
export { InsetPill } from './Neumorphic/InsetPill.js';
|
|
@@ -36,6 +36,12 @@ const CheckboxComponent = React__default.forwardRef(({ id: idProp, name: namePro
|
|
|
36
36
|
else {
|
|
37
37
|
isChecked = internalChecked;
|
|
38
38
|
}
|
|
39
|
+
// A checked checkbox has been acted upon, so it should no longer read as an
|
|
40
|
+
// error: once checked it clears its own invalid styling (box border + label).
|
|
41
|
+
// The group-level error message stays under the consumer's control — this only
|
|
42
|
+
// resolves the per-item state so unchecked siblings keep signalling the error.
|
|
43
|
+
const showInvalid = isInvalid && !(isChecked && !indeterminate);
|
|
44
|
+
const visualState = isDisabled ? "disabled" : showInvalid ? "invalid" : "default";
|
|
39
45
|
const inputRef = useRef(null);
|
|
40
46
|
// Set indeterminate property on the input element
|
|
41
47
|
useEffect(() => {
|
|
@@ -69,7 +75,7 @@ const CheckboxComponent = React__default.forwardRef(({ id: idProp, name: namePro
|
|
|
69
75
|
ref(node);
|
|
70
76
|
else if (ref)
|
|
71
77
|
ref.current = node;
|
|
72
|
-
}, type: "checkbox", id: id, name: name, value: value, checked: isChecked, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? `${id}-description` : undefined, "aria-invalid":
|
|
78
|
+
}, type: "checkbox", id: id, name: name, value: value, checked: isChecked, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? `${id}-description` : undefined, "aria-invalid": showInvalid || undefined, "data-state": visualState, className: cn(checkboxTheme.inputStyle, checkboxTheme.sizes[size], indeterminate && "bg-neutral-200") }), jsxs(AnimatePresence, { mode: "wait", children: [indeterminate && (jsx(motion.svg, { viewBox: "0 0 16 16", fill: "none", className: cn("pointer-events-none col-start-1 row-start-1 self-center justify-self-center text-neutral-600", size === "sm" ? "size-3" : size === "lg" ? "size-5" : "size-4"), children: jsx(motion.path, { d: "M3.5 8 L12.5 8", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", variants: shouldReduceMotion ? reducedMotionVariants : indeterminateVariants, initial: "unchecked", animate: "checked", exit: "unchecked" }) }, "indeterminate")), isChecked && !indeterminate && (jsx(motion.svg, { viewBox: "0 0 16 16", fill: "none", className: cn("pointer-events-none col-start-1 row-start-1 self-center justify-self-center text-white", size === "sm" ? "size-3" : size === "lg" ? "size-5" : "size-4"), children: jsx(motion.path, { d: "M3.5 8.5 L6.5 11.5 L12.5 4.5", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", variants: shouldReduceMotion ? reducedMotionVariants : checkmarkVariants, initial: "unchecked", animate: "checked", exit: "unchecked" }) }, "checkmark"))] })] }), (label || description) && (jsxs("label", { htmlFor: id, className: cn("cursor-pointer", isDisabled && "cursor-not-allowed"), children: [label && (typeof label === 'string' ? (jsx("span", { className: cn(formLabelTheme.baseStyle, formLabelTheme.stateStyles[visualState], "mb-0"), children: label })) : (label)), description && (typeof description === 'string' ? (jsx("div", { id: `${id}-description`, className: checkboxTheme.descriptionStyle, children: description })) : (description))] }))] }));
|
|
73
79
|
});
|
|
74
80
|
CheckboxComponent.displayName = "Checkbox";
|
|
75
81
|
const Checkbox = Object.assign(CheckboxComponent, {
|
|
@@ -100,7 +100,7 @@ const ComboboxOptions = ({ isOpen, onClose, triggerRef, portal, placement, offse
|
|
|
100
100
|
}, children: isCreateOption ? (jsxs("span", { className: "flex items-center gap-1", children: [jsx(PlusIcon, { className: "size-4 shrink-0", strokeWidth: 2 }), jsx("span", { className: "block truncate", children: option.label })] })) : (jsx("span", { className: "block truncate", children: option.label })) }, option.id));
|
|
101
101
|
}), filteredOptions.length > 100 && (jsxs("div", { className: "px-3 py-2 text-xs text-[var(--color-text-muted)] text-center border-t border-[var(--color-border)]", children: ["Showing 100 of ", filteredOptions.length, " results \u2014 refine your search"] }))] })) })) }));
|
|
102
102
|
if (portal && isClient) {
|
|
103
|
-
return createPortal(jsx("div", { className: isDarkMode ? "dark" : undefined, children: optionsContent }), document.body);
|
|
103
|
+
return createPortal(jsx("div", { "data-flikkui-portal": "", className: isDarkMode ? "dark" : undefined, children: optionsContent }), document.body);
|
|
104
104
|
}
|
|
105
105
|
return optionsContent;
|
|
106
106
|
};
|
|
@@ -28,14 +28,12 @@ const comboboxTheme = {
|
|
|
28
28
|
focusStates: formsBaseTheme.focusStates,
|
|
29
29
|
// Icon positioning styles
|
|
30
30
|
iconStartStyle: formsBaseTheme.iconStyles.left,
|
|
31
|
-
iconEndStyle: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none text-[var(--color-text-muted)]
|
|
32
|
-
"dark:text-[var(--color-neutral-500)]",
|
|
31
|
+
iconEndStyle: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none text-[var(--color-text-muted)]",
|
|
33
32
|
// Icon padding configuration
|
|
34
33
|
iconPadding: formsBaseTheme.iconStyles.padding,
|
|
35
34
|
// Clear button styles
|
|
36
35
|
clearButtonStyle: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer " +
|
|
37
|
-
"text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors z-10
|
|
38
|
-
"dark:text-[var(--color-neutral-500)] dark:hover:text-[var(--color-neutral-200)]",
|
|
36
|
+
"text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors z-10",
|
|
39
37
|
clearIconStyle: "size-4",
|
|
40
38
|
// Dropdown styles - matches Select component for consistency
|
|
41
39
|
dropdownStyle: formsBaseTheme.dropdownStyles.container + " py-1",
|
|
@@ -10,8 +10,8 @@ import { formsBaseTheme } from '../forms.theme.js';
|
|
|
10
10
|
const datePickerTheme = {
|
|
11
11
|
containerStyle: formsBaseTheme.wrapperStyle,
|
|
12
12
|
baseStyle: formsBaseTheme.inputGroupBaseStyle + " justify-between cursor-pointer",
|
|
13
|
-
// Trigger button style -
|
|
14
|
-
triggerButtonStyle: "w-full cursor-pointer bg-
|
|
13
|
+
// Trigger button style - surface flips automatically between light/dark
|
|
14
|
+
triggerButtonStyle: "w-full cursor-pointer bg-[var(--color-surface)]",
|
|
15
15
|
// Placeholder text style - matches Input placeholder styling
|
|
16
16
|
placeholderTextStyle: "text-[var(--color-text-placeholder)]",
|
|
17
17
|
// Selected value text style
|
|
@@ -26,23 +26,16 @@ const datePickerTheme = {
|
|
|
26
26
|
triggerFocusStates: formsBaseTheme.focusStates,
|
|
27
27
|
iconEndStyle: formsBaseTheme.iconStyles.right,
|
|
28
28
|
iconEndPadding: formsBaseTheme.iconStyles.padding.right,
|
|
29
|
-
// Dropdown body -
|
|
30
|
-
bodyStyle: "min-w-fit max-w-none bg-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
presetsContainerStyle: "flex flex-col gap-1 p-3 border-b sm:border-b-0 sm:border-r border-[var(--color-border)] bg-[var(--color-neutral-50)] sm:min-w-[180px] " +
|
|
36
|
-
"dark:bg-[var(--color-neutral-800)] dark:border-[var(--color-neutral-700)]",
|
|
37
|
-
// Preset button - with dark mode support
|
|
29
|
+
// Dropdown body - floating overlay surface flips automatically
|
|
30
|
+
bodyStyle: "min-w-fit max-w-none bg-[var(--color-surface-overlay)]/80 backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-real-xl p-0 overflow-hidden z-[1000] fixed",
|
|
31
|
+
bodyWithPresetsStyle: "flex flex-col sm:flex-row w-fit max-w-[calc(100vw-2rem)] sm:max-w-none bg-[var(--color-surface-overlay)]/80 backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-lg p-0 overflow-hidden z-[1000] fixed",
|
|
32
|
+
// Presets sidebar - recessed sunken panel flips automatically
|
|
33
|
+
presetsContainerStyle: "flex flex-col gap-1 p-3 border-b sm:border-b-0 sm:border-r border-[var(--color-border)] bg-[var(--color-surface-sunken)] sm:min-w-[180px]",
|
|
34
|
+
// Preset button - surface hover/active fills flip automatically
|
|
38
35
|
presetButtonStyle: "w-full text-left px-3 py-2 text-sm rounded-[calc(var(--radius-base)*0.75)] transition-colors cursor-pointer " +
|
|
39
|
-
"text-[var(--color-text-secondary)] hover:bg-
|
|
40
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
|
|
41
|
-
"data-[active=true]:bg-
|
|
42
|
-
// Dark mode
|
|
43
|
-
"dark:text-[var(--color-neutral-400)] dark:hover:bg-[var(--color-neutral-700)] dark:hover:text-[var(--color-neutral-200)] " +
|
|
44
|
-
"dark:data-[active=true]:bg-[var(--color-neutral-700)] dark:data-[active=true]:text-[var(--color-neutral-100)] " +
|
|
45
|
-
"dark:focus-visible:ring-offset-[var(--color-neutral-800)]",
|
|
36
|
+
"text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] " +
|
|
37
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-surface-sunken)] " +
|
|
38
|
+
"data-[active=true]:bg-[var(--color-surface)] data-[active=true]:text-[var(--color-text-primary)] data-[active=true]:font-medium",
|
|
46
39
|
helperTextStyle: formsBaseTheme.helperText,
|
|
47
40
|
helperTextStates: {
|
|
48
41
|
default: "text-[var(--color-text-muted)] dark:text-[var(--color-neutral-400)]",
|
|
@@ -26,7 +26,7 @@ const DatePickerTrigger = ({ id, disabled, isOpen, state = "default", size = "md
|
|
|
26
26
|
// Apply focused styles when open - same pattern as SelectButton
|
|
27
27
|
const activeFocusState = isOpen
|
|
28
28
|
? focusStateStyle ||
|
|
29
|
-
"shadow-[
|
|
29
|
+
"shadow-[inset_0_0_0_1px_var(--color-primary-600)] ring-4 ring-[var(--color-primary)]/10"
|
|
30
30
|
: "";
|
|
31
31
|
return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open calendar", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(CalendarIcon, { className: "h-4 w-4" }) })] }) }));
|
|
32
32
|
};
|
|
@@ -6,7 +6,7 @@ import { formsBaseTheme } from '../forms.theme.js';
|
|
|
6
6
|
const dateRangePickerTheme = {
|
|
7
7
|
containerStyle: formsBaseTheme.wrapperStyle,
|
|
8
8
|
baseStyle: formsBaseTheme.inputGroupBaseStyle + " justify-between cursor-pointer",
|
|
9
|
-
triggerButtonStyle: "w-full cursor-pointer bg-
|
|
9
|
+
triggerButtonStyle: "w-full cursor-pointer bg-[var(--color-surface)]",
|
|
10
10
|
placeholderTextStyle: "text-[var(--color-text-placeholder)]",
|
|
11
11
|
valueTextStyle: "text-[var(--color-text-primary)]",
|
|
12
12
|
triggerSizes: {
|
|
@@ -19,26 +19,19 @@ const dateRangePickerTheme = {
|
|
|
19
19
|
triggerFocusStates: formsBaseTheme.focusStates,
|
|
20
20
|
iconEndStyle: formsBaseTheme.iconStyles.right,
|
|
21
21
|
iconEndPadding: formsBaseTheme.iconStyles.padding.right,
|
|
22
|
-
bodyStyle: "flex flex-col sm:flex-row w-fit max-w-[calc(100vw-2rem)] sm:max-w-none bg-
|
|
23
|
-
|
|
24
|
-
presetsContainerStyle: "hidden sm:flex flex-col gap-1 p-3 sm:border-r border-[var(--color-border)] bg-[var(--color-neutral-50)] sm:min-w-[180px] " +
|
|
25
|
-
"dark:bg-[var(--color-neutral-800)] ",
|
|
22
|
+
bodyStyle: "flex flex-col sm:flex-row w-fit max-w-[calc(100vw-2rem)] sm:max-w-none bg-[var(--color-surface-overlay)]/80 backdrop-blur-md border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-lg p-0 overflow-hidden z-[1000] fixed",
|
|
23
|
+
presetsContainerStyle: "hidden sm:flex flex-col gap-1 p-3 sm:border-r border-[var(--color-border)] bg-[var(--color-surface-sunken)] sm:min-w-[180px]",
|
|
26
24
|
presetButtonStyle: "w-full text-left px-3 py-2 text-sm font-medium rounded-[calc(var(--radius-base)*0.75)] transition-colors cursor-pointer " +
|
|
27
25
|
"flex items-center justify-between gap-2 " +
|
|
28
|
-
"text-[var(--color-text-secondary)] hover:bg-
|
|
29
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
|
|
30
|
-
"data-[active=true]:bg-
|
|
31
|
-
"dark:hover:bg-[var(--color-neutral-700)] " +
|
|
32
|
-
"dark:data-[active=true]:bg-[var(--color-neutral-700)] dark:data-[active=true]:text-[var(--color-neutral-100)] " +
|
|
33
|
-
"dark:focus-visible:ring-offset-[var(--color-neutral-800)]",
|
|
26
|
+
"text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] " +
|
|
27
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-surface-sunken)] " +
|
|
28
|
+
"data-[active=true]:bg-[var(--color-surface)] data-[active=true]:text-[var(--color-text-primary)] data-[active=true]:font-medium",
|
|
34
29
|
presetCheckmarkStyle: "size-4 text-[var(--color-primary)] shrink-0",
|
|
35
30
|
mobilePresetsContainerStyle: "sm:hidden px-3 pt-3 pb-1",
|
|
36
31
|
mobilePresetButtonStyle: "whitespace-nowrap px-3 py-1.5 text-xs font-medium rounded-full transition-colors cursor-pointer shrink-0 " +
|
|
37
32
|
"bg-[var(--color-background-secondary)] text-[var(--color-text-secondary)] " +
|
|
38
33
|
"hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] " +
|
|
39
34
|
"data-[active=true]:bg-[var(--color-primary-50)] data-[active=true]:text-[var(--color-primary)] " +
|
|
40
|
-
"dark:bg-[var(--color-neutral-800)] dark:text-[var(--color-neutral-300)] " +
|
|
41
|
-
"dark:hover:bg-[var(--color-neutral-700)] " +
|
|
42
35
|
"dark:data-[active=true]:bg-[var(--color-primary-950)] dark:data-[active=true]:text-[var(--color-primary-300)]",
|
|
43
36
|
mobileRangeDisplayStyle: "sm:hidden text-xs text-center py-2 text-[var(--color-text-secondary)] dark:text-[var(--color-neutral-400)]",
|
|
44
37
|
helperTextStyle: formsBaseTheme.helperText,
|
|
@@ -24,7 +24,7 @@ const DateRangePickerTrigger = ({ id, disabled, isOpen, state = "default", size
|
|
|
24
24
|
const triggerButtonStyle = theme.triggerButtonStyle || "";
|
|
25
25
|
const activeFocusState = isOpen
|
|
26
26
|
? focusStateStyle ||
|
|
27
|
-
"shadow-[
|
|
27
|
+
"shadow-[inset_0_0_0_1px_var(--color-primary-600)] ring-4 ring-[var(--color-primary)]/10"
|
|
28
28
|
: "";
|
|
29
29
|
return (jsx("div", { className: "relative w-full", children: jsxs("button", { ref: triggerRef, id: id, type: "button", className: cn(baseStyle, sizeStyle, stateStyle, hoverStateStyle, activeFocusState, iconEndPadding, triggerButtonStyle, "text-left", className), onClick: onClick, onFocus: onFocus, onBlur: onBlur, disabled: disabled, "aria-expanded": isOpen, "aria-haspopup": "dialog", "aria-label": "Open date range picker", "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedby, children: [children, jsx("span", { className: iconEndStyle, children: jsx(CalendarIcon, { className: "h-4 w-4" }) })] }) }));
|
|
30
30
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Spring used for thumbnail enter and for the layout reflow when items are removed. */
|
|
2
|
+
export declare const PREVIEW_LAYOUT_SPRING: {
|
|
3
|
+
type: "spring";
|
|
4
|
+
stiffness: number;
|
|
5
|
+
damping: number;
|
|
6
|
+
mass: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Enter / exit variants for a preview thumbnail.
|
|
10
|
+
* Exit shrinks + fades so the surrounding items can flow into the gap (driven
|
|
11
|
+
* by `layout` on each item). Pair with `AnimatePresence`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PREVIEW_ITEM: {
|
|
14
|
+
initial: {
|
|
15
|
+
opacity: number;
|
|
16
|
+
scale: number;
|
|
17
|
+
};
|
|
18
|
+
animate: {
|
|
19
|
+
opacity: number;
|
|
20
|
+
scale: number;
|
|
21
|
+
};
|
|
22
|
+
exit: {
|
|
23
|
+
opacity: number;
|
|
24
|
+
scale: number;
|
|
25
|
+
transition: {
|
|
26
|
+
duration: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Spring used for thumbnail enter and for the layout reflow when items are removed. */
|
|
2
|
+
const PREVIEW_LAYOUT_SPRING = {
|
|
3
|
+
type: "spring",
|
|
4
|
+
stiffness: 500,
|
|
5
|
+
damping: 38,
|
|
6
|
+
mass: 0.8,
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Enter / exit variants for a preview thumbnail.
|
|
10
|
+
* Exit shrinks + fades so the surrounding items can flow into the gap (driven
|
|
11
|
+
* by `layout` on each item). Pair with `AnimatePresence`.
|
|
12
|
+
*/
|
|
13
|
+
const PREVIEW_ITEM = {
|
|
14
|
+
initial: { opacity: 0, scale: 0.8 },
|
|
15
|
+
animate: { opacity: 1, scale: 1 },
|
|
16
|
+
exit: { opacity: 0, scale: 0.8, transition: { duration: 0.15 } },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { PREVIEW_ITEM, PREVIEW_LAYOUT_SPRING };
|