@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,45 +1,34 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ChatMessage } from '../Chat/Chat.types';
|
|
2
|
+
import { ChatMessage, ChatTranslations } from '../Chat/Chat.types';
|
|
3
|
+
export interface FloatingChatTranslations extends ChatTranslations {
|
|
4
|
+
closeLabel: string;
|
|
5
|
+
openLabel: string;
|
|
6
|
+
}
|
|
3
7
|
export interface FloatingChatProps {
|
|
4
8
|
id?: string;
|
|
5
|
-
|
|
9
|
+
testId?: string;
|
|
6
10
|
messages: ChatMessage[];
|
|
7
|
-
/** Callback when user sends a message */
|
|
8
11
|
onSend?: (message: string) => void;
|
|
9
|
-
|
|
12
|
+
onStop?: () => void;
|
|
13
|
+
onAttach?: (files: File[]) => void;
|
|
10
14
|
isLoading?: boolean;
|
|
11
|
-
|
|
15
|
+
isStreaming?: boolean;
|
|
12
16
|
isTyping?: boolean;
|
|
13
|
-
/** Chat title */
|
|
14
17
|
title?: string;
|
|
15
|
-
/** Chat subtitle */
|
|
16
18
|
subtitle?: string;
|
|
17
|
-
/** Avatar URL */
|
|
18
19
|
avatar?: string;
|
|
19
|
-
/** Position on screen */
|
|
20
20
|
position?: 'bottom-right' | 'bottom-left';
|
|
21
|
-
/** Distance from bottom */
|
|
22
21
|
bottom?: number;
|
|
23
|
-
/** Distance from side */
|
|
24
22
|
side?: number;
|
|
25
|
-
/** Initial open state */
|
|
26
23
|
defaultOpen?: boolean;
|
|
27
|
-
/** Controlled open state */
|
|
28
24
|
open?: boolean;
|
|
29
|
-
/** Callback when open state changes */
|
|
30
25
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
/** Custom trigger button */
|
|
32
26
|
trigger?: ReactNode;
|
|
33
|
-
/** Badge count (e.g., unread messages) */
|
|
34
27
|
badgeCount?: number;
|
|
35
|
-
/** Header content */
|
|
36
28
|
header?: ReactNode;
|
|
37
|
-
/** Welcome message */
|
|
38
29
|
welcomeMessage?: string;
|
|
39
|
-
/** Show powered by */
|
|
40
30
|
poweredBy?: string;
|
|
41
|
-
|
|
31
|
+
allowAttach?: boolean;
|
|
42
32
|
className?: string;
|
|
43
|
-
|
|
44
|
-
testId?: string;
|
|
33
|
+
translations?: Partial<FloatingChatTranslations>;
|
|
45
34
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/generals.const.cjs"),e=require("./FloatingChat.const.cjs"),T=(t,_)=>({[e.FLOATING_CHAT_BOTTOM_VAR]:`${t}${r.UNIT_PX}`,[e.FLOATING_CHAT_SIDE_VAR]:`${_}${r.UNIT_PX}`,[e.FLOATING_CHAT_WIDTH_VAR]:`${e.CHAT_WINDOW_SIZE.width}${r.UNIT_PX}`,[e.FLOATING_CHAT_HEIGHT_VAR]:`${e.CHAT_WINDOW_SIZE.height}${r.UNIT_PX}`}),o=(t,_)=>t>_?`${_}+`:String(t);exports.resolveFloatingChatBadge=o;exports.resolveFloatingChatVars=T;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UNIT_PX as r } from "../../constants/generals.const.js";
|
|
2
|
+
import { CHAT_WINDOW_SIZE as t, FLOATING_CHAT_HEIGHT_VAR as A, FLOATING_CHAT_WIDTH_VAR as o, FLOATING_CHAT_SIDE_VAR as I, FLOATING_CHAT_BOTTOM_VAR as e } from "./FloatingChat.const.js";
|
|
3
|
+
const H = (_, T) => ({
|
|
4
|
+
[e]: `${_}${r}`,
|
|
5
|
+
[I]: `${T}${r}`,
|
|
6
|
+
[o]: `${t.width}${r}`,
|
|
7
|
+
[A]: `${t.height}${r}`
|
|
8
|
+
}), C = (_, T) => _ > T ? `${T}+` : String(_);
|
|
9
|
+
export {
|
|
10
|
+
C as resolveFloatingChatBadge,
|
|
11
|
+
H as resolveFloatingChatVars
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Avatar/Avatar.cjs");require("react");const r=require("../../Box/Box.cjs"),h=require("../../CloseButton/CloseButton.cjs"),g=require("../../Flex/Flex.cjs"),s=require("../../Typography/Typography.cjs"),x=i=>{const{header:a,title:t,subtitle:l,avatar:n,closeLabel:o,onClose:c}=i;return a?e.jsx(r.Box,{className:"Bear-FloatingChat__header",children:a}):e.jsxs(g.Flex,{className:"Bear-FloatingChat__header",align:"center",gap:3,children:[e.jsx(u.Avatar,{src:n,initials:t[0],size:"sm"}),e.jsxs(r.Box,{children:[e.jsx(s.Typography,{variant:"subtitle2",className:"Bear-FloatingChat__title",children:t}),e.jsx(s.Typography,{variant:"caption",className:"Bear-FloatingChat__subtitle",children:l})]}),e.jsx(h.CloseButton,{"aria-label":o,onClick:c})]})};exports.FloatingChatHeader=x;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FloatingChatProps } from '../FloatingChat.types';
|
|
2
|
+
export declare const FloatingChatHeader: (props: {
|
|
3
|
+
header?: FloatingChatProps["header"];
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
closeLabel: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as h } from "../../Avatar/Avatar.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Box as i } from "../../Box/Box.js";
|
|
5
|
+
import { CloseButton as p } from "../../CloseButton/CloseButton.js";
|
|
6
|
+
import { Flex as d } from "../../Flex/Flex.js";
|
|
7
|
+
import { Typography as o } from "../../Typography/Typography.js";
|
|
8
|
+
const b = (l) => {
|
|
9
|
+
const { header: t, title: r, subtitle: n, avatar: s, closeLabel: m, onClose: c } = l;
|
|
10
|
+
return t ? /* @__PURE__ */ a(i, { className: "Bear-FloatingChat__header", children: t }) : /* @__PURE__ */ e(d, { className: "Bear-FloatingChat__header", align: "center", gap: 3, children: [
|
|
11
|
+
/* @__PURE__ */ a(h, { src: s, initials: r[0], size: "sm" }),
|
|
12
|
+
/* @__PURE__ */ e(i, { children: [
|
|
13
|
+
/* @__PURE__ */ a(o, { variant: "subtitle2", className: "Bear-FloatingChat__title", children: r }),
|
|
14
|
+
/* @__PURE__ */ a(o, { variant: "caption", className: "Bear-FloatingChat__subtitle", children: n })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ a(p, { "aria-label": m, onClick: c })
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
b as FloatingChatHeader
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Badge/Badge.cjs"),i=require("../../Box/Box.cjs"),B=require("../../Button/Button.cjs"),C=require("../../CloseButton/CloseButton.cjs"),d=require("../FloatingChat.const.cjs"),h=require("../FloatingChat.utils.cjs"),_=s=>{const{isOpen:a,trigger:r,badgeCount:l,openLabel:n,closeLabel:g,onToggle:t}=s,o=l??0,c=!a&&o>0;return r?e.jsx(i.Box,{className:"Bear-FloatingChat__trigger",onClick:t,children:r}):e.jsxs(i.Box,{className:"Bear-FloatingChat__trigger",children:[a?e.jsx(C.CloseButton,{"aria-label":g,onClick:t,size:"lg"}):e.jsx(B.Button,{type:"button",variant:"primary","aria-label":n,onClick:t,children:n}),c&&e.jsx(u.Badge,{variant:"danger",size:"sm",className:"Bear-FloatingChat__badge",children:h.resolveFloatingChatBadge(o,d.FLOATING_CHAT_BADGE_MAX)})]})};exports.FloatingChatTrigger=_;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FloatingChatProps } from '../FloatingChat.types';
|
|
2
|
+
export declare const FloatingChatTrigger: (props: {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
trigger?: FloatingChatProps["trigger"];
|
|
5
|
+
badgeCount?: number;
|
|
6
|
+
openLabel: string;
|
|
7
|
+
closeLabel: string;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as p } from "../../Badge/Badge.js";
|
|
3
|
+
import { Box as n } from "../../Box/Box.js";
|
|
4
|
+
import { Button as C } from "../../Button/Button.js";
|
|
5
|
+
import { CloseButton as d } from "../../CloseButton/CloseButton.js";
|
|
6
|
+
import { FLOATING_CHAT_BADGE_MAX as h } from "../FloatingChat.const.js";
|
|
7
|
+
import { resolveFloatingChatBadge as B } from "../FloatingChat.utils.js";
|
|
8
|
+
const N = (l) => {
|
|
9
|
+
const { isOpen: a, trigger: t, badgeCount: g, openLabel: e, closeLabel: s, onToggle: o } = l, i = g ?? 0, m = !a && i > 0;
|
|
10
|
+
return t ? /* @__PURE__ */ r(n, { className: "Bear-FloatingChat__trigger", onClick: o, children: t }) : /* @__PURE__ */ c(n, { className: "Bear-FloatingChat__trigger", children: [
|
|
11
|
+
a ? /* @__PURE__ */ r(d, { "aria-label": s, onClick: o, size: "lg" }) : /* @__PURE__ */ r(C, { type: "button", variant: "primary", "aria-label": e, onClick: o, children: e }),
|
|
12
|
+
m && /* @__PURE__ */ r(p, { variant: "danger", size: "sm", className: "Bear-FloatingChat__badge", children: B(i, h) })
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
N as FloatingChatTrigger
|
|
17
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FloatingChat } from './FloatingChat';
|
|
2
|
-
export type { FloatingChatProps } from './FloatingChat.types';
|
|
2
|
+
export type { FloatingChatProps, FloatingChatTranslations } from './FloatingChat.types';
|
|
@@ -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"),r=require("../../constants/numbers.const.cjs"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),F=require("../../utils/useBearId.cjs"),n=require("../Flex/Flex.cjs"),t=require("../Skeleton/Skeleton.cjs"),_=s=>{const{fields:l=r.THREE,animation:o=u.ANIMATION_PULSE,id:a,testId:i,className:c}=s;return e.jsx(n.Flex,{id:S.resolveBearId(a,F.useBearId("FormSkeleton")),testId:i,direction:"column",gap:4,className:d.cn("Bear-FormSkeleton",c),children:Array.from({length:l}).map((k,m)=>e.jsxs(n.Flex,{direction:"column",gap:2,className:"Bear-FormSkeleton__field",children:[e.jsx(t.Skeleton,{animation:o,height:r.FOURTEEN,className:"Bear-FormSkeleton__label"}),e.jsx(t.Skeleton,{animation:o,height:r.FORTY,className:"Bear-FormSkeleton__control"})]},`field-${m}`))})};exports.FormSkeleton=_;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormSkeletonProps } from './FormSkeleton.types';
|
|
2
|
-
export declare const FormSkeleton: (
|
|
2
|
+
export declare const FormSkeleton: (props: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,43 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { THREE as p, FOURTEEN as d, FORTY as f } from "../../constants/numbers.const.js";
|
|
3
|
+
import { ANIMATION_PULSE as F } from "../../constants/generals.const.js";
|
|
4
|
+
import { cn as N } from "../../utils/cn.js";
|
|
3
5
|
import "react";
|
|
4
|
-
import { resolveBearId as
|
|
5
|
-
import { useBearId as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
fields:
|
|
10
|
-
animation: r = "pulse",
|
|
11
|
-
id: _,
|
|
12
|
-
testId: l,
|
|
13
|
-
className: m
|
|
14
|
-
}) => {
|
|
15
|
-
const a = p("FormSkeleton"), d = f(_, a);
|
|
6
|
+
import { resolveBearId as S } from "../../utils/generateBearId.utils.js";
|
|
7
|
+
import { useBearId as _ } from "../../utils/useBearId.js";
|
|
8
|
+
import { Flex as r } from "../Flex/Flex.js";
|
|
9
|
+
import { Skeleton as m } from "../Skeleton/Skeleton.js";
|
|
10
|
+
const O = (t) => {
|
|
11
|
+
const { fields: l = p, animation: o = F, id: i, testId: a, className: n } = t;
|
|
16
12
|
return /* @__PURE__ */ e(
|
|
17
|
-
|
|
13
|
+
r,
|
|
18
14
|
{
|
|
19
|
-
id:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
|
|
15
|
+
id: S(i, _("FormSkeleton")),
|
|
16
|
+
testId: a,
|
|
17
|
+
direction: "column",
|
|
18
|
+
gap: 4,
|
|
19
|
+
className: N("Bear-FormSkeleton", n),
|
|
20
|
+
children: Array.from({ length: l }).map((h, s) => /* @__PURE__ */ c(r, { direction: "column", gap: 2, className: "Bear-FormSkeleton__field", children: [
|
|
21
|
+
/* @__PURE__ */ e(
|
|
22
|
+
m,
|
|
23
|
+
{
|
|
24
|
+
animation: o,
|
|
25
|
+
height: d,
|
|
26
|
+
className: "Bear-FormSkeleton__label"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ e(
|
|
30
|
+
m,
|
|
31
|
+
{
|
|
32
|
+
animation: o,
|
|
33
|
+
height: f,
|
|
34
|
+
className: "Bear-FormSkeleton__control"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }, `field-${s}`))
|
|
27
38
|
}
|
|
28
39
|
);
|
|
29
40
|
};
|
|
30
41
|
export {
|
|
31
|
-
|
|
42
|
+
O as FormSkeleton
|
|
32
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),_=require("../../utils/cn.cjs");require("react");const I=require("../../utils/useBearId.cjs"),N=require("../Typography/Typography.cjs"),i=require("../Flex/Flex.cjs"),e=require("./Gauge.const.cjs"),D=require("./hooks/useGauge.cjs"),b=require("./helpers/GaugeArcSvg.cjs"),R=require("./helpers/GaugeLinearBar.cjs"),y=s=>{const{value:E,min:U=e.GAUGE_DEFAULT_MIN,max:f=e.GAUGE_DEFAULT_MAX,size:t=e.GAUGE_DEFAULT_SIZE,strokeWidth:c=e.GAUGE_DEFAULT_STROKE_WIDTH,color:l=e.GAUGE_DEFAULT_COLOR,trackColor:u,showLabel:A=!0,label:G,animated:m=!0,fillDurationMs:h=e.GAUGE_DEFAULT_FILL_DURATION_MS,arcAngle:x=e.GAUGE_DEFAULT_ARC_ANGLE,variant:g=e.GAUGE_VARIANT_ARC,gradient:n,className:o,...d}=s,L=g===e.GAUGE_VARIANT_RING?s.arcAngle??e.GAUGE_RING_ARC_ANGLE:x,T=I.useBearId("Gauge","gradient"),r=D.useGauge({value:E,min:U,max:f,strokeWidth:c,arcAngle:L,animated:m,fillDurationMs:h});return g===e.GAUGE_VARIANT_LINEAR?a.jsx(i.Flex,{align:"center",justify:"center",className:_.cn("bear-relative bear-inline-flex",o),style:{width:t},...d,children:a.jsx(R.GaugeLinearBar,{percentage:r.percentage,color:l,trackColor:u,gradient:n,animated:r.animated,fillDurationMs:r.fillDurationMs,showLabel:A,label:G})}):a.jsxs(i.Flex,{align:"center",justify:"center",className:_.cn("bear-relative bear-inline-flex",o),style:{width:t,height:t},...d,children:[a.jsx(b.GaugeArcSvg,{radius:r.radius,strokeWidth:c,circumference:r.circumference,dashOffset:r.dashOffset,startAngle:r.startAngle,color:l,trackColor:u,gradientId:n?T:void 0,gradient:n,animated:r.animated,fillDurationMs:r.fillDurationMs}),A&&a.jsx(i.Flex,{align:"center",justify:"center",className:"bear-absolute bear-inset-0",children:G||a.jsxs(N.Typography,{variant:"h4",className:"bear-text-[var(--bear-text-primary)]",children:[Math.round(r.percentage),"%"]})})]})};exports.Gauge=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=0,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=0,G=100,_=120,E=10,U="var(--bear-primary-500, #ec4899)",T=270,I=900,N=50,R="cubic-bezier(0.4, 0, 0.2, 1)",L="arc",c="linear",t="ring",n=360,o=8;exports.GAUGE_ANIMATION_EASING=R;exports.GAUGE_DEFAULT_ARC_ANGLE=T;exports.GAUGE_DEFAULT_COLOR=U;exports.GAUGE_DEFAULT_FILL_DURATION_MS=I;exports.GAUGE_DEFAULT_MAX=G;exports.GAUGE_DEFAULT_MIN=A;exports.GAUGE_DEFAULT_SIZE=_;exports.GAUGE_DEFAULT_STROKE_WIDTH=E;exports.GAUGE_LINEAR_TRACK_HEIGHT=o;exports.GAUGE_RING_ARC_ANGLE=n;exports.GAUGE_VARIANT_ARC=L;exports.GAUGE_VARIANT_LINEAR=c;exports.GAUGE_VARIANT_RING=t;exports.GAUGE_VIEWBOX_CENTER=N;
|
|
@@ -7,3 +7,8 @@ export declare const GAUGE_DEFAULT_ARC_ANGLE = 270;
|
|
|
7
7
|
export declare const GAUGE_DEFAULT_FILL_DURATION_MS = 900;
|
|
8
8
|
export declare const GAUGE_VIEWBOX_CENTER = 50;
|
|
9
9
|
export declare const GAUGE_ANIMATION_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
10
|
+
export declare const GAUGE_VARIANT_ARC = "arc";
|
|
11
|
+
export declare const GAUGE_VARIANT_LINEAR = "linear";
|
|
12
|
+
export declare const GAUGE_VARIANT_RING = "ring";
|
|
13
|
+
export declare const GAUGE_RING_ARC_ANGLE = 360;
|
|
14
|
+
export declare const GAUGE_LINEAR_TRACK_HEIGHT = 8;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
const A = 0,
|
|
1
|
+
const A = 0, G = 100, _ = 120, E = 10, U = "var(--bear-primary-500, #ec4899)", c = 270, I = 900, T = 50, n = "cubic-bezier(0.4, 0, 0.2, 1)", o = "arc", t = "linear", N = "ring", R = 360, s = 8;
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
n as GAUGE_ANIMATION_EASING,
|
|
4
4
|
c as GAUGE_DEFAULT_ARC_ANGLE,
|
|
5
5
|
U as GAUGE_DEFAULT_COLOR,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
I as GAUGE_DEFAULT_FILL_DURATION_MS,
|
|
7
|
+
G as GAUGE_DEFAULT_MAX,
|
|
8
8
|
A as GAUGE_DEFAULT_MIN,
|
|
9
9
|
_ as GAUGE_DEFAULT_SIZE,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
E as GAUGE_DEFAULT_STROKE_WIDTH,
|
|
11
|
+
s as GAUGE_LINEAR_TRACK_HEIGHT,
|
|
12
|
+
R as GAUGE_RING_ARC_ANGLE,
|
|
13
|
+
o as GAUGE_VARIANT_ARC,
|
|
14
|
+
t as GAUGE_VARIANT_LINEAR,
|
|
15
|
+
N as GAUGE_VARIANT_RING,
|
|
16
|
+
T as GAUGE_VIEWBOX_CENTER
|
|
12
17
|
};
|
|
@@ -1,70 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as r, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useBearId as D } from "../../utils/useBearId.js";
|
|
5
|
-
import { Typography as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { GAUGE_DEFAULT_MIN as T, GAUGE_DEFAULT_MAX as
|
|
8
|
-
import { useGauge as
|
|
9
|
-
import { GaugeArcSvg as
|
|
10
|
-
|
|
5
|
+
import { Typography as I } from "../Typography/Typography.js";
|
|
6
|
+
import { Flex as i } from "../Flex/Flex.js";
|
|
7
|
+
import { GAUGE_DEFAULT_MIN as T, GAUGE_DEFAULT_MAX as R, GAUGE_DEFAULT_SIZE as b, GAUGE_DEFAULT_STROKE_WIDTH as v, GAUGE_DEFAULT_COLOR as x, GAUGE_DEFAULT_FILL_DURATION_MS as F, GAUGE_DEFAULT_ARC_ANGLE as M, GAUGE_VARIANT_ARC as y, GAUGE_VARIANT_RING as O, GAUGE_RING_ARC_ANGLE as j, GAUGE_VARIANT_LINEAR as C } from "./Gauge.const.js";
|
|
8
|
+
import { useGauge as S } from "./hooks/useGauge.js";
|
|
9
|
+
import { GaugeArcSvg as w } from "./helpers/GaugeArcSvg.js";
|
|
10
|
+
import { GaugeLinearBar as V } from "./helpers/GaugeLinearBar.js";
|
|
11
|
+
const P = (n) => {
|
|
11
12
|
const {
|
|
12
|
-
value:
|
|
13
|
-
min:
|
|
14
|
-
max:
|
|
15
|
-
size:
|
|
16
|
-
strokeWidth:
|
|
17
|
-
color:
|
|
18
|
-
trackColor:
|
|
19
|
-
showLabel:
|
|
20
|
-
label:
|
|
21
|
-
animated:
|
|
22
|
-
fillDurationMs:
|
|
23
|
-
arcAngle:
|
|
13
|
+
value: f,
|
|
14
|
+
min: g = T,
|
|
15
|
+
max: E = R,
|
|
16
|
+
size: a = b,
|
|
17
|
+
strokeWidth: l = v,
|
|
18
|
+
color: s = x,
|
|
19
|
+
trackColor: o,
|
|
20
|
+
showLabel: A = !0,
|
|
21
|
+
label: c,
|
|
22
|
+
animated: U = !0,
|
|
23
|
+
fillDurationMs: h = F,
|
|
24
|
+
arcAngle: p = M,
|
|
25
|
+
variant: m = y,
|
|
24
26
|
gradient: t,
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
} =
|
|
28
|
-
value:
|
|
29
|
-
min:
|
|
30
|
-
max:
|
|
31
|
-
strokeWidth:
|
|
32
|
-
arcAngle:
|
|
33
|
-
animated:
|
|
34
|
-
fillDurationMs:
|
|
27
|
+
className: G,
|
|
28
|
+
...u
|
|
29
|
+
} = n, L = m === O ? n.arcAngle ?? j : p, N = D("Gauge", "gradient"), e = S({
|
|
30
|
+
value: f,
|
|
31
|
+
min: g,
|
|
32
|
+
max: E,
|
|
33
|
+
strokeWidth: l,
|
|
34
|
+
arcAngle: L,
|
|
35
|
+
animated: U,
|
|
36
|
+
fillDurationMs: h
|
|
35
37
|
});
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
38
|
+
return m === C ? /* @__PURE__ */ r(
|
|
39
|
+
i,
|
|
38
40
|
{
|
|
39
41
|
align: "center",
|
|
40
42
|
justify: "center",
|
|
41
|
-
className:
|
|
42
|
-
style: { width:
|
|
43
|
-
...
|
|
43
|
+
className: d("bear-relative bear-inline-flex", G),
|
|
44
|
+
style: { width: a },
|
|
45
|
+
...u,
|
|
46
|
+
children: /* @__PURE__ */ r(
|
|
47
|
+
V,
|
|
48
|
+
{
|
|
49
|
+
percentage: e.percentage,
|
|
50
|
+
color: s,
|
|
51
|
+
trackColor: o,
|
|
52
|
+
gradient: t,
|
|
53
|
+
animated: e.animated,
|
|
54
|
+
fillDurationMs: e.fillDurationMs,
|
|
55
|
+
showLabel: A,
|
|
56
|
+
label: c
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
) : /* @__PURE__ */ _(
|
|
61
|
+
i,
|
|
62
|
+
{
|
|
63
|
+
align: "center",
|
|
64
|
+
justify: "center",
|
|
65
|
+
className: d("bear-relative bear-inline-flex", G),
|
|
66
|
+
style: { width: a, height: a },
|
|
67
|
+
...u,
|
|
44
68
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
|
+
w,
|
|
47
71
|
{
|
|
48
72
|
radius: e.radius,
|
|
49
|
-
strokeWidth:
|
|
73
|
+
strokeWidth: l,
|
|
50
74
|
circumference: e.circumference,
|
|
51
75
|
dashOffset: e.dashOffset,
|
|
52
76
|
startAngle: e.startAngle,
|
|
53
|
-
color:
|
|
54
|
-
trackColor:
|
|
55
|
-
gradientId: t ?
|
|
77
|
+
color: s,
|
|
78
|
+
trackColor: o,
|
|
79
|
+
gradientId: t ? N : void 0,
|
|
56
80
|
gradient: t,
|
|
57
81
|
animated: e.animated,
|
|
58
82
|
fillDurationMs: e.fillDurationMs
|
|
59
83
|
}
|
|
60
84
|
),
|
|
61
|
-
|
|
62
|
-
|
|
85
|
+
A && /* @__PURE__ */ r(
|
|
86
|
+
i,
|
|
63
87
|
{
|
|
64
88
|
align: "center",
|
|
65
89
|
justify: "center",
|
|
66
90
|
className: "bear-absolute bear-inset-0",
|
|
67
|
-
children:
|
|
91
|
+
children: c || /* @__PURE__ */ _(I, { variant: "h4", className: "bear-text-[var(--bear-text-primary)]", children: [
|
|
68
92
|
Math.round(e.percentage),
|
|
69
93
|
"%"
|
|
70
94
|
] })
|
|
@@ -75,5 +99,5 @@ const B = (o) => {
|
|
|
75
99
|
);
|
|
76
100
|
};
|
|
77
101
|
export {
|
|
78
|
-
|
|
102
|
+
P as Gauge
|
|
79
103
|
};
|
|
@@ -24,8 +24,17 @@ export interface GaugeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
animated?: boolean;
|
|
25
25
|
/** Fill transition duration in ms when animated */
|
|
26
26
|
fillDurationMs?: number;
|
|
27
|
-
/** Arc angle (180 for half, 270 for 3/4, 360 for full) */
|
|
28
27
|
arcAngle?: number;
|
|
29
|
-
|
|
28
|
+
variant?: 'arc' | 'linear' | 'ring';
|
|
30
29
|
gradient?: [string, string];
|
|
31
30
|
}
|
|
31
|
+
export interface GaugeLinearBarProps {
|
|
32
|
+
percentage: number;
|
|
33
|
+
color: string;
|
|
34
|
+
trackColor?: string;
|
|
35
|
+
gradient?: [string, string];
|
|
36
|
+
animated: boolean;
|
|
37
|
+
fillDurationMs: number;
|
|
38
|
+
showLabel: boolean;
|
|
39
|
+
label?: ReactNode;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../Flex/Flex.cjs"),n=require("../../Box/Box.cjs"),b=require("../../Typography/Typography.cjs"),i=require("../Gauge.const.cjs"),h=t=>{const{percentage:o,color:l,trackColor:u,gradient:r,animated:a,fillDurationMs:s,showLabel:c,label:d}=t;return e.jsxs(g.Flex,{direction:"column",gap:2,className:"Bear-Gauge Bear-Gauge--linear bear-w-full",children:[e.jsx(n.Box,{className:"Bear-Gauge__linear-track bear-w-full bear-overflow-hidden bear-rounded-full",style:{height:i.GAUGE_LINEAR_TRACK_HEIGHT,backgroundColor:u??"var(--bear-border-default)"},children:e.jsx(n.Box,{className:"Bear-Gauge__linear-fill bear-h-full bear-rounded-full",style:{width:`${o}%`,background:r?`linear-gradient(90deg, ${r[0]}, ${r[1]})`:l,transitionProperty:a?"width":void 0,transitionDuration:a?`${s}ms`:void 0,transitionTimingFunction:a?i.GAUGE_ANIMATION_EASING:void 0}})}),c&&(d||e.jsxs(b.Typography,{variant:"caption",color:"muted",children:[Math.round(o),"%"]}))]})};exports.GaugeLinearBar=h;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as m } from "../../Flex/Flex.js";
|
|
3
|
+
import { Box as l } from "../../Box/Box.js";
|
|
4
|
+
import { Typography as g } from "../../Typography/Typography.js";
|
|
5
|
+
import { GAUGE_LINEAR_TRACK_HEIGHT as f, GAUGE_ANIMATION_EASING as b } from "../Gauge.const.js";
|
|
6
|
+
const N = (n) => {
|
|
7
|
+
const { percentage: e, color: t, trackColor: d, gradient: r, animated: a, fillDurationMs: u, showLabel: c, label: s } = n;
|
|
8
|
+
return /* @__PURE__ */ o(m, { direction: "column", gap: 2, className: "Bear-Gauge Bear-Gauge--linear bear-w-full", children: [
|
|
9
|
+
/* @__PURE__ */ i(
|
|
10
|
+
l,
|
|
11
|
+
{
|
|
12
|
+
className: "Bear-Gauge__linear-track bear-w-full bear-overflow-hidden bear-rounded-full",
|
|
13
|
+
style: {
|
|
14
|
+
height: f,
|
|
15
|
+
backgroundColor: d ?? "var(--bear-border-default)"
|
|
16
|
+
},
|
|
17
|
+
children: /* @__PURE__ */ i(
|
|
18
|
+
l,
|
|
19
|
+
{
|
|
20
|
+
className: "Bear-Gauge__linear-fill bear-h-full bear-rounded-full",
|
|
21
|
+
style: {
|
|
22
|
+
width: `${e}%`,
|
|
23
|
+
background: r ? `linear-gradient(90deg, ${r[0]}, ${r[1]})` : t,
|
|
24
|
+
transitionProperty: a ? "width" : void 0,
|
|
25
|
+
transitionDuration: a ? `${u}ms` : void 0,
|
|
26
|
+
transitionTimingFunction: a ? b : void 0
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
c && (s || /* @__PURE__ */ o(g, { variant: "caption", color: "muted", children: [
|
|
33
|
+
Math.round(e),
|
|
34
|
+
"%"
|
|
35
|
+
] }))
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
N as GaugeLinearBar
|
|
40
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),N=require("../../utils/cn.cjs"),W=require("../Popover/Popover.cjs"),k=require("../Typography/Typography.cjs"),n=require("./Heatmap.const.cjs"),b=require("./Heatmap.utils.cjs"),K=({data:L,startDate:p,endDate:_,colorScale:u=n.DEFAULT_COLOR_SCALE,cellSize:d=n.DEFAULT_CELL_SIZE,cellGap:m=n.DEFAULT_CELL_GAP,showDayLabels:v=!0,showMonthLabels:C=!0,emptyColor:y,tooltipFormat:E,onCellClick:h,renderTooltip:i,cellShape:D=n.CELL_SHAPE_SQUARE,testId:O,className:P,...R})=>{const[x,H]=l.useState(null),[q,g]=l.useState(!1),S=l.useRef(new Map),{weeks:A,dataMap:T,maxValue:f}=l.useMemo(()=>{const e=_?new Date(_):new Date,a=p?new Date(p):new Date(e.getFullYear()-1,e.getMonth(),e.getDate()),c=new Map;let o=0;for(const r of L)c.set(r.date,r),r.value>o&&(o=r.value);return{weeks:b.getWeeks(a,e),dataMap:c,maxValue:o}},[L,p,_]),U=l.useCallback(e=>{if(e===0||f===0)return y??n.DEFAULT_EMPTY_COLOR;const a=Math.min(Math.floor(e/f*(u.length-1)),u.length-1);return u[a]},[f,y,u]),M=v?28:0,F=l.useCallback(e=>{!e||!i||(H(e),g(!0))},[i]),Y=l.useCallback(()=>{g(!1),H(null)},[]);return s.jsxs("div",{className:N.cn("Bear-Heatmap relative inline-block",P),"data-testid":O,...R,children:[C&&s.jsx("div",{className:"Bear-Heatmap__months flex mb-1",style:{paddingLeft:M},children:A.map((e,a)=>{const c=e[0],o=a===0||c.getDate()<=n.DAYS_IN_WEEK;return s.jsx(k.Typography,{variant:"caption",className:"Bear-Heatmap__month text-gray-400 dark:text-gray-500 text-[10px]",style:{width:d+m,textAlign:"left"},children:o?n.MONTH_LABELS[c.getMonth()]:""},a)})}),s.jsxs("div",{className:"Bear-Heatmap__grid flex",children:[v&&s.jsx("div",{className:"Bear-Heatmap__days flex flex-col mr-1",style:{gap:m},children:n.DAY_LABELS.map((e,a)=>s.jsx(k.Typography,{variant:"caption",className:"Bear-Heatmap__day text-gray-400 dark:text-gray-500 text-[10px] flex items-center justify-end",style:{height:d,width:M-n.LABEL_PAD},children:e},a))}),s.jsx("div",{className:"Bear-Heatmap__weeks flex",style:{gap:m},children:A.map((e,a)=>s.jsx("div",{className:"Bear-Heatmap__week flex flex-col",style:{gap:m},children:e.map((c,o)=>{const r=b.toKey(c),t=T.get(r),j=(t==null?void 0:t.value)??0,I=U(j),w=s.jsx("div",{ref:B=>{B&&S.current.set(r,B)},className:N.cn("Bear-Heatmap__cell cursor-pointer transition-transform hover:scale-125",D===n.CELL_SHAPE_CIRCLE?"rounded-full":"rounded-sm"),style:{width:d,height:d,backgroundColor:I},title:i?void 0:t?E?E(t):`${r}: ${j}`:r,onClick:()=>t&&(h==null?void 0:h(t)),onMouseEnter:()=>F(t),onMouseLeave:Y},o);return i&&t&&(x==null?void 0:x.date)===t.date?s.jsx(W.Popover,{content:i(t),trigger:"hover",placement:"top",open:q,onOpenChange:g,arrow:!1,children:w},o):w})},a))})]})]})};exports.Heatmap=K;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=12,E=3,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=12,E=3,_=["#161b22","#0e4429","#006d32","#26a641","#39d353"],A="#ebedf0",S=["","Mon","","Wed","","Fri",""],C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=7,c=4,e="square",o="circle";exports.CELL_SHAPE_CIRCLE=o;exports.CELL_SHAPE_SQUARE=e;exports.DAYS_IN_WEEK=t;exports.DAY_LABELS=S;exports.DEFAULT_CELL_GAP=E;exports.DEFAULT_CELL_SIZE=L;exports.DEFAULT_COLOR_SCALE=_;exports.DEFAULT_EMPTY_COLOR=A;exports.LABEL_PAD=c;exports.MONTH_LABELS=C;
|
|
@@ -6,3 +6,5 @@ export declare const DAY_LABELS: string[];
|
|
|
6
6
|
export declare const MONTH_LABELS: string[];
|
|
7
7
|
export declare const DAYS_IN_WEEK = 7;
|
|
8
8
|
export declare const LABEL_PAD = 4;
|
|
9
|
+
export declare const CELL_SHAPE_SQUARE = "square";
|
|
10
|
+
export declare const CELL_SHAPE_CIRCLE = "circle";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
const L = 12,
|
|
1
|
+
const L = 12, E = 3, A = ["#161b22", "#0e4429", "#006d32", "#26a641", "#39d353"], _ = "#ebedf0", c = ["", "Mon", "", "Wed", "", "Fri", ""], n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], o = 7, t = 4, s = "square", e = "circle";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
e as CELL_SHAPE_CIRCLE,
|
|
4
|
+
s as CELL_SHAPE_SQUARE,
|
|
5
|
+
o as DAYS_IN_WEEK,
|
|
6
|
+
c as DAY_LABELS,
|
|
7
|
+
E as DEFAULT_CELL_GAP,
|
|
6
8
|
L as DEFAULT_CELL_SIZE,
|
|
7
|
-
|
|
9
|
+
A as DEFAULT_COLOR_SCALE,
|
|
8
10
|
_ as DEFAULT_EMPTY_COLOR,
|
|
9
11
|
t as LABEL_PAD,
|
|
10
|
-
|
|
12
|
+
n as MONTH_LABELS
|
|
11
13
|
};
|