@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
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),s=require("react"),U=require("../Portal/Portal.cjs"),y=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),e=require("../../constants/numbers.const.cjs"),w=require("./HoverCard.const.cjs");function C(t,c,o){const a=e.EIGHT;let r=e.ZERO,n=e.ZERO;const T=e.TWO_HUNDRED_EIGHTY_EIGHT/e.TWO;return c==="bottom"?(r=t.bottom+a,n=t.left+t.width/e.TWO-T,o==="start"&&(n=t.left),o==="end"&&(n=t.right-e.TWO_HUNDRED_EIGHTY_EIGHT)):c==="top"?(r=t.top-e.TWO_HUNDRED-a,n=t.left+t.width/e.TWO-T,o==="start"&&(n=t.left),o==="end"&&(n=t.right-e.TWO_HUNDRED_EIGHTY_EIGHT)):c==="right"?(n=t.right+a,r=t.top+t.height/e.TWO-e.TWO_HUNDRED/e.TWO,o==="start"&&(r=t.top),o==="end"&&(r=t.bottom-e.TWO_HUNDRED)):(n=t.left-e.TWO_HUNDRED_EIGHTY_EIGHT-a,r=t.top+t.height/e.TWO-e.TWO_HUNDRED/e.TWO,o==="start"&&(r=t.top),o==="end"&&(r=t.bottom-e.TWO_HUNDRED)),n=Math.max(e.EIGHT,Math.min(n,window.innerWidth-e.TWO_HUNDRED_EIGHTY_EIGHT-e.EIGHT)),r=Math.max(e.EIGHT,Math.min(r,window.innerHeight-e.TWO_HUNDRED-e.EIGHT)),{position:"fixed",zIndex:e.ELEVEN_THOUSAND,top:r,left:n,width:e.TWO_HUNDRED_EIGHTY_EIGHT}}const W=s.forwardRef(({children:t,cardContent:c,side:o="bottom",align:a="center",openDelay:r=200,closeDelay:n=300,arrow:T=!0,className:p="",...m},I)=>{const[u,H]=s.useState(!1),[N,G]=s.useState({}),l=s.useRef(),f=s.useRef(),d=s.useRef(null),b=s.useRef(null);s.useEffect(()=>{if(!u||!d.current)return;const i=()=>{const _=d.current.getBoundingClientRect();G(C(_,o,a))};return i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[u,o,a]),s.useEffect(()=>{if(!u)return;const i=_=>{var D,v;const h=_.target;(D=d.current)!=null&&D.contains(h)||(v=b.current)!=null&&v.contains(h)||H(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[u]);const R=()=>{f.current&&clearTimeout(f.current),l.current=setTimeout(()=>H(!0),r)},O=()=>{l.current&&clearTimeout(l.current),f.current=setTimeout(()=>H(!1),n)};s.useEffect(()=>()=>{l.current&&clearTimeout(l.current),f.current&&clearTimeout(f.current)},[]);const{openEffect:g}=y.resolveOverlayEffects(m,"scale"),M=w.HOVER_CARD_EFFECT_CLASS_MAP[g]??w.HOVER_CARD_EFFECT_CLASS_MAP.scale;return E.jsxs("div",{ref:I,className:`bear-hover-card bear-relative bear-inline-block ${p}`.trim(),onMouseEnter:R,onMouseLeave:O,...m,children:[E.jsx("div",{ref:d,className:"bear-inline-block",children:t}),u&&E.jsx(U.Portal,{children:E.jsx("div",{ref:b,style:N,className:`
|
|
2
2
|
bear-bg-white dark:bear-bg-gray-800 bear-rounded-lg bear-shadow-xl
|
|
3
3
|
bear-border bear-border-gray-200 dark:bear-border-gray-700 bear-p-4
|
|
4
4
|
bear-transition-all bear-duration-200
|
|
5
|
-
${
|
|
6
|
-
|
|
5
|
+
${u?"bear-opacity-100 bear-scale-100":"bear-opacity-0 bear-scale-95"}
|
|
6
|
+
${M}
|
|
7
|
+
`.trim(),onMouseEnter:R,onMouseLeave:O,children:c})})]})});W.displayName="HoverCard";exports.HoverCard=W;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={scale:"animate-scale-in",fade:"animate-fade-in","slide-down":"animate-grow-up",fold:"animate-alert-dialog-in",none:""};exports.HOVER_CARD_EFFECT_CLASS_MAP=e;
|
|
@@ -1,86 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Portal as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as A, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useState as _, useRef as h, useEffect as T } from "react";
|
|
3
|
+
import { Portal as z } from "../Portal/Portal.js";
|
|
4
|
+
import { resolveOverlayEffects as G } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
5
|
+
import { TWO as a, TWO_HUNDRED_EIGHTY_EIGHT as u, TWO_HUNDRED as f, ZERO as x, ELEVEN_THOUSAND as U, EIGHT as m } from "../../constants/numbers.const.js";
|
|
6
|
+
import { HOVER_CARD_EFFECT_CLASS_MAP as N } from "./HoverCard.const.js";
|
|
7
|
+
function $(e, l, o) {
|
|
8
|
+
const i = m;
|
|
9
|
+
let t = x, r = x;
|
|
10
|
+
const p = u / a;
|
|
11
|
+
return l === "bottom" ? (t = e.bottom + i, r = e.left + e.width / a - p, o === "start" && (r = e.left), o === "end" && (r = e.right - u)) : l === "top" ? (t = e.top - f - i, r = e.left + e.width / a - p, o === "start" && (r = e.left), o === "end" && (r = e.right - u)) : l === "right" ? (r = e.right + i, t = e.top + e.height / a - f / a, o === "start" && (t = e.top), o === "end" && (t = e.bottom - f)) : (r = e.left - u - i, t = e.top + e.height / a - f / a, o === "start" && (t = e.top), o === "end" && (t = e.bottom - f)), r = Math.max(m, Math.min(r, window.innerWidth - u - m)), t = Math.max(m, Math.min(t, window.innerHeight - f - m)), {
|
|
9
12
|
position: "fixed",
|
|
10
|
-
zIndex:
|
|
13
|
+
zIndex: U,
|
|
11
14
|
top: t,
|
|
12
15
|
left: r,
|
|
13
|
-
width:
|
|
16
|
+
width: u
|
|
14
17
|
};
|
|
15
18
|
}
|
|
16
|
-
const
|
|
19
|
+
const j = P(({
|
|
17
20
|
children: e,
|
|
18
|
-
cardContent:
|
|
19
|
-
side:
|
|
20
|
-
align:
|
|
21
|
+
cardContent: l,
|
|
22
|
+
side: o = "bottom",
|
|
23
|
+
align: i = "center",
|
|
21
24
|
openDelay: t = 200,
|
|
22
25
|
closeDelay: r = 300,
|
|
23
|
-
arrow:
|
|
24
|
-
className:
|
|
25
|
-
...
|
|
26
|
-
},
|
|
27
|
-
const [
|
|
28
|
-
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
26
|
+
arrow: p = !0,
|
|
27
|
+
className: C = "",
|
|
28
|
+
...R
|
|
29
|
+
}, D) => {
|
|
30
|
+
const [s, E] = _(!1), [S, I] = _({}), d = h(), c = h(), b = h(null), g = h(null);
|
|
31
|
+
T(() => {
|
|
32
|
+
if (!s || !b.current) return;
|
|
33
|
+
const n = () => {
|
|
34
|
+
const w = b.current.getBoundingClientRect();
|
|
35
|
+
I($(w, o, i));
|
|
33
36
|
};
|
|
34
|
-
return
|
|
35
|
-
window.removeEventListener("resize",
|
|
37
|
+
return n(), window.addEventListener("resize", n), window.addEventListener("scroll", n, !0), () => {
|
|
38
|
+
window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0);
|
|
36
39
|
};
|
|
37
|
-
}, [
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
var
|
|
41
|
-
const
|
|
42
|
-
(
|
|
40
|
+
}, [s, o, i]), T(() => {
|
|
41
|
+
if (!s) return;
|
|
42
|
+
const n = (w) => {
|
|
43
|
+
var H, O;
|
|
44
|
+
const y = w.target;
|
|
45
|
+
(H = b.current) != null && H.contains(y) || (O = g.current) != null && O.contains(y) || E(!1);
|
|
43
46
|
};
|
|
44
|
-
return document.addEventListener("mousedown",
|
|
45
|
-
}, [
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
d.current && clearTimeout(d.current),
|
|
47
|
+
return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
|
|
48
|
+
}, [s]);
|
|
49
|
+
const L = () => {
|
|
50
|
+
c.current && clearTimeout(c.current), d.current = setTimeout(() => E(!0), t);
|
|
51
|
+
}, M = () => {
|
|
52
|
+
d.current && clearTimeout(d.current), c.current = setTimeout(() => E(!1), r);
|
|
50
53
|
};
|
|
51
|
-
|
|
52
|
-
d.current && clearTimeout(d.current),
|
|
53
|
-
}, [])
|
|
54
|
+
T(() => () => {
|
|
55
|
+
d.current && clearTimeout(d.current), c.current && clearTimeout(c.current);
|
|
56
|
+
}, []);
|
|
57
|
+
const { openEffect: W } = G(R, "scale"), k = N[W] ?? N.scale;
|
|
58
|
+
return /* @__PURE__ */ A(
|
|
54
59
|
"div",
|
|
55
60
|
{
|
|
56
|
-
ref:
|
|
57
|
-
className: `bear-hover-card bear-relative bear-inline-block ${
|
|
58
|
-
onMouseEnter:
|
|
59
|
-
onMouseLeave:
|
|
60
|
-
...
|
|
61
|
+
ref: D,
|
|
62
|
+
className: `bear-hover-card bear-relative bear-inline-block ${C}`.trim(),
|
|
63
|
+
onMouseEnter: L,
|
|
64
|
+
onMouseLeave: M,
|
|
65
|
+
...R,
|
|
61
66
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
67
|
+
/* @__PURE__ */ v("div", { ref: b, className: "bear-inline-block", children: e }),
|
|
68
|
+
s && /* @__PURE__ */ v(z, { children: /* @__PURE__ */ v(
|
|
64
69
|
"div",
|
|
65
70
|
{
|
|
66
71
|
ref: g,
|
|
67
|
-
style:
|
|
72
|
+
style: S,
|
|
68
73
|
className: `
|
|
69
74
|
bear-bg-white dark:bear-bg-gray-800 bear-rounded-lg bear-shadow-xl
|
|
70
75
|
bear-border bear-border-gray-200 dark:bear-border-gray-700 bear-p-4
|
|
71
76
|
bear-transition-all bear-duration-200
|
|
72
|
-
${
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
${s ? "bear-opacity-100 bear-scale-100" : "bear-opacity-0 bear-scale-95"}
|
|
78
|
+
${k}
|
|
79
|
+
`.trim(),
|
|
80
|
+
onMouseEnter: L,
|
|
81
|
+
onMouseLeave: M,
|
|
82
|
+
children: l
|
|
77
83
|
}
|
|
78
84
|
) })
|
|
79
85
|
]
|
|
80
86
|
}
|
|
81
87
|
);
|
|
82
88
|
});
|
|
83
|
-
|
|
89
|
+
j.displayName = "HoverCard";
|
|
84
90
|
export {
|
|
85
|
-
|
|
91
|
+
j as HoverCard
|
|
86
92
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { OverlayMotionEffect, OverlayEffectConfig } from '../../hooks/useFixedAnchorPosition';
|
|
2
3
|
export interface HoverCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
3
4
|
testId?: string;
|
|
4
5
|
id?: string;
|
|
@@ -9,6 +10,12 @@ export interface HoverCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'co
|
|
|
9
10
|
openDelay?: number;
|
|
10
11
|
closeDelay?: number;
|
|
11
12
|
arrow?: boolean;
|
|
13
|
+
/** Transition effect when opening */
|
|
14
|
+
openEffect?: OverlayMotionEffect;
|
|
15
|
+
/** Transition effect when closing */
|
|
16
|
+
closeEffect?: OverlayMotionEffect;
|
|
17
|
+
/** Config for open and close transition effects */
|
|
18
|
+
effect?: OverlayEffectConfig;
|
|
12
19
|
}
|
|
13
20
|
export interface HoverCardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
21
|
children?: ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@forgedevstack/bear-icons"),x=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"4",y:"3",width:"16",height:"18",rx:"2"}),t.jsx("path",{d:"M8 7h8"}),t.jsx("path",{d:"M8 11h8"}),t.jsx("path",{d:"M8 15h5"}),t.jsx("circle",{cx:"17",cy:"16.5",r:"2.5"})]}),c=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("path",{d:"M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z"}),t.jsx("path",{d:"M12 12l8-4.5"}),t.jsx("path",{d:"M12 12v9"}),t.jsx("path",{d:"M12 12L4 7.5"}),t.jsx("path",{d:"M9.5 14.5l1.5 1.5 3-3"})]}),e=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"3",y:"13",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"13",width:"8",height:"8",rx:"1.5"})]});exports.ComponentsIcon=e;exports.SandboxIcon=c;exports.StorybookIcon=x;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconProps } from '@forgedevstack/bear-icons';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
type ProductIcon = FC<Omit<IconProps, 'children'>>;
|
|
4
|
+
export declare const StorybookIcon: ProductIcon;
|
|
5
|
+
export declare const SandboxIcon: ProductIcon;
|
|
6
|
+
export declare const ComponentsIcon: ProductIcon;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as c } from "@forgedevstack/bear-icons";
|
|
3
|
+
const e = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
4
|
+
/* @__PURE__ */ t("rect", { x: "4", y: "3", width: "16", height: "18", rx: "2" }),
|
|
5
|
+
/* @__PURE__ */ t("path", { d: "M8 7h8" }),
|
|
6
|
+
/* @__PURE__ */ t("path", { d: "M8 11h8" }),
|
|
7
|
+
/* @__PURE__ */ t("path", { d: "M8 15h5" }),
|
|
8
|
+
/* @__PURE__ */ t("circle", { cx: "17", cy: "16.5", r: "2.5" })
|
|
9
|
+
] }), i = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
10
|
+
/* @__PURE__ */ t("path", { d: "M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z" }),
|
|
11
|
+
/* @__PURE__ */ t("path", { d: "M12 12l8-4.5" }),
|
|
12
|
+
/* @__PURE__ */ t("path", { d: "M12 12v9" }),
|
|
13
|
+
/* @__PURE__ */ t("path", { d: "M12 12L4 7.5" }),
|
|
14
|
+
/* @__PURE__ */ t("path", { d: "M9.5 14.5l1.5 1.5 3-3" })
|
|
15
|
+
] }), x = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
16
|
+
/* @__PURE__ */ t("rect", { x: "3", y: "3", width: "8", height: "8", rx: "1.5" }),
|
|
17
|
+
/* @__PURE__ */ t("rect", { x: "13", y: "3", width: "8", height: "8", rx: "1.5" }),
|
|
18
|
+
/* @__PURE__ */ t("rect", { x: "3", y: "13", width: "8", height: "8", rx: "1.5" }),
|
|
19
|
+
/* @__PURE__ */ t("rect", { x: "13", y: "13", width: "8", height: "8", rx: "1.5" })
|
|
20
|
+
] });
|
|
21
|
+
export {
|
|
22
|
+
x as ComponentsIcon,
|
|
23
|
+
i as SandboxIcon,
|
|
24
|
+
e as StorybookIcon
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),u=require("react"),p=require("../../utils/cn.cjs"),S=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),q=require("../Portal/Portal.cjs"),b=require("./Menu.const.cjs"),P=({open:c=!1,anchorEl:n,onClose:s,children:k,position:l="bottom-start",minWidth:d=180,maxHeight:f=300,className:E,testId:m,...v})=>{const i=u.useRef(null),[g,L]=u.useState({top:0,left:0});u.useLayoutEffect(()=>{if(!c||!n)return;const r=()=>{const t=n.getBoundingClientRect(),e=i.current,w=e?e.offsetHeight:Math.min(f,200);let o=0,a=0;switch(l){case"bottom-start":o=t.bottom+4,a=t.left;break;case"bottom-end":o=t.bottom+4,a=t.right-((e==null?void 0:e.offsetWidth)??d);break;case"top-start":o=t.top-w-4,a=t.left;break;case"top-end":o=t.top-w-4,a=t.right-((e==null?void 0:e.offsetWidth)??d);break;case"right-start":o=t.top,a=t.right+4;break;case"left-start":o=t.top,a=t.left-((e==null?void 0:e.offsetWidth)??d)-4;break}L({top:o,left:a})};return r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[c,n,l,d,f]),u.useEffect(()=>{if(!c)return;const r=e=>{i.current&&!i.current.contains(e.target)&&n&&!n.contains(e.target)&&(s==null||s())},t=e=>{e.key==="Escape"&&(s==null||s())};return document.addEventListener("mousedown",r),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",t)}},[c,n,s]);const{openEffect:M}=S.resolveOverlayEffects(v,"fade"),_=b.MENU_EFFECT_CLASS_MAP[M]??b.MENU_EFFECT_CLASS_MAP.fade;return c?y.jsx(q.Portal,{children:y.jsx("div",{ref:i,role:"menu",className:p.cn("bear-fixed bear-bg-white dark:bear-bg-gray-800","bear-border bear-border-gray-200 dark:bear-border-gray-700","bear-rounded-lg bear-shadow-lg bear-py-1","bear-overflow-y-auto",_,E),style:{top:g.top,left:g.left,minWidth:d,maxHeight:f,zIndex:b.MENU_Z_INDEX},"data-testid":m,...v,children:k})}):null};exports.Menu=P;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/numbers.const.cjs"),n=e.TWELVE_THOUSAND,a={scale:"animate-scale-in",fade:"animate-fade-in","slide-down":"animate-grow-up",fold:"animate-alert-dialog-in",none:""};exports.MENU_EFFECT_CLASS_MAP=a;exports.MENU_Z_INDEX=n;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TWELVE_THOUSAND as a } from "../../constants/numbers.const.js";
|
|
2
|
+
const n = a, i = {
|
|
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
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
i as MENU_EFFECT_CLASS_MAP,
|
|
11
|
+
n as MENU_Z_INDEX
|
|
12
|
+
};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { MenuProps
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export declare const MenuItem: FC<MenuItemProps>;
|
|
7
|
-
/**
|
|
8
|
-
* MenuDivider component for separating menu sections
|
|
9
|
-
*/
|
|
10
|
-
export declare const MenuDivider: FC<MenuDividerProps>;
|
|
2
|
+
import { MenuProps } from './Menu.types';
|
|
3
|
+
export { MenuItem } from './MenuItem';
|
|
4
|
+
export { MenuDivider } from './MenuDivider';
|
|
11
5
|
/**
|
|
12
6
|
* Menu component for dropdown menus
|
|
13
7
|
*
|
|
@@ -1,122 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as M, useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
onClick: a,
|
|
12
|
-
className: u,
|
|
13
|
-
testId: l,
|
|
14
|
-
...y
|
|
15
|
-
}) => /* @__PURE__ */ h(L, { children: [
|
|
16
|
-
/* @__PURE__ */ h(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
role: "menuitem",
|
|
20
|
-
tabIndex: r ? -1 : 0,
|
|
21
|
-
className: v(
|
|
22
|
-
"bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2 bear-cursor-pointer bear-transition-colors",
|
|
23
|
-
"hover:bear-bg-gray-100 dark:hover:bear-bg-gray-700",
|
|
24
|
-
"focus:bear-outline-none focus:bear-bg-gray-100 dark:focus:bear-bg-gray-700",
|
|
25
|
-
n && "bear-bg-primary-50 dark:bear-bg-primary-900/20 bear-text-primary-600",
|
|
26
|
-
r && "bear-opacity-50 bear-cursor-not-allowed hover:bear-bg-transparent",
|
|
27
|
-
u
|
|
28
|
-
),
|
|
29
|
-
onClick: r ? void 0 : a,
|
|
30
|
-
onKeyDown: (f) => {
|
|
31
|
-
(f.key === "Enter" || f.key === " ") && !r && (a == null || a());
|
|
32
|
-
},
|
|
33
|
-
"data-testid": l,
|
|
34
|
-
...y,
|
|
35
|
-
children: [
|
|
36
|
-
t && /* @__PURE__ */ c("span", { className: "bear-flex-shrink-0 bear-text-gray-500", children: t }),
|
|
37
|
-
/* @__PURE__ */ c("span", { className: "bear-flex-1 bear-text-sm", children: m })
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
g && /* @__PURE__ */ c(O, {})
|
|
42
|
-
] }), O = ({ className: t }) => /* @__PURE__ */ c("div", { className: v("bear-h-px bear-bg-gray-200 dark:bear-bg-gray-700 bear-my-1", t) }), K = ({
|
|
43
|
-
open: t = !1,
|
|
44
|
-
anchorEl: r,
|
|
45
|
-
onClose: n,
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as M, useState as _, useLayoutEffect as h, useEffect as N } from "react";
|
|
3
|
+
import { cn as z } from "../../utils/cn.js";
|
|
4
|
+
import { resolveOverlayEffects as R } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
5
|
+
import { Portal as S } from "../Portal/Portal.js";
|
|
6
|
+
import { MENU_Z_INDEX as x, MENU_EFFECT_CLASS_MAP as p } from "./Menu.const.js";
|
|
7
|
+
const j = ({
|
|
8
|
+
open: d = !1,
|
|
9
|
+
anchorEl: f,
|
|
10
|
+
onClose: o,
|
|
46
11
|
children: g,
|
|
47
|
-
position:
|
|
48
|
-
minWidth:
|
|
49
|
-
maxHeight:
|
|
12
|
+
position: u = "bottom-start",
|
|
13
|
+
minWidth: n = 180,
|
|
14
|
+
maxHeight: i = 300,
|
|
50
15
|
className: l,
|
|
51
|
-
testId:
|
|
52
|
-
...
|
|
16
|
+
testId: k,
|
|
17
|
+
...b
|
|
53
18
|
}) => {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
if (!
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
switch (
|
|
19
|
+
const c = M(null), [m, y] = _({ top: 0, left: 0 });
|
|
20
|
+
h(() => {
|
|
21
|
+
if (!d || !f) return;
|
|
22
|
+
const r = () => {
|
|
23
|
+
const t = f.getBoundingClientRect(), e = c.current, v = e ? e.offsetHeight : Math.min(i, 200);
|
|
24
|
+
let a = 0, s = 0;
|
|
25
|
+
switch (u) {
|
|
61
26
|
case "bottom-start":
|
|
62
|
-
|
|
27
|
+
a = t.bottom + 4, s = t.left;
|
|
63
28
|
break;
|
|
64
29
|
case "bottom-end":
|
|
65
|
-
|
|
30
|
+
a = t.bottom + 4, s = t.right - ((e == null ? void 0 : e.offsetWidth) ?? n);
|
|
66
31
|
break;
|
|
67
32
|
case "top-start":
|
|
68
|
-
|
|
33
|
+
a = t.top - v - 4, s = t.left;
|
|
69
34
|
break;
|
|
70
35
|
case "top-end":
|
|
71
|
-
|
|
36
|
+
a = t.top - v - 4, s = t.right - ((e == null ? void 0 : e.offsetWidth) ?? n);
|
|
37
|
+
break;
|
|
38
|
+
case "right-start":
|
|
39
|
+
a = t.top, s = t.right + 4;
|
|
40
|
+
break;
|
|
41
|
+
case "left-start":
|
|
42
|
+
a = t.top, s = t.left - ((e == null ? void 0 : e.offsetWidth) ?? n) - 4;
|
|
72
43
|
break;
|
|
73
44
|
}
|
|
74
|
-
|
|
75
|
-
const E = window.innerHeight - p - 8;
|
|
76
|
-
d = Math.max(8, Math.min(d, E)), k({ top: d, left: i });
|
|
45
|
+
y({ top: a, left: s });
|
|
77
46
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return b.current && o && o.observe(b.current), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), () => {
|
|
81
|
-
o == null || o.disconnect(), window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0);
|
|
47
|
+
return r(), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
|
|
48
|
+
window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
82
49
|
};
|
|
83
|
-
}, [
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
e.key === "Escape" && (
|
|
50
|
+
}, [d, f, u, n, i]), N(() => {
|
|
51
|
+
if (!d) return;
|
|
52
|
+
const r = (e) => {
|
|
53
|
+
c.current && !c.current.contains(e.target) && f && !f.contains(e.target) && (o == null || o());
|
|
54
|
+
}, t = (e) => {
|
|
55
|
+
e.key === "Escape" && (o == null || o());
|
|
89
56
|
};
|
|
90
|
-
return document.addEventListener("mousedown",
|
|
91
|
-
document.removeEventListener("mousedown",
|
|
57
|
+
return document.addEventListener("mousedown", r), document.addEventListener("keydown", t), () => {
|
|
58
|
+
document.removeEventListener("mousedown", r), document.removeEventListener("keydown", t);
|
|
92
59
|
};
|
|
93
|
-
}, [
|
|
60
|
+
}, [d, f, o]);
|
|
61
|
+
const { openEffect: L } = R(b, "fade"), E = p[L] ?? p.fade;
|
|
62
|
+
return d ? /* @__PURE__ */ w(S, { children: /* @__PURE__ */ w(
|
|
94
63
|
"div",
|
|
95
64
|
{
|
|
96
|
-
ref:
|
|
65
|
+
ref: c,
|
|
97
66
|
role: "menu",
|
|
98
|
-
className:
|
|
67
|
+
className: z(
|
|
99
68
|
"bear-fixed bear-bg-white dark:bear-bg-gray-800",
|
|
100
69
|
"bear-border bear-border-gray-200 dark:bear-border-gray-700",
|
|
101
70
|
"bear-rounded-lg bear-shadow-lg bear-py-1",
|
|
102
71
|
"bear-overflow-y-auto",
|
|
72
|
+
E,
|
|
103
73
|
l
|
|
104
74
|
),
|
|
105
75
|
style: {
|
|
106
|
-
top:
|
|
107
|
-
left:
|
|
108
|
-
minWidth:
|
|
109
|
-
maxHeight:
|
|
110
|
-
zIndex:
|
|
76
|
+
top: m.top,
|
|
77
|
+
left: m.left,
|
|
78
|
+
minWidth: n,
|
|
79
|
+
maxHeight: i,
|
|
80
|
+
zIndex: x
|
|
111
81
|
},
|
|
112
|
-
"data-testid":
|
|
113
|
-
...
|
|
82
|
+
"data-testid": k,
|
|
83
|
+
...b,
|
|
114
84
|
children: g
|
|
115
85
|
}
|
|
116
86
|
) }) : null;
|
|
117
87
|
};
|
|
118
88
|
export {
|
|
119
|
-
|
|
120
|
-
O as MenuDivider,
|
|
121
|
-
H as MenuItem
|
|
89
|
+
j as Menu
|
|
122
90
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { OverlayMotionEffect, OverlayEffectConfig } from '../../hooks/useFixedAnchorPosition';
|
|
2
3
|
export interface MenuItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
id?: string;
|
|
4
5
|
/** Icon to show before the label */
|
|
@@ -26,11 +27,17 @@ export interface MenuProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
26
27
|
/** Menu items */
|
|
27
28
|
children?: ReactNode;
|
|
28
29
|
/** Position relative to anchor */
|
|
29
|
-
position?: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
30
|
+
position?: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'right-start' | 'left-start';
|
|
30
31
|
/** Min width of the menu */
|
|
31
32
|
minWidth?: number;
|
|
32
33
|
/** Max height before scrolling */
|
|
33
34
|
maxHeight?: number;
|
|
35
|
+
/** Transition effect when opening */
|
|
36
|
+
openEffect?: OverlayMotionEffect;
|
|
37
|
+
/** Transition effect when closing */
|
|
38
|
+
closeEffect?: OverlayMotionEffect;
|
|
39
|
+
/** Config for open and close transition effects */
|
|
40
|
+
effect?: OverlayEffectConfig;
|
|
34
41
|
/** Test ID */
|
|
35
42
|
testId?: string;
|
|
36
43
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const a=({className:e})=>r.jsx("div",{className:i.cn("bear-h-px bear-bg-gray-200 dark:bear-bg-gray-700 bear-my-1",e)});exports.MenuDivider=a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
const i = ({ className: r }) => /* @__PURE__ */ a("div", { className: e("bear-h-px bear-bg-gray-200 dark:bear-bg-gray-700 bear-my-1", r) });
|
|
5
|
+
export {
|
|
6
|
+
i as MenuDivider
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/cn.cjs");require("react");const n=require("../../constants/numbers.const.cjs"),y=require("./MenuDivider.cjs"),x=({icon:t,disabled:r=!1,selected:b=!1,divider:o=!1,children:i,onClick:a,className:u,testId:c,...g})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{role:"menuitem",tabIndex:r?n.NEGATIVE_ONE:n.ZERO,className:m.cn("bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2 bear-cursor-pointer bear-transition-colors","hover:bear-bg-gray-100 dark:hover:bear-bg-gray-700","focus:bear-outline-none focus:bear-bg-gray-100 dark:focus:bear-bg-gray-700",b&&"bear-bg-primary-50 dark:bear-bg-primary-900/20 bear-text-primary-600",r&&"bear-opacity-50 bear-cursor-not-allowed hover:bear-bg-transparent",u),onClick:r?void 0:a,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&!r&&(a==null||a())},"data-testid":c,...g,children:[t&&e.jsx("span",{className:"bear-flex-shrink-0 bear-text-gray-500",children:t}),e.jsx("span",{className:"bear-flex-1 bear-text-sm",children:i})]}),o&&e.jsx(y.MenuDivider,{})]});exports.MenuItem=x;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as o, Fragment as g, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as y } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { NEGATIVE_ONE as c, ZERO as x } from "../../constants/numbers.const.js";
|
|
5
|
+
import { MenuDivider as l } from "./MenuDivider.js";
|
|
6
|
+
const N = ({
|
|
7
|
+
icon: t,
|
|
8
|
+
disabled: r = !1,
|
|
9
|
+
selected: s = !1,
|
|
10
|
+
divider: n = !1,
|
|
11
|
+
children: m,
|
|
12
|
+
onClick: e,
|
|
13
|
+
className: i,
|
|
14
|
+
testId: p,
|
|
15
|
+
...f
|
|
16
|
+
}) => /* @__PURE__ */ o(g, { children: [
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
role: "menuitem",
|
|
21
|
+
tabIndex: r ? c : x,
|
|
22
|
+
className: y(
|
|
23
|
+
"bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2 bear-cursor-pointer bear-transition-colors",
|
|
24
|
+
"hover:bear-bg-gray-100 dark:hover:bear-bg-gray-700",
|
|
25
|
+
"focus:bear-outline-none focus:bear-bg-gray-100 dark:focus:bear-bg-gray-700",
|
|
26
|
+
s && "bear-bg-primary-50 dark:bear-bg-primary-900/20 bear-text-primary-600",
|
|
27
|
+
r && "bear-opacity-50 bear-cursor-not-allowed hover:bear-bg-transparent",
|
|
28
|
+
i
|
|
29
|
+
),
|
|
30
|
+
onClick: r ? void 0 : e,
|
|
31
|
+
onKeyDown: (b) => {
|
|
32
|
+
(b.key === "Enter" || b.key === " ") && !r && (e == null || e());
|
|
33
|
+
},
|
|
34
|
+
"data-testid": p,
|
|
35
|
+
...f,
|
|
36
|
+
children: [
|
|
37
|
+
t && /* @__PURE__ */ a("span", { className: "bear-flex-shrink-0 bear-text-gray-500", children: t }),
|
|
38
|
+
/* @__PURE__ */ a("span", { className: "bear-flex-1 bear-text-sm", children: m })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
n && /* @__PURE__ */ a(l, {})
|
|
43
|
+
] });
|
|
44
|
+
export {
|
|
45
|
+
N as MenuItem
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("../../constants/generals.const.cjs"),B=require("../../utils/cn.cjs");require("react");const y=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),s=require("../Button/Button.cjs"),S=require("../Flex/Flex.cjs"),h=require("./MessageActions.const.cjs"),m=a=>{const{id:c,testId:l,onCopy:n,onRetry:o,onGood:r,onBad:i,translations:u,className:d}=a,g=I.useBearId(A.COMPONENT_NAME_MESSAGE_ACTIONS),b=y.resolveBearId(c,g),t={...h.MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS,...u};return e.jsxs(S.Flex,{id:b,testId:l,className:B.cn("Bear-MessageActions",d),align:"center",gap:1,children:[n&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:n,children:t.copyLabel}),o&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:o,children:t.retryLabel}),r&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:r,children:t.goodLabel}),i&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:i,children:t.badLabel})]})};exports.MessageActions=m;
|