@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,91 +1,107 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import { resolveBearId as
|
|
7
|
-
import { useBearId as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
1
|
+
import { jsxs as B, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as $ } from "react";
|
|
3
|
+
import { createPortal as V } from "react-dom";
|
|
4
|
+
import { useBearDirectionOptional as g } from "../../context/BearProvider.js";
|
|
5
|
+
import { cn as O } from "../../utils/cn.js";
|
|
6
|
+
import { resolveBearId as j } from "../../utils/generateBearId.utils.js";
|
|
7
|
+
import { useBearId as H } from "../../utils/useBearId.js";
|
|
8
|
+
import { useFocusTrap as Y } from "../../hooks/useFocusTrap/useFocusTrap.js";
|
|
9
|
+
import { BOOLEAN_TRUE as o, COMPONENT_NAME_DRAWER as z, BOOLEAN_FALSE as i, DRAWER_VARIANT_TEMPORARY as Z, DRAWER_VARIANT_PERMANENT as q } from "../../constants/generals.const.js";
|
|
10
|
+
import { OVERLAY_OPEN_EFFECT_DEFAULT as G } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
11
|
+
import { resolveOverlayEffects as J } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
12
|
+
import { Backdrop as K } from "../Backdrop/Backdrop.js";
|
|
13
|
+
import { Box as c } from "../Box/Box.js";
|
|
14
|
+
import { DRAWER_DEFAULT_SIDE as Q, DRAWER_DEFAULT_VARIANT as X, DRAWER_DEFAULT_SIZE as ee, DRAWER_ANIMATION_MS as re } from "./Drawer.const.js";
|
|
15
|
+
import { DrawerOptionalHeader as oe } from "./helpers/DrawerOptionalHeader.js";
|
|
16
|
+
import { useDrawer as ae } from "./hooks/useDrawer.js";
|
|
17
|
+
const Be = (d) => {
|
|
17
18
|
const {
|
|
18
|
-
isOpen:
|
|
19
|
-
onClose:
|
|
20
|
-
title:
|
|
21
|
-
children:
|
|
22
|
-
side:
|
|
23
|
-
anchor:
|
|
24
|
-
variant:
|
|
25
|
-
size:
|
|
26
|
-
showCloseButton:
|
|
27
|
-
closeOnBackdrop:
|
|
28
|
-
closeOnEscape:
|
|
29
|
-
className:
|
|
30
|
-
container:
|
|
31
|
-
id:
|
|
32
|
-
testId:
|
|
33
|
-
} =
|
|
34
|
-
isOpen:
|
|
35
|
-
onClose:
|
|
36
|
-
closeOnEscape:
|
|
37
|
-
openEffect:
|
|
38
|
-
closeEffect:
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
isOpen: N,
|
|
20
|
+
onClose: a,
|
|
21
|
+
title: n,
|
|
22
|
+
children: w,
|
|
23
|
+
side: T = Q,
|
|
24
|
+
anchor: I,
|
|
25
|
+
variant: s = X,
|
|
26
|
+
size: b = ee,
|
|
27
|
+
showCloseButton: m = o,
|
|
28
|
+
closeOnBackdrop: v = o,
|
|
29
|
+
closeOnEscape: p = o,
|
|
30
|
+
className: M,
|
|
31
|
+
container: h,
|
|
32
|
+
id: k,
|
|
33
|
+
testId: y
|
|
34
|
+
} = d, e = s === q, r = s === Z, { openEffect: E, closeEffect: _ } = J(d, G), C = H(z), f = j(k, C), { direction: F } = g(), A = I ?? T, { isMounted: L, isPanelOpen: t } = ae({
|
|
35
|
+
isOpen: e ? o : N,
|
|
36
|
+
onClose: a,
|
|
37
|
+
closeOnEscape: e ? i : p,
|
|
38
|
+
openEffect: E,
|
|
39
|
+
closeEffect: _,
|
|
40
|
+
lockScroll: r,
|
|
41
|
+
alwaysMounted: e
|
|
42
|
+
}), P = t ? E : _, D = $(null);
|
|
43
|
+
if (Y(D, {
|
|
44
|
+
enabled: r && t,
|
|
45
|
+
onEscape: p ? a : void 0
|
|
46
|
+
}), !L)
|
|
41
47
|
return null;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"aria-labelledby": o ? p : void 0,
|
|
61
|
-
className: F(
|
|
62
|
-
"Bear-Drawer__panel",
|
|
63
|
-
`Bear-Drawer__panel--${m}`,
|
|
64
|
-
`Bear-Drawer__panel--${u}`,
|
|
65
|
-
`Bear-Drawer__panel--effect-${h}`,
|
|
66
|
-
a && "Bear-Drawer__panel--open",
|
|
67
|
-
A
|
|
48
|
+
const W = !!n || m, R = `${f}-title`, S = v && r ? () => a() : void 0, x = n ? R : void 0, U = e ? "complementary" : "dialog", u = /* @__PURE__ */ B(
|
|
49
|
+
c,
|
|
50
|
+
{
|
|
51
|
+
id: f,
|
|
52
|
+
"data-testid": y,
|
|
53
|
+
className: O("Bear-Drawer", `Bear-Drawer--${s}`),
|
|
54
|
+
children: [
|
|
55
|
+
r && /* @__PURE__ */ l(
|
|
56
|
+
K,
|
|
57
|
+
{
|
|
58
|
+
open: t,
|
|
59
|
+
keepMounted: !0,
|
|
60
|
+
blur: !0,
|
|
61
|
+
nested: !0,
|
|
62
|
+
transitionDuration: re,
|
|
63
|
+
className: "Bear-Drawer__backdrop",
|
|
64
|
+
onClick: S
|
|
65
|
+
}
|
|
68
66
|
),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
/* @__PURE__ */ B(
|
|
68
|
+
c,
|
|
69
|
+
{
|
|
70
|
+
ref: D,
|
|
71
|
+
role: U,
|
|
72
|
+
tabIndex: -1,
|
|
73
|
+
"aria-modal": r ? o : i,
|
|
74
|
+
"aria-labelledby": x,
|
|
75
|
+
className: O(
|
|
76
|
+
"Bear-Drawer__panel",
|
|
77
|
+
`Bear-Drawer__panel--${A}`,
|
|
78
|
+
`Bear-Drawer__panel--${b}`,
|
|
79
|
+
`Bear-Drawer__panel--effect-${P}`,
|
|
80
|
+
t && "Bear-Drawer__panel--open",
|
|
81
|
+
M
|
|
82
|
+
),
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ l(
|
|
85
|
+
oe,
|
|
86
|
+
{
|
|
87
|
+
showHeader: W,
|
|
88
|
+
side: A,
|
|
89
|
+
title: n,
|
|
90
|
+
titleId: R,
|
|
91
|
+
showCloseButton: e ? i : m,
|
|
92
|
+
onClose: a,
|
|
93
|
+
direction: F
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ l(c, { className: "Bear-Drawer__body", children: w })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
return e ? u : V(u, h ?? document.body);
|
|
88
104
|
};
|
|
89
105
|
export {
|
|
90
|
-
|
|
106
|
+
Be as Drawer
|
|
91
107
|
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { OverlayEffectProps, OverlayMotionEffect } from '../../hooks/useFixedAnchorPosition';
|
|
3
3
|
export type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
|
|
4
|
+
export type DrawerVariant = 'temporary' | 'persistent' | 'permanent';
|
|
4
5
|
export interface UseDrawerParams {
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
onClose: () => void;
|
|
7
8
|
closeOnEscape: boolean;
|
|
8
9
|
openEffect: OverlayMotionEffect;
|
|
9
10
|
closeEffect: OverlayMotionEffect;
|
|
11
|
+
lockScroll: boolean;
|
|
12
|
+
alwaysMounted: boolean;
|
|
10
13
|
}
|
|
11
14
|
export interface UseDrawerResult {
|
|
12
15
|
isMounted: boolean;
|
|
@@ -19,7 +22,7 @@ export interface DrawerProps extends OverlayEffectProps {
|
|
|
19
22
|
children: ReactNode;
|
|
20
23
|
side?: DrawerSide;
|
|
21
24
|
anchor?: DrawerSide;
|
|
22
|
-
variant?:
|
|
25
|
+
variant?: DrawerVariant;
|
|
23
26
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
24
27
|
showCloseButton?: boolean;
|
|
25
28
|
closeOnBackdrop?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),B=require("../../../constants/numbers.const.cjs"),e=require("../../../constants/generals.const.cjs"),F=require("../../../constants/keys.const.cjs"),l=require("../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),m=require("../Drawer.const.cjs"),R=require("../Drawer.utils.cjs"),T=N=>{const{isOpen:o,onClose:a,closeOnEscape:E,openEffect:A,closeEffect:_,lockScroll:L,alwaysMounted:r}=N,[s,i]=n.useState(o||r),[d,c]=n.useState(e.BOOLEAN_FALSE),[f,O]=n.useState(r?e.BOOLEAN_TRUE:e.BOOLEAN_FALSE);n.useEffect(()=>{if(r){i(e.BOOLEAN_TRUE),O(o),c(e.BOOLEAN_FALSE);return}if(o){if(i(e.BOOLEAN_TRUE),c(e.BOOLEAN_FALSE),A===l.OVERLAY_OPEN_EFFECT_NONE){O(e.BOOLEAN_TRUE);return}const t=requestAnimationFrame(()=>O(e.BOOLEAN_TRUE));return()=>cancelAnimationFrame(t)}if(s){O(e.BOOLEAN_FALSE),c(e.BOOLEAN_TRUE);const t=_===l.OVERLAY_OPEN_EFFECT_NONE?B.ZERO:m.DRAWER_ANIMATION_MS,S=setTimeout(()=>{i(e.BOOLEAN_FALSE),c(e.BOOLEAN_FALSE)},t);return()=>clearTimeout(S)}},[r,o,s,A,_]);const u=n.useCallback(t=>{E&&t.key===F.KEY_ESCAPE&&a()},[E,a]);return n.useEffect(()=>{s&&E&&document.addEventListener("keydown",u);const t=L&&s?R.lockBodyScroll():void 0;return()=>{document.removeEventListener("keydown",u),t==null||t()}},[s,u,E,L]),{isMounted:s,isPanelOpen:r?o:f&&!d}};exports.useDrawer=T;
|
|
@@ -1,51 +1,50 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { ZERO as
|
|
3
|
-
import { BOOLEAN_FALSE as o, BOOLEAN_TRUE as
|
|
4
|
-
import { KEY_ESCAPE as
|
|
5
|
-
import { OVERLAY_OPEN_EFFECT_NONE as
|
|
6
|
-
import { DRAWER_ANIMATION_MS as
|
|
7
|
-
import { lockBodyScroll as
|
|
8
|
-
const
|
|
9
|
-
const { isOpen: s, onClose:
|
|
10
|
-
|
|
1
|
+
import { useState as f, useEffect as O, useCallback as L } from "react";
|
|
2
|
+
import { ZERO as S } from "../../../constants/numbers.const.js";
|
|
3
|
+
import { BOOLEAN_FALSE as o, BOOLEAN_TRUE as n } from "../../../constants/generals.const.js";
|
|
4
|
+
import { KEY_ESCAPE as k } from "../../../constants/keys.const.js";
|
|
5
|
+
import { OVERLAY_OPEN_EFFECT_NONE as A } from "../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
6
|
+
import { DRAWER_ANIMATION_MS as y } from "../Drawer.const.js";
|
|
7
|
+
import { lockBodyScroll as F } from "../Drawer.utils.js";
|
|
8
|
+
const g = (_) => {
|
|
9
|
+
const { isOpen: s, onClose: l, closeOnEscape: i, openEffect: u, closeEffect: p, lockScroll: d, alwaysMounted: r } = _, [t, E] = f(s || r), [M, c] = f(o), [N, m] = f(r ? n : o);
|
|
10
|
+
O(() => {
|
|
11
|
+
if (r) {
|
|
12
|
+
E(n), m(s), c(o);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
11
15
|
if (s) {
|
|
12
|
-
if (
|
|
13
|
-
|
|
16
|
+
if (E(n), c(o), u === A) {
|
|
17
|
+
m(n);
|
|
14
18
|
return;
|
|
15
19
|
}
|
|
16
|
-
const e = requestAnimationFrame(() =>
|
|
20
|
+
const e = requestAnimationFrame(() => m(n));
|
|
17
21
|
return () => cancelAnimationFrame(e);
|
|
18
22
|
}
|
|
19
23
|
if (t) {
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
return () => clearTimeout(
|
|
24
|
+
m(o), c(n);
|
|
25
|
+
const C = setTimeout(() => {
|
|
26
|
+
E(o), c(o);
|
|
27
|
+
}, p === A ? S : y);
|
|
28
|
+
return () => clearTimeout(C);
|
|
25
29
|
}
|
|
26
|
-
}, [s, t, u,
|
|
27
|
-
const
|
|
30
|
+
}, [r, s, t, u, p]);
|
|
31
|
+
const a = L(
|
|
28
32
|
(e) => {
|
|
29
|
-
|
|
33
|
+
i && e.key === k && l();
|
|
30
34
|
},
|
|
31
|
-
[
|
|
35
|
+
[i, l]
|
|
32
36
|
);
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const e = v();
|
|
37
|
-
return () => {
|
|
38
|
-
document.removeEventListener("keydown", n), e();
|
|
39
|
-
};
|
|
40
|
-
}
|
|
37
|
+
return O(() => {
|
|
38
|
+
t && i && document.addEventListener("keydown", a);
|
|
39
|
+
const e = d && t ? F() : void 0;
|
|
41
40
|
return () => {
|
|
42
|
-
document.removeEventListener("keydown",
|
|
41
|
+
document.removeEventListener("keydown", a), e == null || e();
|
|
43
42
|
};
|
|
44
|
-
}, [t,
|
|
43
|
+
}, [t, a, i, d]), {
|
|
45
44
|
isMounted: t,
|
|
46
|
-
isPanelOpen:
|
|
45
|
+
isPanelOpen: r ? s : N && !M
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
g as useDrawer
|
|
51
50
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Drawer } from './Drawer';
|
|
2
|
-
export type { DrawerProps } from './Drawer.types';
|
|
2
|
+
export type { DrawerProps, DrawerVariant } from './Drawer.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("../Box/Box.cjs"),I=require("../Flex/Flex.cjs"),_=require("../Typography/Typography.cjs"),r=require("../../utils/cn.cjs");require("react");const M=require("../../utils/generateBearId.utils.cjs"),g=require("../../utils/useBearId.cjs"),e=require("./EmptyState.const.cjs"),h=d=>{const{icon:l,title:S,description:c,action:n,secondaryAction:i,className:p,size:m=e.EMPTY_STATE_DEFAULT_SIZE,variant:u=e.EMPTY_STATE_DEFAULT_VARIANT,preset:a=e.EMPTY_STATE_DEFAULT_PRESET,id:y,testId:A}=d,P=g.useBearId(e.COMPONENT_NAME_EMPTY_STATE),B=M.resolveBearId(y,P),s=e.EMPTY_STATE_SIZE_CLASSES[m],N=e.EMPTY_STATE_PRESET_ICON[a],x=l??t.jsx(N,{className:"bear-w-full bear-h-full"}),o=e.EMPTY_STATE_PRESET_DEFAULTS[a]??e.EMPTY_STATE_PRESET_DEFAULTS.empty,E=c!==void 0?c:o.description;return t.jsxs(T.Box,{id:B,"data-testid":A,className:r.cn("Bear-EmptyState",u==="card"&&"Bear-EmptyState--card",`Bear-EmptyState--${a}`,s.padding,p),children:[t.jsx(T.Box,{className:r.cn("Bear-EmptyState__icon",s.icon),children:x}),t.jsx(_.Typography,{className:r.cn("Bear-EmptyState__title",s.title),children:S??o.title}),E&&t.jsx(_.Typography,{className:r.cn("Bear-EmptyState__description",s.desc),children:E}),(n||i)&&t.jsxs(I.Flex,{className:"Bear-EmptyState__actions",align:"center",gap:3,children:[n,i]})]})};exports.EmptyState=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../constants/generals.const.cjs"),r=require("./helpers/EmptyStateErrorSvg.cjs"),e=require("./helpers/EmptyStateInboxSvg.cjs"),E=require("./helpers/EmptyStateSearchSvg.cjs"),T=t.SIZE_MD,o=t.VARIANT_DEFAULT,a=t.EMPTY_STATE_PRESET_EMPTY,S="EmptyState",i={[t.EMPTY_STATE_PRESET_EMPTY]:e.EmptyStateInboxSvg,[t.EMPTY_STATE_PRESET_INBOX]:e.EmptyStateInboxSvg,[t.EMPTY_STATE_PRESET_SEARCH]:E.EmptyStateSearchSvg,[t.EMPTY_STATE_PRESET_ERROR]:r.EmptyStateErrorSvg,"no-data":e.EmptyStateInboxSvg,404:E.EmptyStateSearchSvg,offline:r.EmptyStateErrorSvg,"filter-empty":E.EmptyStateSearchSvg},n={empty:{title:"No items yet",description:"Get started by creating your first item."},inbox:{title:"Your inbox is empty",description:"All caught up! Check back later for new messages."},search:{title:"No results found",description:"Try adjusting your search or filter keywords."},error:{title:"Something went wrong",description:"We encountered an error loading this content."},"no-data":{title:"No data available",description:"There is no data to display right now."},404:{title:"Page not found",description:"The requested page or resource could not be located."},offline:{title:"Connection lost",description:"Please check your internet connection and try again."},"filter-empty":{title:"No matching filters",description:"No records match the selected filter criteria."}},_={sm:{icon:"bear-w-12 bear-h-12",title:"bear-text-lg",desc:"bear-text-sm",padding:"bear-py-6 bear-px-4"},md:{icon:"bear-w-16 bear-h-16",title:"bear-text-xl",desc:"bear-text-base",padding:"bear-py-10 bear-px-6"},lg:{icon:"bear-w-20 bear-h-20",title:"bear-text-2xl",desc:"bear-text-lg",padding:"bear-py-14 bear-px-8"}};exports.COMPONENT_NAME_EMPTY_STATE=S;exports.EMPTY_STATE_DEFAULT_PRESET=a;exports.EMPTY_STATE_DEFAULT_SIZE=T;exports.EMPTY_STATE_DEFAULT_VARIANT=o;exports.EMPTY_STATE_PRESET_DEFAULTS=n;exports.EMPTY_STATE_PRESET_ICON=i;exports.EMPTY_STATE_SIZE_CLASSES=_;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { EmptyStatePreset } from './EmptyState.types';
|
|
3
|
+
export declare const EMPTY_STATE_DEFAULT_SIZE: "md";
|
|
4
|
+
export declare const EMPTY_STATE_DEFAULT_VARIANT: "default";
|
|
5
|
+
export declare const EMPTY_STATE_DEFAULT_PRESET: EmptyStatePreset;
|
|
6
|
+
export declare const COMPONENT_NAME_EMPTY_STATE = "EmptyState";
|
|
7
|
+
export declare const EMPTY_STATE_PRESET_ICON: Record<EmptyStatePreset, ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const EMPTY_STATE_PRESET_DEFAULTS: Record<EmptyStatePreset, {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}>;
|
|
7
14
|
export declare const EMPTY_STATE_SIZE_CLASSES: {
|
|
8
15
|
readonly sm: {
|
|
9
16
|
readonly icon: "bear-w-12 bear-h-12";
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { SIZE_MD as i, VARIANT_DEFAULT as a, EMPTY_STATE_PRESET_EMPTY as o, EMPTY_STATE_PRESET_ERROR as n, EMPTY_STATE_PRESET_SEARCH as E, EMPTY_STATE_PRESET_INBOX as T } from "../../constants/generals.const.js";
|
|
2
|
+
import { EmptyStateErrorSvg as r } from "./helpers/EmptyStateErrorSvg.js";
|
|
3
|
+
import { EmptyStateInboxSvg as e } from "./helpers/EmptyStateInboxSvg.js";
|
|
4
|
+
import { EmptyStateSearchSvg as t } from "./helpers/EmptyStateSearchSvg.js";
|
|
5
|
+
const S = i, _ = a, p = o, b = "EmptyState", m = {
|
|
6
|
+
[o]: e,
|
|
7
|
+
[T]: e,
|
|
8
|
+
[E]: t,
|
|
9
|
+
[n]: r,
|
|
10
|
+
"no-data": e,
|
|
11
|
+
404: t,
|
|
12
|
+
offline: r,
|
|
13
|
+
"filter-empty": t
|
|
14
|
+
}, A = {
|
|
15
|
+
empty: { title: "No items yet", description: "Get started by creating your first item." },
|
|
16
|
+
inbox: { title: "Your inbox is empty", description: "All caught up! Check back later for new messages." },
|
|
17
|
+
search: { title: "No results found", description: "Try adjusting your search or filter keywords." },
|
|
18
|
+
error: { title: "Something went wrong", description: "We encountered an error loading this content." },
|
|
19
|
+
"no-data": { title: "No data available", description: "There is no data to display right now." },
|
|
20
|
+
404: { title: "Page not found", description: "The requested page or resource could not be located." },
|
|
21
|
+
offline: { title: "Connection lost", description: "Please check your internet connection and try again." },
|
|
22
|
+
"filter-empty": { title: "No matching filters", description: "No records match the selected filter criteria." }
|
|
23
|
+
}, P = {
|
|
2
24
|
sm: {
|
|
3
25
|
icon: "bear-w-12 bear-h-12",
|
|
4
26
|
title: "bear-text-lg",
|
|
@@ -19,11 +41,11 @@ const e = "Bear-EmptyState", r = "bear-flex bear-flex-col bear-items-center bear
|
|
|
19
41
|
}
|
|
20
42
|
};
|
|
21
43
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
S as
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
b as COMPONENT_NAME_EMPTY_STATE,
|
|
45
|
+
p as EMPTY_STATE_DEFAULT_PRESET,
|
|
46
|
+
S as EMPTY_STATE_DEFAULT_SIZE,
|
|
47
|
+
_ as EMPTY_STATE_DEFAULT_VARIANT,
|
|
48
|
+
A as EMPTY_STATE_PRESET_DEFAULTS,
|
|
49
|
+
m as EMPTY_STATE_PRESET_ICON,
|
|
50
|
+
P as EMPTY_STATE_SIZE_CLASSES
|
|
29
51
|
};
|
|
@@ -1,54 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Box as n } from "../Box/Box.js";
|
|
3
|
+
import { Flex as h } from "../Flex/Flex.js";
|
|
4
|
+
import { Typography as T } from "../Typography/Typography.js";
|
|
3
5
|
import { cn as r } from "../../utils/cn.js";
|
|
4
6
|
import "react";
|
|
5
|
-
import { resolveBearId as
|
|
6
|
-
import { useBearId as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: n,
|
|
25
|
-
testId: _
|
|
26
|
-
}) => {
|
|
27
|
-
const c = v("EmptyState"), A = u(n, c), a = p[T];
|
|
28
|
-
return /* @__PURE__ */ l(
|
|
29
|
-
"div",
|
|
7
|
+
import { resolveBearId as Y } from "../../utils/generateBearId.utils.js";
|
|
8
|
+
import { useBearId as g } from "../../utils/useBearId.js";
|
|
9
|
+
import { EMPTY_STATE_DEFAULT_SIZE as u, EMPTY_STATE_DEFAULT_VARIANT as x, EMPTY_STATE_DEFAULT_PRESET as D, COMPONENT_NAME_EMPTY_STATE as F, EMPTY_STATE_PRESET_DEFAULTS as d, EMPTY_STATE_SIZE_CLASSES as L, EMPTY_STATE_PRESET_ICON as v } from "./EmptyState.const.js";
|
|
10
|
+
const V = (_) => {
|
|
11
|
+
const {
|
|
12
|
+
icon: p,
|
|
13
|
+
title: l,
|
|
14
|
+
description: o,
|
|
15
|
+
action: s,
|
|
16
|
+
secondaryAction: i,
|
|
17
|
+
className: S,
|
|
18
|
+
size: A = u,
|
|
19
|
+
variant: N = x,
|
|
20
|
+
preset: a = D,
|
|
21
|
+
id: y,
|
|
22
|
+
testId: P
|
|
23
|
+
} = _, f = g(F), B = Y(y, f), t = L[A], I = v[a], M = p ?? /* @__PURE__ */ e(I, { className: "bear-w-full bear-h-full" }), c = d[a] ?? d.empty, E = o !== void 0 ? o : c.description;
|
|
24
|
+
return /* @__PURE__ */ m(
|
|
25
|
+
n,
|
|
30
26
|
{
|
|
31
|
-
id:
|
|
32
|
-
"data-testid":
|
|
27
|
+
id: B,
|
|
28
|
+
"data-testid": P,
|
|
33
29
|
className: r(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
a
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
"Bear-EmptyState",
|
|
31
|
+
N === "card" && "Bear-EmptyState--card",
|
|
32
|
+
`Bear-EmptyState--${a}`,
|
|
33
|
+
t.padding,
|
|
34
|
+
S
|
|
39
35
|
),
|
|
40
36
|
children: [
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
/* @__PURE__ */ e(
|
|
43
|
-
|
|
44
|
-
(
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
/* @__PURE__ */ e(n, { className: r("Bear-EmptyState__icon", t.icon), children: M }),
|
|
38
|
+
/* @__PURE__ */ e(T, { className: r("Bear-EmptyState__title", t.title), children: l ?? c.title }),
|
|
39
|
+
E && /* @__PURE__ */ e(T, { className: r("Bear-EmptyState__description", t.desc), children: E }),
|
|
40
|
+
(s || i) && /* @__PURE__ */ m(h, { className: "Bear-EmptyState__actions", align: "center", gap: 3, children: [
|
|
41
|
+
s,
|
|
42
|
+
i
|
|
47
43
|
] })
|
|
48
44
|
]
|
|
49
45
|
}
|
|
50
46
|
);
|
|
51
47
|
};
|
|
52
48
|
export {
|
|
53
|
-
|
|
49
|
+
V as EmptyState
|
|
54
50
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
export type EmptyStatePreset = 'empty' | 'search' | 'inbox' | 'error' | 'no-data' | '404' | 'offline' | 'filter-empty';
|
|
2
3
|
export interface EmptyStateProps {
|
|
3
4
|
testId?: string;
|
|
4
5
|
id?: string;
|
|
5
6
|
icon?: ReactNode;
|
|
6
|
-
title
|
|
7
|
+
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
action?: ReactNode;
|
|
9
10
|
secondaryAction?: ReactNode;
|
|
10
11
|
className?: string;
|
|
11
12
|
size?: 'sm' | 'md' | 'lg';
|
|
12
13
|
variant?: 'default' | 'card';
|
|
14
|
+
preset?: EmptyStatePreset;
|
|
13
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=r=>{const{className:t}=r;return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})})};exports.EmptyStateErrorSvg=o;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const n = (o) => {
|
|
3
|
+
const { className: e } = o;
|
|
4
|
+
return /* @__PURE__ */ r("svg", { className: e, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }) });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
n as EmptyStateErrorSvg
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=t=>{const{className:o}=t;return e.jsx("svg",{className:o,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})};exports.EmptyStateInboxSvg=r;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const a = (r) => {
|
|
3
|
+
const { className: e } = r;
|
|
4
|
+
return /* @__PURE__ */ o("svg", { className: e, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
a as EmptyStateInboxSvg
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=t=>{const{className:r}=t;return e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"})})};exports.EmptyStateSearchSvg=o;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const n = (e) => {
|
|
3
|
+
const { className: o } = e;
|
|
4
|
+
return /* @__PURE__ */ r("svg", { className: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 100-15 7.5 7.5 0 000 15z" }) });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
n as EmptyStateSearchSvg
|
|
8
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { EmptyState } from './EmptyState';
|
|
2
|
-
export type { EmptyStateProps } from './EmptyState.types';
|
|
2
|
+
export type { EmptyStatePreset, EmptyStateProps } from './EmptyState.types';
|