@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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChatMessage } from '../Chat/Chat.types';
|
|
2
|
+
export interface ChatBubbleProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
testId?: string;
|
|
5
|
+
message: ChatMessage;
|
|
6
|
+
showTimestamp?: boolean;
|
|
7
|
+
showStatus?: boolean;
|
|
8
|
+
showAvatar?: boolean;
|
|
9
|
+
userAvatar?: string;
|
|
10
|
+
botAvatar?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ChatBubble.const.cjs"),r=e=>e==="user",o=e=>e==="system",i=(e,n,a)=>e.avatar?e.avatar:r(e.sender)?n:a,u=e=>e.name?e.name[0]:r(e.sender)?t.CHAT_BUBBLE_USER_INITIAL:t.CHAT_BUBBLE_BOT_INITIAL,B=e=>{if(e)return e.toLocaleTimeString([],{hour:t.CHAT_BUBBLE_TIME_DIGIT,minute:t.CHAT_BUBBLE_TIME_DIGIT})};exports.formatChatBubbleTime=B;exports.isChatSystemSender=o;exports.isChatUserSender=r;exports.resolveChatBubbleAvatar=i;exports.resolveChatBubbleInitial=u;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChatMessage } from '../Chat/Chat.types';
|
|
2
|
+
export declare const isChatUserSender: (sender: ChatMessage["sender"]) => sender is "user";
|
|
3
|
+
export declare const isChatSystemSender: (sender: ChatMessage["sender"]) => sender is "system";
|
|
4
|
+
export declare const resolveChatBubbleAvatar: (message: ChatMessage, userAvatar?: string, botAvatar?: string) => string | undefined;
|
|
5
|
+
export declare const resolveChatBubbleInitial: (message: ChatMessage) => string;
|
|
6
|
+
export declare const formatChatBubbleTime: (timestamp?: Date) => string | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CHAT_BUBBLE_TIME_DIGIT as t, CHAT_BUBBLE_USER_INITIAL as a, CHAT_BUBBLE_BOT_INITIAL as B } from "./ChatBubble.const.js";
|
|
2
|
+
const e = (r) => r === "user", u = (r) => r === "system", I = (r, n, o) => r.avatar ? r.avatar : e(r.sender) ? n : o, T = (r) => r.name ? r.name[0] : e(r.sender) ? a : B, _ = (r) => {
|
|
3
|
+
if (r)
|
|
4
|
+
return r.toLocaleTimeString([], {
|
|
5
|
+
hour: t,
|
|
6
|
+
minute: t
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
_ as formatChatBubbleTime,
|
|
11
|
+
u as isChatSystemSender,
|
|
12
|
+
e as isChatUserSender,
|
|
13
|
+
I as resolveChatBubbleAvatar,
|
|
14
|
+
T as resolveChatBubbleInitial
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../Flex/Flex.cjs"),u=require("../../Typography/Typography.cjs"),l=require("../../../utils/cn.cjs");require("react");const b=t=>{const{id:r,testId:s,message:a,className:n}=t;return e.jsx(c.Flex,{id:r,testId:s,className:l.cn("Bear-ChatBubble","Bear-ChatBubble--system",n),justify:"center",children:e.jsx(u.Typography,{variant:"caption",className:"Bear-ChatBubble__bubble",children:a.content})})};exports.ChatBubbleSystem=b;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as o } from "../../Flex/Flex.js";
|
|
3
|
+
import { Typography as b } from "../../Typography/Typography.js";
|
|
4
|
+
import { cn as c } from "../../../utils/cn.js";
|
|
5
|
+
import "react";
|
|
6
|
+
const u = (t) => {
|
|
7
|
+
const { id: r, testId: a, message: s, className: m } = t;
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
o,
|
|
10
|
+
{
|
|
11
|
+
id: r,
|
|
12
|
+
testId: a,
|
|
13
|
+
className: c("Bear-ChatBubble", "Bear-ChatBubble--system", m),
|
|
14
|
+
justify: "center",
|
|
15
|
+
children: /* @__PURE__ */ e(b, { variant: "caption", className: "Bear-ChatBubble__bubble", children: s.content })
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
u as ChatBubbleSystem
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),_=require("../../Avatar/Avatar.cjs"),l=require("../../../utils/cn.cjs");require("react");require("../../Box/Box.cjs");const r=require("../../Flex/Flex.cjs"),t=require("../../Typography/Typography.cjs"),v=require("../ChatBubble.const.cjs"),s=require("../ChatBubble.utils.cjs"),y=o=>{const{domId:u,testId:c,message:e,showTimestamp:b,showStatus:h,showAvatar:d,userAvatar:m,botAvatar:B,className:p}=o,C=s.isChatUserSender(e.sender),n=s.formatChatBubbleTime(e.timestamp),i=e.status?v.CHAT_BUBBLE_STATUS_MARK[e.status]:void 0;return a.jsxs(r.Flex,{id:u,testId:c,className:l.cn("Bear-ChatBubble",`Bear-ChatBubble--${e.sender}`,p),align:"start",gap:2,children:[d&&a.jsx(_.Avatar,{src:s.resolveChatBubbleAvatar(e,m,B),initials:s.resolveChatBubbleInitial(e),size:"sm"}),a.jsxs(r.Flex,{className:"Bear-ChatBubble__body",direction:"column",gap:1,children:[e.name&&a.jsx(t.Typography,{variant:"caption",color:"muted",children:e.name}),a.jsx(t.Typography,{variant:"body2",className:"Bear-ChatBubble__bubble",children:e.content}),a.jsxs(r.Flex,{className:"Bear-ChatBubble__meta",align:"center",gap:1,children:[b&&n&&a.jsx(t.Typography,{variant:"caption",color:"muted",children:n}),h&&i&&C&&a.jsx(t.Typography,{variant:"caption",className:l.cn("Bear-ChatBubble__status",e.status&&`Bear-ChatBubble__status--${e.status}`),children:i})]})]})]})};exports.ChatBubbleThread=y;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as _ } from "../../Avatar/Avatar.js";
|
|
3
|
+
import { cn as m } from "../../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../../Box/Box.js";
|
|
6
|
+
import { Flex as s } from "../../Flex/Flex.js";
|
|
7
|
+
import { Typography as e } from "../../Typography/Typography.js";
|
|
8
|
+
import { CHAT_BUBBLE_STATUS_MARK as v } from "../ChatBubble.const.js";
|
|
9
|
+
import { isChatUserSender as f, formatChatBubbleTime as A, resolveChatBubbleInitial as g, resolveChatBubbleAvatar as T } from "../ChatBubble.utils.js";
|
|
10
|
+
const M = (l) => {
|
|
11
|
+
const {
|
|
12
|
+
domId: n,
|
|
13
|
+
testId: b,
|
|
14
|
+
message: a,
|
|
15
|
+
showTimestamp: c,
|
|
16
|
+
showStatus: u,
|
|
17
|
+
showAvatar: h,
|
|
18
|
+
userAvatar: d,
|
|
19
|
+
botAvatar: B,
|
|
20
|
+
className: p
|
|
21
|
+
} = l, C = f(a.sender), o = A(a.timestamp), i = a.status ? v[a.status] : void 0;
|
|
22
|
+
return /* @__PURE__ */ r(
|
|
23
|
+
s,
|
|
24
|
+
{
|
|
25
|
+
id: n,
|
|
26
|
+
testId: b,
|
|
27
|
+
className: m("Bear-ChatBubble", `Bear-ChatBubble--${a.sender}`, p),
|
|
28
|
+
align: "start",
|
|
29
|
+
gap: 2,
|
|
30
|
+
children: [
|
|
31
|
+
h && /* @__PURE__ */ t(
|
|
32
|
+
_,
|
|
33
|
+
{
|
|
34
|
+
src: T(a, d, B),
|
|
35
|
+
initials: g(a),
|
|
36
|
+
size: "sm"
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ r(s, { className: "Bear-ChatBubble__body", direction: "column", gap: 1, children: [
|
|
40
|
+
a.name && /* @__PURE__ */ t(e, { variant: "caption", color: "muted", children: a.name }),
|
|
41
|
+
/* @__PURE__ */ t(e, { variant: "body2", className: "Bear-ChatBubble__bubble", children: a.content }),
|
|
42
|
+
/* @__PURE__ */ r(s, { className: "Bear-ChatBubble__meta", align: "center", gap: 1, children: [
|
|
43
|
+
c && o && /* @__PURE__ */ t(e, { variant: "caption", color: "muted", children: o }),
|
|
44
|
+
u && i && C && /* @__PURE__ */ t(
|
|
45
|
+
e,
|
|
46
|
+
{
|
|
47
|
+
variant: "caption",
|
|
48
|
+
className: m(
|
|
49
|
+
"Bear-ChatBubble__status",
|
|
50
|
+
a.status && `Bear-ChatBubble__status--${a.status}`
|
|
51
|
+
),
|
|
52
|
+
children: i
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
] })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
M as ChatBubbleThread
|
|
63
|
+
};
|
|
@@ -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"),p=require("../../utils/cn.cjs");require("react");const R=require("../../utils/generateBearId.utils.cjs"),x=require("../../utils/useBearId.cjs"),B=require("../../utils/liveRegion.utils.cjs"),T=require("../Box/Box.cjs"),_=require("../Button/Button.cjs"),E=require("../Flex/Flex.cjs"),o=require("../Typography/Typography.cjs"),v=require("./ChatError.const.cjs"),C=s=>{const{id:i,testId:a,title:c,children:r,onRetry:t,translations:l,className:u}=s,d=x.useBearId(y.COMPONENT_NAME_CHAT_ERROR),g=R.resolveBearId(i,d),n={...v.CHAT_ERROR_DEFAULT_TRANSLATIONS,...l},h=c??n.title,q=B.getBearLiveRegionProps("error");return e.jsx(T.Box,{id:g,"data-testid":a,className:p.cn("Bear-ChatError",u),...q,children:e.jsxs(E.Flex,{direction:"column",gap:2,align:"start",children:[e.jsx(o.Typography,{variant:"subtitle2",children:h}),r&&e.jsx(o.Typography,{variant:"body2",children:r}),t&&e.jsx(_.Button,{type:"button",variant:"outline",size:"sm",onClick:t,children:n.retryLabel})]})})};exports.ChatError=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),t={title:"Something went wrong",retryLabel:e.LABEL_RETRY};exports.CHAT_ERROR_DEFAULT_TRANSLATIONS=t;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_CHAT_ERROR as g } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as u } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as E } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as N } from "../../utils/useBearId.js";
|
|
7
|
+
import { getBearLiveRegionProps as T } from "../../utils/liveRegion.utils.js";
|
|
8
|
+
import { Box as v } from "../Box/Box.js";
|
|
9
|
+
import { Button as y } from "../Button/Button.js";
|
|
10
|
+
import { Flex as A } from "../Flex/Flex.js";
|
|
11
|
+
import { Typography as i } from "../Typography/Typography.js";
|
|
12
|
+
import { CHAT_ERROR_DEFAULT_TRANSLATIONS as B } from "./ChatError.const.js";
|
|
13
|
+
const S = (n) => {
|
|
14
|
+
const { id: a, testId: m, title: s, children: t, onRetry: o, translations: l, className: d } = n, p = N(g), c = E(a, p), e = { ...B, ...l }, f = s ?? e.title, h = T("error");
|
|
15
|
+
return /* @__PURE__ */ r(
|
|
16
|
+
v,
|
|
17
|
+
{
|
|
18
|
+
id: c,
|
|
19
|
+
"data-testid": m,
|
|
20
|
+
className: u("Bear-ChatError", d),
|
|
21
|
+
...h,
|
|
22
|
+
children: /* @__PURE__ */ R(A, { direction: "column", gap: 2, align: "start", children: [
|
|
23
|
+
/* @__PURE__ */ r(i, { variant: "subtitle2", children: f }),
|
|
24
|
+
t && /* @__PURE__ */ r(i, { variant: "body2", children: t }),
|
|
25
|
+
o && /* @__PURE__ */ r(y, { type: "button", variant: "outline", size: "sm", onClick: o, children: e.retryLabel })
|
|
26
|
+
] })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
S as ChatError
|
|
32
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ChatErrorTranslations {
|
|
3
|
+
title: string;
|
|
4
|
+
retryLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ChatErrorProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
onRetry?: () => void;
|
|
12
|
+
translations?: Partial<ChatErrorTranslations>;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const l=require("../../utils/generateBearId.utils.cjs"),x=require("../../utils/useBearId.cjs"),m=require("../Box/Box.cjs"),p=require("../Flex/Flex.cjs"),q=require("../Typography/Typography.cjs"),I=require("./helpers/CitationListTitle.cjs"),T=r=>{const{id:i,testId:s,citations:n,className:o}=r,a=x.useBearId(u.COMPONENT_NAME_CITATION_LIST),c=l.resolveBearId(i,a);return t.jsx(p.Flex,{id:c,testId:s,className:d.cn("Bear-CitationList",o),direction:"column",gap:2,children:n.map(e=>t.jsxs(m.Box,{className:"Bear-CitationList__item",children:[t.jsx(I.CitationListTitle,{citation:e}),e.excerpt&&t.jsx(q.Typography,{variant:"caption",color:"muted",children:e.excerpt})]},e.id))})};exports.CitationList=T;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_CITATION_LIST as c } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as d } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as l } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as f } from "../../utils/useBearId.js";
|
|
7
|
+
import { Box as I } from "../Box/Box.js";
|
|
8
|
+
import { Flex as x } from "../Flex/Flex.js";
|
|
9
|
+
import { Typography as N } from "../Typography/Typography.js";
|
|
10
|
+
import { CitationListTitle as C } from "./helpers/CitationListTitle.js";
|
|
11
|
+
const y = (t) => {
|
|
12
|
+
const { id: i, testId: e, citations: m, className: s } = t, a = f(c), p = l(i, a);
|
|
13
|
+
return /* @__PURE__ */ o(
|
|
14
|
+
x,
|
|
15
|
+
{
|
|
16
|
+
id: p,
|
|
17
|
+
testId: e,
|
|
18
|
+
className: d("Bear-CitationList", s),
|
|
19
|
+
direction: "column",
|
|
20
|
+
gap: 2,
|
|
21
|
+
children: m.map((r) => /* @__PURE__ */ n(I, { className: "Bear-CitationList__item", children: [
|
|
22
|
+
/* @__PURE__ */ o(C, { citation: r }),
|
|
23
|
+
r.excerpt && /* @__PURE__ */ o(N, { variant: "caption", color: "muted", children: r.excerpt })
|
|
24
|
+
] }, r.id))
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
y as CitationList
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CitationItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
excerpt?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CitationListProps {
|
|
8
|
+
id?: string;
|
|
9
|
+
testId?: string;
|
|
10
|
+
citations: CitationItem[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CitationListTitleProps {
|
|
14
|
+
citation: CitationItem;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../Link/Link.cjs"),n=require("../../Typography/Typography.cjs"),o=i=>{const{citation:t}=i;return t.href?e.jsx(r.Link,{href:t.href,children:t.title}):e.jsx(n.Typography,{variant:"subtitle2",children:t.title})};exports.CitationListTitle=o;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Link as e } from "../../Link/Link.js";
|
|
3
|
+
import { Typography as o } from "../../Typography/Typography.js";
|
|
4
|
+
const l = (i) => {
|
|
5
|
+
const { citation: t } = i;
|
|
6
|
+
return t.href ? /* @__PURE__ */ r(e, { href: t.href, children: t.title }) : /* @__PURE__ */ r(o, { variant: "subtitle2", children: t.title });
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
l as CitationListTitle
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CitationListTitle } from './CitationListTitle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),B=require("../../utils/cn.cjs");require("react");const q=require("../../utils/generateBearId.utils.cjs"),b=require("../../utils/useBearId.cjs"),n=require("../Box/Box.cjs"),g=require("../Flex/Flex.cjs"),i=require("../Typography/Typography.cjs"),l=require("./ContextMeter.const.cjs"),u=require("./ContextMeter.utils.cjs"),m=x=>{const{id:d,testId:T,used:t,max:r=l.CONTEXT_METER_MAX_DEFAULT,translations:_,className:M}=x,C=b.useBearId(c.COMPONENT_NAME_CONTEXT_METER),s=q.resolveBearId(d,C),E={...l.CONTEXT_METER_DEFAULT_TRANSLATIONS,..._},a=u.resolveContextMeterPercent(t,r),N=u.resolveContextMeterTone(a),o=`${s}-label`;return e.jsxs(n.Box,{id:s,"data-testid":T,className:B.cn("Bear-ContextMeter",`Bear-ContextMeter--${N}`,M),style:{"--Bear-ContextMeter-percent":`${a}${c.PERCENT_UNIT}`},children:[e.jsxs(g.Flex,{justify:"between",align:"center",gap:2,children:[e.jsx(i.Typography,{id:o,variant:"caption",children:E.label}),e.jsxs(i.Typography,{variant:"caption",children:[t,"/",r]})]}),e.jsx(n.Box,{className:"Bear-ContextMeter__track",role:"progressbar","aria-labelledby":o,"aria-valuemin":p.ZERO,"aria-valuemax":r,"aria-valuenow":t,children:e.jsx(n.Box,{className:"Bear-ContextMeter__fill"})})]})};exports.ContextMeter=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/numbers.const.cjs"),T={label:"Context"},_=E.CONTEXT_METER_DEFAULT_MAX,N=E.SEVENTY_TWO,R=E.NINETY,C=E.ONE_HUNDRED;exports.CONTEXT_METER_DANGER_PERCENT=R;exports.CONTEXT_METER_DEFAULT_TRANSLATIONS=T;exports.CONTEXT_METER_MAX_DEFAULT=_;exports.CONTEXT_METER_PERCENT_CAP=C;exports.CONTEXT_METER_WARN_PERCENT=N;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContextMeterTranslations } from './ContextMeter.types';
|
|
2
|
+
export declare const CONTEXT_METER_DEFAULT_TRANSLATIONS: ContextMeterTranslations;
|
|
3
|
+
export declare const CONTEXT_METER_MAX_DEFAULT = 100;
|
|
4
|
+
export declare const CONTEXT_METER_WARN_PERCENT = 72;
|
|
5
|
+
export declare const CONTEXT_METER_DANGER_PERCENT = 90;
|
|
6
|
+
export declare const CONTEXT_METER_PERCENT_CAP = 100;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CONTEXT_METER_DEFAULT_MAX as E, ONE_HUNDRED as T, NINETY as _, SEVENTY_TWO as N } from "../../constants/numbers.const.js";
|
|
2
|
+
const C = {
|
|
3
|
+
label: "Context"
|
|
4
|
+
}, A = E, o = N, t = _, O = T;
|
|
5
|
+
export {
|
|
6
|
+
t as CONTEXT_METER_DANGER_PERCENT,
|
|
7
|
+
C as CONTEXT_METER_DEFAULT_TRANSLATIONS,
|
|
8
|
+
A as CONTEXT_METER_MAX_DEFAULT,
|
|
9
|
+
O as CONTEXT_METER_PERCENT_CAP,
|
|
10
|
+
o as CONTEXT_METER_WARN_PERCENT
|
|
11
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { ZERO as N } from "../../constants/numbers.const.js";
|
|
3
|
+
import { COMPONENT_NAME_CONTEXT_METER as _, PERCENT_UNIT as f } from "../../constants/generals.const.js";
|
|
4
|
+
import { cn as C } from "../../utils/cn.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { resolveBearId as b } from "../../utils/generateBearId.utils.js";
|
|
7
|
+
import { useBearId as v } from "../../utils/useBearId.js";
|
|
8
|
+
import { Box as a } from "../Box/Box.js";
|
|
9
|
+
import { Flex as B } from "../Flex/Flex.js";
|
|
10
|
+
import { Typography as s } from "../Typography/Typography.js";
|
|
11
|
+
import { CONTEXT_METER_MAX_DEFAULT as I, CONTEXT_METER_DEFAULT_TRANSLATIONS as u } from "./ContextMeter.const.js";
|
|
12
|
+
import { resolveContextMeterPercent as O, resolveContextMeterTone as h } from "./ContextMeter.utils.js";
|
|
13
|
+
const D = (m) => {
|
|
14
|
+
const { id: c, testId: p, used: e, max: r = I, translations: d, className: T } = m, E = v(_), n = b(c, E), x = { ...u, ...d }, i = O(e, r), M = h(i), l = `${n}-label`;
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
|
+
a,
|
|
17
|
+
{
|
|
18
|
+
id: n,
|
|
19
|
+
"data-testid": p,
|
|
20
|
+
className: C("Bear-ContextMeter", `Bear-ContextMeter--${M}`, T),
|
|
21
|
+
style: { "--Bear-ContextMeter-percent": `${i}${f}` },
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ t(B, { justify: "between", align: "center", gap: 2, children: [
|
|
24
|
+
/* @__PURE__ */ o(s, { id: l, variant: "caption", children: x.label }),
|
|
25
|
+
/* @__PURE__ */ t(s, { variant: "caption", children: [
|
|
26
|
+
e,
|
|
27
|
+
"/",
|
|
28
|
+
r
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
a,
|
|
33
|
+
{
|
|
34
|
+
className: "Bear-ContextMeter__track",
|
|
35
|
+
role: "progressbar",
|
|
36
|
+
"aria-labelledby": l,
|
|
37
|
+
"aria-valuemin": N,
|
|
38
|
+
"aria-valuemax": r,
|
|
39
|
+
"aria-valuenow": e,
|
|
40
|
+
children: /* @__PURE__ */ o(a, { className: "Bear-ContextMeter__fill" })
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
D as ContextMeter
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/numbers.const.cjs"),e=require("./ContextMeter.const.cjs"),o=(t,n)=>{if(n<=r.ZERO)return r.ZERO;const E=t/n*e.CONTEXT_METER_PERCENT_CAP;return E<r.ZERO?r.ZERO:E>e.CONTEXT_METER_PERCENT_CAP?e.CONTEXT_METER_PERCENT_CAP:E},T=t=>t>=e.CONTEXT_METER_DANGER_PERCENT?"danger":t>=e.CONTEXT_METER_WARN_PERCENT?"warn":"ok";exports.resolveContextMeterPercent=o;exports.resolveContextMeterTone=T;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ZERO as e } from "../../constants/numbers.const.js";
|
|
2
|
+
import { CONTEXT_METER_PERCENT_CAP as E, CONTEXT_METER_DANGER_PERCENT as o, CONTEXT_METER_WARN_PERCENT as T } from "./ContextMeter.const.js";
|
|
3
|
+
const _ = (r, n) => {
|
|
4
|
+
if (n <= e)
|
|
5
|
+
return e;
|
|
6
|
+
const t = r / n * E;
|
|
7
|
+
return t < e ? e : t > E ? E : t;
|
|
8
|
+
}, N = (r) => r >= o ? "danger" : r >= T ? "warn" : "ok";
|
|
9
|
+
export {
|
|
10
|
+
_ as resolveContextMeterPercent,
|
|
11
|
+
N as resolveContextMeterTone
|
|
12
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),n=require("react"),U=require("../Input/Input.cjs"),B=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),n=require("react"),U=require("../Input/Input.cjs"),B=require("@forgedevstack/bear-icons"),c=require("./CurrencyInput.const.cjs"),l=require("./CurrencyInput.utils.cjs"),M=({value:p,onChange:u,currency:r=c.DEFAULT_CURRENCY,locale:s=c.DEFAULT_LOCALE,decimals:e=c.DEFAULT_DECIMALS,placeholder:S="0.00",size:f="md",disabled:A=!1,error:F,allowNegative:C=!1,max:o,min:a,testId:L,className:b,...q})=>{const[i,d]=n.useState(()=>l.formatCurrency(p,s,e)),[I,g]=n.useState(!1);n.useEffect(()=>{I||d(l.formatCurrency(p,s,e))},[p,s,e,I]);const D=n.useCallback(t=>{const m=t.target.value,x=C?/[^0-9.,-]/g:/[^0-9.,]/g;d(m.replace(x,""))},[C]),R=n.useCallback(()=>{g(!1);let t=l.parseCurrency(i);t!=null&&(o!=null&&t>o&&(t=o),a!=null&&t<a&&(t=a),t=parseFloat(t.toFixed(e))),u==null||u(t),d(l.formatCurrency(t,s,e))},[i,s,e,o,a,u]),E=typeof r=="string"?c.CURRENCY_SYMBOLS[r]??r:null,_=typeof r!="string"?r:y.jsx(B.BearIcons.DollarSignIcon,{size:f==="sm"?14:f==="lg"?20:16,className:"text-gray-400"}),j=E?y.jsx("span",{className:"text-gray-500 dark:text-gray-400 font-medium select-none",children:E}):_;return y.jsx(U.Input,{...q,size:f,disabled:A,error:F,placeholder:S,value:i,onChange:D,onFocus:()=>g(!0),onBlur:R,inputMode:"decimal",className:b,"data-testid":L,InputProps:{startAdornment:j}})};exports.CurrencyInput=M;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { useState as E, useEffect as M, useCallback as C } from "react";
|
|
3
3
|
import { Input as N } from "../Input/Input.js";
|
|
4
|
-
import { BearIcons as T } from "
|
|
4
|
+
import { BearIcons as T } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { DEFAULT_LOCALE as Y, DEFAULT_DECIMALS as b, DEFAULT_CURRENCY as k, CURRENCY_SYMBOLS as O } from "./CurrencyInput.const.js";
|
|
6
6
|
import { formatCurrency as m, parseCurrency as V } from "./CurrencyInput.utils.js";
|
|
7
7
|
const J = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),M=require("../Calendar/Calendar.cjs"),U=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),M=require("../Calendar/Calendar.cjs"),U=require("@forgedevstack/bear-icons"),X=require("../OverlayPortal/OverlayPortal.cjs"),A=require("../../utils/cn.cjs"),Z=require("../../hooks/useClickOutside.cjs"),G=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");require("../../context/BearProvider.cjs");const Y=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),J=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const Q=require("./DatePicker.utils.cjs"),e=require("./DatePicker.const.cjs"),ee=o=>{const{value:s,onChange:t,minDate:C,maxDate:T,disabled:c=!1,placeholder:f=e.DATEPICKER_DEFAULT_PLACEHOLDER,label:u,error:l,helperText:b,format:S=e.DATEPICKER_DEFAULT_FORMAT,clearable:x=!0,className:O,style:P,bis:m,showWeekNumbers:I=!1,disabledDates:h=[],highlightedDates:y=[],slots:k,weekdayLabels:p,firstDayOfWeek:L=e.DATEPICKER_DEFAULT_FIRST_DAY,size:w="md",variant:K="default",icon:N,testId:q}=o,{openEffect:j,closeEffect:v}=J.resolveOverlayEffects(o),[n,_]=a.useState(!1),[z,F]=a.useState(s??new Date),d=a.useRef(null),E=a.useRef(null),R=a.useRef(null),D=G.useBearStyles(m,P),{style:g,ready:$}=Y.useFixedAnchorPosition({anchorRef:E,open:n,estimatedHeightPx:e.DATEPICKER_DROPDOWN_HEIGHT_PX}),H=a.useCallback(()=>_(!1),[]);Z.useClickOutsideMultiple([d,R],H,{enabled:n});const V=a.useCallback(i=>{t==null||t(i),_(!1)},[t]),W=a.useCallback(()=>{t==null||t(null),_(!1)},[t]),B=a.useCallback(i=>{F(i)},[]);return r.jsxs("div",{ref:d,className:A.cn(e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS,"bear-relative",O),style:Object.keys(D).length?D:void 0,"data-testid":q,children:[u&&r.jsx("label",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__label bear-block bear-text-sm bear-font-medium bear-text-zinc-700 dark:bear-text-zinc-300 bear-mb-1.5`,children:u}),r.jsxs("button",{ref:E,type:"button",onClick:()=>!c&&_(!n),disabled:c,className:A.cn(`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__trigger bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-text-left bear-transition-colors`,e.DATEPICKER_SIZE_CLASSES[w],e.DATEPICKER_VARIANT_CLASSES[K],l?"bear-border-red-500":"focus:bear-border-primary-500",c&&"bear-opacity-50 bear-cursor-not-allowed",s?"bear-text-zinc-900 dark:bear-text-white":"bear-text-zinc-500"),children:[r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__value`,children:s?Q.formatDate(s,S):f}),r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__icon`,children:N??r.jsx(U.CalendarIcon,{className:"bear-w-5 bear-h-5 bear-text-zinc-400 bear-shrink-0"})})]}),l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__error bear-mt-1 bear-text-xs bear-text-red-400`,children:l}),b&&!l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__helper bear-mt-1 bear-text-xs bear-text-zinc-500`,children:b}),r.jsx(X.OverlayPortal,{open:n,ready:$,style:g,zIndex:e.DATEPICKER_DROPDOWN_Z_INDEX,openEffect:j,closeEffect:v,className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__dropdown`,panelRef:R,attributes:{[e.DATEPICKER_CALENDAR_ATTR]:""},children:r.jsx(M.Calendar,{viewDate:z,onViewChange:B,value:s??null,onSelect:V,minDate:C,maxDate:T,disabledDates:h,highlightedDates:y,slots:k,weekdayLabels:p,firstDayOfWeek:L,showWeekNumbers:I,clearable:x,onClear:W,showTodayButton:!0,onToday:()=>{t==null||t(new Date),_(!1)}})})]})};exports.DatePicker=ee;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as D, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A, useRef as b, useCallback as n } from "react";
|
|
3
3
|
import { Calendar as G } from "../Calendar/Calendar.js";
|
|
4
|
-
import { CalendarIcon as Y } from "
|
|
4
|
+
import { CalendarIcon as Y } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { OverlayPortal as q } from "../OverlayPortal/OverlayPortal.js";
|
|
6
6
|
import { cn as R } from "../../utils/cn.js";
|
|
7
7
|
import { useClickOutsideMultiple as J } from "../../hooks/useClickOutside.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),O=require("../../utils/cn.cjs"),ae=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const n=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),te=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),se=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const ne=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),O=require("../../utils/cn.cjs"),ae=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const n=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),te=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),se=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const ne=require("@forgedevstack/bear-icons"),be=require("../OverlayPortal/OverlayPortal.cjs"),m=require("./DateRangePicker.const.cjs"),o=require("./DateRangePicker.utils.cjs"),q=({year:g,month:d,range:r,onDayClick:p,onNav:y,minDate:u,maxDate:N})=>{const E=o.getCalendarDays(g,d),h=new Date;return h.setHours(n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT),e.jsxs("div",{className:"bear-w-64",children:[e.jsxs("div",{className:"bear-flex bear-items-center bear-justify-between bear-mb-2",children:[e.jsx("button",{type:"button",onClick:()=>y(n.NEGATIVE_ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Previous month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsxs("span",{className:"bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white",children:[m.MONTH_LABELS[d]," ",g]}),e.jsx("button",{type:"button",onClick:()=>y(n.ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Next month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5 bear-mb-1",children:m.DAY_LABELS.map(t=>e.jsx("div",{className:"bear-text-xs bear-text-center bear-font-medium bear-text-gray-400 dark:bear-text-zinc-500 bear-py-1",children:t},t))}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5",children:E.map((t,j)=>{if(!t)return e.jsx("div",{},`e-${j}`);const f=u&&t<u||N&&t>N,l=o.isSameDay(t,r.start)||o.isSameDay(t,r.end),x=o.isInRange(t,r.start,r.end),T=o.isSameDay(t,h);return e.jsx("button",{type:"button",disabled:!!f,onClick:()=>p(t),className:O.cn("bear-w-8 bear-h-8 bear-text-sm bear-rounded-full bear-transition-colors bear-cursor-pointer",f?"bear-text-gray-300 dark:bear-text-zinc-600 bear-cursor-not-allowed":"hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700",l&&"bear-bg-primary-500 bear-text-white",!l&&x&&"bear-bg-primary-100 dark:bear-bg-primary-900/30 bear-text-primary-800 dark:bear-text-primary-200",!l&&!x&&T&&"bear-ring-1 bear-ring-primary-400",!l&&!x&&!f&&"bear-text-gray-700 dark:bear-text-zinc-300"),children:t.getDate()},t.getTime())})})]})},oe=g=>{const{value:d,onChange:r,label:p,placeholder:y=c.PLACEHOLDER_SELECT_DATE_RANGE,disabled:u=c.BOOLEAN_FALSE,clearable:N=c.BOOLEAN_TRUE,minDate:E,maxDate:h,presets:t,showPresets:j=c.BOOLEAN_TRUE,size:f=c.SIZE_MD,error:l,helperText:x,className:T,testId:G,openEffect:le,closeEffect:ie,effect:ce,...B}=g,{openEffect:W,closeEffect:U}=se.resolveOverlayEffects(g),[R,w]=s.useState(!1),[b,k]=s.useState(d??{start:null,end:null}),[A,_]=s.useState(c.PICKING_START),P=s.useRef(null),I=s.useRef(null),L=s.useRef(null),{style:Y,ready:Z}=te.useFixedAnchorPosition({anchorRef:I,open:R,estimatedHeightPx:m.DATERANGE_DROPDOWN_HEIGHT_PX}),C=new Date,[D,F]=s.useState(C.getMonth()),[v,X]=s.useState(C.getFullYear()),M=o.resolveRightMonth(D),$=M.month,V=v+M.yearDelta;s.useEffect(()=>{d&&k(d)},[d]);const K=s.useCallback(()=>w(!1),[]);ae.useClickOutsideMultiple([P,L],K,{enabled:R});const z=s.useCallback(a=>{if(A==="start")k({start:a,end:null}),_("end");else{const i=a>=(b.start??a)?{start:b.start,end:a}:{start:a,end:b.start};k(i),_("start"),r==null||r(i)}},[A,b.start,r]),J=s.useCallback(a=>{k(a),r==null||r(a),w(!1),_("start")},[r]),Q=s.useCallback(()=>{const a={start:null,end:null};k(a),r==null||r(a),_("start")},[r]),ee=s.useCallback(a=>{let i=D+a,S=v;i<n.ZERO&&(i=n.LAST_MONTH_INDEX,S-=n.ONE),i>n.LAST_MONTH_INDEX&&(i=n.ZERO,S+=n.ONE),F(i),X(S)},[D,v]),H=t??(j?o.getDefaultPresets():[]),re=b.start?`${o.formatDate(b.start)}${b.end?` – ${o.formatDate(b.end)}`:""}`:y;return e.jsxs("div",{ref:P,className:O.cn("Bear-DateRangePicker bear-relative bear-inline-block",T),"data-testid":G,...B,children:[p&&e.jsx("label",{className:"Bear-DateRangePicker__label bear-block bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-zinc-300 bear-mb-1.5",children:p}),e.jsxs("button",{ref:I,type:"button",disabled:u,onClick:()=>!u&&w(!R),className:O.cn("bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-border-gray-300 dark:bear-border-zinc-600 bear-bg-white dark:bear-bg-zinc-800 bear-text-gray-900 dark:bear-text-white bear-transition-colors focus:bear-ring-2 focus:bear-ring-primary-500 bear-outline-none",m.SIZE_CLASSES[f],u&&"bear-opacity-50 bear-cursor-not-allowed"),children:[e.jsx("span",{className:O.cn(!b.start&&"bear-text-gray-400 dark:bear-text-zinc-500"),children:re}),e.jsx(ne.CalendarIcon,{className:"bear-w-4 bear-h-4 bear-ml-2 bear-text-gray-400"})]}),e.jsx(be.OverlayPortal,{open:R,ready:Z,style:Y,zIndex:m.DATERANGE_DROPDOWN_Z_INDEX,openEffect:W,closeEffect:U,panelRef:L,className:"bear-max-w-[calc(100vw-16px)] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-xl bear-shadow-xl bear-p-4 bear-overflow-x-auto",attributes:{[m.DATERANGE_DROPDOWN_ATTR]:c.EMPTY_STRING},children:e.jsxs("div",{className:"bear-flex bear-gap-4",children:[H.length>n.ZERO&&e.jsxs("div",{className:"bear-border-r bear-border-gray-200 dark:bear-border-zinc-700 bear-pr-3 bear-space-y-1",style:{minWidth:n.PRESET_SIDEBAR_MIN_WIDTH_PX},children:[H.map(a=>e.jsx("button",{type:"button",onClick:()=>J(a.range()),className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-gray-700 dark:bear-text-zinc-300",children:a.label},a.label)),N&&b.start&&e.jsx("button",{type:"button",onClick:Q,className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-red-500",children:c.LABEL_CLEAR})]}),e.jsx(q,{year:v,month:D,range:b,onDayClick:z,onNav:ee,minDate:E,maxDate:h}),e.jsx(q,{year:V,month:$,range:b,onDayClick:z,onNav:()=>{},minDate:E,maxDate:h})]})}),l&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-red-500",children:l}),!l&&x&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-gray-500 dark:bear-text-zinc-500",children:x})]})};exports.DateRangePicker=oe;
|
|
@@ -9,7 +9,7 @@ import { PLACEHOLDER_SELECT_DATE_RANGE as me, BOOLEAN_FALSE as fe, BOOLEAN_TRUE
|
|
|
9
9
|
import { useFixedAnchorPosition as xe } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
|
|
10
10
|
import { resolveOverlayEffects as ye } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
11
11
|
import "../FormControl/FormControl.context.js";
|
|
12
|
-
import { CalendarIcon as ke } from "
|
|
12
|
+
import { CalendarIcon as ke } from "@forgedevstack/bear-icons";
|
|
13
13
|
import { OverlayPortal as Ne } from "../OverlayPortal/OverlayPortal.js";
|
|
14
14
|
import { DATERANGE_DROPDOWN_HEIGHT_PX as Ee, SIZE_CLASSES as ve, DATERANGE_DROPDOWN_Z_INDEX as _e, DATERANGE_DROPDOWN_ATTR as De, MONTH_LABELS as Re, DAY_LABELS as we } from "./DateRangePicker.const.js";
|
|
15
15
|
import { getDefaultPresets as Ae, formatDate as Z, resolveRightMonth as Te, getCalendarDays as Le, isSameDay as z, isInRange as Oe } from "./DateRangePicker.utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),U=require("react-dom"),C=require("../../context/BearProvider.cjs"),R=require("../../utils/cn.cjs");require("react");const j=require("../../utils/generateBearId.utils.cjs"),W=require("../../utils/useBearId.cjs"),e=require("../../constants/generals.const.cjs"),g=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),$=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),V=require("../Backdrop/Backdrop.cjs"),l=require("../Box/Box.cjs"),t=require("./Drawer.const.cjs"),H=require("./helpers/DrawerOptionalHeader.cjs"),Y=require("./hooks/useDrawer.cjs"),z=d=>{const{isOpen:p,onClose:a,title:s,children:N,side:w=t.DRAWER_DEFAULT_SIDE,anchor:T,variant:c=t.DRAWER_DEFAULT_VARIANT,size:L=t.DRAWER_DEFAULT_SIZE,showCloseButton:E=e.BOOLEAN_TRUE,closeOnBackdrop:m=e.BOOLEAN_TRUE,closeOnEscape:q=e.BOOLEAN_TRUE,className:I,container:f,id:x,testId:F}=d,r=c===e.DRAWER_VARIANT_PERMANENT,n=c===e.DRAWER_VARIANT_TEMPORARY,{openEffect:_,closeEffect:u}=$.resolveOverlayEffects(d,g.OVERLAY_OPEN_EFFECT_DEFAULT),P=W.useBearId(e.COMPONENT_NAME_DRAWER),A=j.resolveBearId(x,P),{direction:h}=C.useBearDirectionOptional(),B=T??w,{isMounted:v,isPanelOpen:i}=Y.useDrawer({isOpen:r?e.BOOLEAN_TRUE:p,onClose:a,closeOnEscape:r?e.BOOLEAN_FALSE:q,openEffect:_,closeEffect:u,lockScroll:n,alwaysMounted:r}),y=i?_:u;if(!v)return null;const M=!!s||E,O=`${A}-title`,S=m&&n?()=>a():void 0,b=s?O:void 0,k=r?"complementary":"dialog",D=o.jsxs(l.Box,{id:A,"data-testid":F,className:R.cn("Bear-Drawer",`Bear-Drawer--${c}`),children:[n&&o.jsx(V.Backdrop,{open:i,keepMounted:!0,blur:!0,nested:!0,transitionDuration:t.DRAWER_ANIMATION_MS,className:"Bear-Drawer__backdrop",onClick:S}),o.jsxs(l.Box,{role:k,"aria-modal":n?e.BOOLEAN_TRUE:e.BOOLEAN_FALSE,"aria-labelledby":b,className:R.cn("Bear-Drawer__panel",`Bear-Drawer__panel--${B}`,`Bear-Drawer__panel--${L}`,`Bear-Drawer__panel--effect-${y}`,i&&"Bear-Drawer__panel--open",I),children:[o.jsx(H.DrawerOptionalHeader,{showHeader:M,side:B,title:s,titleId:O,showCloseButton:r?e.BOOLEAN_FALSE:E,onClose:a,direction:h}),o.jsx(l.Box,{className:"Bear-Drawer__body",children:N})]})]});return r?D:U.createPortal(D,f??document.body)};exports.Drawer=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../../constants/numbers.const.cjs"),A=require("../../constants/generals.const.cjs"),E=R.THREE_HUNDRED,_=A.POSITION_RIGHT,D=A.SIZE_MD,T=A.DRAWER_VARIANT_TEMPORARY;exports.DRAWER_ANIMATION_MS=E;exports.DRAWER_DEFAULT_SIDE=_;exports.DRAWER_DEFAULT_SIZE=D;exports.DRAWER_DEFAULT_VARIANT=T;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { DrawerProps } from './Drawer.types';
|
|
2
|
-
type DrawerSide = NonNullable<DrawerProps['side']>;
|
|
3
|
-
type DrawerSize = NonNullable<DrawerProps['size']>;
|
|
1
|
+
import { DrawerProps, DrawerVariant } from './Drawer.types';
|
|
4
2
|
export declare const DRAWER_ANIMATION_MS = 300;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const SIZE_CLASSES: Record<DrawerSide, Record<DrawerSize, string>>;
|
|
9
|
-
export declare const POSITION_CLASSES: Record<DrawerSide, string>;
|
|
10
|
-
export declare const TRANSFORM_OPEN: Record<DrawerSide, string>;
|
|
11
|
-
export declare const TRANSFORM_CLOSED: Record<DrawerSide, string>;
|
|
12
|
-
export declare const BORDER_SIDE_MAP: Record<DrawerSide, string>;
|
|
13
|
-
export {};
|
|
3
|
+
export declare const DRAWER_DEFAULT_SIDE: NonNullable<DrawerProps['side']>;
|
|
4
|
+
export declare const DRAWER_DEFAULT_SIZE: NonNullable<DrawerProps['size']>;
|
|
5
|
+
export declare const DRAWER_DEFAULT_VARIANT: DrawerVariant;
|