@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,73 +1,95 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { SPARKLINE as
|
|
5
|
-
import { calculateSparklinePathData as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as f, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { SPARKLINE as e, SPARKLINE_VARIANT_LINE as y, SPARKLINE_VARIANT_BARS as P, SPARKLINE_VARIANT_AREA as u } from "./Sparkline.const.js";
|
|
5
|
+
import { calculateSparklinePathData as v, calculateSparklineBars as w, calculateSparklinePoints as C } from "./Sparkline.utils.js";
|
|
6
|
+
const B = (h) => {
|
|
7
7
|
const {
|
|
8
|
-
data:
|
|
9
|
-
width: m =
|
|
10
|
-
height:
|
|
11
|
-
color:
|
|
12
|
-
fill:
|
|
13
|
-
strokeWidth:
|
|
14
|
-
showExtremes:
|
|
15
|
-
animated:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
8
|
+
data: o,
|
|
9
|
+
width: m = e.DEFAULT_WIDTH,
|
|
10
|
+
height: R = e.DEFAULT_HEIGHT,
|
|
11
|
+
color: a = e.DEFAULT_COLOR,
|
|
12
|
+
fill: N = !1,
|
|
13
|
+
strokeWidth: _ = e.DEFAULT_STROKE_WIDTH,
|
|
14
|
+
showExtremes: p = !1,
|
|
15
|
+
animated: s = !0,
|
|
16
|
+
variant: A = y,
|
|
17
|
+
showLastPoint: E = !1,
|
|
18
|
+
className: T,
|
|
19
|
+
...x
|
|
20
|
+
} = h, L = N || A === u, { path: k, areaPath: D, minPoint: n, maxPoint: r } = v(o), O = w(o), d = C(o), c = d[d.length - 1], I = `sparkline-gradient-${a.replace("#", "")}`;
|
|
21
|
+
return /* @__PURE__ */ t(
|
|
23
22
|
"div",
|
|
24
23
|
{
|
|
25
|
-
className:
|
|
26
|
-
style: { width: m, height:
|
|
27
|
-
...
|
|
24
|
+
className: l("inline-block", T),
|
|
25
|
+
style: { width: m, height: R },
|
|
26
|
+
...x,
|
|
28
27
|
children: /* @__PURE__ */ f("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "w-full h-full", children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ f("linearGradient", { id: I, x1: "0%", y1: "0%", x2: "0%", y2: "100%", children: [
|
|
29
|
+
/* @__PURE__ */ t("stop", { offset: "0%", stopColor: a, stopOpacity: "0.4" }),
|
|
30
|
+
/* @__PURE__ */ t("stop", { offset: "100%", stopColor: a, stopOpacity: "0" })
|
|
32
31
|
] }) }),
|
|
33
|
-
|
|
34
|
-
"
|
|
32
|
+
A === P ? O.map((i, S) => /* @__PURE__ */ t(
|
|
33
|
+
"rect",
|
|
35
34
|
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
x: i.x,
|
|
36
|
+
y: i.y,
|
|
37
|
+
width: i.width,
|
|
38
|
+
height: i.height,
|
|
39
|
+
fill: a,
|
|
40
|
+
className: l(s && "animate-grow-up")
|
|
41
|
+
},
|
|
42
|
+
S
|
|
43
|
+
)) : /* @__PURE__ */ f(g, { children: [
|
|
44
|
+
L && /* @__PURE__ */ t(
|
|
45
|
+
"path",
|
|
46
|
+
{
|
|
47
|
+
d: D,
|
|
48
|
+
fill: `url(#${I})`,
|
|
49
|
+
className: l(s && "animate-fade-in")
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ t(
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
d: k,
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: a,
|
|
58
|
+
strokeWidth: _,
|
|
59
|
+
strokeLinecap: "round",
|
|
60
|
+
strokeLinejoin: "round",
|
|
61
|
+
vectorEffect: "non-scaling-stroke",
|
|
62
|
+
className: l(s && "animate-draw-line")
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
p && n && /* @__PURE__ */ t(
|
|
67
|
+
"circle",
|
|
43
68
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
strokeLinejoin: "round",
|
|
50
|
-
vectorEffect: "non-scaling-stroke",
|
|
51
|
-
className: i(n && "animate-draw-line")
|
|
69
|
+
cx: n.x,
|
|
70
|
+
cy: n.y,
|
|
71
|
+
r: e.INDICATOR_RADIUS,
|
|
72
|
+
fill: e.MIN_INDICATOR_COLOR,
|
|
73
|
+
vectorEffect: "non-scaling-stroke"
|
|
52
74
|
}
|
|
53
75
|
),
|
|
54
|
-
|
|
76
|
+
p && r && /* @__PURE__ */ t(
|
|
55
77
|
"circle",
|
|
56
78
|
{
|
|
57
79
|
cx: r.x,
|
|
58
80
|
cy: r.y,
|
|
59
|
-
r:
|
|
60
|
-
fill:
|
|
81
|
+
r: e.INDICATOR_RADIUS,
|
|
82
|
+
fill: e.MAX_INDICATOR_COLOR,
|
|
61
83
|
vectorEffect: "non-scaling-stroke"
|
|
62
84
|
}
|
|
63
85
|
),
|
|
64
|
-
|
|
86
|
+
E && c && /* @__PURE__ */ t(
|
|
65
87
|
"circle",
|
|
66
88
|
{
|
|
67
|
-
cx:
|
|
68
|
-
cy:
|
|
69
|
-
r:
|
|
70
|
-
fill:
|
|
89
|
+
cx: c.x,
|
|
90
|
+
cy: c.y,
|
|
91
|
+
r: e.LAST_POINT_RADIUS,
|
|
92
|
+
fill: a,
|
|
71
93
|
vectorEffect: "non-scaling-stroke"
|
|
72
94
|
}
|
|
73
95
|
)
|
|
@@ -76,5 +98,5 @@ const u = (p) => {
|
|
|
76
98
|
);
|
|
77
99
|
};
|
|
78
100
|
export {
|
|
79
|
-
|
|
101
|
+
B as Sparkline
|
|
80
102
|
};
|
|
@@ -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("./Sparkline.const.cjs"),S=n=>{if(n.length===0)return[];const c=Math.max(...n),t=Math.min(...n),a=c-t||1;return n.map((r,l)=>({x:l/(n.length-1||1)*e.SPARKLINE.VIEWBOX_SIZE,y:e.SPARKLINE.VIEWBOX_SIZE-(r-t)/a*e.SPARKLINE.Y_RANGE-e.SPARKLINE.Y_PADDING,value:r}))},o=n=>n.length===0?"":n.reduce((c,t,a)=>{if(a===0)return`M ${t.x},${t.y}`;const r=n[a-1],l=r.x+(t.x-r.x)/e.SPARKLINE.CONTROL_POINT_FACTOR,I=t.x-(t.x-r.x)/e.SPARKLINE.CONTROL_POINT_FACTOR;return`${c} C ${l},${r.y} ${I},${t.y} ${t.x},${t.y}`},""),E=n=>n?`${n} L ${e.SPARKLINE.VIEWBOX_SIZE},${e.SPARKLINE.VIEWBOX_SIZE} L 0,${e.SPARKLINE.VIEWBOX_SIZE} Z`:"",u=n=>{if(n.length===0)return{path:"",areaPath:"",minPoint:null,maxPoint:null};const c=S(n),t=Math.max(...n),a=Math.min(...n),r=n.indexOf(a),l=n.indexOf(t),I=o(c),s=E(I);return{path:I,areaPath:s,minPoint:c[r]||null,maxPoint:c[l]||null}},x=n=>{if(n.length===0)return[];const c=Math.max(...n),t=Math.min(...n),a=c-t||1,r=e.SPARKLINE.VIEWBOX_SIZE/n.length,l=r*e.SPARKLINE.BAR_GAP_RATIO,I=r-l;return n.map((s,i)=>{const P=(s-t)/a*e.SPARKLINE.Y_RANGE;return{x:i*r+l/2,y:e.SPARKLINE.VIEWBOX_SIZE-e.SPARKLINE.Y_PADDING-P,width:I,height:P}})};exports.calculateSparklineBars=x;exports.calculateSparklinePathData=u;exports.calculateSparklinePoints=S;exports.generateAreaPath=E;exports.generateSparklinePath=o;
|
|
@@ -9,19 +9,14 @@ export interface SparklinePathData {
|
|
|
9
9
|
minPoint: SparklinePoint | null;
|
|
10
10
|
maxPoint: SparklinePoint | null;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export interface SparklineBar {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
15
18
|
export declare const calculateSparklinePoints: (data: number[]) => SparklinePoint[];
|
|
16
|
-
/**
|
|
17
|
-
* Generate smooth bezier curve path from points
|
|
18
|
-
*/
|
|
19
19
|
export declare const generateSparklinePath: (points: SparklinePoint[]) => string;
|
|
20
|
-
/**
|
|
21
|
-
* Generate area path for filled sparkline
|
|
22
|
-
*/
|
|
23
20
|
export declare const generateAreaPath: (linePath: string) => string;
|
|
24
|
-
/**
|
|
25
|
-
* Calculate all sparkline path data from raw data
|
|
26
|
-
*/
|
|
27
21
|
export declare const calculateSparklinePathData: (data: number[]) => SparklinePathData;
|
|
22
|
+
export declare const calculateSparklineBars: (data: number[]) => SparklineBar[];
|
|
@@ -1,30 +1,43 @@
|
|
|
1
|
-
import { SPARKLINE as
|
|
2
|
-
const
|
|
1
|
+
import { SPARKLINE as r } from "./Sparkline.const.js";
|
|
2
|
+
const h = (n) => {
|
|
3
3
|
if (n.length === 0) return [];
|
|
4
|
-
const c = Math.max(...n), t = Math.min(...n),
|
|
5
|
-
return n.map((
|
|
6
|
-
x:
|
|
7
|
-
y:
|
|
8
|
-
value:
|
|
4
|
+
const c = Math.max(...n), t = Math.min(...n), s = c - t || 1;
|
|
5
|
+
return n.map((e, o) => ({
|
|
6
|
+
x: o / (n.length - 1 || 1) * r.VIEWBOX_SIZE,
|
|
7
|
+
y: r.VIEWBOX_SIZE - (e - t) / s * r.Y_RANGE - r.Y_PADDING,
|
|
8
|
+
value: e
|
|
9
9
|
}));
|
|
10
|
-
},
|
|
11
|
-
if (
|
|
12
|
-
const
|
|
13
|
-
return `${c} C ${
|
|
14
|
-
}, ""),
|
|
10
|
+
}, u = (n) => n.length === 0 ? "" : n.reduce((c, t, s) => {
|
|
11
|
+
if (s === 0) return `M ${t.x},${t.y}`;
|
|
12
|
+
const e = n[s - 1], o = e.x + (t.x - e.x) / r.CONTROL_POINT_FACTOR, x = t.x - (t.x - e.x) / r.CONTROL_POINT_FACTOR;
|
|
13
|
+
return `${c} C ${o},${e.y} ${x},${t.y} ${t.x},${t.y}`;
|
|
14
|
+
}, ""), a = (n) => n ? `${n} L ${r.VIEWBOX_SIZE},${r.VIEWBOX_SIZE} L 0,${r.VIEWBOX_SIZE} Z` : "", O = (n) => {
|
|
15
15
|
if (n.length === 0)
|
|
16
16
|
return { path: "", areaPath: "", minPoint: null, maxPoint: null };
|
|
17
|
-
const c =
|
|
17
|
+
const c = h(n), t = Math.max(...n), s = Math.min(...n), e = n.indexOf(s), o = n.indexOf(t), x = u(c), l = a(x);
|
|
18
18
|
return {
|
|
19
|
-
path:
|
|
20
|
-
areaPath:
|
|
21
|
-
minPoint: c[
|
|
22
|
-
maxPoint: c[
|
|
19
|
+
path: x,
|
|
20
|
+
areaPath: l,
|
|
21
|
+
minPoint: c[e] || null,
|
|
22
|
+
maxPoint: c[o] || null
|
|
23
23
|
};
|
|
24
|
+
}, E = (n) => {
|
|
25
|
+
if (n.length === 0) return [];
|
|
26
|
+
const c = Math.max(...n), t = Math.min(...n), s = c - t || 1, e = r.VIEWBOX_SIZE / n.length, o = e * r.BAR_GAP_RATIO, x = e - o;
|
|
27
|
+
return n.map((l, I) => {
|
|
28
|
+
const m = (l - t) / s * r.Y_RANGE;
|
|
29
|
+
return {
|
|
30
|
+
x: I * e + o / 2,
|
|
31
|
+
y: r.VIEWBOX_SIZE - r.Y_PADDING - m,
|
|
32
|
+
width: x,
|
|
33
|
+
height: m
|
|
34
|
+
};
|
|
35
|
+
});
|
|
24
36
|
};
|
|
25
37
|
export {
|
|
38
|
+
E as calculateSparklineBars,
|
|
26
39
|
O as calculateSparklinePathData,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
h as calculateSparklinePoints,
|
|
41
|
+
a as generateAreaPath,
|
|
42
|
+
u as generateSparklinePath
|
|
30
43
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Sparkline } from './Sparkline';
|
|
2
2
|
export type { SparklineProps } from './Sparkline.types';
|
|
3
3
|
export { SPARKLINE } from './Sparkline.const';
|
|
4
|
-
export { calculateSparklinePoints, calculateSparklinePathData, generateSparklinePath, generateAreaPath, } from './Sparkline.utils';
|
|
5
|
-
export type { SparklinePoint, SparklinePathData } from './Sparkline.utils';
|
|
4
|
+
export { calculateSparklinePoints, calculateSparklinePathData, generateSparklinePath, generateAreaPath, calculateSparklineBars, } from './Sparkline.utils';
|
|
5
|
+
export type { SparklinePoint, SparklinePathData, SparklineBar } from './Sparkline.utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),y=require("../../utils/cn.cjs");require("react");const B=require("../../utils/generateBearId.utils.cjs"),g=require("../../utils/useBearId.cjs"),h=require("../Button/Button.cjs"),o=require("../Typography/Typography.cjs"),a=require("./StatCard.const.cjs"),m=require("./StatCard.utils.cjs"),p=n=>{const{title:d,value:i,color:s=a.DEFAULT_STAT_CARD_COLOR,icon:c,onClick:e,className:l,id:_,testId:u,...C}=n,A=g.useBearId("StatCard"),S=B.resolveBearId(_,A),T=`linear-gradient(135deg, ${s}${a.STAT_CARD_GRADIENT_START_ALPHA}, ${s}${a.STAT_CARD_GRADIENT_END_ALPHA})`;return t.jsxs("div",{id:S,"data-testid":u,role:e?"button":void 0,tabIndex:e?0:void 0,className:y.cn("Bear-StatCard",l),style:{background:T},onClick:e,onKeyDown:r=>m.handleStatCardKeyDown(r,e),...C,children:[t.jsx("div",{className:"Bear-StatCard__decoration","aria-hidden":!0}),t.jsxs("div",{className:"Bear-StatCard__body",children:[t.jsx(o.Typography,{className:"Bear-StatCard__title",children:d}),t.jsx(o.Typography,{className:"Bear-StatCard__value",children:i}),e&&t.jsx(h.Button,{type:"button",size:"sm",variant:"ghost",className:"Bear-StatCard__action",icon:c,onClick:r=>{r.stopPropagation(),e()},children:a.DEFAULT_STAT_CARD_ACTION_LABEL})]})]})};exports.StatCard=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A="#6366f1",T="dd",_="99",D="View All";exports.DEFAULT_STAT_CARD_ACTION_LABEL=D;exports.DEFAULT_STAT_CARD_COLOR=A;exports.STAT_CARD_GRADIENT_END_ALPHA=_;exports.STAT_CARD_GRADIENT_START_ALPHA=T;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export declare const STAT_CARD_ROOT_CLASS = "Bear-StatCard";
|
|
2
|
-
export declare const STAT_CARD_BASE_CLASSES = "bear-relative bear-overflow-hidden bear-rounded-2xl bear-p-6 bear-transition-transform hover:bear-scale-105 bear-cursor-pointer bear-border bear-border-[var(--bear-border-default)]";
|
|
3
|
-
export declare const STAT_CARD_DECORATION_CLASS = "Bear-StatCard__decoration bear-absolute bear-top-0 bear-right-0 bear-w-32 bear-h-32 -bear-mr-8 -bear-mt-8 bear-rounded-full bear-opacity-20 bear-bg-white";
|
|
4
|
-
export declare const STAT_CARD_BODY_CLASS = "Bear-StatCard__body bear-relative bear-z-10";
|
|
5
|
-
export declare const STAT_CARD_TITLE_CLASS = "Bear-StatCard__title bear-text-white/80 bear-text-sm bear-font-medium bear-mb-1";
|
|
6
|
-
export declare const STAT_CARD_VALUE_CLASS = "Bear-StatCard__value bear-text-white bear-text-3xl bear-font-bold bear-mb-4";
|
|
7
|
-
export declare const STAT_CARD_ACTION_CLASS = "Bear-StatCard__action bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-1.5 bear-bg-white/20 hover:bear-bg-white/30 bear-rounded-full bear-text-white bear-text-sm bear-font-medium bear-transition-colors bear-border-0";
|
|
8
1
|
export declare const DEFAULT_STAT_CARD_COLOR = "#6366f1";
|
|
9
2
|
export declare const STAT_CARD_GRADIENT_START_ALPHA = "dd";
|
|
10
3
|
export declare const STAT_CARD_GRADIENT_END_ALPHA = "99";
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const A = "#6366f1", T = "dd", _ = "99", D = "View All";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t as STAT_CARD_BODY_CLASS,
|
|
8
|
-
a as STAT_CARD_DECORATION_CLASS,
|
|
9
|
-
T as STAT_CARD_GRADIENT_END_ALPHA,
|
|
10
|
-
S as STAT_CARD_GRADIENT_START_ALPHA,
|
|
11
|
-
e as STAT_CARD_ROOT_CLASS,
|
|
12
|
-
b as STAT_CARD_TITLE_CLASS,
|
|
13
|
-
_ as STAT_CARD_VALUE_CLASS
|
|
3
|
+
D as DEFAULT_STAT_CARD_ACTION_LABEL,
|
|
4
|
+
A as DEFAULT_STAT_CARD_COLOR,
|
|
5
|
+
_ as STAT_CARD_GRADIENT_END_ALPHA,
|
|
6
|
+
T as STAT_CARD_GRADIENT_START_ALPHA
|
|
14
7
|
};
|
|
@@ -1,49 +1,60 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as S } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { resolveBearId as
|
|
5
|
-
import { useBearId as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
import { resolveBearId as D } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as N } from "../../utils/useBearId.js";
|
|
6
|
+
import { Button as h } from "../Button/Button.js";
|
|
7
|
+
import { Typography as d } from "../Typography/Typography.js";
|
|
8
|
+
import { DEFAULT_STAT_CARD_COLOR as B, STAT_CARD_GRADIENT_START_ALPHA as u, STAT_CARD_GRADIENT_END_ALPHA as v, DEFAULT_STAT_CARD_ACTION_LABEL as I } from "./StatCard.const.js";
|
|
9
|
+
import { handleStatCardKeyDown as f } from "./StatCard.utils.js";
|
|
10
|
+
const k = (i) => {
|
|
11
|
+
const {
|
|
12
|
+
title: n,
|
|
13
|
+
value: s,
|
|
14
|
+
color: o = B,
|
|
15
|
+
icon: m,
|
|
16
|
+
onClick: t,
|
|
17
|
+
className: c,
|
|
18
|
+
id: l,
|
|
19
|
+
testId: _,
|
|
20
|
+
...A
|
|
21
|
+
} = i, C = N("StatCard"), p = D(l, C), T = `linear-gradient(135deg, ${o}${u}, ${o}${v})`;
|
|
19
22
|
return /* @__PURE__ */ e(
|
|
20
23
|
"div",
|
|
21
24
|
{
|
|
22
|
-
id:
|
|
23
|
-
"data-testid":
|
|
24
|
-
role:
|
|
25
|
-
tabIndex:
|
|
26
|
-
className:
|
|
27
|
-
style: { background:
|
|
28
|
-
onClick:
|
|
29
|
-
onKeyDown: (
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
...D,
|
|
25
|
+
id: p,
|
|
26
|
+
"data-testid": _,
|
|
27
|
+
role: t ? "button" : void 0,
|
|
28
|
+
tabIndex: t ? 0 : void 0,
|
|
29
|
+
className: S("Bear-StatCard", c),
|
|
30
|
+
style: { background: T },
|
|
31
|
+
onClick: t,
|
|
32
|
+
onKeyDown: (r) => f(r, t),
|
|
33
|
+
...A,
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ e("div", { className:
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "Bear-StatCard__decoration", "aria-hidden": !0 }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "Bear-StatCard__body", children: [
|
|
37
|
+
/* @__PURE__ */ a(d, { className: "Bear-StatCard__title", children: n }),
|
|
38
|
+
/* @__PURE__ */ a(d, { className: "Bear-StatCard__value", children: s }),
|
|
39
|
+
t && /* @__PURE__ */ a(
|
|
40
|
+
h,
|
|
41
|
+
{
|
|
42
|
+
type: "button",
|
|
43
|
+
size: "sm",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
className: "Bear-StatCard__action",
|
|
46
|
+
icon: m,
|
|
47
|
+
onClick: (r) => {
|
|
48
|
+
r.stopPropagation(), t();
|
|
49
|
+
},
|
|
50
|
+
children: I
|
|
51
|
+
}
|
|
52
|
+
)
|
|
42
53
|
] })
|
|
43
54
|
]
|
|
44
55
|
}
|
|
45
56
|
);
|
|
46
57
|
};
|
|
47
58
|
export {
|
|
48
|
-
|
|
59
|
+
k as StatCard
|
|
49
60
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/keys.const.cjs"),a=(e,t)=>{t&&(e.key!==r.KEY_ENTER&&e.key!==r.KEY_SPACE||(e.preventDefault(),t()))};exports.handleStatCardKeyDown=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),H=require("../../context/BearProvider.cjs"),ee=require("../../utils/maxVisible.utils.cjs"),E=require("../../utils/cn.cjs"),F=require("../Typography/Typography.cjs"),ne=require("../Dropdown/Dropdown.cjs"),re=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),H=require("../../context/BearProvider.cjs"),ee=require("../../utils/maxVisible.utils.cjs"),E=require("../../utils/cn.cjs"),F=require("../Typography/Typography.cjs"),ne=require("../Dropdown/Dropdown.cjs"),re=require("@forgedevstack/bear-icons"),e=require("./Stepper.const.cjs"),L=require("./Stepper.utils.cjs"),te=1200,se=16,oe=640,U=3,ie=()=>r.jsx("svg",{width:e.CHECK_ICON_SIZE,height:e.CHECK_ICON_SIZE,viewBox:e.CHECK_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:r.jsx("polyline",{points:e.CHECK_ICON_POINTS})}),Ee=()=>r.jsxs("svg",{width:e.ERROR_ICON_SIZE,height:e.ERROR_ICON_SIZE,viewBox:e.ERROR_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),V=T.forwardRef(({steps:o,activeStep:_,onStepClick:S,orientation:W=e.DEFAULT_ORIENTATION,size:u=e.DEFAULT_SIZE,showNumbers:M=e.DEFAULT_SHOW_NUMBERS,clickable:R=e.DEFAULT_CLICKABLE,showConnectors:q=e.DEFAULT_SHOW_CONNECTORS,connectorStyle:m=e.DEFAULT_CONNECTOR_STYLE,alternativeLabel:g=e.DEFAULT_ALTERNATIVE_LABEL,completedIcon:Z,errorIcon:z,labelTypographyProps:K,descriptionTypographyProps:X,maxVisibleSteps:N,testId:Y,className:$,...k},G)=>{const P=H.useBearThemeOptional(),{direction:f}=H.useBearDirectionOptional(),[A,J]=T.useState(()=>typeof window<"u"?window.innerWidth:te);T.useEffect(()=>{const n=()=>J(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const d=T.useMemo(()=>{if(N!=null)return ee.resolveMaxVisible(N,{width:A,theme:P});if(A<oe&&o.length>U)return U},[N,A,P,o.length]),a=W==="horizontal",v=e.STEP_INDICATOR_SIZES[u],j=e.STEP_LABEL_SIZES[u],C=a&&d!=null&&o.length>d,{visibleIndices:B,leftHidden:b,rightHidden:h}=T.useMemo(()=>{if(!C||d==null)return{visibleIndices:o.map((l,I)=>I),leftHidden:[],rightHidden:[]};const n=d,t=Math.floor(n/2),s=Math.max(0,Math.min(_-t,o.length-n)),i=Array.from({length:n},(l,I)=>s+I),c=[],p=[];for(let l=0;l<s;l++)c.push(l);for(let l=s+n;l<o.length;l++)p.push(l);return{visibleIndices:i,leftHidden:c,rightHidden:p}},[C,d,o,_]),w=(n,t,s)=>{const i=e.STEP_STATUS_CLASSES[s],c=L.resolveIndicatorContent(n,t,s,M,Z,z,r.jsx(ie,{}),r.jsx(Ee,{}));return r.jsx("div",{className:E.cn(e.STEP_INDICATOR_BASE,v,i.indicator,R&&!n.disabled&&e.STEP_CLICKABLE_CLASSES),onClick:()=>{R&&!n.disabled&&S&&S(t)},children:c})},O=(n,t)=>{if(!q||t)return null;const s=n<_;return a?r.jsx("div",{className:E.cn(e.CONNECTOR_HORIZONTAL_LAYOUT,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)}):r.jsx("div",{className:E.cn(e.CONNECTOR_BASE,e.CONNECTOR_VERTICAL,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)})},x=(n,t)=>{const s=e.STEP_STATUS_CLASSES[t],i={...K,...n.labelTypographyProps},c={...X,...n.descriptionTypographyProps};return r.jsxs(r.Fragment,{children:[r.jsx(F.Typography,{variant:"body2",...i,className:E.cn(e.STEP_LABEL_BASE,j.label,s.label,i==null?void 0:i.className),children:n.label}),n.description&&r.jsx(F.Typography,{variant:"caption",...c,className:E.cn(e.STEP_DESCRIPTION_CLASSES,j.description,c==null?void 0:c.className),children:n.description})]})},y=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs("div",{className:E.cn(e.STEP_CONTENT_BASE,g?e.STEP_CONTENT_ALTERNATIVE:e.STEP_CONTENT_INLINE),children:[w(n,t,s),r.jsx("div",{className:E.cn(g?e.STEP_LABEL_ALTERNATIVE:e.STEP_LABEL_INLINE),children:x(n,s)})]})},Q=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:e.STEP_VERTICAL_INDICATOR_WRAP,children:w(n,t,s)}),r.jsxs("div",{className:e.STEP_VERTICAL_BODY,children:[x(n,s),n.content&&s==="active"&&r.jsx("div",{className:e.STEP_VERTICAL_CONTENT,children:n.content})]})]})},D=(n,t)=>r.jsx("div",{className:e.STEP_OVERFLOW_ROOT,children:r.jsx(ne.Dropdown,{placement:"bottom-start",closeOnSelect:!0,trigger:r.jsx("button",{type:"button",className:E.cn(e.STEP_INDICATOR_BASE,v,e.STEP_STATUS_CLASSES.pending.indicator,"bear-cursor-pointer bear-border-0"),"aria-label":t==="left"?e.OVERFLOW_LEFT_LABEL:e.OVERFLOW_RIGHT_LABEL,children:r.jsx(re.BearIcons.MoreHorizIcon,{size:se})}),items:n.map(s=>({key:`step-${s}`,label:o[s].label,disabled:o[s].disabled,onClick:()=>{o[s].disabled||S==null||S(s)}}))})},`overflow-${t}`);return r.jsxs("div",{ref:G,dir:f,className:E.cn(e.STEPPER_BASE_CLASSES,a?e.STEPPER_HORIZONTAL_CLASSES:e.STEPPER_VERTICAL_CLASSES,f==="rtl"&&a&&"bear-flex-row-reverse",$),"data-testid":Y,...k,children:[a&&!C&&o.map((n,t)=>r.jsxs(T.Fragment,{children:[y(n,t),O(t,t===o.length-1)]},t)),a&&C&&r.jsxs(r.Fragment,{children:[b.length>0&&r.jsxs(r.Fragment,{children:[D(b,"left"),O(-1,!1)]}),B.map((n,t)=>{const s=o[n],i=t===B.length-1&&h.length===0;return r.jsxs(T.Fragment,{children:[y(s,n),O(n,i)]},n)}),h.length>0&&D(h,"right")]}),!a&&o.map((n,t)=>r.jsxs("div",{className:E.cn("Bear-Stepper__step",e.STEP_WRAPPER_VERTICAL),children:[Q(n,t),O(t,t===o.length-1)]},t))]})});V.displayName="Stepper";exports.Stepper=V;
|
|
@@ -5,7 +5,7 @@ import { resolveMaxVisible as de } from "../../utils/maxVisible.utils.js";
|
|
|
5
5
|
import { cn as E } from "../../utils/cn.js";
|
|
6
6
|
import { Typography as M } from "../Typography/Typography.js";
|
|
7
7
|
import { Dropdown as _e } from "../Dropdown/Dropdown.js";
|
|
8
|
-
import { BearIcons as Te } from "
|
|
8
|
+
import { BearIcons as Te } from "@forgedevstack/bear-icons";
|
|
9
9
|
import { STEP_WRAPPER_VERTICAL as he, STEPPER_HORIZONTAL_CLASSES as Ne, STEPPER_VERTICAL_CLASSES as Oe, STEPPER_BASE_CLASSES as Se, DEFAULT_ORIENTATION as Ce, DEFAULT_SIZE as Ie, DEFAULT_SHOW_NUMBERS as Ae, DEFAULT_CLICKABLE as Le, DEFAULT_SHOW_CONNECTORS as me, DEFAULT_CONNECTOR_STYLE as Re, DEFAULT_ALTERNATIVE_LABEL as fe, STEP_LABEL_ALTERNATIVE as ue, STEP_LABEL_INLINE as ge, STEP_CONTENT_ALTERNATIVE as Pe, STEP_CONTENT_INLINE as ve, STEP_CONTENT_BASE as Be, CONNECTOR_DASHED_CLASSES as Z, CONNECTOR_STATUS as S, CONNECTOR_HORIZONTAL_LAYOUT as we, CONNECTOR_VERTICAL as be, CONNECTOR_BASE as pe, STEP_OVERFLOW_ROOT as He, OVERFLOW_LEFT_LABEL as We, OVERFLOW_RIGHT_LABEL as De, STEP_STATUS_CLASSES as m, STEP_INDICATOR_SIZES as Ve, STEP_INDICATOR_BASE as z, STEP_VERTICAL_INDICATOR_WRAP as ye, STEP_VERTICAL_BODY as Fe, STEP_VERTICAL_CONTENT as Ue, STEP_CLICKABLE_CLASSES as Me, STEP_LABEL_SIZES as Ze, STEP_LABEL_BASE as ze, STEP_DESCRIPTION_CLASSES as Ke, ERROR_ICON_VIEWBOX as Xe, ERROR_ICON_SIZE as K, CHECK_ICON_VIEWBOX as Ye, CHECK_ICON_SIZE as X, CHECK_ICON_POINTS as je } from "./Stepper.const.js";
|
|
10
10
|
import { resolveStepStatus as Y, resolveIndicatorContent as $e } from "./Stepper.utils.js";
|
|
11
11
|
const ke = 1200, Ge = 16, qe = 640, j = 3, Je = () => /* @__PURE__ */ t("svg", { width: X, height: X, viewBox: Ye, fill: "none", stroke: "currentColor", strokeWidth: "3", children: /* @__PURE__ */ t("polyline", { points: je }) }), Qe = () => /* @__PURE__ */ i("svg", { width: K, height: K, viewBox: Xe, fill: "none", stroke: "currentColor", strokeWidth: "3", children: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../constants/generals.const.cjs"),N=require("../../utils/cn.cjs");require("react");const m=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),B=require("../../utils/liveRegion.utils.cjs"),n=require("../Box/Box.cjs"),i=require("../Typography/Typography.cjs"),s=require("./StreamingMessage.const.cjs"),p=o=>{const{id:c,testId:S,content:r,isStreaming:t=s.STREAMING_MESSAGE_DEFAULT_STREAMING,sender:g=s.STREAMING_MESSAGE_DEFAULT_SENDER,live:E=s.STREAMING_MESSAGE_DEFAULT_LIVE,translations:_,className:d}=o,l=I.useBearId(a.COMPONENT_NAME_STREAMING_MESSAGE),u=m.resolveBearId(c,l),M={...s.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS,..._},A=E&&t?B.getBearLiveRegionProps("info"):{},T=typeof r=="string"?r:void 0;return e.jsxs(n.Box,{id:u,"data-testid":S,className:N.cn("Bear-StreamingMessage",`Bear-StreamingMessage--${g}`,d),...A,children:[e.jsxs(i.Typography,{variant:"body2",children:[r,t&&e.jsx(n.Box,{as:"span",className:"Bear-StreamingMessage__cursor","aria-hidden":a.BOOLEAN_FALSE})]}),t&&T&&e.jsx(i.Typography,{variant:"caption",className:"Bear-StreamingMessage__status",children:M.streamingLabel})]})};exports.StreamingMessage=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/generals.const.cjs"),S={streamingLabel:"Streaming"},A="assistant",_=E.BOOLEAN_FALSE,T=E.BOOLEAN_TRUE;exports.STREAMING_MESSAGE_DEFAULT_LIVE=T;exports.STREAMING_MESSAGE_DEFAULT_SENDER=A;exports.STREAMING_MESSAGE_DEFAULT_STREAMING=_;exports.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS=S;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StreamingMessageSender, StreamingMessageTranslations } from './StreamingMessage.types';
|
|
2
|
+
export declare const STREAMING_MESSAGE_DEFAULT_TRANSLATIONS: StreamingMessageTranslations;
|
|
3
|
+
export declare const STREAMING_MESSAGE_DEFAULT_SENDER: StreamingMessageSender;
|
|
4
|
+
export declare const STREAMING_MESSAGE_DEFAULT_STREAMING = false;
|
|
5
|
+
export declare const STREAMING_MESSAGE_DEFAULT_LIVE = true;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BOOLEAN_FALSE as E, BOOLEAN_TRUE as A } from "../../constants/generals.const.js";
|
|
2
|
+
const _ = {
|
|
3
|
+
streamingLabel: "Streaming"
|
|
4
|
+
}, T = "assistant", t = E, L = A;
|
|
5
|
+
export {
|
|
6
|
+
L as STREAMING_MESSAGE_DEFAULT_LIVE,
|
|
7
|
+
T as STREAMING_MESSAGE_DEFAULT_SENDER,
|
|
8
|
+
t as STREAMING_MESSAGE_DEFAULT_STREAMING,
|
|
9
|
+
_ as STREAMING_MESSAGE_DEFAULT_TRANSLATIONS
|
|
10
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_STREAMING_MESSAGE as N, BOOLEAN_FALSE as T } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as l } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as I } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as f } from "../../utils/useBearId.js";
|
|
7
|
+
import { getBearLiveRegionProps as G } from "../../utils/liveRegion.utils.js";
|
|
8
|
+
import { Box as a } from "../Box/Box.js";
|
|
9
|
+
import { Typography as o } from "../Typography/Typography.js";
|
|
10
|
+
import { STREAMING_MESSAGE_DEFAULT_STREAMING as L, STREAMING_MESSAGE_DEFAULT_SENDER as B, STREAMING_MESSAGE_DEFAULT_LIVE as R, STREAMING_MESSAGE_DEFAULT_TRANSLATIONS as v } from "./StreamingMessage.const.js";
|
|
11
|
+
const j = (i) => {
|
|
12
|
+
const {
|
|
13
|
+
id: n,
|
|
14
|
+
testId: m,
|
|
15
|
+
content: e,
|
|
16
|
+
isStreaming: r = L,
|
|
17
|
+
sender: E = B,
|
|
18
|
+
live: S = R,
|
|
19
|
+
translations: A,
|
|
20
|
+
className: _
|
|
21
|
+
} = i, c = f(N), d = I(n, c), p = { ...v, ...A }, M = S && r ? G("info") : {}, g = typeof e == "string" ? e : void 0;
|
|
22
|
+
return /* @__PURE__ */ t(
|
|
23
|
+
a,
|
|
24
|
+
{
|
|
25
|
+
id: d,
|
|
26
|
+
"data-testid": m,
|
|
27
|
+
className: l("Bear-StreamingMessage", `Bear-StreamingMessage--${E}`, _),
|
|
28
|
+
...M,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ t(o, { variant: "body2", children: [
|
|
31
|
+
e,
|
|
32
|
+
r && /* @__PURE__ */ s(
|
|
33
|
+
a,
|
|
34
|
+
{
|
|
35
|
+
as: "span",
|
|
36
|
+
className: "Bear-StreamingMessage__cursor",
|
|
37
|
+
"aria-hidden": T
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }),
|
|
41
|
+
r && g && /* @__PURE__ */ s(o, { variant: "caption", className: "Bear-StreamingMessage__status", children: p.streamingLabel })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
j as StreamingMessage
|
|
48
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type StreamingMessageSender = 'user' | 'assistant' | 'bot' | 'system';
|
|
3
|
+
export interface StreamingMessageTranslations {
|
|
4
|
+
streamingLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StreamingMessageProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
content: ReactNode;
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
sender?: StreamingMessageSender;
|
|
12
|
+
live?: boolean;
|
|
13
|
+
translations?: Partial<StreamingMessageTranslations>;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),C=require("../../utils/cn.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),C=require("../../utils/cn.cjs"),I=require("../../context/BearProvider.cjs"),z=require("../../utils/maxVisible.utils.cjs"),B=require("../Dropdown/Dropdown.cjs"),L=require("@forgedevstack/bear-icons"),N=require("./Tabs.cjs");function S(n){var l;return o.isValidElement(n)&&typeof n.type!="string"&&((l=n.props)==null?void 0:l.id)!=null}const _=({children:n,maxVisibleTabs:l,wrap:i=!1,className:q})=>{const f=o.useContext(N.TabsContext);if(!f)throw new Error("TabList must be used within Tabs");const v=I.useBearThemeOptional(),[x,E]=o.useState(()=>typeof window<"u"?window.innerWidth:1200);o.useEffect(()=>{const e=()=>E(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const a=o.useMemo(()=>z.resolveMaxVisible(l,{width:x,theme:v}),[l,x,v]),{activeTab:b,setActiveTab:M,variant:s}=f,w=o.Children.toArray(n).filter(S),c=w.map(e=>({id:e.props.id,label:e.props.children,disabled:e.props.disabled})),d=b?[b,...c.map(e=>e.id).filter(e=>e!==b)]:c.map(e=>e.id),h=a??d.length,k=d.slice(0,h),u=d.slice(h),p=u.includes(b),y=C.cn("Bear-Tabs__list",`Bear-Tabs__list--${s}`,a!=null&&!i&&"bear-flex bear-w-full bear-min-w-0 bear-items-stretch",(!a||i)&&"bear-flex bear-gap-1",i&&"bear-flex-wrap",!i&&!a&&"bear-gap-1",s==="line"&&"bear-border-b",s==="pills"&&"bear-p-1 bear-rounded-lg",s==="enclosed"&&"bear-border-b",q),g={...s==="line"||s==="enclosed"?{borderColor:"var(--bear-border-default)"}:{},...s==="pills"?{backgroundColor:"var(--bear-bg-tertiary)"}:{}},T=t.jsx(t.Fragment,{children:a!=null?k.map(e=>{const r=w.find(m=>m.props.id===e);return r?o.cloneElement(r,{key:r.props.id}):null}):n}),j=a!=null&&u.length>0?t.jsx("div",{className:"bear-flex bear-h-full bear-flex-shrink-0 bear-items-stretch",children:t.jsx(B.Dropdown,{placement:"bottom-end",closeOnSelect:!0,trigger:t.jsx("button",{type:"button",role:"tab","aria-haspopup":"listbox","aria-label":"More tabs",className:C.cn("bear-flex bear-h-full bear-items-center bear-gap-2 bear-px-3 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors bear-border-0 bear-cursor-pointer",s==="pills"&&"bear-rounded-md",p&&"bear-shadow-sm",!p&&"hover:bear-bg-[var(--bear-bg-tertiary)] hover:bear-text-[var(--bear-text-primary)]"),style:p?{backgroundColor:"var(--bear-bg-primary)",color:"var(--bear-text-primary)"}:{color:"var(--bear-text-muted)"},children:t.jsx(L.BearIcons.MoreHorizIcon,{size:18})}),items:u.map(e=>{const r=c.find(m=>m.id===e);return{key:e,label:(r==null?void 0:r.label)??e,disabled:r==null?void 0:r.disabled,onClick:()=>M(e)}})})}):null;return a!=null&&!i?t.jsxs("div",{role:"tablist",className:y,style:g,children:[t.jsx("div",{className:"bear-flex bear-min-w-0 bear-flex-1 bear-items-center bear-gap-1 bear-overflow-x-auto bear-overflow-y-visible bear-flex-nowrap",children:T}),j]}):t.jsxs("div",{role:"tablist",className:y,style:g,children:[T,j]})};exports.TabList=_;
|