xertica-ui 2.9.9 → 3.0.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/CHANGELOG.md CHANGED
@@ -11,6 +11,19 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
12
  ---
13
13
 
14
+ ## [3.0.0] — 2026-07-17
15
+
16
+ ### Fixed
17
+
18
+ - **Scroll da `Sidebar` aparecia com a barra nativa do navegador, "colorida" e destoante do fundo escuro** — os containers de navegação com scroll real (variante `assistant` e o acordeão de overflow no mobile) usavam `overflowY: 'auto'` puro, sem nenhum estilo de scrollbar. Corrigido aplicando as utilities nativas do Tailwind v4 `scrollbar-thin scrollbar-thumb-sidebar-border scrollbar-track-transparent`, usando o token `--sidebar-border` (que resolve para um overlay de baixa opacidade sobre o fundo da sidebar em todos os 10 temas de marca), deixando o scroll discreto em qualquer tema.
19
+ - **Botão de filtro da `Sidebar.Search` perdia contraste no hover** — herdava o `hover:text-accent-foreground` (cor escura, pensada para superfícies claras) da variante `ghost` do `Button`, por sobrescrever apenas o `hover:bg-*` e não o `hover:text-*`. Corrigido adicionando `hover:text-sidebar-foreground` explicitamente, no mesmo padrão já usado pelo botão de "mais opções".
20
+
21
+ ### Changed
22
+
23
+ - **Largura padrão da `Sidebar` expandida aumentada de 256px para 320px** (`LayoutContext`), com o fallback standalone de `Sidebar.Root` (fora de um `LayoutProvider`) também atualizado de 280px para 320px para manter os dois caminhos consistentes.
24
+
25
+ ---
26
+
14
27
  ## [2.9.9] — 2026-07-14
15
28
 
16
29
  ### Fixed
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
4
4
 
5
- [![npm version](https://img.shields.io/badge/npm-2.9.9-blue)](https://www.npmjs.com/package/xertica-ui)
5
+ [![npm version](https://img.shields.io/badge/npm-3.0.0-blue)](https://www.npmjs.com/package/xertica-ui)
6
6
  [![license](https://img.shields.io/badge/license-proprietary-red)](./LICENSE)
7
7
 
8
8
  ---
@@ -86,8 +86,8 @@ export const Default: Story = {
86
86
  const { sidebarWidth: contextWidth } = useLayout();
87
87
  const [isExpanded, setIsExpanded] = useState(args.expanded);
88
88
 
89
- // In Storybook, we match the sidebar widths (280 expanded, 80 collapsed)
90
- const currentWidth = isExpanded ? 280 : 80;
89
+ // In Storybook, we match the sidebar widths (320 expanded, 80 collapsed)
90
+ const currentWidth = isExpanded ? 320 : 80;
91
91
 
92
92
  return (
93
93
  <div
@@ -165,7 +165,7 @@ export const DefaultWithGroups: Story = {
165
165
  },
166
166
  render: args => {
167
167
  const [isExpanded, setIsExpanded] = useState(args.expanded);
168
- const currentWidth = isExpanded ? 280 : 80;
168
+ const currentWidth = isExpanded ? 320 : 80;
169
169
 
170
170
  return (
171
171
  <div
@@ -315,7 +315,7 @@ export const Assistant: Story = {
315
315
  },
316
316
  render: args => {
317
317
  const [isExpanded, setIsExpanded] = useState(args.expanded);
318
- const currentWidth = isExpanded ? 280 : 80;
318
+ const currentWidth = isExpanded ? 320 : 80;
319
319
 
320
320
  return (
321
321
  <div
@@ -350,7 +350,7 @@ export const Collapsed: Story = {
350
350
  },
351
351
  render: args => {
352
352
  const [isExpanded, setIsExpanded] = useState(args.expanded);
353
- const currentWidth = isExpanded ? 280 : 80;
353
+ const currentWidth = isExpanded ? 320 : 80;
354
354
 
355
355
  return (
356
356
  <div
@@ -384,7 +384,7 @@ export const NoFooter: Story = {
384
384
  },
385
385
  render: args => {
386
386
  const [isExpanded, setIsExpanded] = useState(args.expanded);
387
- const currentWidth = isExpanded ? 280 : 80;
387
+ const currentWidth = isExpanded ? 320 : 80;
388
388
 
389
389
  return (
390
390
  <div
@@ -614,7 +614,7 @@ export const WithSubitemsDesktop: Story = {
614
614
  },
615
615
  render: args => {
616
616
  const [isExpanded, setIsExpanded] = useState(true);
617
- const currentWidth = isExpanded ? 280 : 80;
617
+ const currentWidth = isExpanded ? 320 : 80;
618
618
 
619
619
  return (
620
620
  <div
@@ -880,7 +880,7 @@ export const CompoundComponentAPI: Story = {
880
880
  name: 'Compound Component API',
881
881
  render: () => {
882
882
  const [isExpanded, setIsExpanded] = React.useState(true);
883
- const currentWidth = isExpanded ? 280 : 80;
883
+ const currentWidth = isExpanded ? 320 : 80;
884
884
  const groups = [
885
885
  {
886
886
  id: 'main',
@@ -973,7 +973,7 @@ export const HeadlessHook: Story = {
973
973
  navigationGroups: resolvedGroups,
974
974
  } = useSidebar({ defaultExpanded: true, navigationGroups: groups });
975
975
 
976
- const width = expanded ? 280 : 80;
976
+ const width = expanded ? 320 : 80;
977
977
 
978
978
  return (
979
979
  <div
@@ -200,7 +200,7 @@ function useSidebarContext() {
200
200
  * Use this when building a fully custom sidebar layout.
201
201
  *
202
202
  * @example
203
- * <Sidebar.Root expanded={expanded} onToggle={toggle} width={280}>
203
+ * <Sidebar.Root expanded={expanded} onToggle={toggle} width={320}>
204
204
  * <Sidebar.Header logo={<MyLogo />} />
205
205
  * <Sidebar.Nav navigationGroups={groups} />
206
206
  * <Sidebar.Footer user={user} onLogout={logout} />
@@ -231,7 +231,7 @@ function SidebarRoot({
231
231
  expandedProp !== undefined ? expandedProp : (layoutContext?.sidebarExpanded ?? localExpanded);
232
232
  const onToggle =
233
233
  onToggleProp || layoutContext?.toggleSidebar || (() => setLocalExpanded(prev => !prev));
234
- const width = widthProp !== undefined ? widthProp : (layoutContext?.sidebarWidth ?? 280);
234
+ const width = widthProp !== undefined ? widthProp : (layoutContext?.sidebarWidth ?? 320);
235
235
  const navigate =
236
236
  navigateProp ||
237
237
  ((path: string) => {
@@ -925,7 +925,7 @@ function SidebarNav({
925
925
  return (
926
926
  <div className="flex-1 min-h-0 overflow-hidden">
927
927
  <div
928
- className="h-full px-4"
928
+ className="h-full px-4 scrollbar-thin scrollbar-thumb-sidebar-border scrollbar-track-transparent"
929
929
  style={{ overflowY: 'auto', overflowX: 'hidden' }}
930
930
  >
931
931
  {navigationGroups.map(group => renderAssistantGroup(group))}
@@ -938,7 +938,7 @@ function SidebarNav({
938
938
  return (
939
939
  <div className="flex-1 min-h-0 overflow-hidden">
940
940
  <div
941
- className="h-full"
941
+ className="h-full scrollbar-thin scrollbar-thumb-sidebar-border scrollbar-track-transparent"
942
942
  style={{ overflowY: 'auto', overflowX: 'hidden' }}
943
943
  >
944
944
  <nav
@@ -1215,7 +1215,7 @@ function SidebarSearch({
1215
1215
  size="icon"
1216
1216
  onClick={() => setIsFilterOpen(!isFilterOpen)}
1217
1217
  className={cn(
1218
- 'h-9 w-9 text-sidebar-foreground transition-all duration-200',
1218
+ 'h-9 w-9 text-sidebar-foreground hover:text-sidebar-foreground transition-all duration-200',
1219
1219
  isFilterOpen ? 'bg-sidebar-foreground/20' : 'hover:bg-sidebar-foreground/15'
1220
1220
  )}
1221
1221
  aria-label={isFilterOpen ? t('sidebar.closeFilters') : t('sidebar.openFilters')}
@@ -62,7 +62,7 @@ export function LayoutProvider({ children }: { children: ReactNode }) {
62
62
  });
63
63
 
64
64
  const [assistenteExpanded, setAssistenteExpandedState] = useState(false);
65
- const [sidebarWidth, setSidebarWidth] = useState(256);
65
+ const [sidebarWidth, setSidebarWidth] = useState(320);
66
66
  const isMobile = useIsMobile();
67
67
 
68
68
  // Persist sidebar state