@forgedevstack/bear 1.3.2 → 1.3.4
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 +145 -288
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +67 -84
- 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/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.js +9 -8
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +72 -64
- package/dist/components/Chart/BarChart.cjs +1 -1
- package/dist/components/Chart/BarChart.js +65 -72
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.js +21 -18
- package/dist/components/Chart/Chart.types.d.ts +1 -1
- package/dist/components/Chart/FunnelChart.cjs +1 -1
- package/dist/components/Chart/FunnelChart.js +38 -36
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.js +74 -60
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.js +102 -82
- package/dist/components/Chart/RadarChart.cjs +1 -1
- package/dist/components/Chart/RadarChart.d.ts +1 -1
- package/dist/components/Chart/RadarChart.js +116 -93
- 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/ChipGroup/ChipGroup.cjs +1 -1
- package/dist/components/ChipGroup/ChipGroup.const.cjs +1 -1
- package/dist/components/ChipGroup/ChipGroup.const.d.ts +2 -0
- package/dist/components/ChipGroup/ChipGroup.const.js +6 -4
- package/dist/components/ChipGroup/ChipGroup.js +52 -48
- 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/CommandPalette/CommandItem.cjs +1 -0
- package/dist/components/CommandPalette/CommandItem.d.ts +6 -0
- package/dist/components/CommandPalette/CommandItem.js +39 -0
- package/dist/components/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +129 -144
- 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/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.d.ts +2 -1
- package/dist/components/Drawer/Drawer.const.js +7 -6
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +101 -85
- package/dist/components/Drawer/Drawer.types.d.ts +4 -1
- package/dist/components/Drawer/hooks/useDrawer.cjs +1 -1
- package/dist/components/Drawer/hooks/useDrawer.js +33 -34
- package/dist/components/Drawer/index.d.ts +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 +13 -6
- package/dist/components/EmptyState/EmptyState.const.js +30 -8
- package/dist/components/EmptyState/EmptyState.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.js +37 -41
- package/dist/components/EmptyState/EmptyState.types.d.ts +3 -1
- 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/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/HoverCard/HoverCard.cjs +4 -3
- package/dist/components/HoverCard/HoverCard.const.cjs +1 -0
- package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.const.js +10 -0
- package/dist/components/HoverCard/HoverCard.js +62 -56
- package/dist/components/HoverCard/HoverCard.types.d.ts +7 -0
- package/dist/components/Icon/index.d.ts +1 -0
- 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/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.const.cjs +1 -0
- package/dist/components/Menu/Menu.const.d.ts +2 -0
- package/dist/components/Menu/Menu.const.js +12 -0
- package/dist/components/Menu/Menu.d.ts +3 -9
- package/dist/components/Menu/Menu.js +57 -89
- package/dist/components/Menu/Menu.types.d.ts +8 -1
- package/dist/components/Menu/MenuDivider.cjs +1 -0
- package/dist/components/Menu/MenuDivider.d.ts +6 -0
- package/dist/components/Menu/MenuDivider.js +7 -0
- package/dist/components/Menu/MenuItem.cjs +1 -0
- package/dist/components/Menu/MenuItem.d.ts +6 -0
- package/dist/components/Menu/MenuItem.js +46 -0
- 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.const.cjs +1 -1
- package/dist/components/Modal/Modal.const.d.ts +1 -0
- package/dist/components/Modal/Modal.const.js +20 -12
- package/dist/components/Modal/Modal.js +62 -59
- package/dist/components/Modal/Modal.types.d.ts +7 -0
- 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/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +5 -5
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.const.cjs +1 -0
- package/dist/components/Popover/Popover.const.d.ts +15 -1
- package/dist/components/Popover/Popover.const.js +29 -0
- package/dist/components/Popover/Popover.js +77 -73
- package/dist/components/Popover/Popover.types.d.ts +7 -0
- 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/RichEditor/helpers/IconRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/IconRender.js +16 -16
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.const.cjs +1 -1
- package/dist/components/Select/Select.const.d.ts +1 -0
- package/dist/components/Select/Select.const.js +7 -6
- package/dist/components/Select/Select.js +110 -105
- 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/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/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/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/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/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.const.cjs +1 -1
- package/dist/components/Toast/Toast.const.d.ts +2 -0
- package/dist/components/Toast/Toast.const.js +11 -8
- package/dist/components/Toast/Toast.context.cjs +1 -0
- package/dist/components/Toast/Toast.context.d.ts +3 -0
- package/dist/components/Toast/Toast.context.js +11 -0
- package/dist/components/Toast/Toast.d.ts +4 -3
- package/dist/components/Toast/Toast.icons.cjs +1 -0
- package/dist/components/Toast/Toast.icons.d.ts +4 -0
- package/dist/components/Toast/Toast.icons.js +29 -0
- package/dist/components/Toast/Toast.js +32 -160
- package/dist/components/Toast/ToastContainer.cjs +1 -0
- package/dist/components/Toast/ToastContainer.d.ts +3 -0
- package/dist/components/Toast/ToastContainer.js +39 -0
- package/dist/components/Toast/ToastItem.cjs +1 -0
- package/dist/components/Toast/ToastItem.d.ts +5 -0
- package/dist/components/Toast/ToastItem.js +86 -0
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.d.ts +15 -0
- package/dist/components/ToggleGroup/ToggleGroup.const.js +33 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.context.js +5 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +86 -0
- package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +48 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroupItem.js +50 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.cjs +1 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.d.ts +1 -0
- package/dist/components/ToggleGroup/hooks/useToggleGroupContext.js +6 -0
- package/dist/components/ToggleGroup/index.d.ts +4 -0
- 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/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.const.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.const.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.const.js +18 -0
- package/dist/components/Tooltip/Tooltip.js +59 -61
- package/dist/components/Tooltip/Tooltip.types.d.ts +7 -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/index.cjs +1 -1
- package/dist/components/index.d.ts +39 -9
- package/dist/components/index.js +335 -293
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +46 -0
- package/dist/constants/generals.const.js +158 -115
- 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 +10 -0
- package/dist/constants/numbers.const.js +64 -53
- 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/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +6 -4
- 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/hooks/useFocusTrap/index.d.ts +2 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.cjs +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +3 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.js +41 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.types.d.ts +8 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.cjs +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.d.ts +1 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.utils.js +23 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +483 -439
- 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/_effects.css +8 -4
- package/dist/styles/_skeleton.css +90 -0
- package/dist/styles/main.css +3 -0
- package/dist/styles.css +953 -199
- package/package.json +1 -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/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ToggleGroupOrientation, ToggleGroupSize, ToggleGroupVariant } from './ToggleGroup.types';
|
|
2
|
+
export declare const TOGGLE_GROUP_TYPE_SINGLE = "single";
|
|
3
|
+
export declare const TOGGLE_GROUP_TYPE_MULTIPLE = "multiple";
|
|
4
|
+
export declare const TOGGLE_GROUP_ORIENTATION_HORIZONTAL = "horizontal";
|
|
5
|
+
export declare const TOGGLE_GROUP_ORIENTATION_VERTICAL = "vertical";
|
|
6
|
+
export declare const TOGGLE_GROUP_DEFAULT_SIZE: ToggleGroupSize;
|
|
7
|
+
export declare const TOGGLE_GROUP_DEFAULT_VARIANT: ToggleGroupVariant;
|
|
8
|
+
export declare const COMPONENT_NAME_TOGGLE_GROUP = "ToggleGroup";
|
|
9
|
+
export declare const COMPONENT_NAME_TOGGLE_GROUP_ITEM = "ToggleGroupItem";
|
|
10
|
+
export declare const SIZE_CLASS_MAP: Record<ToggleGroupSize, string>;
|
|
11
|
+
export declare const VARIANT_CLASS_MAP: Record<ToggleGroupVariant, {
|
|
12
|
+
base: string;
|
|
13
|
+
active: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ORIENTATION_CLASS_MAP: Record<ToggleGroupOrientation, string>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const r = "single", e = "multiple", t = "horizontal", a = "md", b = "subtle", o = "ToggleGroup", s = "ToggleGroupItem", _ = {
|
|
2
|
+
sm: "h-8 px-2.5 text-xs",
|
|
3
|
+
md: "h-9 px-3 text-sm",
|
|
4
|
+
lg: "h-10 px-4 text-base"
|
|
5
|
+
}, v = {
|
|
6
|
+
subtle: {
|
|
7
|
+
base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)] hover:text-[var(--bear-text-primary)]",
|
|
8
|
+
active: "bg-[var(--bear-bg-subtle)] text-[var(--bear-text-primary)] font-medium"
|
|
9
|
+
},
|
|
10
|
+
outline: {
|
|
11
|
+
base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)] hover:text-[var(--bear-text-primary)] border border-transparent",
|
|
12
|
+
active: "border-[var(--bear-primary-500)] text-[var(--bear-primary-600)] dark:text-[var(--bear-primary-400)] bg-[var(--bear-primary-50)] dark:bg-[var(--bear-primary-950)] font-medium"
|
|
13
|
+
},
|
|
14
|
+
filled: {
|
|
15
|
+
base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)]",
|
|
16
|
+
active: "bg-[var(--bear-primary-500)] text-white hover:bg-[var(--bear-primary-600)] font-medium"
|
|
17
|
+
}
|
|
18
|
+
}, x = {
|
|
19
|
+
horizontal: "flex-row",
|
|
20
|
+
vertical: "flex-col"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
o as COMPONENT_NAME_TOGGLE_GROUP,
|
|
24
|
+
s as COMPONENT_NAME_TOGGLE_GROUP_ITEM,
|
|
25
|
+
x as ORIENTATION_CLASS_MAP,
|
|
26
|
+
_ as SIZE_CLASS_MAP,
|
|
27
|
+
a as TOGGLE_GROUP_DEFAULT_SIZE,
|
|
28
|
+
b as TOGGLE_GROUP_DEFAULT_VARIANT,
|
|
29
|
+
t as TOGGLE_GROUP_ORIENTATION_HORIZONTAL,
|
|
30
|
+
e as TOGGLE_GROUP_TYPE_MULTIPLE,
|
|
31
|
+
r as TOGGLE_GROUP_TYPE_SINGLE,
|
|
32
|
+
v as VARIANT_CLASS_MAP
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(null);exports.ToggleGroupContext=t;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useMemo as Z } from "react";
|
|
3
|
+
import { cn as j } from "../../utils/cn.js";
|
|
4
|
+
import { resolveBearId as z } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as K } from "../../utils/useBearId.js";
|
|
6
|
+
import { ToggleGroupContext as q } from "./ToggleGroup.context.js";
|
|
7
|
+
import { TOGGLE_GROUP_TYPE_SINGLE as u, TOGGLE_GROUP_ORIENTATION_HORIZONTAL as L, TOGGLE_GROUP_DEFAULT_SIZE as W, TOGGLE_GROUP_DEFAULT_VARIANT as J, COMPONENT_NAME_TOGGLE_GROUP as Q, TOGGLE_GROUP_TYPE_MULTIPLE as X, ORIENTATION_CLASS_MAP as $ } from "./ToggleGroup.const.js";
|
|
8
|
+
import { ONE as m, ZERO as V } from "../../constants/numbers.const.js";
|
|
9
|
+
import { EMPTY_STRING as G } from "../../constants/generals.const.js";
|
|
10
|
+
const dr = (y) => {
|
|
11
|
+
const {
|
|
12
|
+
type: o = u,
|
|
13
|
+
value: O,
|
|
14
|
+
defaultValue: p,
|
|
15
|
+
onChange: l,
|
|
16
|
+
onValueChange: n,
|
|
17
|
+
orientation: f = L,
|
|
18
|
+
size: E = W,
|
|
19
|
+
variant: _ = J,
|
|
20
|
+
disabled: c = !1,
|
|
21
|
+
fullWidth: N = !1,
|
|
22
|
+
className: P,
|
|
23
|
+
children: R,
|
|
24
|
+
id: b,
|
|
25
|
+
testId: U,
|
|
26
|
+
...w
|
|
27
|
+
} = y, x = K(Q), S = z(b, x), [M, k] = I(() => o === u ? p ?? G : G), [D, h] = I(() => o === X ? p ?? [] : []), T = O !== void 0, i = T ? O : o === u ? M : D, B = (r) => {
|
|
28
|
+
if (!c)
|
|
29
|
+
if (o === u) {
|
|
30
|
+
const e = i === r ? G : r;
|
|
31
|
+
T || k(e), l == null || l(e), n == null || n(e);
|
|
32
|
+
} else {
|
|
33
|
+
const e = Array.isArray(i) ? i : [], t = e.includes(r) ? e.filter((s) => s !== r) : [...e, r];
|
|
34
|
+
T || h(t), l == null || l(t), n == null || n(t);
|
|
35
|
+
}
|
|
36
|
+
}, v = Z(
|
|
37
|
+
() => ({
|
|
38
|
+
type: o,
|
|
39
|
+
value: i,
|
|
40
|
+
onItemToggle: B,
|
|
41
|
+
size: E,
|
|
42
|
+
variant: _,
|
|
43
|
+
disabled: c
|
|
44
|
+
}),
|
|
45
|
+
[o, i, E, _, c]
|
|
46
|
+
), F = (r) => {
|
|
47
|
+
var g;
|
|
48
|
+
const e = r.target;
|
|
49
|
+
if (!e || e.getAttribute("role") !== "radio") return;
|
|
50
|
+
const t = Array.from(
|
|
51
|
+
r.currentTarget.querySelectorAll('button[role="radio"]:not([disabled])')
|
|
52
|
+
), s = t.indexOf(e);
|
|
53
|
+
if (s === -1) return;
|
|
54
|
+
const a = f === L, H = a && r.key === "ArrowRight" || !a && r.key === "ArrowDown", Y = a && r.key === "ArrowLeft" || !a && r.key === "ArrowUp";
|
|
55
|
+
let d = s;
|
|
56
|
+
if (H) d = (s + m) % t.length;
|
|
57
|
+
else if (Y) d = (s - m + t.length) % t.length;
|
|
58
|
+
else if (r.key === "Home") d = V;
|
|
59
|
+
else if (r.key === "End") d = t.length - m;
|
|
60
|
+
else return;
|
|
61
|
+
r.preventDefault(), (g = t[d]) == null || g.focus();
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ A(q.Provider, { value: v, children: /* @__PURE__ */ A(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
id: S,
|
|
67
|
+
"data-testid": U,
|
|
68
|
+
role: "group",
|
|
69
|
+
"aria-orientation": f,
|
|
70
|
+
onKeyDown: F,
|
|
71
|
+
className: j(
|
|
72
|
+
"Bear-ToggleGroup",
|
|
73
|
+
"inline-flex items-center gap-1 rounded-lg border border-[var(--bear-border-subtle)] bg-[var(--bear-surface-base)] p-1",
|
|
74
|
+
$[f],
|
|
75
|
+
N && "w-full justify-stretch",
|
|
76
|
+
c && "opacity-60 cursor-not-allowed",
|
|
77
|
+
P
|
|
78
|
+
),
|
|
79
|
+
...w,
|
|
80
|
+
children: R
|
|
81
|
+
}
|
|
82
|
+
) });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
dr as ToggleGroup
|
|
86
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type ToggleGroupType = 'single' | 'multiple';
|
|
3
|
+
export type ToggleGroupOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export type ToggleGroupSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type ToggleGroupVariant = 'subtle' | 'outline' | 'filled';
|
|
6
|
+
export interface ToggleGroupContextValue {
|
|
7
|
+
type: ToggleGroupType;
|
|
8
|
+
value: string | string[];
|
|
9
|
+
onItemToggle: (itemValue: string) => void;
|
|
10
|
+
size: ToggleGroupSize;
|
|
11
|
+
variant: ToggleGroupVariant;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ToggleGroupSingleProps {
|
|
15
|
+
type?: 'single';
|
|
16
|
+
value?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
onChange?: (value: string) => void;
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ToggleGroupMultipleProps {
|
|
22
|
+
type: 'multiple';
|
|
23
|
+
value?: string[];
|
|
24
|
+
defaultValue?: string[];
|
|
25
|
+
onChange?: (value: string[]) => void;
|
|
26
|
+
onValueChange?: (value: string[]) => void;
|
|
27
|
+
}
|
|
28
|
+
export type ToggleGroupBaseProps = {
|
|
29
|
+
orientation?: ToggleGroupOrientation;
|
|
30
|
+
size?: ToggleGroupSize;
|
|
31
|
+
variant?: ToggleGroupVariant;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
fullWidth?: boolean;
|
|
34
|
+
className?: string;
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
id?: string;
|
|
37
|
+
testId?: string;
|
|
38
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>;
|
|
39
|
+
export type ToggleGroupProps = ToggleGroupBaseProps & (ToggleGroupSingleProps | ToggleGroupMultipleProps);
|
|
40
|
+
export interface ToggleGroupItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
41
|
+
value: string;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
className?: string;
|
|
45
|
+
id?: string;
|
|
46
|
+
testId?: string;
|
|
47
|
+
ariaLabel?: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),f=require("../../utils/cn.cjs");require("react");const m=require("../../utils/generateBearId.utils.cjs"),p=require("../../utils/useBearId.cjs"),P=require("./hooks/useToggleGroupContext.cjs"),s=require("./ToggleGroup.const.cjs"),y=require("../Button/Button.cjs"),R=l=>{const{value:r,disabled:u=!1,children:d,className:c,id:_,testId:G,ariaLabel:T,onClick:i,...g}=l,A=p.useBearId(s.COMPONENT_NAME_TOGGLE_GROUP_ITEM),E=m.resolveBearId(_,A),e=P.useToggleGroupContext(),t=e?e.type===s.TOGGLE_GROUP_TYPE_SINGLE?e.value===r:Array.isArray(e.value)&&e.value.includes(r):!1,n=u||!!(e!=null&&e.disabled),I=(e==null?void 0:e.size)??s.TOGGLE_GROUP_DEFAULT_SIZE,S=(e==null?void 0:e.variant)??s.TOGGLE_GROUP_DEFAULT_VARIANT,b=L=>{!n&&e&&e.onItemToggle(r),i==null||i(L)},a=s.VARIANT_CLASS_MAP[S]??s.VARIANT_CLASS_MAP[s.TOGGLE_GROUP_DEFAULT_VARIANT],v=s.SIZE_CLASS_MAP[I]??s.SIZE_CLASS_MAP[s.TOGGLE_GROUP_DEFAULT_SIZE],o=(e==null?void 0:e.type)===s.TOGGLE_GROUP_TYPE_SINGLE;return O.jsx(y.Button,{type:"button",id:E,testId:G,role:o?"radio":"button","aria-checked":o?t:void 0,"aria-pressed":o?void 0:t,"aria-label":T,disabled:n,onClick:b,variant:"ghost",className:f.cn("Bear-ToggleGroup__item","inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--bear-primary-500)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer",v,t?a.active:a.base,c),...g,children:d})};exports.ToggleGroupItem=R;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import { cn as N } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { resolveBearId as P } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as R } from "../../utils/useBearId.js";
|
|
6
|
+
import { useToggleGroupContext as U } from "./hooks/useToggleGroupContext.js";
|
|
7
|
+
import { COMPONENT_NAME_TOGGLE_GROUP_ITEM as B, TOGGLE_GROUP_TYPE_SINGLE as n, TOGGLE_GROUP_DEFAULT_SIZE as l, TOGGLE_GROUP_DEFAULT_VARIANT as d, VARIANT_CLASS_MAP as m, SIZE_CLASS_MAP as c } from "./ToggleGroup.const.js";
|
|
8
|
+
import { Button as C } from "../Button/Button.js";
|
|
9
|
+
const Z = (u) => {
|
|
10
|
+
const {
|
|
11
|
+
value: i,
|
|
12
|
+
disabled: f = !1,
|
|
13
|
+
children: p,
|
|
14
|
+
className: _,
|
|
15
|
+
id: v,
|
|
16
|
+
testId: b,
|
|
17
|
+
ariaLabel: G,
|
|
18
|
+
onClick: r,
|
|
19
|
+
...T
|
|
20
|
+
} = u, g = R(B), A = P(v, g), e = U(), s = e ? e.type === n ? e.value === i : Array.isArray(e.value) && e.value.includes(i) : !1, t = f || !!(e != null && e.disabled), E = (e == null ? void 0 : e.size) ?? l, I = (e == null ? void 0 : e.variant) ?? d, S = (L) => {
|
|
21
|
+
!t && e && e.onItemToggle(i), r == null || r(L);
|
|
22
|
+
}, a = m[I] ?? m[d], y = c[E] ?? c[l], o = (e == null ? void 0 : e.type) === n;
|
|
23
|
+
return /* @__PURE__ */ O(
|
|
24
|
+
C,
|
|
25
|
+
{
|
|
26
|
+
type: "button",
|
|
27
|
+
id: A,
|
|
28
|
+
testId: b,
|
|
29
|
+
role: o ? "radio" : "button",
|
|
30
|
+
"aria-checked": o ? s : void 0,
|
|
31
|
+
"aria-pressed": o ? void 0 : s,
|
|
32
|
+
"aria-label": G,
|
|
33
|
+
disabled: t,
|
|
34
|
+
onClick: S,
|
|
35
|
+
variant: "ghost",
|
|
36
|
+
className: N(
|
|
37
|
+
"Bear-ToggleGroup__item",
|
|
38
|
+
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--bear-primary-500)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer",
|
|
39
|
+
y,
|
|
40
|
+
s ? a.active : a.base,
|
|
41
|
+
_
|
|
42
|
+
),
|
|
43
|
+
...T,
|
|
44
|
+
children: p
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
Z as ToggleGroupItem
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../ToggleGroup.context.cjs"),o=()=>e.useContext(t.ToggleGroupContext);exports.useToggleGroupContext=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useToggleGroupContext: () => import('..').ToggleGroupContextValue | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ToggleGroup } from './ToggleGroup';
|
|
2
|
+
export { ToggleGroupItem } from './ToggleGroupItem';
|
|
3
|
+
export { useToggleGroupContext } from './hooks/useToggleGroupContext';
|
|
4
|
+
export type { ToggleGroupProps, ToggleGroupItemProps, ToggleGroupType, ToggleGroupOrientation, ToggleGroupSize, ToggleGroupVariant, ToggleGroupContextValue, } from './ToggleGroup.types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../constants/generals.const.cjs"),x=require("../../utils/cn.cjs");require("react");const y=require("../../utils/generateBearId.utils.cjs"),A=require("../../utils/useBearId.cjs"),C=require("../Badge/Badge.cjs"),o=require("../Box/Box.cjs"),O=require("../Flex/Flex.cjs"),a=require("../Typography/Typography.cjs"),t=require("./ToolCall.const.cjs"),h=n=>{const{id:i,testId:c,name:u,status:l=t.TOOL_CALL_DEFAULT_STATUS,kind:d=t.TOOL_CALL_DEFAULT_KIND,input:r,output:s,translations:T,className:_}=n,L=A.useBearId(g.COMPONENT_NAME_TOOL_CALL),p=y.resolveBearId(i,L),B={...t.TOOL_CALL_DEFAULT_TRANSLATIONS,...T}[t.TOOL_CALL_STATUS_LABEL_KEY[l]];return e.jsxs(o.Box,{id:p,"data-testid":c,className:x.cn("Bear-ToolCall",`Bear-ToolCall--${l}`,`Bear-ToolCall--${d}`,_),children:[e.jsxs(O.Flex,{align:"center",justify:"between",gap:2,children:[e.jsx(a.Typography,{variant:"subtitle2",children:u}),e.jsx(C.Badge,{size:"sm",children:B})]}),r&&e.jsx(o.Box,{className:"Bear-ToolCall__input",children:typeof r=="string"?e.jsx(a.Typography,{variant:"body2",children:r}):r}),s&&e.jsx(o.Box,{className:"Bear-ToolCall__output",children:typeof s=="string"?e.jsx(a.Typography,{variant:"body2",children:s}):s})]})};exports.ToolCall=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L={pendingLabel:"Waiting",runningLabel:"Running",successLabel:"Done",errorLabel:"Failed"},e="pending",n="generic",T={pending:"pendingLabel",running:"runningLabel",success:"successLabel",error:"errorLabel"};exports.TOOL_CALL_DEFAULT_KIND=n;exports.TOOL_CALL_DEFAULT_STATUS=e;exports.TOOL_CALL_DEFAULT_TRANSLATIONS=L;exports.TOOL_CALL_STATUS_LABEL_KEY=T;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToolCallKind, ToolCallStatus, ToolCallTranslations } from './ToolCall.types';
|
|
2
|
+
export declare const TOOL_CALL_DEFAULT_TRANSLATIONS: ToolCallTranslations;
|
|
3
|
+
export declare const TOOL_CALL_DEFAULT_STATUS: ToolCallStatus;
|
|
4
|
+
export declare const TOOL_CALL_DEFAULT_KIND: ToolCallKind;
|
|
5
|
+
export declare const TOOL_CALL_STATUS_LABEL_KEY: Record<ToolCallStatus, keyof ToolCallTranslations>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
pendingLabel: "Waiting",
|
|
3
|
+
runningLabel: "Running",
|
|
4
|
+
successLabel: "Done",
|
|
5
|
+
errorLabel: "Failed"
|
|
6
|
+
}, L = "pending", e = "generic", r = {
|
|
7
|
+
pending: "pendingLabel",
|
|
8
|
+
running: "runningLabel",
|
|
9
|
+
success: "successLabel",
|
|
10
|
+
error: "errorLabel"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as TOOL_CALL_DEFAULT_KIND,
|
|
14
|
+
L as TOOL_CALL_DEFAULT_STATUS,
|
|
15
|
+
n as TOOL_CALL_DEFAULT_TRANSLATIONS,
|
|
16
|
+
r as TOOL_CALL_STATUS_LABEL_KEY
|
|
17
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_TOOL_CALL as f } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as O } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as u } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as C } from "../../utils/useBearId.js";
|
|
7
|
+
import { Badge as B } from "../Badge/Badge.js";
|
|
8
|
+
import { Box as e } from "../Box/Box.js";
|
|
9
|
+
import { Flex as N } from "../Flex/Flex.js";
|
|
10
|
+
import { Typography as a } from "../Typography/Typography.js";
|
|
11
|
+
import { TOOL_CALL_DEFAULT_STATUS as h, TOOL_CALL_DEFAULT_KIND as b, TOOL_CALL_DEFAULT_TRANSLATIONS as g, TOOL_CALL_STATUS_LABEL_KEY as y } from "./ToolCall.const.js";
|
|
12
|
+
const k = (s) => {
|
|
13
|
+
const {
|
|
14
|
+
id: n,
|
|
15
|
+
testId: m,
|
|
16
|
+
name: d,
|
|
17
|
+
status: l = h,
|
|
18
|
+
kind: L = b,
|
|
19
|
+
input: r,
|
|
20
|
+
output: t,
|
|
21
|
+
translations: T,
|
|
22
|
+
className: p
|
|
23
|
+
} = s, c = C(f), _ = u(n, c), A = { ...g, ...T }[y[l]];
|
|
24
|
+
return /* @__PURE__ */ i(
|
|
25
|
+
e,
|
|
26
|
+
{
|
|
27
|
+
id: _,
|
|
28
|
+
"data-testid": m,
|
|
29
|
+
className: O("Bear-ToolCall", `Bear-ToolCall--${l}`, `Bear-ToolCall--${L}`, p),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ i(N, { align: "center", justify: "between", gap: 2, children: [
|
|
32
|
+
/* @__PURE__ */ o(a, { variant: "subtitle2", children: d }),
|
|
33
|
+
/* @__PURE__ */ o(B, { size: "sm", children: A })
|
|
34
|
+
] }),
|
|
35
|
+
r && /* @__PURE__ */ o(e, { className: "Bear-ToolCall__input", children: typeof r == "string" ? /* @__PURE__ */ o(a, { variant: "body2", children: r }) : r }),
|
|
36
|
+
t && /* @__PURE__ */ o(e, { className: "Bear-ToolCall__output", children: typeof t == "string" ? /* @__PURE__ */ o(a, { variant: "body2", children: t }) : t })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
k as ToolCall
|
|
43
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
|
|
3
|
+
export type ToolCallKind = 'search' | 'plan' | 'edit' | 'generic';
|
|
4
|
+
export interface ToolCallTranslations {
|
|
5
|
+
pendingLabel: string;
|
|
6
|
+
runningLabel: string;
|
|
7
|
+
successLabel: string;
|
|
8
|
+
errorLabel: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ToolCallProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
testId?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
status?: ToolCallStatus;
|
|
15
|
+
kind?: ToolCallKind;
|
|
16
|
+
input?: ReactNode;
|
|
17
|
+
output?: ReactNode;
|
|
18
|
+
translations?: Partial<ToolCallTranslations>;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("react"),F=require("react-dom"),B=require("../../utils/cn.cjs"),G=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),e=require("./Tooltip.const.cjs"),a=require("../../constants/numbers.const.cjs"),q=p=>{const{content:L,children:b,position:g,placement:m,delay:x=e.TOOLTIP_DEFAULT_DELAY,className:R,disabled:w=!1,openEffect:y,closeEffect:N,effect:S}=p,T=m||g||e.TOOLTIP_POSITION_TOP,[n,u]=o.useState(!1),[f,A]=o.useState({x:a.ZERO,y:a.ZERO}),l=o.useRef(null),O=o.useRef(null),s=o.useRef(),c=o.useCallback(()=>{if(!l.current||!O.current)return;const t=l.current.getBoundingClientRect(),r=O.current.getBoundingClientRect(),I=t.left+(t.width-r.width)/a.TWO,_=t.top+(t.height-r.height)/a.TWO,E={[e.TOOLTIP_POSITION_TOP]:{x:I,y:t.top-r.height-e.TOOLTIP_SPACING},[e.TOOLTIP_POSITION_BOTTOM]:{x:I,y:t.bottom+e.TOOLTIP_SPACING},[e.TOOLTIP_POSITION_LEFT]:{x:t.left-r.width-e.TOOLTIP_SPACING,y:_},[e.TOOLTIP_POSITION_RIGHT]:{x:t.right+e.TOOLTIP_SPACING,y:_}},h=E[T]??E[e.TOOLTIP_POSITION_TOP],M=Math.max(e.TOOLTIP_VIEWPORT_PADDING,Math.min(h.x,window.innerWidth-r.width-e.TOOLTIP_VIEWPORT_PADDING)),D=Math.max(e.TOOLTIP_VIEWPORT_PADDING,Math.min(h.y,window.innerHeight-r.height-e.TOOLTIP_VIEWPORT_PADDING));A({x:M,y:D})},[T]),P=()=>{w||(s.current=setTimeout(()=>{u(!0)},x))},d=()=>{s.current&&clearTimeout(s.current),u(!1)};o.useEffect(()=>{n&&c()},[n,c]),o.useEffect(()=>{if(!n)return;const t=()=>{requestAnimationFrame(()=>c())};return t(),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[n,c]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const{openEffect:C}=G.resolveOverlayEffects({openEffect:y,closeEffect:N,effect:S},"fade"),v=e.TOOLTIP_EFFECT_CLASS_MAP[C]??e.TOOLTIP_EFFECT_CLASS_MAP.fade;return i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:l,onMouseEnter:P,onMouseLeave:d,onFocus:P,onBlur:d,className:"Bear-Tooltip__trigger bear-inline-block",children:b}),n&&F.createPortal(i.jsx("div",{ref:O,role:"tooltip",style:{left:f.x,top:f.y},className:B.cn("bear-fixed bear-z-[11000]","Bear-Tooltip",`Bear-Tooltip--${T}`,"bear-px-3 bear-py-2 bear-rounded-lg","bear-bg-gray-800 bear-text-white bear-text-sm","bear-border bear-border-gray-700","bear-shadow-lg",v,R),children:i.jsx("span",{className:"Bear-Tooltip__content",children:L})}),document.body)]})};exports.Tooltip=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../constants/numbers.const.cjs"),O={scale:"animate-scale-in",fade:"animate-fade-in","slide-down":"animate-grow-up",fold:"animate-alert-dialog-in",none:""},I=T.TWO_HUNDRED,P=T.EIGHT,_=T.EIGHT,t="top",L="bottom",n="left",e="right";exports.TOOLTIP_DEFAULT_DELAY=I;exports.TOOLTIP_EFFECT_CLASS_MAP=O;exports.TOOLTIP_POSITION_BOTTOM=L;exports.TOOLTIP_POSITION_LEFT=n;exports.TOOLTIP_POSITION_RIGHT=e;exports.TOOLTIP_POSITION_TOP=t;exports.TOOLTIP_SPACING=P;exports.TOOLTIP_VIEWPORT_PADDING=_;
|
|
@@ -1 +1,9 @@
|
|
|
1
1
|
export declare const T_O_O_L_T_I_P_ROOT_CLASS = "Bear-Tooltip";
|
|
2
|
+
export declare const TOOLTIP_EFFECT_CLASS_MAP: Record<string, string>;
|
|
3
|
+
export declare const TOOLTIP_DEFAULT_DELAY = 200;
|
|
4
|
+
export declare const TOOLTIP_SPACING = 8;
|
|
5
|
+
export declare const TOOLTIP_VIEWPORT_PADDING = 8;
|
|
6
|
+
export declare const TOOLTIP_POSITION_TOP = "top";
|
|
7
|
+
export declare const TOOLTIP_POSITION_BOTTOM = "bottom";
|
|
8
|
+
export declare const TOOLTIP_POSITION_LEFT = "left";
|
|
9
|
+
export declare const TOOLTIP_POSITION_RIGHT = "right";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TWO_HUNDRED as O, EIGHT as T } from "../../constants/numbers.const.js";
|
|
2
|
+
const t = {
|
|
3
|
+
scale: "animate-scale-in",
|
|
4
|
+
fade: "animate-fade-in",
|
|
5
|
+
"slide-down": "animate-grow-up",
|
|
6
|
+
fold: "animate-alert-dialog-in",
|
|
7
|
+
none: ""
|
|
8
|
+
}, o = O, n = T, P = T, _ = "top", a = "bottom", e = "left", L = "right";
|
|
9
|
+
export {
|
|
10
|
+
o as TOOLTIP_DEFAULT_DELAY,
|
|
11
|
+
t as TOOLTIP_EFFECT_CLASS_MAP,
|
|
12
|
+
a as TOOLTIP_POSITION_BOTTOM,
|
|
13
|
+
e as TOOLTIP_POSITION_LEFT,
|
|
14
|
+
L as TOOLTIP_POSITION_RIGHT,
|
|
15
|
+
_ as TOOLTIP_POSITION_TOP,
|
|
16
|
+
n as TOOLTIP_SPACING,
|
|
17
|
+
P as TOOLTIP_VIEWPORT_PADDING
|
|
18
|
+
};
|
|
@@ -1,78 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
r = Math.max(8, Math.min(r, window.innerWidth - t.width - 8)), o = Math.max(8, Math.min(o, window.innerHeight - t.height - 8)), E({ x: r, y: o });
|
|
33
|
-
}, [c]), g = () => {
|
|
34
|
-
B || (n.current = setTimeout(() => {
|
|
1
|
+
import { jsxs as j, Fragment as k, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useRef as d, useCallback as H, useEffect as u } from "react";
|
|
3
|
+
import { createPortal as Y } from "react-dom";
|
|
4
|
+
import { cn as q } from "../../utils/cn.js";
|
|
5
|
+
import { resolveOverlayEffects as U } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
6
|
+
import { TOOLTIP_DEFAULT_DELAY as X, TOOLTIP_POSITION_RIGHT as Z, TOOLTIP_SPACING as i, TOOLTIP_POSITION_LEFT as $, TOOLTIP_POSITION_BOTTOM as J, TOOLTIP_POSITION_TOP as T, TOOLTIP_VIEWPORT_PADDING as s, TOOLTIP_EFFECT_CLASS_MAP as _ } from "./Tooltip.const.js";
|
|
7
|
+
import { ZERO as w, TWO as L } from "../../constants/numbers.const.js";
|
|
8
|
+
const ie = (x) => {
|
|
9
|
+
const {
|
|
10
|
+
content: y,
|
|
11
|
+
children: v,
|
|
12
|
+
position: R,
|
|
13
|
+
placement: M,
|
|
14
|
+
delay: N = X,
|
|
15
|
+
className: B,
|
|
16
|
+
disabled: C = !1,
|
|
17
|
+
openEffect: S,
|
|
18
|
+
closeEffect: A,
|
|
19
|
+
effect: F
|
|
20
|
+
} = x, c = M || R || T, [o, m] = I(!1), [p, D] = I({ x: w, y: w }), a = d(null), l = d(null), r = d(), n = H(() => {
|
|
21
|
+
if (!a.current || !l.current) return;
|
|
22
|
+
const e = a.current.getBoundingClientRect(), t = l.current.getBoundingClientRect(), g = e.left + (e.width - t.width) / L, P = e.top + (e.height - t.height) / L, b = {
|
|
23
|
+
[T]: { x: g, y: e.top - t.height - i },
|
|
24
|
+
[J]: { x: g, y: e.bottom + i },
|
|
25
|
+
[$]: { x: e.left - t.width - i, y: P },
|
|
26
|
+
[Z]: { x: e.right + i, y: P }
|
|
27
|
+
}, E = b[c] ?? b[T], V = Math.max(s, Math.min(E.x, window.innerWidth - t.width - s)), W = Math.max(s, Math.min(E.y, window.innerHeight - t.height - s));
|
|
28
|
+
D({ x: V, y: W });
|
|
29
|
+
}, [c]), O = () => {
|
|
30
|
+
C || (r.current = setTimeout(() => {
|
|
35
31
|
m(!0);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
32
|
+
}, N));
|
|
33
|
+
}, h = () => {
|
|
34
|
+
r.current && clearTimeout(r.current), m(!1);
|
|
39
35
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
if (!
|
|
36
|
+
u(() => {
|
|
37
|
+
o && n();
|
|
38
|
+
}, [o, n]), u(() => {
|
|
39
|
+
if (!o) return;
|
|
44
40
|
const e = () => {
|
|
45
|
-
requestAnimationFrame(() =>
|
|
41
|
+
requestAnimationFrame(() => n());
|
|
46
42
|
};
|
|
47
43
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
48
44
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
49
45
|
};
|
|
50
|
-
}, [
|
|
51
|
-
|
|
52
|
-
}, [])
|
|
53
|
-
|
|
46
|
+
}, [o, n]), u(() => () => {
|
|
47
|
+
r.current && clearTimeout(r.current);
|
|
48
|
+
}, []);
|
|
49
|
+
const { openEffect: z } = U({ openEffect: S, closeEffect: A, effect: F }, "fade"), G = _[z] ?? _.fade;
|
|
50
|
+
return /* @__PURE__ */ j(k, { children: [
|
|
51
|
+
/* @__PURE__ */ f(
|
|
54
52
|
"div",
|
|
55
53
|
{
|
|
56
|
-
ref:
|
|
57
|
-
onMouseEnter:
|
|
58
|
-
onMouseLeave:
|
|
59
|
-
onFocus:
|
|
60
|
-
onBlur:
|
|
54
|
+
ref: a,
|
|
55
|
+
onMouseEnter: O,
|
|
56
|
+
onMouseLeave: h,
|
|
57
|
+
onFocus: O,
|
|
58
|
+
onBlur: h,
|
|
61
59
|
className: "Bear-Tooltip__trigger bear-inline-block",
|
|
62
60
|
children: v
|
|
63
61
|
}
|
|
64
62
|
),
|
|
65
|
-
|
|
66
|
-
/* @__PURE__ */
|
|
63
|
+
o && Y(
|
|
64
|
+
/* @__PURE__ */ f(
|
|
67
65
|
"div",
|
|
68
66
|
{
|
|
69
|
-
ref:
|
|
67
|
+
ref: l,
|
|
70
68
|
role: "tooltip",
|
|
71
69
|
style: {
|
|
72
|
-
left:
|
|
73
|
-
top:
|
|
70
|
+
left: p.x,
|
|
71
|
+
top: p.y
|
|
74
72
|
},
|
|
75
|
-
className:
|
|
73
|
+
className: q(
|
|
76
74
|
"bear-fixed bear-z-[11000]",
|
|
77
75
|
"Bear-Tooltip",
|
|
78
76
|
`Bear-Tooltip--${c}`,
|
|
@@ -80,10 +78,10 @@ const V = ({
|
|
|
80
78
|
"bear-bg-gray-800 bear-text-white bear-text-sm",
|
|
81
79
|
"bear-border bear-border-gray-700",
|
|
82
80
|
"bear-shadow-lg",
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
G,
|
|
82
|
+
B
|
|
85
83
|
),
|
|
86
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ f("span", { className: "Bear-Tooltip__content", children: y })
|
|
87
85
|
}
|
|
88
86
|
),
|
|
89
87
|
document.body
|
|
@@ -91,5 +89,5 @@ const V = ({
|
|
|
91
89
|
] });
|
|
92
90
|
};
|
|
93
91
|
export {
|
|
94
|
-
|
|
92
|
+
ie as Tooltip
|
|
95
93
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { OverlayMotionEffect, OverlayEffectConfig } from '../../hooks/useFixedAnchorPosition';
|
|
2
3
|
export interface TooltipProps {
|
|
3
4
|
testId?: string;
|
|
4
5
|
id?: string;
|
|
@@ -16,4 +17,10 @@ export interface TooltipProps {
|
|
|
16
17
|
className?: string;
|
|
17
18
|
/** Whether tooltip is disabled */
|
|
18
19
|
disabled?: boolean;
|
|
20
|
+
/** Transition effect when opening */
|
|
21
|
+
openEffect?: OverlayMotionEffect;
|
|
22
|
+
/** Transition effect when closing */
|
|
23
|
+
closeEffect?: OverlayMotionEffect;
|
|
24
|
+
/** Config for open and close transition effects */
|
|
25
|
+
effect?: OverlayEffectConfig;
|
|
19
26
|
}
|