@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-Skeleton relative overflow-hidden",n={text:"rounded",circular:"rounded-full",rectangular:"rounded-none",rounded:"rounded-lg"},a={pulse:"animate-pulse",wave:"Bear-Skeleton--wave",none:""},r
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-Skeleton relative overflow-hidden",n={text:"rounded",circular:"rounded-full",rectangular:"rounded-none",rounded:"rounded-lg"},a={pulse:"animate-pulse",wave:"Bear-Skeleton--wave",none:""},r=`
|
|
2
2
|
@keyframes Bear-Skeleton-wave {
|
|
3
3
|
0% {
|
|
4
4
|
transform: translateX(-100%);
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
transparent
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
`,t="1em",
|
|
36
|
+
`,t="1em",S={sm:32,md:40,lg:56};exports.SKELETON_ANIMATION_CLASSES=a;exports.SKELETON_AVATAR_SIZES=S;exports.SKELETON_BASE_CLASSES=e;exports.SKELETON_TEXT_HEIGHT=t;exports.SKELETON_VARIANT_CLASSES=n;exports.SKELETON_WAVE_STYLES=r;
|
|
@@ -7,7 +7,7 @@ const e = "Bear-Skeleton relative overflow-hidden", n = {
|
|
|
7
7
|
pulse: "animate-pulse",
|
|
8
8
|
wave: "Bear-Skeleton--wave",
|
|
9
9
|
none: ""
|
|
10
|
-
}, r =
|
|
10
|
+
}, r = `
|
|
11
11
|
@keyframes Bear-Skeleton-wave {
|
|
12
12
|
0% {
|
|
13
13
|
transform: translateX(-100%);
|
|
@@ -42,17 +42,16 @@ const e = "Bear-Skeleton relative overflow-hidden", n = {
|
|
|
42
42
|
transparent
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`, t = "1em", o = {
|
|
46
46
|
sm: 32,
|
|
47
47
|
md: 40,
|
|
48
48
|
lg: 56
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
51
|
a as SKELETON_ANIMATION_CLASSES,
|
|
52
|
-
|
|
52
|
+
o as SKELETON_AVATAR_SIZES,
|
|
53
53
|
e as SKELETON_BASE_CLASSES,
|
|
54
|
-
|
|
55
|
-
o as SKELETON_TEXT_HEIGHT,
|
|
54
|
+
t as SKELETON_TEXT_HEIGHT,
|
|
56
55
|
n as SKELETON_VARIANT_CLASSES,
|
|
57
|
-
|
|
56
|
+
r as SKELETON_WAVE_STYLES
|
|
58
57
|
};
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as m, useEffect as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
import { injectStyles as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m, useEffect as u } from "react";
|
|
3
|
+
import { cn as x } from "../../utils/cn.js";
|
|
4
|
+
import { SKELETON_ANIMATION_CLASSES as v, SKELETON_VARIANT_CLASSES as b, SKELETON_BASE_CLASSES as w, SKELETON_TEXT_HEIGHT as L, SKELETON_AVATAR_SIZES as C } from "./Skeleton.const.js";
|
|
5
|
+
import { injectStyles as A } from "./Skeleton.utils.js";
|
|
6
|
+
const a = m(
|
|
7
7
|
({
|
|
8
8
|
variant: e = "text",
|
|
9
|
-
animation:
|
|
9
|
+
animation: t = "pulse",
|
|
10
10
|
width: s,
|
|
11
11
|
height: l,
|
|
12
12
|
borderRadius: o,
|
|
13
|
-
count:
|
|
14
|
-
gap:
|
|
13
|
+
count: S = 1,
|
|
14
|
+
gap: f = 8,
|
|
15
15
|
className: d,
|
|
16
16
|
style: n,
|
|
17
17
|
testId: h,
|
|
18
|
-
...
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [
|
|
18
|
+
...N
|
|
19
|
+
}, E) => {
|
|
20
|
+
u(() => {
|
|
21
|
+
t === "wave" && A();
|
|
22
|
+
}, [t]);
|
|
23
23
|
const c = (i) => {
|
|
24
24
|
if (i !== void 0)
|
|
25
25
|
return typeof i == "number" ? `${i}px` : i;
|
|
26
26
|
}, g = {
|
|
27
27
|
width: c(s),
|
|
28
|
-
height: c(l) || (e === "text" ?
|
|
28
|
+
height: c(l) || (e === "text" ? L : void 0),
|
|
29
29
|
borderRadius: o ? c(o) : void 0,
|
|
30
30
|
...n
|
|
31
|
-
},
|
|
31
|
+
}, k = x(
|
|
32
32
|
w,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
v,
|
|
33
|
+
b[e],
|
|
34
|
+
t === "pulse" && "Bear-Skeleton--pulse",
|
|
35
|
+
v[t],
|
|
36
36
|
d
|
|
37
37
|
);
|
|
38
|
-
return
|
|
38
|
+
return S > 1 ? /* @__PURE__ */ r(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
41
|
className: "Bear-Skeleton__group flex flex-col",
|
|
42
|
-
style: { gap: c(
|
|
42
|
+
style: { gap: c(f) },
|
|
43
43
|
"data-testid": h,
|
|
44
|
-
children: Array.from({ length:
|
|
44
|
+
children: Array.from({ length: S }).map((i, y) => /* @__PURE__ */ r(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
|
-
ref:
|
|
48
|
-
className:
|
|
47
|
+
ref: y === 0 ? E : void 0,
|
|
48
|
+
className: k,
|
|
49
49
|
style: g,
|
|
50
|
-
...
|
|
50
|
+
...N
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
y
|
|
53
53
|
))
|
|
54
54
|
}
|
|
55
|
-
) : /* @__PURE__ */
|
|
55
|
+
) : /* @__PURE__ */ r(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
|
-
ref:
|
|
59
|
-
className:
|
|
58
|
+
ref: E,
|
|
59
|
+
className: k,
|
|
60
60
|
style: g,
|
|
61
61
|
"data-testid": h,
|
|
62
|
-
...
|
|
62
|
+
...N
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
|
-
|
|
67
|
+
a.displayName = "Skeleton";
|
|
68
68
|
const T = m(
|
|
69
|
-
({ lines: e = 3, lastLineWidth:
|
|
70
|
-
l === "wave" &&
|
|
71
|
-
}, [l]), /* @__PURE__ */
|
|
69
|
+
({ lines: e = 3, lastLineWidth: t = "80%", gap: s = 8, animation: l = "pulse", ...o }, S) => (u(() => {
|
|
70
|
+
l === "wave" && A();
|
|
71
|
+
}, [l]), /* @__PURE__ */ r(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
|
-
ref:
|
|
74
|
+
ref: S,
|
|
75
75
|
className: "Bear-SkeletonText flex flex-col",
|
|
76
76
|
style: { gap: ((d) => {
|
|
77
77
|
if (d !== void 0)
|
|
78
78
|
return typeof d == "number" ? `${d}px` : d;
|
|
79
79
|
})(s) },
|
|
80
|
-
children: Array.from({ length: e }).map((d, n) => /* @__PURE__ */
|
|
81
|
-
|
|
80
|
+
children: Array.from({ length: e }).map((d, n) => /* @__PURE__ */ r(
|
|
81
|
+
a,
|
|
82
82
|
{
|
|
83
83
|
variant: "text",
|
|
84
84
|
animation: l,
|
|
85
|
-
width: n === e - 1 ?
|
|
85
|
+
width: n === e - 1 ? t : "100%",
|
|
86
86
|
...o
|
|
87
87
|
},
|
|
88
88
|
n
|
|
@@ -91,15 +91,15 @@ const T = m(
|
|
|
91
91
|
))
|
|
92
92
|
);
|
|
93
93
|
T.displayName = "SkeletonText";
|
|
94
|
-
const
|
|
95
|
-
({ size: e = "md", animation:
|
|
96
|
-
const o = typeof e == "number" ? e :
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
|
|
94
|
+
const _ = m(
|
|
95
|
+
({ size: e = "md", animation: t = "pulse", ...s }, l) => {
|
|
96
|
+
const o = typeof e == "number" ? e : C[e];
|
|
97
|
+
return /* @__PURE__ */ r(
|
|
98
|
+
a,
|
|
99
99
|
{
|
|
100
100
|
ref: l,
|
|
101
101
|
variant: "circular",
|
|
102
|
-
animation:
|
|
102
|
+
animation: t,
|
|
103
103
|
width: o,
|
|
104
104
|
height: o,
|
|
105
105
|
...s
|
|
@@ -107,34 +107,34 @@ const u = m(
|
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
({ animation: e = "pulse", className:
|
|
110
|
+
_.displayName = "SkeletonAvatar";
|
|
111
|
+
const O = m(
|
|
112
|
+
({ animation: e = "pulse", className: t, ...s }, l) => /* @__PURE__ */ p(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
ref: l,
|
|
116
|
-
className:
|
|
116
|
+
className: x(
|
|
117
117
|
"Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",
|
|
118
|
-
|
|
118
|
+
t
|
|
119
119
|
),
|
|
120
120
|
...s,
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
123
|
+
/* @__PURE__ */ r(_, { animation: e }),
|
|
124
|
+
/* @__PURE__ */ p("div", { className: "flex-1", children: [
|
|
125
|
+
/* @__PURE__ */ r(a, { animation: e, width: "60%", height: 16, className: "mb-2" }),
|
|
126
|
+
/* @__PURE__ */ r(a, { animation: e, width: "40%", height: 12 })
|
|
127
127
|
] })
|
|
128
128
|
] }),
|
|
129
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ r(T, { animation: e, lines: 3 })
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
);
|
|
134
|
-
|
|
134
|
+
O.displayName = "SkeletonCard";
|
|
135
135
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
a as Skeleton,
|
|
137
|
+
_ as SkeletonAvatar,
|
|
138
|
+
O as SkeletonCard,
|
|
139
139
|
T as SkeletonText
|
|
140
140
|
};
|
|
@@ -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"),y=require("../../utils/cn.cjs");require("react");const B=require("../../utils/generateBearId.utils.cjs"),g=require("../../utils/useBearId.cjs"),h=require("../Button/Button.cjs"),o=require("../Typography/Typography.cjs"),a=require("./StatCard.const.cjs"),m=require("./StatCard.utils.cjs"),p=n=>{const{title:d,value:i,color:s=a.DEFAULT_STAT_CARD_COLOR,icon:c,onClick:e,className:l,id:_,testId:u,...C}=n,A=g.useBearId("StatCard"),S=B.resolveBearId(_,A),T=`linear-gradient(135deg, ${s}${a.STAT_CARD_GRADIENT_START_ALPHA}, ${s}${a.STAT_CARD_GRADIENT_END_ALPHA})`;return t.jsxs("div",{id:S,"data-testid":u,role:e?"button":void 0,tabIndex:e?0:void 0,className:y.cn("Bear-StatCard",l),style:{background:T},onClick:e,onKeyDown:r=>m.handleStatCardKeyDown(r,e),...C,children:[t.jsx("div",{className:"Bear-StatCard__decoration","aria-hidden":!0}),t.jsxs("div",{className:"Bear-StatCard__body",children:[t.jsx(o.Typography,{className:"Bear-StatCard__title",children:d}),t.jsx(o.Typography,{className:"Bear-StatCard__value",children:i}),e&&t.jsx(h.Button,{type:"button",size:"sm",variant:"ghost",className:"Bear-StatCard__action",icon:c,onClick:r=>{r.stopPropagation(),e()},children:a.DEFAULT_STAT_CARD_ACTION_LABEL})]})]})};exports.StatCard=p;
|
|
@@ -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="#6366f1",T="dd",_="99",D="View All";exports.DEFAULT_STAT_CARD_ACTION_LABEL=D;exports.DEFAULT_STAT_CARD_COLOR=A;exports.STAT_CARD_GRADIENT_END_ALPHA=_;exports.STAT_CARD_GRADIENT_START_ALPHA=T;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export declare const STAT_CARD_ROOT_CLASS = "Bear-StatCard";
|
|
2
|
-
export declare const STAT_CARD_BASE_CLASSES = "bear-relative bear-overflow-hidden bear-rounded-2xl bear-p-6 bear-transition-transform hover:bear-scale-105 bear-cursor-pointer bear-border bear-border-[var(--bear-border-default)]";
|
|
3
|
-
export declare const STAT_CARD_DECORATION_CLASS = "Bear-StatCard__decoration bear-absolute bear-top-0 bear-right-0 bear-w-32 bear-h-32 -bear-mr-8 -bear-mt-8 bear-rounded-full bear-opacity-20 bear-bg-white";
|
|
4
|
-
export declare const STAT_CARD_BODY_CLASS = "Bear-StatCard__body bear-relative bear-z-10";
|
|
5
|
-
export declare const STAT_CARD_TITLE_CLASS = "Bear-StatCard__title bear-text-white/80 bear-text-sm bear-font-medium bear-mb-1";
|
|
6
|
-
export declare const STAT_CARD_VALUE_CLASS = "Bear-StatCard__value bear-text-white bear-text-3xl bear-font-bold bear-mb-4";
|
|
7
|
-
export declare const STAT_CARD_ACTION_CLASS = "Bear-StatCard__action bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-1.5 bear-bg-white/20 hover:bear-bg-white/30 bear-rounded-full bear-text-white bear-text-sm bear-font-medium bear-transition-colors bear-border-0";
|
|
8
1
|
export declare const DEFAULT_STAT_CARD_COLOR = "#6366f1";
|
|
9
2
|
export declare const STAT_CARD_GRADIENT_START_ALPHA = "dd";
|
|
10
3
|
export declare const STAT_CARD_GRADIENT_END_ALPHA = "99";
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const A = "#6366f1", T = "dd", _ = "99", D = "View All";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t as STAT_CARD_BODY_CLASS,
|
|
8
|
-
a as STAT_CARD_DECORATION_CLASS,
|
|
9
|
-
T as STAT_CARD_GRADIENT_END_ALPHA,
|
|
10
|
-
S as STAT_CARD_GRADIENT_START_ALPHA,
|
|
11
|
-
e as STAT_CARD_ROOT_CLASS,
|
|
12
|
-
b as STAT_CARD_TITLE_CLASS,
|
|
13
|
-
_ as STAT_CARD_VALUE_CLASS
|
|
3
|
+
D as DEFAULT_STAT_CARD_ACTION_LABEL,
|
|
4
|
+
A as DEFAULT_STAT_CARD_COLOR,
|
|
5
|
+
_ as STAT_CARD_GRADIENT_END_ALPHA,
|
|
6
|
+
T as STAT_CARD_GRADIENT_START_ALPHA
|
|
14
7
|
};
|
|
@@ -1,49 +1,60 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as S } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { resolveBearId as
|
|
5
|
-
import { useBearId as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
import { resolveBearId as D } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as N } from "../../utils/useBearId.js";
|
|
6
|
+
import { Button as h } from "../Button/Button.js";
|
|
7
|
+
import { Typography as d } from "../Typography/Typography.js";
|
|
8
|
+
import { DEFAULT_STAT_CARD_COLOR as B, STAT_CARD_GRADIENT_START_ALPHA as u, STAT_CARD_GRADIENT_END_ALPHA as v, DEFAULT_STAT_CARD_ACTION_LABEL as I } from "./StatCard.const.js";
|
|
9
|
+
import { handleStatCardKeyDown as f } from "./StatCard.utils.js";
|
|
10
|
+
const k = (i) => {
|
|
11
|
+
const {
|
|
12
|
+
title: n,
|
|
13
|
+
value: s,
|
|
14
|
+
color: o = B,
|
|
15
|
+
icon: m,
|
|
16
|
+
onClick: t,
|
|
17
|
+
className: c,
|
|
18
|
+
id: l,
|
|
19
|
+
testId: _,
|
|
20
|
+
...A
|
|
21
|
+
} = i, C = N("StatCard"), p = D(l, C), T = `linear-gradient(135deg, ${o}${u}, ${o}${v})`;
|
|
19
22
|
return /* @__PURE__ */ e(
|
|
20
23
|
"div",
|
|
21
24
|
{
|
|
22
|
-
id:
|
|
23
|
-
"data-testid":
|
|
24
|
-
role:
|
|
25
|
-
tabIndex:
|
|
26
|
-
className:
|
|
27
|
-
style: { background:
|
|
28
|
-
onClick:
|
|
29
|
-
onKeyDown: (
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
...D,
|
|
25
|
+
id: p,
|
|
26
|
+
"data-testid": _,
|
|
27
|
+
role: t ? "button" : void 0,
|
|
28
|
+
tabIndex: t ? 0 : void 0,
|
|
29
|
+
className: S("Bear-StatCard", c),
|
|
30
|
+
style: { background: T },
|
|
31
|
+
onClick: t,
|
|
32
|
+
onKeyDown: (r) => f(r, t),
|
|
33
|
+
...A,
|
|
33
34
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ e("div", { className:
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "Bear-StatCard__decoration", "aria-hidden": !0 }),
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "Bear-StatCard__body", children: [
|
|
37
|
+
/* @__PURE__ */ a(d, { className: "Bear-StatCard__title", children: n }),
|
|
38
|
+
/* @__PURE__ */ a(d, { className: "Bear-StatCard__value", children: s }),
|
|
39
|
+
t && /* @__PURE__ */ a(
|
|
40
|
+
h,
|
|
41
|
+
{
|
|
42
|
+
type: "button",
|
|
43
|
+
size: "sm",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
className: "Bear-StatCard__action",
|
|
46
|
+
icon: m,
|
|
47
|
+
onClick: (r) => {
|
|
48
|
+
r.stopPropagation(), t();
|
|
49
|
+
},
|
|
50
|
+
children: I
|
|
51
|
+
}
|
|
52
|
+
)
|
|
42
53
|
] })
|
|
43
54
|
]
|
|
44
55
|
}
|
|
45
56
|
);
|
|
46
57
|
};
|
|
47
58
|
export {
|
|
48
|
-
|
|
59
|
+
k as StatCard
|
|
49
60
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/keys.const.cjs"),a=(e,t)=>{t&&(e.key!==r.KEY_ENTER&&e.key!==r.KEY_SPACE||(e.preventDefault(),t()))};exports.handleStatCardKeyDown=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../constants/generals.const.cjs"),N=require("../../utils/cn.cjs");require("react");const m=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),B=require("../../utils/liveRegion.utils.cjs"),n=require("../Box/Box.cjs"),i=require("../Typography/Typography.cjs"),s=require("./StreamingMessage.const.cjs"),p=o=>{const{id:c,testId:S,content:r,isStreaming:t=s.STREAMING_MESSAGE_DEFAULT_STREAMING,sender:g=s.STREAMING_MESSAGE_DEFAULT_SENDER,live:E=s.STREAMING_MESSAGE_DEFAULT_LIVE,translations:_,className:d}=o,l=I.useBearId(a.COMPONENT_NAME_STREAMING_MESSAGE),u=m.resolveBearId(c,l),M={...s.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS,..._},A=E&&t?B.getBearLiveRegionProps("info"):{},T=typeof r=="string"?r:void 0;return e.jsxs(n.Box,{id:u,"data-testid":S,className:N.cn("Bear-StreamingMessage",`Bear-StreamingMessage--${g}`,d),...A,children:[e.jsxs(i.Typography,{variant:"body2",children:[r,t&&e.jsx(n.Box,{as:"span",className:"Bear-StreamingMessage__cursor","aria-hidden":a.BOOLEAN_FALSE})]}),t&&T&&e.jsx(i.Typography,{variant:"caption",className:"Bear-StreamingMessage__status",children:M.streamingLabel})]})};exports.StreamingMessage=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/generals.const.cjs"),S={streamingLabel:"Streaming"},A="assistant",_=E.BOOLEAN_FALSE,T=E.BOOLEAN_TRUE;exports.STREAMING_MESSAGE_DEFAULT_LIVE=T;exports.STREAMING_MESSAGE_DEFAULT_SENDER=A;exports.STREAMING_MESSAGE_DEFAULT_STREAMING=_;exports.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS=S;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StreamingMessageSender, StreamingMessageTranslations } from './StreamingMessage.types';
|
|
2
|
+
export declare const STREAMING_MESSAGE_DEFAULT_TRANSLATIONS: StreamingMessageTranslations;
|
|
3
|
+
export declare const STREAMING_MESSAGE_DEFAULT_SENDER: StreamingMessageSender;
|
|
4
|
+
export declare const STREAMING_MESSAGE_DEFAULT_STREAMING = false;
|
|
5
|
+
export declare const STREAMING_MESSAGE_DEFAULT_LIVE = true;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BOOLEAN_FALSE as E, BOOLEAN_TRUE as A } from "../../constants/generals.const.js";
|
|
2
|
+
const _ = {
|
|
3
|
+
streamingLabel: "Streaming"
|
|
4
|
+
}, T = "assistant", t = E, L = A;
|
|
5
|
+
export {
|
|
6
|
+
L as STREAMING_MESSAGE_DEFAULT_LIVE,
|
|
7
|
+
T as STREAMING_MESSAGE_DEFAULT_SENDER,
|
|
8
|
+
t as STREAMING_MESSAGE_DEFAULT_STREAMING,
|
|
9
|
+
_ as STREAMING_MESSAGE_DEFAULT_TRANSLATIONS
|
|
10
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_STREAMING_MESSAGE as N, BOOLEAN_FALSE as T } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as l } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as I } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as f } from "../../utils/useBearId.js";
|
|
7
|
+
import { getBearLiveRegionProps as G } from "../../utils/liveRegion.utils.js";
|
|
8
|
+
import { Box as a } from "../Box/Box.js";
|
|
9
|
+
import { Typography as o } from "../Typography/Typography.js";
|
|
10
|
+
import { STREAMING_MESSAGE_DEFAULT_STREAMING as L, STREAMING_MESSAGE_DEFAULT_SENDER as B, STREAMING_MESSAGE_DEFAULT_LIVE as R, STREAMING_MESSAGE_DEFAULT_TRANSLATIONS as v } from "./StreamingMessage.const.js";
|
|
11
|
+
const j = (i) => {
|
|
12
|
+
const {
|
|
13
|
+
id: n,
|
|
14
|
+
testId: m,
|
|
15
|
+
content: e,
|
|
16
|
+
isStreaming: r = L,
|
|
17
|
+
sender: E = B,
|
|
18
|
+
live: S = R,
|
|
19
|
+
translations: A,
|
|
20
|
+
className: _
|
|
21
|
+
} = i, c = f(N), d = I(n, c), p = { ...v, ...A }, M = S && r ? G("info") : {}, g = typeof e == "string" ? e : void 0;
|
|
22
|
+
return /* @__PURE__ */ t(
|
|
23
|
+
a,
|
|
24
|
+
{
|
|
25
|
+
id: d,
|
|
26
|
+
"data-testid": m,
|
|
27
|
+
className: l("Bear-StreamingMessage", `Bear-StreamingMessage--${E}`, _),
|
|
28
|
+
...M,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ t(o, { variant: "body2", children: [
|
|
31
|
+
e,
|
|
32
|
+
r && /* @__PURE__ */ s(
|
|
33
|
+
a,
|
|
34
|
+
{
|
|
35
|
+
as: "span",
|
|
36
|
+
className: "Bear-StreamingMessage__cursor",
|
|
37
|
+
"aria-hidden": T
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }),
|
|
41
|
+
r && g && /* @__PURE__ */ s(o, { variant: "caption", className: "Bear-StreamingMessage__status", children: p.streamingLabel })
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
j as StreamingMessage
|
|
48
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type StreamingMessageSender = 'user' | 'assistant' | 'bot' | 'system';
|
|
3
|
+
export interface StreamingMessageTranslations {
|
|
4
|
+
streamingLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StreamingMessageProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
content: ReactNode;
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
sender?: StreamingMessageSender;
|
|
12
|
+
live?: boolean;
|
|
13
|
+
translations?: Partial<StreamingMessageTranslations>;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),I=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs");require("react");const q=require("../../utils/generateBearId.utils.cjs"),v=require("../../utils/useBearId.cjs"),B=require("../../context/BearProvider.cjs"),g=require("../Button/Button.cjs"),N=require("../Flex/Flex.cjs"),c=require("./ThemeSwitcher.const.cjs"),C=n=>{const{id:a,testId:o,value:t,onChange:r,translations:i,className:l}=n,u=v.useBearId(I.COMPONENT_NAME_THEME_SWITCHER),d=q.resolveBearId(a,u),{colorScheme:T,setColorScheme:S}=B.useBear(),h=t??T,m={...c.THEME_SWITCHER_DEFAULT_TRANSLATIONS,...i},E=e=>{t===void 0&&S(e),r==null||r(e)};return s.jsx(N.Flex,{id:d,testId:o,className:_.cn("Bear-ThemeSwitcher",l),align:"center",gap:1,children:c.THEME_SWITCHER_OPTIONS.map(e=>s.jsx(g.Button,{type:"button",size:"sm",variant:h===e.value?"primary":"ghost",onClick:()=>E(e.value),children:m[e.labelKey]},e.value))})};exports.ThemeSwitcher=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/generals.const.cjs"),e={lightLabel:E.LABEL_THEME_LIGHT,darkLabel:E.LABEL_THEME_DARK,systemLabel:E.LABEL_THEME_SYSTEM},T=[{value:E.COLOR_SCHEME_LIGHT,labelKey:"lightLabel"},{value:E.COLOR_SCHEME_DARK,labelKey:"darkLabel"},{value:E.COLOR_SCHEME_SYSTEM,labelKey:"systemLabel"}];exports.THEME_SWITCHER_DEFAULT_TRANSLATIONS=e;exports.THEME_SWITCHER_OPTIONS=T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BearColorScheme } from '../../context/bearProvider.types';
|
|
2
|
+
import { ThemeSwitcherTranslations } from './ThemeSwitcher.types';
|
|
3
|
+
export declare const THEME_SWITCHER_DEFAULT_TRANSLATIONS: ThemeSwitcherTranslations;
|
|
4
|
+
export declare const THEME_SWITCHER_OPTIONS: {
|
|
5
|
+
value: BearColorScheme;
|
|
6
|
+
labelKey: keyof ThemeSwitcherTranslations;
|
|
7
|
+
}[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { COLOR_SCHEME_LIGHT as E, COLOR_SCHEME_DARK as L, COLOR_SCHEME_SYSTEM as e, LABEL_THEME_SYSTEM as l, LABEL_THEME_DARK as _, LABEL_THEME_LIGHT as T } from "../../constants/generals.const.js";
|
|
2
|
+
const H = {
|
|
3
|
+
lightLabel: T,
|
|
4
|
+
darkLabel: _,
|
|
5
|
+
systemLabel: l
|
|
6
|
+
}, S = [
|
|
7
|
+
{ value: E, labelKey: "lightLabel" },
|
|
8
|
+
{ value: L, labelKey: "darkLabel" },
|
|
9
|
+
{ value: e, labelKey: "systemLabel" }
|
|
10
|
+
];
|
|
11
|
+
export {
|
|
12
|
+
H as THEME_SWITCHER_DEFAULT_TRANSLATIONS,
|
|
13
|
+
S as THEME_SWITCHER_OPTIONS
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_THEME_SWITCHER as I } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as S } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as h } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as u } from "../../utils/useBearId.js";
|
|
7
|
+
import { useBear as N } from "../../context/BearProvider.js";
|
|
8
|
+
import { Button as _ } from "../Button/Button.js";
|
|
9
|
+
import { Flex as v } from "../Flex/Flex.js";
|
|
10
|
+
import { THEME_SWITCHER_OPTIONS as C, THEME_SWITCHER_DEFAULT_TRANSLATIONS as H } from "./ThemeSwitcher.const.js";
|
|
11
|
+
const w = (m) => {
|
|
12
|
+
const { id: a, testId: s, value: t, onChange: r, translations: i, className: l } = m, c = u(I), n = h(a, c), { colorScheme: d, setColorScheme: T } = N(), p = t ?? d, E = { ...H, ...i }, f = (e) => {
|
|
13
|
+
t === void 0 && T(e), r == null || r(e);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
v,
|
|
17
|
+
{
|
|
18
|
+
id: n,
|
|
19
|
+
testId: s,
|
|
20
|
+
className: S("Bear-ThemeSwitcher", l),
|
|
21
|
+
align: "center",
|
|
22
|
+
gap: 1,
|
|
23
|
+
children: C.map((e) => /* @__PURE__ */ o(
|
|
24
|
+
_,
|
|
25
|
+
{
|
|
26
|
+
type: "button",
|
|
27
|
+
size: "sm",
|
|
28
|
+
variant: p === e.value ? "primary" : "ghost",
|
|
29
|
+
onClick: () => f(e.value),
|
|
30
|
+
children: E[e.labelKey]
|
|
31
|
+
},
|
|
32
|
+
e.value
|
|
33
|
+
))
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
w as ThemeSwitcher
|
|
39
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BearColorScheme } from '../../context/bearProvider.types';
|
|
2
|
+
export interface ThemeSwitcherTranslations {
|
|
3
|
+
lightLabel: string;
|
|
4
|
+
darkLabel: string;
|
|
5
|
+
systemLabel: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ThemeSwitcherProps {
|
|
8
|
+
id?: string;
|
|
9
|
+
testId?: string;
|
|
10
|
+
value?: BearColorScheme;
|
|
11
|
+
onChange?: (scheme: BearColorScheme) => void;
|
|
12
|
+
translations?: Partial<ThemeSwitcherTranslations>;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),q=require("react"),x=require("../../constants/generals.const.cjs"),b=require("../../utils/cn.cjs"),L=require("../../utils/generateBearId.utils.cjs"),K=require("../../utils/useBearId.cjs"),l=require("../Box/Box.cjs"),A=require("../Button/Button.cjs"),E=require("../Typography/Typography.cjs"),r=require("./ThinkingBlock.const.cjs"),S=d=>{const{id:u,testId:B,title:g,children:n,defaultOpen:T=r.THINKING_BLOCK_DEFAULT_OPEN,open:s,onOpenChange:t,isStreaming:I=r.THINKING_BLOCK_DEFAULT_STREAMING,translations:N,className:_}=d,h=K.useBearId(x.COMPONENT_NAME_THINKING_BLOCK),i=L.resolveBearId(u,h),[k,p]=q.useState(T),o=s??k,y={...r.THINKING_BLOCK_DEFAULT_TRANSLATIONS,...N},O=g??y.thinkingLabel,a=`${i}-body`,m=()=>{const c=!o;s===void 0&&p(c),t==null||t(c)};return e.jsxs(l.Box,{id:i,"data-testid":B,className:b.cn("Bear-ThinkingBlock",I&&"Bear-ThinkingBlock--streaming",_),children:[e.jsx(A.Button,{type:"button",variant:"ghost",className:"Bear-ThinkingBlock__trigger","aria-expanded":o,"aria-controls":a,onClick:m,children:O}),o&&e.jsx(l.Box,{id:a,className:"Bear-ThinkingBlock__body",children:typeof n=="string"?e.jsx(E.Typography,{variant:"body2",color:"muted",children:n}):n})]})};exports.ThinkingBlock=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../../constants/generals.const.cjs"),_={thinkingLabel:N.LABEL_THINKING},L=N.BOOLEAN_FALSE,T=N.BOOLEAN_FALSE;exports.THINKING_BLOCK_DEFAULT_OPEN=L;exports.THINKING_BLOCK_DEFAULT_STREAMING=T;exports.THINKING_BLOCK_DEFAULT_TRANSLATIONS=_;
|