@forgedevstack/bear 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
- package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
- package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
- package/dist/components/ApprovalCard/index.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
- package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
- package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
- package/dist/components/ArtifactCard/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.js +1 -1
- package/dist/components/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.js +10 -9
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Chart/BarChart.cjs +1 -1
- package/dist/components/Chart/BarChart.d.ts +1 -2
- package/dist/components/Chart/BarChart.js +74 -61
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -1
- package/dist/components/Chart/Chart.const.d.ts +24 -3
- package/dist/components/Chart/Chart.const.js +39 -16
- package/dist/components/Chart/Chart.d.ts +1 -5
- package/dist/components/Chart/Chart.js +23 -24
- package/dist/components/Chart/Chart.types.d.ts +12 -20
- package/dist/components/Chart/Chart.utils.cjs +1 -1
- package/dist/components/Chart/Chart.utils.d.ts +8 -18
- package/dist/components/Chart/Chart.utils.js +39 -3
- package/dist/components/Chart/FunnelChart.cjs +1 -0
- package/dist/components/Chart/FunnelChart.d.ts +2 -0
- package/dist/components/Chart/FunnelChart.js +61 -0
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.d.ts +1 -2
- package/dist/components/Chart/LineChart.js +80 -70
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.d.ts +1 -2
- package/dist/components/Chart/PieChart.js +140 -105
- package/dist/components/Chart/PieChart.types.d.ts +8 -0
- package/dist/components/Chart/RadarChart.cjs +1 -0
- package/dist/components/Chart/RadarChart.d.ts +2 -0
- package/dist/components/Chart/RadarChart.js +123 -0
- package/dist/components/Chart/index.d.ts +3 -1
- package/dist/components/Chat/Chat.cjs +1 -1
- package/dist/components/Chat/Chat.const.cjs +1 -1
- package/dist/components/Chat/Chat.const.d.ts +9 -22
- package/dist/components/Chat/Chat.const.js +18 -26
- package/dist/components/Chat/Chat.d.ts +1 -20
- package/dist/components/Chat/Chat.js +107 -162
- package/dist/components/Chat/Chat.types.d.ts +20 -27
- package/dist/components/Chat/Chat.utils.cjs +1 -0
- package/dist/components/Chat/Chat.utils.d.ts +2 -0
- package/dist/components/Chat/Chat.utils.js +10 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
- package/dist/components/Chat/index.d.ts +2 -1
- package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
- package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
- package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
- package/dist/components/ChatBubble/ChatBubble.js +32 -0
- package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
- package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
- package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
- package/dist/components/ChatBubble/index.d.ts +2 -0
- package/dist/components/ChatError/ChatError.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.d.ts +2 -0
- package/dist/components/ChatError/ChatError.const.js +8 -0
- package/dist/components/ChatError/ChatError.d.ts +2 -0
- package/dist/components/ChatError/ChatError.js +32 -0
- package/dist/components/ChatError/ChatError.types.d.ts +14 -0
- package/dist/components/ChatError/index.d.ts +2 -0
- package/dist/components/CitationList/CitationList.cjs +1 -0
- package/dist/components/CitationList/CitationList.d.ts +2 -0
- package/dist/components/CitationList/CitationList.js +30 -0
- package/dist/components/CitationList/CitationList.types.d.ts +15 -0
- package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
- package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
- package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
- package/dist/components/CitationList/helpers/index.d.ts +1 -0
- package/dist/components/CitationList/index.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
- package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
- package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.js +49 -0
- package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
- package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
- package/dist/components/ContextMeter/index.d.ts +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.d.ts +4 -12
- package/dist/components/Drawer/Drawer.const.js +7 -55
- package/dist/components/Drawer/Drawer.d.ts +1 -2
- package/dist/components/Drawer/Drawer.js +78 -112
- package/dist/components/Drawer/Drawer.types.d.ts +20 -4
- package/dist/components/Drawer/Drawer.utils.d.ts +0 -4
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.js +26 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.types.d.ts +20 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.js +17 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.js +9 -0
- package/dist/components/Drawer/components/DrawerHeader/index.d.ts +2 -0
- package/dist/components/Drawer/components/index.d.ts +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.cjs +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.d.ts +2 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.js +9 -0
- package/dist/components/Drawer/helpers/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/useDrawer.cjs +1 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +50 -0
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Editable/Editable.cjs +1 -1
- package/dist/components/Editable/Editable.js +1 -1
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.d.ts +8 -6
- package/dist/components/EmptyState/EmptyState.const.js +15 -8
- package/dist/components/EmptyState/EmptyState.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.js +39 -43
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
- package/dist/components/EmptyState/helpers/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/FileTree/FileTree.cjs +1 -1
- package/dist/components/FileTree/FileTree.js +1 -1
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
- package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
- package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
- package/dist/components/FloatingChat/FloatingChat.js +93 -124
- package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
- package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
- package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
- package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
- package/dist/components/FloatingChat/index.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
- package/dist/components/Gauge/Gauge.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.d.ts +5 -0
- package/dist/components/Gauge/Gauge.const.js +11 -6
- package/dist/components/Gauge/Gauge.d.ts +1 -2
- package/dist/components/Gauge/Gauge.js +69 -45
- package/dist/components/Gauge/Gauge.types.d.ts +11 -2
- package/dist/components/Gauge/helpers/GaugeLinearBar.cjs +1 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.d.ts +2 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.js +40 -0
- package/dist/components/Heatmap/Heatmap.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.d.ts +2 -0
- package/dist/components/Heatmap/Heatmap.const.js +8 -6
- package/dist/components/Heatmap/Heatmap.js +51 -47
- package/dist/components/Heatmap/Heatmap.types.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -39
- package/dist/components/Icon/Icon.types.d.ts +1 -17
- package/dist/components/Icon/icons/action.d.ts +1 -85
- package/dist/components/Icon/icons/bear.d.ts +1 -12
- package/dist/components/Icon/icons/charts.d.ts +1 -0
- package/dist/components/Icon/icons/commerce.d.ts +1 -25
- package/dist/components/Icon/icons/communication.d.ts +1 -48
- package/dist/components/Icon/icons/content.d.ts +1 -53
- package/dist/components/Icon/icons/device.d.ts +1 -27
- package/dist/components/Icon/icons/editor.d.ts +1 -54
- package/dist/components/Icon/icons/file.d.ts +1 -25
- package/dist/components/Icon/icons/index.d.ts +1 -9
- package/dist/components/Icon/icons/media.d.ts +1 -64
- package/dist/components/Icon/icons/misc.d.ts +1 -96
- package/dist/components/Icon/icons/navigation.d.ts +1 -56
- package/dist/components/Icon/icons/social.d.ts +1 -24
- package/dist/components/Icon/icons/status.d.ts +1 -61
- package/dist/components/Icon/index.d.ts +3 -605
- package/dist/components/Icon/productIcons.cjs +1 -0
- package/dist/components/Icon/productIcons.d.ts +7 -0
- package/dist/components/Icon/productIcons.js +25 -0
- package/dist/components/ImageAnnotation/ImageAnnotation.cjs +1 -1
- package/dist/components/ImageAnnotation/ImageAnnotation.js +1 -1
- package/dist/components/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/JsonViewer/JsonViewer.js +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.cjs +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.js +1 -1
- package/dist/components/MessageActions/MessageActions.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.const.js +10 -0
- package/dist/components/MessageActions/MessageActions.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.js +31 -0
- package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
- package/dist/components/MessageActions/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
- package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
- package/dist/components/ModelSelect/ModelSelect.js +41 -0
- package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
- package/dist/components/ModelSelect/index.d.ts +2 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
- package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
- package/dist/components/PageNav/PageNav.cjs +1 -1
- package/dist/components/PageNav/PageNav.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
- package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
- package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
- package/dist/components/PromptComposer/PromptComposer.js +132 -0
- package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
- package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
- package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
- package/dist/components/PromptComposer/index.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
- package/dist/components/PromptSuggestions/index.d.ts +2 -0
- package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -1
- package/dist/components/PropsPlayground/PropsPlayground.js +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.cjs +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.js +1 -1
- package/dist/components/Result/Result.utils.cjs +1 -1
- package/dist/components/Result/Result.utils.js +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.js +1 -1
- package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/IconRender.js +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +1 -1
- package/dist/components/RingProgress/RingProgress.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.d.ts +3 -0
- package/dist/components/RingProgress/RingProgress.const.js +7 -4
- package/dist/components/RingProgress/RingProgress.js +38 -37
- package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +23 -23
- package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
- package/dist/components/Select/helpers/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +16 -15
- package/dist/components/Sidebar/Sidebar.types.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.utils.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.utils.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.utils.js +11 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +55 -51
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
- package/dist/components/Skeleton/Skeleton.const.js +5 -6
- package/dist/components/Skeleton/Skeleton.js +59 -59
- package/dist/components/SliderRange/SliderRange.cjs +1 -1
- package/dist/components/SliderRange/SliderRange.js +19 -19
- package/dist/components/Sparkline/Sparkline.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.d.ts +5 -0
- package/dist/components/Sparkline/Sparkline.const.js +9 -4
- package/dist/components/Sparkline/Sparkline.d.ts +1 -2
- package/dist/components/Sparkline/Sparkline.js +75 -53
- package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
- package/dist/components/Sparkline/Sparkline.utils.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.utils.d.ts +7 -12
- package/dist/components/Sparkline/Sparkline.utils.js +33 -20
- package/dist/components/Sparkline/index.d.ts +2 -2
- package/dist/components/StatCard/StatCard.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.d.ts +0 -7
- package/dist/components/StatCard/StatCard.const.js +5 -12
- package/dist/components/StatCard/StatCard.d.ts +1 -2
- package/dist/components/StatCard/StatCard.js +48 -37
- package/dist/components/StatCard/StatCard.utils.cjs +1 -0
- package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
- package/dist/components/StatCard/StatCard.utils.js +7 -0
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
- package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
- package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
- package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
- package/dist/components/StreamingMessage/index.d.ts +2 -0
- package/dist/components/Tabs/TabList.cjs +1 -1
- package/dist/components/Tabs/TabList.js +1 -1
- package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
- package/dist/components/ThemeSwitcher/index.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
- package/dist/components/ThinkingBlock/index.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/TimelineChart/TimelineChart.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.d.ts +3 -0
- package/dist/components/TimelineChart/TimelineChart.const.js +7 -4
- package/dist/components/TimelineChart/TimelineChart.js +56 -42
- package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -1
- package/dist/components/ToolCall/ToolCall.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
- package/dist/components/ToolCall/ToolCall.const.js +17 -0
- package/dist/components/ToolCall/ToolCall.d.ts +2 -0
- package/dist/components/ToolCall/ToolCall.js +43 -0
- package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
- package/dist/components/ToolCall/index.d.ts +2 -0
- package/dist/components/Transition/Transition.const.cjs +1 -1
- package/dist/components/Transition/Transition.const.js +12 -6
- package/dist/components/Transition/Transition.types.d.ts +1 -1
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.js +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.cjs +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.js +1 -1
- package/dist/components/TreeView/TreeView.cjs +1 -1
- package/dist/components/TreeView/TreeView.js +3 -2
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.js +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +39 -11
- package/dist/components/index.js +455 -420
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +50 -0
- package/dist/constants/generals.const.js +154 -108
- package/dist/constants/keys.const.cjs +1 -1
- package/dist/constants/keys.const.js +2 -1
- package/dist/constants/numbers.const.cjs +1 -1
- package/dist/constants/numbers.const.d.ts +7 -0
- package/dist/constants/numbers.const.js +60 -52
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +19 -44
- package/dist/context/BearProvider.js +223 -208
- package/dist/context/bearProvider.types.d.ts +4 -0
- package/dist/context/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +597 -562
- package/dist/styles/_ai-chat.css +487 -0
- package/dist/styles/_base.css +2 -0
- package/dist/styles/_chart.css +144 -0
- package/dist/styles/_drawer.css +213 -0
- package/dist/styles/_effects.css +8 -4
- package/dist/styles/_overlays.css +0 -1
- package/dist/styles/_skeleton.css +90 -0
- package/dist/styles/main.css +4 -0
- package/dist/styles.css +1089 -186
- package/package.json +5 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
- package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
- package/dist/components/Icon/Icon.cjs +0 -1
- package/dist/components/Icon/Icon.const.d.ts +0 -1
- package/dist/components/Icon/Icon.js +0 -45
- package/dist/components/Icon/icons/action.cjs +0 -1
- package/dist/components/Icon/icons/action.js +0 -351
- package/dist/components/Icon/icons/bear.cjs +0 -1
- package/dist/components/Icon/icons/bear.js +0 -47
- package/dist/components/Icon/icons/commerce.cjs +0 -1
- package/dist/components/Icon/icons/commerce.js +0 -124
- package/dist/components/Icon/icons/communication.cjs +0 -1
- package/dist/components/Icon/icons/communication.js +0 -184
- package/dist/components/Icon/icons/content.cjs +0 -1
- package/dist/components/Icon/icons/content.js +0 -231
- package/dist/components/Icon/icons/device.cjs +0 -1
- package/dist/components/Icon/icons/device.js +0 -122
- package/dist/components/Icon/icons/editor.cjs +0 -1
- package/dist/components/Icon/icons/editor.js +0 -285
- package/dist/components/Icon/icons/file.cjs +0 -1
- package/dist/components/Icon/icons/file.js +0 -120
- package/dist/components/Icon/icons/media.cjs +0 -1
- package/dist/components/Icon/icons/media.js +0 -306
- package/dist/components/Icon/icons/misc.cjs +0 -1
- package/dist/components/Icon/icons/misc.js +0 -450
- package/dist/components/Icon/icons/navigation.cjs +0 -1
- package/dist/components/Icon/icons/navigation.js +0 -215
- package/dist/components/Icon/icons/social.cjs +0 -1
- package/dist/components/Icon/icons/social.js +0 -89
- package/dist/components/Icon/icons/status.cjs +0 -1
- package/dist/components/Icon/icons/status.js +0 -271
- package/dist/components/Icon/index.cjs +0 -1
- package/dist/components/Icon/index.js +0 -79
|
@@ -1,65 +1,78 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { ONE as _, ZERO as h } from "../../constants/numbers.const.js";
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
5
|
+
import { resolveBearId as O } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as P } from "../../utils/useBearId.js";
|
|
7
|
+
import { CHART as s } from "./Chart.const.js";
|
|
8
|
+
import { getStackTotal as U, getChartColor as G } from "./Chart.utils.js";
|
|
9
|
+
const Q = ($) => {
|
|
10
|
+
const {
|
|
11
|
+
data: n,
|
|
12
|
+
height: g = s.DEFAULT_HEIGHT,
|
|
13
|
+
showLabels: i = !0,
|
|
14
|
+
showValues: v = !1,
|
|
15
|
+
animated: N = !0,
|
|
16
|
+
color: b,
|
|
17
|
+
orientation: x = "vertical",
|
|
18
|
+
barRadius: r = s.DEFAULT_BAR_RADIUS,
|
|
19
|
+
barGap: f = s.DEFAULT_BAR_GAP,
|
|
20
|
+
stacked: l = !1,
|
|
21
|
+
className: k,
|
|
22
|
+
id: A,
|
|
23
|
+
testId: E,
|
|
24
|
+
...y
|
|
25
|
+
} = $, I = P("BarChart"), R = O(A, I), m = n.map((a) => U(a.stacks, a.value)), T = Math.max(...m, _), e = x === "vertical", L = {
|
|
26
|
+
"--Bear-Chart-height": `${g}px`,
|
|
27
|
+
"--Bear-Chart-gap": `${f}rem`
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ t(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
id: R,
|
|
33
|
+
"data-testid": E,
|
|
34
|
+
className: u(
|
|
35
|
+
"Bear-Chart Bear-Chart--bar",
|
|
36
|
+
e ? "Bear-Chart--vertical" : "Bear-Chart--horizontal",
|
|
37
|
+
k
|
|
38
|
+
),
|
|
39
|
+
style: L,
|
|
40
|
+
...y,
|
|
41
|
+
children: /* @__PURE__ */ t("div", { className: "Bear-Chart__track", children: n.map((a, p) => {
|
|
42
|
+
const d = l && a.stacks && a.stacks.length > h ? a.stacks : [a.value], o = m[p], S = {
|
|
43
|
+
"--Bear-Chart-size": `${o / T * s.VIEWBOX}%`
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ F("div", { className: "Bear-Chart__col", children: [
|
|
46
|
+
i && !e && /* @__PURE__ */ t("span", { className: "Bear-Chart__label", children: a.label }),
|
|
47
|
+
/* @__PURE__ */ t("div", { className: "Bear-Chart__plot", children: /* @__PURE__ */ t(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: u("Bear-Chart__stack", N && (e ? "animate-grow-up" : "animate-grow-right")),
|
|
51
|
+
style: S,
|
|
52
|
+
children: d.map((V, c) => {
|
|
53
|
+
const w = o > h ? V / o * s.VIEWBOX : h, z = c === h, B = c === d.length - _, C = l ? e ? B ? `${r}px ${r}px 0 0` : "0" : B ? `0 ${r}px ${r}px 0` : "0" : e ? `${r}px ${r}px 0 0` : `0 ${r}px ${r}px 0`, D = {
|
|
54
|
+
"--Bear-Chart-segment": `${w}%`,
|
|
55
|
+
"--Bear-Chart-color": G(l ? c : p, a.color || b),
|
|
56
|
+
"--Bear-Chart-radius": C
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ t(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: "Bear-Chart__segment",
|
|
62
|
+
style: D
|
|
63
|
+
},
|
|
64
|
+
`${a.label}-${c}`
|
|
65
|
+
);
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
) }),
|
|
69
|
+
v && /* @__PURE__ */ t("span", { className: "Bear-Chart__value", children: o }),
|
|
70
|
+
i && e && /* @__PURE__ */ t("span", { className: "Bear-Chart__label", children: a.label })
|
|
71
|
+
] }, a.label);
|
|
72
|
+
}) })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
62
75
|
};
|
|
63
76
|
export {
|
|
64
|
-
|
|
77
|
+
Q as BarChart
|
|
65
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const A=require("../../utils/generateBearId.utils.cjs"),c=require("../../utils/useBearId.cjs"),a=require("./BarChart.cjs"),s=require("./LineChart.cjs"),n=require("./PieChart.cjs"),E=require("./RadarChart.cjs"),d=require("./FunnelChart.cjs"),e=require("./Chart.const.cjs"),C={[e.CHART_TYPES.BAR]:r=>t.jsx(a.BarChart,{...r}),[e.CHART_TYPES.STACKED]:r=>t.jsx(a.BarChart,{...r,stacked:!0}),[e.CHART_TYPES.LINE]:r=>t.jsx(s.LineChart,{...r}),[e.CHART_TYPES.AREA]:r=>t.jsx(s.LineChart,{...r,fill:!0}),[e.CHART_TYPES.PIE]:r=>t.jsx(n.PieChart,{...r}),[e.CHART_TYPES.DONUT]:r=>t.jsx(n.PieChart,{...r,innerRadius:e.CHART.DEFAULT_INNER_RADIUS}),[e.CHART_TYPES.RADAR]:r=>t.jsx(E.RadarChart,{...r}),[e.CHART_TYPES.FUNNEL]:r=>t.jsx(d.FunnelChart,{...r})},h=r=>{const{type:R=e.CHART_TYPES.BAR,id:i,...T}=r,o=c.useBearId("Chart"),u=A.resolveBearId(i,o);return(C[R]??C[e.CHART_TYPES.BAR])({...T,id:u})};exports.Chart=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={DEFAULT_HEIGHT:200,DEFAULT_BAR_RADIUS:4,DEFAULT_BAR_GAP:.2,DEFAULT_STROKE_WIDTH:2,DEFAULT_INNER_RADIUS:.6,DEFAULT_START_ANGLE:-90,DEFAULT_PAD_ANGLE:2,OUTER_RADIUS:45,CENTER:50,HALF_SWEEP:180,FULL_SWEEP:360,EXPLODE_OFFSET:4,ROSE_MIN_RADIUS:14,RADAR_RINGS:4,RADAR_LABEL_OFFSET:8,FUNNEL_MIN_WIDTH:18,SLICE_DELAY_MS:100,DOT_RADIUS:1.5,VIEWBOX:100,LINE_Y_RANGE:80,LINE_Y_PAD:10,BEZIER_DIVISOR:3,LARGE_ARC_THRESHOLD:180,HALF_PIE_START:-180},_={BAR:"bar",LINE:"line",AREA:"area",PIE:"pie",DONUT:"donut",RADAR:"radar",FUNNEL:"funnel",STACKED:"stacked"},A="full",R="half",T="rose",L="bottom",I="none",D=["#ec4899","#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#06b6d4","#84cc16"];exports.CHART=E;exports.CHART_LEGEND_BOTTOM=L;exports.CHART_LEGEND_NONE=I;exports.CHART_TYPES=_;exports.DEFAULT_COLORS=D;exports.PIE_VIEW_FULL=A;exports.PIE_VIEW_HALF=R;exports.PIE_VIEW_ROSE=T;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chart constants
|
|
3
|
-
*/
|
|
4
1
|
export declare const CHART: {
|
|
5
2
|
readonly DEFAULT_HEIGHT: 200;
|
|
6
3
|
readonly DEFAULT_BAR_RADIUS: 4;
|
|
@@ -11,6 +8,21 @@ export declare const CHART: {
|
|
|
11
8
|
readonly DEFAULT_PAD_ANGLE: 2;
|
|
12
9
|
readonly OUTER_RADIUS: 45;
|
|
13
10
|
readonly CENTER: 50;
|
|
11
|
+
readonly HALF_SWEEP: 180;
|
|
12
|
+
readonly FULL_SWEEP: 360;
|
|
13
|
+
readonly EXPLODE_OFFSET: 4;
|
|
14
|
+
readonly ROSE_MIN_RADIUS: 14;
|
|
15
|
+
readonly RADAR_RINGS: 4;
|
|
16
|
+
readonly RADAR_LABEL_OFFSET: 8;
|
|
17
|
+
readonly FUNNEL_MIN_WIDTH: 18;
|
|
18
|
+
readonly SLICE_DELAY_MS: 100;
|
|
19
|
+
readonly DOT_RADIUS: 1.5;
|
|
20
|
+
readonly VIEWBOX: 100;
|
|
21
|
+
readonly LINE_Y_RANGE: 80;
|
|
22
|
+
readonly LINE_Y_PAD: 10;
|
|
23
|
+
readonly BEZIER_DIVISOR: 3;
|
|
24
|
+
readonly LARGE_ARC_THRESHOLD: 180;
|
|
25
|
+
readonly HALF_PIE_START: -180;
|
|
14
26
|
};
|
|
15
27
|
export declare const CHART_TYPES: {
|
|
16
28
|
readonly BAR: "bar";
|
|
@@ -18,5 +30,14 @@ export declare const CHART_TYPES: {
|
|
|
18
30
|
readonly AREA: "area";
|
|
19
31
|
readonly PIE: "pie";
|
|
20
32
|
readonly DONUT: "donut";
|
|
33
|
+
readonly RADAR: "radar";
|
|
34
|
+
readonly FUNNEL: "funnel";
|
|
35
|
+
readonly STACKED: "stacked";
|
|
21
36
|
};
|
|
37
|
+
export declare const PIE_VIEW_FULL = "full";
|
|
38
|
+
export declare const PIE_VIEW_HALF = "half";
|
|
39
|
+
export declare const PIE_VIEW_ROSE = "rose";
|
|
40
|
+
export declare const CHART_LEGEND_RIGHT = "right";
|
|
41
|
+
export declare const CHART_LEGEND_BOTTOM = "bottom";
|
|
42
|
+
export declare const CHART_LEGEND_NONE = "none";
|
|
22
43
|
export declare const DEFAULT_COLORS: readonly ["#ec4899", "#8b5cf6", "#3b82f6", "#10b981", "#f59e0b", "#ef4444", "#06b6d4", "#84cc16"];
|
|
@@ -1,31 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const E = {
|
|
2
|
+
DEFAULT_HEIGHT: 200,
|
|
3
|
+
DEFAULT_BAR_RADIUS: 4,
|
|
4
|
+
DEFAULT_BAR_GAP: 0.2,
|
|
5
|
+
DEFAULT_STROKE_WIDTH: 2,
|
|
6
|
+
DEFAULT_INNER_RADIUS: 0.6,
|
|
7
|
+
DEFAULT_START_ANGLE: -90,
|
|
8
|
+
DEFAULT_PAD_ANGLE: 2,
|
|
9
|
+
OUTER_RADIUS: 45,
|
|
10
|
+
CENTER: 50,
|
|
11
|
+
HALF_SWEEP: 180,
|
|
12
|
+
FULL_SWEEP: 360,
|
|
13
|
+
EXPLODE_OFFSET: 4,
|
|
14
|
+
ROSE_MIN_RADIUS: 14,
|
|
15
|
+
RADAR_RINGS: 4,
|
|
16
|
+
RADAR_LABEL_OFFSET: 8,
|
|
17
|
+
FUNNEL_MIN_WIDTH: 18,
|
|
18
|
+
SLICE_DELAY_MS: 100,
|
|
19
|
+
DOT_RADIUS: 1.5,
|
|
20
|
+
VIEWBOX: 100,
|
|
21
|
+
LINE_Y_RANGE: 80,
|
|
22
|
+
LINE_Y_PAD: 10,
|
|
23
|
+
BEZIER_DIVISOR: 3,
|
|
24
|
+
LARGE_ARC_THRESHOLD: 180,
|
|
25
|
+
HALF_PIE_START: -180
|
|
26
|
+
}, _ = {
|
|
4
27
|
BAR: "bar",
|
|
5
28
|
LINE: "line",
|
|
6
29
|
AREA: "area",
|
|
7
30
|
PIE: "pie",
|
|
8
|
-
DONUT: "donut"
|
|
9
|
-
|
|
31
|
+
DONUT: "donut",
|
|
32
|
+
RADAR: "radar",
|
|
33
|
+
FUNNEL: "funnel",
|
|
34
|
+
STACKED: "stacked"
|
|
35
|
+
}, A = "full", R = "half", L = "rose", T = "bottom", D = "none", I = [
|
|
10
36
|
"#ec4899",
|
|
11
|
-
// pink
|
|
12
37
|
"#8b5cf6",
|
|
13
|
-
// purple
|
|
14
38
|
"#3b82f6",
|
|
15
|
-
// blue
|
|
16
39
|
"#10b981",
|
|
17
|
-
// emerald
|
|
18
40
|
"#f59e0b",
|
|
19
|
-
// amber
|
|
20
41
|
"#ef4444",
|
|
21
|
-
// red
|
|
22
42
|
"#06b6d4",
|
|
23
|
-
// cyan
|
|
24
43
|
"#84cc16"
|
|
25
|
-
// lime
|
|
26
44
|
];
|
|
27
45
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
E as CHART,
|
|
47
|
+
T as CHART_LEGEND_BOTTOM,
|
|
48
|
+
D as CHART_LEGEND_NONE,
|
|
49
|
+
_ as CHART_TYPES,
|
|
50
|
+
I as DEFAULT_COLORS,
|
|
51
|
+
A as PIE_VIEW_FULL,
|
|
52
|
+
R as PIE_VIEW_HALF,
|
|
53
|
+
L as PIE_VIEW_ROSE
|
|
31
54
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { resolveBearId as s } from "../../utils/generateBearId.utils.js";
|
|
4
|
+
import { useBearId as C } from "../../utils/useBearId.js";
|
|
5
|
+
import { BarChart as e } from "./BarChart.js";
|
|
6
|
+
import { LineChart as m } from "./LineChart.js";
|
|
7
|
+
import { PieChart as i } from "./PieChart.js";
|
|
8
|
+
import { RadarChart as E } from "./RadarChart.js";
|
|
9
|
+
import { FunnelChart as f } from "./FunnelChart.js";
|
|
10
|
+
import { CHART_TYPES as t, CHART as c } from "./Chart.const.js";
|
|
11
|
+
const a = {
|
|
12
|
+
[t.BAR]: (r) => /* @__PURE__ */ o(e, { ...r }),
|
|
13
|
+
[t.STACKED]: (r) => /* @__PURE__ */ o(e, { ...r, stacked: !0 }),
|
|
14
|
+
[t.LINE]: (r) => /* @__PURE__ */ o(m, { ...r }),
|
|
15
|
+
[t.AREA]: (r) => /* @__PURE__ */ o(m, { ...r, fill: !0 }),
|
|
16
|
+
[t.PIE]: (r) => /* @__PURE__ */ o(i, { ...r }),
|
|
17
|
+
[t.DONUT]: (r) => /* @__PURE__ */ o(i, { ...r, innerRadius: c.DEFAULT_INNER_RADIUS }),
|
|
18
|
+
[t.RADAR]: (r) => /* @__PURE__ */ o(E, { ...r }),
|
|
19
|
+
[t.FUNNEL]: (r) => /* @__PURE__ */ o(f, { ...r })
|
|
20
|
+
}, U = (r) => {
|
|
21
|
+
const { type: R = t.BAR, id: n, ...d } = r, p = C("Chart"), A = s(n, p);
|
|
22
|
+
return (a[R] ?? a[t.BAR])({ ...d, id: A });
|
|
24
23
|
};
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
U as Chart
|
|
27
26
|
};
|
|
@@ -1,53 +1,43 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut';
|
|
2
|
+
export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut' | 'radar' | 'funnel' | 'stacked';
|
|
3
|
+
export type PieView = 'full' | 'half' | 'rose';
|
|
4
|
+
export type ChartLegendPosition = 'right' | 'bottom' | 'none';
|
|
3
5
|
export interface ChartDataPoint {
|
|
4
6
|
label: string;
|
|
5
7
|
value: number;
|
|
6
8
|
color?: string;
|
|
9
|
+
stacks?: number[];
|
|
7
10
|
}
|
|
8
11
|
export interface ChartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
9
12
|
testId?: string;
|
|
10
|
-
|
|
11
|
-
type: ChartType;
|
|
12
|
-
/** Data points */
|
|
13
|
+
type?: ChartType;
|
|
13
14
|
data: ChartDataPoint[];
|
|
14
|
-
/** Chart height */
|
|
15
15
|
height?: number;
|
|
16
|
-
/** Show labels */
|
|
17
16
|
showLabels?: boolean;
|
|
18
|
-
/** Show values */
|
|
19
17
|
showValues?: boolean;
|
|
20
|
-
/** Animate on render */
|
|
21
18
|
animated?: boolean;
|
|
22
|
-
/** Primary color (used for single-color charts) */
|
|
23
19
|
color?: string;
|
|
24
|
-
/** Show grid lines */
|
|
25
20
|
showGrid?: boolean;
|
|
21
|
+
pieView?: PieView;
|
|
22
|
+
explodeIndex?: number;
|
|
23
|
+
legendPosition?: ChartLegendPosition;
|
|
24
|
+
stepped?: boolean;
|
|
25
|
+
stacked?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export interface BarChartProps extends Omit<ChartProps, 'type'> {
|
|
28
|
-
/** Bar orientation */
|
|
29
28
|
orientation?: 'vertical' | 'horizontal';
|
|
30
|
-
/** Bar border radius */
|
|
31
29
|
barRadius?: number;
|
|
32
|
-
/** Gap between bars (0-1) */
|
|
33
30
|
barGap?: number;
|
|
34
31
|
}
|
|
35
32
|
export interface LineChartProps extends Omit<ChartProps, 'type'> {
|
|
36
|
-
/** Show area fill */
|
|
37
33
|
fill?: boolean;
|
|
38
|
-
/** Line width */
|
|
39
34
|
strokeWidth?: number;
|
|
40
|
-
/** Show dots at data points */
|
|
41
35
|
showDots?: boolean;
|
|
42
|
-
/** Smooth curve */
|
|
43
36
|
smooth?: boolean;
|
|
44
37
|
}
|
|
45
38
|
export interface PieChartProps extends Omit<ChartProps, 'type'> {
|
|
46
|
-
/** Inner radius for donut chart (0-1) */
|
|
47
39
|
innerRadius?: number;
|
|
48
|
-
/** Start angle in degrees */
|
|
49
40
|
startAngle?: number;
|
|
50
|
-
/** Padding between slices */
|
|
51
41
|
padAngle?: number;
|
|
52
42
|
onSliceClick?: (item: ChartDataPoint, index: number) => void;
|
|
53
43
|
onSliceHover?: (item: ChartDataPoint | null, index: number | null) => void;
|
|
@@ -56,3 +46,5 @@ export interface PieChartProps extends Omit<ChartProps, 'type'> {
|
|
|
56
46
|
sliceTooltipDescription?: (item: ChartDataPoint, index: number) => ReactNode;
|
|
57
47
|
sliceTooltipContent?: (item: ChartDataPoint, index: number) => ReactNode;
|
|
58
48
|
}
|
|
49
|
+
export type RadarChartProps = Omit<ChartProps, 'type'>;
|
|
50
|
+
export type FunnelChartProps = Omit<ChartProps, 'type'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/numbers.const.cjs"),a=require("./Chart.const.cjs"),x=(r,c)=>c||a.DEFAULT_COLORS[r%a.DEFAULT_COLORS.length],o=(r,c,$=a.CHART.CENTER)=>{const t=r*Math.PI/a.CHART.HALF_SWEEP;return{x:$+c*Math.cos(t),y:$+c*Math.sin(t)}},T=(r,c)=>{const $=r*Math.PI/a.CHART.HALF_SWEEP;return{x:c*Math.cos($),y:c*Math.sin($)}},A=(r,c,$=E.ZERO,t=a.CHART.OUTER_RADIUS)=>{const e=$*t,n=o(r,t),R=o(c,t),O=o(r,e),s=o(c,e),C=c-r>a.CHART.LARGE_ARC_THRESHOLD?E.ONE:E.ZERO;return $>E.ZERO?`M ${n.x},${n.y} A ${t},${t} 0 ${C},1 ${R.x},${R.y} L ${s.x},${s.y} A ${e},${e} 0 ${C},0 ${O.x},${O.y} Z`:`M ${a.CHART.CENTER},${a.CHART.CENTER} L ${n.x},${n.y} A ${t},${t} 0 ${C},1 ${R.x},${R.y} Z`},l=(r,c=!0,$=!1)=>r.length===E.ZERO?"":$?r.reduce((t,e,n,R)=>{if(n===E.ZERO)return`M ${e.x},${e.y}`;const O=R[n-E.ONE];return`${t} L ${e.x},${O.y} L ${e.x},${e.y}`},""):c?r.reduce((t,e,n,R)=>{if(n===E.ZERO)return`M ${e.x},${e.y}`;const O=R[n-E.ONE],s=O.x+(e.x-O.x)/a.CHART.BEZIER_DIVISOR,C=e.x-(e.x-O.x)/a.CHART.BEZIER_DIVISOR;return`${t} C ${s},${O.y} ${C},${e.y} ${e.x},${e.y}`},""):r.reduce((t,e,n)=>`${t} ${n===E.ZERO?"M":"L"} ${e.x},${e.y}`,""),u=r=>{const c=Math.max(...r.map(n=>n.value)),$=Math.min(...r.map(n=>n.value)),t=c-$||E.ONE,e=r.length-E.ONE||E.ONE;return r.map((n,R)=>({x:R/e*a.CHART.VIEWBOX,y:a.CHART.VIEWBOX-(n.value-$)/t*a.CHART.LINE_Y_RANGE-a.CHART.LINE_Y_PAD}))},h=(r,c)=>!r||r.length===E.ZERO?c:r.reduce(($,t)=>$+t,E.ZERO);exports.calculateLinePoints=u;exports.createArcPath=A;exports.generateLinePath=l;exports.getChartColor=x;exports.getStackTotal=h;exports.polarOffset=T;exports.polarToCartesian=o;
|
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get color for chart element by index
|
|
3
|
-
*/
|
|
4
1
|
export declare const getChartColor: (index: number, customColor?: string) => string;
|
|
5
|
-
|
|
6
|
-
* Convert polar coordinates to cartesian
|
|
7
|
-
*/
|
|
8
|
-
export declare const polarToCartesian: (angle: number, radius: number) => {
|
|
2
|
+
export declare const polarToCartesian: (angle: number, radius: number, center?: number) => {
|
|
9
3
|
x: number;
|
|
10
4
|
y: number;
|
|
11
5
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Generate smooth bezier line path
|
|
18
|
-
*/
|
|
6
|
+
export declare const polarOffset: (angle: number, distance: number) => {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const createArcPath: (startAngle: number, endAngle: number, innerRadius?: number, outerRadius?: number) => string;
|
|
19
11
|
export declare const generateLinePath: (points: Array<{
|
|
20
12
|
x: number;
|
|
21
13
|
y: number;
|
|
22
|
-
}>, smooth?: boolean) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Calculate line chart points from data
|
|
25
|
-
*/
|
|
14
|
+
}>, smooth?: boolean, stepped?: boolean) => string;
|
|
26
15
|
export declare const calculateLinePoints: (data: Array<{
|
|
27
16
|
value: number;
|
|
28
17
|
}>) => Array<{
|
|
29
18
|
x: number;
|
|
30
19
|
y: number;
|
|
31
20
|
}>;
|
|
21
|
+
export declare const getStackTotal: (stacks: number[] | undefined, value: number) => number;
|
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ZERO as y, ONE as o } from "../../constants/numbers.const.js";
|
|
2
|
+
import { DEFAULT_COLORS as L, CHART as x } from "./Chart.const.js";
|
|
3
|
+
const M = ($, n) => n || L[$ % L.length], h = ($, n, c = x.CENTER) => {
|
|
4
|
+
const e = $ * Math.PI / x.HALF_SWEEP;
|
|
5
|
+
return {
|
|
6
|
+
x: c + n * Math.cos(e),
|
|
7
|
+
y: c + n * Math.sin(e)
|
|
8
|
+
};
|
|
9
|
+
}, f = ($, n) => {
|
|
10
|
+
const c = $ * Math.PI / x.HALF_SWEEP;
|
|
11
|
+
return {
|
|
12
|
+
x: n * Math.cos(c),
|
|
13
|
+
y: n * Math.sin(c)
|
|
14
|
+
};
|
|
15
|
+
}, _ = ($, n, c = y, e = x.OUTER_RADIUS) => {
|
|
16
|
+
const r = c * e, t = h($, e), E = h(n, e), a = h($, r), I = h(n, r), s = n - $ > x.LARGE_ARC_THRESHOLD ? o : y;
|
|
17
|
+
return c > y ? `M ${t.x},${t.y} A ${e},${e} 0 ${s},1 ${E.x},${E.y} L ${I.x},${I.y} A ${r},${r} 0 ${s},0 ${a.x},${a.y} Z` : `M ${x.CENTER},${x.CENTER} L ${t.x},${t.y} A ${e},${e} 0 ${s},1 ${E.x},${E.y} Z`;
|
|
18
|
+
}, m = ($, n = !0, c = !1) => $.length === y ? "" : c ? $.reduce((e, r, t, E) => {
|
|
19
|
+
if (t === y) return `M ${r.x},${r.y}`;
|
|
20
|
+
const a = E[t - o];
|
|
21
|
+
return `${e} L ${r.x},${a.y} L ${r.x},${r.y}`;
|
|
22
|
+
}, "") : n ? $.reduce((e, r, t, E) => {
|
|
23
|
+
if (t === y) return `M ${r.x},${r.y}`;
|
|
24
|
+
const a = E[t - o], I = a.x + (r.x - a.x) / x.BEZIER_DIVISOR, s = r.x - (r.x - a.x) / x.BEZIER_DIVISOR;
|
|
25
|
+
return `${e} C ${I},${a.y} ${s},${r.y} ${r.x},${r.y}`;
|
|
26
|
+
}, "") : $.reduce((e, r, t) => `${e} ${t === y ? "M" : "L"} ${r.x},${r.y}`, ""), O = ($) => {
|
|
27
|
+
const n = Math.max(...$.map((t) => t.value)), c = Math.min(...$.map((t) => t.value)), e = n - c || o, r = $.length - o || o;
|
|
28
|
+
return $.map((t, E) => ({
|
|
29
|
+
x: E / r * x.VIEWBOX,
|
|
30
|
+
y: x.VIEWBOX - (t.value - c) / e * x.LINE_Y_RANGE - x.LINE_Y_PAD
|
|
31
|
+
}));
|
|
32
|
+
}, A = ($, n) => !$ || $.length === y ? n : $.reduce((c, e) => c + e, y);
|
|
3
33
|
export {
|
|
4
|
-
|
|
34
|
+
O as calculateLinePoints,
|
|
35
|
+
_ as createArcPath,
|
|
36
|
+
m as generateLinePath,
|
|
37
|
+
M as getChartColor,
|
|
38
|
+
A as getStackTotal,
|
|
39
|
+
f as polarOffset,
|
|
40
|
+
h as polarToCartesian
|
|
5
41
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("../../constants/numbers.const.cjs"),s=require("../../utils/cn.cjs");require("react");const N=require("../../utils/generateBearId.utils.cjs"),_=require("../../utils/useBearId.cjs"),b=require("../Box/Box.cjs"),o=require("../Flex/Flex.cjs"),F=require("../Typography/Typography.cjs"),t=require("./Chart.const.cjs"),j=require("./Chart.utils.cjs"),E=l=>{const{data:a,height:c=t.CHART.DEFAULT_HEIGHT,showLabels:u=!0,showValues:i=!0,animated:h=!0,color:d,className:C,id:g,testId:m,...x}=l,B=_.useBearId("FunnelChart"),p=N.resolveBearId(g,B),I=Math.max(...a.map(e=>e.value),n.ONE),q={"--Bear-Chart-height":`${c}px`};return r.jsx(o.Flex,{id:p,"data-testid":m,direction:"column",gap:1,justify:"center",className:s.cn("Bear-Chart Bear-Chart--funnel",C),style:q,...x,children:a.map((e,y)=>{const T={"--Bear-Chart-size":`${Math.max(e.value/I*t.CHART.VIEWBOX,t.CHART.FUNNEL_MIN_WIDTH)}%`,"--Bear-Chart-step-height":`${t.CHART.VIEWBOX/Math.max(a.length,n.ONE)/2}%`,"--Bear-Chart-color":j.getChartColor(y,e.color||d)};return r.jsxs(o.Flex,{direction:"column",align:"center",gap:1,className:"bear-w-full",children:[r.jsx(b.Box,{className:s.cn("Bear-Chart__funnel-step bear-rounded-md",h&&"animate-grow-right"),style:T}),u&&r.jsxs(F.Typography,{variant:"caption",color:"muted",children:[e.label,i?` · ${e.value}`:""]})]},e.label)})})};exports.FunnelChart=E;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { ONE as l } from "../../constants/numbers.const.js";
|
|
3
|
+
import { cn as n } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as E } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as b } from "../../utils/useBearId.js";
|
|
7
|
+
import { Box as v } from "../Box/Box.js";
|
|
8
|
+
import { Flex as s } from "../Flex/Flex.js";
|
|
9
|
+
import { Typography as F } from "../Typography/Typography.js";
|
|
10
|
+
import { CHART as t } from "./Chart.const.js";
|
|
11
|
+
import { getChartColor as T } from "./Chart.utils.js";
|
|
12
|
+
const S = (m) => {
|
|
13
|
+
const {
|
|
14
|
+
data: e,
|
|
15
|
+
height: i = t.DEFAULT_HEIGHT,
|
|
16
|
+
showLabels: c = !0,
|
|
17
|
+
showValues: h = !0,
|
|
18
|
+
animated: d = !0,
|
|
19
|
+
color: p,
|
|
20
|
+
className: u,
|
|
21
|
+
id: f,
|
|
22
|
+
testId: g,
|
|
23
|
+
...B
|
|
24
|
+
} = m, C = b("FunnelChart"), x = E(f, C), I = Math.max(...e.map((r) => r.value), l), N = { "--Bear-Chart-height": `${i}px` };
|
|
25
|
+
return /* @__PURE__ */ a(
|
|
26
|
+
s,
|
|
27
|
+
{
|
|
28
|
+
id: x,
|
|
29
|
+
"data-testid": g,
|
|
30
|
+
direction: "column",
|
|
31
|
+
gap: 1,
|
|
32
|
+
justify: "center",
|
|
33
|
+
className: n("Bear-Chart Bear-Chart--funnel", u),
|
|
34
|
+
style: N,
|
|
35
|
+
...B,
|
|
36
|
+
children: e.map((r, y) => {
|
|
37
|
+
const w = {
|
|
38
|
+
"--Bear-Chart-size": `${Math.max(r.value / I * t.VIEWBOX, t.FUNNEL_MIN_WIDTH)}%`,
|
|
39
|
+
"--Bear-Chart-step-height": `${t.VIEWBOX / Math.max(e.length, l) / 2}%`,
|
|
40
|
+
"--Bear-Chart-color": T(y, r.color || p)
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ o(s, { direction: "column", align: "center", gap: 1, className: "bear-w-full", children: [
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
|
+
v,
|
|
45
|
+
{
|
|
46
|
+
className: n("Bear-Chart__funnel-step bear-rounded-md", d && "animate-grow-right"),
|
|
47
|
+
style: w
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
c && /* @__PURE__ */ o(F, { variant: "caption", color: "muted", children: [
|
|
51
|
+
r.label,
|
|
52
|
+
h ? ` · ${r.value}` : ""
|
|
53
|
+
] })
|
|
54
|
+
] }, r.label);
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
S as FunnelChart
|
|
61
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../constants/numbers.const.cjs"),r=require("../../utils/cn.cjs");require("react");const O=require("../../utils/generateBearId.utils.cjs"),b=require("../../utils/useBearId.cjs"),t=require("./Chart.const.cjs"),C=require("./Chart.utils.cjs"),$=I=>{const{data:n,height:T=t.CHART.DEFAULT_HEIGHT,showLabels:x=!0,showDots:B=!0,smooth:j=!0,fill:_=!1,stepped:d=!1,strokeWidth:f=t.CHART.DEFAULT_STROKE_WIDTH,color:a="var(--bear-primary-500, #ec4899)",animated:i=!0,className:y,id:R,testId:g,...A}=I,L=b.useBearId("LineChart"),h=O.resolveBearId(R,L),u=`${h}-gradient`,o=C.calculateLinePoints(n),p=C.generateLinePath(o,j&&!d,d),E=o.length===c.ZERO?"":`${p} L ${t.CHART.VIEWBOX},${t.CHART.VIEWBOX} L 0,${t.CHART.VIEWBOX} Z`,H={"--Bear-Chart-height":`${T}px`};return e.jsxs("div",{id:h,"data-testid":g,className:r.cn("Bear-Chart Bear-Chart--line",y),style:H,...A,children:[e.jsxs("svg",{viewBox:`0 0 ${t.CHART.VIEWBOX} ${t.CHART.VIEWBOX}`,preserveAspectRatio:"none",className:"Bear-Chart__svg",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:u,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:"0.3"}),e.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:"0"})]})}),_&&e.jsx("path",{d:E,fill:`url(#${u})`,className:r.cn(i&&"animate-fade-in")}),e.jsx("path",{d:p,fill:"none",stroke:a,strokeWidth:f/c.TEN,strokeLinecap:"round",strokeLinejoin:"round",className:r.cn(i&&"animate-draw-line")}),B&&o.map((s,l)=>{var m;return e.jsx("circle",{cx:s.x,cy:s.y,r:t.CHART.DOT_RADIUS,fill:a,className:r.cn(i&&"animate-scale-in"),style:{animationDelay:`${l*c.FIFTY}ms`}},((m=n[l])==null?void 0:m.label)??l)})]}),x&&e.jsx("div",{className:"Bear-Chart__labels",children:n.map(s=>e.jsx("span",{className:"Bear-Chart__label",children:s.label},s.label))})]})};exports.LineChart=$;
|