@sybilion/uilib 1.4.26 → 1.4.28

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.
@@ -39,6 +39,7 @@
39
39
  --color-primary-foreground: var(--primary-foreground);
40
40
  --color-primary: var(--primary);
41
41
  --color-brand: var(--brand-color);
42
+ --color-brand-bg: var(--brand-color-bg, var(--brand-color));
42
43
  --color-link: var(--link-color);
43
44
  --color-link-hover: var(--link-color-hover);
44
45
  --color-link-active: var(--link-color-active);
@@ -132,8 +133,8 @@
132
133
  :root {
133
134
  --sb-cyan-50: oklch(0.964 0.006 204);
134
135
  --sb-cyan-100: oklch(0.933 0.011 204);
135
- --sb-cyan-200: oklch(0.76 0.089 204);
136
- --sb-cyan-300: oklch(0.7 0.098 204);
136
+ --sb-cyan-200: oklch(0.882 0.127 204);
137
+ --sb-cyan-300: oklch(0.754 0.181 204);
137
138
  --sb-cyan-400: oklch(0.625 0.234 204);
138
139
  --sb-cyan-500: oklch(0.518 0.258 204);
139
140
  --sb-cyan-600: oklch(0.421 0.231 204);
@@ -297,6 +298,7 @@
297
298
 
298
299
  /* app variables */
299
300
  --brand-color: var(--sb-purple-400);
301
+ --brand-color-bg: var(--brand-color-400);
300
302
  --brand-color-50: var(--sb-purple-50);
301
303
  --brand-color-100: var(--sb-purple-100);
302
304
  --brand-color-200: var(--sb-purple-200);
@@ -353,7 +355,7 @@
353
355
  --sidebar-border: oklch(0.9 0 0);
354
356
  --sidebar-ring: oklch(0.65 0 0);
355
357
 
356
- --link-color: var(--sb-cyan-700);
358
+ --link-color: var(--brand-color);
357
359
  --link-color-hover: color-mix(in oklch, var(--link-color) 80%, black);
358
360
  --link-color-active: color-mix(in oklch, var(--link-color) 65%, black);
359
361
  }
@@ -367,6 +369,7 @@
367
369
  }
368
370
 
369
371
  .dark {
372
+ --brand-color-bg: var(--brand-color-500);
370
373
  --page-color: oklch(0.22 0 0);
371
374
  --page-color-alpha-800: oklch(0.2242 0 0 / 0.8);
372
375
  --background: oklch(0.14 0 0);
@@ -537,9 +540,6 @@
537
540
  }
538
541
 
539
542
  ::selection {
540
- background-color: var(--brand-color-200);
541
- }
542
- .dark ::selection {
543
- background-color: var(--brand-color-800);
543
+ background-color: var(--brand-color-bg, var(--brand-color));
544
544
  }
545
545
  }
@@ -30,8 +30,8 @@ import '@radix-ui/react-slot';
30
30
  import '../../Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js';
31
31
  import '../../Sidebar/SidebarGroupLabel/SidebarGroupLabel.styl.js';
32
32
  import '../../Sidebar/SidebarMenu/SidebarMenu.styl.js';
33
- import '../../SmartTextTruncate/SmartTextTruncate.js';
34
33
  import '../../Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js';
34
+ import '../../SmartTextTruncate/SmartTextTruncate.js';
35
35
  import '../../Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js';
36
36
  import '../../Sidebar/SidebarMenuSub/SidebarMenuSub.styl.js';
37
37
  import '../../Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js';
@@ -137,14 +137,17 @@ function useChatPromptEditor({ disabled, placeholder, slashCommandItems, onSlash
137
137
  if (!editor || prefillMessage == null || prefillMessage === '')
138
138
  return;
139
139
  editor.commands.setContent(chatPromptParagraphDoc(prefillMessage));
140
- const t = editor.getText();
141
- setPlainDraft(t);
140
+ // Derive plainDraft from the prefill text directly: relying on
141
+ // editor.getText() right after setContent can race with onTransaction
142
+ // (which also reads getText), leaving plainDraft empty and the submit
143
+ // button disabled.
144
+ setPlainDraft(prefillMessage);
142
145
  queueMicrotask(() => {
143
146
  const dom = chatPromptSafeEditorDom(editor);
144
147
  if (dom)
145
- syncChatPromptComposerHeight(dom, t);
148
+ syncChatPromptComposerHeight(dom, prefillMessage);
146
149
  if (!disabled && !editor.isDestroyed) {
147
- editor.chain().focus('end').run();
150
+ editor.chain().focus().selectAll().run();
148
151
  }
149
152
  });
150
153
  }, [editor, prefillMessage, disabled]);
@@ -1,6 +1,6 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = ".Logo_root__-IFVw{align-items:center;color:var(--color-foreground);display:flex;gap:8px}.Logo_icon__cE1BI{color:var(--brand-color);display:block;flex-shrink:0;height:24px;width:auto}.Logo_text__YpU3U{font-family:var(--font-family-heading);line-height:48px}.Logo_sm__p25D- .Logo_icon__cE1BI{height:18px}.Logo_sm__p25D- .Logo_text__YpU3U{font-size:var(--text-lg);line-height:36px}.Logo_md__1Y9mG .Logo_icon__cE1BI{height:24px}.Logo_md__1Y9mG .Logo_text__YpU3U{font-size:var(--text-2xl);line-height:48px}.Logo_lg__V9Yy2 .Logo_icon__cE1BI{height:32px}.Logo_lg__V9Yy2 .Logo_text__YpU3U{font-size:var(--text-3xl);line-height:56px}";
3
+ var css_248z = ".Logo_root__-IFVw{align-items:center;color:var(--color-foreground);display:flex;gap:8px}.Logo_icon__cE1BI{color:var(--brand-color-bg,var(--brand-color));display:block;flex-shrink:0;height:24px;width:auto}.Logo_text__YpU3U{font-family:var(--font-family-heading);line-height:48px}.Logo_sm__p25D- .Logo_icon__cE1BI{height:18px}.Logo_sm__p25D- .Logo_text__YpU3U{font-size:var(--text-lg);line-height:36px}.Logo_md__1Y9mG .Logo_icon__cE1BI{height:24px}.Logo_md__1Y9mG .Logo_text__YpU3U{font-size:var(--text-2xl);line-height:48px}.Logo_lg__V9Yy2 .Logo_icon__cE1BI{height:32px}.Logo_lg__V9Yy2 .Logo_text__YpU3U{font-size:var(--text-3xl);line-height:56px}";
4
4
  var S = {"root":"Logo_root__-IFVw","icon":"Logo_icon__cE1BI","text":"Logo_text__YpU3U","sm":"Logo_sm__p25D-","md":"Logo_md__1Y9mG","lg":"Logo_lg__V9Yy2"};
5
5
  styleInject(css_248z);
6
6
 
@@ -1,6 +1,6 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PageFooter_root__TAfX6{display:flex;flex-direction:column;gap:6px;padding:var(--p-5) var(--p-10)}@media (max-width:768px){.PageFooter_root__TAfX6{padding:var(--p-10) var(--p-6)}}.PageFooter_line__OyGA-{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.PageFooter_line__OyGA-:last-child{min-height:55px}.PageFooter_meta__Gvenf{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_copyright__4LFUP{font-size:14px}.PageFooter_links__q5BXo{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_link__mel3N{align-items:center;color:var(--foreground);display:inline-flex;font-size:14px;gap:var(--p-2);text-decoration:none}.PageFooter_link__mel3N:hover{text-decoration:underline}.PageFooter_link__mel3N svg{color:var(--brand-color-400);flex-shrink:0;height:20px;width:20px}.PageFooter_logo__B2SRg{align-items:center;display:flex;font-size:var(--text-2xl);position:relative}.PageFooter_logo__B2SRg a{align-items:center;color:var(--foreground);display:flex;gap:var(--p-2);text-decoration:none}.PageFooter_logo__B2SRg svg{height:24px;width:24px}.PageFooter_version__8pZXn{align-items:center;bottom:5px;color:var(--muted-foreground);display:flex;font-size:14px;left:calc(100% + 10px);opacity:.5;position:absolute;transition:opacity .3s ease-out;white-space:nowrap}.PageFooter_version__8pZXn:before{content:\"v\"}.PageFooter_versionLink__dILP5{color:inherit;text-decoration:none}.PageFooter_logo__B2SRg:hover .PageFooter_version__8pZXn{opacity:1}";
3
+ var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.PageFooter_root__TAfX6{display:flex;flex-direction:column;gap:6px;padding:var(--p-5) var(--p-10)}@media (max-width:768px){.PageFooter_root__TAfX6{padding:var(--p-10) var(--p-6)}}.PageFooter_line__OyGA-{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}.PageFooter_line__OyGA-:last-child{min-height:55px}.PageFooter_meta__Gvenf{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_copyright__4LFUP{font-size:14px}.PageFooter_links__q5BXo{align-items:center;display:flex;flex-wrap:wrap;gap:var(--p-4)}.PageFooter_link__mel3N{align-items:center;color:var(--foreground);display:inline-flex;font-size:14px;gap:var(--p-2);text-decoration:none}.PageFooter_link__mel3N:hover{text-decoration:underline}.PageFooter_link__mel3N svg{color:var(--brand-color-400);flex-shrink:0;height:20px;width:20px}.PageFooter_logo__B2SRg{align-items:center;display:flex;font-size:var(--text-2xl);position:relative}.PageFooter_logo__B2SRg a{align-items:center;color:var(--foreground);display:flex;gap:var(--p-2);text-decoration:none}.PageFooter_logo__B2SRg svg{height:24px;width:24px}.PageFooter_version__8pZXn{align-items:center;bottom:10px;color:var(--muted-foreground);display:flex;font-size:14px;left:calc(100% + 10px);opacity:.5;position:absolute;white-space:nowrap}.PageFooter_version__8pZXn:before{content:\"v\"}@media (min-width:1024px){.PageFooter_version__8pZXn{opacity:0;transition:opacity .1s ease-out}.PageFooter_logo__B2SRg:hover .PageFooter_version__8pZXn{opacity:1}}.PageFooter_versionLink__dILP5{color:inherit;text-decoration:none}.PageFooter_logo__B2SRg:hover .PageFooter_version__8pZXn{opacity:1}";
4
4
  var S = {"root":"PageFooter_root__TAfX6","line":"PageFooter_line__OyGA-","meta":"PageFooter_meta__Gvenf","copyright":"PageFooter_copyright__4LFUP","links":"PageFooter_links__q5BXo","link":"PageFooter_link__mel3N","logo":"PageFooter_logo__B2SRg","version":"PageFooter_version__8pZXn","versionLink":"PageFooter_versionLink__dILP5"};
5
5
  styleInject(css_248z);
6
6
 
@@ -1,16 +1,27 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import cn from 'classnames';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
2
  import { Button } from '../../Button/Button.js';
4
- import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
5
3
  import { ChevronRight } from 'lucide-react';
6
4
  import S from './SidebarMenuButton.styl.js';
5
+ import { Slottable } from '@radix-ui/react-slot';
6
+ import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
7
+ import cn from 'classnames';
7
8
 
8
9
  function SidebarMenuButton({ asChild = false, isActive = false, hasSubItems = false, isExpanded = false, variant = 'ghost', size = 'sm', className, icon, children, addon, ...props }) {
9
10
  const effectiveAsChild = asChild && !hasSubItems;
10
11
  const label = (jsx(SmartTextTruncate, { className: S.sidebarMenuButtonLabel, children: children }));
11
12
  const chevron = hasSubItems ? (jsx("span", { className: cn(S.sidebarMenuButtonChevron, isExpanded && S.expanded), "aria-hidden": "true", children: jsx(ChevronRight, { size: 16 }) })) : null;
12
- const userContent = (jsxs(Fragment, { children: [label, addon] }));
13
- return (jsxs(Button, { asChild: effectiveAsChild, variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, "aria-expanded": hasSubItems ? isExpanded : undefined, className: cn(variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton, S[`size-${size}`], className), ...props, children: [icon, effectiveAsChild ? (userContent) : (jsxs(Fragment, { children: [userContent, chevron] }))] }));
13
+ const buttonClassName = cn(variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton, S[`size-${size}`], className);
14
+ if (effectiveAsChild) {
15
+ // The consumer supplies the root element (e.g. <NavLink/>). Radix Slot
16
+ // requires exactly one element child, so the consumer's element is wrapped
17
+ // in <Slottable/> and icon/addon stay as siblings — Slot clones the
18
+ // consumer's element with Button's props and injects the siblings as its
19
+ // children. SmartTextTruncate is intentionally omitted: wrapping the
20
+ // consumer's element would nest the rendered <a> inside a truncate
21
+ // container and break the slot contract.
22
+ return (jsxs(Button, { asChild: true, variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, className: buttonClassName, ...props, children: [icon, jsx(Slottable, { children: children }), addon] }));
23
+ }
24
+ return (jsxs(Button, { variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, "aria-expanded": hasSubItems ? isExpanded : undefined, className: buttonClassName, ...props, children: [icon, label, addon, chevron] }));
14
25
  }
15
26
 
16
27
  export { SidebarMenuButton };
@@ -1,6 +1,6 @@
1
1
  import styleInject from 'style-inject';
2
2
 
3
- var css_248z = ".SybilionAuthLayout_root__jM5q5{background-color:var(--background);display:flex;height:100vh;width:100%}.SybilionAuthLayout_leftPanel__MoyRZ{display:none}@media (min-width:768px){.SybilionAuthLayout_leftPanel__MoyRZ{background-color:var(--secondary);border-bottom-left-radius:var(--p-6);border-bottom-right-radius:var(--p-1);border-top-left-radius:var(--p-6);border-top-right-radius:var(--p-1);display:flex;height:calc(100% - var(--p-6));margin:var(--p-3) 0 var(--p-3) var(--p-3);overflow:hidden;position:relative;width:50%}.dark .SybilionAuthLayout_leftPanel__MoyRZ{background-color:var(--page-color-alpha-800)}}.SybilionAuthLayout_heroWatermark__jRUVf{align-items:flex-end;bottom:-180px;gap:0;height:500px;justify-content:flex-start;left:-180px;pointer-events:none;position:absolute;width:500px}.SybilionAuthLayout_heroWatermark__jRUVf img,.SybilionAuthLayout_heroWatermark__jRUVf svg{height:100%!important;-o-object-fit:contain;object-fit:contain;-o-object-position:left bottom;object-position:left bottom;width:100%!important}.SybilionAuthLayout_logoContainer__jR7Dw{align-items:center;display:flex;left:0;min-height:94px;padding:16px 48px;position:absolute;top:0;z-index:10}.SybilionAuthLayout_logo__LxBpo{height:24px;width:24px}.SybilionAuthLayout_rightPanel__pKcYC{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center;padding:48px 64px;position:relative}.SybilionAuthLayout_formContainer__xMCFZ{max-width:480px;width:100%}.SybilionAuthLayout_header__OOsdf{margin-bottom:36px}.SybilionAuthLayout_title__iYcZD{color:var(--foreground);font-family:var(--font-family-heading);font-size:30px;font-weight:400;line-height:42px;margin:0 0 6px}.SybilionAuthLayout_subtitle__sWv5p{color:var(--muted-foreground);font-family:Manrope,sans-serif;font-size:14px;font-weight:500;line-height:16px;margin:0}";
3
+ var css_248z = ".SybilionAuthLayout_root__jM5q5{background-color:var(--background);display:flex;height:100vh;width:100%}.SybilionAuthLayout_leftPanel__MoyRZ{display:none}@media (min-width:768px){.SybilionAuthLayout_leftPanel__MoyRZ{background-color:var(--secondary);border-bottom-left-radius:var(--p-6);border-bottom-right-radius:var(--p-1);border-top-left-radius:var(--p-6);border-top-right-radius:var(--p-1);display:flex;height:calc(100% - var(--p-6));margin:var(--p-3) 0 var(--p-3) var(--p-3);overflow:hidden;position:relative;width:50%}.dark .SybilionAuthLayout_leftPanel__MoyRZ{background-color:var(--page-color-alpha-800)}}.SybilionAuthLayout_heroWatermark__jRUVf{align-items:flex-end;bottom:-180px;color:var(--brand-color-bg,var(--brand-color));gap:0;height:500px;justify-content:flex-start;left:-180px;pointer-events:none;position:absolute;width:500px}.SybilionAuthLayout_heroWatermark__jRUVf img,.SybilionAuthLayout_heroWatermark__jRUVf svg{height:100%!important;-o-object-fit:contain;object-fit:contain;-o-object-position:left bottom;object-position:left bottom;width:100%!important}.SybilionAuthLayout_logoContainer__jR7Dw{align-items:center;display:flex;left:0;min-height:94px;padding:16px 48px;position:absolute;top:0;z-index:10}.SybilionAuthLayout_logo__LxBpo{height:24px;width:24px}.SybilionAuthLayout_rightPanel__pKcYC{align-items:center;display:flex;flex:1;flex-direction:column;justify-content:center;padding:48px 64px;position:relative}.SybilionAuthLayout_formContainer__xMCFZ{max-width:480px;width:100%}.SybilionAuthLayout_header__OOsdf{margin-bottom:36px}.SybilionAuthLayout_title__iYcZD{color:var(--foreground);font-family:var(--font-family-heading);font-size:30px;font-weight:400;line-height:42px;margin:0 0 6px}.SybilionAuthLayout_subtitle__sWv5p{color:var(--muted-foreground);font-family:Manrope,sans-serif;font-size:14px;font-weight:500;line-height:16px;margin:0}";
4
4
  var S = {"root":"SybilionAuthLayout_root__jM5q5","leftPanel":"SybilionAuthLayout_leftPanel__MoyRZ","heroWatermark":"SybilionAuthLayout_heroWatermark__jRUVf","logoContainer":"SybilionAuthLayout_logoContainer__jR7Dw","logo":"SybilionAuthLayout_logo__LxBpo","rightPanel":"SybilionAuthLayout_rightPanel__pKcYC","formContainer":"SybilionAuthLayout_formContainer__xMCFZ","header":"SybilionAuthLayout_header__OOsdf","title":"SybilionAuthLayout_title__iYcZD","subtitle":"SybilionAuthLayout_subtitle__sWv5p"};
5
5
  styleInject(css_248z);
6
6
 
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -203,13 +203,16 @@ export function useChatPromptEditor({
203
203
  useEffect(() => {
204
204
  if (!editor || prefillMessage == null || prefillMessage === '') return;
205
205
  editor.commands.setContent(chatPromptParagraphDoc(prefillMessage));
206
- const t = editor.getText();
207
- setPlainDraft(t);
206
+ // Derive plainDraft from the prefill text directly: relying on
207
+ // editor.getText() right after setContent can race with onTransaction
208
+ // (which also reads getText), leaving plainDraft empty and the submit
209
+ // button disabled.
210
+ setPlainDraft(prefillMessage);
208
211
  queueMicrotask(() => {
209
212
  const dom = chatPromptSafeEditorDom(editor);
210
- if (dom) syncChatPromptComposerHeight(dom, t);
213
+ if (dom) syncChatPromptComposerHeight(dom, prefillMessage);
211
214
  if (!disabled && !editor.isDestroyed) {
212
- editor.chain().focus('end').run();
215
+ editor.chain().focus().selectAll().run();
213
216
  }
214
217
  });
215
218
  }, [editor, prefillMessage, disabled]);
@@ -9,7 +9,7 @@
9
9
  flex-shrink 0
10
10
  height 24px
11
11
  width auto
12
- color var(--brand-color)
12
+ color var(--brand-color-bg, var(--brand-color))
13
13
 
14
14
  .text
15
15
  font-family var(--font-family-heading)
@@ -69,7 +69,7 @@
69
69
 
70
70
  .version
71
71
  position absolute
72
- bottom 5px
72
+ bottom 10px
73
73
  left calc(100% + 10px)
74
74
 
75
75
  display flex
@@ -78,12 +78,18 @@
78
78
  font-size 14px
79
79
  color var(--muted-foreground)
80
80
  opacity 0.5
81
- transition opacity 0.3s ease-out
82
81
  white-space nowrap
83
82
 
84
83
  &::before
85
84
  content 'v'
86
85
 
86
+ @media (min-width: unit(DESKTOP, 'px'))
87
+ opacity 0
88
+ transition opacity 0.1s ease-out
89
+
90
+ .logo:hover &
91
+ opacity 1
92
+
87
93
  .versionLink
88
94
  color inherit
89
95
  text-decoration none
@@ -1,11 +1,10 @@
1
- import cn from 'classnames';
2
-
3
1
  import { Button } from '#uilib/components/ui/Button';
4
2
  import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
5
- import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
6
3
  import { ChevronRight } from 'lucide-react';
7
-
8
4
  import S from './SidebarMenuButton.styl';
5
+ import { Slottable } from '@radix-ui/react-slot';
6
+ import { SmartTextTruncate } from '#uilib/components/ui/SmartTextTruncate/SmartTextTruncate';
7
+ import cn from 'classnames';
9
8
 
10
9
  export function SidebarMenuButton({
11
10
  asChild = false,
@@ -45,38 +44,53 @@ export function SidebarMenuButton({
45
44
  </span>
46
45
  ) : null;
47
46
 
48
- const userContent = (
49
- <>
50
- {label}
51
- {addon}
52
- </>
47
+ const buttonClassName = cn(
48
+ variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
49
+ S[`size-${size}`],
50
+ className,
53
51
  );
54
52
 
53
+ if (effectiveAsChild) {
54
+ // The consumer supplies the root element (e.g. <NavLink/>). Radix Slot
55
+ // requires exactly one element child, so the consumer's element is wrapped
56
+ // in <Slottable/> and icon/addon stay as siblings — Slot clones the
57
+ // consumer's element with Button's props and injects the siblings as its
58
+ // children. SmartTextTruncate is intentionally omitted: wrapping the
59
+ // consumer's element would nest the rendered <a> inside a truncate
60
+ // container and break the slot contract.
61
+ return (
62
+ <Button
63
+ asChild
64
+ variant={variant}
65
+ size={size}
66
+ data-slot="sidebar-menu-button"
67
+ data-sidebar="menu-button"
68
+ data-active={isActive}
69
+ className={buttonClassName}
70
+ {...props}
71
+ >
72
+ {icon}
73
+ <Slottable>{children}</Slottable>
74
+ {addon}
75
+ </Button>
76
+ );
77
+ }
78
+
55
79
  return (
56
80
  <Button
57
- asChild={effectiveAsChild}
58
81
  variant={variant}
59
82
  size={size}
60
83
  data-slot="sidebar-menu-button"
61
84
  data-sidebar="menu-button"
62
85
  data-active={isActive}
63
86
  aria-expanded={hasSubItems ? isExpanded : undefined}
64
- className={cn(
65
- variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
66
- S[`size-${size}`],
67
- className,
68
- )}
87
+ className={buttonClassName}
69
88
  {...props}
70
89
  >
71
90
  {icon}
72
- {effectiveAsChild ? (
73
- userContent
74
- ) : (
75
- <>
76
- {userContent}
77
- {chevron}
78
- </>
79
- )}
91
+ {label}
92
+ {addon}
93
+ {chevron}
80
94
  </Button>
81
95
  );
82
96
  }
@@ -34,6 +34,7 @@
34
34
  justify-content flex-start
35
35
  gap 0
36
36
  pointer-events none
37
+ color var(--brand-color-bg, var(--brand-color))
37
38
 
38
39
  svg,
39
40
  img
@@ -111,44 +111,46 @@ export default function ChatAttachmentsDropzonePage() {
111
111
  send to post it. Office and PDF parsers load on demand when you attach
112
112
  those types; PDF also requires <code>allowPdfAttachments</code>.
113
113
  </p>
114
- <ChatChrome
115
- variant="clean"
116
- showResizeHandle={false}
117
- resizeHandle={undefined}
118
- onClose={undefined}
119
- isEmpty={isEmpty}
120
- renderPresets={() => null}
121
- messages={messages}
122
- onQuickReply={() => {}}
123
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
124
- isLoading={isLoading}
125
- scriptContinueLabel={undefined}
126
- onScriptContinue={undefined}
127
- showSyntheticBranchButtons={false}
128
- unusedBranchKeys={[]}
129
- showInlinePresets={false}
130
- isLastMessageFromUser={isLastMessageFromUser}
131
- scrollRef={scrollRef}
132
- effectiveScopeId="docs-chat-attachments-dropzone"
133
- onPromptSubmit={onPromptSubmit}
134
- onChatDeleted={() => {}}
135
- allowedAttachments={TEXT_ATTACHMENT_ACCEPT_PARTS}
136
- allowPdfAttachments
137
- emptyState={{
138
- title: 'Drop a text, Office, or PDF file',
139
- description:
140
- 'Drag a file onto this panel, review it above the composer, then send. DOCX and XLSX are parsed in the browser.',
141
- additionalContent: (
142
- <p style={{ fontSize: 13, opacity: 0.85 }}>
143
- Accepted types include <code>.txt</code>, <code>.csv</code>,{' '}
144
- <code>.md</code>, <code>.json</code>, <code>.docx</code>,{' '}
145
- <code>.xlsx</code>, and more (
146
- {TEXT_ATTACHMENT_ACCEPT_PARTS.length} entries in the text
147
- allowlist).
148
- </p>
149
- ),
150
- }}
151
- />
114
+ <div style={{ minHeight: 600 }}>
115
+ <ChatChrome
116
+ variant="clean"
117
+ showResizeHandle={false}
118
+ resizeHandle={undefined}
119
+ onClose={undefined}
120
+ isEmpty={isEmpty}
121
+ renderPresets={() => null}
122
+ messages={messages}
123
+ onQuickReply={() => {}}
124
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
125
+ isLoading={isLoading}
126
+ scriptContinueLabel={undefined}
127
+ onScriptContinue={undefined}
128
+ showSyntheticBranchButtons={false}
129
+ unusedBranchKeys={[]}
130
+ showInlinePresets={false}
131
+ isLastMessageFromUser={isLastMessageFromUser}
132
+ scrollRef={scrollRef}
133
+ effectiveScopeId="docs-chat-attachments-dropzone"
134
+ onPromptSubmit={onPromptSubmit}
135
+ onChatDeleted={() => {}}
136
+ allowedAttachments={TEXT_ATTACHMENT_ACCEPT_PARTS}
137
+ allowPdfAttachments
138
+ emptyState={{
139
+ title: 'Drop a text, Office, or PDF file',
140
+ description:
141
+ 'Drag a file onto this panel, review it above the composer, then send. DOCX and XLSX are parsed in the browser.',
142
+ additionalContent: (
143
+ <p style={{ fontSize: 13, opacity: 0.85 }}>
144
+ Accepted types include <code>.txt</code>, <code>.csv</code>,{' '}
145
+ <code>.md</code>, <code>.json</code>, <code>.docx</code>,{' '}
146
+ <code>.xlsx</code>, and more (
147
+ {TEXT_ATTACHMENT_ACCEPT_PARTS.length} entries in the text
148
+ allowlist).
149
+ </p>
150
+ ),
151
+ }}
152
+ />
153
+ </div>
152
154
  </PageContentSection>
153
155
  </>
154
156
  );
@@ -172,34 +172,36 @@ export default function ChatComposerPrefillPage() {
172
172
  opens chat with prefill once
173
173
  </li>
174
174
  </ul>
175
- <ChatChrome
176
- variant="clean"
177
- showResizeHandle={false}
178
- resizeHandle={undefined}
179
- onClose={undefined}
180
- isEmpty={isEmpty}
181
- renderPresets={() => null}
182
- messages={messages}
183
- onQuickReply={() => {}}
184
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
185
- isLoading={isLoading}
186
- scriptContinueLabel={undefined}
187
- onScriptContinue={undefined}
188
- showSyntheticBranchButtons={false}
189
- unusedBranchKeys={[]}
190
- showInlinePresets={false}
191
- isLastMessageFromUser={isLastMessageFromUser}
192
- scrollRef={scrollRef}
193
- effectiveScopeId="docs-chat-composer-prefill-inline"
194
- onPromptSubmit={onSubmit}
195
- onChatDeleted={() => {}}
196
- promptPrefill={inlinePrefill}
197
- emptyState={{
198
- title: 'Inline prefill demo',
199
- description:
200
- 'Click “Prefill inline composer” or type below. Portal and ?prompt= use the header ChatSheet.',
201
- }}
202
- />
175
+ <div style={{ minHeight: 600 }}>
176
+ <ChatChrome
177
+ variant="clean"
178
+ showResizeHandle={false}
179
+ resizeHandle={undefined}
180
+ onClose={undefined}
181
+ isEmpty={isEmpty}
182
+ renderPresets={() => null}
183
+ messages={messages}
184
+ onQuickReply={() => {}}
185
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
186
+ isLoading={isLoading}
187
+ scriptContinueLabel={undefined}
188
+ onScriptContinue={undefined}
189
+ showSyntheticBranchButtons={false}
190
+ unusedBranchKeys={[]}
191
+ showInlinePresets={false}
192
+ isLastMessageFromUser={isLastMessageFromUser}
193
+ scrollRef={scrollRef}
194
+ effectiveScopeId="docs-chat-composer-prefill-inline"
195
+ onPromptSubmit={onSubmit}
196
+ onChatDeleted={() => {}}
197
+ promptPrefill={inlinePrefill}
198
+ emptyState={{
199
+ title: 'Inline prefill demo',
200
+ description:
201
+ 'Click “Prefill inline composer” or type below. Portal and ?prompt= use the header ChatSheet.',
202
+ }}
203
+ />
204
+ </div>
203
205
  </PageContentSection>
204
206
  </>
205
207
  );
@@ -3,4 +3,4 @@
3
3
  flex-direction column
4
4
  flex 1
5
5
  // Bounded height so ChatChrome flex column can place presets above the prompt
6
- min-height 480px
6
+ min-height 600px
@@ -117,35 +117,37 @@ export default function ChatSlashCommandsPage() {
117
117
  font-size: 150%;
118
118
  }
119
119
  `}</style>
120
- <ChatChrome
121
- variant="clean"
122
- showResizeHandle={false}
123
- resizeHandle={undefined}
124
- onClose={undefined}
125
- isEmpty={isEmpty}
126
- renderPresets={() => null}
127
- messages={messages}
128
- onQuickReply={() => {}}
129
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
130
- isLoading={isLoading}
131
- scriptContinueLabel={undefined}
132
- onScriptContinue={undefined}
133
- showSyntheticBranchButtons={false}
134
- unusedBranchKeys={[]}
135
- showInlinePresets={false}
136
- isLastMessageFromUser={isLastMessageFromUser}
137
- scrollRef={scrollRef}
138
- effectiveScopeId="docs-chat-slash-inline"
139
- onPromptSubmit={onSubmit}
140
- onChatDeleted={() => {}}
141
- slashCommandItems={DOCS_SLASH_ITEMS}
142
- promptPlaceholder='Ask something or type "/" for demo commands…'
143
- emptyState={{
144
- title: 'Try slash commands',
145
- description:
146
- 'Pick a command from the palette to insert a mention chip with optional className and color.',
147
- }}
148
- />
120
+ <div style={{ minHeight: 600 }}>
121
+ <ChatChrome
122
+ variant="clean"
123
+ showResizeHandle={false}
124
+ resizeHandle={undefined}
125
+ onClose={undefined}
126
+ isEmpty={isEmpty}
127
+ renderPresets={() => null}
128
+ messages={messages}
129
+ onQuickReply={() => {}}
130
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
131
+ isLoading={isLoading}
132
+ scriptContinueLabel={undefined}
133
+ onScriptContinue={undefined}
134
+ showSyntheticBranchButtons={false}
135
+ unusedBranchKeys={[]}
136
+ showInlinePresets={false}
137
+ isLastMessageFromUser={isLastMessageFromUser}
138
+ scrollRef={scrollRef}
139
+ effectiveScopeId="docs-chat-slash-inline"
140
+ onPromptSubmit={onSubmit}
141
+ onChatDeleted={() => {}}
142
+ slashCommandItems={DOCS_SLASH_ITEMS}
143
+ promptPlaceholder='Ask something or type "/" for demo commands…'
144
+ emptyState={{
145
+ title: 'Try slash commands',
146
+ description:
147
+ 'Pick a command from the palette to insert a mention chip with optional className and color.',
148
+ }}
149
+ />
150
+ </div>
149
151
  </PageContentSection>
150
152
  </>
151
153
  );
@@ -139,33 +139,35 @@ export default function ChatUserCsvAttachmentPage() {
139
139
  Load preset-style message + CSV attachment
140
140
  </Button>
141
141
  </p>
142
- <ChatChrome
143
- variant="clean"
144
- showResizeHandle={false}
145
- resizeHandle={undefined}
146
- onClose={undefined}
147
- isEmpty={isEmpty}
148
- renderPresets={() => null}
149
- messages={messages}
150
- onQuickReply={() => {}}
151
- suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
152
- isLoading={isLoading}
153
- scriptContinueLabel={undefined}
154
- onScriptContinue={undefined}
155
- showSyntheticBranchButtons={false}
156
- unusedBranchKeys={[]}
157
- showInlinePresets={false}
158
- isLastMessageFromUser={isLastMessageFromUser}
159
- scrollRef={scrollRef}
160
- effectiveScopeId="docs-chat-user-csv"
161
- onPromptSubmit={onSubmit}
162
- onChatDeleted={() => {}}
163
- emptyState={{
164
- title: 'CSV attachment demo',
165
- description:
166
- 'Click the button above or send any message. The CSV row uses the same UI as dashboard presets.',
167
- }}
168
- />
142
+ <div style={{ minHeight: 600 }}>
143
+ <ChatChrome
144
+ variant="clean"
145
+ showResizeHandle={false}
146
+ resizeHandle={undefined}
147
+ onClose={undefined}
148
+ isEmpty={isEmpty}
149
+ renderPresets={() => null}
150
+ messages={messages}
151
+ onQuickReply={() => {}}
152
+ suppressedQuickReplyKeys={NO_QUICK_REPLY_KEYS}
153
+ isLoading={isLoading}
154
+ scriptContinueLabel={undefined}
155
+ onScriptContinue={undefined}
156
+ showSyntheticBranchButtons={false}
157
+ unusedBranchKeys={[]}
158
+ showInlinePresets={false}
159
+ isLastMessageFromUser={isLastMessageFromUser}
160
+ scrollRef={scrollRef}
161
+ effectiveScopeId="docs-chat-user-csv"
162
+ onPromptSubmit={onSubmit}
163
+ onChatDeleted={() => {}}
164
+ emptyState={{
165
+ title: 'CSV attachment demo',
166
+ description:
167
+ 'Click the button above or send any message. The CSV row uses the same UI as dashboard presets.',
168
+ }}
169
+ />
170
+ </div>
169
171
  </PageContentSection>
170
172
  </>
171
173
  );
@@ -43,6 +43,7 @@ const SEMANTIC_TOKENS = [
43
43
  '--muted',
44
44
  '--border',
45
45
  '--brand-color',
46
+ '--brand-color-bg',
46
47
  '--link-color',
47
48
  '--link-color-hover',
48
49
  '--link-color-active',