@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
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Strong, reliable React UI components. AeroCraft-powered, zero config required. The protective force of ForgeStack.
|
|
4
4
|
|
|
5
|
+
[](https://ko-fi.com/forgestack)
|
|
6
|
+
|
|
7
|
+
Sponsor Bear on [Ko-fi](https://ko-fi.com/forgestack).
|
|
8
|
+
|
|
5
9
|
## Portal
|
|
6
10
|
|
|
7
11
|
Visit the [Bear UI Portal](https://bearui.com/) to explore all components, view live examples, and browse the documentation.
|
|
@@ -38,6 +42,8 @@ Public components generate root `id` values as `Bear-{Component}-{alphanumeric}`
|
|
|
38
42
|
|
|
39
43
|
## Installation
|
|
40
44
|
|
|
45
|
+
Bear installs `@forgedevstack/bear-icons` as an **optional dependency**. The default install includes components, theme, and icons.
|
|
46
|
+
|
|
41
47
|
```bash
|
|
42
48
|
npm install @forgedevstack/bear
|
|
43
49
|
# or
|
|
@@ -46,6 +52,30 @@ pnpm add @forgedevstack/bear
|
|
|
46
52
|
yarn add @forgedevstack/bear
|
|
47
53
|
```
|
|
48
54
|
|
|
55
|
+
### Install without icons
|
|
56
|
+
|
|
57
|
+
npm has no `--no-icons` flag. Skip the icon package with `--omit=optional`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install @forgedevstack/bear --omit=optional
|
|
61
|
+
# yarn
|
|
62
|
+
yarn add @forgedevstack/bear --ignore-optional
|
|
63
|
+
# pnpm
|
|
64
|
+
pnpm add @forgedevstack/bear --no-optional
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Do not import icons from `@forgedevstack/bear` after a no-icons install.
|
|
68
|
+
|
|
69
|
+
### Icons only
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install @forgedevstack/bear-icons
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { SearchIcon, BearIcons } from '@forgedevstack/bear-icons';
|
|
77
|
+
```
|
|
78
|
+
|
|
49
79
|
### Import CSS (Required)
|
|
50
80
|
|
|
51
81
|
Import the compiled CSS file once in your app:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../../../constants/generals.const.cjs"),r=require("../../../../utils/cn.cjs");require("react");const a=require("../../../Box/Box.cjs"),g=require("../../../Typography/Typography.cjs"),m=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../../../constants/generals.const.cjs"),r=require("../../../../utils/cn.cjs");require("react");const a=require("../../../Box/Box.cjs"),g=require("../../../Typography/Typography.cjs"),m=require("@forgedevstack/bear-icons"),p=require("../../hooks/useAccordion.cjs"),_=require("./AccordionItem.utils.cjs"),y=c=>{const{id:n,title:i,children:s,disabled:o=u.BOOLEAN_FALSE,icon:b,className:d}=c,{openItems:l,toggleItem:x}=p.useAccordion(),t=_.isAccordionItemOpen(l,n);return e.jsxs(a.Box,{className:r.cn("Bear-Accordion__item bear-bg-white dark:bear-bg-zinc-900",d),children:[e.jsxs("button",{type:"button",onClick:()=>!o&&x(n),disabled:o,className:r.cn("Bear-Accordion__trigger bear-w-full bear-flex bear-items-center bear-justify-between bear-px-4 bear-py-3 bear-text-left bear-font-medium bear-text-gray-900 dark:bear-text-white hover:bear-bg-gray-50 dark:hover:bear-bg-zinc-800 bear-transition-colors",o&&"Bear-Accordion__trigger--disabled bear-opacity-50 bear-cursor-not-allowed"),"aria-expanded":t,children:[e.jsx(g.Typography,{className:"Bear-Accordion__title",children:i}),e.jsx(a.Box,{className:"Bear-Accordion__icon",children:b||e.jsx(m.ChevronDownIcon,{className:r.cn("bear-w-5 bear-h-5 bear-text-gray-500 dark:bear-text-gray-400 bear-transition-transform bear-duration-200",t&&"bear-rotate-180")})})]}),e.jsx(a.Box,{className:r.cn("Bear-Accordion__content-wrapper","bear-overflow-hidden bear-transition-all bear-duration-200",t?"Bear-Accordion__content-wrapper--open bear-max-h-96":"bear-max-h-0"),children:e.jsx(a.Box,{className:"Bear-Accordion__content bear-px-4 bear-py-3 bear-text-gray-600 dark:bear-text-gray-300 bear-bg-gray-50 dark:bear-bg-zinc-800/50",children:s})})]})};exports.AccordionItem=y;
|
|
@@ -4,7 +4,7 @@ import { cn as e } from "../../../../utils/cn.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { Box as a } from "../../../Box/Box.js";
|
|
6
6
|
import { Typography as x } from "../../../Typography/Typography.js";
|
|
7
|
-
import { ChevronDownIcon as _ } from "
|
|
7
|
+
import { ChevronDownIcon as _ } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { useAccordion as h } from "../../hooks/useAccordion.js";
|
|
9
9
|
import { isAccordionItemOpen as f } from "./AccordionItem.utils.js";
|
|
10
10
|
const O = (c) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),h=require("react"),e=require("../../constants/generals.const.cjs"),R=require("../../utils/cn.cjs"),i=require("../Box/Box.cjs"),g=require("../Button/Button.cjs"),j=require("../Flex/Flex.cjs"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),h=require("react"),e=require("../../constants/generals.const.cjs"),R=require("../../utils/cn.cjs"),i=require("../Box/Box.cjs"),g=require("../Button/Button.cjs"),j=require("../Flex/Flex.cjs"),t=require("@forgedevstack/bear-icons"),b=require("../Typography/Typography.cjs"),x=require("./Alert.const.cjs"),S=I=>{const{severity:s=e.INFO,variant:o=e.VARIANT_STANDARD,title:A,icon:a=e.BOOLEAN_TRUE,action:u,closable:B=e.BOOLEAN_FALSE,onClose:c,children:_,className:E,testId:N,...L}=I,[O,T]=h.useState(e.BOOLEAN_TRUE);if(!O)return null;const l=o===e.VARIANT_FILLED,n=x.ALERT_SEVERITY_COLORS[s],m=()=>{T(e.BOOLEAN_FALSE),c==null||c()},d=a===e.BOOLEAN_FALSE?null:a!==e.BOOLEAN_TRUE?a:s===e.INFO?r.jsx(t.InfoIcon,{}):s==="success"?r.jsx(t.BearIcons.CheckCircleIcon,{}):s==="warning"?r.jsx(t.BearIcons.WarningIcon,{}):r.jsx(t.BearIcons.ErrorIcon,{});return r.jsxs(j.Flex,{role:"alert","aria-live":"polite",className:R.cn("Bear-Alert bear-items-start bear-gap-3 bear-p-4 bear-rounded-lg",x.ALERT_VARIANT_CLASSES[o](s),E),style:{backgroundColor:l?void 0:n.bg,borderColor:o===e.VARIANT_OUTLINED?n.border:void 0,color:l?void 0:n.text},"data-testid":N,...L,children:[d&&r.jsx(i.Box,{as:"span",className:"Bear-Alert__icon bear-flex-shrink-0 bear-mt-0.5",style:{color:l?"currentColor":n.icon},children:d}),r.jsxs(i.Box,{className:"Bear-Alert__content bear-flex-1 bear-min-w-0",children:[A&&r.jsx(b.Typography,{weight:"semibold",className:"Bear-Alert__title bear-mb-1",children:A}),_&&r.jsx(b.Typography,{className:"Bear-Alert__message bear-text-sm",children:_})]}),u&&r.jsx(i.Box,{className:"Bear-Alert__action bear-flex-shrink-0",children:u}),B&&r.jsx(g.Button,{variant:e.VARIANT_GHOST,onClick:m,className:"Bear-Alert__close bear-flex-shrink-0 bear-p-1","aria-label":e.LABEL_CLOSE_ALERT,children:r.jsx(t.CloseIcon,{})})]})};exports.Alert=S;
|
|
@@ -5,7 +5,7 @@ import { cn as V } from "../../utils/cn.js";
|
|
|
5
5
|
import { Box as c } from "../Box/Box.js";
|
|
6
6
|
import { Button as k } from "../Button/Button.js";
|
|
7
7
|
import { Flex as y } from "../Flex/Flex.js";
|
|
8
|
-
import { CloseIcon as F, InfoIcon as D, BearIcons as m } from "
|
|
8
|
+
import { CloseIcon as F, InfoIcon as D, BearIcons as m } from "@forgedevstack/bear-icons";
|
|
9
9
|
import { Typography as p } from "../Typography/Typography.js";
|
|
10
10
|
import { ALERT_SEVERITY_COLORS as w, ALERT_VARIANT_CLASSES as j } from "./Alert.const.js";
|
|
11
11
|
const Q = (N) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../constants/generals.const.cjs"),g=require("../../utils/cn.cjs");require("react");const j=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),h=require("../Box/Box.cjs"),o=require("../Button/Button.cjs"),a=require("../Flex/Flex.cjs"),i=require("../Typography/Typography.cjs"),B=require("./ApprovalCard.const.cjs"),b=c=>{const{id:l,testId:d,title:u,children:r,onApprove:t,onReject:n,translations:p,className:A}=c,x=q.useBearId(y.COMPONENT_NAME_APPROVAL_CARD),v=j.resolveBearId(l,x),s={...B.APPROVAL_CARD_DEFAULT_TRANSLATIONS,...p};return e.jsx(h.Box,{id:v,"data-testid":d,className:g.cn("Bear-ApprovalCard",A),children:e.jsxs(a.Flex,{direction:"column",gap:3,align:"start",children:[e.jsx(i.Typography,{variant:"subtitle1",children:u}),r&&e.jsx(i.Typography,{variant:"body2",children:r}),e.jsxs(a.Flex,{gap:2,children:[n&&e.jsx(o.Button,{type:"button",variant:"outline",size:"sm",onClick:n,children:s.rejectLabel}),t&&e.jsx(o.Button,{type:"button",variant:"primary",size:"sm",onClick:t,children:s.approveLabel})]})]})})};exports.ApprovalCard=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),A={approveLabel:e.LABEL_APPROVE,rejectLabel:e.LABEL_REJECT};exports.APPROVAL_CARD_DEFAULT_TRANSLATIONS=A;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_APPROVAL_CARD as u } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as b } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as C } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as N } from "../../utils/useBearId.js";
|
|
7
|
+
import { Box as y } from "../Box/Box.js";
|
|
8
|
+
import { Button as n } from "../Button/Button.js";
|
|
9
|
+
import { Flex as m } from "../Flex/Flex.js";
|
|
10
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
11
|
+
import { APPROVAL_CARD_DEFAULT_TRANSLATIONS as I } from "./ApprovalCard.const.js";
|
|
12
|
+
const E = (l) => {
|
|
13
|
+
const { id: s, testId: d, title: c, children: t, onApprove: o, onReject: e, translations: A, className: f } = l, v = N(u), h = C(s, v), i = { ...I, ...A };
|
|
14
|
+
return /* @__PURE__ */ r(y, { id: h, "data-testid": d, className: b("Bear-ApprovalCard", f), children: /* @__PURE__ */ a(m, { direction: "column", gap: 3, align: "start", children: [
|
|
15
|
+
/* @__PURE__ */ r(p, { variant: "subtitle1", children: c }),
|
|
16
|
+
t && /* @__PURE__ */ r(p, { variant: "body2", children: t }),
|
|
17
|
+
/* @__PURE__ */ a(m, { gap: 2, children: [
|
|
18
|
+
e && /* @__PURE__ */ r(n, { type: "button", variant: "outline", size: "sm", onClick: e, children: i.rejectLabel }),
|
|
19
|
+
o && /* @__PURE__ */ r(n, { type: "button", variant: "primary", size: "sm", onClick: o, children: i.approveLabel })
|
|
20
|
+
] })
|
|
21
|
+
] }) });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
E as ApprovalCard
|
|
25
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ApprovalCardTranslations {
|
|
3
|
+
approveLabel: string;
|
|
4
|
+
rejectLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ApprovalCardProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
onApprove?: () => void;
|
|
12
|
+
onReject?: () => void;
|
|
13
|
+
translations?: Partial<ApprovalCardTranslations>;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),T=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs");require("react");const g=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),x=require("../Badge/Badge.cjs"),n=require("../Box/Box.cjs"),I=require("../Button/Button.cjs"),h=require("../Flex/Flex.cjs"),j=require("../Typography/Typography.cjs"),a=require("./ArtifactCard.const.cjs"),p=i=>{const{id:c,testId:o,title:d,kind:r=a.ARTIFACT_CARD_DEFAULT_KIND,children:t,onOpen:s,translations:l,className:u}=i,A=q.useBearId(T.COMPONENT_NAME_ARTIFACT_CARD),B=g.resolveBearId(c,A),C={...a.ARTIFACT_CARD_DEFAULT_TRANSLATIONS,...l};return e.jsxs(n.Box,{id:B,"data-testid":o,className:_.cn("Bear-ArtifactCard",`Bear-ArtifactCard--${r}`,u),children:[e.jsxs(h.Flex,{align:"center",justify:"between",gap:2,children:[e.jsx(j.Typography,{variant:"subtitle2",children:d}),e.jsx(x.Badge,{size:"sm",children:r})]}),t&&e.jsx(n.Box,{className:"Bear-ArtifactCard__body",children:t}),s&&e.jsx(I.Button,{type:"button",variant:"ghost",size:"sm",onClick:s,children:C.openLabel})]})};exports.ArtifactCard=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../constants/generals.const.cjs"),T={openLabel:A.LABEL_OPEN_ARTIFACT},_="doc";exports.ARTIFACT_CARD_DEFAULT_KIND=_;exports.ARTIFACT_CARD_DEFAULT_TRANSLATIONS=T;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_ARTIFACT_CARD as C } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as T } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as _ } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as I } from "../../utils/useBearId.js";
|
|
7
|
+
import { Badge as N } from "../Badge/Badge.js";
|
|
8
|
+
import { Box as a } from "../Box/Box.js";
|
|
9
|
+
import { Button as h } from "../Button/Button.js";
|
|
10
|
+
import { Flex as B } from "../Flex/Flex.js";
|
|
11
|
+
import { Typography as R } from "../Typography/Typography.js";
|
|
12
|
+
import { ARTIFACT_CARD_DEFAULT_KIND as b, ARTIFACT_CARD_DEFAULT_TRANSLATIONS as g } from "./ArtifactCard.const.js";
|
|
13
|
+
const M = (m) => {
|
|
14
|
+
const {
|
|
15
|
+
id: n,
|
|
16
|
+
testId: s,
|
|
17
|
+
title: d,
|
|
18
|
+
kind: t = b,
|
|
19
|
+
children: o,
|
|
20
|
+
onOpen: e,
|
|
21
|
+
translations: c,
|
|
22
|
+
className: l
|
|
23
|
+
} = m, p = I(C), A = _(n, p), f = { ...g, ...c };
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
25
|
+
a,
|
|
26
|
+
{
|
|
27
|
+
id: A,
|
|
28
|
+
"data-testid": s,
|
|
29
|
+
className: T("Bear-ArtifactCard", `Bear-ArtifactCard--${t}`, l),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ i(B, { align: "center", justify: "between", gap: 2, children: [
|
|
32
|
+
/* @__PURE__ */ r(R, { variant: "subtitle2", children: d }),
|
|
33
|
+
/* @__PURE__ */ r(N, { size: "sm", children: t })
|
|
34
|
+
] }),
|
|
35
|
+
o && /* @__PURE__ */ r(a, { className: "Bear-ArtifactCard__body", children: o }),
|
|
36
|
+
e && /* @__PURE__ */ r(h, { type: "button", variant: "ghost", size: "sm", onClick: e, children: f.openLabel })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
M as ArtifactCard
|
|
43
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ArtifactCardKind = 'code' | 'doc' | 'preview';
|
|
3
|
+
export interface ArtifactCardTranslations {
|
|
4
|
+
openLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ArtifactCardProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
kind?: ArtifactCardKind;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
onOpen?: () => void;
|
|
13
|
+
translations?: Partial<ArtifactCardTranslations>;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),T=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),T=require("react"),h=require("../../constants/numbers.const.cjs"),b=require("../../constants/generals.const.cjs"),c=require("../../utils/cn.cjs"),x=require("../Box/Box.cjs"),E=require("@forgedevstack/bear-icons"),r=require("./Avatar.const.cjs"),S=n=>{const{showFallback:t,initials:s,src:i,alt:o,rest:A,onImageError:e}=n;return t?s?a.jsx(x.Box,{as:"span",className:"Bear-Avatar__initials bear-font-medium bear-text-gray-600 dark:bear-text-gray-300 bear-uppercase",children:s.slice(0,h.AVATAR_MAX_INITIALS)}):a.jsx(E.UserIcon,{className:"Bear-Avatar__placeholder bear-w-3/5 bear-h-3/5 bear-text-gray-400"}):a.jsx("img",{src:i,alt:o,onError:e,className:"Bear-Avatar__image bear-w-full bear-h-full bear-object-cover",...A})},I=n=>{const{src:t,alt:s=r.AVATAR_DEFAULTS.ALT,initials:i,size:o=r.AVATAR_DEFAULTS.SIZE,variant:A=r.AVATAR_DEFAULTS.VARIANT,status:e,bordered:l=b.BOOLEAN_FALSE,className:u,testId:d,...g}=n,[_,m]=T.useState(b.BOOLEAN_FALSE),v=!t||_;return a.jsxs("div",{className:c.cn("Bear-Avatar","bear-relative bear-inline-flex bear-items-center bear-justify-center","bear-bg-gray-200 dark:bear-bg-gray-700","bear-overflow-hidden",r.AVATAR_SIZE[o],r.AVATAR_VARIANT[A],l&&"Bear-Avatar--bordered bear-ring-2 bear-ring-white dark:bear-ring-gray-900",u),"data-testid":d,children:[S({showFallback:v,initials:i,src:t,alt:s,rest:g,onImageError:()=>m(!0)}),e&&a.jsx("span",{className:c.cn("Bear-Avatar__status",`Bear-Avatar__status--${e}`,"bear-absolute bear-bottom-0 bear-right-0","bear-w-1/4 bear-h-1/4 bear-min-w-[8px] bear-min-h-[8px]","bear-rounded-full bear-ring-2 bear-ring-white dark:bear-ring-gray-900",r.AVATAR_STATUS[e])})]})};exports.Avatar=I;
|
|
@@ -4,7 +4,7 @@ import { AVATAR_MAX_INITIALS as v } from "../../constants/numbers.const.js";
|
|
|
4
4
|
import { BOOLEAN_FALSE as A } from "../../constants/generals.const.js";
|
|
5
5
|
import { cn as m } from "../../utils/cn.js";
|
|
6
6
|
import { Box as T } from "../Box/Box.js";
|
|
7
|
-
import { UserIcon as I } from "
|
|
7
|
+
import { UserIcon as I } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { AVATAR_DEFAULTS as b, AVATAR_STATUS as x, AVATAR_VARIANT as E, AVATAR_SIZE as N } from "./Avatar.const.js";
|
|
9
9
|
const w = (s) => {
|
|
10
10
|
const { showFallback: a, initials: e, src: o, alt: i, rest: n, onImageError: r } = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),a=require("react"),u=require("../../constants/numbers.const.cjs"),i=require("../../constants/generals.const.cjs"),g=require("../../utils/cn.cjs"),L=require("../Button/Button.cjs"),U=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),a=require("react"),u=require("../../constants/numbers.const.cjs"),i=require("../../constants/generals.const.cjs"),g=require("../../utils/cn.cjs"),L=require("../Button/Button.cjs"),U=require("@forgedevstack/bear-icons"),t=require("./BackTop.const.cjs"),P=p=>{const{bottom:c=t.BACKTOP_DEFAULTS.BOTTOM,right:l=t.BACKTOP_DEFAULTS.RIGHT,visibleAt:d=t.BACKTOP_DEFAULTS.VISIBLE_AT,duration:b=t.BACKTOP_DEFAULTS.DURATION,target:T,children:B,size:A=t.BACKTOP_DEFAULTS.SIZE,variant:E=t.BACKTOP_DEFAULTS.VARIANT,animated:S=t.BACKTOP_DEFAULTS.ANIMATED,className:_,testId:h,onClick:o,...w}=p,[I,f]=a.useState(!1),n=t.BACKTOP_SIZES[A],s=a.useCallback(()=>T?T():typeof window<"u"?window:null,[T]);a.useEffect(()=>{const e=s();if(!e)return;const r=()=>{const C=e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop;f(C>=d)};return e.addEventListener("scroll",r,{passive:!0}),r(),()=>{e.removeEventListener("scroll",r)}},[s,d]);const m=a.useCallback(()=>{const e=s();if(!e)return;o==null||o();const r=b>u.ZERO?i.SCROLL_BEHAVIOR_SMOOTH:i.SCROLL_BEHAVIOR_AUTO;if(e===window){window.scrollTo({top:u.ZERO,behavior:r});return}e.scrollTo({top:u.ZERO,behavior:r})},[s,b,o]);return O.jsx(L.Button,{variant:E,size:t.BACKTOP_BUTTON_SIZE[A],className:g.cn("Bear-BackTop","!bear-rounded-full !bear-p-0","!bear-fixed !bear-shadow-lg bear-z-[9999]",S&&"bear-transition-all bear-duration-300 bear-ease-out",I?"bear-opacity-100 bear-translate-y-0 bear-scale-100":"bear-opacity-0 bear-translate-y-5 bear-scale-75 bear-pointer-events-none",_),style:{bottom:typeof c=="number"?`${c}${i.UNIT_PX}`:c,right:typeof l=="number"?`${l}${i.UNIT_PX}`:l,width:n.width,height:n.height,minWidth:n.width},onClick:m,"aria-label":"Scroll to top","data-testid":h,...w,children:B||O.jsx(U.ChevronsUpIcon,{size:n.iconSize})})};exports.BackTop=P;
|
|
@@ -4,7 +4,7 @@ import { ZERO as c } from "../../constants/numbers.const.js";
|
|
|
4
4
|
import { SCROLL_BEHAVIOR_SMOOTH as C, SCROLL_BEHAVIOR_AUTO as L, UNIT_PX as u } from "../../constants/generals.const.js";
|
|
5
5
|
import { cn as R } from "../../utils/cn.js";
|
|
6
6
|
import { Button as N } from "../Button/Button.js";
|
|
7
|
-
import { ChevronsUpIcon as z } from "
|
|
7
|
+
import { ChevronsUpIcon as z } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { BACKTOP_DEFAULTS as t, BACKTOP_SIZES as U, BACKTOP_BUTTON_SIZE as V } from "./BackTop.const.js";
|
|
9
9
|
const M = (f) => {
|
|
10
10
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),r=require("@forgedevstack/bear-icons");require("react/jsx-runtime");const a={dismissLabel:e.LABEL_DISMISS},n={info:r.InfoIcon,success:r.CheckCircleIcon,warning:r.WarningIcon,error:r.ErrorIcon},b={static:"",sticky:"bear-sticky bear-top-0 bear-z-40"},s={info:"bear-bg-[var(--bear-info-50,#eff6ff)] bear-text-[var(--bear-info-800,#1e40af)]",success:"bear-bg-[var(--bear-success-50,#f0fdf4)] bear-text-[var(--bear-success-800,#166534)]",warning:"bear-bg-[var(--bear-warning-50,#fffbeb)] bear-text-[var(--bear-warning-800,#92400e)]",error:"bear-bg-[var(--bear-danger-50,#fef2f2)] bear-text-[var(--bear-danger-800,#991b1b)]"};exports.BANNER_DEFAULT_ICON_MAP=n;exports.BANNER_DEFAULT_TRANSLATIONS=a;exports.BANNER_POSITION_CLASSES=b;exports.BANNER_SEVERITY_CLASSES=s;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { LABEL_DISMISS as r } from "../../constants/generals.const.js";
|
|
2
|
-
import { ErrorIcon as e, WarningIcon as a, CheckCircleIcon as b, InfoIcon as n } from "
|
|
3
|
-
|
|
2
|
+
import { ErrorIcon as e, WarningIcon as a, CheckCircleIcon as b, InfoIcon as n } from "@forgedevstack/bear-icons";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
const f = {
|
|
4
5
|
dismissLabel: r
|
|
5
|
-
},
|
|
6
|
+
}, t = {
|
|
6
7
|
info: n,
|
|
7
8
|
success: b,
|
|
8
9
|
warning: a,
|
|
9
10
|
error: e
|
|
10
|
-
},
|
|
11
|
+
}, i = {
|
|
11
12
|
static: "",
|
|
12
13
|
sticky: "bear-sticky bear-top-0 bear-z-40"
|
|
13
|
-
},
|
|
14
|
+
}, S = {
|
|
14
15
|
info: "bear-bg-[var(--bear-info-50,#eff6ff)] bear-text-[var(--bear-info-800,#1e40af)]",
|
|
15
16
|
success: "bear-bg-[var(--bear-success-50,#f0fdf4)] bear-text-[var(--bear-success-800,#166534)]",
|
|
16
17
|
warning: "bear-bg-[var(--bear-warning-50,#fffbeb)] bear-text-[var(--bear-warning-800,#92400e)]",
|
|
17
18
|
error: "bear-bg-[var(--bear-danger-50,#fef2f2)] bear-text-[var(--bear-danger-800,#991b1b)]"
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
t as BANNER_DEFAULT_ICON_MAP,
|
|
22
|
+
f as BANNER_DEFAULT_TRANSLATIONS,
|
|
23
|
+
i as BANNER_POSITION_CLASSES,
|
|
24
|
+
S as BANNER_SEVERITY_CLASSES
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("../../constants/generals.const.cjs"),o=require("../../utils/cn.cjs");require("react");const c=require("../Box/Box.cjs"),q=require("../Flex/Flex.cjs"),x=require("@forgedevstack/bear-icons"),s=require("../Typography/Typography.cjs"),n=require("./Blockquote.const.cjs"),m=t=>{const{cite:r,icon:l,color:a=p.COLOR_DEFAULT,children:i,className:b,testId:u,...d}=t;return e.jsx("blockquote",{className:o.cn("Bear-Blockquote bear-pl-4 bear-py-2 bear-border-l-4 bear-bg-gray-50 dark:bear-bg-zinc-800/50 bear-rounded-r bear-not-italic",n.BORDER_COLOR_MAP[a],b),"data-testid":u,cite:r,...d,children:e.jsxs(q.Flex,{className:"bear-gap-3",children:[e.jsx(c.Box,{as:"span",className:o.cn("bear-flex-shrink-0",n.ICON_COLOR_MAP[a]),children:l??e.jsx(x.QuoteIcon,{className:"bear-w-6 bear-h-6"})}),e.jsxs(c.Box,{className:"bear-flex-1 bear-min-w-0",children:[e.jsx(s.Typography,{variant:"body1",component:"span",children:i}),r&&e.jsxs(s.Typography,{variant:"caption",color:"secondary",component:"cite",className:"Bear-Blockquote__cite bear-mt-2 bear-block",children:["— ",r]})]})]})})};exports.Blockquote=m;
|
|
@@ -4,7 +4,7 @@ import { cn as t } from "../../utils/cn.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import { Box as c } from "../Box/Box.js";
|
|
6
6
|
import { Flex as f } from "../Flex/Flex.js";
|
|
7
|
-
import { QuoteIcon as h } from "
|
|
7
|
+
import { QuoteIcon as h } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { Typography as i } from "../Typography/Typography.js";
|
|
9
9
|
import { ICON_COLOR_MAP as N, BORDER_COLOR_MAP as O } from "./Blockquote.const.js";
|
|
10
10
|
const C = (m) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("react"),w=require("react-dom"),d=require("../../constants/numbers.const.cjs"),e=require("../../constants/generals.const.cjs"),g=require("../../constants/keys.const.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("react"),w=require("react-dom"),d=require("../../constants/numbers.const.cjs"),e=require("../../constants/generals.const.cjs"),g=require("../../constants/keys.const.cjs"),b=require("../../utils/cn.cjs"),l=require("../Box/Box.cjs"),R=require("../Button/Button.cjs"),E=require("../Flex/Flex.cjs"),j=require("@forgedevstack/bear-icons"),q=require("../Typography/Typography.cjs"),F=require("./BottomSheet.const.cjs"),v=A=>{const{isOpen:i,onClose:o,title:s,children:_,size:y=e.SIZE_MD,showCloseButton:m=e.BOOLEAN_TRUE,closeOnBackdrop:L=e.BOOLEAN_TRUE,closeOnEscape:O=e.BOOLEAN_TRUE,showHandle:N=e.BOOLEAN_TRUE,enableScroll:f=e.BOOLEAN_TRUE,isSticky:S=e.BOOLEAN_FALSE,className:p}=A,[a,h]=t.useState(i),[x,c]=t.useState(e.BOOLEAN_FALSE),[T,B]=t.useState(e.BOOLEAN_FALSE);t.useEffect(()=>{if(i){h(e.BOOLEAN_TRUE),c(e.BOOLEAN_FALSE);const n=requestAnimationFrame(()=>B(e.BOOLEAN_TRUE));return()=>cancelAnimationFrame(n)}if(a){B(e.BOOLEAN_FALSE),c(e.BOOLEAN_TRUE);const n=setTimeout(()=>{h(e.BOOLEAN_FALSE),c(e.BOOLEAN_FALSE)},d.THREE_HUNDRED);return()=>clearTimeout(n)}},[i,a]);const u=t.useCallback(n=>{O&&n.key===g.KEY_ESCAPE&&o()},[O,o]);if(t.useEffect(()=>(a&&(document.addEventListener("keydown",u),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}),[a,u]),!a)return null;const k=r.jsxs(E.Flex,{className:"bear-fixed bear-inset-0 bear-items-end bear-justify-center",style:{zIndex:d.BACKDROP_DEFAULT_Z_INDEX},children:[r.jsx(l.Box,{className:b.cn("bear-absolute bear-inset-0 bear-bg-black/60 bear-backdrop-blur-sm bear-transition-opacity",x?"bear-opacity-0":"bear-opacity-100"),style:{transitionDuration:`${d.THREE_HUNDRED}ms`},onClick:L?o:void 0,"aria-hidden":"true"}),r.jsxs(l.Box,{role:"dialog","aria-modal":"true","aria-labelledby":s?"bottom-sheet-title":void 0,className:b.cn("Bear-BottomSheet bear-relative bear-w-full bear-rounded-t-2xl bear-shadow-2xl bear-transition-transform bear-duration-300","bear-flex bear-flex-col bear-min-h-0 bear-overflow-hidden","bear-bg-white dark:bear-bg-neutral-900 bear-border-t bear-border-neutral-200 dark:bear-border-neutral-700",F.BOTTOM_SHEET_SIZE_CLASSES[y],T&&!x?"bear-translate-y-0":"bear-translate-y-full",p),children:[N&&r.jsx(E.Flex,{className:"bear-justify-center bear-pt-2 bear-pb-1",children:r.jsx(l.Box,{className:"bear-w-12 bear-h-1 bear-rounded-full bear-bg-neutral-300 dark:bear-bg-neutral-600","aria-hidden":!0})}),(s||m)&&r.jsxs(E.Flex,{className:b.cn("bear-items-center bear-justify-between bear-px-4 bear-py-3 bear-border-b bear-border-neutral-200 dark:bear-border-neutral-700 bear-shrink-0",S&&"bear-sticky bear-top-0 bear-z-10 bear-bg-white dark:bear-bg-neutral-900"),children:[s&&r.jsx(q.Typography,{id:"bottom-sheet-title",weight:"semibold",className:"bear-text-lg bear-text-neutral-900 dark:bear-text-white",children:s}),m&&r.jsx(R.Button,{variant:e.VARIANT_GHOST,onClick:o,"aria-label":e.LABEL_CLOSE,children:r.jsx(j.XIcon,{className:"bear-w-5 bear-h-5"})})]}),r.jsx(l.Box,{className:b.cn("bear-flex-1 bear-min-h-0 bear-p-4 bear-text-neutral-700 dark:bear-text-neutral-300",f?"bear-overflow-y-auto":"bear-overflow-hidden"),children:_})]})]});return w.createPortal(k,document.body)};exports.BottomSheet=v;
|
|
@@ -8,7 +8,7 @@ import { cn as i } from "../../utils/cn.js";
|
|
|
8
8
|
import { Box as l } from "../Box/Box.js";
|
|
9
9
|
import { Button as M } from "../Button/Button.js";
|
|
10
10
|
import { Flex as f } from "../Flex/Flex.js";
|
|
11
|
-
import { XIcon as z } from "
|
|
11
|
+
import { XIcon as z } from "@forgedevstack/bear-icons";
|
|
12
12
|
import { Typography as P } from "../Typography/Typography.js";
|
|
13
13
|
import { BOTTOM_SHEET_SIZE_CLASSES as U } from "./BottomSheet.const.js";
|
|
14
14
|
const ae = (N) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),v=require("../../context/BearProvider.cjs"),Z=require("../../utils/maxVisible.utils.cjs"),w=require("../../utils/cn.cjs"),D=require("../Dropdown/Dropdown.cjs"),d=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("react"),v=require("../../context/BearProvider.cjs"),Z=require("../../utils/maxVisible.utils.cjs"),w=require("../../utils/cn.cjs"),D=require("../Dropdown/Dropdown.cjs"),d=require("@forgedevstack/bear-icons"),l=require("./Breadcrumbs.const.cjs"),V=_=>{const{items:n,separator:k,maxItems:p,itemsBeforeCollapse:h=l.BREADCRUMBS_DEFAULTS.ITEMS_BEFORE_COLLAPSE,itemsAfterCollapse:u=l.BREADCRUMBS_DEFAULTS.ITEMS_AFTER_COLLAPSE,className:A,size:x=l.BREADCRUMBS_DEFAULTS.SIZE,showHomeIcon:z=l.BREADCRUMBS_DEFAULTS.SHOW_HOME_ICON,testId:M,"aria-label":O="Breadcrumb"}=_,I=v.useBearThemeOptional(),{direction:f}=v.useBearDirectionOptional(),[o,E]=b.useState(null),[U,S]=b.useState({}),[B,L]=b.useState(()=>typeof window<"u"?window.innerWidth:1200);b.useEffect(()=>{const e=()=>L(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),b.useEffect(()=>{E(null),S({})},[n]);const C=b.useMemo(()=>p==null?void 0:Z.resolveMaxVisible(p,{width:B,theme:I}),[p,B,I]),T=()=>k||(f==="rtl"?r.jsx(d.BearIcons.ChevronLeftIcon,{className:w.cn(l.BREADCRUMBS_ICON_SIZE[x],"bear-text-zinc-500 bear-mx-2")}):r.jsx(d.BearIcons.ChevronRightIcon,{className:w.cn(l.BREADCRUMBS_ICON_SIZE[x],"bear-text-zinc-500 bear-mx-2")})),y=(e,s,t)=>{const a=r.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1 bear-max-w-[12rem] bear-truncate md:bear-max-w-none",children:[s===0&&z&&r.jsx(d.BearIcons.HomeIcon,{className:l.BREADCRUMBS_ICON_SIZE[x]}),e.icon,e.label]}),c=t?r.jsx("span",{className:"bear-text-zinc-300 bear-font-medium","aria-current":"page",children:a}):e.href?r.jsx("a",{href:e.href,className:"bear-text-zinc-400 hover:bear-text-primary-400 bear-transition-colors bear-truncate",children:a}):e.onClick?r.jsx("button",{type:"button",onClick:e.onClick,className:"bear-text-zinc-400 hover:bear-text-primary-400 bear-transition-colors bear-truncate",children:a}):r.jsx("span",{className:"bear-text-zinc-400 bear-truncate",children:a});if(e.dropdownItems&&e.dropdownItems.length>0&&!t){const m=U[s],N=e.dropdownItems.find(i=>i.key===m);return r.jsx(D.Dropdown,{placement:"bottom-start",closeOnSelect:!0,trigger:r.jsxs("button",{type:"button",className:"bear-inline-flex bear-items-center bear-gap-1 bear-text-zinc-400 hover:bear-text-primary-400 bear-transition-colors","aria-haspopup":"true",children:[a,N&&r.jsx("span",{className:"bear-ml-1 bear-max-w-[8rem] bear-truncate bear-text-xs bear-text-zinc-300",children:N.label}),r.jsx(d.BearIcons.ChevronDownIcon,{size:14})]}),items:e.dropdownItems.map(i=>({key:i.key,label:i.label,disabled:i.disabled,selected:m===i.key,onClick:()=>{var g;S(H=>({...H,[s]:i.key})),(g=i.onClick)==null||g.call(i)}}))})}return c},P=C!=null&&n.length>C,j=h,q=n.length-u;let R=n.map((e,s)=>({type:"item",item:e,index:s}));if(P){const e=n.slice(0,h),s=n.slice(-u),t=n.slice(h,n.length-u);R=[...e.map((a,c)=>({type:"item",item:a,index:c})),...t.length?[{type:"ellipsis",hidden:t}]:[],...s.map((a,c)=>({type:"item",item:a,index:n.length-u+c}))]}const F=o!=null&&o>=j&&o<q;return r.jsx("nav",{dir:f,"data-testid":M,className:w.cn("bear-flex bear-min-w-0 bear-items-center bear-flex-wrap",l.BREADCRUMBS_SIZE[x],A),"aria-label":O,children:r.jsx("ol",{className:"bear-flex bear-min-w-0 bear-items-center bear-flex-wrap bear-list-none bear-p-0 bear-m-0",children:R.map((e,s)=>r.jsxs("li",{className:"bear-flex bear-min-w-0 bear-items-center",children:[s>0&&r.jsx("span",{"aria-hidden":"true",children:T()}),e.type==="ellipsis"?r.jsxs("span",{className:"bear-inline-flex bear-min-w-0 bear-max-w-full bear-items-center bear-gap-1",children:[r.jsx(D.Dropdown,{placement:"bottom-start",closeOnSelect:!0,trigger:r.jsx("button",{type:"button",className:"bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-px-2 bear-py-1 bear-text-zinc-400 hover:bear-bg-[var(--bear-bg-tertiary)] hover:bear-text-primary-400 bear-transition-colors","aria-label":"Hidden breadcrumbs",children:r.jsx(d.BearIcons.MoreHorizIcon,{size:18})}),items:e.hidden.map((t,a)=>{const c=j+a;return{key:`${t.label}-${a}`,label:t.label,onClick:()=>{var m;E(c),(m=t.onClick)==null||m.call(t)}}})}),F&&o!=null&&r.jsx("span",{className:"bear-min-w-0 bear-max-w-[12rem] bear-truncate md:bear-max-w-none bear-inline-flex bear-items-center",children:y(n[o],o,o===n.length-1)})]}):y(e.item,e.index,e.index===n.length-1)]},s))})})};exports.Breadcrumbs=V;
|
|
@@ -4,7 +4,7 @@ import { useBearThemeOptional as K, useBearDirectionOptional as q } from "../../
|
|
|
4
4
|
import { resolveMaxVisible as G } from "../../utils/maxVisible.utils.js";
|
|
5
5
|
import { cn as w } from "../../utils/cn.js";
|
|
6
6
|
import { Dropdown as _ } from "../Dropdown/Dropdown.js";
|
|
7
|
-
import { BearIcons as b } from "
|
|
7
|
+
import { BearIcons as b } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { BREADCRUMBS_DEFAULTS as h, BREADCRUMBS_SIZE as J, BREADCRUMBS_ICON_SIZE as I } from "./Breadcrumbs.const.js";
|
|
9
9
|
const le = (D) => {
|
|
10
10
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),ze=require("../../constants/numbers.const.cjs"),pe=require("../../constants/generals.const.cjs"),w=require("../../utils/cn.cjs"),fe=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");require("../../context/BearProvider.cjs");const l=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),Oe=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const v=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),ze=require("../../constants/numbers.const.cjs"),pe=require("../../constants/generals.const.cjs"),w=require("../../utils/cn.cjs"),fe=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");require("../../context/BearProvider.cjs");const l=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),Oe=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const v=require("@forgedevstack/bear-icons"),F=require("../OverlayPortal/OverlayPortal.const.cjs"),Be=require("../Transition/Transition.cjs"),je=require("../Transition/Transition.const.cjs"),s=require("./Calendar.const.cjs"),u=require("./Calendar.utils.cjs"),De=require("./Calendar.helpers.cjs"),Re=P=>{const{viewDate:A,value:L=null,onSelect:g,onViewChange:n,minDate:z,maxDate:p,disabledDates:M=[],highlightedDates:Y=[],weekdayLabels:S=s.DEFAULT_WEEKDAYS,firstDayOfWeek:m=s.NUMBER.ZERO,showWeekNumbers:Te=!1,slots:r={},clearable:ae=!0,onClear:h,showTodayButton:te=!0,onToday:x,bis:ne,style:oe,inline:q=!1,className:se,open:I}=P,{openEffect:_,closeEffect:N}=Oe.resolveOverlayEffects(P),i=A.getFullYear(),U=fe.useBearStyles(ne,oe),c=A.getMonth(),ie=b.useMemo(()=>new Date,[]),f=b.useCallback(()=>{n==null||n(new Date(i-s.NUMBER.ONE,c,s.NUMBER.ONE))},[i,c,n]),W=b.useCallback(()=>{n==null||n(new Date(i,c-s.NUMBER.ONE,s.NUMBER.ONE))},[i,c,n]),H=b.useCallback(()=>{n==null||n(new Date(i,c+s.NUMBER.ONE,s.NUMBER.ONE))},[i,c,n]),O=b.useCallback(()=>{n==null||n(new Date(i+s.NUMBER.ONE,c,s.NUMBER.ONE))},[i,c,n]),B=W,j=H,ce={onPrevYear:f,onPrevMonth:W,onNextMonth:H,onNextYear:O},be=b.useCallback(t=>z&&t<z||p&&t>p?!0:M.some(a=>u.isSameDay(a,t)),[z,p,M]),de=b.useCallback(t=>Y.some(a=>u.isSameDay(a,t)),[Y]),le=b.useMemo(()=>u.buildCalendarGrid(i,c,m),[i,c,m]),G=b.useMemo(()=>u.reorderWeekdays(S,m),[S,m]),V=s.MONTHS[c],D=L!=null,ue=q?"Bear-Calendar Bear-Calendar--inline bear-block bear-w-full bear-bg-white dark:bear-bg-zinc-900 bear-rounded-xl bear-shadow-none bear-border bear-border-zinc-200 dark:bear-border-zinc-700 bear-p-4 bear-text-zinc-900 dark:bear-text-zinc-100":"Bear-Calendar Bear-Calendar--dropdown bear-mt-2 bear-bg-white dark:bear-bg-zinc-900 bear-rounded-xl bear-shadow-xl bear-border bear-border-zinc-200 dark:bear-border-zinc-700 bear-p-4 bear-w-80 bear-text-zinc-900 dark:bear-text-zinc-100",Z=q?void 0:{zIndex:s.CALENDAR_DROPDOWN_Z_INDEX},he=()=>{if(r.header)return r.header({month:V,year:i,onPrev:B,onNext:j,nav:ce});const t=r.navPrevYear,a=r.navPrev,o=r.navNext,d=r.navNextYear,C=r.headerLabel||De.DefaultHeaderLabel;return e.jsxs("div",{className:"Bear-Calendar__header bear-flex bear-items-center bear-justify-between bear-gap-1 bear-mb-4",children:[e.jsxs("div",{className:"Bear-Calendar__nav-left bear-flex bear-items-center bear-gap-0.5",children:[t?t({onClick:f}):e.jsx("button",{type:"button",onClick:f,className:"Bear-Calendar__nav-btn bear-p-1.5 bear-rounded bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800 bear-transition-colors","aria-label":"Previous year",children:e.jsx(v.ChevronsLeftIcon,{size:16})}),a?a({onClick:B}):e.jsx("button",{type:"button",onClick:B,className:"Bear-Calendar__nav-btn bear-p-1.5 bear-rounded bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800 bear-transition-colors","aria-label":"Previous month",children:e.jsx(v.ChevronLeftIcon,{size:16})})]}),C({month:V,year:i}),e.jsxs("div",{className:"Bear-Calendar__nav-right bear-flex bear-items-center bear-gap-0.5",children:[o?o({onClick:j}):e.jsx("button",{type:"button",onClick:j,className:"Bear-Calendar__nav-btn bear-p-1.5 bear-rounded bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800 bear-transition-colors","aria-label":"Next month",children:e.jsx(v.ChevronRightIcon,{size:16})}),d?d({onClick:O}):e.jsx("button",{type:"button",onClick:O,className:"Bear-Calendar__nav-btn bear-p-1.5 bear-rounded bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800 bear-transition-colors","aria-label":"Next year",children:e.jsx(v.ChevronsRightIcon,{size:16})})]})]})},xe=()=>{if(r.weekdays)return r.weekdays({days:G});const t=r.weekday;return e.jsx("div",{className:"Bear-Calendar__weekdays bear-grid bear-grid-cols-7 bear-gap-1 bear-mb-2",children:G.map(a=>t?e.jsx("div",{children:t({label:a})},a):e.jsx("div",{className:w.cn("Bear-Calendar__weekday bear-text-center bear-text-xs bear-font-medium bear-uppercase bear-text-zinc-500 dark:bear-text-zinc-400",s.WEEKEND_LABELS.includes(a)&&"bear-text-red-500"),children:a},a))})},_e=(t,a)=>{const{date:o,isCurrentMonth:d}=t,C=o.getDate(),ke=o.getDay(),ve=u.isWeekendDay(ke),y=u.isSameDay(L,o),T=u.isSameDay(ie,o),k=be(o),ee=de(o),re=()=>{k||g==null||g(o)},ge={date:o,day:C,isCurrentMonth:d,isSelected:y,isToday:T,isDisabled:k,isHighlighted:ee,onClick:re};return r.day?e.jsx("span",{children:r.day(ge)},a):e.jsx("button",{type:"button",onClick:re,disabled:k,className:w.cn("Bear-Calendar__day bear-w-8 bear-h-8 bear-rounded-full bear-text-sm bear-font-medium bear-transition-colors bear-flex bear-items-center bear-justify-center",y&&"Bear-Calendar__day--selected bear-bg-primary-500 bear-text-white hover:bear-bg-primary-600",!y&&T&&"Bear-Calendar__day--today bear-ring-2 bear-ring-primary-500/50 bear-bg-transparent",!y&&!T&&(d?ve?"Bear-Calendar__day--weekend bear-text-red-500 dark:bear-text-red-400 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800":"bear-text-zinc-700 dark:bear-text-zinc-300 hover:bear-bg-zinc-100 dark:hover:bear-bg-zinc-800":"Bear-Calendar__day--other bear-text-zinc-500 dark:bear-text-zinc-600 hover:bear-bg-zinc-50 dark:hover:bear-bg-zinc-800/50"),ee&&!y&&"Bear-Calendar__day--highlighted bear-bg-primary-500/15",k&&"Bear-Calendar__day--disabled bear-opacity-40 bear-cursor-not-allowed"),children:C},a)},Ne=()=>{const t=le.map((a,o)=>_e(a,o));return r.daysGrid?r.daysGrid({children:t,className:"Bear-Calendar__grid bear-grid bear-grid-cols-7 bear-gap-1"}):e.jsx("div",{className:"Bear-Calendar__grid bear-grid bear-grid-cols-7 bear-gap-1",children:t})},ye=()=>{const t=ae&&D&&h,a=te&&x;if(!t&&!a)return null;if(r.footer){const o=r.clearButton,d=r.todayButton;return r.footer({children:e.jsxs("div",{className:"Bear-Calendar__footer bear-flex bear-justify-between bear-gap-2 bear-mt-4 bear-pt-3 bear-border-t bear-border-zinc-200 dark:bear-border-zinc-700",children:[t&&o?o({onClick:h,hasSelection:D}):t?e.jsx("button",{type:"button",onClick:h,className:"Bear-Calendar__clear-btn bear-text-sm bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-text-zinc-700 dark:hover:bear-text-zinc-200 bear-transition-colors",children:"Clear"}):e.jsx("span",{}),a&&d?d({onClick:x}):a?e.jsx("button",{type:"button",onClick:x,className:"Bear-Calendar__today-btn bear-text-sm bear-text-primary-600 dark:bear-text-primary-400 hover:bear-text-primary-700 dark:hover:bear-text-primary-300 bear-font-medium",children:"Today"}):null]})})}return r.clearButton&&r.todayButton?e.jsxs("div",{className:"Bear-Calendar__footer bear-flex bear-justify-between bear-gap-2 bear-mt-4 bear-pt-3 bear-border-t bear-border-zinc-200 dark:bear-border-zinc-700",children:[t&&r.clearButton({onClick:h,hasSelection:D}),a&&r.todayButton({onClick:x})]}):e.jsxs("div",{className:"Bear-Calendar__footer bear-flex bear-justify-between bear-gap-2 bear-mt-4 bear-pt-3 bear-border-t bear-border-zinc-200 dark:bear-border-zinc-700",children:[t?e.jsx("button",{type:"button",onClick:h,className:"Bear-Calendar__clear-btn bear-text-sm bear-text-zinc-500 dark:bear-text-zinc-400 hover:bear-text-zinc-700 dark:hover:bear-text-zinc-200 bear-transition-colors",children:"Clear"}):e.jsx("span",{}),a?e.jsx("button",{type:"button",onClick:x,className:"Bear-Calendar__today-btn bear-text-sm bear-text-primary-400 hover:bear-text-primary-300 bear-font-medium bear-transition-colors",children:"Today"}):null]})},K=e.jsxs(e.Fragment,{children:[he(),xe(),Ne(),ye()]}),X=w.cn(ue,se),J=Object.keys(U).length?U:void 0,me=Z?{...J,...Z}:J,R=r.root?r.root({children:K,className:X}):e.jsx("div",{className:X,style:me,children:K}),Ee=I!==void 0,E=I??pe.BOOLEAN_TRUE;if(!(Ee&&(_!==l.OVERLAY_OPEN_EFFECT_NONE||N!==l.OVERLAY_OPEN_EFFECT_NONE)))return R;const Q=E?_:N,$=Q===l.OVERLAY_OPEN_EFFECT_NONE?_===l.OVERLAY_OPEN_EFFECT_NONE?N===l.OVERLAY_OPEN_EFFECT_NONE?void 0:F.OVERLAY_EFFECT_TRANSITION[N]:F.OVERLAY_EFFECT_TRANSITION[_]:F.OVERLAY_EFFECT_TRANSITION[Q],Ce=E&&_===l.OVERLAY_OPEN_EFFECT_NONE||!E&&N===l.OVERLAY_OPEN_EFFECT_NONE;return $?e.jsx(Be.Transition,{show:E,name:$,duration:Ce?ze.ZERO:je.DEFAULT_DURATION,children:R}):R};exports.Calendar=Re;
|
|
@@ -9,7 +9,7 @@ import "../../context/BearProvider.js";
|
|
|
9
9
|
import { OVERLAY_OPEN_EFFECT_NONE as l } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
10
10
|
import { resolveOverlayEffects as we } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
11
11
|
import "../FormControl/FormControl.context.js";
|
|
12
|
-
import { ChevronsLeftIcon as Oe, ChevronLeftIcon as Te, ChevronRightIcon as Pe, ChevronsRightIcon as Le } from "
|
|
12
|
+
import { ChevronsLeftIcon as Oe, ChevronLeftIcon as Te, ChevronRightIcon as Pe, ChevronsRightIcon as Le } from "@forgedevstack/bear-icons";
|
|
13
13
|
import { OVERLAY_EFFECT_TRANSITION as Y } from "../OverlayPortal/OverlayPortal.const.js";
|
|
14
14
|
import { Transition as Re } from "../Transition/Transition.js";
|
|
15
15
|
import { DEFAULT_DURATION as Ye } from "../Transition/Transition.const.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../constants/numbers.const.cjs"),p=require("../../utils/cn.cjs");require("react");const V=require("../../utils/generateBearId.utils.cjs"),w=require("../../utils/useBearId.cjs"),c=require("./Chart.const.cjs"),x=require("./Chart.utils.cjs"),z=g=>{const{data:i,height:m=c.CHART.DEFAULT_HEIGHT,showLabels:h=!0,showValues:v=!1,animated:R=!0,color:$,orientation:b="vertical",barRadius:r=c.CHART.DEFAULT_BAR_RADIUS,barGap:A=c.CHART.DEFAULT_BAR_GAP,stacked:l=!1,className:E,id:N,testId:j,...T}=g,O=w.useBearId("BarChart"),k=V.resolveBearId(N,O),d=i.map(a=>x.getStackTotal(a.stacks,a.value)),q=Math.max(...d,s.ONE),t=b==="vertical",y={"--Bear-Chart-height":`${m}px`,"--Bear-Chart-gap":`${A}rem`};return e.jsx("div",{id:k,"data-testid":j,className:p.cn("Bear-Chart Bear-Chart--bar",t?"Bear-Chart--vertical":"Bear-Chart--horizontal",E),style:y,...T,children:e.jsx("div",{className:"Bear-Chart__track",children:i.map((a,u)=>{const C=l&&a.stacks&&a.stacks.length>s.ZERO?a.stacks:[a.value],o=d[u],I={"--Bear-Chart-size":`${o/q*c.CHART.VIEWBOX}%`};return e.jsxs("div",{className:"Bear-Chart__col",children:[h&&!t&&e.jsx("span",{className:"Bear-Chart__label",children:a.label}),e.jsx("div",{className:"Bear-Chart__plot",children:e.jsx("div",{className:p.cn("Bear-Chart__stack",R&&(t?"animate-grow-up":"animate-grow-right")),style:I,children:C.map((H,n)=>{const S=o>s.ZERO?H/o*c.CHART.VIEWBOX:s.ZERO,L=n===s.ZERO,B=n===C.length-s.ONE,_=l?t?B?`${r}px ${r}px 0 0`:"0":B?`0 ${r}px ${r}px 0`:"0":t?`${r}px ${r}px 0 0`:`0 ${r}px ${r}px 0`,P={"--Bear-Chart-segment":`${S}%`,"--Bear-Chart-color":x.getChartColor(l?n:u,a.color||$),"--Bear-Chart-radius":_};return e.jsx("div",{className:"Bear-Chart__segment",style:P},`${a.label}-${n}`)})})}),v&&e.jsx("span",{className:"Bear-Chart__value",children:o}),h&&t&&e.jsx("span",{className:"Bear-Chart__label",children:a.label})]},a.label)})})})};exports.BarChart=z;
|