@agentiffai/design 0.1.6 → 0.1.7
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/dist/copilotkit/index.cjs +45 -24
- package/dist/copilotkit/index.cjs.map +1 -1
- package/dist/copilotkit/index.d.cts +9 -1
- package/dist/copilotkit/index.d.ts +9 -1
- package/dist/copilotkit/index.js +45 -24
- package/dist/copilotkit/index.js.map +1 -1
- package/dist/index.cjs +15 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/avatar-transparent-bg.png +0 -0
|
@@ -487,25 +487,24 @@ var Avatar = styled4__default.default.img`
|
|
|
487
487
|
height: 32px;
|
|
488
488
|
border-radius: 50%;
|
|
489
489
|
object-fit: cover;
|
|
490
|
-
background-color:
|
|
490
|
+
background-color: transparent;
|
|
491
491
|
`;
|
|
492
492
|
var AvatarInitials = styled4__default.default.div`
|
|
493
493
|
width: 32px;
|
|
494
494
|
height: 32px;
|
|
495
495
|
border-radius: 50%;
|
|
496
|
-
|
|
497
|
-
color: white;
|
|
496
|
+
overflow: hidden;
|
|
498
497
|
display: flex;
|
|
499
498
|
align-items: center;
|
|
500
499
|
justify-content: center;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
500
|
+
background-color: #1e3a5f; /* Dark blue background */
|
|
501
|
+
padding: 4px; /* Make the avatar image smaller inside the circle */
|
|
502
|
+
box-sizing: border-box;
|
|
505
503
|
|
|
506
|
-
|
|
507
|
-
width:
|
|
508
|
-
height:
|
|
504
|
+
img {
|
|
505
|
+
width: 100%;
|
|
506
|
+
height: 100%;
|
|
507
|
+
object-fit: contain;
|
|
509
508
|
}
|
|
510
509
|
`;
|
|
511
510
|
var ContentContainer = styled4__default.default.div`
|
|
@@ -847,7 +846,7 @@ var AssistantMessage = ({
|
|
|
847
846
|
] });
|
|
848
847
|
};
|
|
849
848
|
return /* @__PURE__ */ jsxRuntime.jsxs(MessageContainer, { className, children: [
|
|
850
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarContainer, { children: avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: avatarUrl, alt: "Assistant avatar" }) : /* @__PURE__ */ jsxRuntime.jsx(AvatarInitials, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
849
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarContainer, { children: avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: avatarUrl, alt: "Assistant avatar" }) : /* @__PURE__ */ jsxRuntime.jsx(AvatarInitials, { children: /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: "/assets/avatar-transparent-bg.png", alt: "AI Assistant" }) }) }),
|
|
851
850
|
/* @__PURE__ */ jsxRuntime.jsx(ContentContainer, { children: renderContent() })
|
|
852
851
|
] });
|
|
853
852
|
};
|
|
@@ -1313,7 +1312,8 @@ var InputWrapper = styled4__default.default.div`
|
|
|
1313
1312
|
box-sizing: border-box;
|
|
1314
1313
|
|
|
1315
1314
|
&:focus-within {
|
|
1316
|
-
|
|
1315
|
+
/* Subtle focus indication without bold colored border */
|
|
1316
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
1317
1317
|
background-color: rgba(50, 50, 52, 0.6);
|
|
1318
1318
|
}
|
|
1319
1319
|
`;
|
|
@@ -1567,9 +1567,7 @@ var InputAdapter = ({
|
|
|
1567
1567
|
autoFocus: isVisible,
|
|
1568
1568
|
"aria-label": "Chat message input",
|
|
1569
1569
|
suggestions: [
|
|
1570
|
-
{ text: "
|
|
1571
|
-
{ text: "Identify actionable tasks" },
|
|
1572
|
-
{ text: "Summarize key points" }
|
|
1570
|
+
{ text: "Explore workflows" }
|
|
1573
1571
|
],
|
|
1574
1572
|
onSuggestionSelect: handleSuggestionSelect
|
|
1575
1573
|
}
|
|
@@ -1979,11 +1977,22 @@ var GlobalSidebarStyles = styled4.createGlobalStyle`
|
|
|
1979
1977
|
flex-shrink: 0 !important;
|
|
1980
1978
|
white-space: nowrap !important;
|
|
1981
1979
|
}
|
|
1980
|
+
|
|
1981
|
+
/* Remove teal/cyan outline from all inputs */
|
|
1982
|
+
.copilotKitSidebar input,
|
|
1983
|
+
.copilotKitSidebar input:focus,
|
|
1984
|
+
.copilotKitSidebar input:focus-visible,
|
|
1985
|
+
.copilotKitSidebar textarea,
|
|
1986
|
+
.copilotKitSidebar textarea:focus,
|
|
1987
|
+
.copilotKitSidebar textarea:focus-visible {
|
|
1988
|
+
outline: none !important;
|
|
1989
|
+
outline-color: transparent !important;
|
|
1990
|
+
box-shadow: none !important;
|
|
1991
|
+
}
|
|
1982
1992
|
`;
|
|
1983
1993
|
var StyledChatButton = styled4__default.default.button`
|
|
1984
1994
|
position: fixed;
|
|
1985
|
-
|
|
1986
|
-
bottom: max(88px, calc(env(safe-area-inset-bottom, 80px) + 8px));
|
|
1995
|
+
bottom: 8px;
|
|
1987
1996
|
right: 8px;
|
|
1988
1997
|
width: 36px;
|
|
1989
1998
|
height: 36px;
|
|
@@ -2018,7 +2027,9 @@ function CustomCopilotSidebar({
|
|
|
2018
2027
|
defaultOpen = false,
|
|
2019
2028
|
onSetOpen,
|
|
2020
2029
|
instructions,
|
|
2021
|
-
className
|
|
2030
|
+
className,
|
|
2031
|
+
disabled = false,
|
|
2032
|
+
disabledReason = "Start a free trial to enable AI chat"
|
|
2022
2033
|
}) {
|
|
2023
2034
|
const HeaderAdapterWithClose = (_props) => {
|
|
2024
2035
|
const { setOpen } = reactUi.useChatContext();
|
|
@@ -2034,16 +2045,26 @@ function CustomCopilotSidebar({
|
|
|
2034
2045
|
const CustomButton = (_props) => {
|
|
2035
2046
|
const { open, setOpen } = reactUi.useChatContext();
|
|
2036
2047
|
const handleClick = () => {
|
|
2048
|
+
if (disabled) return;
|
|
2037
2049
|
const newOpenState = !open;
|
|
2038
2050
|
setOpen(newOpenState);
|
|
2039
2051
|
onSetOpen?.(newOpenState);
|
|
2040
2052
|
};
|
|
2053
|
+
const disabledStyles = disabled ? {
|
|
2054
|
+
background: "rgba(100, 100, 100, 0.5)",
|
|
2055
|
+
boxShadow: "none",
|
|
2056
|
+
cursor: "not-allowed",
|
|
2057
|
+
opacity: 0.6
|
|
2058
|
+
} : {};
|
|
2041
2059
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2042
2060
|
StyledChatButton,
|
|
2043
2061
|
{
|
|
2044
2062
|
onClick: handleClick,
|
|
2045
|
-
"aria-label": open ? "Close chat" : "Open chat",
|
|
2063
|
+
"aria-label": disabled ? disabledReason : open ? "Close chat" : "Open chat",
|
|
2064
|
+
"aria-disabled": disabled,
|
|
2065
|
+
title: disabled ? disabledReason : void 0,
|
|
2046
2066
|
type: "button",
|
|
2067
|
+
style: disabledStyles,
|
|
2047
2068
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2048
2069
|
"svg",
|
|
2049
2070
|
{
|
|
@@ -2053,7 +2074,8 @@ function CustomCopilotSidebar({
|
|
|
2053
2074
|
fill: "currentColor",
|
|
2054
2075
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2055
2076
|
role: "img",
|
|
2056
|
-
"aria-
|
|
2077
|
+
"aria-hidden": "true",
|
|
2078
|
+
style: disabled ? { fill: "rgba(255, 255, 255, 0.5)" } : void 0,
|
|
2057
2079
|
children: [
|
|
2058
2080
|
/* @__PURE__ */ jsxRuntime.jsx("title", { children: "Chat" }),
|
|
2059
2081
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z" })
|
|
@@ -2195,8 +2217,8 @@ var InputWrapper2 = styled4__default.default.div`
|
|
|
2195
2217
|
transition: all 0.2s ease;
|
|
2196
2218
|
|
|
2197
2219
|
&:focus-within {
|
|
2198
|
-
border
|
|
2199
|
-
|
|
2220
|
+
/* Subtle focus indication without bold colored border */
|
|
2221
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
2200
2222
|
}
|
|
2201
2223
|
|
|
2202
2224
|
&:hover:not(:focus-within) {
|
|
@@ -2275,8 +2297,7 @@ var SendButton = styled4__default.default.button`
|
|
|
2275
2297
|
}
|
|
2276
2298
|
|
|
2277
2299
|
&:focus-visible {
|
|
2278
|
-
outline:
|
|
2279
|
-
outline-offset: 2px;
|
|
2300
|
+
outline: none;
|
|
2280
2301
|
}
|
|
2281
2302
|
|
|
2282
2303
|
svg {
|