@adea-ai/ui 0.15.3 → 0.16.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.
@@ -16,5 +16,5 @@ export function ThemeToggle({ className }) {
16
16
  // light presentation for both SSR and the first client render so the
17
17
  // aria/class attributes cannot mismatch during hydration.
18
18
  const selectedTheme = mounted ? theme : 'system';
19
- return (_jsxs("div", { className: cn('inline-flex items-center gap-1.5 rounded-full border border-input bg-background p-1.5', className), role: "radiogroup", "aria-label": "Theme", children: [_jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'system', "aria-label": "System theme", variant: selectedTheme === 'system' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('system'), className: "rounded-full", children: _jsx(Monitor, { className: "size-4", "aria-hidden": "true" }) }), _jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'light', "aria-label": "Light theme", variant: selectedTheme === 'light' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('light'), className: "rounded-full", children: _jsx(Sun, { className: "size-4", "aria-hidden": "true" }) }), _jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'dark', "aria-label": "Dark theme", variant: selectedTheme === 'dark' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('dark'), className: "rounded-full", children: _jsx(Moon, { className: "size-4", "aria-hidden": "true" }) })] }));
19
+ return (_jsxs("div", { className: cn('inline-flex items-center gap-2 rounded-full border border-input bg-background p-2', className), role: "radiogroup", "aria-label": "Theme", children: [_jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'system', "aria-label": "System theme", variant: selectedTheme === 'system' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('system'), className: "rounded-full", children: _jsx(Monitor, { className: "size-4", "aria-hidden": "true" }) }), _jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'light', "aria-label": "Light theme", variant: selectedTheme === 'light' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('light'), className: "rounded-full", children: _jsx(Sun, { className: "size-4", "aria-hidden": "true" }) }), _jsx(Button, { type: "button", role: "radio", "aria-checked": selectedTheme === 'dark', "aria-label": "Dark theme", variant: selectedTheme === 'dark' ? 'default' : 'ghost', size: "icon-sm", onClick: () => setTheme('dark'), className: "rounded-full", children: _jsx(Moon, { className: "size-4", "aria-hidden": "true" }) })] }));
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "description": "Shared UI kit for Adea: Base UI-backed shadcn primitives, workspace shells, and theme styles.",
5
5
  "keywords": [
6
6
  "base-ui",
@@ -26,7 +26,7 @@ export function ThemeToggle({ className }: { className?: string }) {
26
26
  return (
27
27
  <div
28
28
  className={cn(
29
- 'inline-flex items-center gap-1.5 rounded-full border border-input bg-background p-1.5',
29
+ 'inline-flex items-center gap-2 rounded-full border border-input bg-background p-2',
30
30
  className
31
31
  )}
32
32
  role="radiogroup"
@@ -336,7 +336,18 @@
336
336
  outline-offset: -2px;
337
337
  }
338
338
  .conventional-sidebar__close {
339
- display: none;
339
+ /* Absolutely positioned so the close control never becomes a grid item:
340
+ the sidebar keeps its title / quick-actions / scroll row rhythm at every
341
+ width, exactly like the large layout. */
342
+ position: absolute;
343
+ z-index: 5;
344
+ top: 0.4rem;
345
+ right: 0.4rem;
346
+ display: grid;
347
+ width: 2.5rem;
348
+ height: 2.5rem;
349
+ place-items: center;
350
+ border-radius: 0.4rem;
340
351
  }
341
352
  .conventional-sidebar__title {
342
353
  padding: 0.9rem 1.25rem 0.5rem;
@@ -590,10 +601,27 @@
590
601
  .conventional-sidebar__settings {
591
602
  margin: 0.5rem 0.6rem 0.75rem;
592
603
  }
593
- .conventional-mobile-menu,
594
604
  .conventional-sidebar-scrim {
595
605
  display: none;
596
606
  }
607
+ .conventional-mobile-menu {
608
+ position: fixed;
609
+ z-index: 12;
610
+ top: 0.65rem;
611
+ left: 4.65rem;
612
+ display: grid;
613
+ width: 2.75rem;
614
+ height: 2.75rem;
615
+ place-items: center;
616
+ border: 1px solid var(--cw-border, var(--border));
617
+ border-radius: 0.4rem;
618
+ background: var(--cw-surface, var(--card));
619
+ color: var(--cw-text, var(--foreground));
620
+ pointer-events: auto;
621
+ }
622
+ .conventional-workspace:has(> .conventional-sidebar--open) .conventional-mobile-menu {
623
+ display: none;
624
+ }
597
625
 
598
626
  .conventional-main {
599
627
  grid-column: 2;
@@ -2738,15 +2766,6 @@
2738
2766
  .conventional-sidebar--open {
2739
2767
  transform: none;
2740
2768
  }
2741
- .conventional-sidebar__close {
2742
- display: grid;
2743
- justify-self: end;
2744
- width: 2.5rem;
2745
- height: 2.5rem;
2746
- margin: 0.5rem 0.5rem 0;
2747
- place-items: center;
2748
- border-radius: 0.4rem;
2749
- }
2750
2769
  .conventional-sidebar-scrim {
2751
2770
  position: fixed;
2752
2771
  z-index: 39;
@@ -2761,20 +2780,6 @@
2761
2780
  .conventional-conversation__header {
2762
2781
  padding-left: 4.2rem;
2763
2782
  }
2764
- .conventional-mobile-menu {
2765
- position: fixed;
2766
- z-index: 12;
2767
- top: 0.65rem;
2768
- left: 4.65rem;
2769
- display: grid;
2770
- width: 2.75rem;
2771
- height: 2.75rem;
2772
- place-items: center;
2773
- border: 1px solid var(--cw-border);
2774
- border-radius: 0.4rem;
2775
- background: var(--cw-surface);
2776
- color: var(--cw-text);
2777
- }
2778
2783
  .conventional-header-menu {
2779
2784
  display: grid !important;
2780
2785
  }
@@ -2844,3 +2849,13 @@
2844
2849
  animation-iteration-count: 1 !important;
2845
2850
  }
2846
2851
  }
2852
+
2853
+ /* Sidebar collapse works at every width: a closed navigation aside collapses
2854
+ its grid column instead of only sliding off-canvas on small screens. */
2855
+ .conventional-workspace:has(> .conventional-sidebar:not(.conventional-sidebar--open)) {
2856
+ grid-template-columns: 0 minmax(0, 1fr);
2857
+ }
2858
+ .conventional-workspace:has(> .conventional-sidebar:not(.conventional-sidebar--open))
2859
+ .conventional-topbar {
2860
+ grid-template-columns: 0 minmax(0, 1fr) auto auto;
2861
+ }
@@ -64,60 +64,9 @@
64
64
  letter-spacing: -0.08em;
65
65
  }
66
66
 
67
- .virtual-room-panel {
67
+ .virtual-view-engine {
68
68
  position: absolute;
69
- top: calc(var(--workspace-topbar-offset) + 1rem);
70
- left: 1rem;
71
- z-index: 10;
72
- width: min(20rem, calc(100vw - 2rem));
73
- max-height: min(26rem, calc(100svh - var(--workspace-topbar-offset) - 6rem));
74
- overflow: auto;
75
- padding: 0.75rem;
76
- border: 1px solid var(--border);
77
- border-radius: var(--radius-lg);
78
- background: color-mix(in srgb, var(--card) 90%, transparent);
79
- color: var(--card-foreground);
80
- box-shadow: 0 16px 40px rgb(0 0 0 / 0.2);
81
- backdrop-filter: blur(18px);
82
- pointer-events: auto;
83
- }
84
-
85
- .virtual-room-panel > header {
86
- display: flex;
87
- align-items: flex-start;
88
- justify-content: space-between;
89
- gap: 0.75rem;
90
- margin-bottom: 0.65rem;
91
- }
92
-
93
- .virtual-room-panel h2,
94
- .virtual-room-panel p {
95
- margin: 0;
96
- }
97
-
98
- .virtual-room-panel header p {
99
- margin-bottom: 0.15rem;
100
- color: var(--muted-foreground);
101
- font-size: 0.68rem;
102
- font-weight: 700;
103
- letter-spacing: 0.08em;
104
- text-transform: uppercase;
105
- }
106
-
107
- .virtual-room-panel h2 {
108
- font-size: 0.95rem;
109
- }
110
-
111
- .virtual-room-panel__rooms {
112
- display: flex;
113
- flex-wrap: wrap;
114
- gap: 0.25rem;
115
- }
116
-
117
- .virtual-room-panel__rooms > p {
118
- color: var(--muted-foreground);
119
- font-size: 0.8rem;
120
- line-height: 1.4;
69
+ inset: 0;
121
70
  }
122
71
 
123
72
  /* Room Designer owns the viewport while it is open. Keep the global rail
@@ -126,20 +75,10 @@
126
75
  .workspace-scene-viewport:has([data-room-designer-active='true'])
127
76
  .workspace-ui
128
77
  :is(
129
- .virtual-room-panel,
78
+ .conventional-mobile-menu,
130
79
  .workspace-scene-tools,
131
80
  .workspace-view-switcher,
132
81
  .workspace-scene-caption
133
82
  ) {
134
83
  display: none;
135
84
  }
136
-
137
- @media (max-width: 640px) {
138
- .virtual-room-panel {
139
- top: auto;
140
- bottom: calc(var(--workspace-bottom-controls) + 4rem);
141
- left: 0.75rem;
142
- width: calc(100vw - 1.5rem);
143
- max-height: 11rem;
144
- }
145
- }