@happyvertical/smrt-svelte 0.55.16 → 0.55.18
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 +155 -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 +279 -14
- 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 +53 -11
- 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 +9 -4
- package/dist/components/workspace/admin-shell/AdminShell.svelte +642 -126
- 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 +58 -14
- 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 +15 -6
- 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 +11 -7
- package/dist/components/workspace/admin-shell/ShellLayoutEditor.svelte +6 -3
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte +19 -13
- 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 +8 -5
- package/dist/components/workspace/admin-shell/ShellSectionIcon.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte +24 -17
- 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 +112 -43
- 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 +322 -55
- 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
|
@@ -19,6 +19,7 @@ import Sortable from '../../sortable/Sortable.svelte';
|
|
|
19
19
|
import type { SortableItem, SortableItemMove } from '../../sortable/types.js';
|
|
20
20
|
import { useShellLayout } from './layout-context.js';
|
|
21
21
|
import type { ShellLayoutController } from './layout-controller.svelte.js';
|
|
22
|
+
import { flipRow } from './motion.js';
|
|
22
23
|
import ShellIconButton from './ShellIconButton.svelte';
|
|
23
24
|
import ShellSectionIcon from './ShellSectionIcon.svelte';
|
|
24
25
|
import { SHELL_DEFAULT_SECTION_ICON, SHELL_ICON_PATHS } from './shell-icons.js';
|
|
@@ -130,7 +131,7 @@ function onmove(move: SortableItemMove<SortableItem>): void {
|
|
|
130
131
|
class="smrt-section-menu"
|
|
131
132
|
class:smrt-section-menu--cards={layoutMode === 'cards'}
|
|
132
133
|
bind:this={rootEl}
|
|
133
|
-
data-editing={editing ? '' : undefined}
|
|
134
|
+
data-editing={editing ? '' : undefined} data-smrt-component="ShellSectionMenu"
|
|
134
135
|
>
|
|
135
136
|
{#if editing}
|
|
136
137
|
<Sortable
|
|
@@ -203,12 +204,14 @@ function onmove(move: SortableItemMove<SortableItem>): void {
|
|
|
203
204
|
{:else if layoutMode === 'cards'}
|
|
204
205
|
<ul class="smrt-section-menu__cards" aria-label={listLabel}>
|
|
205
206
|
{#each entries as entry (entry.id)}
|
|
206
|
-
<li class="smrt-section-menu__card">
|
|
207
|
+
<li class="smrt-section-menu__card" animate:flipRow>
|
|
207
208
|
<a class="smrt-section-menu__card-link" href={entry.href} onclick={onNavigate}>
|
|
208
|
-
<span class="smrt-section-menu__card-
|
|
209
|
-
<
|
|
209
|
+
<span class="smrt-section-menu__card-heading">
|
|
210
|
+
<span class="smrt-section-menu__card-icon">
|
|
211
|
+
<ShellSectionIcon name={entry.icon ?? SHELL_DEFAULT_SECTION_ICON} size={28} iconComponent={IconComponent} />
|
|
212
|
+
</span>
|
|
213
|
+
<span class="smrt-section-menu__card-title">{entry.label}</span>
|
|
210
214
|
</span>
|
|
211
|
-
<span class="smrt-section-menu__card-title">{entry.label}</span>
|
|
212
215
|
{#if entry.item.description}
|
|
213
216
|
<span class="smrt-section-menu__desc">{entry.item.description}</span>
|
|
214
217
|
{/if}
|
|
@@ -225,7 +228,7 @@ function onmove(move: SortableItemMove<SortableItem>): void {
|
|
|
225
228
|
{:else}
|
|
226
229
|
<ul class="smrt-section-menu__list" aria-label={listLabel}>
|
|
227
230
|
{#each entries as entry (entry.id)}
|
|
228
|
-
<li class="smrt-section-menu__item">
|
|
231
|
+
<li class="smrt-section-menu__item" animate:flipRow>
|
|
229
232
|
<a class="smrt-section-menu__link" href={entry.href} onclick={onNavigate}>
|
|
230
233
|
{#if entry.icon}
|
|
231
234
|
<ShellSectionIcon name={entry.icon} iconComponent={IconComponent} />
|
|
@@ -242,33 +245,36 @@ function onmove(move: SortableItemMove<SortableItem>): void {
|
|
|
242
245
|
</div>
|
|
243
246
|
|
|
244
247
|
<style>
|
|
248
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
249
|
+
@layer smrt.theme {
|
|
245
250
|
.smrt-section-menu { min-inline-size: 0; }
|
|
246
251
|
.smrt-section-menu__list { display: grid; gap: var(--smrt-spacing-1); margin: 0; padding: 0; list-style: none; }
|
|
247
|
-
.smrt-section-menu__item { position: relative; display: flex; align-items: center; gap: var(--smrt-spacing-3); min-inline-size: 0; padding: var(--smrt-spacing-2) var(--smrt-spacing-3); border:
|
|
248
|
-
.smrt-section-menu__item:hover { background: var(--smrt-
|
|
252
|
+
.smrt-section-menu__item { position: relative; display: flex; align-items: center; gap: var(--smrt-spacing-3); min-inline-size: 0; padding: var(--smrt-spacing-2) var(--smrt-spacing-3); border: var(--smrt-hairline); border-radius: var(--smrt-control-radius); background: var(--smrt-surface-panel); color: var(--smrt-color-on-surface); }
|
|
253
|
+
.smrt-section-menu__item:hover { background: color-mix(in srgb, var(--smrt-surface-panel), currentColor calc(var(--smrt-state-hover) * 100%)); }
|
|
254
|
+
.smrt-section-menu__item:active { background: color-mix(in srgb, var(--smrt-surface-panel), currentColor calc(var(--smrt-state-pressed) * 100%)); }
|
|
249
255
|
.smrt-section-menu__link { flex: 1 1 auto; display: flex; align-items: center; gap: var(--smrt-spacing-3); min-inline-size: 0; min-block-size: var(--smrt-control-target-min, 2rem); color: inherit; text-decoration: none; }
|
|
250
256
|
/* The whole row follows the link; actions sit above the stretched target. */
|
|
251
257
|
.smrt-section-menu__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
252
258
|
.smrt-section-menu__link:focus-visible { outline: none; }
|
|
253
|
-
.smrt-section-menu__link:focus-visible::after { outline:
|
|
259
|
+
.smrt-section-menu__link:focus-visible::after { outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color); outline-offset: var(--smrt-focus-ring-offset); }
|
|
254
260
|
.smrt-section-menu__label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--smrt-typography-weight-medium, 500); }
|
|
255
261
|
.smrt-section-menu__meta { flex: 0 0 auto; color: var(--smrt-color-on-surface-variant); font-size: var(--smrt-typography-label-large-size); }
|
|
256
262
|
.smrt-section-menu__actions { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--smrt-spacing-1); }
|
|
257
263
|
.smrt-section-menu__chevron { flex: 0 0 auto; color: var(--smrt-color-on-surface-variant); }
|
|
258
264
|
/* Fixed icon column so labels align whatever the glyph (or a missing one). */
|
|
259
265
|
.smrt-section-menu :global(.smrt-shell-section-icon) { inline-size: 20px; block-size: 20px; }
|
|
260
|
-
|
|
261
|
-
the centred circle. */
|
|
262
|
-
.smrt-section-menu__card-icon :global(.smrt-shell-section-icon) { inline-size: 32px; block-size: 32px; }
|
|
266
|
+
.smrt-section-menu__card-icon :global(.smrt-shell-section-icon) { inline-size: 28px; block-size: 28px; }
|
|
263
267
|
/* Cards: a responsive grid; the whole card is one stretched link. */
|
|
264
268
|
.smrt-section-menu__cards, .smrt-section-menu--cards :global(.smrt-sortable__items) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: var(--smrt-spacing-3); margin: 0; padding: 0; list-style: none; }
|
|
265
|
-
.smrt-section-menu__card { position: relative; display: flex; flex-direction: column; gap: var(--smrt-spacing-3); min-inline-size: 0; padding: var(--smrt-spacing-4); border:
|
|
266
|
-
.smrt-section-menu__card:hover { background: var(--smrt-
|
|
269
|
+
.smrt-section-menu__card { position: relative; display: flex; flex-direction: column; gap: var(--smrt-spacing-3); min-inline-size: 0; padding: var(--smrt-spacing-4); border: var(--smrt-hairline); border-radius: var(--smrt-radius-large, var(--smrt-radius-medium)); background: var(--smrt-surface-panel); color: var(--smrt-color-on-surface); transition: background-color var(--smrt-duration-short2), border-color var(--smrt-duration-short2), transform var(--smrt-duration-short2); }
|
|
270
|
+
.smrt-section-menu__card:hover { background: color-mix(in srgb, var(--smrt-surface-panel), currentColor calc(var(--smrt-state-hover) * 100%)); border-color: var(--smrt-hairline-strong-color); }
|
|
271
|
+
.smrt-section-menu__card:active { background: color-mix(in srgb, var(--smrt-surface-panel), currentColor calc(var(--smrt-state-pressed) * 100%)); }
|
|
267
272
|
.smrt-section-menu__card-link { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--smrt-spacing-2); color: inherit; text-decoration: none; }
|
|
268
273
|
.smrt-section-menu__card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
|
|
269
274
|
.smrt-section-menu__card-link:focus-visible { outline: none; }
|
|
270
|
-
.smrt-section-menu__card-link:focus-visible::after { outline:
|
|
271
|
-
.smrt-section-menu__card-
|
|
275
|
+
.smrt-section-menu__card-link:focus-visible::after { outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color); outline-offset: var(--smrt-focus-ring-offset); }
|
|
276
|
+
.smrt-section-menu__card-heading { display: flex; align-items: center; gap: var(--smrt-spacing-2); min-inline-size: 0; }
|
|
277
|
+
.smrt-section-menu__card-icon { display: inline-grid; place-items: center; flex: 0 0 28px; inline-size: 28px; block-size: 28px; color: var(--smrt-color-primary); }
|
|
272
278
|
.smrt-section-menu__card-title { font-size: var(--smrt-typography-title-medium-size, 1rem); font-weight: var(--smrt-typography-weight-medium, 500); overflow-wrap: anywhere; }
|
|
273
279
|
.smrt-section-menu__desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--smrt-color-on-surface-variant); font-size: var(--smrt-typography-body-medium-size, 0.875rem); }
|
|
274
280
|
.smrt-section-menu__card-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--smrt-spacing-2); }
|
|
@@ -281,10 +287,11 @@ function onmove(move: SortableItemMove<SortableItem>): void {
|
|
|
281
287
|
.smrt-section-menu :global(.smrt-sortable__container) { padding: 0; border: 0; background: transparent; gap: var(--smrt-spacing-1); }
|
|
282
288
|
.smrt-section-menu :global(.smrt-sortable__header) { display: none; }
|
|
283
289
|
.smrt-section-menu :global(.smrt-sortable__items) { gap: var(--smrt-spacing-1); }
|
|
284
|
-
.smrt-section-menu :global(.smrt-sortable__item) { border:
|
|
290
|
+
.smrt-section-menu :global(.smrt-sortable__item) { border: var(--smrt-hairline); border-radius: var(--smrt-control-radius); background: var(--smrt-surface-panel); }
|
|
285
291
|
.smrt-section-menu :global(.smrt-sortable__handle) { inline-size: 1.5rem; block-size: 2rem; }
|
|
286
292
|
.smrt-section-menu__row { flex: 1 1 auto; min-inline-size: 0; display: flex; align-items: center; gap: var(--smrt-spacing-3); padding: var(--smrt-spacing-2) var(--smrt-spacing-1); }
|
|
287
293
|
.smrt-section-menu__row--muted { opacity: 0.55; }
|
|
288
294
|
.smrt-section-menu__row strong { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--smrt-typography-weight-medium, 500); }
|
|
289
295
|
:global(.smrt-section-menu__name) { flex: 1 1 auto; min-inline-size: 0; }
|
|
296
|
+
}
|
|
290
297
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellSectionMenu.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ShellSectionMenu.svelte.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ShellSectionMenu.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ShellSectionMenu.svelte.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAK3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD,UAAU,KAAK;IACb,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,aAAa,CAAC,EAAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACxC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA0LD,QAAA,MAAM,gBAAgB,0BAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,15 +1,70 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import {
|
|
4
|
+
ColorSchemeToggle,
|
|
5
|
+
ThemeSwitcher,
|
|
6
|
+
} from '@happyvertical/smrt-ui/themes';
|
|
3
7
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
8
|
+
import { useAuth } from '../../../hooks/useAuth.svelte.js';
|
|
4
9
|
import { M } from '../../../i18n/strings.workspace.js';
|
|
5
10
|
import { useAdminShell } from './context.js';
|
|
6
11
|
import HotkeyInput from './HotkeyInput.svelte';
|
|
12
|
+
import { tryUseShellLayout } from './layout-context.js';
|
|
7
13
|
import { resolveHotkey } from './settings.js';
|
|
14
|
+
import { SHELL_REGION_MESSAGES } from './slot-labels.js';
|
|
15
|
+
import type { ShellRegion } from './slots.js';
|
|
8
16
|
import type { PanelEdge, ShellHotkeyBinding } from './types.js';
|
|
9
17
|
|
|
18
|
+
interface Props {
|
|
19
|
+
/** Show the Appearance section (needs a `ThemeProvider` above). */
|
|
20
|
+
appearance?: boolean;
|
|
21
|
+
/** Show the Account section (needs the Provider's `useAuth()` above). */
|
|
22
|
+
account?: boolean;
|
|
23
|
+
/** Where the sign-out control goes; the control is hidden when neither this nor `onSignOut` is given. */
|
|
24
|
+
signOutHref?: string;
|
|
25
|
+
/** Called by the sign-out control instead of following `signOutHref`. */
|
|
26
|
+
onSignOut?: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
appearance = false,
|
|
31
|
+
account = false,
|
|
32
|
+
signOutHref,
|
|
33
|
+
onSignOut,
|
|
34
|
+
}: Props = $props();
|
|
35
|
+
|
|
10
36
|
const { t } = useI18n();
|
|
11
37
|
const shell = useAdminShell();
|
|
38
|
+
const layout = tryUseShellLayout();
|
|
39
|
+
const auth = account ? useAuth() : null;
|
|
12
40
|
const edges: PanelEdge[] = ['top', 'left', 'bottom', 'right'];
|
|
41
|
+
/** The identity `User` carries no display name; hosts may attach one (e.g. from the profile). */
|
|
42
|
+
const accountName = $derived.by(() => {
|
|
43
|
+
const name = (auth?.user as { name?: unknown } | null)?.name;
|
|
44
|
+
return typeof name === 'string' && name ? name : null;
|
|
45
|
+
});
|
|
46
|
+
const REGION_OF_EDGE: Record<PanelEdge, ShellRegion> = {
|
|
47
|
+
top: 'header',
|
|
48
|
+
bottom: 'footer',
|
|
49
|
+
left: 'leftSidebar',
|
|
50
|
+
right: 'rightSidebar',
|
|
51
|
+
};
|
|
52
|
+
const regionLabel = (edge: PanelEdge) =>
|
|
53
|
+
t(SHELL_REGION_MESSAGES[REGION_OF_EDGE[edge]]);
|
|
54
|
+
|
|
55
|
+
/** The areas this shell offers; hidden ones stay listed when a layout can restore them. */
|
|
56
|
+
const rows = $derived(
|
|
57
|
+
layout
|
|
58
|
+
? layout.panels
|
|
59
|
+
.filter((panel) => panel.available)
|
|
60
|
+
.map((panel) => ({ edge: panel.edge, visible: panel.visible }))
|
|
61
|
+
: edges
|
|
62
|
+
.filter((edge) => shell.panels[edge] !== 'hidden')
|
|
63
|
+
.map((edge) => ({ edge, visible: true })),
|
|
64
|
+
);
|
|
65
|
+
const visibleCount = $derived(rows.filter((row) => row.visible).length);
|
|
66
|
+
const shortcutRows = $derived(rows.filter((row) => row.visible));
|
|
67
|
+
const canSignOut = $derived(Boolean(signOutHref || onSignOut));
|
|
13
68
|
const hotkeysEnabled = $derived(shell.settings.hotkeysEnabled !== false);
|
|
14
69
|
|
|
15
70
|
function bindingFor(edge: PanelEdge): ShellHotkeyBinding | null {
|
|
@@ -34,64 +89,170 @@ function conflictFor(edge: PanelEdge): string | null {
|
|
|
34
89
|
|
|
35
90
|
<section
|
|
36
91
|
class="smrt-shell-settings-panel"
|
|
37
|
-
aria-label={t(M['ui.shell_settings_panel.shell_settings'])}
|
|
92
|
+
aria-label={t(M['ui.shell_settings_panel.shell_settings'])} data-smrt-component="ShellSettingsPanel"
|
|
38
93
|
>
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
94
|
+
{#if appearance}
|
|
95
|
+
<section data-smrt-part="appearance" aria-labelledby="smrt-shell-settings-appearance">
|
|
96
|
+
<h3 id="smrt-shell-settings-appearance">{t(M['ui.shell_settings.appearance'])}</h3>
|
|
97
|
+
<div class="smrt-shell-settings-panel__controls">
|
|
98
|
+
<ThemeSwitcher label={t(M['ui.shell_settings.theme'])} />
|
|
99
|
+
<ColorSchemeToggle ariaLabel={t(M['ui.shell_settings.color_scheme'])} />
|
|
100
|
+
</div>
|
|
101
|
+
</section>
|
|
102
|
+
{/if}
|
|
103
|
+
|
|
104
|
+
{#if auth}
|
|
105
|
+
<section data-smrt-part="account" aria-labelledby="smrt-shell-settings-account">
|
|
106
|
+
<h3 id="smrt-shell-settings-account">{t(M['ui.shell_settings.account'])}</h3>
|
|
107
|
+
{#if auth.user}
|
|
108
|
+
<dl>
|
|
109
|
+
{#if accountName}
|
|
110
|
+
<dt>{t(M['ui.shell_settings.account_name'])}</dt>
|
|
111
|
+
<dd>{accountName}</dd>
|
|
112
|
+
{/if}
|
|
113
|
+
<dt>{t(M['ui.shell_settings.account_email'])}</dt>
|
|
114
|
+
<dd>{auth.user.email}</dd>
|
|
115
|
+
</dl>
|
|
116
|
+
{:else}
|
|
117
|
+
<p>{t(M['ui.shell_settings.account_signed_out'])}</p>
|
|
118
|
+
{/if}
|
|
119
|
+
{#if canSignOut}
|
|
120
|
+
{#if onSignOut}
|
|
121
|
+
<Button variant="secondary" size="sm" onclick={onSignOut}>
|
|
122
|
+
{t(M['ui.shell_settings.sign_out'])}
|
|
123
|
+
</Button>
|
|
124
|
+
{:else}
|
|
125
|
+
<Button variant="secondary" size="sm" href={signOutHref}>
|
|
126
|
+
{t(M['ui.shell_settings.sign_out'])}
|
|
127
|
+
</Button>
|
|
128
|
+
{/if}
|
|
129
|
+
{/if}
|
|
130
|
+
</section>
|
|
131
|
+
{/if}
|
|
132
|
+
|
|
133
|
+
<section data-smrt-part="layout" aria-labelledby="smrt-shell-settings-layout">
|
|
134
|
+
<h3 id="smrt-shell-settings-layout">{t(M['ui.shell_settings.layout'])}</h3>
|
|
135
|
+
<p>{t(M['ui.shell_settings_panel.description'])}</p>
|
|
136
|
+
{#if layout?.editable}
|
|
137
|
+
<div class="smrt-shell-settings-panel__controls">
|
|
138
|
+
<Button
|
|
139
|
+
variant={layout.editing ? 'primary' : 'secondary'}
|
|
140
|
+
size="sm"
|
|
141
|
+
aria-pressed={layout.editing}
|
|
142
|
+
onclick={() => layout.setEditing(!layout.editing)}
|
|
143
|
+
>
|
|
144
|
+
{layout.editing
|
|
145
|
+
? t(M['ui.shell_settings.edit_layout_on'])
|
|
146
|
+
: t(M['ui.shell_settings.edit_layout_off'])}
|
|
147
|
+
</Button>
|
|
148
|
+
<Button
|
|
149
|
+
variant="ghost"
|
|
150
|
+
size="sm"
|
|
151
|
+
disabled={!layout.customized}
|
|
152
|
+
onclick={() => layout.reset()}
|
|
153
|
+
>
|
|
154
|
+
{t(M['ui.shell_settings.reset_layout'])}
|
|
155
|
+
</Button>
|
|
156
|
+
</div>
|
|
157
|
+
{:else if layout}
|
|
158
|
+
<div class="smrt-shell-settings-panel__controls">
|
|
159
|
+
<Button
|
|
160
|
+
variant="ghost"
|
|
161
|
+
size="sm"
|
|
162
|
+
disabled={!layout.customized}
|
|
163
|
+
onclick={() => layout.reset()}
|
|
164
|
+
>
|
|
165
|
+
{t(M['ui.shell_settings.reset_layout'])}
|
|
166
|
+
</Button>
|
|
167
|
+
</div>
|
|
168
|
+
{/if}
|
|
169
|
+
<div class="smrt-shell-settings-panel__grid">
|
|
170
|
+
{#each rows as row (row.edge)}
|
|
171
|
+
{@const label = regionLabel(row.edge)}
|
|
172
|
+
<div class="smrt-shell-settings-panel__row" data-edge={row.edge}>
|
|
60
173
|
<div>
|
|
61
|
-
<strong>{
|
|
62
|
-
<span>
|
|
174
|
+
<strong>{label}</strong>
|
|
175
|
+
<span>
|
|
176
|
+
{row.visible
|
|
177
|
+
? t(M['ui.shell_settings.region_shown'])
|
|
178
|
+
: t(M['ui.shell_settings.region_hidden'])}
|
|
179
|
+
</span>
|
|
63
180
|
</div>
|
|
64
181
|
<div class="smrt-shell-settings-panel__actions">
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
182
|
+
{#if layout}
|
|
183
|
+
<Button
|
|
184
|
+
variant="ghost"
|
|
185
|
+
size="sm"
|
|
186
|
+
disabled={row.visible && visibleCount <= 1}
|
|
187
|
+
aria-label={row.visible
|
|
188
|
+
? t(M['ui.shell_settings.hide_region'], { region: label })
|
|
189
|
+
: t(M['ui.shell_settings.show_region'], { region: label })}
|
|
190
|
+
onclick={() =>
|
|
191
|
+
layout.setPanel(row.edge, { visible: !row.visible })}
|
|
192
|
+
>
|
|
193
|
+
{row.visible
|
|
194
|
+
? t(M['ui.shell_settings.hide'])
|
|
195
|
+
: t(M['ui.shell_settings.show'])}
|
|
196
|
+
</Button>
|
|
197
|
+
{/if}
|
|
198
|
+
{#if row.visible && !shell.isInline(row.edge)}
|
|
199
|
+
<Button
|
|
200
|
+
variant="ghost"
|
|
201
|
+
size="sm"
|
|
202
|
+
onclick={() =>
|
|
203
|
+
shell.setPanel(
|
|
204
|
+
row.edge,
|
|
205
|
+
shell.panels[row.edge] === 'expanded'
|
|
206
|
+
? 'collapsed'
|
|
207
|
+
: 'expanded',
|
|
208
|
+
)}
|
|
209
|
+
>
|
|
210
|
+
{shell.panels[row.edge] === 'expanded'
|
|
211
|
+
? t(M['ui.shell_settings_panel.collapse'])
|
|
212
|
+
: t(M['ui.shell_settings_panel.expand'])}
|
|
213
|
+
</Button>
|
|
214
|
+
{/if}
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
{/each}
|
|
218
|
+
</div>
|
|
219
|
+
</section>
|
|
220
|
+
|
|
221
|
+
{#if shell.hotkeysAvailable}
|
|
222
|
+
<section data-smrt-part="shortcuts" aria-labelledby="smrt-shell-settings-shortcuts">
|
|
223
|
+
<header>
|
|
224
|
+
<h3 id="smrt-shell-settings-shortcuts">{t(M['ui.shell_settings.shortcuts'])}</h3>
|
|
225
|
+
<Button
|
|
226
|
+
variant={hotkeysEnabled ? 'secondary' : 'primary'}
|
|
227
|
+
size="sm"
|
|
228
|
+
onclick={() => shell.setHotkeysEnabled(!hotkeysEnabled)}
|
|
229
|
+
>
|
|
230
|
+
{hotkeysEnabled
|
|
231
|
+
? t(M['ui.shell_settings_panel.disable_hotkeys'])
|
|
232
|
+
: t(M['ui.shell_settings_panel.enable_hotkeys'])}
|
|
233
|
+
</Button>
|
|
234
|
+
</header>
|
|
235
|
+
<div class="smrt-shell-settings-panel__grid">
|
|
236
|
+
{#each shortcutRows as row (row.edge)}
|
|
237
|
+
<div class="smrt-shell-settings-panel__row" data-edge={row.edge}>
|
|
238
|
+
<strong>{regionLabel(row.edge)}</strong>
|
|
80
239
|
<HotkeyInput
|
|
81
|
-
value={bindingFor(edge)}
|
|
240
|
+
value={bindingFor(row.edge)}
|
|
82
241
|
disabled={!hotkeysEnabled}
|
|
83
|
-
conflictsWith={conflictFor(edge)}
|
|
242
|
+
conflictsWith={conflictFor(row.edge)}
|
|
84
243
|
oncapture={(binding) =>
|
|
85
|
-
shell.setHotkey(edge, binding?.code ?? null)}
|
|
244
|
+
shell.setHotkey(row.edge, binding?.code ?? null)}
|
|
86
245
|
/>
|
|
87
246
|
</div>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
247
|
+
{/each}
|
|
248
|
+
</div>
|
|
249
|
+
</section>
|
|
250
|
+
{/if}
|
|
92
251
|
</section>
|
|
93
252
|
|
|
94
253
|
<style>
|
|
254
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
255
|
+
@layer smrt.theme {
|
|
95
256
|
.smrt-shell-settings-panel {
|
|
96
257
|
display: grid;
|
|
97
258
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -113,11 +274,37 @@ function conflictFor(edge: PanelEdge): string | null {
|
|
|
113
274
|
justify-content: space-between;
|
|
114
275
|
}
|
|
115
276
|
|
|
116
|
-
.smrt-shell-settings-panel
|
|
117
|
-
.smrt-shell-settings-panel p
|
|
277
|
+
.smrt-shell-settings-panel h3,
|
|
278
|
+
.smrt-shell-settings-panel p,
|
|
279
|
+
.smrt-shell-settings-panel dl,
|
|
280
|
+
.smrt-shell-settings-panel dd {
|
|
118
281
|
margin: 0;
|
|
119
282
|
}
|
|
120
283
|
|
|
284
|
+
.smrt-shell-settings-panel > section {
|
|
285
|
+
display: grid;
|
|
286
|
+
gap: var(--smrt-spacing-3);
|
|
287
|
+
justify-items: start;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.smrt-shell-settings-panel > section > .smrt-shell-settings-panel__grid,
|
|
291
|
+
.smrt-shell-settings-panel > section > header {
|
|
292
|
+
justify-self: stretch;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.smrt-shell-settings-panel__controls {
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-wrap: wrap;
|
|
298
|
+
align-items: center;
|
|
299
|
+
gap: var(--smrt-spacing-3);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.smrt-shell-settings-panel dl {
|
|
303
|
+
display: grid;
|
|
304
|
+
grid-template-columns: auto 1fr;
|
|
305
|
+
gap: var(--smrt-spacing-1) var(--smrt-spacing-4);
|
|
306
|
+
}
|
|
307
|
+
|
|
121
308
|
.smrt-shell-settings-panel p,
|
|
122
309
|
.smrt-shell-settings-panel span {
|
|
123
310
|
color: var(--smrt-color-on-surface-variant);
|
|
@@ -146,4 +333,5 @@ function conflictFor(edge: PanelEdge): string | null {
|
|
|
146
333
|
flex-direction: column;
|
|
147
334
|
}
|
|
148
335
|
}
|
|
336
|
+
}
|
|
149
337
|
</style>
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Show the Appearance section (needs a `ThemeProvider` above). */
|
|
3
|
+
appearance?: boolean;
|
|
4
|
+
/** Show the Account section (needs the Provider's `useAuth()` above). */
|
|
5
|
+
account?: boolean;
|
|
6
|
+
/** Where the sign-out control goes; the control is hidden when neither this nor `onSignOut` is given. */
|
|
7
|
+
signOutHref?: string;
|
|
8
|
+
/** Called by the sign-out control instead of following `signOutHref`. */
|
|
9
|
+
onSignOut?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ShellSettingsPanel: import("svelte").Component<Props, {}, "">;
|
|
2
12
|
type ShellSettingsPanel = ReturnType<typeof ShellSettingsPanel>;
|
|
3
13
|
export default ShellSettingsPanel;
|
|
4
14
|
//# sourceMappingURL=ShellSettingsPanel.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellSettingsPanel.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ShellSettingsPanel.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShellSettingsPanel.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ShellSettingsPanel.svelte.ts"],"names":[],"mappings":"AAoBA,UAAU,KAAK;IACb,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yGAAyG;IACzG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AA+MD,QAAA,MAAM,kBAAkB,2CAAwC,CAAC;AACjE,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,eAAe,kBAAkB,CAAC"}
|
|
@@ -10,9 +10,11 @@ interface Props {
|
|
|
10
10
|
let { title, href }: Props = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<a class="smrt-shell-title" {href} data-testid="shell-title">{title}</a>
|
|
13
|
+
<a class="smrt-shell-title" {href} data-testid="shell-title" data-smrt-component="ShellTitle">{title}</a>
|
|
14
14
|
|
|
15
15
|
<style>
|
|
16
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
17
|
+
@layer smrt.theme {
|
|
16
18
|
.smrt-shell-title {
|
|
17
19
|
display: inline-flex;
|
|
18
20
|
align-items: center;
|
|
@@ -39,4 +41,5 @@ let { title, href }: Props = $props();
|
|
|
39
41
|
outline: 2px solid var(--smrt-color-primary);
|
|
40
42
|
outline-offset: 2px;
|
|
41
43
|
}
|
|
44
|
+
}
|
|
42
45
|
</style>
|
|
@@ -20,7 +20,7 @@ const edges: PanelEdge[] = ['top', 'left', 'bottom', 'right'];
|
|
|
20
20
|
|
|
21
21
|
<section
|
|
22
22
|
class="smrt-shortcuts-overlay"
|
|
23
|
-
aria-label={t(M['ui.admin_shell.shell_shortcuts'])}
|
|
23
|
+
aria-label={t(M['ui.admin_shell.shell_shortcuts'])} data-smrt-component="ShortcutsOverlay"
|
|
24
24
|
>
|
|
25
25
|
<header>
|
|
26
26
|
<h2>{t(M['ui.admin_shell.shell_shortcuts'])}</h2>
|
|
@@ -56,6 +56,8 @@ const edges: PanelEdge[] = ['top', 'left', 'bottom', 'right'];
|
|
|
56
56
|
</section>
|
|
57
57
|
|
|
58
58
|
<style>
|
|
59
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
60
|
+
@layer smrt.theme {
|
|
59
61
|
.smrt-shortcuts-overlay {
|
|
60
62
|
display: grid;
|
|
61
63
|
gap: var(--smrt-spacing-4);
|
|
@@ -79,4 +81,5 @@ const edges: PanelEdge[] = ['top', 'left', 'bottom', 'right'];
|
|
|
79
81
|
display: grid;
|
|
80
82
|
gap: var(--smrt-spacing-3);
|
|
81
83
|
}
|
|
84
|
+
}
|
|
82
85
|
</style>
|
|
@@ -17,7 +17,7 @@ const { t } = useI18n();
|
|
|
17
17
|
|
|
18
18
|
<section
|
|
19
19
|
class="smrt-system-scope-panel"
|
|
20
|
-
aria-label={t(M['ui.system_scope_panel.system_scope'])}
|
|
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
23
|
<section class="smrt-system-scope-panel__group" aria-label={panel.label}>
|
|
@@ -65,6 +65,8 @@ const { t } = useI18n();
|
|
|
65
65
|
</section>
|
|
66
66
|
|
|
67
67
|
<style>
|
|
68
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
69
|
+
@layer smrt.theme {
|
|
68
70
|
.smrt-system-scope-panel {
|
|
69
71
|
display: grid;
|
|
70
72
|
gap: var(--smrt-spacing-5);
|
|
@@ -117,4 +119,5 @@ const { t } = useI18n();
|
|
|
117
119
|
.smrt-system-scope-panel__items small {
|
|
118
120
|
grid-column: 1 / -1;
|
|
119
121
|
}
|
|
122
|
+
}
|
|
120
123
|
</style>
|
|
@@ -15,7 +15,7 @@ const { t } = useI18n();
|
|
|
15
15
|
|
|
16
16
|
<div
|
|
17
17
|
class="smrt-system-status-chips"
|
|
18
|
-
aria-label={t(M['ui.system_status_chips.system_status'])}
|
|
18
|
+
aria-label={t(M['ui.system_status_chips.system_status'])} data-smrt-component="SystemStatusChips"
|
|
19
19
|
>
|
|
20
20
|
{#each chips as chip (chip.id)}
|
|
21
21
|
{#if chip.href}
|
|
@@ -41,6 +41,8 @@ const { t } = useI18n();
|
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
43
|
<style>
|
|
44
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
45
|
+
@layer smrt.theme {
|
|
44
46
|
.smrt-system-status-chips {
|
|
45
47
|
display: flex;
|
|
46
48
|
flex-wrap: nowrap;
|
|
@@ -77,7 +79,7 @@ const { t } = useI18n();
|
|
|
77
79
|
flex: none;
|
|
78
80
|
inline-size: 0.5rem;
|
|
79
81
|
block-size: 0.5rem;
|
|
80
|
-
border-radius: var(--smrt-radius-full
|
|
82
|
+
border-radius: var(--smrt-radius-full);
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
.smrt-system-status-chips [data-tone='success']::before {
|
|
@@ -91,4 +93,5 @@ const { t } = useI18n();
|
|
|
91
93
|
.smrt-system-status-chips [data-tone='error']::before {
|
|
92
94
|
background: var(--smrt-color-error);
|
|
93
95
|
}
|
|
96
|
+
}
|
|
94
97
|
</style>
|