@forgedevstack/bear 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- 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/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/CitationList/CitationList.cjs +1 -0
- package/dist/components/CitationList/CitationList.d.ts +2 -0
- package/dist/components/CitationList/CitationList.js +30 -0
- package/dist/components/CitationList/CitationList.types.d.ts +15 -0
- package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
- package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
- package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
- package/dist/components/CitationList/helpers/index.d.ts +1 -0
- package/dist/components/CitationList/index.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
- package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
- package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.js +49 -0
- package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
- package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
- package/dist/components/ContextMeter/index.d.ts +2 -0
- package/dist/components/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 +93 -83
- 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 +8 -6
- package/dist/components/EmptyState/EmptyState.const.js +15 -8
- package/dist/components/EmptyState/EmptyState.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.js +39 -43
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
- package/dist/components/EmptyState/helpers/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/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/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/MessageActions/MessageActions.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.const.js +10 -0
- package/dist/components/MessageActions/MessageActions.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.js +31 -0
- package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
- package/dist/components/MessageActions/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
- package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
- package/dist/components/ModelSelect/ModelSelect.js +41 -0
- package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
- package/dist/components/ModelSelect/index.d.ts +2 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
- package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +5 -5
- 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.js +23 -23
- package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
- package/dist/components/Select/helpers/index.d.ts +2 -0
- package/dist/components/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/ToolCall/ToolCall.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
- package/dist/components/ToolCall/ToolCall.const.js +17 -0
- package/dist/components/ToolCall/ToolCall.d.ts +2 -0
- package/dist/components/ToolCall/ToolCall.js +43 -0
- package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
- package/dist/components/ToolCall/index.d.ts +2 -0
- package/dist/components/Transition/Transition.const.cjs +1 -1
- package/dist/components/Transition/Transition.const.js +12 -6
- package/dist/components/Transition/Transition.types.d.ts +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +37 -9
- package/dist/components/index.js +455 -423
- 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 +7 -0
- package/dist/constants/numbers.const.js +60 -52
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +19 -44
- package/dist/context/BearProvider.js +223 -208
- package/dist/context/bearProvider.types.d.ts +4 -0
- package/dist/context/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +595 -563
- 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 +734 -32
- package/package.json +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
- package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
- package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
- package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
|
@@ -0,0 +1,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';
|
|
@@ -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"),P=require("react"),R=require("react-dom"),a=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs"),W=require("../../utils/generateBearId.utils.cjs"),V=require("../../utils/useBearId.cjs"),L=require("../Box/Box.cjs"),X=require("../Chat/Chat.cjs"),Y=require("../Typography/Typography.cjs"),e=require("./FloatingChat.const.cjs"),Z=require("./FloatingChat.utils.cjs"),k=require("./helpers/FloatingChatHeader.cjs"),z=require("./helpers/FloatingChatTrigger.cjs"),J=d=>{const{id:g,testId:F,messages:r,onSend:O,onStop:C,onAttach:E,isLoading:u=a.BOOLEAN_FALSE,isStreaming:h=a.BOOLEAN_FALSE,isTyping:N=a.BOOLEAN_FALSE,title:I=e.FLOATING_CHAT_DEFAULTS.TITLE,subtitle:S=e.FLOATING_CHAT_DEFAULTS.SUBTITLE,avatar:B,position:p=e.FLOATING_CHAT_DEFAULTS.POSITION,bottom:m=e.FLOATING_CHAT_DEFAULTS.BOTTOM,side:H=e.FLOATING_CHAT_DEFAULTS.SIDE,defaultOpen:b=e.FLOATING_CHAT_DEFAULT_OPEN,open:i,onOpenChange:o,trigger:q,badgeCount:D,header:y,welcomeMessage:l=e.FLOATING_CHAT_DEFAULTS.WELCOME_MESSAGE,poweredBy:c=e.FLOATING_CHAT_POWERED_BY,allowAttach:G,className:w,translations:M}=d,x=V.useBearId(a.COMPONENT_NAME_FLOATING_CHAT),U=W.resolveBearId(g,x),[f,j]=P.useState(b),s=i??f,n={...e.FLOATING_CHAT_DEFAULT_TRANSLATIONS,...M},v=r.length===0&&l?[{id:e.FLOATING_CHAT_WELCOME_ID,content:l,sender:"bot",timestamp:new Date}]:r,A=T=>{i===void 0&&j(T),o==null||o(T)};return typeof document>"u"?null:R.createPortal(t.jsxs(L.Box,{id:U,"data-testid":F,className:_.cn("Bear-FloatingChat",p==="bottom-left"&&"Bear-FloatingChat--left",w),style:Z.resolveFloatingChatVars(m,H),children:[t.jsxs(L.Box,{className:_.cn("Bear-FloatingChat__window",!s&&"Bear-FloatingChat__window--closed"),children:[t.jsx(k.FloatingChatHeader,{header:y,title:I,subtitle:S,avatar:B,closeLabel:n.closeLabel,onClose:()=>A(a.BOOLEAN_FALSE)}),t.jsx(X.Chat,{messages:v,onSend:O,onStop:C,onAttach:E,isLoading:u,isStreaming:h,isTyping:N,showAvatars:a.BOOLEAN_FALSE,height:e.CHAT_WINDOW_SIZE.height-e.FLOATING_CHAT_CHROME_PX,allowAttach:G,className:"Bear-FloatingChat__chat"}),c&&t.jsx(Y.Typography,{variant:"caption",className:"Bear-FloatingChat__powered",color:"secondary",children:c})]}),t.jsx(z.FloatingChatTrigger,{isOpen:s,trigger:q,badgeCount:D,openLabel:n.openLabel,closeLabel:n.closeLabel,onToggle:()=>A(!s)})]}),document.body)};exports.FloatingChat=J;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../constants/numbers.const.cjs"),T=require("../../constants/generals.const.cjs"),_={POSITION:"bottom-right",BOTTOM:A.TWENTY,SIDE:A.TWENTY,TITLE:"Chat",SUBTITLE:"We typically reply in a few minutes",WELCOME_MESSAGE:"Hi! How can we help you today?"},L={width:360,height:520},O=140,E="welcome",t=T.BOOLEAN_FALSE,I="Forge",e=A.CHAT_BADGE_MAX,C="--Bear-FloatingChat-bottom",o="--Bear-FloatingChat-side",H="--Bear-FloatingChat-width",N="--Bear-FloatingChat-height",F={placeholder:T.PLACEHOLDER_START_TYPING,typingText:"is typing...",newMessagesLabel:T.LABEL_NEW_MESSAGES,closeLabel:T.LABEL_CLOSE,openLabel:_.TITLE};exports.CHAT_WINDOW_SIZE=L;exports.FLOATING_CHAT_BADGE_MAX=e;exports.FLOATING_CHAT_BOTTOM_VAR=C;exports.FLOATING_CHAT_CHROME_PX=O;exports.FLOATING_CHAT_DEFAULTS=_;exports.FLOATING_CHAT_DEFAULT_OPEN=t;exports.FLOATING_CHAT_DEFAULT_TRANSLATIONS=F;exports.FLOATING_CHAT_HEIGHT_VAR=N;exports.FLOATING_CHAT_POWERED_BY=I;exports.FLOATING_CHAT_SIDE_VAR=o;exports.FLOATING_CHAT_WELCOME_ID=E;exports.FLOATING_CHAT_WIDTH_VAR=H;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FloatingChatTranslations } from './FloatingChat.types';
|
|
1
2
|
export declare const FLOATING_CHAT_DEFAULTS: {
|
|
2
3
|
readonly POSITION: "bottom-right";
|
|
3
4
|
readonly BOTTOM: 20;
|
|
@@ -7,6 +8,16 @@ export declare const FLOATING_CHAT_DEFAULTS: {
|
|
|
7
8
|
readonly WELCOME_MESSAGE: "Hi! How can we help you today?";
|
|
8
9
|
};
|
|
9
10
|
export declare const CHAT_WINDOW_SIZE: {
|
|
10
|
-
readonly width:
|
|
11
|
+
readonly width: 360;
|
|
11
12
|
readonly height: 520;
|
|
12
13
|
};
|
|
14
|
+
export declare const FLOATING_CHAT_CHROME_PX = 140;
|
|
15
|
+
export declare const FLOATING_CHAT_WELCOME_ID = "welcome";
|
|
16
|
+
export declare const FLOATING_CHAT_DEFAULT_OPEN = false;
|
|
17
|
+
export declare const FLOATING_CHAT_POWERED_BY = "Forge";
|
|
18
|
+
export declare const FLOATING_CHAT_BADGE_MAX = 99;
|
|
19
|
+
export declare const FLOATING_CHAT_BOTTOM_VAR = "--Bear-FloatingChat-bottom";
|
|
20
|
+
export declare const FLOATING_CHAT_SIDE_VAR = "--Bear-FloatingChat-side";
|
|
21
|
+
export declare const FLOATING_CHAT_WIDTH_VAR = "--Bear-FloatingChat-width";
|
|
22
|
+
export declare const FLOATING_CHAT_HEIGHT_VAR = "--Bear-FloatingChat-height";
|
|
23
|
+
export declare const FLOATING_CHAT_DEFAULT_TRANSLATIONS: FloatingChatTranslations;
|
|
@@ -1,15 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
import { TWENTY as T, CHAT_BADGE_MAX as A } from "../../constants/numbers.const.js";
|
|
2
|
+
import { BOOLEAN_FALSE as _, LABEL_CLOSE as t, LABEL_NEW_MESSAGES as o, PLACEHOLDER_START_TYPING as E } from "../../constants/generals.const.js";
|
|
3
|
+
const L = {
|
|
2
4
|
POSITION: "bottom-right",
|
|
3
|
-
BOTTOM:
|
|
4
|
-
SIDE:
|
|
5
|
+
BOTTOM: T,
|
|
6
|
+
SIDE: T,
|
|
5
7
|
TITLE: "Chat",
|
|
6
8
|
SUBTITLE: "We typically reply in a few minutes",
|
|
7
9
|
WELCOME_MESSAGE: "Hi! How can we help you today?"
|
|
8
|
-
},
|
|
9
|
-
width:
|
|
10
|
+
}, I = {
|
|
11
|
+
width: 360,
|
|
10
12
|
height: 520
|
|
13
|
+
}, n = 140, C = "welcome", a = _, F = "Forge", H = A, N = "--Bear-FloatingChat-bottom", i = "--Bear-FloatingChat-side", s = "--Bear-FloatingChat-width", c = "--Bear-FloatingChat-height", G = {
|
|
14
|
+
placeholder: E,
|
|
15
|
+
typingText: "is typing...",
|
|
16
|
+
newMessagesLabel: o,
|
|
17
|
+
closeLabel: t,
|
|
18
|
+
openLabel: L.TITLE
|
|
11
19
|
};
|
|
12
20
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
I as CHAT_WINDOW_SIZE,
|
|
22
|
+
H as FLOATING_CHAT_BADGE_MAX,
|
|
23
|
+
N as FLOATING_CHAT_BOTTOM_VAR,
|
|
24
|
+
n as FLOATING_CHAT_CHROME_PX,
|
|
25
|
+
L as FLOATING_CHAT_DEFAULTS,
|
|
26
|
+
a as FLOATING_CHAT_DEFAULT_OPEN,
|
|
27
|
+
G as FLOATING_CHAT_DEFAULT_TRANSLATIONS,
|
|
28
|
+
c as FLOATING_CHAT_HEIGHT_VAR,
|
|
29
|
+
F as FLOATING_CHAT_POWERED_BY,
|
|
30
|
+
i as FLOATING_CHAT_SIDE_VAR,
|
|
31
|
+
C as FLOATING_CHAT_WELCOME_ID,
|
|
32
|
+
s as FLOATING_CHAT_WIDTH_VAR
|
|
15
33
|
};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { FloatingChatProps } from './FloatingChat.types';
|
|
3
|
-
|
|
4
|
-
* FloatingChat - Floating chat widget bubble
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <FloatingChat
|
|
9
|
-
* messages={messages}
|
|
10
|
-
* onSend={handleSend}
|
|
11
|
-
* title="Support"
|
|
12
|
-
* subtitle="We're here to help!"
|
|
13
|
-
* position="bottom-right"
|
|
14
|
-
* badgeCount={2}
|
|
15
|
-
* />
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const FloatingChat: FC<FloatingChatProps>;
|
|
19
|
-
export default FloatingChat;
|
|
2
|
+
export declare const FloatingChat: (props: FloatingChatProps) => import('react').ReactPortal | null;
|
|
@@ -1,145 +1,114 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "../Box/Box.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
l
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, X = /* @__PURE__ */ r("div", { className: s("Bear-FloatingChat", F), "data-testid": W, children: [
|
|
50
|
-
(i || w) && /* @__PURE__ */ r(
|
|
51
|
-
"div",
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j } from "react";
|
|
3
|
+
import { createPortal as V } from "react-dom";
|
|
4
|
+
import { BOOLEAN_FALSE as t, COMPONENT_NAME_FLOATING_CHAT as X } from "../../constants/generals.const.js";
|
|
5
|
+
import { cn as T } from "../../utils/cn.js";
|
|
6
|
+
import { resolveBearId as Y } from "../../utils/generateBearId.utils.js";
|
|
7
|
+
import { useBearId as Z } from "../../utils/useBearId.js";
|
|
8
|
+
import { Box as _ } from "../Box/Box.js";
|
|
9
|
+
import { Chat as k } from "../Chat/Chat.js";
|
|
10
|
+
import { Typography as q } from "../Typography/Typography.js";
|
|
11
|
+
import { FLOATING_CHAT_DEFAULTS as e, FLOATING_CHAT_DEFAULT_OPEN as z, FLOATING_CHAT_POWERED_BY as J, FLOATING_CHAT_WELCOME_ID as K, FLOATING_CHAT_DEFAULT_TRANSLATIONS as Q, CHAT_WINDOW_SIZE as $, FLOATING_CHAT_CHROME_PX as ee } from "./FloatingChat.const.js";
|
|
12
|
+
import { resolveFloatingChatVars as te } from "./FloatingChat.utils.js";
|
|
13
|
+
import { FloatingChatHeader as oe } from "./helpers/FloatingChatHeader.js";
|
|
14
|
+
import { FloatingChatTrigger as ae } from "./helpers/FloatingChatTrigger.js";
|
|
15
|
+
const he = (g) => {
|
|
16
|
+
const {
|
|
17
|
+
id: A,
|
|
18
|
+
testId: O,
|
|
19
|
+
messages: n,
|
|
20
|
+
onSend: h,
|
|
21
|
+
onStop: C,
|
|
22
|
+
onAttach: L,
|
|
23
|
+
isLoading: I = t,
|
|
24
|
+
isStreaming: f = t,
|
|
25
|
+
isTyping: E = t,
|
|
26
|
+
title: F = e.TITLE,
|
|
27
|
+
subtitle: N = e.SUBTITLE,
|
|
28
|
+
avatar: B,
|
|
29
|
+
position: S = e.POSITION,
|
|
30
|
+
bottom: b = e.BOTTOM,
|
|
31
|
+
side: u = e.SIDE,
|
|
32
|
+
defaultOpen: w = z,
|
|
33
|
+
open: i,
|
|
34
|
+
onOpenChange: a,
|
|
35
|
+
trigger: H,
|
|
36
|
+
badgeCount: y,
|
|
37
|
+
header: M,
|
|
38
|
+
welcomeMessage: l = e.WELCOME_MESSAGE,
|
|
39
|
+
poweredBy: m = J,
|
|
40
|
+
allowAttach: D,
|
|
41
|
+
className: G,
|
|
42
|
+
translations: v
|
|
43
|
+
} = g, P = Z(X), W = Y(A, P), [U, x] = j(w), r = i ?? U, s = { ...Q, ...v }, R = n.length === 0 && l ? [{ id: K, content: l, sender: "bot", timestamp: /* @__PURE__ */ new Date() }] : n, d = (c) => {
|
|
44
|
+
i === void 0 && x(c), a == null || a(c);
|
|
45
|
+
};
|
|
46
|
+
return typeof document > "u" ? null : V(
|
|
47
|
+
/* @__PURE__ */ p(
|
|
48
|
+
_,
|
|
52
49
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
id: W,
|
|
51
|
+
"data-testid": O,
|
|
52
|
+
className: T(
|
|
53
|
+
"Bear-FloatingChat",
|
|
54
|
+
S === "bottom-left" && "Bear-FloatingChat--left",
|
|
55
|
+
G
|
|
57
56
|
),
|
|
58
|
-
style:
|
|
57
|
+
style: te(b, u),
|
|
59
58
|
children: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
M ? "bg-gray-800" : "bg-[var(--bear-primary-500)]"
|
|
63
|
-
), children: x }) : /* @__PURE__ */ r(
|
|
64
|
-
"div",
|
|
59
|
+
/* @__PURE__ */ p(
|
|
60
|
+
_,
|
|
65
61
|
{
|
|
66
|
-
className:
|
|
67
|
-
"px-4 py-3 flex items-center gap-3",
|
|
68
|
-
"bg-[var(--bear-primary-500)] text-white"
|
|
69
|
-
),
|
|
62
|
+
className: T("Bear-FloatingChat__window", !r && "Bear-FloatingChat__window--closed"),
|
|
70
63
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
64
|
+
/* @__PURE__ */ o(
|
|
65
|
+
oe,
|
|
73
66
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
header: M,
|
|
68
|
+
title: F,
|
|
69
|
+
subtitle: N,
|
|
70
|
+
avatar: B,
|
|
71
|
+
closeLabel: s.closeLabel,
|
|
72
|
+
onClose: () => d(t)
|
|
78
73
|
}
|
|
79
74
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */ t(c, { variant: "caption", className: "text-white/70", children: B })
|
|
83
|
-
] }),
|
|
84
|
-
/* @__PURE__ */ t(
|
|
85
|
-
A,
|
|
75
|
+
/* @__PURE__ */ o(
|
|
76
|
+
k,
|
|
86
77
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
messages: R,
|
|
79
|
+
onSend: h,
|
|
80
|
+
onStop: C,
|
|
81
|
+
onAttach: L,
|
|
82
|
+
isLoading: I,
|
|
83
|
+
isStreaming: f,
|
|
84
|
+
isTyping: E,
|
|
85
|
+
showAvatars: t,
|
|
86
|
+
height: $.height - ee,
|
|
87
|
+
allowAttach: D,
|
|
88
|
+
className: "Bear-FloatingChat__chat"
|
|
92
89
|
}
|
|
93
|
-
)
|
|
90
|
+
),
|
|
91
|
+
m && /* @__PURE__ */ o(q, { variant: "caption", className: "Bear-FloatingChat__powered", color: "secondary", children: m })
|
|
94
92
|
]
|
|
95
93
|
}
|
|
96
94
|
),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
95
|
+
/* @__PURE__ */ o(
|
|
96
|
+
ae,
|
|
99
97
|
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
className: "!rounded-none !border-0"
|
|
98
|
+
isOpen: r,
|
|
99
|
+
trigger: H,
|
|
100
|
+
badgeCount: y,
|
|
101
|
+
openLabel: s.openLabel,
|
|
102
|
+
closeLabel: s.closeLabel,
|
|
103
|
+
onToggle: () => d(!r)
|
|
107
104
|
}
|
|
108
|
-
)
|
|
109
|
-
N && /* @__PURE__ */ t("div", { className: "px-3 py-2 text-center border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ r(c, { variant: "caption", className: "opacity-50", children: [
|
|
110
|
-
"Powered by ",
|
|
111
|
-
N
|
|
112
|
-
] }) })
|
|
105
|
+
)
|
|
113
106
|
]
|
|
114
107
|
}
|
|
115
108
|
),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
A,
|
|
119
|
-
{
|
|
120
|
-
variant: "primary",
|
|
121
|
-
onClick: g,
|
|
122
|
-
className: s(
|
|
123
|
-
"!w-14 !h-14 !rounded-full !p-0 shadow-lg",
|
|
124
|
-
"transition-transform duration-200",
|
|
125
|
-
i && "rotate-180"
|
|
126
|
-
),
|
|
127
|
-
children: i ? /* @__PURE__ */ t(n.XIcon, { size: 24 }) : /* @__PURE__ */ t(n.ChatIcon, { size: 24 })
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
!i && o && o > 0 && /* @__PURE__ */ t(
|
|
131
|
-
K,
|
|
132
|
-
{
|
|
133
|
-
variant: "danger",
|
|
134
|
-
size: "sm",
|
|
135
|
-
className: "absolute -top-1 -right-1 !min-w-[20px] !h-5",
|
|
136
|
-
children: o > 99 ? "99+" : o
|
|
137
|
-
}
|
|
138
|
-
)
|
|
139
|
-
] }) })
|
|
140
|
-
] });
|
|
141
|
-
return typeof document > "u" ? null : Z(X, document.body);
|
|
109
|
+
document.body
|
|
110
|
+
);
|
|
142
111
|
};
|
|
143
112
|
export {
|
|
144
|
-
|
|
113
|
+
he as FloatingChat
|
|
145
114
|
};
|
|
@@ -1,45 +1,34 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ChatMessage } from '../Chat/Chat.types';
|
|
2
|
+
import { ChatMessage, ChatTranslations } from '../Chat/Chat.types';
|
|
3
|
+
export interface FloatingChatTranslations extends ChatTranslations {
|
|
4
|
+
closeLabel: string;
|
|
5
|
+
openLabel: string;
|
|
6
|
+
}
|
|
3
7
|
export interface FloatingChatProps {
|
|
4
8
|
id?: string;
|
|
5
|
-
|
|
9
|
+
testId?: string;
|
|
6
10
|
messages: ChatMessage[];
|
|
7
|
-
/** Callback when user sends a message */
|
|
8
11
|
onSend?: (message: string) => void;
|
|
9
|
-
|
|
12
|
+
onStop?: () => void;
|
|
13
|
+
onAttach?: (files: File[]) => void;
|
|
10
14
|
isLoading?: boolean;
|
|
11
|
-
|
|
15
|
+
isStreaming?: boolean;
|
|
12
16
|
isTyping?: boolean;
|
|
13
|
-
/** Chat title */
|
|
14
17
|
title?: string;
|
|
15
|
-
/** Chat subtitle */
|
|
16
18
|
subtitle?: string;
|
|
17
|
-
/** Avatar URL */
|
|
18
19
|
avatar?: string;
|
|
19
|
-
/** Position on screen */
|
|
20
20
|
position?: 'bottom-right' | 'bottom-left';
|
|
21
|
-
/** Distance from bottom */
|
|
22
21
|
bottom?: number;
|
|
23
|
-
/** Distance from side */
|
|
24
22
|
side?: number;
|
|
25
|
-
/** Initial open state */
|
|
26
23
|
defaultOpen?: boolean;
|
|
27
|
-
/** Controlled open state */
|
|
28
24
|
open?: boolean;
|
|
29
|
-
/** Callback when open state changes */
|
|
30
25
|
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
/** Custom trigger button */
|
|
32
26
|
trigger?: ReactNode;
|
|
33
|
-
/** Badge count (e.g., unread messages) */
|
|
34
27
|
badgeCount?: number;
|
|
35
|
-
/** Header content */
|
|
36
28
|
header?: ReactNode;
|
|
37
|
-
/** Welcome message */
|
|
38
29
|
welcomeMessage?: string;
|
|
39
|
-
/** Show powered by */
|
|
40
30
|
poweredBy?: string;
|
|
41
|
-
|
|
31
|
+
allowAttach?: boolean;
|
|
42
32
|
className?: string;
|
|
43
|
-
|
|
44
|
-
testId?: string;
|
|
33
|
+
translations?: Partial<FloatingChatTranslations>;
|
|
45
34
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/generals.const.cjs"),e=require("./FloatingChat.const.cjs"),T=(t,_)=>({[e.FLOATING_CHAT_BOTTOM_VAR]:`${t}${r.UNIT_PX}`,[e.FLOATING_CHAT_SIDE_VAR]:`${_}${r.UNIT_PX}`,[e.FLOATING_CHAT_WIDTH_VAR]:`${e.CHAT_WINDOW_SIZE.width}${r.UNIT_PX}`,[e.FLOATING_CHAT_HEIGHT_VAR]:`${e.CHAT_WINDOW_SIZE.height}${r.UNIT_PX}`}),o=(t,_)=>t>_?`${_}+`:String(t);exports.resolveFloatingChatBadge=o;exports.resolveFloatingChatVars=T;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UNIT_PX as r } from "../../constants/generals.const.js";
|
|
2
|
+
import { CHAT_WINDOW_SIZE as t, FLOATING_CHAT_HEIGHT_VAR as A, FLOATING_CHAT_WIDTH_VAR as o, FLOATING_CHAT_SIDE_VAR as I, FLOATING_CHAT_BOTTOM_VAR as e } from "./FloatingChat.const.js";
|
|
3
|
+
const H = (_, T) => ({
|
|
4
|
+
[e]: `${_}${r}`,
|
|
5
|
+
[I]: `${T}${r}`,
|
|
6
|
+
[o]: `${t.width}${r}`,
|
|
7
|
+
[A]: `${t.height}${r}`
|
|
8
|
+
}), C = (_, T) => _ > T ? `${T}+` : String(_);
|
|
9
|
+
export {
|
|
10
|
+
C as resolveFloatingChatBadge,
|
|
11
|
+
H as resolveFloatingChatVars
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Avatar/Avatar.cjs");require("react");const r=require("../../Box/Box.cjs"),h=require("../../CloseButton/CloseButton.cjs"),g=require("../../Flex/Flex.cjs"),s=require("../../Typography/Typography.cjs"),x=i=>{const{header:a,title:t,subtitle:l,avatar:n,closeLabel:o,onClose:c}=i;return a?e.jsx(r.Box,{className:"Bear-FloatingChat__header",children:a}):e.jsxs(g.Flex,{className:"Bear-FloatingChat__header",align:"center",gap:3,children:[e.jsx(u.Avatar,{src:n,initials:t[0],size:"sm"}),e.jsxs(r.Box,{children:[e.jsx(s.Typography,{variant:"subtitle2",className:"Bear-FloatingChat__title",children:t}),e.jsx(s.Typography,{variant:"caption",className:"Bear-FloatingChat__subtitle",children:l})]}),e.jsx(h.CloseButton,{"aria-label":o,onClick:c})]})};exports.FloatingChatHeader=x;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FloatingChatProps } from '../FloatingChat.types';
|
|
2
|
+
export declare const FloatingChatHeader: (props: {
|
|
3
|
+
header?: FloatingChatProps["header"];
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
closeLabel: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as h } from "../../Avatar/Avatar.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Box as i } from "../../Box/Box.js";
|
|
5
|
+
import { CloseButton as p } from "../../CloseButton/CloseButton.js";
|
|
6
|
+
import { Flex as d } from "../../Flex/Flex.js";
|
|
7
|
+
import { Typography as o } from "../../Typography/Typography.js";
|
|
8
|
+
const b = (l) => {
|
|
9
|
+
const { header: t, title: r, subtitle: n, avatar: s, closeLabel: m, onClose: c } = l;
|
|
10
|
+
return t ? /* @__PURE__ */ a(i, { className: "Bear-FloatingChat__header", children: t }) : /* @__PURE__ */ e(d, { className: "Bear-FloatingChat__header", align: "center", gap: 3, children: [
|
|
11
|
+
/* @__PURE__ */ a(h, { src: s, initials: r[0], size: "sm" }),
|
|
12
|
+
/* @__PURE__ */ e(i, { children: [
|
|
13
|
+
/* @__PURE__ */ a(o, { variant: "subtitle2", className: "Bear-FloatingChat__title", children: r }),
|
|
14
|
+
/* @__PURE__ */ a(o, { variant: "caption", className: "Bear-FloatingChat__subtitle", children: n })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ a(p, { "aria-label": m, onClick: c })
|
|
17
|
+
] });
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
b as FloatingChatHeader
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Badge/Badge.cjs"),i=require("../../Box/Box.cjs"),B=require("../../Button/Button.cjs"),C=require("../../CloseButton/CloseButton.cjs"),d=require("../FloatingChat.const.cjs"),h=require("../FloatingChat.utils.cjs"),_=s=>{const{isOpen:a,trigger:r,badgeCount:l,openLabel:n,closeLabel:g,onToggle:t}=s,o=l??0,c=!a&&o>0;return r?e.jsx(i.Box,{className:"Bear-FloatingChat__trigger",onClick:t,children:r}):e.jsxs(i.Box,{className:"Bear-FloatingChat__trigger",children:[a?e.jsx(C.CloseButton,{"aria-label":g,onClick:t,size:"lg"}):e.jsx(B.Button,{type:"button",variant:"primary","aria-label":n,onClick:t,children:n}),c&&e.jsx(u.Badge,{variant:"danger",size:"sm",className:"Bear-FloatingChat__badge",children:h.resolveFloatingChatBadge(o,d.FLOATING_CHAT_BADGE_MAX)})]})};exports.FloatingChatTrigger=_;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FloatingChatProps } from '../FloatingChat.types';
|
|
2
|
+
export declare const FloatingChatTrigger: (props: {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
trigger?: FloatingChatProps["trigger"];
|
|
5
|
+
badgeCount?: number;
|
|
6
|
+
openLabel: string;
|
|
7
|
+
closeLabel: string;
|
|
8
|
+
onToggle: () => void;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as p } from "../../Badge/Badge.js";
|
|
3
|
+
import { Box as n } from "../../Box/Box.js";
|
|
4
|
+
import { Button as C } from "../../Button/Button.js";
|
|
5
|
+
import { CloseButton as d } from "../../CloseButton/CloseButton.js";
|
|
6
|
+
import { FLOATING_CHAT_BADGE_MAX as h } from "../FloatingChat.const.js";
|
|
7
|
+
import { resolveFloatingChatBadge as B } from "../FloatingChat.utils.js";
|
|
8
|
+
const N = (l) => {
|
|
9
|
+
const { isOpen: a, trigger: t, badgeCount: g, openLabel: e, closeLabel: s, onToggle: o } = l, i = g ?? 0, m = !a && i > 0;
|
|
10
|
+
return t ? /* @__PURE__ */ r(n, { className: "Bear-FloatingChat__trigger", onClick: o, children: t }) : /* @__PURE__ */ c(n, { className: "Bear-FloatingChat__trigger", children: [
|
|
11
|
+
a ? /* @__PURE__ */ r(d, { "aria-label": s, onClick: o, size: "lg" }) : /* @__PURE__ */ r(C, { type: "button", variant: "primary", "aria-label": e, onClick: o, children: e }),
|
|
12
|
+
m && /* @__PURE__ */ r(p, { variant: "danger", size: "sm", className: "Bear-FloatingChat__badge", children: B(i, h) })
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
N as FloatingChatTrigger
|
|
17
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FloatingChat } from './FloatingChat';
|
|
2
|
-
export type { FloatingChatProps } from './FloatingChat.types';
|
|
2
|
+
export type { FloatingChatProps, FloatingChatTranslations } from './FloatingChat.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 e=require("react/jsx-runtime"),r=require("../../constants/numbers.const.cjs"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),F=require("../../utils/useBearId.cjs"),n=require("../Flex/Flex.cjs"),t=require("../Skeleton/Skeleton.cjs"),_=s=>{const{fields:l=r.THREE,animation:o=u.ANIMATION_PULSE,id:a,testId:i,className:c}=s;return e.jsx(n.Flex,{id:S.resolveBearId(a,F.useBearId("FormSkeleton")),testId:i,direction:"column",gap:4,className:d.cn("Bear-FormSkeleton",c),children:Array.from({length:l}).map((k,m)=>e.jsxs(n.Flex,{direction:"column",gap:2,className:"Bear-FormSkeleton__field",children:[e.jsx(t.Skeleton,{animation:o,height:r.FOURTEEN,className:"Bear-FormSkeleton__label"}),e.jsx(t.Skeleton,{animation:o,height:r.FORTY,className:"Bear-FormSkeleton__control"})]},`field-${m}`))})};exports.FormSkeleton=_;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FormSkeletonProps } from './FormSkeleton.types';
|
|
2
|
-
export declare const FormSkeleton: (
|
|
2
|
+
export declare const FormSkeleton: (props: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|