@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 @@
|
|
|
1
|
+
export declare const PromptComposerAttachSvg: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { EIGHTEEN as r } from "../../../constants/numbers.const.js";
|
|
3
|
+
const i = () => /* @__PURE__ */ o("svg", { width: r, height: r, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" }) });
|
|
4
|
+
export {
|
|
5
|
+
i as PromptComposerAttachSvg
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../Chip/Chip.cjs"),n=i=>{const{file:e,disabled:t,onRemove:o}=i;return r.jsx(s.Chip,{size:"sm",variant:"soft",disabled:t,onDelete:o?()=>o(e):void 0,children:e.name})};exports.PromptComposerFileChip=n;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Chip as m } from "../../Chip/Chip.js";
|
|
3
|
+
const p = (i) => {
|
|
4
|
+
const { file: o, disabled: r, onRemove: e } = i;
|
|
5
|
+
return /* @__PURE__ */ t(
|
|
6
|
+
m,
|
|
7
|
+
{
|
|
8
|
+
size: "sm",
|
|
9
|
+
variant: "soft",
|
|
10
|
+
disabled: r,
|
|
11
|
+
onDelete: e ? () => e(o) : void 0,
|
|
12
|
+
children: o.name
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
p as PromptComposerFileChip
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../constants/numbers.const.cjs"),r=()=>e.jsxs("svg",{width:o.EIGHTEEN,height:o.EIGHTEEN,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M22 2L11 13"}),e.jsx("path",{d:"M22 2L15 22L11 13L2 9L22 2Z"})]});exports.PromptComposerSendSvg=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PromptComposerSendSvg: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { EIGHTEEN as r } from "../../../constants/numbers.const.js";
|
|
3
|
+
const n = () => /* @__PURE__ */ e("svg", { width: r, height: r, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
4
|
+
/* @__PURE__ */ o("path", { d: "M22 2L11 13" }),
|
|
5
|
+
/* @__PURE__ */ o("path", { d: "M22 2L15 22L11 13L2 9L22 2Z" })
|
|
6
|
+
] });
|
|
7
|
+
export {
|
|
8
|
+
n as PromptComposerSendSvg
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../constants/numbers.const.cjs"),r=()=>e.jsx("svg",{width:t.EIGHTEEN,height:t.EIGHTEEN,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})});exports.PromptComposerStopSvg=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PromptComposerStopSvg: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { EIGHTEEN as o } from "../../../constants/numbers.const.js";
|
|
3
|
+
const e = () => /* @__PURE__ */ r("svg", { width: o, height: o, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }) });
|
|
4
|
+
export {
|
|
5
|
+
e as PromptComposerStopSvg
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("../../constants/generals.const.cjs"),p=require("../../utils/cn.cjs");require("react");const I=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),S=require("../Chip/Chip.cjs"),N=require("../Flex/Flex.cjs"),P=i=>{const{id:n,testId:d,suggestions:o,selectedId:a,onSelect:r,className:c}=i,l=q.useBearId(t.COMPONENT_NAME_PROMPT_SUGGESTIONS),u=I.resolveBearId(n,l);return s.jsx(N.Flex,{id:u,testId:d,className:p.cn("Bear-PromptSuggestions",c),wrap:"wrap",gap:2,children:o.map(e=>{const m=e.id===a;return s.jsx(S.Chip,{size:"sm",variant:m?t.VARIANT_FILLED:"outlined",color:"primary",disabled:e.disabled,onClick:()=>r==null?void 0:r(e.id),children:e.label},e.id)})})};exports.PromptSuggestions=P;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_PROMPT_SUGGESTIONS as n, VARIANT_FILLED as I } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as f } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as N } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as P } from "../../utils/useBearId.js";
|
|
7
|
+
import { Chip as S } from "../Chip/Chip.js";
|
|
8
|
+
import { Flex as E } from "../Flex/Flex.js";
|
|
9
|
+
const B = (i) => {
|
|
10
|
+
const { id: m, testId: t, suggestions: d, selectedId: a, onSelect: o, className: s } = i, p = P(n), l = N(m, p);
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
E,
|
|
13
|
+
{
|
|
14
|
+
id: l,
|
|
15
|
+
testId: t,
|
|
16
|
+
className: f("Bear-PromptSuggestions", s),
|
|
17
|
+
wrap: "wrap",
|
|
18
|
+
gap: 2,
|
|
19
|
+
children: d.map((r) => {
|
|
20
|
+
const c = r.id === a;
|
|
21
|
+
return /* @__PURE__ */ e(
|
|
22
|
+
S,
|
|
23
|
+
{
|
|
24
|
+
size: "sm",
|
|
25
|
+
variant: c ? I : "outlined",
|
|
26
|
+
color: "primary",
|
|
27
|
+
disabled: r.disabled,
|
|
28
|
+
onClick: () => o == null ? void 0 : o(r.id),
|
|
29
|
+
children: r.label
|
|
30
|
+
},
|
|
31
|
+
r.id
|
|
32
|
+
);
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
B as PromptSuggestions
|
|
39
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PromptSuggestionItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface PromptSuggestionsProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
suggestions: PromptSuggestionItem[];
|
|
10
|
+
selectedId?: string;
|
|
11
|
+
onSelect?: (id: string) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../constants/numbers.const.cjs"),n=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../constants/numbers.const.cjs"),n=require("@forgedevstack/bear-icons/editor"),s={bold:e.jsx(n.BoldIcon,{size:i.SIXTEEN}),italic:e.jsx(n.ItalicIcon,{size:i.SIXTEEN}),underline:e.jsx(n.UnderlineIcon,{size:i.SIXTEEN}),strikethrough:e.jsx(n.StrikethroughIcon,{size:i.SIXTEEN}),heading1:e.jsx(n.Heading1Icon,{size:i.SIXTEEN}),heading2:e.jsx(n.Heading2Icon,{size:i.SIXTEEN}),heading3:e.jsx(n.Heading3Icon,{size:i.SIXTEEN}),bulletList:e.jsx(n.ListBulletIcon,{size:i.SIXTEEN}),orderedList:e.jsx(n.ListNumberedIcon,{size:i.SIXTEEN}),blockquote:e.jsx(n.QuoteIcon,{size:i.SIXTEEN}),code:e.jsx(n.CodeIcon,{size:i.SIXTEEN}),link:e.jsx(n.InsertLinkIcon,{size:i.SIXTEEN}),alignLeft:e.jsx(n.AlignLeftIcon,{size:i.SIXTEEN}),alignCenter:e.jsx(n.AlignCenterIcon,{size:i.SIXTEEN}),alignRight:e.jsx(n.AlignRightIcon,{size:i.SIXTEEN}),alignJustify:e.jsx(n.AlignJustifyIcon,{size:i.SIXTEEN}),image:e.jsx(n.InsertPhotoIcon,{size:i.SIXTEEN}),indent:e.jsx(n.IndentIncreaseIcon,{size:i.SIXTEEN}),outdent:e.jsx(n.IndentDecreaseIcon,{size:i.SIXTEEN}),clearFormat:e.jsx(n.FormatClearIcon,{size:i.SIXTEEN}),table:e.jsx(n.TableIcon,{size:i.SIXTEEN})};exports.RICH_EDITOR_ICONS=s;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { SIXTEEN as i } from "../../../constants/numbers.const.js";
|
|
3
|
-
import { TableIcon as
|
|
4
|
-
const
|
|
3
|
+
import { TableIcon as n, FormatClearIcon as o, IndentDecreaseIcon as t, IndentIncreaseIcon as s, InsertPhotoIcon as I, AlignJustifyIcon as c, AlignRightIcon as r, AlignCenterIcon as l, AlignLeftIcon as a, InsertLinkIcon as z, CodeIcon as d, QuoteIcon as g, ListNumberedIcon as u, ListBulletIcon as h, Heading3Icon as m, Heading2Icon as f, Heading1Icon as L, StrikethroughIcon as b, UnderlineIcon as C, ItalicIcon as k, BoldIcon as p } from "@forgedevstack/bear-icons/editor";
|
|
4
|
+
const E = {
|
|
5
5
|
bold: /* @__PURE__ */ e(p, { size: i }),
|
|
6
6
|
italic: /* @__PURE__ */ e(k, { size: i }),
|
|
7
|
-
underline: /* @__PURE__ */ e(
|
|
8
|
-
strikethrough: /* @__PURE__ */ e(
|
|
7
|
+
underline: /* @__PURE__ */ e(C, { size: i }),
|
|
8
|
+
strikethrough: /* @__PURE__ */ e(b, { size: i }),
|
|
9
9
|
heading1: /* @__PURE__ */ e(L, { size: i }),
|
|
10
10
|
heading2: /* @__PURE__ */ e(f, { size: i }),
|
|
11
|
-
heading3: /* @__PURE__ */ e(
|
|
12
|
-
bulletList: /* @__PURE__ */ e(
|
|
11
|
+
heading3: /* @__PURE__ */ e(m, { size: i }),
|
|
12
|
+
bulletList: /* @__PURE__ */ e(h, { size: i }),
|
|
13
13
|
orderedList: /* @__PURE__ */ e(u, { size: i }),
|
|
14
14
|
blockquote: /* @__PURE__ */ e(g, { size: i }),
|
|
15
15
|
code: /* @__PURE__ */ e(d, { size: i }),
|
|
16
16
|
link: /* @__PURE__ */ e(z, { size: i }),
|
|
17
|
-
alignLeft: /* @__PURE__ */ e(
|
|
18
|
-
alignCenter: /* @__PURE__ */ e(
|
|
19
|
-
alignRight: /* @__PURE__ */ e(
|
|
20
|
-
alignJustify: /* @__PURE__ */ e(
|
|
21
|
-
image: /* @__PURE__ */ e(
|
|
22
|
-
indent: /* @__PURE__ */ e(
|
|
23
|
-
outdent: /* @__PURE__ */ e(
|
|
24
|
-
clearFormat: /* @__PURE__ */ e(
|
|
25
|
-
table: /* @__PURE__ */ e(
|
|
17
|
+
alignLeft: /* @__PURE__ */ e(a, { size: i }),
|
|
18
|
+
alignCenter: /* @__PURE__ */ e(l, { size: i }),
|
|
19
|
+
alignRight: /* @__PURE__ */ e(r, { size: i }),
|
|
20
|
+
alignJustify: /* @__PURE__ */ e(c, { size: i }),
|
|
21
|
+
image: /* @__PURE__ */ e(I, { size: i }),
|
|
22
|
+
indent: /* @__PURE__ */ e(s, { size: i }),
|
|
23
|
+
outdent: /* @__PURE__ */ e(t, { size: i }),
|
|
24
|
+
clearFormat: /* @__PURE__ */ e(o, { size: i }),
|
|
25
|
+
table: /* @__PURE__ */ e(n, { size: i })
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
E as RICH_EDITOR_ICONS
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("../../../constants/numbers.const.cjs"),T=require("../../../constants/generals.const.cjs"),l=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("../../../constants/numbers.const.cjs"),T=require("../../../constants/generals.const.cjs"),l=require("@forgedevstack/bear-icons/editor"),E=require("../components/ToolbarButton/ToolbarButton.cjs"),A=require("../components/ToolbarDropdown/ToolbarDropdown.cjs"),L=require("../components/ToolbarColorPicker/ToolbarColorPicker.cjs"),N=require("../components/ToolbarMore/ToolbarMore.cjs"),M=require("../components/ToolbarSignature/ToolbarSignature.cjs"),I=require("../RichEditor.const.cjs"),d=require("./IconRender.cjs"),c=e=>{const n=e.disabled||e.readOnly,R={[T.TOOLBAR_ITEM_DIVIDER]:_=>o.jsx("div",{className:"Bear-RichEditor__divider w-px h-5 bg-gray-300 dark:bg-zinc-600 mx-1"},`${T.TOOLBAR_ITEM_DIVIDER}-${_}`),[T.TOOLBAR_ITEM_HEADING_DROPDOWN]:()=>o.jsx(A.ToolbarDropdown,{options:I.RICH_EDITOR_HEADING_OPTIONS,value:e.currentBlock,onChange:e.handleHeadingChange,title:I.TITLE_TEXT_STYLE,disabled:n,icon:o.jsx(l.TextIcon,{size:i.SIXTEEN})},T.TOOLBAR_ITEM_HEADING_DROPDOWN),[T.TOOLBAR_ITEM_TEXT_COLOR]:()=>o.jsx(L.ToolbarColorPicker,{value:e.textColorValue,onChange:e.handleTextColor,title:I.TITLE_TEXT_COLOR,disabled:n,type:"text",recentColors:e.recentTextColors,onApplyLast:e.handleApplyLastTextColor},T.TOOLBAR_ITEM_TEXT_COLOR),[T.TOOLBAR_ITEM_HIGHLIGHT_COLOR]:()=>o.jsx(L.ToolbarColorPicker,{value:e.highlightColorValue,onChange:e.handleHighlightColor,title:I.TITLE_HIGHLIGHT_COLOR,disabled:n,type:"highlight",recentColors:e.recentHighlightColors,onApplyLast:e.handleApplyLastHighlightColor},T.TOOLBAR_ITEM_HIGHLIGHT_COLOR),[T.TOOLBAR_ITEM_LINK]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.InsertLinkIcon,{size:i.SIXTEEN}),title:I.TITLE_INSERT_LINK,onClick:e.handleLink,disabled:n},T.TOOLBAR_ITEM_LINK),[T.TOOLBAR_ITEM_IMAGE]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.InsertPhotoIcon,{size:i.SIXTEEN}),title:I.TITLE_INSERT_IMAGE,onClick:e.handleImageUpload,disabled:n},T.TOOLBAR_ITEM_IMAGE),[T.TOOLBAR_ITEM_SIGNATURE]:()=>o.jsx(M.ToolbarSignature,{title:I.TITLE_INSERT_SIGNATURE,disabled:n,onInsert:e.handleInsertSignature},T.TOOLBAR_ITEM_SIGNATURE),[T.TOOLBAR_ITEM_ALIGN_LEFT]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.AlignLeftIcon,{size:i.SIXTEEN}),title:I.TITLE_ALIGN_LEFT,onClick:()=>e.execAlign(T.COMMAND_JUSTIFY_LEFT),disabled:n},T.TOOLBAR_ITEM_ALIGN_LEFT),[T.TOOLBAR_ITEM_ALIGN_CENTER]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.AlignCenterIcon,{size:i.SIXTEEN}),title:I.TITLE_ALIGN_CENTER,onClick:()=>e.execAlign(T.COMMAND_JUSTIFY_CENTER),disabled:n},T.TOOLBAR_ITEM_ALIGN_CENTER),[T.TOOLBAR_ITEM_ALIGN_RIGHT]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.AlignRightIcon,{size:i.SIXTEEN}),title:I.TITLE_ALIGN_RIGHT,onClick:()=>e.execAlign(T.COMMAND_JUSTIFY_RIGHT),disabled:n},T.TOOLBAR_ITEM_ALIGN_RIGHT),[T.TOOLBAR_ITEM_ALIGN_JUSTIFY]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.AlignJustifyIcon,{size:i.SIXTEEN}),title:I.TITLE_JUSTIFY,onClick:()=>e.execAlign(T.COMMAND_JUSTIFY_FULL),disabled:n},T.TOOLBAR_ITEM_ALIGN_JUSTIFY),[T.TOOLBAR_ITEM_INDENT]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.IndentIncreaseIcon,{size:i.SIXTEEN}),title:I.TITLE_INCREASE_INDENT,onClick:()=>e.execAlign(T.COMMAND_INDENT),disabled:n},T.TOOLBAR_ITEM_INDENT),[T.TOOLBAR_ITEM_OUTDENT]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.IndentDecreaseIcon,{size:i.SIXTEEN}),title:I.TITLE_DECREASE_INDENT,onClick:()=>e.execAlign(T.COMMAND_OUTDENT),disabled:n},T.TOOLBAR_ITEM_OUTDENT),[T.TOOLBAR_ITEM_CLEAR_FORMAT]:()=>o.jsx(E.ToolbarButton,{icon:o.jsx(l.FormatClearIcon,{size:i.SIXTEEN}),title:I.TITLE_CLEAR_FORMATTING,onClick:()=>e.execAlign(T.COMMAND_REMOVE_FORMAT),disabled:n},T.TOOLBAR_ITEM_CLEAR_FORMAT),[T.TOOLBAR_ITEM_MORE]:()=>{const _=e.isMobile?I.RICH_EDITOR_MOBILE_MORE_ITEMS:I.RICH_EDITOR_DESKTOP_MORE_ITEMS;return o.jsx(N.ToolbarMore,{disabled:n,isMobile:e.isMobile,children:_.map((t,r)=>O(t,r))},T.TOOLBAR_ITEM_MORE)}},O=(_,t)=>{const r=R[_];if(r)return r(t);const s=I.RICH_EDITOR_BUTTON_CONFIG[_],a=d.RICH_EDITOR_ICONS[_];return!s||!a?null:o.jsx(E.ToolbarButton,{icon:a,title:s.title,active:e.activeFormats.has(_),onClick:()=>e.handleFormat(_),disabled:n},_)};return O};exports.createToolbarItemRenderer=c;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { SIXTEEN as l } from "../../../constants/numbers.const.js";
|
|
3
|
-
import { TOOLBAR_ITEM_MORE as
|
|
4
|
-
import { FormatClearIcon as u, IndentDecreaseIcon as U, IndentIncreaseIcon as z, AlignJustifyIcon as y, AlignRightIcon as v, AlignCenterIcon as J, AlignLeftIcon as Y, InsertPhotoIcon as P, InsertLinkIcon as
|
|
3
|
+
import { TOOLBAR_ITEM_MORE as a, TOOLBAR_ITEM_CLEAR_FORMAT as O, COMMAND_REMOVE_FORMAT as S, TOOLBAR_ITEM_OUTDENT as s, COMMAND_OUTDENT as G, TOOLBAR_ITEM_INDENT as L, COMMAND_INDENT as B, TOOLBAR_ITEM_ALIGN_JUSTIFY as d, COMMAND_JUSTIFY_FULL as H, TOOLBAR_ITEM_ALIGN_RIGHT as A, COMMAND_JUSTIFY_RIGHT as F, TOOLBAR_ITEM_ALIGN_CENTER as R, COMMAND_JUSTIFY_CENTER as f, TOOLBAR_ITEM_ALIGN_LEFT as C, COMMAND_JUSTIFY_LEFT as k, TOOLBAR_ITEM_SIGNATURE as M, TOOLBAR_ITEM_IMAGE as N, TOOLBAR_ITEM_LINK as c, TOOLBAR_ITEM_HIGHLIGHT_COLOR as g, TOOLBAR_ITEM_TEXT_COLOR as h, TOOLBAR_ITEM_HEADING_DROPDOWN as p, TOOLBAR_ITEM_DIVIDER as b } from "../../../constants/generals.const.js";
|
|
4
|
+
import { FormatClearIcon as u, IndentDecreaseIcon as U, IndentIncreaseIcon as z, AlignJustifyIcon as y, AlignRightIcon as v, AlignCenterIcon as J, AlignLeftIcon as Y, InsertPhotoIcon as P, InsertLinkIcon as V, TextIcon as X } from "@forgedevstack/bear-icons/editor";
|
|
5
5
|
import { ToolbarButton as n } from "../components/ToolbarButton/ToolbarButton.js";
|
|
6
6
|
import { ToolbarDropdown as K } from "../components/ToolbarDropdown/ToolbarDropdown.js";
|
|
7
|
-
import { ToolbarColorPicker as
|
|
7
|
+
import { ToolbarColorPicker as m } from "../components/ToolbarColorPicker/ToolbarColorPicker.js";
|
|
8
8
|
import { ToolbarMore as w } from "../components/ToolbarMore/ToolbarMore.js";
|
|
9
9
|
import { ToolbarSignature as $ } from "../components/ToolbarSignature/ToolbarSignature.js";
|
|
10
|
-
import { RICH_EDITOR_BUTTON_CONFIG as j, RICH_EDITOR_MOBILE_MORE_ITEMS as W, RICH_EDITOR_DESKTOP_MORE_ITEMS as q, TITLE_CLEAR_FORMATTING as Q, TITLE_DECREASE_INDENT as Z, TITLE_INCREASE_INDENT as x, TITLE_JUSTIFY as ee, TITLE_ALIGN_RIGHT as oe, TITLE_ALIGN_CENTER as Te, TITLE_ALIGN_LEFT as ie, TITLE_INSERT_SIGNATURE as le, TITLE_INSERT_IMAGE as ne, TITLE_INSERT_LINK as Ie, TITLE_HIGHLIGHT_COLOR as _e, TITLE_TEXT_COLOR as re, TITLE_TEXT_STYLE as Ee, RICH_EDITOR_HEADING_OPTIONS as
|
|
11
|
-
import { RICH_EDITOR_ICONS as
|
|
10
|
+
import { RICH_EDITOR_BUTTON_CONFIG as j, RICH_EDITOR_MOBILE_MORE_ITEMS as W, RICH_EDITOR_DESKTOP_MORE_ITEMS as q, TITLE_CLEAR_FORMATTING as Q, TITLE_DECREASE_INDENT as Z, TITLE_INCREASE_INDENT as x, TITLE_JUSTIFY as ee, TITLE_ALIGN_RIGHT as oe, TITLE_ALIGN_CENTER as Te, TITLE_ALIGN_LEFT as ie, TITLE_INSERT_SIGNATURE as le, TITLE_INSERT_IMAGE as ne, TITLE_INSERT_LINK as Ie, TITLE_HIGHLIGHT_COLOR as _e, TITLE_TEXT_COLOR as re, TITLE_TEXT_STYLE as Ee, RICH_EDITOR_HEADING_OPTIONS as te } from "../RichEditor.const.js";
|
|
11
|
+
import { RICH_EDITOR_ICONS as ae } from "./IconRender.js";
|
|
12
12
|
const he = (e) => {
|
|
13
|
-
const T = e.disabled || e.readOnly,
|
|
14
|
-
[
|
|
13
|
+
const T = e.disabled || e.readOnly, D = {
|
|
14
|
+
[b]: (i) => /* @__PURE__ */ o(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: "Bear-RichEditor__divider w-px h-5 bg-gray-300 dark:bg-zinc-600 mx-1"
|
|
18
18
|
},
|
|
19
|
-
`${
|
|
19
|
+
`${b}-${i}`
|
|
20
20
|
),
|
|
21
21
|
[p]: () => /* @__PURE__ */ o(
|
|
22
22
|
K,
|
|
23
23
|
{
|
|
24
|
-
options:
|
|
24
|
+
options: te,
|
|
25
25
|
value: e.currentBlock,
|
|
26
26
|
onChange: e.handleHeadingChange,
|
|
27
27
|
title: Ee,
|
|
28
28
|
disabled: T,
|
|
29
|
-
icon: /* @__PURE__ */ o(
|
|
29
|
+
icon: /* @__PURE__ */ o(X, { size: l })
|
|
30
30
|
},
|
|
31
31
|
p
|
|
32
32
|
),
|
|
33
33
|
[h]: () => /* @__PURE__ */ o(
|
|
34
|
-
|
|
34
|
+
m,
|
|
35
35
|
{
|
|
36
36
|
value: e.textColorValue,
|
|
37
37
|
onChange: e.handleTextColor,
|
|
@@ -44,7 +44,7 @@ const he = (e) => {
|
|
|
44
44
|
h
|
|
45
45
|
),
|
|
46
46
|
[g]: () => /* @__PURE__ */ o(
|
|
47
|
-
|
|
47
|
+
m,
|
|
48
48
|
{
|
|
49
49
|
value: e.highlightColorValue,
|
|
50
50
|
onChange: e.handleHighlightColor,
|
|
@@ -59,7 +59,7 @@ const he = (e) => {
|
|
|
59
59
|
[c]: () => /* @__PURE__ */ o(
|
|
60
60
|
n,
|
|
61
61
|
{
|
|
62
|
-
icon: /* @__PURE__ */ o(
|
|
62
|
+
icon: /* @__PURE__ */ o(V, { size: l }),
|
|
63
63
|
title: Ie,
|
|
64
64
|
onClick: e.handleLink,
|
|
65
65
|
disabled: T
|
|
@@ -135,7 +135,7 @@ const he = (e) => {
|
|
|
135
135
|
},
|
|
136
136
|
L
|
|
137
137
|
),
|
|
138
|
-
[
|
|
138
|
+
[s]: () => /* @__PURE__ */ o(
|
|
139
139
|
n,
|
|
140
140
|
{
|
|
141
141
|
icon: /* @__PURE__ */ o(U, { size: l }),
|
|
@@ -143,9 +143,9 @@ const he = (e) => {
|
|
|
143
143
|
onClick: () => e.execAlign(G),
|
|
144
144
|
disabled: T
|
|
145
145
|
},
|
|
146
|
-
|
|
146
|
+
s
|
|
147
147
|
),
|
|
148
|
-
[
|
|
148
|
+
[O]: () => /* @__PURE__ */ o(
|
|
149
149
|
n,
|
|
150
150
|
{
|
|
151
151
|
icon: /* @__PURE__ */ o(u, { size: l }),
|
|
@@ -153,21 +153,21 @@ const he = (e) => {
|
|
|
153
153
|
onClick: () => e.execAlign(S),
|
|
154
154
|
disabled: T
|
|
155
155
|
},
|
|
156
|
-
|
|
156
|
+
O
|
|
157
157
|
),
|
|
158
|
-
[
|
|
158
|
+
[a]: () => {
|
|
159
159
|
const i = e.isMobile ? W : q;
|
|
160
|
-
return /* @__PURE__ */ o(w, { disabled: T, isMobile: e.isMobile, children: i.map((_, I) => r(_, I)) },
|
|
160
|
+
return /* @__PURE__ */ o(w, { disabled: T, isMobile: e.isMobile, children: i.map((_, I) => r(_, I)) }, a);
|
|
161
161
|
}
|
|
162
162
|
}, r = (i, _) => {
|
|
163
|
-
const I =
|
|
163
|
+
const I = D[i];
|
|
164
164
|
if (I)
|
|
165
165
|
return I(_);
|
|
166
|
-
const E = j[i],
|
|
167
|
-
return !E || !
|
|
166
|
+
const E = j[i], t = ae[i];
|
|
167
|
+
return !E || !t ? null : /* @__PURE__ */ o(
|
|
168
168
|
n,
|
|
169
169
|
{
|
|
170
|
-
icon:
|
|
170
|
+
icon: t,
|
|
171
171
|
title: E.title,
|
|
172
172
|
active: e.activeFormats.has(i),
|
|
173
173
|
onClick: () => e.handleFormat(i),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),s=require("./Select.const.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("react"),s=require("./Select.const.cjs"),z=require("./helpers/SelectCheckSvg.cjs"),V=require("./helpers/SelectChevronDownSvg.cjs"),W=require("../OverlayPortal/OverlayPortal.cjs"),d=require("../../utils/cn.cjs"),X=require("../../utils/generateBearId.utils.cjs"),H=require("../../utils/useBearId.cjs"),G=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const J=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),K=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),Q=require("../../hooks/useFormControl/useFormControl.cjs"),Y=C=>{const{options:v,value:l,onChange:t,placeholder:S=s.SELECT_DEFAULT_PLACEHOLDER,label:c,error:x,disabled:k=!1,required:A=!1,size:O="md",fullWidth:L=!1,displayEmpty:E=!1,renderValue:T,native:n=!1,className:q,id:I,testId:j}=C,{openEffect:P,closeEffect:F}=K.resolveOverlayEffects(C),B=H.useBearId("Select"),u=X.resolveBearId(I,B),a=Q.useFormControl(),[b,h]=f.useState(!1),y=f.useRef(null),w=f.useRef(null),{style:D,ready:$}=J.useFixedAnchorPosition({anchorRef:y,open:b&&!n,offsetPx:s.SELECT_MENU_OFFSET_PX,matchWidth:!0}),i=k||!!(a!=null&&a.disabled),m=A||!!(a!=null&&a.required),o=!!x||!!(a!=null&&a.error),_=typeof x=="string"?x:void 0,g=v.find(e=>e.value===l),p=l===void 0||l==="",N=p||E&&p,M=f.useCallback(()=>h(!1),[]);G.useClickOutsideMultiple([y,w],M,{enabled:b&&!n&&!i});const U=e=>{t==null||t(e),h(!1)},Z=T&&!p?T(l):N||!g?S:g.label,R={backgroundColor:"var(--bear-bg-primary)",borderColor:o?void 0:"var(--bear-border-default)",color:g&&!N?"var(--bear-text-primary)":"var(--bear-text-muted)"};return n?r.jsxs("div",{id:u,"data-testid":j,className:d.cn(s.S_E_L_E_C_T_ROOT_CLASS,"bear-relative bear-flex bear-flex-col bear-gap-1.5",L&&"bear-w-full"),children:[c&&r.jsx("label",{htmlFor:`${u}-native`,className:"bear-text-sm bear-font-medium",style:{color:"var(--bear-text-secondary)"},children:c}),r.jsxs("select",{id:`${u}-native`,disabled:i,required:m,value:l??"",onChange:e=>t==null?void 0:t(e.target.value),className:d.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__native`,"bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200","focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",o?"bear-border-red-500 focus:bear-ring-red-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500",i&&"bear-opacity-50 bear-cursor-not-allowed",s.SELECT_SIZE_CLASSES[O],q),style:R,"aria-invalid":o||void 0,"aria-required":m||void 0,"aria-describedby":a==null?void 0:a.helperId,children:[(E||S)&&r.jsx("option",{value:"",disabled:!E,children:S}),v.map(e=>r.jsx("option",{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),_&&r.jsx("p",{className:"bear-text-sm bear-text-red-500",children:_})]}):r.jsxs("div",{ref:y,id:u,"data-testid":j,className:d.cn(s.S_E_L_E_C_T_ROOT_CLASS,"bear-relative bear-flex bear-flex-col bear-gap-1.5",L&&"bear-w-full"),children:[c&&r.jsx("label",{className:"bear-text-sm bear-font-medium",style:{color:"var(--bear-text-secondary)"},children:c}),r.jsxs("button",{type:"button",disabled:i,onClick:()=>!i&&h(!b),className:d.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__trigger`,"bear-flex bear-items-center bear-justify-between bear-w-full","bear-rounded-lg bear-border bear-text-left bear-outline-none bear-transition-all bear-duration-200","focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",o?"bear-border-red-500 focus:bear-ring-red-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",i&&"bear-opacity-50 bear-cursor-not-allowed",s.SELECT_SIZE_CLASSES[O],q),style:R,"aria-haspopup":"listbox","aria-expanded":b,"aria-invalid":o||void 0,"aria-required":m||void 0,"aria-describedby":a==null?void 0:a.helperId,children:[r.jsx("span",{className:`${s.S_E_L_E_C_T_ROOT_CLASS}__value`,children:Z}),r.jsx(V.SelectChevronDownSvg,{className:d.cn("bear-w-4 bear-h-4 bear-shrink-0 bear-transition-transform",b&&"bear-rotate-180")})]}),r.jsx(W.OverlayPortal,{open:b&&!n,ready:$,style:{...D,backgroundColor:"var(--bear-bg-primary)",borderColor:"var(--bear-border-default)"},zIndex:s.SELECT_MENU_Z_INDEX,openEffect:P,closeEffect:F,panelRef:w,className:`${s.S_E_L_E_C_T_ROOT_CLASS}__menu bear-rounded-lg bear-border bear-shadow-lg bear-overflow-hidden`,attributes:{role:"listbox"},children:r.jsx("div",{className:"bear-max-h-60 bear-overflow-y-auto",children:v.map(e=>r.jsxs("button",{type:"button",disabled:e.disabled,onClick:()=>!e.disabled&&U(e.value),role:"option","aria-selected":e.value===l,className:d.cn(`${s.S_E_L_E_C_T_ROOT_CLASS}__option`,"bear-flex bear-items-center bear-justify-between bear-w-full bear-px-4 bear-py-2","bear-text-left bear-transition-colors",e.disabled&&"bear-cursor-not-allowed",e.value===l&&"bear-bg-bear-100 bear-text-bear-700 dark:bear-bg-bear-600/20 dark:bear-text-bear-300",!e.disabled&&e.value!==l&&"hover:bear-bg-[var(--bear-bg-tertiary)]"),style:e.disabled?{color:"var(--bear-text-muted)"}:e.value===l?void 0:{color:"var(--bear-text-secondary)"},children:[e.label,e.value===l&&r.jsx(z.SelectCheckSvg,{className:"bear-w-4 bear-h-4 bear-shrink-0 bear-text-bear-600 dark:bear-text-bear-400"})]},e.value))})}),_&&r.jsx("p",{className:"bear-text-sm bear-text-red-500",children:_})]})};exports.Select=Y;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as X, useRef as $, useCallback as Z } from "react";
|
|
3
3
|
import { SELECT_DEFAULT_PLACEHOLDER as H, SELECT_MENU_OFFSET_PX as G, SELECT_SIZE_CLASSES as q, S_E_L_E_C_T_ROOT_CLASS as t, SELECT_MENU_Z_INDEX as J } from "./Select.const.js";
|
|
4
|
-
import {
|
|
4
|
+
import { SelectCheckSvg as K } from "./helpers/SelectCheckSvg.js";
|
|
5
|
+
import { SelectChevronDownSvg as Q } from "./helpers/SelectChevronDownSvg.js";
|
|
5
6
|
import { OverlayPortal as Y } from "../OverlayPortal/OverlayPortal.js";
|
|
6
7
|
import { cn as d } from "../../utils/cn.js";
|
|
7
8
|
import { resolveBearId as ee } from "../../utils/generateBearId.utils.js";
|
|
@@ -12,17 +13,17 @@ import "../../hooks/useBearComponent/useBearComponent.js";
|
|
|
12
13
|
import { useFixedAnchorPosition as le } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
|
|
13
14
|
import { resolveOverlayEffects as te } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
|
|
14
15
|
import { useFormControl as se } from "../../hooks/useFormControl/useFormControl.js";
|
|
15
|
-
const
|
|
16
|
+
const _e = (w) => {
|
|
16
17
|
const {
|
|
17
18
|
options: v,
|
|
18
19
|
value: l,
|
|
19
20
|
onChange: s,
|
|
20
21
|
placeholder: p = H,
|
|
21
|
-
label:
|
|
22
|
+
label: n,
|
|
22
23
|
error: y,
|
|
23
24
|
disabled: B = !1,
|
|
24
25
|
required: D = !1,
|
|
25
|
-
size:
|
|
26
|
+
size: N = "md",
|
|
26
27
|
fullWidth: k = !1,
|
|
27
28
|
displayEmpty: h = !1,
|
|
28
29
|
renderValue: I,
|
|
@@ -30,23 +31,23 @@ const ge = (N) => {
|
|
|
30
31
|
className: L,
|
|
31
32
|
id: F,
|
|
32
33
|
testId: O
|
|
33
|
-
} =
|
|
34
|
+
} = w, { openEffect: P, closeEffect: A } = te(w), j = re("Select"), f = ee(F, j), r = se(), [b, x] = X(!1), g = $(null), C = $(null), { style: M, ready: U } = le({
|
|
34
35
|
anchorRef: g,
|
|
35
36
|
open: b && !u,
|
|
36
37
|
offsetPx: G,
|
|
37
38
|
matchWidth: !0
|
|
38
|
-
}), o = B || !!(r != null && r.disabled), _ = D || !!(r != null && r.required), i = !!y || !!(r != null && r.error), m = typeof y == "string" ? y : void 0, E = v.find((e) => e.value === l),
|
|
39
|
+
}), o = B || !!(r != null && r.disabled), _ = D || !!(r != null && r.required), i = !!y || !!(r != null && r.error), m = typeof y == "string" ? y : void 0, E = v.find((e) => e.value === l), S = l === void 0 || l === "", R = S || h && S, z = Z(() => x(!1), []);
|
|
39
40
|
ae([g, C], z, {
|
|
40
41
|
enabled: b && !u && !o
|
|
41
42
|
});
|
|
42
43
|
const V = (e) => {
|
|
43
44
|
s == null || s(e), x(!1);
|
|
44
|
-
}, W = I && !
|
|
45
|
+
}, W = I && !S ? I(l) : R || !E ? p : E.label, T = {
|
|
45
46
|
backgroundColor: "var(--bear-bg-primary)",
|
|
46
47
|
borderColor: i ? void 0 : "var(--bear-border-default)",
|
|
47
48
|
color: E && !R ? "var(--bear-text-primary)" : "var(--bear-text-muted)"
|
|
48
49
|
};
|
|
49
|
-
return u ? /* @__PURE__ */
|
|
50
|
+
return u ? /* @__PURE__ */ c(
|
|
50
51
|
"div",
|
|
51
52
|
{
|
|
52
53
|
id: f,
|
|
@@ -57,16 +58,16 @@ const ge = (N) => {
|
|
|
57
58
|
k && "bear-w-full"
|
|
58
59
|
),
|
|
59
60
|
children: [
|
|
60
|
-
|
|
61
|
+
n && /* @__PURE__ */ a(
|
|
61
62
|
"label",
|
|
62
63
|
{
|
|
63
64
|
htmlFor: `${f}-native`,
|
|
64
65
|
className: "bear-text-sm bear-font-medium",
|
|
65
66
|
style: { color: "var(--bear-text-secondary)" },
|
|
66
|
-
children:
|
|
67
|
+
children: n
|
|
67
68
|
}
|
|
68
69
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ c(
|
|
70
71
|
"select",
|
|
71
72
|
{
|
|
72
73
|
id: `${f}-native`,
|
|
@@ -80,7 +81,7 @@ const ge = (N) => {
|
|
|
80
81
|
"focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",
|
|
81
82
|
i ? "bear-border-red-500 focus:bear-ring-red-500" : "focus:bear-border-bear-500 focus:bear-ring-bear-500",
|
|
82
83
|
o && "bear-opacity-50 bear-cursor-not-allowed",
|
|
83
|
-
q[
|
|
84
|
+
q[N],
|
|
84
85
|
L
|
|
85
86
|
),
|
|
86
87
|
style: T,
|
|
@@ -96,7 +97,7 @@ const ge = (N) => {
|
|
|
96
97
|
m && /* @__PURE__ */ a("p", { className: "bear-text-sm bear-text-red-500", children: m })
|
|
97
98
|
]
|
|
98
99
|
}
|
|
99
|
-
) : /* @__PURE__ */
|
|
100
|
+
) : /* @__PURE__ */ c(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
103
|
ref: g,
|
|
@@ -108,8 +109,8 @@ const ge = (N) => {
|
|
|
108
109
|
k && "bear-w-full"
|
|
109
110
|
),
|
|
110
111
|
children: [
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
n && /* @__PURE__ */ a("label", { className: "bear-text-sm bear-font-medium", style: { color: "var(--bear-text-secondary)" }, children: n }),
|
|
113
|
+
/* @__PURE__ */ c(
|
|
113
114
|
"button",
|
|
114
115
|
{
|
|
115
116
|
type: "button",
|
|
@@ -122,7 +123,7 @@ const ge = (N) => {
|
|
|
122
123
|
"focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-[var(--bear-bg-primary)]",
|
|
123
124
|
i ? "bear-border-red-500 focus:bear-ring-red-500" : "focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",
|
|
124
125
|
o && "bear-opacity-50 bear-cursor-not-allowed",
|
|
125
|
-
q[
|
|
126
|
+
q[N],
|
|
126
127
|
L
|
|
127
128
|
),
|
|
128
129
|
style: T,
|
|
@@ -134,13 +135,12 @@ const ge = (N) => {
|
|
|
134
135
|
children: [
|
|
135
136
|
/* @__PURE__ */ a("span", { className: `${t}__value`, children: W }),
|
|
136
137
|
/* @__PURE__ */ a(
|
|
137
|
-
|
|
138
|
+
Q,
|
|
138
139
|
{
|
|
139
140
|
className: d(
|
|
140
141
|
"bear-w-4 bear-h-4 bear-shrink-0 bear-transition-transform",
|
|
141
142
|
b && "bear-rotate-180"
|
|
142
|
-
)
|
|
143
|
-
style: { color: "var(--bear-text-muted)" }
|
|
143
|
+
)
|
|
144
144
|
}
|
|
145
145
|
)
|
|
146
146
|
]
|
|
@@ -162,7 +162,7 @@ const ge = (N) => {
|
|
|
162
162
|
panelRef: C,
|
|
163
163
|
className: `${t}__menu bear-rounded-lg bear-border bear-shadow-lg bear-overflow-hidden`,
|
|
164
164
|
attributes: { role: "listbox" },
|
|
165
|
-
children: /* @__PURE__ */ a("div", { className: "bear-max-h-60 bear-overflow-y-auto", children: v.map((e) => /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ a("div", { className: "bear-max-h-60 bear-overflow-y-auto", children: v.map((e) => /* @__PURE__ */ c(
|
|
166
166
|
"button",
|
|
167
167
|
{
|
|
168
168
|
type: "button",
|
|
@@ -181,7 +181,7 @@ const ge = (N) => {
|
|
|
181
181
|
style: e.disabled ? { color: "var(--bear-text-muted)" } : e.value === l ? void 0 : { color: "var(--bear-text-secondary)" },
|
|
182
182
|
children: [
|
|
183
183
|
e.label,
|
|
184
|
-
e.value === l && /* @__PURE__ */ a(
|
|
184
|
+
e.value === l && /* @__PURE__ */ a(K, { className: "bear-w-4 bear-h-4 bear-shrink-0 bear-text-bear-600 dark:bear-text-bear-400" })
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
e.value
|
|
@@ -194,5 +194,5 @@ const ge = (N) => {
|
|
|
194
194
|
);
|
|
195
195
|
};
|
|
196
196
|
export {
|
|
197
|
-
|
|
197
|
+
_e as Select
|
|
198
198
|
};
|
|
@@ -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,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M20 6L9 17l-5-5"})})};exports.SelectCheckSvg=o;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const n = (r) => {
|
|
3
|
+
const { className: o } = r;
|
|
4
|
+
return /* @__PURE__ */ e("svg", { className: o, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M20 6L9 17l-5-5" }) });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
n as SelectCheckSvg
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=o=>{const{className:r}=o;return e.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M6 9l6 6 6-6"})})};exports.SelectChevronDownSvg=n;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const t = (o) => {
|
|
3
|
+
const { className: r } = o;
|
|
4
|
+
return /* @__PURE__ */ e("svg", { className: r, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M6 9l6 6 6-6" }) });
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
t as SelectChevronDownSvg
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),j=require("../../utils/cn.cjs"),S=require("./Skeleton.const.cjs"),A=require("./Skeleton.utils.cjs"),c=d.forwardRef(({variant:e="text",animation:r="pulse",width:l,height:s,borderRadius:o,count:i=1,gap:u=8,className:n,style:f,testId:p,...N},y)=>{d.useEffect(()=>{r==="wave"&&A.injectStyles()},[r]);const x=a=>{if(a!==void 0)return typeof a=="number"?`${a}px`:a},E={width:x(l),height:x(s)||(e==="text"?S.SKELETON_TEXT_HEIGHT:void 0),borderRadius:o?x(o):void 0,...f},g=j.cn(S.SKELETON_BASE_CLASSES,S.SKELETON_VARIANT_CLASSES[e],r==="pulse"&&"Bear-Skeleton--pulse",S.SKELETON_ANIMATION_CLASSES[r],n);return i>1?t.jsx("div",{className:"Bear-Skeleton__group flex flex-col",style:{gap:x(u)},"data-testid":p,children:Array.from({length:i}).map((a,m)=>t.jsx("div",{ref:m===0?y:void 0,className:g,style:E,...N},m))}):t.jsx("div",{ref:y,className:g,style:E,"data-testid":p,...N})});c.displayName="Skeleton";const k=d.forwardRef(({lines:e=3,lastLineWidth:r="80%",gap:l=8,animation:s="pulse",...o},i)=>{d.useEffect(()=>{s==="wave"&&A.injectStyles()},[s]);const u=n=>{if(n!==void 0)return typeof n=="number"?`${n}px`:n};return t.jsx("div",{ref:i,className:"Bear-SkeletonText flex flex-col",style:{gap:u(l)},children:Array.from({length:e}).map((n,f)=>t.jsx(c,{variant:"text",animation:s,width:f===e-1?r:"100%",...o},f))})});k.displayName="SkeletonText";const h=d.forwardRef(({size:e="md",animation:r="pulse",...l},s)=>{const o=typeof e=="number"?e:S.SKELETON_AVATAR_SIZES[e];return t.jsx(c,{ref:s,variant:"circular",animation:r,width:o,height:o,...l})});h.displayName="SkeletonAvatar";const T=d.forwardRef(({animation:e="pulse",className:r,...l},s)=>t.jsxs("div",{ref:s,className:j.cn("Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",r),...l,children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx(h,{animation:e}),t.jsxs("div",{className:"flex-1",children:[t.jsx(c,{animation:e,width:"60%",height:16,className:"mb-2"}),t.jsx(c,{animation:e,width:"40%",height:12})]})]}),t.jsx(k,{animation:e,lines:3})]}));T.displayName="SkeletonCard";exports.Skeleton=c;exports.SkeletonAvatar=h;exports.SkeletonCard=T;exports.SkeletonText=k;
|