@flikk/ui 1.0.0-beta.2 → 1.0.0-beta.4
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 +51 -10
- package/dist/components/ai/PromptInput/PromptInput.theme.js +1 -0
- package/dist/components/ai/PromptInput/PromptInput.types.d.ts +20 -0
- package/dist/components/charts/DonutChart/DonutChart.types.d.ts +1 -2
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.types.d.ts +1 -2
- 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.d.ts +1 -1
- 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 +8 -4
- package/dist/components/core/Button/Button.d.ts +1 -1
- package/dist/components/core/Button/Button.theme.js +8 -9
- package/dist/components/core/Button/Button.types.d.ts +1 -2
- 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/Link/Link.d.ts +1 -1
- package/dist/components/core/Link/Link.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/3d/index.d.ts +6 -0
- package/dist/components/effects/3d/index.js +3 -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/CustomCursor/CustomCursor.d.ts +2 -2
- package/dist/components/effects/CustomCursor/CustomCursor.types.d.ts +3 -3
- 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 +22 -4
- package/dist/components/effects/index.js +11 -2
- 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/InputCounter/InputCounter.d.ts +1 -1
- package/dist/components/forms/InputCounter/InputCounter.types.d.ts +3 -2
- 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 +33 -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/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 +9 -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 +13 -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 +53 -21
- 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 +26 -22
- 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
|
@@ -6,10 +6,10 @@ import { Badge } from '../../core/Badge/Badge.js';
|
|
|
6
6
|
import { Button } from '../../core/Button/Button.js';
|
|
7
7
|
import { cn } from '../../../utils/cn.js';
|
|
8
8
|
|
|
9
|
-
const ApprovalCard = ({ title,
|
|
9
|
+
const ApprovalCard = ({ title, subtitle, variant = "default", riskLevel = "medium", onApprove, onDeny, children, isApproving = false, className, }) => {
|
|
10
10
|
const riskColor = approvalCardTheme.badgeColors[riskLevel];
|
|
11
11
|
const riskIcon = riskLevel === "critical" || riskLevel === "high" ? (jsx(ExclamationTriangleIcon, { className: "" })) : (jsx(CheckCircleIcon, { className: "" }));
|
|
12
|
-
return (jsxs(Card, { className: cn(approvalCardTheme.baseStyle, approvalCardTheme.variants[variant], className), children: [jsx(Card.Header, { children: jsx("div", { className: "flex flex-col items-start", children: jsxs(Badge, { variant: "outline", color: riskColor, size: "sm", iconStart: riskIcon, className: "font-semibold shadow", children: [riskLevel.toUpperCase(), " RISK"] }) }) }), jsxs(Card.Content, { className: "space-y-3", children: [jsxs("div", { className: "space-y-1", children: [jsx(Card.Title, { className: "text-base", children: title }),
|
|
12
|
+
return (jsxs(Card, { className: cn(approvalCardTheme.baseStyle, approvalCardTheme.variants[variant], className), children: [jsx(Card.Header, { children: jsx("div", { className: "flex flex-col items-start", children: jsxs(Badge, { variant: "outline", color: riskColor, size: "sm", iconStart: riskIcon, className: "font-semibold shadow", children: [riskLevel.toUpperCase(), " RISK"] }) }) }), jsxs(Card.Content, { className: "space-y-3", children: [jsxs("div", { className: "space-y-1", children: [jsx(Card.Title, { className: "text-base", children: title }), subtitle && (jsx("p", { className: "text-sm text-[var(--color-text-secondary)]", children: subtitle }))] }), children && (jsx("div", { className: "bg-[var(--color-background-secondary)] rounded-md p-3 text-xs font-mono border border-[var(--color-border)] overflow-x-auto", children: children }))] }), jsxs(Card.Footer, { className: "justify-end gap-2 mt-3", children: [jsx(Button, { variant: "outline", color: "neutral", size: "sm", onClick: onDeny, children: "Deny" }), jsx(Button, { color: riskColor, size: "sm", state: isApproving ? "loading" : "default", onClick: onApprove, children: "Approve" })] })] }));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { ApprovalCard };
|
|
@@ -7,9 +7,9 @@ export interface ApprovalCardProps {
|
|
|
7
7
|
*/
|
|
8
8
|
title: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Subtitle or context for the user
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
subtitle?: string;
|
|
13
13
|
/**
|
|
14
14
|
* Risk level determining visual severity
|
|
15
15
|
* @default "medium"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { useState, useRef, useId, useEffect, useCallback } from 'react';
|
|
3
|
+
import { AnimatePresence, motion } from 'motion/react';
|
|
3
4
|
import { cn } from '../../../utils/cn.js';
|
|
4
|
-
import { DocumentIcon, XMarkIcon, PlusIcon, AdjustmentsHorizontalIcon, MicrophoneIcon, ChevronDownIcon, ArrowRightIcon } from '@heroicons/react/24/outline';
|
|
5
|
+
import { CloudArrowUpIcon, DocumentIcon, XMarkIcon, PlusIcon, AdjustmentsHorizontalIcon, MicrophoneIcon, ChevronDownIcon, ArrowRightIcon } from '@heroicons/react/24/outline';
|
|
5
6
|
import { promptInputTheme } from './PromptInput.theme.js';
|
|
6
7
|
import { Textarea } from '../../forms/Textarea/Textarea.js';
|
|
7
8
|
import '../../forms/Textarea/Textarea.theme.js';
|
|
@@ -47,25 +48,31 @@ const PromptInput = React__default.forwardRef(({
|
|
|
47
48
|
// Value control
|
|
48
49
|
value, defaultValue = "", onChange,
|
|
49
50
|
// Textarea props
|
|
50
|
-
placeholder = "How may I assist you today?", maxLength, minHeight
|
|
51
|
+
placeholder = "How may I assist you today?", maxLength, minHeight: minHeightProp, maxHeight = "120px", rows,
|
|
51
52
|
// State
|
|
52
53
|
state = "default", disabled = false, helperText, showCharCount = false,
|
|
53
54
|
// Model selection
|
|
54
55
|
selectedModel: controlledModel, defaultSelectedModel, models = DEFAULT_MODELS, onModelChange,
|
|
55
56
|
// Event handlers
|
|
56
57
|
onSubmit, onAttachmentClick, onVoiceClick, onSettingsClick, onKeyDown,
|
|
58
|
+
// Dropzone
|
|
59
|
+
enableDropzone = true, dropzoneText = "Drop files here to add to chat",
|
|
57
60
|
// Multimodal attachments
|
|
58
61
|
attachments: controlledAttachments, onAttachmentsChange, acceptedFileTypes = ["image/*", "application/pdf"], maxFileSize = 10 * 1024 * 1024, maxAttachments = 10, compressImages = true, maxImageDimension = 1024, imageQuality = 0.8, onAttachmentError,
|
|
59
62
|
// Button visibility
|
|
60
63
|
showAttachmentButton = true, showVoiceButton = true, showSettingsButton = true, showModelSelector = true,
|
|
61
64
|
// Submit button
|
|
62
65
|
submitButtonLabel = "Submit prompt", submitButtonIcon = (jsx(ArrowRightIcon, { className: "size-4", strokeWidth: 2.5 })), submitShortcut,
|
|
66
|
+
// Variant
|
|
67
|
+
variant = "default",
|
|
63
68
|
// Styling
|
|
64
69
|
className, textareaClassName, footerClassName, theme = {},
|
|
65
70
|
// Accessibility
|
|
66
71
|
"aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, id: propId, ...props }, ref) => {
|
|
67
|
-
// ========== State Management ==========
|
|
68
72
|
var _a, _b;
|
|
73
|
+
// Derive minHeight: simple variant defaults to a compact single-line height
|
|
74
|
+
const minHeight = minHeightProp !== null && minHeightProp !== void 0 ? minHeightProp : (variant === "simple" ? "32px" : "48px");
|
|
75
|
+
// ========== State Management ==========
|
|
69
76
|
// Internal state for uncontrolled mode
|
|
70
77
|
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
71
78
|
const [internalAttachments, setInternalAttachments] = useState([]);
|
|
@@ -76,6 +83,8 @@ className, textareaClassName, footerClassName, theme = {},
|
|
|
76
83
|
const internalTextareaRef = useRef(null);
|
|
77
84
|
const textareaRef = ref || internalTextareaRef;
|
|
78
85
|
const fileInputRef = useRef(null);
|
|
86
|
+
const dragCounterRef = useRef(0);
|
|
87
|
+
const [isDragOver, setIsDragOver] = useState(false);
|
|
79
88
|
const uniqueId = useId();
|
|
80
89
|
// Determine if component is controlled
|
|
81
90
|
const isControlled = value !== undefined;
|
|
@@ -315,6 +324,36 @@ className, textareaClassName, footerClassName, theme = {},
|
|
|
315
324
|
processFiles(files);
|
|
316
325
|
}
|
|
317
326
|
}, [processFiles]);
|
|
327
|
+
// ========== Drag & Drop Handlers ==========
|
|
328
|
+
const handleDragEnter = useCallback((e) => {
|
|
329
|
+
e.preventDefault();
|
|
330
|
+
e.stopPropagation();
|
|
331
|
+
dragCounterRef.current++;
|
|
332
|
+
if (dragCounterRef.current === 1 && !isDisabled && enableDropzone) {
|
|
333
|
+
setIsDragOver(true);
|
|
334
|
+
}
|
|
335
|
+
}, [isDisabled, enableDropzone]);
|
|
336
|
+
const handleDragOver = useCallback((e) => {
|
|
337
|
+
e.preventDefault();
|
|
338
|
+
e.stopPropagation();
|
|
339
|
+
}, []);
|
|
340
|
+
const handleDragLeave = useCallback((e) => {
|
|
341
|
+
e.preventDefault();
|
|
342
|
+
e.stopPropagation();
|
|
343
|
+
dragCounterRef.current--;
|
|
344
|
+
if (dragCounterRef.current === 0) {
|
|
345
|
+
setIsDragOver(false);
|
|
346
|
+
}
|
|
347
|
+
}, []);
|
|
348
|
+
const handleDrop = useCallback((e) => {
|
|
349
|
+
e.preventDefault();
|
|
350
|
+
e.stopPropagation();
|
|
351
|
+
dragCounterRef.current = 0;
|
|
352
|
+
setIsDragOver(false);
|
|
353
|
+
if (!isDisabled && e.dataTransfer.files.length > 0) {
|
|
354
|
+
processFiles(e.dataTransfer.files);
|
|
355
|
+
}
|
|
356
|
+
}, [isDisabled, processFiles]);
|
|
318
357
|
/**
|
|
319
358
|
* Remove attachment
|
|
320
359
|
*/
|
|
@@ -402,6 +441,7 @@ className, textareaClassName, footerClassName, theme = {},
|
|
|
402
441
|
footerStyle: theme.footerStyle || promptInputTheme.footerStyle,
|
|
403
442
|
actionsStyle: theme.actionsStyle || promptInputTheme.actionsStyle,
|
|
404
443
|
submitButtonStyle: theme.submitButtonStyle || promptInputTheme.submitButtonStyle,
|
|
444
|
+
dropzoneStyle: theme.dropzoneStyle || promptInputTheme.dropzoneStyle,
|
|
405
445
|
stateStyle: ((_b = theme.states) === null || _b === void 0 ? void 0 : _b[state]) || promptInputTheme.states[state],
|
|
406
446
|
};
|
|
407
447
|
// ========== Character Count ==========
|
|
@@ -413,13 +453,13 @@ className, textareaClassName, footerClassName, theme = {},
|
|
|
413
453
|
if (e.target.files)
|
|
414
454
|
processFiles(e.target.files);
|
|
415
455
|
e.target.value = "";
|
|
416
|
-
}, className: "sr-only", "aria-label": "Attach files" }), jsxs("div", { className: cn(mergedTheme.baseStyle, mergedTheme.stateStyle
|
|
417
|
-
minHeight,
|
|
418
|
-
maxHeight,
|
|
419
|
-
} }) }), currentAttachments.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 py-2 px-1", children: currentAttachments.map((attachment) => {
|
|
456
|
+
}, className: "sr-only", "aria-label": "Attach files" }), jsxs("div", { className: cn("relative", mergedTheme.baseStyle, mergedTheme.stateStyle, variant === "simple" ? "p-3 rounded-full pl-5" : ""), onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsx(AnimatePresence, { children: isDragOver && enableDropzone && (jsxs(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 }, className: mergedTheme.dropzoneStyle, children: [jsx(CloudArrowUpIcon, { className: "size-8 text-[var(--color-primary)]" }), jsx("p", { className: "text-sm font-medium text-[var(--color-primary)]", children: dropzoneText })] })) }), currentAttachments.length > 0 && (jsx("div", { className: "flex flex-wrap gap-2 py-2 px-1", children: currentAttachments.map((attachment) => {
|
|
420
457
|
var _a;
|
|
421
458
|
return (jsxs("div", { className: "relative group rounded-lg border border-[var(--color-border)] bg-white", children: [attachment.type === "image" ? (attachment.isCompressing ? (jsx("div", { className: "size-12 flex items-center justify-center bg-gray-100 rounded-lg", children: jsx("div", { className: "w-4 h-4 border-2 border-gray-300 border-t-[var(--color-primary)] rounded-full animate-spin" }) })) : (jsx("img", { src: attachment.previewUrl, alt: attachment.file.name, className: "size-12 object-cover rounded-lg" }))) : (jsxs("div", { className: "size-12 flex flex-col items-center justify-center text-center p-1 rounded-lg", children: [jsx(DocumentIcon, { className: "w-5 h-5 text-[var(--color-text-muted)]" }), jsx("span", { className: "text-[10px] text-[var(--color-text-secondary)] truncate w-full", children: (_a = attachment.file.name.split(".").pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase() })] })), jsx("button", { onClick: () => removeAttachment(attachment.id), className: "absolute -top-1.5 -right-1.5 size-5 rounded-full bg-[var(--color-danger)] text-white flex items-center justify-center opacity-0 translate-y-1 group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-300 ease-in-out cursor-pointer shadow-md", "aria-label": `Remove ${attachment.file.name}`, children: jsx(XMarkIcon, { className: "size-3", strokeWidth: 3 }) })] }, attachment.id));
|
|
422
|
-
}) })), jsxs("div", { className: cn(
|
|
459
|
+
}) })), jsxs("div", { className: cn("flex gap-2", variant === "simple" ? "items-end" : "items-start"), children: [jsx(Textarea, { ref: textareaRef, id: id, unstyled: true, value: currentValue, onChange: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste, placeholder: placeholder, disabled: isDisabled, maxLength: maxLength, rows: rows, "aria-label": ariaLabel || "Prompt input", "aria-describedby": helperTextId, "aria-invalid": isInvalid, "aria-disabled": isDisabled, className: cn(mergedTheme.textareaStyle, variant === "simple" && "!w-auto flex-1 min-w-0 justify-center", textareaClassName), style: {
|
|
460
|
+
minHeight,
|
|
461
|
+
maxHeight,
|
|
462
|
+
} }), variant === "simple" && (jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle, "shrink-0"), size: "md", variant: "filled", color: "neutral", onClick: handleSubmit, disabled: !canSubmit, state: isLoading ? "loading" : "default", "aria-label": submitButtonLabel, title: submitShortcut ? `Submit (${submitShortcut})` : undefined, showReflection: false, children: submitButtonIcon }))] }), variant !== "simple" && (jsxs("div", { className: cn(mergedTheme.footerStyle, footerClassName), children: [jsxs("div", { className: mergedTheme.actionsStyle, children: [showAttachmentButton && (jsxs(Dropdown, { selectionMode: "none", children: [jsx(Dropdown.Trigger, { children: jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0.5", "aria-label": "Add attachment", disabled: isDisabled, children: jsx(PlusIcon, { className: "size-4", strokeWidth: 2 }) }) }), jsxs(Dropdown.Menu, { children: [jsx(Dropdown.Item, { itemKey: "upload-image", onAction: () => {
|
|
423
463
|
// Set accept to images only and trigger file input
|
|
424
464
|
if (fileInputRef.current) {
|
|
425
465
|
fileInputRef.current.accept = "image/*";
|
|
@@ -433,11 +473,12 @@ className, textareaClassName, footerClassName, theme = {},
|
|
|
433
473
|
}, children: "Add Link" }, "add-link"), jsx(Dropdown.Item, { itemKey: "upload-pdf", onAction: () => {
|
|
434
474
|
// Set accept to PDF and trigger file input
|
|
435
475
|
if (fileInputRef.current) {
|
|
436
|
-
fileInputRef.current.accept =
|
|
476
|
+
fileInputRef.current.accept =
|
|
477
|
+
"application/pdf,.pdf";
|
|
437
478
|
fileInputRef.current.click();
|
|
438
479
|
}
|
|
439
480
|
onAttachmentClick === null || onAttachmentClick === void 0 ? void 0 : onAttachmentClick();
|
|
440
|
-
}, children: "Upload PDF" }, "upload-pdf")] })] })), showSettingsButton && (jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0.5", onClick: onSettingsClick, "aria-label": "Open settings", disabled: isDisabled, children: jsx(AdjustmentsHorizontalIcon, { className: "size-4 text-[var(--color-text-muted)]", strokeWidth: 2 }) })), showVoiceButton && (jsxs(Button, { variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0", onClick: onVoiceClick, "aria-label": "Voice input", disabled: isDisabled, children: [jsx(MicrophoneIcon, { className: "size-4", strokeWidth: 2 }), " Voice"] })), showModelSelector && (jsxs(Dropdown, { selectionMode: "single", selectedKeys: isModelControlled ? [controlledModel] : internalModel, onSelectionChange: handleModelChange, children: [jsx(Dropdown.Trigger, { children: jsxs(Button, { variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0", "aria-label": "Select AI model", disabled: isDisabled, children: [modelMap[currentModel] || "Select Model", jsx(ChevronDownIcon, { className: "size-3 opacity-80", strokeWidth: 2 })] }) }), jsx(Dropdown.Menu, { children: models.map((model) => (jsxs(Dropdown.Item, { itemKey: model.key, children: [model.icon && (jsx("span", { className: "mr-2", children: model.icon })), model.label] }, model.key))) })] }))] }), jsx("div", { children: jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle), size: "sm", variant: "outline", color: "neutral", onClick: handleSubmit, disabled: !canSubmit, state: isLoading ? "loading" : "default", "aria-label": submitButtonLabel, title: submitShortcut ? `Submit (${submitShortcut})` : undefined, children: submitButtonIcon }) })] })] }), displayHelperText && (jsx("div", { id: helperTextId, className: cn("mt-1 text-xs", isInvalid
|
|
481
|
+
}, children: "Upload PDF" }, "upload-pdf")] })] })), showSettingsButton && (jsx(Button, { iconOnly: true, variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0.5", onClick: onSettingsClick, "aria-label": "Open settings", disabled: isDisabled, children: jsx(AdjustmentsHorizontalIcon, { className: "size-4 text-[var(--color-text-muted)]", strokeWidth: 2 }) })), showVoiceButton && (jsxs(Button, { variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0", onClick: onVoiceClick, "aria-label": "Voice input", disabled: isDisabled, children: [jsx(MicrophoneIcon, { className: "size-4", strokeWidth: 2 }), " Voice"] })), showModelSelector && (jsxs(Dropdown, { selectionMode: "single", selectedKeys: isModelControlled ? [controlledModel] : internalModel, onSelectionChange: handleModelChange, children: [jsx(Dropdown.Trigger, { children: jsxs(Button, { variant: "outline", color: "neutral", size: "sm", className: "rounded-full !border-0", "aria-label": "Select AI model", disabled: isDisabled, children: [modelMap[currentModel] || "Select Model", jsx(ChevronDownIcon, { className: "size-3 opacity-80", strokeWidth: 2 })] }) }), jsx(Dropdown.Menu, { children: models.map((model) => (jsxs(Dropdown.Item, { itemKey: model.key, children: [model.icon && (jsx("span", { className: "mr-2", children: model.icon })), model.label] }, model.key))) })] }))] }), jsx("div", { children: jsx(Button, { iconOnly: true, className: cn(mergedTheme.submitButtonStyle), size: "sm", variant: "outline", color: "neutral", onClick: handleSubmit, disabled: !canSubmit, state: isLoading ? "loading" : "default", "aria-label": submitButtonLabel, title: submitShortcut ? `Submit (${submitShortcut})` : undefined, children: submitButtonIcon }) })] }))] }), displayHelperText && (jsx("div", { id: helperTextId, className: cn("mt-1 text-xs", isInvalid
|
|
441
482
|
? "text-[var(--color-danger)]"
|
|
442
483
|
: "text-[var(--color-text-muted)]"), role: isInvalid ? "alert" : undefined, "aria-live": isInvalid ? "polite" : undefined, children: displayHelperText }))] }));
|
|
443
484
|
});
|
|
@@ -4,6 +4,7 @@ const promptInputTheme = {
|
|
|
4
4
|
footerStyle: "flex justify-between items-end",
|
|
5
5
|
actionsStyle: "flex gap-1",
|
|
6
6
|
submitButtonStyle: "rounded-full",
|
|
7
|
+
dropzoneStyle: "absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 rounded-[var(--card-radius)] border-2 border-dashed border-[var(--color-primary)] bg-[var(--color-primary-200)]/80 backdrop-blur-sm dark:bg-[var(--color-primary-900)]/80",
|
|
7
8
|
states: {
|
|
8
9
|
default: "",
|
|
9
10
|
disabled: "opacity-50 cursor-not-allowed",
|
|
@@ -154,6 +154,23 @@ export interface PromptInputProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
154
154
|
submitButtonIcon?: React.ReactNode;
|
|
155
155
|
/** Visual indicator for keyboard shortcut (not functional) */
|
|
156
156
|
submitShortcut?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Enable drag-and-drop file attachment
|
|
159
|
+
* @default true
|
|
160
|
+
*/
|
|
161
|
+
enableDropzone?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Text displayed in the dropzone overlay
|
|
164
|
+
* @default "Drop files here to add to chat"
|
|
165
|
+
*/
|
|
166
|
+
dropzoneText?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Layout variant
|
|
169
|
+
* - "default": stacked layout with footer toolbar below textarea
|
|
170
|
+
* - "simple": inline layout with submit button next to textarea, no footer
|
|
171
|
+
* @default "default"
|
|
172
|
+
*/
|
|
173
|
+
variant?: "default" | "simple";
|
|
157
174
|
/** Additional class name for the container (highest priority) */
|
|
158
175
|
className?: string;
|
|
159
176
|
/** Additional class name for the textarea element */
|
|
@@ -203,6 +220,8 @@ export interface PromptInputThemeOverrides {
|
|
|
203
220
|
actionsStyle?: string;
|
|
204
221
|
/** Style for the submit button */
|
|
205
222
|
submitButtonStyle?: string;
|
|
223
|
+
/** Style for the dropzone overlay */
|
|
224
|
+
dropzoneStyle?: string;
|
|
206
225
|
/** State-specific styles */
|
|
207
226
|
states?: Partial<Record<PromptInputState, string>>;
|
|
208
227
|
}
|
|
@@ -215,5 +234,6 @@ export interface PromptInputTheme {
|
|
|
215
234
|
footerStyle: string;
|
|
216
235
|
actionsStyle: string;
|
|
217
236
|
submitButtonStyle: string;
|
|
237
|
+
dropzoneStyle: string;
|
|
218
238
|
states: Record<PromptInputState, string>;
|
|
219
239
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HTMLMotionProps } from "motion/react";
|
|
3
2
|
/**
|
|
4
3
|
* Color configuration for the donut chart
|
|
5
4
|
*/
|
|
@@ -41,7 +40,7 @@ export interface DonutChartThemeOverrides {
|
|
|
41
40
|
/**
|
|
42
41
|
* DonutChart component props
|
|
43
42
|
*/
|
|
44
|
-
export interface DonutChartProps extends Omit<
|
|
43
|
+
export interface DonutChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
45
44
|
/**
|
|
46
45
|
* Visual variant for the donut chart (solid or segmented)
|
|
47
46
|
* @default "solid"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HTMLMotionProps } from "motion/react";
|
|
3
2
|
/**
|
|
4
3
|
* Data segment for the multi-segment donut chart
|
|
5
4
|
*/
|
|
@@ -52,7 +51,7 @@ export interface MultiSegmentDonutChartThemeOverrides {
|
|
|
52
51
|
/**
|
|
53
52
|
* MultiSegmentDonutChart component props
|
|
54
53
|
*/
|
|
55
|
-
export interface MultiSegmentDonutChartProps extends Omit<
|
|
54
|
+
export interface MultiSegmentDonutChartProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
56
55
|
/**
|
|
57
56
|
* Array of data segments to display
|
|
58
57
|
* Each segment should have value and percentage
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const accordionTheme = {
|
|
2
2
|
// Base container styles for separated variant (default)
|
|
3
|
-
baseStyle: "w-full
|
|
3
|
+
baseStyle: "w-full",
|
|
4
4
|
// Base container styles for stacked variant (unified card)
|
|
5
|
-
baseStyleStacked: "w-full
|
|
5
|
+
baseStyleStacked: "w-full border border-[var(--color-border)] rounded-[var(--form-radius)] overflow-hidden",
|
|
6
6
|
// Item styles for separated variant (individual cards with spacing)
|
|
7
7
|
itemStyle: "border border-[var(--color-border)] rounded-[var(--form-radius)] bg-white dark:bg-[var(--color-background-secondary)] overflow-hidden mb-2 last-of-type:mb-0 data-[state=open]:shadow-xs",
|
|
8
8
|
// Item styles for stacked variant (shared borders, no spacing)
|
|
@@ -12,7 +12,7 @@ const defaultIcons = {
|
|
|
12
12
|
warning: ExclamationTriangleIcon,
|
|
13
13
|
danger: XCircleIcon,
|
|
14
14
|
};
|
|
15
|
-
const Alert = React__default.forwardRef(({ variant = "default", color = "primary", title,
|
|
15
|
+
const Alert = React__default.forwardRef(({ variant = "default", color = "primary", title, subtitle, dismissible, icon, showIcon = true, avatar, actions, onDismiss, className, children, darkMode = false, ...props }, ref) => {
|
|
16
16
|
var _a;
|
|
17
17
|
const iconColor = (_a = alertTheme.iconColors[color]) !== null && _a !== void 0 ? _a : alertTheme.iconColors.primary;
|
|
18
18
|
const showDismiss = dismissible === true || (dismissible !== false && !!onDismiss);
|
|
@@ -32,7 +32,7 @@ const Alert = React__default.forwardRef(({ variant = "default", color = "primary
|
|
|
32
32
|
const IconComponent = defaultIcons[color];
|
|
33
33
|
return (jsx("div", { className: "flex-shrink-0 w-6 h-6 mt-1", "aria-hidden": "true", children: jsx(IconComponent, { className: cn("w-6 h-6", iconColor) }) }));
|
|
34
34
|
};
|
|
35
|
-
const alertNode = (jsxs("div", { ref: ref, className: cn(alertTheme.baseStyle, alertTheme.variants[variant], className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", ...props, children: [renderIconOrAvatar(), jsxs("div", { className: `flex-1 min-w-0 ${showDismiss ? "mr-5" : ""}`, children: [title && (jsx("div", { className: cn("font-semibold text-[var(--color-text-primary)]"), children: title })),
|
|
35
|
+
const alertNode = (jsxs("div", { ref: ref, className: cn(alertTheme.baseStyle, alertTheme.variants[variant], className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", ...props, children: [renderIconOrAvatar(), jsxs("div", { className: `flex-1 min-w-0 ${showDismiss ? "mr-5" : ""}`, children: [title && (jsx("div", { className: cn("font-semibold text-[var(--color-text-primary)]"), children: title })), subtitle && (jsx("div", { className: "text-[var(--color-text-secondary)]/90 mt-1", children: subtitle })), children && jsx("div", { className: "mt-2", children: children }), actions && (jsx("div", { className: "flex items-center gap-2 mt-6", children: actions }))] }), showDismiss && (jsx(Button, { variant: "link", color: "neutral", size: "sm", iconOnly: true, onClick: handleDismiss, "aria-label": "Dismiss alert", className: "rounded-full absolute top-2 right-2 flex-shrink-0", children: jsx(XMarkIcon, { className: "size-4", strokeWidth: 2 }) }))] }));
|
|
36
36
|
if (darkMode) {
|
|
37
37
|
return jsx("div", { className: "dark", children: alertNode });
|
|
38
38
|
}
|
|
@@ -29,8 +29,8 @@ export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
29
29
|
color?: AlertColor;
|
|
30
30
|
/** The main title/message of the alert */
|
|
31
31
|
title?: string;
|
|
32
|
-
/** Additional
|
|
33
|
-
|
|
32
|
+
/** Additional subtitle text */
|
|
33
|
+
subtitle?: string;
|
|
34
34
|
/** Whether the alert can be dismissed */
|
|
35
35
|
dismissible?: boolean;
|
|
36
36
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AlertDialogProps } from "./AlertDialog.types";
|
|
2
2
|
export declare const AlertDialog: {
|
|
3
|
-
({ trigger, icon, title,
|
|
3
|
+
({ trigger, icon, title, subtitle, footer, className, }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -3,14 +3,14 @@ import { useState, isValidElement, cloneElement } from 'react';
|
|
|
3
3
|
import { Modal } from '../Modal/Modal.js';
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
|
|
6
|
-
const AlertDialog = ({ trigger, icon, title,
|
|
6
|
+
const AlertDialog = ({ trigger, icon, title, subtitle, footer, className, }) => {
|
|
7
7
|
const [isOpen, setIsOpen] = useState(false);
|
|
8
8
|
const handleOpen = () => setIsOpen(true);
|
|
9
9
|
const handleClose = () => setIsOpen(false);
|
|
10
10
|
const triggerElement = isValidElement(trigger)
|
|
11
11
|
? cloneElement(trigger, { onClick: handleOpen })
|
|
12
12
|
: null;
|
|
13
|
-
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: false, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-full p-3 mb-3 w-fit glass-effect shadow-xl shadow-black/5", "aria-hidden": "true", children: icon })), jsx(Modal.Title, { children: title })] }), jsx(Modal.Body, { className: "pt-2", children: jsx("div", { className: "text-[var(--color-text-secondary)] text-sm", children:
|
|
13
|
+
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: false, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-full p-3 mb-3 w-fit glass-effect shadow-xl shadow-black/5", "aria-hidden": "true", children: icon })), jsx(Modal.Title, { children: title })] }), jsx(Modal.Body, { className: "pt-2", children: jsx("div", { className: "text-[var(--color-text-secondary)] text-sm", children: subtitle }) }), footer && (jsx(Modal.Footer, { className: "pb-6", children: footer(handleClose) }))] })] }));
|
|
14
14
|
};
|
|
15
15
|
AlertDialog.displayName = "AlertDialog";
|
|
16
16
|
|
|
@@ -6,8 +6,8 @@ export interface AlertDialogProps {
|
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
/** The title of the dialog. */
|
|
8
8
|
title: React.ReactNode;
|
|
9
|
-
/** The main content/
|
|
10
|
-
|
|
9
|
+
/** The main content/subtitle of the dialog. */
|
|
10
|
+
subtitle: React.ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* A render prop for the footer, which receives a `close` function.
|
|
13
13
|
* Use this to render action buttons.
|
|
@@ -11,4 +11,4 @@ import { BadgeProps } from "./Badge.types";
|
|
|
11
11
|
* <Badge dismissible onDismiss={handleDismiss}>Removable</Badge>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare const Badge: React.NamedExoticComponent<
|
|
14
|
+
export declare const Badge: React.NamedExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -32,7 +32,7 @@ const getShouldAnimate = () => {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
const Badge = React__default.memo(React__default.forwardRef(({ children, variant = "filled", color = "primary", size = "md", pill = false, withDot = false, iconStart, avatar, dismissible = false, onDismiss, selectable = false, selected = false, onSelect, disabled = false, maxWidth, className, theme: customTheme = {}, onClick, darkMode = false, ...props }, ref) => {
|
|
35
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
36
36
|
// State management
|
|
37
37
|
const [isVisible, setIsVisible] = useState(true);
|
|
38
38
|
const [isSelected, setIsSelected] = useState(selected);
|
|
@@ -103,6 +103,10 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
103
103
|
...badgeTheme.pillSizes,
|
|
104
104
|
...customTheme.pillSizes,
|
|
105
105
|
},
|
|
106
|
+
radiusSizes: {
|
|
107
|
+
...badgeTheme.radiusSizes,
|
|
108
|
+
...customTheme.radiusSizes,
|
|
109
|
+
},
|
|
106
110
|
iconSizes: {
|
|
107
111
|
...badgeTheme.iconSizes,
|
|
108
112
|
...customTheme.iconSizes,
|
|
@@ -134,11 +138,11 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
134
138
|
const sizeStyle = ((_k = theme.sizes) === null || _k === void 0 ? void 0 : _k[size]) || "";
|
|
135
139
|
const shapeStyle = pill
|
|
136
140
|
? "rounded-full"
|
|
137
|
-
: "rounded-[var(--badge-radius)]";
|
|
138
|
-
const dotColorStyle = ((
|
|
141
|
+
: ((_l = theme.radiusSizes) === null || _l === void 0 ? void 0 : _l[size]) || "rounded-[var(--badge-radius)]";
|
|
142
|
+
const dotColorStyle = ((_m = theme.dotColors) === null || _m === void 0 ? void 0 : _m[color]) || "";
|
|
139
143
|
// Build base styles with all states
|
|
140
144
|
const isInteractive = selectable || dismissible;
|
|
141
|
-
const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((
|
|
145
|
+
const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((_o = theme.pillSizes) === null || _o === void 0 ? void 0 : _o[size]), isInteractive && "cursor-pointer", disabled && ((_p = theme.states) === null || _p === void 0 ? void 0 : _p.disabled), darkMode && "dark", className);
|
|
142
146
|
// Create data attributes for styling hooks
|
|
143
147
|
const dataAttributes = {
|
|
144
148
|
"data-variant": variant,
|
|
@@ -162,17 +166,15 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
162
166
|
? {
|
|
163
167
|
sm: "-ml-1.5", // Small pill: minimal overlap
|
|
164
168
|
md: "-ml-1.5", // Medium pill: moderate overlap
|
|
165
|
-
lg: "-ml-2", // Large pill: more overlap
|
|
166
169
|
}[size]
|
|
167
170
|
: {
|
|
168
171
|
sm: "-ml-1.5", // Small default: minimal overlap
|
|
169
172
|
md: "-ml-1", // Medium default: less overlap (has border ring)
|
|
170
|
-
lg: "-ml-1.5", // Large default: moderate overlap
|
|
171
173
|
}[size];
|
|
172
174
|
return (jsx(Avatar, { src: avatar.src, alt: avatar.alt, fallback: avatar.fallback, initialsCount: avatar.initialsCount, className: cn((_a = theme.avatarSizes) === null || _a === void 0 ? void 0 : _a[size], avatarMargin, "border-0", pill ? "rounded-full" : "rounded-md ring-0") }));
|
|
173
175
|
}
|
|
174
176
|
if (iconStart) {
|
|
175
|
-
return (jsx("span", { className: cn("flex-shrink-0", (_b = theme.iconSizes) === null || _b === void 0 ? void 0 : _b[size]), "aria-hidden": "true", children: iconStart }));
|
|
177
|
+
return (jsx("span", { className: cn("inline-flex items-center justify-center flex-shrink-0", (_b = theme.iconSizes) === null || _b === void 0 ? void 0 : _b[size]), "aria-hidden": "true", children: iconStart }));
|
|
176
178
|
}
|
|
177
179
|
if (withDot) {
|
|
178
180
|
if (shouldAnimate) {
|
|
@@ -192,7 +194,7 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
192
194
|
? `${maxWidth}px`
|
|
193
195
|
: maxWidth,
|
|
194
196
|
}
|
|
195
|
-
: undefined, children: children }), dismissible && (jsx("button", { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (
|
|
197
|
+
: undefined, children: children }), dismissible && (jsx("button", { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (_q = theme.dismissButtonSizes) === null || _q === void 0 ? void 0 : _q[size]), "aria-label": "Dismiss", disabled: disabled, children: jsx(XMarkIcon, { className: cn("badge-dismiss-icon", (_r = theme.dismissIconSizes) === null || _r === void 0 ? void 0 : _r[size]), "aria-hidden": "true" }) }))] })) : null;
|
|
196
198
|
}
|
|
197
199
|
return (jsx(AnimatePresence, { mode: "wait", children: isVisible && (jsxs(motion.span, { ref: ref, className: baseStyles, onClick: handleClick, role: selectable ? "button" : undefined, tabIndex: selectable && !disabled ? 0 : undefined, "aria-pressed": selectable ? isSelected : undefined, "aria-disabled": disabled || undefined, variants: dismissible ? dismissVariants : badgeVariants, initial: "initial", animate: "animate", exit: "exit", whileTap: selectable && !disabled ? { scale: 0.98 } : undefined, ...dataAttributes, ...props, children: [renderLeftContent(), jsx("span", { className: cn("badge-content", maxWidth && "truncate"), style: maxWidth
|
|
198
200
|
? {
|
|
@@ -200,7 +202,7 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
200
202
|
? `${maxWidth}px`
|
|
201
203
|
: maxWidth,
|
|
202
204
|
}
|
|
203
|
-
: undefined, children: children }), dismissible && (jsx(motion.button, { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (
|
|
205
|
+
: undefined, children: children }), dismissible && (jsx(motion.button, { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (_s = theme.dismissButtonSizes) === null || _s === void 0 ? void 0 : _s[size]), "aria-label": "Dismiss", disabled: disabled, variants: dismissButtonVariants, initial: "initial", whileHover: "hover", whileTap: "tap", children: jsx(XMarkIcon, { className: cn("badge-dismiss-icon", (_t = theme.dismissIconSizes) === null || _t === void 0 ? void 0 : _t[size]), "aria-hidden": "true" }) }))] })) }));
|
|
204
206
|
}));
|
|
205
207
|
Badge.displayName = "Badge";
|
|
206
208
|
|
|
@@ -29,7 +29,7 @@ const badgeTheme = {
|
|
|
29
29
|
},
|
|
30
30
|
// Outline variant - transparent bg with colored border
|
|
31
31
|
outline: {
|
|
32
|
-
neutral: "text-[var(--color-text-
|
|
32
|
+
neutral: "text-[var(--color-text-secondary)] border-[var(--color-border)] " + "",
|
|
33
33
|
primary: "text-[var(--color-primary)] border-[var(--color-border)] " +
|
|
34
34
|
"dark:text-[var(--color-primary-400)]",
|
|
35
35
|
success: "text-[var(--color-success)] border-[var(--color-border)] " +
|
|
@@ -41,8 +41,8 @@ const badgeTheme = {
|
|
|
41
41
|
},
|
|
42
42
|
// Ghost variant - subtle background tints
|
|
43
43
|
ghost: {
|
|
44
|
-
neutral: "bg-[var(--color-neutral-200)] text-[var(--color-text-
|
|
45
|
-
"dark:bg-[var(--color-neutral-900)]
|
|
44
|
+
neutral: "bg-[var(--color-neutral-200)] text-[var(--color-text-secondary)] " +
|
|
45
|
+
"dark:bg-[var(--color-neutral-900)] ",
|
|
46
46
|
primary: "bg-[var(--color-primary-100)] text-[var(--color-primary-700)] " +
|
|
47
47
|
"dark:bg-[var(--color-primary-600)]/30 dark:text-[var(--color-primary-400)]",
|
|
48
48
|
success: "bg-[var(--color-success-100)] text-[var(--color-success-600)] " +
|
|
@@ -57,45 +57,44 @@ const badgeTheme = {
|
|
|
57
57
|
sizes: {
|
|
58
58
|
sm: "text-xs px-1.5 py-0.5 gap-1",
|
|
59
59
|
md: "text-sm px-2 py-0.5 gap-1",
|
|
60
|
-
|
|
60
|
+
},
|
|
61
|
+
// Border radius per size (using CSS variable)
|
|
62
|
+
radiusSizes: {
|
|
63
|
+
sm: "rounded-[calc(var(--badge-radius)*0.75)]",
|
|
64
|
+
md: "rounded-[var(--badge-radius)]",
|
|
61
65
|
},
|
|
62
66
|
// Additional padding for pill shape
|
|
63
67
|
pillSizes: {
|
|
64
68
|
sm: "px-2",
|
|
65
69
|
md: "px-2.5",
|
|
66
|
-
lg: "px-3",
|
|
67
70
|
},
|
|
68
71
|
// Icon sizes
|
|
69
72
|
iconSizes: {
|
|
70
73
|
sm: "size-3",
|
|
71
74
|
md: "size-3.5",
|
|
72
|
-
lg: "size-4",
|
|
73
75
|
},
|
|
74
76
|
// Avatar sizes (base sizes without negative margin)
|
|
75
77
|
avatarSizes: {
|
|
76
78
|
sm: "size-4",
|
|
77
79
|
md: "size-4",
|
|
78
|
-
lg: "size-5",
|
|
79
80
|
},
|
|
80
81
|
// Dismiss button container sizes
|
|
81
82
|
dismissButtonSizes: {
|
|
82
83
|
sm: "size-3.5",
|
|
83
84
|
md: "size-4",
|
|
84
|
-
lg: "size-4.5",
|
|
85
85
|
},
|
|
86
86
|
// Dismiss icon sizes (inside button)
|
|
87
87
|
dismissIconSizes: {
|
|
88
88
|
sm: "size-2.5",
|
|
89
89
|
md: "size-3",
|
|
90
|
-
lg: "size-3.5",
|
|
91
90
|
},
|
|
92
91
|
// Dot indicator colors (simple, no dark mode needed - inherits from parent)
|
|
93
92
|
dotColors: {
|
|
94
|
-
neutral: "bg-[var(--color-text-
|
|
95
|
-
primary: "bg-[var(--color-primary
|
|
96
|
-
success: "bg-[var(--color-success
|
|
97
|
-
warning: "bg-[var(--color-warning
|
|
98
|
-
danger: "bg-[var(--color-danger
|
|
93
|
+
neutral: "bg-[var(--color-text-secondary)]",
|
|
94
|
+
primary: "bg-[var(--color-primary)]",
|
|
95
|
+
success: "bg-[var(--color-success)]",
|
|
96
|
+
warning: "bg-[var(--color-warning)]",
|
|
97
|
+
danger: "bg-[var(--color-danger)]",
|
|
99
98
|
},
|
|
100
99
|
// State styles
|
|
101
100
|
states: {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ReactNode, MouseEvent } from "react";
|
|
2
|
-
import { HTMLMotionProps } from "motion/react";
|
|
1
|
+
import React, { ReactNode, MouseEvent } from "react";
|
|
3
2
|
export type BadgeVariant = "filled" | "outline" | "ghost";
|
|
4
3
|
export type BadgeColor = "neutral" | "primary" | "success" | "warning" | "danger";
|
|
5
|
-
export type BadgeSize = "sm" | "md"
|
|
4
|
+
export type BadgeSize = "sm" | "md";
|
|
6
5
|
/**
|
|
7
6
|
* Theme configuration for Badge component
|
|
8
7
|
*/
|
|
@@ -28,6 +27,10 @@ export interface BadgeTheme {
|
|
|
28
27
|
* Additional padding for pill-shaped badges
|
|
29
28
|
*/
|
|
30
29
|
pillSizes: Record<BadgeSize, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Border radius per badge size
|
|
32
|
+
*/
|
|
33
|
+
radiusSizes: Record<BadgeSize, string>;
|
|
31
34
|
/**
|
|
32
35
|
* Icon sizes for each badge size
|
|
33
36
|
*/
|
|
@@ -65,6 +68,7 @@ export interface BadgeThemeOverrides {
|
|
|
65
68
|
variantColors?: Partial<Record<BadgeVariant, Partial<Record<BadgeColor, string>>>>;
|
|
66
69
|
sizes?: Partial<Record<BadgeSize, string>>;
|
|
67
70
|
pillSizes?: Partial<Record<BadgeSize, string>>;
|
|
71
|
+
radiusSizes?: Partial<Record<BadgeSize, string>>;
|
|
68
72
|
iconSizes?: Partial<Record<BadgeSize, string>>;
|
|
69
73
|
avatarSizes?: Partial<Record<BadgeSize, string>>;
|
|
70
74
|
dismissButtonSizes?: Partial<Record<BadgeSize, string>>;
|
|
@@ -75,7 +79,7 @@ export interface BadgeThemeOverrides {
|
|
|
75
79
|
hover: string;
|
|
76
80
|
}>;
|
|
77
81
|
}
|
|
78
|
-
export interface BadgeProps extends Omit<
|
|
82
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onSelect" | "inputMode"> {
|
|
79
83
|
/**
|
|
80
84
|
* The content to be displayed inside the badge
|
|
81
85
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps } from "./Button.types";
|
|
3
|
-
declare const Button: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { Button };
|
|
@@ -15,15 +15,15 @@ const buttonTheme = {
|
|
|
15
15
|
variantColors: {
|
|
16
16
|
// Filled variant - solid backgrounds
|
|
17
17
|
filled: {
|
|
18
|
-
neutral: "bg-[var(--color-neutral-
|
|
19
|
-
"hover:bg-[var(--color-neutral-
|
|
20
|
-
"focus-visible:outline-[var(--color-
|
|
21
|
-
"dark:bg-[var(--color-neutral-
|
|
22
|
-
"dark:hover:bg-[var(--color-neutral-
|
|
18
|
+
neutral: "bg-[var(--color-neutral-900)] text-white border-[var(--color-border)] " +
|
|
19
|
+
"hover:bg-[var(--color-neutral-800)] hover:ring-2 hover:ring-[var(--color-neutral-900)]/20 " +
|
|
20
|
+
"focus-visible:outline-[var(--color-neutral-800)] " +
|
|
21
|
+
"dark:bg-[var(--color-neutral-200)] dark:text-[var(--color-neutral-900)] dark:border-[var(--color-neutral-200)] " +
|
|
22
|
+
"dark:hover:bg-[var(--color-neutral-300)]",
|
|
23
23
|
primary: "bg-[var(--color-primary)] text-white border-[var(--color-primary)] " +
|
|
24
24
|
"hover:bg-[var(--color-primary-700)] hover:ring-2 hover:ring-[var(--color-primary)]/20 " +
|
|
25
25
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
26
|
-
"dark:bg-[var(--color-primary-600)] dark:border-[var(--color-primary-600)] " +
|
|
26
|
+
"dark:text-white dark:bg-[var(--color-primary-600)] dark:border-[var(--color-primary-600)] " +
|
|
27
27
|
"dark:hover:bg-[var(--color-primary-500)]",
|
|
28
28
|
success: "bg-[var(--color-success)] text-white border-[var(--color-success)] " +
|
|
29
29
|
"hover:bg-[var(--color-success-600)] hover:ring-2 hover:ring-[var(--color-success)]/20 " +
|
|
@@ -46,8 +46,7 @@ const buttonTheme = {
|
|
|
46
46
|
neutral: "text-[var(--color-text-primary)] border-[var(--color-border)] " +
|
|
47
47
|
"hover:bg-[var(--color-neutral-100)] hover:ring-2 hover:ring-[var(--color-border)] " +
|
|
48
48
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
49
|
-
"dark:
|
|
50
|
-
"dark:hover:bg-[var(--color-neutral-800)]",
|
|
49
|
+
"dark:hover:bg-[var(--color-background-secondary)]",
|
|
51
50
|
primary: "text-[var(--color-primary-600)] border-[var(--color-primary-600)] " +
|
|
52
51
|
"hover:bg-[var(--color-primary-50)] hover:ring-2 hover:ring-[var(--color-primary)]/30 " +
|
|
53
52
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
@@ -99,7 +98,7 @@ const buttonTheme = {
|
|
|
99
98
|
},
|
|
100
99
|
// Link variant - text-only with per-color styles
|
|
101
100
|
link: {
|
|
102
|
-
neutral: "text-[var(--color-text-
|
|
101
|
+
neutral: "text-[var(--color-text-secondary)] underline-offset-4 hover:underline hover:text-[var(--color-text-primary)] " +
|
|
103
102
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
104
103
|
"dark:text-[var(--color-text-primary)]",
|
|
105
104
|
primary: "text-[var(--color-primary-600)] underline-offset-4 hover:underline " +
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HTMLMotionProps } from "motion/react";
|
|
3
2
|
import { RippleEffectType } from "./Button.ripple";
|
|
4
3
|
/**
|
|
5
4
|
* Button component props
|
|
@@ -14,7 +13,7 @@ import { RippleEffectType } from "./Button.ripple";
|
|
|
14
13
|
* @property {string} rippleClassName - Custom class name for ripple styling
|
|
15
14
|
* @property {number} rippleScale - Scale multiplier for ripple expansion (default: 10)
|
|
16
15
|
*/
|
|
17
|
-
export interface ButtonProps extends
|
|
16
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
17
|
/** The semantic color/intent of the button */
|
|
19
18
|
color?: ButtonColor;
|
|
20
19
|
/** The visual style variant of the button */
|