@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
|
@@ -146,11 +146,11 @@ function date(value: string): string {
|
|
|
146
146
|
}
|
|
147
147
|
</script>
|
|
148
148
|
|
|
149
|
-
<section aria-label={label ?? t(M['ui.audit.history'])} aria-busy={loading} class="smrt-record-
|
|
150
|
-
{#if error}<p role="alert">{error}</p>{/if}
|
|
151
|
-
{#if loading}<p role="status">{t(M['ui.audit.loading'])}</p>{/if}
|
|
152
|
-
{#if !loading && visible.length === 0}<p>{t(M['ui.audit.empty'])}</p>{/if}
|
|
153
|
-
<ol role="list">
|
|
149
|
+
<section aria-label={label ?? t(M['ui.audit.history'])} aria-busy={loading} class="smrt-record-history__root" data-smrt-component="RecordHistory">
|
|
150
|
+
{#if error}<p role="alert" data-smrt-part="error">{error}</p>{/if}
|
|
151
|
+
{#if loading}<p role="status" data-smrt-part="status">{t(M['ui.audit.loading'])}</p>{/if}
|
|
152
|
+
{#if !loading && visible.length === 0}<p data-smrt-part="empty">{t(M['ui.audit.empty'])}</p>{/if}
|
|
153
|
+
<ol role="list" data-smrt-part="list">
|
|
154
154
|
{#each visible as entry (entry.id)}
|
|
155
155
|
{@const resolvedResourceLabel = entryLabel(resourceLabel, entry, `${entry.resourceType} / ${entry.resourceId}`)}
|
|
156
156
|
{@const resolvedResourceHref = safeResourceHref(entry)}
|
|
@@ -160,11 +160,11 @@ function date(value: string): string {
|
|
|
160
160
|
· {entryLabel(actionLabel, entry, entry.action)} ·
|
|
161
161
|
{#if resolvedResourceHref}<a href={resolvedResourceHref}>{resolvedResourceLabel}</a>{:else}{resolvedResourceLabel}{/if}
|
|
162
162
|
</p>
|
|
163
|
-
<time datetime={entry.occurredAt}>{date(entry.occurredAt)}</time>
|
|
163
|
+
<time datetime={entry.occurredAt} data-smrt-part="meta">{date(entry.occurredAt)}</time>
|
|
164
164
|
{#if entry.onBehalfOfId}<p>{t(M['ui.audit.behalf'], { actor: entry.onBehalfOfId })}</p>{/if}
|
|
165
165
|
{#if entry.reason}<p>{t(M['ui.audit.reason'], { reason: entry.reason })}</p>{/if}
|
|
166
166
|
{#if entry.changes && Object.keys(entry.changes).length}
|
|
167
|
-
<ul role="list">
|
|
167
|
+
<ul role="list" data-smrt-part="list">
|
|
168
168
|
{#each Object.entries(entry.changes) as [field, change] (field)}
|
|
169
169
|
<li>{t(M['ui.audit.change'], {
|
|
170
170
|
field: changedFieldLabel(field, entry),
|
|
@@ -181,57 +181,69 @@ function date(value: string): string {
|
|
|
181
181
|
|
|
182
182
|
<style>
|
|
183
183
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
184
|
-
@layer smrt.
|
|
185
|
-
.smrt-record-
|
|
184
|
+
@layer smrt.structure {
|
|
185
|
+
.smrt-record-history__root > ol {
|
|
186
186
|
display: grid;
|
|
187
187
|
margin: 0;
|
|
188
188
|
padding: 0;
|
|
189
189
|
list-style: none;
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
.smrt-record-history > ol > li {
|
|
191
|
+
.smrt-record-history__root > ol > li {
|
|
193
192
|
min-inline-size: 0;
|
|
194
193
|
padding-block: var(--smrt-spacing-3);
|
|
195
|
-
border-block-end: var(--smrt-hairline);
|
|
196
194
|
overflow-wrap: anywhere;
|
|
197
195
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
.smrt-record-history__root > ol > li:first-child {
|
|
197
|
+
padding-block-start: 0;
|
|
198
|
+
}
|
|
199
|
+
.smrt-record-history__root > ol > li:last-child {
|
|
201
200
|
padding-block-end: 0;
|
|
202
|
-
border-block-end: 0;
|
|
203
201
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
.smrt-record-history__root p {
|
|
203
|
+
margin-block: var(--smrt-spacing-1);
|
|
204
|
+
}
|
|
205
|
+
.smrt-record-history__root time {
|
|
207
206
|
display: block;
|
|
207
|
+
}
|
|
208
|
+
.smrt-record-history__root ul {
|
|
209
|
+
display: grid;
|
|
210
|
+
gap: var(--smrt-spacing-1);
|
|
211
|
+
margin-block: var(--smrt-spacing-2) 0;
|
|
212
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
213
|
+
list-style: none;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@layer smrt.theme {
|
|
218
|
+
.smrt-record-history__root > ol > li {
|
|
219
|
+
border-block-end: var(--smrt-hairline);
|
|
220
|
+
}
|
|
221
|
+
.smrt-record-history__root > ol > li:last-child {
|
|
222
|
+
border-block-end: 0;
|
|
223
|
+
}
|
|
224
|
+
.smrt-record-history__root time {
|
|
208
225
|
color: var(--smrt-color-on-surface-variant);
|
|
209
226
|
font: var(--smrt-typography-label-medium-font);
|
|
210
227
|
}
|
|
211
|
-
|
|
212
|
-
.smrt-record-history a {
|
|
228
|
+
.smrt-record-history__root a {
|
|
213
229
|
color: var(--smrt-color-on-surface);
|
|
214
230
|
text-decoration-color: var(--smrt-color-primary);
|
|
215
231
|
text-decoration-thickness: .08em;
|
|
216
232
|
text-underline-offset: .18em;
|
|
217
233
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
234
|
+
.smrt-record-history__root a:hover {
|
|
235
|
+
text-decoration-thickness: .14em;
|
|
236
|
+
}
|
|
237
|
+
.smrt-record-history__root a:focus-visible {
|
|
221
238
|
border-radius: var(--smrt-radius-extra-small, .25rem);
|
|
222
239
|
outline: 2px solid var(--smrt-color-primary);
|
|
223
240
|
outline-offset: 2px;
|
|
224
241
|
}
|
|
225
|
-
|
|
226
|
-
.smrt-record-history ul {
|
|
227
|
-
display: grid;
|
|
228
|
-
gap: var(--smrt-spacing-1);
|
|
229
|
-
margin-block: var(--smrt-spacing-2) 0;
|
|
230
|
-
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
242
|
+
.smrt-record-history__root ul {
|
|
231
243
|
border-inline-start: 2px solid var(--smrt-color-outline);
|
|
232
244
|
border-radius: var(--smrt-radius-small, .375rem);
|
|
233
245
|
background: var(--smrt-color-surface-container-low);
|
|
234
|
-
list-style: none;
|
|
235
246
|
}
|
|
236
247
|
}
|
|
248
|
+
|
|
237
249
|
</style>
|
|
@@ -213,9 +213,9 @@ function toggleColumn(columnId: string): void {
|
|
|
213
213
|
}
|
|
214
214
|
</script>
|
|
215
215
|
|
|
216
|
-
<section bind:this={root} class="smrt-
|
|
216
|
+
<section bind:this={root} class="smrt-board__root" aria-label={label ?? t(M['ui.board.label'])} aria-roledescription="board" style:--smrt-board-lane-width={laneWidth}
|
|
217
217
|
data-smrt-component="Board">
|
|
218
|
-
<div class="smrt-board__lanes">
|
|
218
|
+
<div class="smrt-board__lanes" data-smrt-part="list">
|
|
219
219
|
{#each columns as column, columnIndex (column.id)}
|
|
220
220
|
{@const items = cardsInColumn(column.id)}
|
|
221
221
|
{@const isCollapsed = collapsed.has(column.id)}
|
|
@@ -223,8 +223,9 @@ function toggleColumn(columnId: string): void {
|
|
|
223
223
|
class:smrt-board__lane--disabled={column.disabled}
|
|
224
224
|
class="smrt-board__lane"
|
|
225
225
|
aria-label={t(M['ui.board.column'], { label: column.label, count: items.length })}
|
|
226
|
+
data-smrt-part="panel"
|
|
226
227
|
>
|
|
227
|
-
<header class="smrt-board__header">
|
|
228
|
+
<header class="smrt-board__header" data-smrt-part="header">
|
|
228
229
|
{#if collapsible}
|
|
229
230
|
<!-- raw-primitive-allow: native button owns collapsible-lane ARIA state -->
|
|
230
231
|
<button
|
|
@@ -234,11 +235,12 @@ function toggleColumn(columnId: string): void {
|
|
|
234
235
|
aria-controls={laneListId(columnIndex)}
|
|
235
236
|
aria-label={t(isCollapsed ? M['ui.board.expand_column'] : M['ui.board.collapse_column'], { label: column.label })}
|
|
236
237
|
onclick={() => toggleColumn(column.id)}
|
|
238
|
+
data-smrt-part="trigger"
|
|
237
239
|
>
|
|
238
240
|
<span>{column.label}</span><span aria-hidden="true">{items.length}</span>
|
|
239
241
|
</button>
|
|
240
242
|
{:else}
|
|
241
|
-
<div class="smrt-board__title"><span>{column.label}</span><span>{items.length}</span></div>
|
|
243
|
+
<div class="smrt-board__title" data-smrt-part="title"><span>{column.label}</span><span>{items.length}</span></div>
|
|
242
244
|
{/if}
|
|
243
245
|
{#if columnHeader}
|
|
244
246
|
{@render columnHeader({ column, count: items.length, collapsed: isCollapsed })}
|
|
@@ -249,6 +251,7 @@ function toggleColumn(columnId: string): void {
|
|
|
249
251
|
id={laneListId(columnIndex)}
|
|
250
252
|
class="smrt-board__cards"
|
|
251
253
|
role="list"
|
|
254
|
+
data-smrt-part="list"
|
|
252
255
|
data-smrt-board-column-id={column.id}
|
|
253
256
|
ondragover={(event) => event.preventDefault()}
|
|
254
257
|
ondrop={(event) => sortable.dropOnContainer(event, column.id)}
|
|
@@ -262,6 +265,7 @@ function toggleColumn(columnId: string): void {
|
|
|
262
265
|
class:smrt-board__card--touch-drag={sortable.movable}
|
|
263
266
|
class="smrt-board__card"
|
|
264
267
|
data-smrt-board-card-id={item.id}
|
|
268
|
+
data-smrt-part="row"
|
|
265
269
|
draggable={sortable.nativeDraggable}
|
|
266
270
|
aria-pressed={sortable.drag?.itemId === item.id}
|
|
267
271
|
aria-describedby={sortable.drag?.itemId === item.id ? liveId : undefined}
|
|
@@ -280,7 +284,7 @@ function toggleColumn(columnId: string): void {
|
|
|
280
284
|
</button>
|
|
281
285
|
</div>
|
|
282
286
|
{:else}
|
|
283
|
-
<div role="listitem" class="smrt-board__empty">
|
|
287
|
+
<div role="listitem" class="smrt-board__empty" data-smrt-part="empty">
|
|
284
288
|
{t(M['ui.board.empty_column'], { column: column.label })}
|
|
285
289
|
</div>
|
|
286
290
|
{/each}
|
|
@@ -289,27 +293,128 @@ function toggleColumn(columnId: string): void {
|
|
|
289
293
|
</section>
|
|
290
294
|
{/each}
|
|
291
295
|
</div>
|
|
292
|
-
<div id={liveId} class="smrt-board__live" aria-live="assertive" aria-atomic="true">{sortable.announcement}</div>
|
|
296
|
+
<div id={liveId} class="smrt-board__live" aria-live="assertive" aria-atomic="true" data-smrt-part="status">{sortable.announcement}</div>
|
|
293
297
|
</section>
|
|
294
298
|
|
|
295
299
|
<style>
|
|
296
300
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
301
|
+
@layer smrt.structure {
|
|
302
|
+
.smrt-board__root {
|
|
303
|
+
min-width: 0;
|
|
304
|
+
}
|
|
305
|
+
.smrt-board__lanes {
|
|
306
|
+
display: flex;
|
|
307
|
+
gap: var(--smrt-spacing-4);
|
|
308
|
+
overflow-x: auto;
|
|
309
|
+
overscroll-behavior-x: contain;
|
|
310
|
+
padding-block-end: var(--smrt-spacing-2);
|
|
311
|
+
}
|
|
312
|
+
.smrt-board__lane {
|
|
313
|
+
display: grid;
|
|
314
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
315
|
+
flex: 0 0 var(--smrt-board-lane-width, min(18rem, 82vw));
|
|
316
|
+
min-block-size: 12rem;
|
|
317
|
+
max-block-size: min(42rem, 70vh);
|
|
318
|
+
overflow: hidden;
|
|
319
|
+
}
|
|
320
|
+
.smrt-board__header {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
justify-content: space-between;
|
|
324
|
+
gap: var(--smrt-spacing-2);
|
|
325
|
+
min-block-size: 2.75rem;
|
|
326
|
+
padding: 0 var(--smrt-spacing-3);
|
|
327
|
+
}
|
|
328
|
+
.smrt-board__title, .smrt-board__collapse {
|
|
329
|
+
display: flex;
|
|
330
|
+
align-items: center;
|
|
331
|
+
justify-content: space-between;
|
|
332
|
+
gap: var(--smrt-spacing-2);
|
|
333
|
+
inline-size: 100%;
|
|
334
|
+
}
|
|
335
|
+
.smrt-board__collapse {
|
|
336
|
+
padding: 0;
|
|
337
|
+
cursor: pointer;
|
|
338
|
+
}
|
|
339
|
+
.smrt-board__cards {
|
|
340
|
+
display: grid;
|
|
341
|
+
align-content: start;
|
|
342
|
+
gap: var(--smrt-spacing-2);
|
|
343
|
+
min-block-size: 0;
|
|
344
|
+
overflow-y: auto;
|
|
345
|
+
overscroll-behavior-y: contain;
|
|
346
|
+
padding: var(--smrt-spacing-3);
|
|
347
|
+
}
|
|
348
|
+
.smrt-board__card {
|
|
349
|
+
display: block;
|
|
350
|
+
inline-size: 100%;
|
|
351
|
+
padding: var(--smrt-spacing-3);
|
|
352
|
+
cursor: grab;
|
|
353
|
+
}
|
|
354
|
+
.smrt-board__card--touch-drag {
|
|
355
|
+
touch-action: none;
|
|
356
|
+
}
|
|
357
|
+
.smrt-board__card:active {
|
|
358
|
+
cursor: grabbing;
|
|
359
|
+
}
|
|
360
|
+
.smrt-board__empty {
|
|
361
|
+
margin: 0;
|
|
362
|
+
}
|
|
363
|
+
.smrt-board__live {
|
|
364
|
+
position: absolute;
|
|
365
|
+
inline-size: 1px;
|
|
366
|
+
block-size: 1px;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
clip: rect(0 0 0 0);
|
|
369
|
+
clip-path: inset(50%);
|
|
370
|
+
white-space: nowrap;
|
|
371
|
+
}
|
|
372
|
+
@media (prefers-reduced-motion: reduce) {
|
|
373
|
+
.smrt-board__card {
|
|
374
|
+
scroll-behavior: auto;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
297
379
|
@layer smrt.theme {
|
|
298
|
-
.smrt-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
.smrt-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
.smrt-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.smrt-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
380
|
+
.smrt-board__lane {
|
|
381
|
+
border: var(--smrt-hairline);
|
|
382
|
+
border-radius: var(--smrt-radius-md);
|
|
383
|
+
background: var(--smrt-color-surface-container);
|
|
384
|
+
}
|
|
385
|
+
.smrt-board__lane--disabled {
|
|
386
|
+
opacity: 0.6;
|
|
387
|
+
}
|
|
388
|
+
.smrt-board__header {
|
|
389
|
+
border-block-end: var(--smrt-hairline);
|
|
390
|
+
}
|
|
391
|
+
.smrt-board__title, .smrt-board__collapse {
|
|
392
|
+
color: inherit;
|
|
393
|
+
font: var(--smrt-typography-label-large-font);
|
|
394
|
+
}
|
|
395
|
+
.smrt-board__collapse {
|
|
396
|
+
border: 0;
|
|
397
|
+
background: transparent;
|
|
398
|
+
text-align: start;
|
|
399
|
+
}
|
|
400
|
+
.smrt-board__collapse:focus-visible, .smrt-board__card:focus-visible {
|
|
401
|
+
outline: 2px solid var(--smrt-color-primary);
|
|
402
|
+
outline-offset: 2px;
|
|
403
|
+
}
|
|
404
|
+
.smrt-board__card {
|
|
405
|
+
border: var(--smrt-hairline);
|
|
406
|
+
border-radius: var(--smrt-radius-sm);
|
|
407
|
+
background: var(--smrt-color-surface);
|
|
408
|
+
color: inherit;
|
|
409
|
+
text-align: start;
|
|
410
|
+
}
|
|
411
|
+
.smrt-board__card--dragging {
|
|
412
|
+
opacity: 0.55;
|
|
413
|
+
}
|
|
414
|
+
.smrt-board__empty {
|
|
415
|
+
color: var(--smrt-color-on-surface-variant);
|
|
416
|
+
font: var(--smrt-typography-body-small-font);
|
|
417
|
+
}
|
|
314
418
|
}
|
|
419
|
+
|
|
315
420
|
</style>
|
|
@@ -163,9 +163,9 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
163
163
|
showClose={false}
|
|
164
164
|
size="md"
|
|
165
165
|
>
|
|
166
|
-
<div class="smrt-command-palette">
|
|
167
|
-
<div class="smrt-command-
|
|
168
|
-
<svg class="smrt-command-
|
|
166
|
+
<div class="smrt-command-palette-dialog__root" data-smrt-part="body">
|
|
167
|
+
<div class="smrt-command-palette-dialog__field" data-smrt-part="field">
|
|
168
|
+
<svg class="smrt-command-palette-dialog__search-icon" data-smrt-part="icon" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" /></svg>
|
|
169
169
|
<Input
|
|
170
170
|
bind:this={input}
|
|
171
171
|
type="text"
|
|
@@ -181,29 +181,30 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
181
181
|
enterkeyhint="go"
|
|
182
182
|
placeholder={placeholder ?? t(M['ui.command_palette.placeholder'])}
|
|
183
183
|
interaction={false}
|
|
184
|
-
class="smrt-command-
|
|
184
|
+
class="smrt-command-palette-dialog__input"
|
|
185
185
|
bind:value={() => palette.query, (next) => palette.setQuery(String(next))}
|
|
186
186
|
onkeydown={onInputKeydown}
|
|
187
187
|
/>
|
|
188
188
|
</div>
|
|
189
189
|
|
|
190
190
|
<div
|
|
191
|
-
class="smrt-command-
|
|
191
|
+
class="smrt-command-palette-dialog__list"
|
|
192
192
|
id={listId}
|
|
193
193
|
role="listbox"
|
|
194
194
|
aria-label={t(M['ui.command_palette.results'])}
|
|
195
195
|
aria-busy={palette.busy}
|
|
196
|
+
data-smrt-part="list"
|
|
196
197
|
>
|
|
197
198
|
{#each palette.sections as section, sectionIndex (section.id)}
|
|
198
|
-
<div class="smrt-command-
|
|
199
|
-
<div class="smrt-command-
|
|
199
|
+
<div class="smrt-command-palette-dialog__group" role="group" aria-labelledby={`${listId}-g${sectionIndex}`} data-smrt-part="group">
|
|
200
|
+
<div class="smrt-command-palette-dialog__heading" id={`${listId}-g${sectionIndex}`} data-smrt-part="label">{section.label}</div>
|
|
200
201
|
{#each section.results as result (result.key)}
|
|
201
202
|
{@const path = iconPath(result.item.icon)}
|
|
202
203
|
{@const shortcut = result.item.shortcut ? formatPaletteHotkey(result.item.shortcut, apple) : ''}
|
|
203
204
|
<!-- The combobox input owns the keyboard (aria-activedescendant); rows are pointer targets. -->
|
|
204
205
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
205
206
|
<div
|
|
206
|
-
class="smrt-command-
|
|
207
|
+
class="smrt-command-palette-dialog__option"
|
|
207
208
|
id={optionId(result)}
|
|
208
209
|
role="option"
|
|
209
210
|
tabindex="-1"
|
|
@@ -215,26 +216,27 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
215
216
|
onmousedown={(event) => event.preventDefault()}
|
|
216
217
|
onpointermove={() => palette.setActive(result.key)}
|
|
217
218
|
onclick={() => void palette.activate(result)}
|
|
219
|
+
data-smrt-part="row"
|
|
218
220
|
>
|
|
219
|
-
<span class="smrt-command-
|
|
221
|
+
<span class="smrt-command-palette-dialog__icon" aria-hidden="true" data-smrt-part="icon">
|
|
220
222
|
{#if path}
|
|
221
223
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" focusable="false"><path d={path} /></svg>
|
|
222
224
|
{/if}
|
|
223
225
|
</span>
|
|
224
|
-
<span class="smrt-command-
|
|
225
|
-
<span class="smrt-command-
|
|
226
|
+
<span class="smrt-command-palette-dialog__text" data-smrt-part="body">
|
|
227
|
+
<span class="smrt-command-palette-dialog__title" data-smrt-part="title">
|
|
226
228
|
{#each highlightSegments(result.item.title, result.titleRanges) as segment}
|
|
227
229
|
{#if segment.match}<mark>{segment.text}</mark>{:else}{segment.text}{/if}
|
|
228
230
|
{/each}
|
|
229
231
|
</span>
|
|
230
232
|
{#if result.item.subtitle}
|
|
231
|
-
<span class="smrt-command-
|
|
233
|
+
<span class="smrt-command-palette-dialog__subtitle" data-smrt-part="meta">{result.item.subtitle}</span>
|
|
232
234
|
{/if}
|
|
233
235
|
</span>
|
|
234
236
|
{#if typeof result.item.disabled === 'string'}
|
|
235
|
-
<span class="smrt-command-
|
|
237
|
+
<span class="smrt-command-palette-dialog__note" data-smrt-part="meta">{t(M['ui.command_palette.unavailable'])}</span>
|
|
236
238
|
{:else if shortcut}
|
|
237
|
-
<kbd class="smrt-command-
|
|
239
|
+
<kbd class="smrt-command-palette-dialog__shortcut" data-smrt-part="description">{shortcut}</kbd>
|
|
238
240
|
{/if}
|
|
239
241
|
</div>
|
|
240
242
|
{/each}
|
|
@@ -242,49 +244,42 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
242
244
|
{/each}
|
|
243
245
|
</div>
|
|
244
246
|
{#if !hasRows}
|
|
245
|
-
<p class="smrt-command-
|
|
247
|
+
<p class="smrt-command-palette-dialog__empty" data-smrt-part="empty">{statusText}</p>
|
|
246
248
|
{/if}
|
|
247
249
|
|
|
248
|
-
<div class="smrt-command-
|
|
250
|
+
<div class="smrt-command-palette-dialog__hints" aria-hidden="true" data-smrt-part="description">
|
|
249
251
|
<span><kbd>↑</kbd><kbd>↓</kbd> {t(M['ui.command_palette.hint_move'])}</span>
|
|
250
252
|
<span><kbd>↵</kbd> {t(M['ui.command_palette.hint_select'])}</span>
|
|
251
253
|
<span><kbd>Esc</kbd> {t(M['ui.command_palette.hint_close'])}</span>
|
|
252
254
|
</div>
|
|
253
255
|
|
|
254
|
-
<div class="smrt-command-
|
|
256
|
+
<div class="smrt-command-palette-dialog__live" role="status" aria-live="polite" data-smrt-part="status">{statusText}</div>
|
|
255
257
|
</div>
|
|
256
258
|
</Modal>
|
|
257
259
|
|
|
258
260
|
<style>
|
|
259
261
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
260
|
-
@layer smrt.
|
|
261
|
-
.smrt-command-palette {
|
|
262
|
+
@layer smrt.structure {
|
|
263
|
+
.smrt-command-palette-dialog__root {
|
|
262
264
|
display: flex;
|
|
263
265
|
flex-direction: column;
|
|
264
266
|
gap: var(--smrt-spacing-2, 0.5rem);
|
|
265
267
|
min-block-size: 0;
|
|
266
268
|
}
|
|
267
|
-
|
|
268
|
-
.smrt-command-palette__field {
|
|
269
|
+
.smrt-command-palette-dialog__field {
|
|
269
270
|
position: relative;
|
|
270
271
|
display: flex;
|
|
271
272
|
align-items: center;
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
-
.smrt-command-palette__search-icon {
|
|
274
|
+
.smrt-command-palette-dialog__search-icon {
|
|
275
275
|
position: absolute;
|
|
276
276
|
inset-inline-start: 0.75rem;
|
|
277
|
-
color: var(--smrt-color-on-surface-variant);
|
|
278
277
|
pointer-events: none;
|
|
279
278
|
}
|
|
280
|
-
|
|
281
|
-
.smrt-command-palette__field :global(.smrt-command-palette__input) {
|
|
279
|
+
.smrt-command-palette-dialog__field :global(.smrt-command-palette-dialog__input) {
|
|
282
280
|
padding-inline-start: 2.5rem;
|
|
283
|
-
/* 16px keeps iOS from zooming when the box takes focus. */
|
|
284
|
-
font-size: max(1rem, var(--smrt-typography-body-medium-size, 0.875rem));
|
|
285
281
|
}
|
|
286
|
-
|
|
287
|
-
.smrt-command-palette__list {
|
|
282
|
+
.smrt-command-palette-dialog__list {
|
|
288
283
|
max-block-size: min(24rem, 55vh);
|
|
289
284
|
overflow-y: auto;
|
|
290
285
|
overscroll-behavior: contain;
|
|
@@ -292,118 +287,127 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
292
287
|
flex-direction: column;
|
|
293
288
|
gap: var(--smrt-spacing-2, 0.5rem);
|
|
294
289
|
}
|
|
295
|
-
|
|
296
|
-
.smrt-command-palette__heading {
|
|
290
|
+
.smrt-command-palette-dialog__heading {
|
|
297
291
|
padding: 0.25rem 0.75rem;
|
|
298
|
-
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
299
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
300
|
-
letter-spacing: 0.04em;
|
|
301
|
-
text-transform: uppercase;
|
|
302
|
-
color: var(--smrt-color-on-surface-variant);
|
|
303
292
|
}
|
|
304
|
-
|
|
305
|
-
.smrt-command-palette__option {
|
|
293
|
+
.smrt-command-palette-dialog__option {
|
|
306
294
|
display: flex;
|
|
307
295
|
align-items: center;
|
|
308
296
|
gap: 0.75rem;
|
|
309
297
|
min-block-size: max(2.5rem, var(--smrt-control-target-min));
|
|
310
298
|
padding: 0.375rem 0.75rem;
|
|
311
|
-
border-radius: var(--smrt-radius-medium, 0.5rem);
|
|
312
|
-
color: var(--smrt-color-on-surface);
|
|
313
299
|
cursor: pointer;
|
|
314
300
|
}
|
|
315
|
-
|
|
316
|
-
.smrt-command-palette__option[data-active] {
|
|
317
|
-
background: var(--smrt-color-surface-container-high);
|
|
318
|
-
box-shadow: inset 3px 0 0 var(--smrt-color-primary);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.smrt-command-palette__option[aria-disabled='true'] {
|
|
322
|
-
opacity: 0.55;
|
|
301
|
+
.smrt-command-palette-dialog__option[aria-disabled='true'] {
|
|
323
302
|
cursor: not-allowed;
|
|
324
303
|
}
|
|
325
|
-
|
|
326
|
-
.smrt-command-palette__icon {
|
|
304
|
+
.smrt-command-palette-dialog__icon {
|
|
327
305
|
flex: 0 0 1.125rem;
|
|
328
306
|
inline-size: 1.125rem;
|
|
329
|
-
color: var(--smrt-color-on-surface-variant);
|
|
330
307
|
display: inline-grid;
|
|
331
308
|
place-items: center;
|
|
332
309
|
}
|
|
333
|
-
|
|
334
|
-
.smrt-command-palette__text {
|
|
310
|
+
.smrt-command-palette-dialog__text {
|
|
335
311
|
flex: 1 1 auto;
|
|
336
312
|
min-inline-size: 0;
|
|
337
313
|
display: flex;
|
|
338
314
|
flex-direction: column;
|
|
339
315
|
}
|
|
340
|
-
|
|
341
|
-
.smrt-command-
|
|
342
|
-
.smrt-command-palette__subtitle {
|
|
316
|
+
.smrt-command-palette-dialog__title,
|
|
317
|
+
.smrt-command-palette-dialog__subtitle {
|
|
343
318
|
overflow: hidden;
|
|
344
319
|
text-overflow: ellipsis;
|
|
345
320
|
white-space: nowrap;
|
|
346
321
|
}
|
|
322
|
+
.smrt-command-palette-dialog__root kbd {
|
|
323
|
+
padding: 0.0625rem 0.375rem;
|
|
324
|
+
}
|
|
325
|
+
.smrt-command-palette-dialog__empty {
|
|
326
|
+
margin: 0;
|
|
327
|
+
padding: 1.5rem 0.75rem;
|
|
328
|
+
}
|
|
329
|
+
.smrt-command-palette-dialog__hints {
|
|
330
|
+
display: flex;
|
|
331
|
+
gap: 1rem;
|
|
332
|
+
padding: 0.25rem 0.75rem 0;
|
|
333
|
+
}
|
|
334
|
+
.smrt-command-palette-dialog__hints kbd + kbd {
|
|
335
|
+
margin-inline-start: 0.125rem;
|
|
336
|
+
}
|
|
337
|
+
@media (max-width: 48rem) {
|
|
338
|
+
.smrt-command-palette-dialog__hints {
|
|
339
|
+
display: none;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
.smrt-command-palette-dialog__live {
|
|
343
|
+
position: absolute;
|
|
344
|
+
inline-size: 1px;
|
|
345
|
+
block-size: 1px;
|
|
346
|
+
overflow: hidden;
|
|
347
|
+
clip-path: inset(50%);
|
|
348
|
+
white-space: nowrap;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
347
351
|
|
|
348
|
-
|
|
352
|
+
@layer smrt.theme {
|
|
353
|
+
.smrt-command-palette-dialog__search-icon {
|
|
354
|
+
color: var(--smrt-color-on-surface-variant);
|
|
355
|
+
}
|
|
356
|
+
.smrt-command-palette-dialog__field :global(.smrt-command-palette-dialog__input) {
|
|
357
|
+
/* 16px keeps iOS from zooming when the box takes focus. */
|
|
358
|
+
font-size: max(1rem, var(--smrt-typography-body-medium-size, 0.875rem));
|
|
359
|
+
}
|
|
360
|
+
.smrt-command-palette-dialog__heading {
|
|
361
|
+
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
362
|
+
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
363
|
+
letter-spacing: 0.04em;
|
|
364
|
+
text-transform: uppercase;
|
|
365
|
+
color: var(--smrt-color-on-surface-variant);
|
|
366
|
+
}
|
|
367
|
+
.smrt-command-palette-dialog__option {
|
|
368
|
+
border-radius: var(--smrt-radius-medium, 0.5rem);
|
|
369
|
+
color: var(--smrt-color-on-surface);
|
|
370
|
+
}
|
|
371
|
+
.smrt-command-palette-dialog__option[data-active] {
|
|
372
|
+
background: var(--smrt-color-surface-container-high);
|
|
373
|
+
box-shadow: inset 3px 0 0 var(--smrt-color-primary);
|
|
374
|
+
}
|
|
375
|
+
.smrt-command-palette-dialog__option[aria-disabled='true'] {
|
|
376
|
+
opacity: 0.55;
|
|
377
|
+
}
|
|
378
|
+
.smrt-command-palette-dialog__icon {
|
|
379
|
+
color: var(--smrt-color-on-surface-variant);
|
|
380
|
+
}
|
|
381
|
+
.smrt-command-palette-dialog__subtitle {
|
|
349
382
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
350
383
|
color: var(--smrt-color-on-surface-variant);
|
|
351
384
|
}
|
|
352
|
-
|
|
353
|
-
.smrt-command-palette mark {
|
|
385
|
+
.smrt-command-palette-dialog__root mark {
|
|
354
386
|
background: color-mix(in srgb, var(--smrt-color-primary) 18%, transparent);
|
|
355
387
|
color: inherit;
|
|
356
388
|
font-weight: var(--smrt-typography-weight-bold, 700);
|
|
357
389
|
border-radius: 0.125rem;
|
|
358
390
|
}
|
|
359
|
-
|
|
360
|
-
.smrt-command-palette__note {
|
|
391
|
+
.smrt-command-palette-dialog__note {
|
|
361
392
|
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
362
393
|
color: var(--smrt-color-on-surface-variant);
|
|
363
394
|
}
|
|
364
|
-
|
|
365
|
-
.smrt-command-palette kbd {
|
|
395
|
+
.smrt-command-palette-dialog__root kbd {
|
|
366
396
|
font: inherit;
|
|
367
397
|
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
368
|
-
padding: 0.0625rem 0.375rem;
|
|
369
398
|
border: var(--smrt-hairline);
|
|
370
399
|
border-radius: var(--smrt-radius-small, 0.375rem);
|
|
371
400
|
color: var(--smrt-color-on-surface-variant);
|
|
372
401
|
background: var(--smrt-color-surface-container);
|
|
373
402
|
}
|
|
374
|
-
|
|
375
|
-
.smrt-command-palette__empty {
|
|
376
|
-
margin: 0;
|
|
377
|
-
padding: 1.5rem 0.75rem;
|
|
403
|
+
.smrt-command-palette-dialog__empty {
|
|
378
404
|
text-align: center;
|
|
379
405
|
color: var(--smrt-color-on-surface-variant);
|
|
380
406
|
}
|
|
381
|
-
|
|
382
|
-
.smrt-command-palette__hints {
|
|
383
|
-
display: flex;
|
|
384
|
-
gap: 1rem;
|
|
385
|
-
padding: 0.25rem 0.75rem 0;
|
|
407
|
+
.smrt-command-palette-dialog__hints {
|
|
386
408
|
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
387
409
|
color: var(--smrt-color-on-surface-variant);
|
|
388
410
|
}
|
|
389
|
-
|
|
390
|
-
.smrt-command-palette__hints kbd + kbd {
|
|
391
|
-
margin-inline-start: 0.125rem;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
@media (max-width: 48rem) {
|
|
395
|
-
.smrt-command-palette__hints {
|
|
396
|
-
display: none;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.smrt-command-palette__live {
|
|
401
|
-
position: absolute;
|
|
402
|
-
inline-size: 1px;
|
|
403
|
-
block-size: 1px;
|
|
404
|
-
overflow: hidden;
|
|
405
|
-
clip-path: inset(50%);
|
|
406
|
-
white-space: nowrap;
|
|
407
|
-
}
|
|
408
411
|
}
|
|
412
|
+
|
|
409
413
|
</style>
|