@dust-tt/sparkle 0.5.21 → 0.7.0
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/cjs/index.js +9 -8
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/components/ConversationListItem.d.ts +38 -0
- package/dist/esm/components/ConversationListItem.d.ts.map +1 -0
- package/dist/esm/components/ConversationListItem.js +37 -0
- package/dist/esm/components/ConversationListItem.js.map +1 -0
- package/dist/esm/components/ConversationMessage.js +1 -1
- package/dist/esm/components/ListItem.d.ts +4 -1
- package/dist/esm/components/ListItem.d.ts.map +1 -1
- package/dist/esm/components/ListItem.js +42 -2
- package/dist/esm/components/ListItem.js.map +1 -1
- package/dist/esm/components/NavigationList.d.ts.map +1 -1
- package/dist/esm/components/NavigationList.js +22 -14
- package/dist/esm/components/NavigationList.js.map +1 -1
- package/dist/esm/components/Sheet.js +1 -1
- package/dist/esm/components/Sheet.js.map +1 -1
- package/dist/esm/components/SidebarLayout.d.ts.map +1 -1
- package/dist/esm/components/SidebarLayout.js +17 -36
- package/dist/esm/components/SidebarLayout.js.map +1 -1
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/lottie/collapseBar.d.ts +1 -1
- package/dist/esm/lottie/dragArea.d.ts +32 -32
- package/dist/esm/lottie/spinnerColor.d.ts +64 -64
- package/dist/esm/lottie/spinnerColorLG.d.ts +133 -133
- package/dist/esm/lottie/spinnerColorXS.d.ts +11 -11
- package/dist/esm/lottie/spinnerDark.d.ts +72 -72
- package/dist/esm/lottie/spinnerDarkLG.d.ts +134 -134
- package/dist/esm/lottie/spinnerDarkXS.d.ts +22 -22
- package/dist/esm/lottie/spinnerLight.d.ts +9 -9
- package/dist/esm/lottie/spinnerLightLG.d.ts +10 -10
- package/dist/esm/lottie/spinnerLightXS.d.ts +22 -22
- package/dist/esm/stories/ConversationListItem.stories.d.ts +12 -0
- package/dist/esm/stories/ConversationListItem.stories.d.ts.map +1 -0
- package/dist/esm/stories/ConversationListItem.stories.js +60 -0
- package/dist/esm/stories/ConversationListItem.stories.js.map +1 -0
- package/dist/esm/styles/allotment.css +14 -36
- package/dist/esm/styles/global.css +2 -0
- package/dist/esm/styles/global_with_tw_base.css +2 -0
- package/dist/sparkle.css +26 -16
- package/package.json +1 -1
- package/src/components/ConversationListItem.tsx +125 -0
- package/src/components/ConversationMessage.tsx +1 -1
- package/src/components/ListItem.tsx +73 -5
- package/src/components/NavigationList.tsx +38 -27
- package/src/components/Sheet.tsx +1 -1
- package/src/components/SidebarLayout.tsx +21 -43
- package/src/components/index.ts +2 -0
- package/src/styles/allotment.css +14 -36
- package/src/styles/global.css +2 -0
- package/src/styles/global_with_tw_base.css +2 -0
|
@@ -29,7 +29,7 @@ export const ConversationContainer = React.forwardRef<
|
|
|
29
29
|
)}
|
|
30
30
|
{...props}
|
|
31
31
|
>
|
|
32
|
-
<div className="s-flex s-w-full s-max-w-
|
|
32
|
+
<div className="s-flex s-w-full s-max-w-4xl s-flex-col s-gap-6 s-p-2 @sm/conversation:s-gap-8 @md/conversation:s-gap-10">
|
|
33
33
|
{children}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
@@ -96,17 +96,85 @@ export function ListGroup({ children, className }: ListGroupProps) {
|
|
|
96
96
|
type ListItemSectionProps = {
|
|
97
97
|
children: ReactNode;
|
|
98
98
|
className?: string;
|
|
99
|
+
size?: "xs" | "sm";
|
|
100
|
+
action?: ReactNode;
|
|
101
|
+
onClick?: () => void;
|
|
99
102
|
};
|
|
100
103
|
|
|
101
|
-
|
|
104
|
+
const listItemSectionVariants = cva("", {
|
|
105
|
+
variants: {
|
|
106
|
+
size: {
|
|
107
|
+
xs: "s-heading-xs s-uppercase s-pb-2 s-pt-4 s-text-muted-foreground dark:s-text-muted-foreground-night",
|
|
108
|
+
sm: "s-heading-sm s-bg-muted-background s-p-2 dark:s-bg-muted-background-night/50 s-text-foreground dark:s-text-foreground-night",
|
|
109
|
+
},
|
|
110
|
+
interactive: {
|
|
111
|
+
true: cn(
|
|
112
|
+
"s-cursor-pointer s-transition s-duration-200",
|
|
113
|
+
"active:s-bg-primary-100 dark:active:s-bg-primary-100-night"
|
|
114
|
+
),
|
|
115
|
+
false: "",
|
|
116
|
+
},
|
|
117
|
+
isHovered: {
|
|
118
|
+
true: "hover:s-bg-primary-100 hover:dark:s-bg-primary-100-night active:s-bg-primary-150 active:dark:s-bg-primary-150-night",
|
|
119
|
+
false: "",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
defaultVariants: {
|
|
123
|
+
size: "xs",
|
|
124
|
+
interactive: false,
|
|
125
|
+
isHovered: false,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export function ListItemSection({
|
|
130
|
+
children,
|
|
131
|
+
className,
|
|
132
|
+
size = "xs",
|
|
133
|
+
action,
|
|
134
|
+
onClick,
|
|
135
|
+
}: ListItemSectionProps) {
|
|
136
|
+
const [isHoveringAction, setIsHoveringAction] = React.useState(false);
|
|
137
|
+
const [isHoveringMain, setIsHoveringMain] = React.useState(false);
|
|
138
|
+
|
|
102
139
|
return (
|
|
103
|
-
<
|
|
140
|
+
<div
|
|
104
141
|
className={cn(
|
|
105
|
-
|
|
142
|
+
listItemSectionVariants({
|
|
143
|
+
size,
|
|
144
|
+
interactive: !!onClick,
|
|
145
|
+
isHovered: !!onClick && isHoveringMain && !isHoveringAction,
|
|
146
|
+
}),
|
|
147
|
+
"s-group/section-item s-flex s-items-center s-justify-between",
|
|
106
148
|
className
|
|
107
149
|
)}
|
|
150
|
+
onClick={onClick}
|
|
151
|
+
onMouseEnter={() => {
|
|
152
|
+
setIsHoveringMain(true);
|
|
153
|
+
}}
|
|
154
|
+
onMouseLeave={() => {
|
|
155
|
+
setIsHoveringMain(false);
|
|
156
|
+
setIsHoveringAction(false);
|
|
157
|
+
}}
|
|
108
158
|
>
|
|
109
|
-
|
|
110
|
-
|
|
159
|
+
<div className="s-flex s-items-center s-gap-1 s-overflow-hidden s-text-ellipsis">
|
|
160
|
+
{children}
|
|
161
|
+
</div>
|
|
162
|
+
{action && (
|
|
163
|
+
<div
|
|
164
|
+
className="s-flex s-gap-1"
|
|
165
|
+
onClick={(e) => {
|
|
166
|
+
e.stopPropagation();
|
|
167
|
+
}}
|
|
168
|
+
onMouseEnter={() => {
|
|
169
|
+
setIsHoveringAction(true);
|
|
170
|
+
}}
|
|
171
|
+
onMouseLeave={() => {
|
|
172
|
+
setIsHoveringAction(false);
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
{action}
|
|
176
|
+
</div>
|
|
177
|
+
)}
|
|
178
|
+
</div>
|
|
111
179
|
);
|
|
112
180
|
}
|
|
@@ -130,6 +130,7 @@ const NavigationListItem = React.forwardRef<
|
|
|
130
130
|
|
|
131
131
|
const shouldShowStatusDot = status !== "idle";
|
|
132
132
|
const counterValue = count && count > 0 ? count : undefined;
|
|
133
|
+
const shouldHideStatusIndicators = Boolean(moreMenu && selected);
|
|
133
134
|
|
|
134
135
|
return (
|
|
135
136
|
<div
|
|
@@ -166,26 +167,28 @@ const NavigationListItem = React.forwardRef<
|
|
|
166
167
|
{icon && <Icon visual={icon} size="xs" className="s-m-0.5" />}
|
|
167
168
|
{avatar}
|
|
168
169
|
{label && (
|
|
169
|
-
<span className="s-grow s-overflow-hidden s-text-ellipsis s-whitespace-nowrap group-hover/menu-item:s-pr-8 group-data-[selected=true]/menu-item:s-pr-8">
|
|
170
|
+
<span className="s-grow s-overflow-hidden s-text-ellipsis s-whitespace-nowrap group-hover/menu-item:s-pr-8 group-focus-within/menu-item:s-pr-8 group-data-[selected=true]/menu-item:s-pr-8">
|
|
170
171
|
{label}
|
|
171
172
|
</span>
|
|
172
173
|
)}
|
|
173
|
-
{counterValue && (
|
|
174
|
+
{counterValue !== undefined && !shouldHideStatusIndicators && (
|
|
174
175
|
<Counter
|
|
175
176
|
value={counterValue}
|
|
176
177
|
size="xs"
|
|
177
178
|
variant="outline"
|
|
178
179
|
className={cn(
|
|
179
180
|
"s-flex-shrink-0 s-translate-x-0.5",
|
|
180
|
-
moreMenu &&
|
|
181
|
+
moreMenu &&
|
|
182
|
+
"group-hover/menu-item:s-hidden group-focus-within/menu-item:s-hidden"
|
|
181
183
|
)}
|
|
182
184
|
/>
|
|
183
185
|
)}
|
|
184
|
-
{shouldShowStatusDot && (
|
|
186
|
+
{shouldShowStatusDot && !shouldHideStatusIndicators && (
|
|
185
187
|
<div
|
|
186
188
|
className={cn(
|
|
187
189
|
"s-heading-xs s-flex s-flex-shrink-0 s-items-center s-justify-center s-rounded-full",
|
|
188
|
-
moreMenu &&
|
|
190
|
+
moreMenu &&
|
|
191
|
+
"group-hover/menu-item:s-hidden group-focus-within/menu-item:s-hidden",
|
|
189
192
|
getStatusDotColor()
|
|
190
193
|
)}
|
|
191
194
|
/>
|
|
@@ -213,7 +216,7 @@ const NavigationListItemAction = React.forwardRef<
|
|
|
213
216
|
data-sidebar="menu-action"
|
|
214
217
|
className={cn(
|
|
215
218
|
"s-absolute s-right-2 s-top-1.5 s-opacity-0 s-transition-opacity",
|
|
216
|
-
"s-opacity-0 group-focus-within/menu-item:s-opacity-100 group-hover/menu-item:s-opacity-100
|
|
219
|
+
"s-opacity-0 group-focus-within/menu-item:s-opacity-100 group-hover/menu-item:s-opacity-100",
|
|
217
220
|
className
|
|
218
221
|
)}
|
|
219
222
|
{...props}
|
|
@@ -384,32 +387,34 @@ const NavigationListCollapsibleSection = React.forwardRef<
|
|
|
384
387
|
) => {
|
|
385
388
|
const isCollapsible = type !== "static";
|
|
386
389
|
const labelElement = (
|
|
387
|
-
<div className=
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
onClick={(e) => {
|
|
400
|
-
e.stopPropagation();
|
|
401
|
-
}}
|
|
402
|
-
>
|
|
403
|
-
{action}
|
|
404
|
-
</div>
|
|
390
|
+
<div className={collapseableStyles({ variant, isCollapsible })}>
|
|
391
|
+
{label}
|
|
392
|
+
</div>
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
const actionElement = action && (
|
|
396
|
+
<div
|
|
397
|
+
className={cn(
|
|
398
|
+
"s-m-1.5 s-flex s-gap-1 s-pr-0.5 s-transition-opacity",
|
|
399
|
+
actionOnHover
|
|
400
|
+
? "s-opacity-0 hover:s-opacity-100 group-focus-within/menu-item:s-opacity-100 group-hover/menu-item:s-opacity-100"
|
|
401
|
+
: "s-opacity-100"
|
|
405
402
|
)}
|
|
403
|
+
onClick={(e) => {
|
|
404
|
+
e.stopPropagation();
|
|
405
|
+
}}
|
|
406
|
+
>
|
|
407
|
+
{action}
|
|
406
408
|
</div>
|
|
407
409
|
);
|
|
408
410
|
|
|
409
411
|
if (type === "static") {
|
|
410
412
|
return (
|
|
411
413
|
<div ref={ref} className={className} {...props}>
|
|
412
|
-
|
|
414
|
+
<div className="s-group/menu-item s-relative s-mt-2 s-flex s-flex-1 s-items-center s-justify-start s-gap-1">
|
|
415
|
+
{labelElement}
|
|
416
|
+
{actionElement}
|
|
417
|
+
</div>
|
|
413
418
|
<div className="s-flex s-flex-col s-gap-0.5">{children}</div>
|
|
414
419
|
</div>
|
|
415
420
|
);
|
|
@@ -425,7 +430,10 @@ const NavigationListCollapsibleSection = React.forwardRef<
|
|
|
425
430
|
if (type === "collapseAndScroll") {
|
|
426
431
|
return (
|
|
427
432
|
<Collapsible ref={ref} className={className} {...collapsibleProps}>
|
|
428
|
-
<
|
|
433
|
+
<div className="s-group/menu-item s-relative s-mt-2 s-flex s-flex-1 s-items-center s-justify-start s-gap-1">
|
|
434
|
+
<CollapsibleTrigger hideChevron>{labelElement}</CollapsibleTrigger>
|
|
435
|
+
{actionElement}
|
|
436
|
+
</div>
|
|
429
437
|
<CollapsibleContent>
|
|
430
438
|
<ScrollArea>
|
|
431
439
|
<div className="s-flex s-flex-col s-gap-0.5">{children}</div>
|
|
@@ -439,7 +447,10 @@ const NavigationListCollapsibleSection = React.forwardRef<
|
|
|
439
447
|
// type === "collapse" (default collapsible behavior)
|
|
440
448
|
return (
|
|
441
449
|
<Collapsible ref={ref} className={className} {...collapsibleProps}>
|
|
442
|
-
<
|
|
450
|
+
<div className="s-group/menu-item s-relative s-mt-2 s-flex s-flex-1 s-items-center s-justify-start s-gap-1">
|
|
451
|
+
<CollapsibleTrigger hideChevron>{labelElement}</CollapsibleTrigger>
|
|
452
|
+
{actionElement}
|
|
453
|
+
</div>
|
|
443
454
|
<CollapsibleContent>
|
|
444
455
|
<div className="s-flex s-flex-col s-gap-0.5">{children}</div>
|
|
445
456
|
</CollapsibleContent>
|
package/src/components/Sheet.tsx
CHANGED
|
@@ -191,7 +191,7 @@ const SheetHeader = ({
|
|
|
191
191
|
{...props}
|
|
192
192
|
>
|
|
193
193
|
{children}
|
|
194
|
-
<SheetClose asChild className="s-absolute s-right-3">
|
|
194
|
+
<SheetClose asChild className="s-absolute s-right-3 s-top-4">
|
|
195
195
|
{!hideButton && <Button icon={XMarkIcon} variant="ghost" size="sm" />}
|
|
196
196
|
</SheetClose>
|
|
197
197
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import "../styles/allotment.css";
|
|
4
4
|
|
|
5
|
-
import { Allotment } from "allotment";
|
|
5
|
+
import { Allotment, LayoutPriority } from "allotment";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
|
|
8
8
|
import { customColors } from "@sparkle/lib/colors";
|
|
@@ -58,7 +58,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
58
58
|
sidebar,
|
|
59
59
|
content,
|
|
60
60
|
defaultSidebarWidth = 280,
|
|
61
|
-
minSidebarWidth
|
|
61
|
+
minSidebarWidth = 200,
|
|
62
62
|
maxSidebarWidth = 400,
|
|
63
63
|
collapsible = true,
|
|
64
64
|
onSidebarToggle,
|
|
@@ -71,8 +71,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
71
71
|
const allotmentRef = React.useRef<React.ComponentRef<typeof Allotment>>(null);
|
|
72
72
|
const [isSidebarCollapsed, setIsSidebarCollapsed] = React.useState(false);
|
|
73
73
|
const [isHovering, setIsHovering] = React.useState(false);
|
|
74
|
-
const [
|
|
75
|
-
React.useState(defaultSidebarWidth);
|
|
74
|
+
const [sidebarWidth, setSidebarWidth] = React.useState(defaultSidebarWidth);
|
|
76
75
|
const isTogglingRef = React.useRef(false);
|
|
77
76
|
|
|
78
77
|
// Toggle sidebar function
|
|
@@ -80,10 +79,10 @@ export const SidebarLayout = React.forwardRef<
|
|
|
80
79
|
if (allotmentRef.current) {
|
|
81
80
|
isTogglingRef.current = true;
|
|
82
81
|
if (isSidebarCollapsed) {
|
|
83
|
-
// Expand to last stored
|
|
82
|
+
// Expand to last stored width - use requestAnimationFrame to ensure size is set correctly
|
|
84
83
|
requestAnimationFrame(() => {
|
|
85
84
|
if (allotmentRef.current) {
|
|
86
|
-
allotmentRef.current.resize([
|
|
85
|
+
allotmentRef.current.resize([sidebarWidth]);
|
|
87
86
|
}
|
|
88
87
|
});
|
|
89
88
|
setIsSidebarCollapsed(false);
|
|
@@ -101,7 +100,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
101
100
|
isTogglingRef.current = false;
|
|
102
101
|
}, 300);
|
|
103
102
|
}
|
|
104
|
-
}, [isSidebarCollapsed,
|
|
103
|
+
}, [isSidebarCollapsed, sidebarWidth, onSidebarToggle]);
|
|
105
104
|
|
|
106
105
|
// Handle hover reveal when collapsed
|
|
107
106
|
const handleLeftEdgeHover = React.useCallback(() => {
|
|
@@ -121,38 +120,13 @@ export const SidebarLayout = React.forwardRef<
|
|
|
121
120
|
// Handle size changes from Allotment
|
|
122
121
|
const handleChange = React.useCallback(
|
|
123
122
|
(sizes: number[]) => {
|
|
124
|
-
|
|
123
|
+
const sidebarSize = sizes[0] ?? 0;
|
|
125
124
|
const wasCollapsed = isSidebarCollapsed;
|
|
126
125
|
const nowCollapsed = sidebarSize === 0;
|
|
127
126
|
|
|
128
|
-
//
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
!wasCollapsed &&
|
|
132
|
-
sidebarSize > 0 &&
|
|
133
|
-
sidebarSize < 220 &&
|
|
134
|
-
collapsible
|
|
135
|
-
) {
|
|
136
|
-
// Clamp to 220px minimum
|
|
137
|
-
sidebarSize = 220;
|
|
138
|
-
if (allotmentRef.current) {
|
|
139
|
-
allotmentRef.current.resize([sidebarSize]);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Track manual resize (not from toggle or hover)
|
|
144
|
-
// Only save size when:
|
|
145
|
-
// - Not toggling
|
|
146
|
-
// - Not hovering
|
|
147
|
-
// - Sidebar is visible (not collapsed)
|
|
148
|
-
// - Size is greater than 0
|
|
149
|
-
if (
|
|
150
|
-
!isTogglingRef.current &&
|
|
151
|
-
!isHovering &&
|
|
152
|
-
sidebarSize > 0 &&
|
|
153
|
-
!wasCollapsed
|
|
154
|
-
) {
|
|
155
|
-
setLastSidebarSize(sidebarSize);
|
|
127
|
+
// Track sidebar width whenever it changes (when not toggling and not collapsed)
|
|
128
|
+
if (!isTogglingRef.current && !wasCollapsed && sidebarSize > 0) {
|
|
129
|
+
setSidebarWidth(sidebarSize);
|
|
156
130
|
}
|
|
157
131
|
|
|
158
132
|
// Only update collapsed state if it's from toggle button
|
|
@@ -165,7 +139,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
165
139
|
onSidebarToggle?.(nowCollapsed);
|
|
166
140
|
}
|
|
167
141
|
},
|
|
168
|
-
[isSidebarCollapsed,
|
|
142
|
+
[isSidebarCollapsed, onSidebarToggle]
|
|
169
143
|
);
|
|
170
144
|
|
|
171
145
|
// Expose methods via ref
|
|
@@ -190,7 +164,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
190
164
|
isTogglingRef.current = true;
|
|
191
165
|
requestAnimationFrame(() => {
|
|
192
166
|
if (allotmentRef.current) {
|
|
193
|
-
allotmentRef.current.resize([
|
|
167
|
+
allotmentRef.current.resize([sidebarWidth]);
|
|
194
168
|
}
|
|
195
169
|
});
|
|
196
170
|
setIsSidebarCollapsed(false);
|
|
@@ -202,7 +176,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
202
176
|
}
|
|
203
177
|
},
|
|
204
178
|
}),
|
|
205
|
-
[toggleSidebar, isSidebarCollapsed,
|
|
179
|
+
[toggleSidebar, isSidebarCollapsed, sidebarWidth, onSidebarToggle]
|
|
206
180
|
);
|
|
207
181
|
|
|
208
182
|
return (
|
|
@@ -223,6 +197,7 @@ export const SidebarLayout = React.forwardRef<
|
|
|
223
197
|
> .allotment-module_splitViewContainer__rQnVa
|
|
224
198
|
> .allotment-module_splitViewView__MGZ6O:not(:first-child)::before {
|
|
225
199
|
width: 1px;
|
|
200
|
+
transition: width 200ms, background-color 200ms;
|
|
226
201
|
}
|
|
227
202
|
`}</style>
|
|
228
203
|
{/* Hover zone when collapsed */}
|
|
@@ -253,15 +228,15 @@ export const SidebarLayout = React.forwardRef<
|
|
|
253
228
|
<Allotment
|
|
254
229
|
ref={allotmentRef}
|
|
255
230
|
vertical={false}
|
|
231
|
+
proportionalLayout={false}
|
|
256
232
|
onChange={handleChange}
|
|
257
233
|
className="s-h-full s-w-full"
|
|
258
234
|
>
|
|
259
235
|
{/* Always render sidebar pane, but keep at width 0 when collapsed */}
|
|
260
236
|
<Allotment.Pane
|
|
261
|
-
minSize={
|
|
237
|
+
minSize={minSidebarWidth}
|
|
262
238
|
maxSize={maxSidebarWidth}
|
|
263
|
-
preferredSize={isSidebarCollapsed ? 0 :
|
|
264
|
-
snap={collapsible}
|
|
239
|
+
preferredSize={isSidebarCollapsed ? 0 : sidebarWidth}
|
|
265
240
|
className={cn(
|
|
266
241
|
"s-flex s-flex-col s-overflow-hidden",
|
|
267
242
|
sidebarClassName
|
|
@@ -273,7 +248,10 @@ export const SidebarLayout = React.forwardRef<
|
|
|
273
248
|
)}
|
|
274
249
|
</Allotment.Pane>
|
|
275
250
|
|
|
276
|
-
<Allotment.Pane
|
|
251
|
+
<Allotment.Pane
|
|
252
|
+
priority={LayoutPriority.High}
|
|
253
|
+
className={cn("s-flex s-flex-col", contentClassName)}
|
|
254
|
+
>
|
|
277
255
|
<div className="s-flex s-h-full s-w-full s-flex-col">{content}</div>
|
|
278
256
|
</Allotment.Pane>
|
|
279
257
|
</Allotment>
|
package/src/components/index.ts
CHANGED
|
@@ -44,6 +44,8 @@ export {
|
|
|
44
44
|
ContentMessageInline,
|
|
45
45
|
} from "./ContentMessage";
|
|
46
46
|
export { ContextItem } from "./ContextItem";
|
|
47
|
+
export type { ConversationListItemProps, ReplySectionProps } from "./ConversationListItem";
|
|
48
|
+
export { ConversationListItem, ReplySection } from "./ConversationListItem";
|
|
47
49
|
export {
|
|
48
50
|
ConversationContainer,
|
|
49
51
|
ConversationMessage,
|
package/src/styles/allotment.css
CHANGED
|
@@ -17,37 +17,28 @@
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.allotment-module_splitView__L-yRc
|
|
21
|
-
> .allotment-module_sashContainer__fzwJF
|
|
22
|
-
> .allotment-module_sash__QA-2t {
|
|
20
|
+
.allotment-module_splitView__L-yRc > .allotment-module_sashContainer__fzwJF > .allotment-module_sash__QA-2t {
|
|
23
21
|
pointer-events: auto;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
.allotment-module_splitView__L-yRc
|
|
27
|
-
> .allotment-module_splitViewContainer__rQnVa {
|
|
24
|
+
.allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa {
|
|
28
25
|
height: 100%;
|
|
29
26
|
position: relative;
|
|
30
27
|
white-space: nowrap;
|
|
31
28
|
width: 100%;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
|
-
.allotment-module_splitView__L-yRc
|
|
35
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
36
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
31
|
+
.allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
37
32
|
overflow: hidden;
|
|
38
33
|
position: absolute;
|
|
39
34
|
white-space: initial;
|
|
40
35
|
}
|
|
41
36
|
|
|
42
|
-
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa
|
|
43
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
44
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
37
|
+
.allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
45
38
|
width: 100%;
|
|
46
39
|
}
|
|
47
40
|
|
|
48
|
-
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8
|
|
49
|
-
> .allotment-module_splitViewContainer__rQnVa
|
|
50
|
-
> .allotment-module_splitViewView__MGZ6O {
|
|
41
|
+
.allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8 > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
|
|
51
42
|
height: 100%;
|
|
52
43
|
}
|
|
53
44
|
|
|
@@ -138,8 +129,7 @@
|
|
|
138
129
|
height: var(--sash-size);
|
|
139
130
|
}
|
|
140
131
|
|
|
141
|
-
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx)
|
|
142
|
-
> .sash-module_orthogonal-drag-handle__Yii2- {
|
|
132
|
+
.sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2- {
|
|
143
133
|
content: " ";
|
|
144
134
|
height: calc(var(--sash-size) * 2);
|
|
145
135
|
width: calc(var(--sash-size) * 2);
|
|
@@ -149,48 +139,36 @@
|
|
|
149
139
|
position: absolute;
|
|
150
140
|
}
|
|
151
141
|
|
|
152
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
153
|
-
.sash-module_disabled__Hm-wx
|
|
154
|
-
)
|
|
142
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)
|
|
155
143
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,
|
|
156
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
157
|
-
.sash-module_disabled__Hm-wx
|
|
158
|
-
)
|
|
144
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)
|
|
159
145
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
160
146
|
cursor: nwse-resize;
|
|
161
147
|
}
|
|
162
148
|
|
|
163
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(
|
|
164
|
-
.sash-module_disabled__Hm-wx
|
|
165
|
-
)
|
|
149
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx)
|
|
166
150
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,
|
|
167
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(
|
|
168
|
-
.sash-module_disabled__Hm-wx
|
|
169
|
-
)
|
|
151
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx)
|
|
170
152
|
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
171
153
|
cursor: nesw-resize;
|
|
172
154
|
}
|
|
173
155
|
|
|
174
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
175
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
156
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
176
157
|
left: calc(var(--sash-size) * -0.5);
|
|
177
158
|
top: calc(var(--sash-size) * -1);
|
|
178
159
|
}
|
|
179
160
|
|
|
180
|
-
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs
|
|
181
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
161
|
+
.sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
182
162
|
left: calc(var(--sash-size) * -0.5);
|
|
183
163
|
bottom: calc(var(--sash-size) * -1);
|
|
184
164
|
}
|
|
185
165
|
|
|
186
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
187
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
166
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
|
|
188
167
|
top: calc(var(--sash-size) * -0.5);
|
|
189
168
|
left: calc(var(--sash-size) * -1);
|
|
190
169
|
}
|
|
191
170
|
|
|
192
|
-
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw
|
|
193
|
-
> .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
171
|
+
.sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
|
|
194
172
|
top: calc(var(--sash-size) * -0.5);
|
|
195
173
|
right: calc(var(--sash-size) * -1);
|
|
196
174
|
}
|
package/src/styles/global.css
CHANGED