@happyvertical/smrt-svelte 0.55.16 → 0.55.17
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/README.md +5 -3
- package/agents/cookbook-shell.md +7 -1
- package/agents/overview-surfaces.md +5 -0
- package/agents/workspace.md +145 -11
- package/dist/browser-ai/svelte/components/DownloadProgress.svelte +22 -19
- package/dist/browser-ai/svelte/components/ModelStatusControl.svelte +16 -13
- package/dist/browser-ai/svelte/components/STTTest.svelte +41 -38
- package/dist/browser-ai/svelte/components/VoiceInput.svelte +17 -14
- package/dist/components/activity/ActivityList.svelte +1 -1
- package/dist/components/app/AppShell.svelte +274 -9
- package/dist/components/app/AppShell.svelte.d.ts +63 -2
- package/dist/components/app/AppShell.svelte.d.ts.map +1 -1
- package/dist/components/app/DockToggles.svelte +27 -1
- package/dist/components/app/DockToggles.svelte.d.ts.map +1 -1
- package/dist/components/app/OwnerSetupForm.svelte +98 -34
- package/dist/components/app/OwnerSetupForm.svelte.d.ts +4 -0
- package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -1
- package/dist/components/app/PhoneTabBar.svelte +136 -0
- package/dist/components/app/PhoneTabBar.svelte.d.ts +22 -0
- package/dist/components/app/PhoneTabBar.svelte.d.ts.map +1 -0
- package/dist/components/app/ShellSettingsPage.svelte +17 -2
- package/dist/components/app/ShellSettingsPage.svelte.d.ts +11 -16
- package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -1
- package/dist/components/app/dock-toggle.d.ts +3 -2
- package/dist/components/app/dock-toggle.d.ts.map +1 -1
- package/dist/components/app/index.d.ts +2 -1
- package/dist/components/app/index.d.ts.map +1 -1
- package/dist/components/app/index.js +1 -0
- package/dist/components/app/owner-setup-types.d.ts +5 -0
- package/dist/components/app/owner-setup-types.d.ts.map +1 -1
- package/dist/components/app/phone-tabs.d.ts +41 -0
- package/dist/components/app/phone-tabs.d.ts.map +1 -0
- package/dist/components/app/phone-tabs.js +66 -0
- package/dist/components/app/slot-item.d.ts +16 -0
- package/dist/components/app/slot-item.d.ts.map +1 -1
- package/dist/components/app/view-transition.d.ts +43 -0
- package/dist/components/app/view-transition.d.ts.map +1 -0
- package/dist/components/app/view-transition.js +76 -0
- package/dist/components/audit/AuditList.svelte +4 -1
- package/dist/components/audit/RecordHistory.svelte +4 -1
- package/dist/components/board/Board.svelte +4 -1
- package/dist/components/command-palette/CommandPalette.svelte +4 -1
- package/dist/components/command-palette/CommandPalette.svelte.d.ts +2 -0
- package/dist/components/command-palette/CommandPalette.svelte.d.ts.map +1 -1
- package/dist/components/command-palette/CommandPaletteDialog.svelte +3 -0
- package/dist/components/command-palette/CommandPaletteTrigger.svelte +3 -0
- package/dist/components/cookbook/CookbookApp.svelte +2 -1
- package/dist/components/cookbook/CookbookApp.svelte.d.ts.map +1 -1
- package/dist/components/cookbook/CookbookSectionPage.svelte +4 -1
- package/dist/components/cookbook/brand-theme.d.ts.map +1 -1
- package/dist/components/cookbook/brand-theme.js +21 -2
- package/dist/components/cookbook/build.js +1 -1
- package/dist/components/cookbook/theme.d.ts.map +1 -1
- package/dist/components/cookbook/theme.js +9 -5
- package/dist/components/cookbook/types.d.ts +5 -1
- package/dist/components/cookbook/types.d.ts.map +1 -1
- package/dist/components/forms/AddressInput.svelte +25 -22
- package/dist/components/forms/CheckboxInput.svelte +8 -5
- package/dist/components/forms/DateRangeInput.svelte +41 -38
- package/dist/components/forms/DateTimeInput.svelte +29 -26
- package/dist/components/forms/FileUpload.svelte +24 -21
- package/dist/components/forms/Form.svelte +34 -31
- package/dist/components/forms/FormMicButton.svelte +10 -7
- package/dist/components/forms/FormScope.svelte +4 -1
- package/dist/components/forms/MeasurementInput.svelte +26 -23
- package/dist/components/forms/MoneyInput.svelte +18 -15
- package/dist/components/forms/NumberInput.svelte +17 -14
- package/dist/components/forms/PhoneInput.svelte +37 -34
- package/dist/components/forms/SearchInput.svelte +16 -13
- package/dist/components/forms/SelectInput.svelte +17 -14
- package/dist/components/forms/TextInput.svelte +19 -16
- package/dist/components/forms/TextareaInput.svelte +21 -18
- package/dist/components/import-export/ImportExport.svelte +4 -1
- package/dist/components/module/ModulePanel.svelte +14 -11
- package/dist/components/notifications/NotificationBell.svelte +4 -1
- package/dist/components/overview/OverviewAssistantUndo.svelte +4 -1
- package/dist/components/overview/OverviewGrid.svelte +11 -6
- package/dist/components/overview/OverviewGrid.svelte.d.ts.map +1 -1
- package/dist/components/overview/WidgetOptionsForm.svelte +3 -0
- package/dist/components/overview/widgets/ChartWidget.svelte +7 -4
- package/dist/components/overview/widgets/MetricWidget.svelte +5 -2
- package/dist/components/overview/widgets/NoteWidget.svelte +5 -2
- package/dist/components/overview/widgets/RecordListWidget.svelte +6 -3
- package/dist/components/overview/widgets/ShortcutsWidget.svelte +12 -6
- package/dist/components/overview/widgets/ShortcutsWidget.svelte.d.ts.map +1 -1
- package/dist/components/screens/DetailScreen.svelte +6 -3
- package/dist/components/screens/EditForm.svelte +6 -3
- package/dist/components/screens/ListScreen.svelte +4 -1
- package/dist/components/screens/RecipeScreens.svelte +1 -1
- package/dist/components/settings/SettingsCatalog.svelte +4 -1
- package/dist/components/sortable/Sortable.svelte +11 -5
- package/dist/components/sortable/Sortable.svelte.d.ts.map +1 -1
- package/dist/components/workspace/Breadcrumbs.svelte +4 -1
- package/dist/components/workspace/NavTree.svelte +4 -1
- package/dist/components/workspace/RoleShell.svelte +4 -1
- package/dist/components/workspace/WorkspaceShell.svelte +43 -40
- package/dist/components/workspace/admin-shell/ActivityItem.svelte +4 -1
- package/dist/components/workspace/admin-shell/ActivityList.svelte +5 -2
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte +6 -3
- package/dist/components/workspace/admin-shell/ActivityToasts.svelte +4 -1
- package/dist/components/workspace/admin-shell/AdminShell.svelte +502 -72
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +7 -1
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/AppScopePanel.svelte +4 -1
- package/dist/components/workspace/admin-shell/HotkeyInput.svelte +4 -1
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte +21 -8
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts +9 -2
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/PhoneTopBar.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellBrand.svelte +3 -0
- package/dist/components/workspace/admin-shell/ShellCorner.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellIconButton.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellLayoutEditor.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte +13 -7
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts +1 -1
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellNavToggle.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellSectionIcon.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte +15 -10
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +236 -48
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts +11 -1
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellTitle.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShortcutsOverlay.svelte +4 -1
- package/dist/components/workspace/admin-shell/SystemScopePanel.svelte +4 -1
- package/dist/components/workspace/admin-shell/SystemStatusChips.svelte +5 -2
- package/dist/components/workspace/admin-shell/TenantNav.svelte +81 -36
- package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts +4 -3
- package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +305 -53
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts +15 -2
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/motion.d.ts +19 -0
- package/dist/components/workspace/admin-shell/motion.d.ts.map +1 -0
- package/dist/components/workspace/admin-shell/motion.js +44 -0
- package/dist/components/workspace/admin-shell/settings.d.ts +1 -0
- package/dist/components/workspace/admin-shell/settings.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/settings.js +1 -1
- package/dist/components/workspace/admin-shell/shell-icons.d.ts +8 -0
- package/dist/components/workspace/admin-shell/shell-icons.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/shell-icons.js +8 -0
- package/dist/components/workspace/admin-shell/state.svelte.d.ts +6 -0
- package/dist/components/workspace/admin-shell/state.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/state.svelte.js +15 -0
- package/dist/components/workspace/admin-shell/types.d.ts +13 -3
- package/dist/components/workspace/admin-shell/types.d.ts.map +1 -1
- package/dist/components/workspace/tools-dock/ToolsDock.svelte +41 -38
- package/dist/i18n/strings.workspace.d.ts +37 -0
- package/dist/i18n/strings.workspace.d.ts.map +1 -1
- package/dist/i18n/strings.workspace.js +42 -2
- package/dist/mcp-apps/McpAppsBridge.svelte +4 -1
- package/package.json +14 -14
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
-
import type
|
|
3
|
+
import { type Component, onMount } from 'svelte';
|
|
4
|
+
import { fly } from 'svelte/transition';
|
|
4
5
|
import { M } from '../../../i18n/strings.workspace.js';
|
|
6
|
+
import { flipRow } from './motion.js';
|
|
5
7
|
import ShellSectionIcon from './ShellSectionIcon.svelte';
|
|
6
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
SHELL_DEFAULT_SECTION_ICON,
|
|
10
|
+
SHELL_PLACEHOLDER_ICON,
|
|
11
|
+
} from './shell-icons.js';
|
|
7
12
|
import type { ShellNavGroup, ShellNavItem } from './types.js';
|
|
8
13
|
|
|
9
14
|
const DEFAULT_ACTION_ICON = 'settings';
|
|
@@ -27,10 +32,11 @@ interface Props {
|
|
|
27
32
|
onNavigate?: () => void;
|
|
28
33
|
/**
|
|
29
34
|
* `'items'` (default) lists every group's entries. `'sections'` shows only
|
|
30
|
-
* the sections
|
|
35
|
+
* the sections. `'sections-with-items'` also shows entries when expanded.
|
|
36
|
+
* Section links go to the section's own page
|
|
31
37
|
* (`ShellNavGroup.href`, else `sectionHref(id)`, else its first entry).
|
|
32
38
|
*/
|
|
33
|
-
navMode?: 'items' | 'sections';
|
|
39
|
+
navMode?: 'items' | 'sections' | 'sections-with-items';
|
|
34
40
|
/** Section page for groups without an `href` (e.g. user-created ones). */
|
|
35
41
|
sectionHref?: (sectionId: string) => string | undefined;
|
|
36
42
|
}
|
|
@@ -48,6 +54,20 @@ let {
|
|
|
48
54
|
sectionHref,
|
|
49
55
|
}: Props = $props();
|
|
50
56
|
const { t } = useI18n();
|
|
57
|
+
let ready = $state(false);
|
|
58
|
+
onMount(() => {
|
|
59
|
+
ready = true;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
function reveal() {
|
|
63
|
+
const reduced =
|
|
64
|
+
typeof window !== 'undefined' &&
|
|
65
|
+
window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
66
|
+
const canAnimate =
|
|
67
|
+
typeof Element !== 'undefined' &&
|
|
68
|
+
typeof Element.prototype.animate === 'function';
|
|
69
|
+
return { x: 12, duration: ready && !reduced && canAnimate ? 260 : 0 };
|
|
70
|
+
}
|
|
51
71
|
|
|
52
72
|
function isActive(item: ShellNavItem): boolean {
|
|
53
73
|
return item.href === currentHref || currentHref.startsWith(`${item.href}/`);
|
|
@@ -106,6 +126,14 @@ function fallbackIcon(label: string): string {
|
|
|
106
126
|
}
|
|
107
127
|
</script>
|
|
108
128
|
|
|
129
|
+
{#snippet glyph(name: string, size: number)}
|
|
130
|
+
{#if IconComponent}
|
|
131
|
+
<IconComponent {name} {size} />
|
|
132
|
+
{:else}
|
|
133
|
+
<ShellSectionIcon {name} {size} />
|
|
134
|
+
{/if}
|
|
135
|
+
{/snippet}
|
|
136
|
+
|
|
109
137
|
{#snippet attention(item: ShellNavItem)}
|
|
110
138
|
{@const label = attentionLabel(item)}
|
|
111
139
|
{#if label}
|
|
@@ -123,7 +151,7 @@ function fallbackIcon(label: string): string {
|
|
|
123
151
|
{@const action = showAction(item, groupCurrent ?? isItemCurrent(item))
|
|
124
152
|
? item.action
|
|
125
153
|
: undefined}
|
|
126
|
-
<div class="smrt-tenant-nav__section">
|
|
154
|
+
<div class="smrt-tenant-nav__section" in:fly={reveal()} animate:flipRow>
|
|
127
155
|
<div class="smrt-tenant-nav__row">
|
|
128
156
|
<a
|
|
129
157
|
href={item.href}
|
|
@@ -134,18 +162,14 @@ function fallbackIcon(label: string): string {
|
|
|
134
162
|
>
|
|
135
163
|
{#if item.icon}
|
|
136
164
|
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
137
|
-
{
|
|
138
|
-
<IconComponent name={item.icon} size={18} />
|
|
139
|
-
{:else}
|
|
140
|
-
{item.icon}
|
|
141
|
-
{/if}
|
|
165
|
+
{@render glyph(item.icon, 18)}
|
|
142
166
|
</span>
|
|
143
167
|
{:else if collapsed}
|
|
144
168
|
<span
|
|
145
|
-
class="smrt-tenant-nav__icon smrt-tenant-nav__icon--
|
|
169
|
+
class="smrt-tenant-nav__icon smrt-tenant-nav__icon--placeholder"
|
|
146
170
|
aria-hidden="true"
|
|
147
171
|
>
|
|
148
|
-
{
|
|
172
|
+
<ShellSectionIcon name={SHELL_PLACEHOLDER_ICON} size={18} />
|
|
149
173
|
</span>
|
|
150
174
|
{/if}
|
|
151
175
|
{#if collapsed}
|
|
@@ -168,13 +192,7 @@ function fallbackIcon(label: string): string {
|
|
|
168
192
|
onclick={onNavigate}
|
|
169
193
|
>
|
|
170
194
|
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
171
|
-
{
|
|
172
|
-
<IconComponent name={action.icon ?? DEFAULT_ACTION_ICON} size={16} />
|
|
173
|
-
{:else if action.icon}
|
|
174
|
-
{action.icon}
|
|
175
|
-
{:else}
|
|
176
|
-
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d={SHELL_ICON_PATHS.settings} /></svg>
|
|
177
|
-
{/if}
|
|
195
|
+
{@render glyph(action.icon ?? DEFAULT_ACTION_ICON, 16)}
|
|
178
196
|
</span>
|
|
179
197
|
</a>
|
|
180
198
|
{/if}
|
|
@@ -189,11 +207,7 @@ function fallbackIcon(label: string): string {
|
|
|
189
207
|
>
|
|
190
208
|
{#if child.icon}
|
|
191
209
|
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
192
|
-
{
|
|
193
|
-
<IconComponent name={child.icon} size={16} />
|
|
194
|
-
{:else}
|
|
195
|
-
{child.icon}
|
|
196
|
-
{/if}
|
|
210
|
+
{@render glyph(child.icon, 16)}
|
|
197
211
|
</span>
|
|
198
212
|
{/if}
|
|
199
213
|
<span>{child.label}</span>
|
|
@@ -213,15 +227,15 @@ function fallbackIcon(label: string): string {
|
|
|
213
227
|
class="smrt-tenant-nav"
|
|
214
228
|
data-density={density}
|
|
215
229
|
class:smrt-tenant-nav--collapsed={collapsed}
|
|
216
|
-
aria-label={ariaLabel || t(M['ui.tenant_nav.tenant_navigation'])}
|
|
230
|
+
aria-label={ariaLabel || t(M['ui.tenant_nav.tenant_navigation'])} data-smrt-component="TenantNav"
|
|
217
231
|
>
|
|
218
232
|
|
|
219
233
|
{@render navItems(items)}
|
|
220
|
-
{#each groups as group}
|
|
221
|
-
{#if navMode === 'sections'}
|
|
234
|
+
{#each groups as group (groupId(group))}
|
|
235
|
+
{#if navMode === 'sections' || navMode === 'sections-with-items'}
|
|
222
236
|
{@const href = groupHref(group)}
|
|
223
237
|
{#if href}
|
|
224
|
-
<div class="smrt-tenant-nav__section" data-nav-section={groupId(group)}>
|
|
238
|
+
<div class="smrt-tenant-nav__section" data-nav-section={groupId(group)} in:fly={reveal()}>
|
|
225
239
|
<div class="smrt-tenant-nav__row">
|
|
226
240
|
<a
|
|
227
241
|
{href}
|
|
@@ -245,6 +259,11 @@ function fallbackIcon(label: string): string {
|
|
|
245
259
|
{/if}
|
|
246
260
|
</a>
|
|
247
261
|
</div>
|
|
262
|
+
{#if navMode === 'sections-with-items' && !collapsed && group.items.length}
|
|
263
|
+
<div class="smrt-tenant-nav__subnav">
|
|
264
|
+
{@render navItems(group.items, isGroupCurrent(group))}
|
|
265
|
+
</div>
|
|
266
|
+
{/if}
|
|
248
267
|
</div>
|
|
249
268
|
{/if}
|
|
250
269
|
{:else if group.showTitle === false}
|
|
@@ -268,6 +287,8 @@ function fallbackIcon(label: string): string {
|
|
|
268
287
|
</nav>
|
|
269
288
|
|
|
270
289
|
<style>
|
|
290
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
291
|
+
@layer smrt.theme {
|
|
271
292
|
.smrt-tenant-nav,
|
|
272
293
|
.smrt-tenant-nav__section,
|
|
273
294
|
.smrt-tenant-nav__children,
|
|
@@ -313,6 +334,11 @@ function fallbackIcon(label: string): string {
|
|
|
313
334
|
outline-offset: 2px;
|
|
314
335
|
}
|
|
315
336
|
.smrt-tenant-nav__group-items { margin-block-start: var(--smrt-spacing-1); }
|
|
337
|
+
.smrt-tenant-nav__subnav {
|
|
338
|
+
display: grid;
|
|
339
|
+
gap: var(--smrt-spacing-1);
|
|
340
|
+
padding-inline-start: var(--smrt-spacing-4);
|
|
341
|
+
}
|
|
316
342
|
.smrt-tenant-nav--collapsed .smrt-tenant-nav__heading {
|
|
317
343
|
display: grid;
|
|
318
344
|
place-items: center;
|
|
@@ -323,7 +349,11 @@ function fallbackIcon(label: string): string {
|
|
|
323
349
|
}
|
|
324
350
|
.smrt-tenant-nav--collapsed .smrt-tenant-nav__heading::-webkit-details-marker { display: none; }
|
|
325
351
|
|
|
326
|
-
|
|
352
|
+
/* Phone rows use the touch target; comfortable density opts back out. */
|
|
353
|
+
@media (max-width: 48rem) {
|
|
354
|
+
.smrt-tenant-nav { --smrt-control-target-min: var(--smrt-touch-target-min); }
|
|
355
|
+
}
|
|
356
|
+
.smrt-tenant-nav[data-density='touch'] { --smrt-control-target-min: var(--smrt-touch-target-min); }
|
|
327
357
|
.smrt-tenant-nav[data-density='comfortable'] { --smrt-control-target-min: 0px; }
|
|
328
358
|
.smrt-tenant-nav a {
|
|
329
359
|
box-sizing: border-box;
|
|
@@ -355,10 +385,28 @@ function fallbackIcon(label: string): string {
|
|
|
355
385
|
padding: 0;
|
|
356
386
|
}
|
|
357
387
|
|
|
358
|
-
.smrt-tenant-nav a:hover
|
|
388
|
+
.smrt-tenant-nav a:hover {
|
|
389
|
+
background: var(--smrt-color-surface-container-high);
|
|
390
|
+
}
|
|
391
|
+
/* Selected: container fill plus a start indicator bar, not just weight. */
|
|
359
392
|
.smrt-tenant-nav a[aria-current='page'],
|
|
360
393
|
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active {
|
|
361
|
-
background: var(--smrt-color-
|
|
394
|
+
background: var(--smrt-color-secondary-container);
|
|
395
|
+
color: var(--smrt-color-on-secondary-container);
|
|
396
|
+
}
|
|
397
|
+
.smrt-tenant-nav a[aria-current='page']::before,
|
|
398
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active::before {
|
|
399
|
+
content: '';
|
|
400
|
+
position: absolute;
|
|
401
|
+
inset-block: var(--smrt-spacing-2);
|
|
402
|
+
inset-inline-start: 0;
|
|
403
|
+
inline-size: var(--smrt-spacing-1);
|
|
404
|
+
border-radius: var(--smrt-radius-full);
|
|
405
|
+
background: var(--smrt-color-primary);
|
|
406
|
+
}
|
|
407
|
+
.smrt-tenant-nav a[aria-current='page'] small,
|
|
408
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active small {
|
|
409
|
+
color: inherit;
|
|
362
410
|
}
|
|
363
411
|
|
|
364
412
|
.smrt-tenant-nav__icon {
|
|
@@ -369,12 +417,8 @@ function fallbackIcon(label: string): string {
|
|
|
369
417
|
min-inline-size: 1.25rem;
|
|
370
418
|
}
|
|
371
419
|
|
|
372
|
-
.smrt-tenant-nav__icon--
|
|
373
|
-
border-radius: var(--smrt-radius-full);
|
|
374
|
-
background: var(--smrt-color-surface-container-high);
|
|
420
|
+
.smrt-tenant-nav__icon--placeholder {
|
|
375
421
|
color: var(--smrt-color-on-surface-variant);
|
|
376
|
-
font-size: var(--smrt-typography-label-small-size);
|
|
377
|
-
font-weight: var(--smrt-typography-weight-semibold);
|
|
378
422
|
}
|
|
379
423
|
|
|
380
424
|
.smrt-tenant-nav strong,
|
|
@@ -423,4 +467,5 @@ function fallbackIcon(label: string): string {
|
|
|
423
467
|
white-space: nowrap;
|
|
424
468
|
border: 0;
|
|
425
469
|
}
|
|
470
|
+
}
|
|
426
471
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Component } from 'svelte';
|
|
2
2
|
import type { ShellNavGroup, ShellNavItem } from './types.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
/** Navigation items with href, label, icon, and optional children. */
|
|
@@ -22,10 +22,11 @@ interface Props {
|
|
|
22
22
|
onNavigate?: () => void;
|
|
23
23
|
/**
|
|
24
24
|
* `'items'` (default) lists every group's entries. `'sections'` shows only
|
|
25
|
-
* the sections
|
|
25
|
+
* the sections. `'sections-with-items'` also shows entries when expanded.
|
|
26
|
+
* Section links go to the section's own page
|
|
26
27
|
* (`ShellNavGroup.href`, else `sectionHref(id)`, else its first entry).
|
|
27
28
|
*/
|
|
28
|
-
navMode?: 'items' | 'sections';
|
|
29
|
+
navMode?: 'items' | 'sections' | 'sections-with-items';
|
|
29
30
|
/** Section page for groups without an `href` (e.g. user-created ones). */
|
|
30
31
|
sectionHref?: (sectionId: string) => string | undefined;
|
|
31
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantNav.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/TenantNav.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TenantNav.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/TenantNav.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,QAAQ,CAAC;AASjD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG9D,UAAU,KAAK;IACb,sEAAsE;IACtE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,aAAa,CAAC,EAAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,qBAAqB,CAAC;IACvD,0EAA0E;IAC1E,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACzD;AA+ND,QAAA,MAAM,SAAS,0BAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|