@happyvertical/smrt-svelte 0.60.16 → 0.60.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/AGENTS.md +1 -0
- package/dist/browser-ai/svelte/components/DownloadProgress.svelte +61 -48
- package/dist/browser-ai/svelte/components/ModelStatusControl.svelte +32 -31
- package/dist/browser-ai/svelte/components/STTTest.svelte +95 -91
- package/dist/browser-ai/svelte/components/VoiceInput.svelte +64 -66
- package/dist/components/app/AppShell.svelte +137 -29
- package/dist/components/app/DockToggles.svelte +34 -24
- package/dist/components/app/OwnerSetupForm.svelte +11 -5
- package/dist/components/app/ShellColorSchemeToggle.svelte +8 -1
- package/dist/components/app/ShellSettingsPage.svelte +5 -1
- package/dist/components/audit/AuditList.svelte +11 -2
- package/dist/components/audit/RecordHistory.svelte +43 -31
- package/dist/components/board/Board.svelte +127 -22
- package/dist/components/command-palette/CommandPaletteDialog.svelte +97 -93
- package/dist/components/command-palette/CommandPaletteTrigger.svelte +15 -11
- package/dist/components/cookbook/CookbookSectionOverview.svelte +1 -1
- package/dist/components/cookbook/CookbookSectionPage.svelte +30 -27
- package/dist/components/forms/AddressInput.svelte +73 -71
- package/dist/components/forms/CheckboxInput.svelte +57 -49
- package/dist/components/forms/DateRangeInput.svelte +110 -121
- package/dist/components/forms/DateTimeInput.svelte +68 -64
- package/dist/components/forms/FileUpload.svelte +96 -81
- package/dist/components/forms/Form.svelte +78 -79
- package/dist/components/forms/FormMicButton.svelte +53 -44
- package/dist/components/forms/FormScope.svelte +7 -3
- package/dist/components/forms/MeasurementInput.svelte +59 -53
- package/dist/components/forms/MoneyInput.svelte +37 -33
- package/dist/components/forms/NumberInput.svelte +37 -32
- package/dist/components/forms/PhoneInput.svelte +107 -101
- package/dist/components/forms/SearchInput.svelte +98 -95
- package/dist/components/forms/SelectInput.svelte +68 -61
- package/dist/components/forms/TextInput.svelte +87 -77
- package/dist/components/forms/TextareaInput.svelte +85 -75
- package/dist/components/import-export/ImportExport.svelte +32 -21
- package/dist/components/module/ModulePanel.svelte +33 -24
- package/dist/components/notifications/NotificationBell.svelte +92 -22
- package/dist/components/overview/OverviewAssistantUndo.svelte +8 -5
- package/dist/components/overview/OverviewGrid.svelte +230 -58
- package/dist/components/overview/WidgetOptionsForm.svelte +25 -8
- package/dist/components/overview/widgets/LineItemsWidget.svelte +92 -28
- package/dist/components/overview/widgets/MetricWidget.svelte +46 -11
- package/dist/components/overview/widgets/NoteWidget.svelte +57 -15
- package/dist/components/overview/widgets/RecordListWidget.svelte +79 -19
- package/dist/components/overview/widgets/RecordTable.svelte +22 -6
- package/dist/components/overview/widgets/RelatedWidget.svelte +35 -9
- package/dist/components/overview/widgets/ShortcutsWidget.svelte +120 -25
- package/dist/components/screens/DetailScreen.svelte +43 -33
- package/dist/components/screens/EditForm.svelte +17 -9
- package/dist/components/screens/ListScreen.svelte +8 -4
- package/dist/components/screens/RecordHeader.svelte +101 -28
- package/dist/components/screens/RecordScreen.svelte +37 -29
- package/dist/components/settings/SettingsCatalog.svelte +62 -56
- package/dist/components/sortable/Sortable.svelte +148 -31
- package/dist/components/workspace/Breadcrumbs.svelte +30 -28
- package/dist/components/workspace/NavTree.svelte +120 -115
- package/dist/components/workspace/RoleShell.svelte +26 -15
- package/dist/components/workspace/WorkspaceShell.svelte +277 -290
- package/dist/components/workspace/admin-shell/ActivityItem.svelte +18 -16
- package/dist/components/workspace/admin-shell/ActivityList.svelte +7 -2
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte +76 -23
- package/dist/components/workspace/admin-shell/ActivityToasts.svelte +14 -14
- package/dist/components/workspace/admin-shell/AdminShell.svelte +626 -604
- package/dist/components/workspace/admin-shell/AppScopePanel.svelte +11 -13
- package/dist/components/workspace/admin-shell/HotkeyInput.svelte +8 -3
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte +83 -59
- package/dist/components/workspace/admin-shell/PhoneTopBar.svelte +22 -17
- package/dist/components/workspace/admin-shell/ShellBrand.svelte +43 -19
- package/dist/components/workspace/admin-shell/ShellCorner.svelte +5 -2
- package/dist/components/workspace/admin-shell/ShellIconButton.svelte +37 -9
- package/dist/components/workspace/admin-shell/ShellLayoutEditor.svelte +98 -26
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte +204 -45
- package/dist/components/workspace/admin-shell/ShellNavToggle.svelte +8 -4
- package/dist/components/workspace/admin-shell/ShellSectionIcon.svelte +9 -1
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte +281 -62
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +20 -26
- package/dist/components/workspace/admin-shell/ShellTitle.svelte +9 -5
- package/dist/components/workspace/admin-shell/ShortcutsOverlay.svelte +5 -4
- package/dist/components/workspace/admin-shell/SystemScopePanel.svelte +22 -22
- package/dist/components/workspace/admin-shell/SystemStatusChips.svelte +31 -17
- package/dist/components/workspace/admin-shell/TenantNav.svelte +144 -103
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +109 -80
- package/dist/components/workspace/tools-dock/ToolsDock.svelte +167 -159
- package/dist/components/workspace/types.d.ts +1 -1
- package/dist/mcp-apps/McpAppsBridge.svelte +15 -11
- package/dist/smrt-knowledge.okf.md +3 -2
- package/dist/svelte/playground/ShellStylelessPreview.svelte +47 -0
- package/dist/svelte/playground/ShellStylelessPreview.svelte.d.ts +4 -0
- package/dist/svelte/playground/ShellStylelessPreview.svelte.d.ts.map +1 -0
- package/dist/svelte/playground.d.ts +18 -0
- package/dist/svelte/playground.d.ts.map +1 -0
- package/dist/svelte/playground.js +14 -0
- package/package.json +21 -16
|
@@ -20,19 +20,19 @@ const { t } = useI18n();
|
|
|
20
20
|
aria-label={t(M['ui.system_scope_panel.system_scope'])} data-smrt-component="SystemScopePanel"
|
|
21
21
|
>
|
|
22
22
|
{#each panels as panel (panel.id)}
|
|
23
|
-
<section class="smrt-system-scope-panel__group" aria-label={panel.label}>
|
|
23
|
+
<section class="smrt-system-scope-panel__group" aria-label={panel.label} data-smrt-part="section">
|
|
24
24
|
<header>
|
|
25
25
|
<h2>{panel.label}</h2>
|
|
26
26
|
<span>{panel.items.length}</span>
|
|
27
27
|
</header>
|
|
28
28
|
{#if panel.items.length > 0}
|
|
29
|
-
<div class="smrt-system-scope-panel__items">
|
|
29
|
+
<div class="smrt-system-scope-panel__items" data-smrt-part="list">
|
|
30
30
|
{#each panel.items as item (item.id)}
|
|
31
31
|
<svelte:element
|
|
32
32
|
this={item.href ? 'a' : 'span'}
|
|
33
33
|
href={item.href ?? undefined}
|
|
34
34
|
class="smrt-system-scope-panel__item"
|
|
35
|
-
aria-disabled={item.href ? undefined : 'true'}
|
|
35
|
+
aria-disabled={item.href ? undefined : 'true'} data-smrt-part="item"
|
|
36
36
|
>
|
|
37
37
|
<strong>{item.label}</strong>
|
|
38
38
|
<span>{item.status}</span>
|
|
@@ -51,7 +51,7 @@ const { t } = useI18n();
|
|
|
51
51
|
{#if showActivities}
|
|
52
52
|
<section
|
|
53
53
|
class="smrt-system-scope-panel__group"
|
|
54
|
-
aria-label={t(M['ui.system_scope_panel.activities'])}
|
|
54
|
+
aria-label={t(M['ui.system_scope_panel.activities'])} data-smrt-part="section"
|
|
55
55
|
>
|
|
56
56
|
<header>
|
|
57
57
|
<h2>{t(M['ui.system_scope_panel.activities'])}</h2>
|
|
@@ -66,58 +66,58 @@ const { t } = useI18n();
|
|
|
66
66
|
|
|
67
67
|
<style>
|
|
68
68
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
@layer smrt.structure {
|
|
70
71
|
.smrt-system-scope-panel {
|
|
71
72
|
display: grid;
|
|
72
73
|
gap: var(--smrt-spacing-5);
|
|
73
74
|
}
|
|
74
|
-
|
|
75
75
|
.smrt-system-scope-panel__group,
|
|
76
76
|
.smrt-system-scope-panel__items {
|
|
77
77
|
display: grid;
|
|
78
78
|
gap: var(--smrt-spacing-2);
|
|
79
79
|
}
|
|
80
|
-
|
|
81
80
|
.smrt-system-scope-panel__group header {
|
|
82
81
|
display: flex;
|
|
83
82
|
align-items: center;
|
|
84
83
|
justify-content: space-between;
|
|
85
84
|
gap: var(--smrt-spacing-3);
|
|
86
85
|
}
|
|
87
|
-
|
|
88
86
|
.smrt-system-scope-panel h2,
|
|
89
87
|
.smrt-system-scope-panel p {
|
|
90
88
|
margin: 0;
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
.smrt-system-scope-panel p,
|
|
94
|
-
.smrt-system-scope-panel small,
|
|
95
|
-
.smrt-system-scope-panel__group header span {
|
|
96
|
-
color: var(--smrt-color-on-surface-variant);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
90
|
.smrt-system-scope-panel__item {
|
|
100
91
|
display: grid;
|
|
101
92
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
102
93
|
gap: var(--smrt-spacing-1) var(--smrt-spacing-3);
|
|
103
94
|
padding: var(--smrt-spacing-3) 0;
|
|
104
|
-
border-block-start: var(--smrt-hairline);
|
|
105
|
-
color: var(--smrt-color-on-surface);
|
|
106
|
-
text-decoration: none;
|
|
107
95
|
}
|
|
108
|
-
|
|
109
96
|
.smrt-system-scope-panel__item[aria-disabled='true'] {
|
|
110
|
-
color: var(--smrt-color-on-surface-variant);
|
|
111
97
|
cursor: default;
|
|
112
98
|
}
|
|
113
|
-
|
|
114
99
|
.smrt-system-scope-panel__items strong,
|
|
115
100
|
.smrt-system-scope-panel__items small {
|
|
116
101
|
overflow-wrap: anywhere;
|
|
117
102
|
}
|
|
118
|
-
|
|
119
103
|
.smrt-system-scope-panel__items small {
|
|
120
104
|
grid-column: 1 / -1;
|
|
121
105
|
}
|
|
122
106
|
}
|
|
107
|
+
|
|
108
|
+
@layer smrt.theme {
|
|
109
|
+
.smrt-system-scope-panel p,
|
|
110
|
+
.smrt-system-scope-panel small,
|
|
111
|
+
.smrt-system-scope-panel__group header span {
|
|
112
|
+
color: var(--smrt-color-on-surface-variant);
|
|
113
|
+
}
|
|
114
|
+
.smrt-system-scope-panel__item {
|
|
115
|
+
border-block-start: var(--smrt-hairline);
|
|
116
|
+
color: var(--smrt-color-on-surface);
|
|
117
|
+
text-decoration: none;
|
|
118
|
+
}
|
|
119
|
+
.smrt-system-scope-panel__item[aria-disabled='true'] {
|
|
120
|
+
color: var(--smrt-color-on-surface-variant);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
123
|
</style>
|
|
@@ -28,7 +28,7 @@ const { t } = useI18n();
|
|
|
28
28
|
{/if}
|
|
29
29
|
</a>
|
|
30
30
|
{:else}
|
|
31
|
-
<span class="smrt-system-status-chips__chip" data-tone={chip.tone ?? 'neutral'}>
|
|
31
|
+
<span class="smrt-system-status-chips__chip" data-tone={chip.tone ?? 'neutral'} data-smrt-part="badge">
|
|
32
32
|
<span>{chip.label}</span>
|
|
33
33
|
{#if chip.value !== undefined}
|
|
34
34
|
<Badge size="sm" variant={chip.tone === 'error' ? 'error' : 'default'}>
|
|
@@ -42,7 +42,8 @@ const { t } = useI18n();
|
|
|
42
42
|
|
|
43
43
|
<style>
|
|
44
44
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
45
|
-
|
|
45
|
+
|
|
46
|
+
@layer smrt.structure {
|
|
46
47
|
.smrt-system-status-chips {
|
|
47
48
|
display: flex;
|
|
48
49
|
flex-wrap: nowrap;
|
|
@@ -51,7 +52,6 @@ const { t } = useI18n();
|
|
|
51
52
|
gap: var(--smrt-spacing-2);
|
|
52
53
|
align-items: center;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
55
|
.smrt-system-status-chips a,
|
|
56
56
|
.smrt-system-status-chips__chip {
|
|
57
57
|
display: inline-flex;
|
|
@@ -60,36 +60,50 @@ const { t } = useI18n();
|
|
|
60
60
|
align-items: center;
|
|
61
61
|
gap: var(--smrt-spacing-2);
|
|
62
62
|
min-inline-size: 0;
|
|
63
|
-
color: var(--smrt-color-on-surface);
|
|
64
|
-
text-decoration: none;
|
|
65
63
|
}
|
|
66
|
-
|
|
67
64
|
/* Every tone is a lamp beside on-surface text; none of them paints the
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
letterforms. Status hues are chosen to be recognisable at a glance, which
|
|
66
|
+
puts them in luminance bands that are not text-safe on light surfaces —
|
|
67
|
+
measured worst-case as TEXT across all five presets: warning falls to
|
|
68
|
+
1.41:1 (material and studio light), error to 2.65:1 (glass light), success
|
|
69
|
+
to 1.66:1 (glass light). A lamp carries the same meaning with no contrast
|
|
70
|
+
obligation, and keeps the component correct under any palette rather than
|
|
71
|
+
depending on each preset tuning three hues for text (#2323). */
|
|
75
72
|
.smrt-system-status-chips [data-tone='success']::before,
|
|
76
73
|
.smrt-system-status-chips [data-tone='warning']::before,
|
|
77
74
|
.smrt-system-status-chips [data-tone='error']::before {
|
|
78
|
-
content: '';
|
|
79
75
|
flex: none;
|
|
80
76
|
inline-size: 0.5rem;
|
|
81
77
|
block-size: 0.5rem;
|
|
82
|
-
border-radius: var(--smrt-radius-full);
|
|
83
78
|
}
|
|
79
|
+
}
|
|
84
80
|
|
|
81
|
+
@layer smrt.theme {
|
|
82
|
+
.smrt-system-status-chips a,
|
|
83
|
+
.smrt-system-status-chips__chip {
|
|
84
|
+
color: var(--smrt-color-on-surface);
|
|
85
|
+
text-decoration: none;
|
|
86
|
+
}
|
|
87
|
+
/* Every tone is a lamp beside on-surface text; none of them paints the
|
|
88
|
+
letterforms. Status hues are chosen to be recognisable at a glance, which
|
|
89
|
+
puts them in luminance bands that are not text-safe on light surfaces —
|
|
90
|
+
measured worst-case as TEXT across all five presets: warning falls to
|
|
91
|
+
1.41:1 (material and studio light), error to 2.65:1 (glass light), success
|
|
92
|
+
to 1.66:1 (glass light). A lamp carries the same meaning with no contrast
|
|
93
|
+
obligation, and keeps the component correct under any palette rather than
|
|
94
|
+
depending on each preset tuning three hues for text (#2323). */
|
|
95
|
+
.smrt-system-status-chips [data-tone='success']::before,
|
|
96
|
+
.smrt-system-status-chips [data-tone='warning']::before,
|
|
97
|
+
.smrt-system-status-chips [data-tone='error']::before {
|
|
98
|
+
content: '';
|
|
99
|
+
border-radius: var(--smrt-radius-full);
|
|
100
|
+
}
|
|
85
101
|
.smrt-system-status-chips [data-tone='success']::before {
|
|
86
102
|
background: var(--smrt-color-success);
|
|
87
103
|
}
|
|
88
|
-
|
|
89
104
|
.smrt-system-status-chips [data-tone='warning']::before {
|
|
90
105
|
background: var(--smrt-color-warning);
|
|
91
106
|
}
|
|
92
|
-
|
|
93
107
|
.smrt-system-status-chips [data-tone='error']::before {
|
|
94
108
|
background: var(--smrt-color-error);
|
|
95
109
|
}
|
|
@@ -170,9 +170,9 @@ function fallbackIcon(label: string): string {
|
|
|
170
170
|
<span
|
|
171
171
|
class="smrt-tenant-nav__attention"
|
|
172
172
|
data-attention
|
|
173
|
-
aria-hidden="true"
|
|
173
|
+
aria-hidden="true" data-smrt-part="indicator"
|
|
174
174
|
></span>
|
|
175
|
-
<span class="smrt-tenant-nav__sr-only">({label})</span>
|
|
175
|
+
<span class="smrt-tenant-nav__sr-only" data-smrt-part="label">({label})</span>
|
|
176
176
|
{/if}
|
|
177
177
|
{/snippet}
|
|
178
178
|
|
|
@@ -181,30 +181,30 @@ function fallbackIcon(label: string): string {
|
|
|
181
181
|
{@const action = showAction(item, groupCurrent ?? isItemCurrent(item))
|
|
182
182
|
? item.action
|
|
183
183
|
: undefined}
|
|
184
|
-
<div class="smrt-tenant-nav__section" in:fly={reveal()} animate:flipRow>
|
|
185
|
-
<div class="smrt-tenant-nav__row">
|
|
184
|
+
<div class="smrt-tenant-nav__section" in:fly={reveal()} animate:flipRow data-smrt-part="section">
|
|
185
|
+
<div class="smrt-tenant-nav__row" data-smrt-part="row">
|
|
186
186
|
<a
|
|
187
187
|
use:target={item.id ?? item.href}
|
|
188
188
|
href={item.href}
|
|
189
189
|
class:smrt-tenant-nav__link--visible-active={isVisibleActive(item)}
|
|
190
190
|
aria-current={isActive(item) ? 'page' : undefined}
|
|
191
191
|
title={collapsed ? item.label : item.description}
|
|
192
|
-
onclick={onNavigate}
|
|
192
|
+
onclick={onNavigate} data-smrt-part="link"
|
|
193
193
|
>
|
|
194
194
|
{#if item.icon}
|
|
195
|
-
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
195
|
+
<span class="smrt-tenant-nav__icon" aria-hidden="true" data-smrt-part="icon">
|
|
196
196
|
{@render glyph(item.icon, 18)}
|
|
197
197
|
</span>
|
|
198
198
|
{:else if collapsed}
|
|
199
199
|
<span
|
|
200
200
|
class="smrt-tenant-nav__icon smrt-tenant-nav__icon--placeholder"
|
|
201
|
-
aria-hidden="true"
|
|
201
|
+
aria-hidden="true" data-smrt-part="icon"
|
|
202
202
|
>
|
|
203
203
|
<ShellSectionIcon name={SHELL_PLACEHOLDER_ICON} size={18} />
|
|
204
204
|
</span>
|
|
205
205
|
{/if}
|
|
206
206
|
{#if collapsed}
|
|
207
|
-
<span class="smrt-tenant-nav__sr-only">{item.label}</span>
|
|
207
|
+
<span class="smrt-tenant-nav__sr-only" data-smrt-part="label">{item.label}</span>
|
|
208
208
|
{:else}
|
|
209
209
|
<strong>{item.label}</strong>
|
|
210
210
|
{#if item.badge !== null && item.badge !== undefined}
|
|
@@ -220,16 +220,16 @@ function fallbackIcon(label: string): string {
|
|
|
220
220
|
aria-label={action.label}
|
|
221
221
|
aria-current={isActive(action) ? 'page' : undefined}
|
|
222
222
|
title={action.label}
|
|
223
|
-
onclick={onNavigate}
|
|
223
|
+
onclick={onNavigate} data-smrt-part="actions"
|
|
224
224
|
>
|
|
225
|
-
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
225
|
+
<span class="smrt-tenant-nav__icon" aria-hidden="true" data-smrt-part="icon">
|
|
226
226
|
{@render glyph(action.icon ?? DEFAULT_ACTION_ICON, 16)}
|
|
227
227
|
</span>
|
|
228
228
|
</a>
|
|
229
229
|
{/if}
|
|
230
230
|
</div>
|
|
231
231
|
{#if item.children?.length && !collapsed}
|
|
232
|
-
<div class="smrt-tenant-nav__children">
|
|
232
|
+
<div class="smrt-tenant-nav__children" data-smrt-part="list">
|
|
233
233
|
{#each item.children as child (child.href)}
|
|
234
234
|
<a
|
|
235
235
|
href={child.href}
|
|
@@ -237,7 +237,7 @@ function fallbackIcon(label: string): string {
|
|
|
237
237
|
onclick={onNavigate}
|
|
238
238
|
>
|
|
239
239
|
{#if child.icon}
|
|
240
|
-
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
240
|
+
<span class="smrt-tenant-nav__icon" aria-hidden="true" data-smrt-part="icon">
|
|
241
241
|
{@render glyph(child.icon, 16)}
|
|
242
242
|
</span>
|
|
243
243
|
{/if}
|
|
@@ -266,8 +266,8 @@ function fallbackIcon(label: string): string {
|
|
|
266
266
|
{#if navMode === 'sections' || navMode === 'sections-with-items'}
|
|
267
267
|
{@const href = groupHref(group)}
|
|
268
268
|
{#if href}
|
|
269
|
-
<div class="smrt-tenant-nav__section" data-nav-section={groupId(group)} in:fly={reveal()}>
|
|
270
|
-
<div class="smrt-tenant-nav__row">
|
|
269
|
+
<div class="smrt-tenant-nav__section" data-nav-section={groupId(group)} in:fly={reveal()} data-smrt-part="section">
|
|
270
|
+
<div class="smrt-tenant-nav__row" data-smrt-part="row">
|
|
271
271
|
<a
|
|
272
272
|
use:target={groupId(group)}
|
|
273
273
|
{href}
|
|
@@ -275,9 +275,9 @@ function fallbackIcon(label: string): string {
|
|
|
275
275
|
class:smrt-tenant-nav__link--visible-active={isSectionCurrent(group)}
|
|
276
276
|
aria-current={href === currentHref ? 'page' : isSectionCurrent(group) ? 'true' : undefined}
|
|
277
277
|
title={collapsed ? group.heading : undefined}
|
|
278
|
-
onclick={onNavigate}
|
|
278
|
+
onclick={onNavigate} data-smrt-part="link"
|
|
279
279
|
>
|
|
280
|
-
<span class="smrt-tenant-nav__icon" aria-hidden="true">
|
|
280
|
+
<span class="smrt-tenant-nav__icon" aria-hidden="true" data-smrt-part="icon">
|
|
281
281
|
<ShellSectionIcon
|
|
282
282
|
name={group.icon ?? SHELL_DEFAULT_SECTION_ICON}
|
|
283
283
|
size={18}
|
|
@@ -285,34 +285,34 @@ function fallbackIcon(label: string): string {
|
|
|
285
285
|
/>
|
|
286
286
|
</span>
|
|
287
287
|
{#if collapsed}
|
|
288
|
-
<span class="smrt-tenant-nav__sr-only">{group.heading}</span>
|
|
288
|
+
<span class="smrt-tenant-nav__sr-only" data-smrt-part="label">{group.heading}</span>
|
|
289
289
|
{:else}
|
|
290
290
|
<strong>{group.heading}</strong>
|
|
291
291
|
{/if}
|
|
292
292
|
</a>
|
|
293
293
|
</div>
|
|
294
294
|
{#if navMode === 'sections-with-items' && !collapsed && group.items.length}
|
|
295
|
-
<div class="smrt-tenant-nav__subnav">
|
|
295
|
+
<div class="smrt-tenant-nav__subnav" data-smrt-part="list">
|
|
296
296
|
{@render navItems(group.items, isGroupCurrent(group))}
|
|
297
297
|
</div>
|
|
298
298
|
{/if}
|
|
299
299
|
</div>
|
|
300
300
|
{/if}
|
|
301
301
|
{:else if group.showTitle === false}
|
|
302
|
-
<div class="smrt-tenant-nav__group smrt-tenant-nav__group--flat" role="group" aria-label={group.heading}>
|
|
303
|
-
<div class="smrt-tenant-nav__group-items">{@render navItems(group.items, isGroupCurrent(group))}</div>
|
|
302
|
+
<div class="smrt-tenant-nav__group smrt-tenant-nav__group--flat" role="group" aria-label={group.heading} data-smrt-part="group">
|
|
303
|
+
<div class="smrt-tenant-nav__group-items" data-smrt-part="list">{@render navItems(group.items, isGroupCurrent(group))}</div>
|
|
304
304
|
</div>
|
|
305
305
|
{:else}
|
|
306
|
-
<details class="smrt-tenant-nav__group" aria-label={group.heading} open>
|
|
307
|
-
<summary class="smrt-tenant-nav__heading">
|
|
306
|
+
<details class="smrt-tenant-nav__group" aria-label={group.heading} open data-smrt-part="group">
|
|
307
|
+
<summary class="smrt-tenant-nav__heading" data-smrt-part="header">
|
|
308
308
|
{#if collapsed}
|
|
309
309
|
<span aria-hidden="true">{fallbackIcon(group.heading)}</span>
|
|
310
|
-
<span class="smrt-tenant-nav__sr-only">{group.heading}</span>
|
|
310
|
+
<span class="smrt-tenant-nav__sr-only" data-smrt-part="label">{group.heading}</span>
|
|
311
311
|
{:else}
|
|
312
312
|
<span>{group.heading}</span>
|
|
313
313
|
{/if}
|
|
314
314
|
</summary>
|
|
315
|
-
<div class="smrt-tenant-nav__group-items">{@render navItems(group.items, isGroupCurrent(group))}</div>
|
|
315
|
+
<div class="smrt-tenant-nav__group-items" data-smrt-part="list">{@render navItems(group.items, isGroupCurrent(group))}</div>
|
|
316
316
|
</details>
|
|
317
317
|
{/if}
|
|
318
318
|
{/each}
|
|
@@ -320,8 +320,8 @@ function fallbackIcon(label: string): string {
|
|
|
320
320
|
|
|
321
321
|
<style>
|
|
322
322
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
|
|
324
|
+
@layer smrt.structure {
|
|
325
325
|
.smrt-tenant-nav,
|
|
326
326
|
.smrt-tenant-nav__section,
|
|
327
327
|
.smrt-tenant-nav__children,
|
|
@@ -329,14 +329,16 @@ function fallbackIcon(label: string): string {
|
|
|
329
329
|
display: grid;
|
|
330
330
|
gap: var(--smrt-spacing-1);
|
|
331
331
|
}
|
|
332
|
-
|
|
333
332
|
.smrt-tenant-nav__row {
|
|
334
333
|
display: flex;
|
|
335
334
|
align-items: center;
|
|
336
335
|
gap: var(--smrt-spacing-1);
|
|
337
336
|
min-inline-size: 0;
|
|
338
337
|
}
|
|
339
|
-
.smrt-tenant-nav__row > a:first-child {
|
|
338
|
+
.smrt-tenant-nav__row > a:first-child {
|
|
339
|
+
flex: 1 1 auto;
|
|
340
|
+
min-inline-size: 0;
|
|
341
|
+
}
|
|
340
342
|
.smrt-tenant-nav a.smrt-tenant-nav__action {
|
|
341
343
|
flex: 0 0 auto;
|
|
342
344
|
display: inline-grid;
|
|
@@ -345,28 +347,16 @@ function fallbackIcon(label: string): string {
|
|
|
345
347
|
inline-size: max(2rem, var(--smrt-control-target-min));
|
|
346
348
|
block-size: max(2rem, var(--smrt-control-target-min));
|
|
347
349
|
padding: 0;
|
|
348
|
-
color: var(--smrt-color-on-surface-variant);
|
|
349
|
-
}
|
|
350
|
-
.smrt-tenant-nav a.smrt-tenant-nav__action:focus-visible {
|
|
351
|
-
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
352
|
-
outline-offset: var(--smrt-focus-ring-offset);
|
|
353
350
|
}
|
|
354
|
-
|
|
355
351
|
.smrt-tenant-nav__heading {
|
|
356
352
|
box-sizing: border-box;
|
|
357
353
|
min-block-size: var(--smrt-control-target-min);
|
|
358
354
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
359
|
-
color: var(--smrt-color-on-surface-variant);
|
|
360
|
-
font-size: var(--smrt-typography-label-large-size);
|
|
361
|
-
font-weight: var(--smrt-typography-weight-semibold);
|
|
362
|
-
border-radius: var(--smrt-control-radius);
|
|
363
355
|
cursor: pointer;
|
|
364
356
|
}
|
|
365
|
-
.smrt-tenant-
|
|
366
|
-
|
|
367
|
-
outline-offset: var(--smrt-focus-ring-offset);
|
|
357
|
+
.smrt-tenant-nav__group-items {
|
|
358
|
+
margin-block-start: var(--smrt-spacing-1);
|
|
368
359
|
}
|
|
369
|
-
.smrt-tenant-nav__group-items { margin-block-start: var(--smrt-spacing-1); }
|
|
370
360
|
.smrt-tenant-nav__subnav {
|
|
371
361
|
display: grid;
|
|
372
362
|
gap: var(--smrt-spacing-1);
|
|
@@ -380,14 +370,21 @@ function fallbackIcon(label: string): string {
|
|
|
380
370
|
block-size: max(2.25rem, var(--smrt-control-target-min));
|
|
381
371
|
padding: 0;
|
|
382
372
|
}
|
|
383
|
-
.smrt-tenant-nav--collapsed .smrt-tenant-nav__heading::-webkit-details-marker {
|
|
384
|
-
|
|
373
|
+
.smrt-tenant-nav--collapsed .smrt-tenant-nav__heading::-webkit-details-marker {
|
|
374
|
+
display: none;
|
|
375
|
+
}
|
|
385
376
|
/* Phone rows use the touch target; comfortable density opts back out. */
|
|
386
377
|
@media (max-width: 48rem) {
|
|
387
|
-
.smrt-tenant-nav {
|
|
378
|
+
.smrt-tenant-nav {
|
|
379
|
+
--smrt-control-target-min: var(--smrt-touch-target-min);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
.smrt-tenant-nav[data-density='touch'] {
|
|
383
|
+
--smrt-control-target-min: var(--smrt-touch-target-min);
|
|
384
|
+
}
|
|
385
|
+
.smrt-tenant-nav[data-density='comfortable'] {
|
|
386
|
+
--smrt-control-target-min: 0px;
|
|
388
387
|
}
|
|
389
|
-
.smrt-tenant-nav[data-density='touch'] { --smrt-control-target-min: var(--smrt-touch-target-min); }
|
|
390
|
-
.smrt-tenant-nav[data-density='comfortable'] { --smrt-control-target-min: 0px; }
|
|
391
388
|
.smrt-tenant-nav a {
|
|
392
389
|
box-sizing: border-box;
|
|
393
390
|
min-block-size: var(--smrt-control-target-min);
|
|
@@ -400,16 +397,11 @@ function fallbackIcon(label: string): string {
|
|
|
400
397
|
gap: var(--smrt-spacing-2);
|
|
401
398
|
min-inline-size: 0;
|
|
402
399
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
403
|
-
border-radius: var(--smrt-control-radius);
|
|
404
|
-
color: var(--smrt-color-on-surface);
|
|
405
|
-
text-decoration: none;
|
|
406
400
|
}
|
|
407
|
-
|
|
408
401
|
.smrt-tenant-nav--collapsed,
|
|
409
402
|
.smrt-tenant-nav--collapsed .smrt-tenant-nav__section {
|
|
410
403
|
justify-items: center;
|
|
411
404
|
}
|
|
412
|
-
|
|
413
405
|
.smrt-tenant-nav--collapsed a {
|
|
414
406
|
grid-template-columns: minmax(0, 1fr);
|
|
415
407
|
place-items: center;
|
|
@@ -417,55 +409,29 @@ function fallbackIcon(label: string): string {
|
|
|
417
409
|
block-size: max(2.25rem, var(--smrt-control-target-min));
|
|
418
410
|
padding: 0;
|
|
419
411
|
}
|
|
420
|
-
|
|
421
412
|
/* One state layer for every row: a currentColor veil driven by the
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
413
|
+
theme's hover / pressed tokens. The selected container fill and the
|
|
414
|
+
start indicator below sit under it, so hover still reads on a selected
|
|
415
|
+
row. */
|
|
425
416
|
.smrt-tenant-nav a::after,
|
|
426
417
|
.smrt-tenant-nav__heading::after {
|
|
427
|
-
content: '';
|
|
428
418
|
position: absolute;
|
|
429
419
|
inset: 0;
|
|
430
|
-
border-radius: inherit;
|
|
431
|
-
background: currentColor;
|
|
432
|
-
opacity: 0;
|
|
433
420
|
pointer-events: none;
|
|
434
421
|
}
|
|
435
|
-
.smrt-tenant-nav__heading {
|
|
436
|
-
|
|
437
|
-
.smrt-tenant-nav__heading:hover::after {
|
|
438
|
-
opacity: var(--smrt-state-hover);
|
|
439
|
-
}
|
|
440
|
-
.smrt-tenant-nav a:active::after,
|
|
441
|
-
.smrt-tenant-nav__heading:active::after {
|
|
442
|
-
opacity: var(--smrt-state-pressed);
|
|
422
|
+
.smrt-tenant-nav__heading {
|
|
423
|
+
position: relative;
|
|
443
424
|
}
|
|
444
425
|
.smrt-tenant-nav a[aria-disabled='true'] {
|
|
445
|
-
opacity: var(--smrt-state-disabled);
|
|
446
426
|
pointer-events: none;
|
|
447
427
|
}
|
|
448
|
-
/* Selected: container fill plus a start indicator bar, not just weight. */
|
|
449
|
-
.smrt-tenant-nav a[aria-current='page'],
|
|
450
|
-
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active {
|
|
451
|
-
background: var(--smrt-color-secondary-container);
|
|
452
|
-
color: var(--smrt-color-on-secondary-container);
|
|
453
|
-
}
|
|
454
428
|
.smrt-tenant-nav a[aria-current='page']::before,
|
|
455
429
|
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active::before {
|
|
456
|
-
content: '';
|
|
457
430
|
position: absolute;
|
|
458
431
|
inset-block: var(--smrt-spacing-2);
|
|
459
432
|
inset-inline-start: 0;
|
|
460
433
|
inline-size: var(--smrt-spacing-1);
|
|
461
|
-
border-radius: var(--smrt-radius-full);
|
|
462
|
-
background: var(--smrt-color-primary);
|
|
463
|
-
}
|
|
464
|
-
.smrt-tenant-nav a[aria-current='page'] small,
|
|
465
|
-
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active small {
|
|
466
|
-
color: inherit;
|
|
467
434
|
}
|
|
468
|
-
|
|
469
435
|
.smrt-tenant-nav__icon {
|
|
470
436
|
display: inline-grid;
|
|
471
437
|
place-items: center;
|
|
@@ -473,46 +439,29 @@ function fallbackIcon(label: string): string {
|
|
|
473
439
|
block-size: 1.25rem;
|
|
474
440
|
min-inline-size: 1.25rem;
|
|
475
441
|
}
|
|
476
|
-
|
|
477
|
-
.smrt-tenant-nav__icon--placeholder {
|
|
478
|
-
color: var(--smrt-color-on-surface-variant);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
442
|
.smrt-tenant-nav strong,
|
|
482
443
|
.smrt-tenant-nav span {
|
|
483
444
|
overflow: hidden;
|
|
484
445
|
text-overflow: ellipsis;
|
|
485
446
|
white-space: nowrap;
|
|
486
447
|
}
|
|
487
|
-
|
|
488
|
-
.smrt-tenant-nav small {
|
|
489
|
-
color: var(--smrt-color-on-surface-variant);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
448
|
.smrt-tenant-nav__children {
|
|
493
449
|
padding-inline-start: var(--smrt-spacing-4);
|
|
494
450
|
}
|
|
495
|
-
|
|
496
451
|
.smrt-tenant-nav a {
|
|
497
452
|
position: relative;
|
|
498
453
|
}
|
|
499
|
-
|
|
500
454
|
.smrt-tenant-nav__attention {
|
|
501
455
|
inline-size: 0.5rem;
|
|
502
456
|
block-size: 0.5rem;
|
|
503
|
-
border-radius: var(--smrt-radius-full);
|
|
504
|
-
background: var(--smrt-color-error);
|
|
505
457
|
justify-self: end;
|
|
506
458
|
}
|
|
507
|
-
|
|
508
459
|
/* Collapsed: the dot sits on the icon's corner. */
|
|
509
460
|
.smrt-tenant-nav--collapsed .smrt-tenant-nav__attention {
|
|
510
461
|
position: absolute;
|
|
511
462
|
inset-block-start: 0.125rem;
|
|
512
463
|
inset-inline-end: 0.125rem;
|
|
513
|
-
box-shadow: 0 0 0 var(--smrt-focus-ring-width) var(--smrt-surface-panel);
|
|
514
464
|
}
|
|
515
|
-
|
|
516
465
|
.smrt-tenant-nav__sr-only {
|
|
517
466
|
position: absolute;
|
|
518
467
|
inline-size: 1px;
|
|
@@ -522,15 +471,107 @@ function fallbackIcon(label: string): string {
|
|
|
522
471
|
overflow: hidden;
|
|
523
472
|
clip: rect(0, 0, 0, 0);
|
|
524
473
|
white-space: nowrap;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
@layer smrt.theme {
|
|
478
|
+
a:global([data-smrt-highlighted='true']) {
|
|
479
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-color-primary);
|
|
480
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
481
|
+
}
|
|
482
|
+
.smrt-tenant-nav a.smrt-tenant-nav__action {
|
|
483
|
+
color: var(--smrt-color-on-surface-variant);
|
|
484
|
+
}
|
|
485
|
+
.smrt-tenant-nav a.smrt-tenant-nav__action:focus-visible {
|
|
486
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
487
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
488
|
+
}
|
|
489
|
+
.smrt-tenant-nav__heading {
|
|
490
|
+
color: var(--smrt-color-on-surface-variant);
|
|
491
|
+
font-size: var(--smrt-typography-label-large-size);
|
|
492
|
+
font-weight: var(--smrt-typography-weight-semibold);
|
|
493
|
+
border-radius: var(--smrt-control-radius);
|
|
494
|
+
}
|
|
495
|
+
.smrt-tenant-nav__heading:focus-visible {
|
|
496
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
497
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
498
|
+
}
|
|
499
|
+
.smrt-tenant-nav a {
|
|
500
|
+
border-radius: var(--smrt-control-radius);
|
|
501
|
+
color: var(--smrt-color-on-surface);
|
|
502
|
+
text-decoration: none;
|
|
503
|
+
}
|
|
504
|
+
/* One state layer for every row: a currentColor veil driven by the
|
|
505
|
+
theme's hover / pressed tokens. The selected container fill and the
|
|
506
|
+
start indicator below sit under it, so hover still reads on a selected
|
|
507
|
+
row. */
|
|
508
|
+
.smrt-tenant-nav a::after,
|
|
509
|
+
.smrt-tenant-nav__heading::after {
|
|
510
|
+
content: '';
|
|
511
|
+
border-radius: inherit;
|
|
512
|
+
background: currentColor;
|
|
513
|
+
opacity: 0;
|
|
514
|
+
}
|
|
515
|
+
.smrt-tenant-nav a:hover::after,
|
|
516
|
+
.smrt-tenant-nav__heading:hover::after {
|
|
517
|
+
opacity: var(--smrt-state-hover);
|
|
518
|
+
}
|
|
519
|
+
.smrt-tenant-nav a:active::after,
|
|
520
|
+
.smrt-tenant-nav__heading:active::after {
|
|
521
|
+
opacity: var(--smrt-state-pressed);
|
|
522
|
+
}
|
|
523
|
+
.smrt-tenant-nav a[aria-disabled='true'] {
|
|
524
|
+
opacity: var(--smrt-state-disabled);
|
|
525
|
+
}
|
|
526
|
+
/* Selected: container fill plus a start indicator bar, not just weight. */
|
|
527
|
+
.smrt-tenant-nav a[aria-current='page'],
|
|
528
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active {
|
|
529
|
+
background: var(--smrt-color-secondary-container);
|
|
530
|
+
color: var(--smrt-color-on-secondary-container);
|
|
531
|
+
}
|
|
532
|
+
.smrt-tenant-nav a[aria-current='page']::before,
|
|
533
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active::before {
|
|
534
|
+
content: '';
|
|
535
|
+
border-radius: var(--smrt-radius-full);
|
|
536
|
+
background: var(--smrt-color-primary);
|
|
537
|
+
}
|
|
538
|
+
.smrt-tenant-nav a[aria-current='page'] small,
|
|
539
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active small {
|
|
540
|
+
color: inherit;
|
|
541
|
+
}
|
|
542
|
+
.smrt-tenant-nav__icon--placeholder {
|
|
543
|
+
color: var(--smrt-color-on-surface-variant);
|
|
544
|
+
}
|
|
545
|
+
.smrt-tenant-nav small {
|
|
546
|
+
color: var(--smrt-color-on-surface-variant);
|
|
547
|
+
}
|
|
548
|
+
.smrt-tenant-nav__attention {
|
|
549
|
+
border-radius: var(--smrt-radius-full);
|
|
550
|
+
background: var(--smrt-color-error);
|
|
551
|
+
}
|
|
552
|
+
/* Collapsed: the dot sits on the icon's corner. */
|
|
553
|
+
.smrt-tenant-nav--collapsed .smrt-tenant-nav__attention {
|
|
554
|
+
box-shadow: 0 0 0 var(--smrt-focus-ring-width) var(--smrt-surface-panel);
|
|
555
|
+
}
|
|
556
|
+
.smrt-tenant-nav__sr-only {
|
|
525
557
|
border: 0;
|
|
526
558
|
}
|
|
527
559
|
/* Forced colors (#3908): selected and open states keep a non-colour indicator. */
|
|
528
560
|
@media (forced-colors: active) {
|
|
529
561
|
.smrt-tenant-nav a[aria-current='page'],
|
|
530
|
-
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active {
|
|
562
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active {
|
|
563
|
+
background: Canvas;
|
|
564
|
+
color: CanvasText;
|
|
565
|
+
font-weight: var(--smrt-typography-weight-bold);
|
|
566
|
+
}
|
|
531
567
|
.smrt-tenant-nav a[aria-current='page']::before,
|
|
532
|
-
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active::before {
|
|
533
|
-
|
|
568
|
+
.smrt-tenant-nav a.smrt-tenant-nav__link--visible-active::before {
|
|
569
|
+
background: Highlight;
|
|
570
|
+
}
|
|
571
|
+
.smrt-tenant-nav a[aria-disabled='true'] {
|
|
572
|
+
opacity: 1;
|
|
573
|
+
color: GrayText;
|
|
574
|
+
}
|
|
534
575
|
}
|
|
535
576
|
}
|
|
536
577
|
</style>
|