@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
|
@@ -223,18 +223,18 @@ function handleInput(e: Event) {
|
|
|
223
223
|
</script>
|
|
224
224
|
|
|
225
225
|
<div
|
|
226
|
-
class="smrt-
|
|
227
|
-
class:smrt-
|
|
228
|
-
class:
|
|
229
|
-
class:disabled
|
|
230
|
-
class:
|
|
231
|
-
class:
|
|
226
|
+
class="smrt-textarea-input__root smrt-textarea-input__multiline"
|
|
227
|
+
class:smrt-textarea-input__mode={isSmrt}
|
|
228
|
+
class:smrt-textarea-input__focused={isFocused}
|
|
229
|
+
class:smrt-textarea-input__disabled={disabled}
|
|
230
|
+
class:smrt-textarea-input__has-value={!!value}
|
|
231
|
+
class:smrt-textarea-input__listening={isHolding} data-smrt-component="TextareaInput"
|
|
232
232
|
>
|
|
233
233
|
{#if label}
|
|
234
234
|
<FieldLabel id={labelId} for={name} {label} {required} />
|
|
235
235
|
{/if}
|
|
236
|
-
<div class="
|
|
237
|
-
<div class="
|
|
236
|
+
<div class="smrt-textarea-input__container" data-smrt-part="field">
|
|
237
|
+
<div class="smrt-textarea-input__content" data-smrt-part="body">
|
|
238
238
|
<textarea
|
|
239
239
|
bind:this={textareaEl}
|
|
240
240
|
id={name}
|
|
@@ -245,7 +245,8 @@ function handleInput(e: Event) {
|
|
|
245
245
|
{rows}
|
|
246
246
|
disabled={disabled || isProcessing}
|
|
247
247
|
{required}
|
|
248
|
-
class="
|
|
248
|
+
class="smrt-textarea-input__input"
|
|
249
|
+
data-smrt-part="input"
|
|
249
250
|
aria-invalid={processError ? 'true' : undefined}
|
|
250
251
|
aria-describedby={`${name}-supporting`}
|
|
251
252
|
oninput={handleInput}
|
|
@@ -262,8 +263,9 @@ function handleInput(e: Event) {
|
|
|
262
263
|
{#if isSmrt}
|
|
263
264
|
<button
|
|
264
265
|
type="button"
|
|
265
|
-
class="
|
|
266
|
-
class:
|
|
266
|
+
class="smrt-textarea-input__mic-btn"
|
|
267
|
+
class:smrt-textarea-input__active={isHolding}
|
|
268
|
+
data-smrt-part="trigger"
|
|
267
269
|
{disabled}
|
|
268
270
|
use:ripple
|
|
269
271
|
onkeydown={handleMicKeydown}
|
|
@@ -278,130 +280,138 @@ function handleInput(e: Event) {
|
|
|
278
280
|
</button>
|
|
279
281
|
{/if}
|
|
280
282
|
|
|
281
|
-
<div class="
|
|
283
|
+
<div class="smrt-textarea-input__active-indicator" data-smrt-part="indicator"></div>
|
|
282
284
|
</div>
|
|
283
285
|
|
|
284
|
-
<div id={`${name}-supporting`} class="
|
|
286
|
+
<div id={`${name}-supporting`} class="smrt-textarea-input__supporting-text" data-smrt-part="description" aria-live="polite">
|
|
285
287
|
{#if isInitializing}
|
|
286
|
-
<span class="
|
|
288
|
+
<span class="smrt-textarea-input__info" data-smrt-part="description">{t(M['ui.textarea_input.downloading_model'], { progress: downloadProgress })}</span>
|
|
287
289
|
{:else if isHolding}
|
|
288
|
-
<span class="
|
|
290
|
+
<span class="smrt-textarea-input__success" data-smrt-part="status">Recording...</span>
|
|
289
291
|
{:else if isProcessing}
|
|
290
|
-
<span class="
|
|
292
|
+
<span class="smrt-textarea-input__info" data-smrt-part="description">Processing...</span>
|
|
291
293
|
{:else if processError}
|
|
292
|
-
<span class="error">{processError}</span>
|
|
294
|
+
<span class="smrt-textarea-input__error" data-smrt-part="error">{processError}</span>
|
|
293
295
|
{:else if description && isFocused}
|
|
294
|
-
<span class="
|
|
296
|
+
<span class="smrt-textarea-input__info" data-smrt-part="description">{description}</span>
|
|
295
297
|
{/if}
|
|
296
298
|
</div>
|
|
297
299
|
</div>
|
|
298
300
|
|
|
299
301
|
<style>
|
|
300
302
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
301
|
-
@layer smrt.
|
|
302
|
-
.smrt-
|
|
303
|
-
--smrt-textarea-input-field-color: var(--smrt-color-on-surface-variant);
|
|
304
|
-
--smrt-textarea-input-field-bg: var(--smrt-color-surface-container-highest);
|
|
305
|
-
--smrt-textarea-input-field-active: var(--smrt-color-primary);
|
|
306
|
-
|
|
303
|
+
@layer smrt.structure {
|
|
304
|
+
.smrt-textarea-input__root {
|
|
307
305
|
display: flex;
|
|
308
306
|
flex-direction: column;
|
|
309
307
|
width: 100%;
|
|
310
308
|
min-width: 0;
|
|
311
309
|
}
|
|
312
|
-
|
|
313
|
-
.container {
|
|
310
|
+
.smrt-textarea-input__container {
|
|
314
311
|
position: relative;
|
|
315
312
|
display: flex;
|
|
316
313
|
align-items: flex-start;
|
|
317
|
-
background-color: var(--smrt-color-surface);
|
|
318
|
-
border: var(--smrt-hairline);
|
|
319
|
-
border-radius: var(--smrt-radius-small);
|
|
320
314
|
min-height: 40px;
|
|
321
315
|
padding: 0 var(--smrt-spacing-3);
|
|
322
|
-
transition: background-color var(--smrt-duration-short3, 200ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.container:hover {
|
|
326
|
-
background-color: var(--smrt-color-surface-container-high);
|
|
327
316
|
}
|
|
328
|
-
|
|
329
|
-
.content {
|
|
317
|
+
.smrt-textarea-input__content {
|
|
330
318
|
flex: 1;
|
|
331
319
|
display: flex;
|
|
332
320
|
flex-direction: column;
|
|
333
321
|
padding-top: var(--smrt-spacing-2);
|
|
334
322
|
padding-bottom: var(--smrt-spacing-2);
|
|
335
323
|
}
|
|
324
|
+
.smrt-textarea-input__input {
|
|
325
|
+
width: 100%;
|
|
326
|
+
padding: 0;
|
|
327
|
+
margin: 0;
|
|
328
|
+
resize: vertical;
|
|
329
|
+
}
|
|
330
|
+
.smrt-textarea-input__active-indicator {
|
|
331
|
+
display: none;
|
|
332
|
+
}
|
|
333
|
+
.smrt-textarea-input__mic-btn {
|
|
334
|
+
width: 40px;
|
|
335
|
+
height: 40px;
|
|
336
|
+
display: flex;
|
|
337
|
+
align-items: center;
|
|
338
|
+
justify-content: center;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
margin-right: -8px;
|
|
341
|
+
margin-top: var(--smrt-spacing-2);
|
|
342
|
+
}
|
|
343
|
+
.smrt-textarea-input__supporting-text {
|
|
344
|
+
padding: var(--smrt-spacing-1) 0 0;
|
|
345
|
+
min-height: 16px;
|
|
346
|
+
}
|
|
347
|
+
.smrt-textarea-input__disabled {
|
|
348
|
+
pointer-events: none;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
336
351
|
|
|
337
|
-
|
|
338
|
-
.
|
|
352
|
+
@layer smrt.theme {
|
|
353
|
+
.smrt-textarea-input__root {
|
|
354
|
+
--smrt-textarea-input-field-color: var(--smrt-color-on-surface-variant);
|
|
355
|
+
--smrt-textarea-input-field-bg: var(--smrt-color-surface-container-highest);
|
|
356
|
+
--smrt-textarea-input-field-active: var(--smrt-color-primary);
|
|
357
|
+
}
|
|
358
|
+
.smrt-textarea-input__container {
|
|
359
|
+
background-color: var(--smrt-color-surface);
|
|
360
|
+
border: var(--smrt-hairline);
|
|
361
|
+
border-radius: var(--smrt-radius-small);
|
|
362
|
+
transition: background-color var(--smrt-duration-short3, 200ms) var(--smrt-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
363
|
+
}
|
|
364
|
+
.smrt-textarea-input__container:hover {
|
|
365
|
+
background-color: var(--smrt-color-surface-container-high);
|
|
366
|
+
}
|
|
367
|
+
.smrt-textarea-input__input {
|
|
339
368
|
border: none;
|
|
340
369
|
background: transparent;
|
|
341
370
|
font-size: var(--smrt-typography-body-large-size, 1rem);
|
|
342
371
|
line-height: var(--smrt-typography-body-large-line-height, 1.5);
|
|
343
372
|
letter-spacing: var(--smrt-typography-body-large-tracking);
|
|
344
373
|
color: var(--smrt-color-on-surface);
|
|
345
|
-
width: 100%;
|
|
346
|
-
padding: 0;
|
|
347
|
-
margin: 0;
|
|
348
|
-
resize: vertical;
|
|
349
374
|
font-family: inherit;
|
|
350
375
|
}
|
|
351
|
-
|
|
352
|
-
.input:focus {
|
|
376
|
+
.smrt-textarea-input__input:focus {
|
|
353
377
|
outline: none;
|
|
354
378
|
}
|
|
355
|
-
|
|
356
|
-
.active-indicator { display: none; }
|
|
357
|
-
|
|
358
|
-
.focused .container {
|
|
379
|
+
.smrt-textarea-input__focused .smrt-textarea-input__container {
|
|
359
380
|
border-color: var(--smrt-textarea-input-field-active);
|
|
360
381
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--smrt-textarea-input-field-active) 10%, transparent);
|
|
361
382
|
}
|
|
362
|
-
|
|
363
|
-
.mic-btn {
|
|
364
|
-
width: 40px;
|
|
365
|
-
height: 40px;
|
|
366
|
-
display: flex;
|
|
367
|
-
align-items: center;
|
|
368
|
-
justify-content: center;
|
|
383
|
+
.smrt-textarea-input__mic-btn {
|
|
369
384
|
border: none;
|
|
370
385
|
background: transparent;
|
|
371
386
|
color: var(--smrt-textarea-input-field-color);
|
|
372
387
|
border-radius: var(--smrt-radius-full);
|
|
373
|
-
cursor: pointer;
|
|
374
|
-
margin-right: -8px;
|
|
375
|
-
margin-top: var(--smrt-spacing-2);
|
|
376
388
|
transition: all 200ms;
|
|
377
389
|
}
|
|
378
|
-
|
|
379
|
-
.mic-btn.active {
|
|
390
|
+
.smrt-textarea-input__mic-btn.smrt-textarea-input__active {
|
|
380
391
|
color: var(--smrt-color-primary);
|
|
381
392
|
background-color: var(--smrt-color-primary-container);
|
|
382
393
|
}
|
|
383
|
-
|
|
384
|
-
.supporting-text {
|
|
385
|
-
padding: var(--smrt-spacing-1) 0 0;
|
|
394
|
+
.smrt-textarea-input__supporting-text {
|
|
386
395
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
387
|
-
min-height: 16px;
|
|
388
396
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
.
|
|
393
|
-
|
|
394
|
-
|
|
397
|
+
.smrt-textarea-input__info {
|
|
398
|
+
color: var(--smrt-color-on-surface-variant);
|
|
399
|
+
}
|
|
400
|
+
.smrt-textarea-input__error {
|
|
401
|
+
color: var(--smrt-color-error);
|
|
402
|
+
}
|
|
403
|
+
.smrt-textarea-input__success {
|
|
404
|
+
color: var(--smrt-color-primary);
|
|
405
|
+
}
|
|
406
|
+
.smrt-textarea-input__listening {
|
|
395
407
|
background-color: var(--smrt-color-primary-container);
|
|
396
408
|
}
|
|
397
|
-
|
|
398
|
-
.disabled {
|
|
409
|
+
.smrt-textarea-input__disabled {
|
|
399
410
|
opacity: 0.38;
|
|
400
|
-
pointer-events: none;
|
|
401
411
|
}
|
|
402
|
-
|
|
403
|
-
.smrt-mode {
|
|
412
|
+
.smrt-textarea-input__mode {
|
|
404
413
|
--smrt-textarea-input-field-active: var(--smrt-color-tertiary);
|
|
405
414
|
}
|
|
406
415
|
}
|
|
416
|
+
|
|
407
417
|
</style>
|
|
@@ -319,7 +319,7 @@ async function startExport() {
|
|
|
319
319
|
}
|
|
320
320
|
</script>
|
|
321
321
|
|
|
322
|
-
<section class="smrt-import-
|
|
322
|
+
<section class="smrt-import-export__root" aria-label={collectionLabel ? `${t(M['ui.importExport.label'])}: ${collectionLabel}` : t(M['ui.importExport.label'])} data-smrt-component="ImportExport">
|
|
323
323
|
{#if canImport && canExport}
|
|
324
324
|
<SegmentedControl
|
|
325
325
|
label={t(M['ui.importExport.mode'])}
|
|
@@ -335,7 +335,7 @@ async function startExport() {
|
|
|
335
335
|
{/if}
|
|
336
336
|
|
|
337
337
|
{#if tab === 'import' && canImport}
|
|
338
|
-
<div class="smrt-import-export__panel">
|
|
338
|
+
<div class="smrt-import-export__panel" data-smrt-part="panel">
|
|
339
339
|
<FilePicker
|
|
340
340
|
bind:files
|
|
341
341
|
label={t(M['ui.importExport.import.file'])}
|
|
@@ -347,14 +347,14 @@ async function startExport() {
|
|
|
347
347
|
/>
|
|
348
348
|
|
|
349
349
|
{#if reading}
|
|
350
|
-
<p role="status">{t(M['ui.importExport.import.reading'], { name: fileName })}</p>
|
|
350
|
+
<p role="status" data-smrt-part="status">{t(M['ui.importExport.import.reading'], { name: fileName })}</p>
|
|
351
351
|
{/if}
|
|
352
352
|
{#if fileError}
|
|
353
353
|
<Alert variant="error">{fileError}</Alert>
|
|
354
354
|
{/if}
|
|
355
355
|
|
|
356
356
|
{#if table && validation}
|
|
357
|
-
<p role="status">
|
|
357
|
+
<p role="status" data-smrt-part="status">
|
|
358
358
|
{t(M['ui.importExport.import.parsed'], {
|
|
359
359
|
name: fileName,
|
|
360
360
|
rows: table.rows.length,
|
|
@@ -368,7 +368,7 @@ async function startExport() {
|
|
|
368
368
|
<h3>{t(M['ui.importExport.map.heading'])}</h3>
|
|
369
369
|
{/snippet}
|
|
370
370
|
<p>{t(M['ui.importExport.map.help'])}</p>
|
|
371
|
-
<div class="smrt-import-export__scroll">
|
|
371
|
+
<div class="smrt-import-export__scroll" data-smrt-part="body">
|
|
372
372
|
<table>
|
|
373
373
|
<thead>
|
|
374
374
|
<tr>
|
|
@@ -413,7 +413,7 @@ async function startExport() {
|
|
|
413
413
|
{#snippet header()}
|
|
414
414
|
<h3>{t(M['ui.importExport.check.heading'])}</h3>
|
|
415
415
|
{/snippet}
|
|
416
|
-
<p role="status">
|
|
416
|
+
<p role="status" data-smrt-part="status">
|
|
417
417
|
{t(M['ui.importExport.check.summary'], {
|
|
418
418
|
valid: readyCount,
|
|
419
419
|
total: validation.totalRows,
|
|
@@ -432,7 +432,7 @@ async function startExport() {
|
|
|
432
432
|
|
|
433
433
|
{#if mappedColumns.length > 0}
|
|
434
434
|
<h4>{t(M['ui.importExport.check.preview'], { count: Math.min(PREVIEW_ROWS, table.rows.length) })}</h4>
|
|
435
|
-
<div class="smrt-import-export__scroll">
|
|
435
|
+
<div class="smrt-import-export__scroll" data-smrt-part="body">
|
|
436
436
|
<table>
|
|
437
437
|
<thead>
|
|
438
438
|
<tr>
|
|
@@ -467,7 +467,7 @@ async function startExport() {
|
|
|
467
467
|
|
|
468
468
|
{#if rowIssueCap.length > 0}
|
|
469
469
|
<h4>{t(M['ui.importExport.check.problems'])}</h4>
|
|
470
|
-
<div class="smrt-import-export__scroll">
|
|
470
|
+
<div class="smrt-import-export__scroll" data-smrt-part="body">
|
|
471
471
|
<table>
|
|
472
472
|
<thead>
|
|
473
473
|
<tr>
|
|
@@ -494,7 +494,7 @@ async function startExport() {
|
|
|
494
494
|
{/if}
|
|
495
495
|
{/if}
|
|
496
496
|
|
|
497
|
-
<div class="smrt-import-export__actions">
|
|
497
|
+
<div class="smrt-import-export__actions" data-smrt-part="actions">
|
|
498
498
|
<Button
|
|
499
499
|
onclick={startImport}
|
|
500
500
|
disabled={locked || mappingBlocked || readyCount === 0}
|
|
@@ -562,12 +562,12 @@ async function startExport() {
|
|
|
562
562
|
{/if}
|
|
563
563
|
|
|
564
564
|
{#if tab === 'export' && canExport}
|
|
565
|
-
<div class="smrt-import-export__panel">
|
|
565
|
+
<div class="smrt-import-export__panel" data-smrt-part="panel">
|
|
566
566
|
<Card>
|
|
567
567
|
{#snippet header()}
|
|
568
568
|
<h3>{t(M['ui.importExport.export.heading'])}</h3>
|
|
569
569
|
{/snippet}
|
|
570
|
-
<div class="smrt-import-export__actions">
|
|
570
|
+
<div class="smrt-import-export__actions" data-smrt-part="actions">
|
|
571
571
|
<Button variant="ghost" size="sm" onclick={() => (selected = exportable.map((f) => f.name))}>
|
|
572
572
|
{t(M['ui.importExport.export.all'])}
|
|
573
573
|
</Button>
|
|
@@ -575,7 +575,7 @@ async function startExport() {
|
|
|
575
575
|
{t(M['ui.importExport.export.none'])}
|
|
576
576
|
</Button>
|
|
577
577
|
</div>
|
|
578
|
-
<fieldset class="smrt-import-export__columns">
|
|
578
|
+
<fieldset class="smrt-import-export__columns" data-smrt-part="field">
|
|
579
579
|
<legend>{t(M['ui.importExport.export.columns'])}</legend>
|
|
580
580
|
{#each exportable as field (field.name)}
|
|
581
581
|
<Checkbox
|
|
@@ -613,7 +613,7 @@ async function startExport() {
|
|
|
613
613
|
</Select>
|
|
614
614
|
{/if}
|
|
615
615
|
|
|
616
|
-
<div class="smrt-import-export__actions">
|
|
616
|
+
<div class="smrt-import-export__actions" data-smrt-part="actions">
|
|
617
617
|
<Button
|
|
618
618
|
onclick={startExport}
|
|
619
619
|
disabled={exporting || selectedColumns.length === 0}
|
|
@@ -626,7 +626,7 @@ async function startExport() {
|
|
|
626
626
|
<p>{t(M['ui.importExport.export.noColumns'])}</p>
|
|
627
627
|
{/if}
|
|
628
628
|
{#if exporting}
|
|
629
|
-
<p role="status">{t(M['ui.importExport.export.loading'])}</p>
|
|
629
|
+
<p role="status" data-smrt-part="status">{t(M['ui.importExport.export.loading'])}</p>
|
|
630
630
|
{/if}
|
|
631
631
|
{#if exportMessage}
|
|
632
632
|
<Alert variant={exportMessage.kind}>{exportMessage.text}</Alert>
|
|
@@ -638,8 +638,8 @@ async function startExport() {
|
|
|
638
638
|
|
|
639
639
|
<style>
|
|
640
640
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
641
|
-
@layer smrt.
|
|
642
|
-
.smrt-import-
|
|
641
|
+
@layer smrt.structure {
|
|
642
|
+
.smrt-import-export__root {
|
|
643
643
|
display: flex;
|
|
644
644
|
flex-direction: column;
|
|
645
645
|
gap: var(--smrt-spacing-4);
|
|
@@ -653,15 +653,11 @@ async function startExport() {
|
|
|
653
653
|
overflow-x: auto;
|
|
654
654
|
}
|
|
655
655
|
.smrt-import-export__scroll table {
|
|
656
|
-
border-collapse: collapse;
|
|
657
656
|
width: 100%;
|
|
658
657
|
}
|
|
659
658
|
.smrt-import-export__scroll th,
|
|
660
659
|
.smrt-import-export__scroll td {
|
|
661
660
|
padding: var(--smrt-spacing-2);
|
|
662
|
-
text-align: start;
|
|
663
|
-
vertical-align: top;
|
|
664
|
-
border-block-end: var(--smrt-hairline);
|
|
665
661
|
}
|
|
666
662
|
.smrt-import-export__actions {
|
|
667
663
|
display: flex;
|
|
@@ -673,9 +669,24 @@ async function startExport() {
|
|
|
673
669
|
display: grid;
|
|
674
670
|
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
|
|
675
671
|
gap: var(--smrt-spacing-2);
|
|
676
|
-
border: 0;
|
|
677
672
|
padding: 0;
|
|
678
673
|
margin: 0;
|
|
679
674
|
}
|
|
680
675
|
}
|
|
676
|
+
|
|
677
|
+
@layer smrt.theme {
|
|
678
|
+
.smrt-import-export__scroll table {
|
|
679
|
+
border-collapse: collapse;
|
|
680
|
+
}
|
|
681
|
+
.smrt-import-export__scroll th,
|
|
682
|
+
.smrt-import-export__scroll td {
|
|
683
|
+
text-align: start;
|
|
684
|
+
vertical-align: top;
|
|
685
|
+
border-block-end: var(--smrt-hairline);
|
|
686
|
+
}
|
|
687
|
+
.smrt-import-export__columns {
|
|
688
|
+
border: 0;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
681
692
|
</style>
|
|
@@ -56,25 +56,25 @@ const slotMeta = $derived(moduleMeta?.uiSlots?.[slotId]);
|
|
|
56
56
|
class={className}
|
|
57
57
|
/>
|
|
58
58
|
{:else}
|
|
59
|
-
<div class="module-
|
|
60
|
-
<div class="module-
|
|
59
|
+
<div class="smrt-module-panel__placeholder {className}" data-smrt-component="ModulePanel">
|
|
60
|
+
<div class="smrt-module-panel__placeholder-icon" data-smrt-part="icon">
|
|
61
61
|
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
62
62
|
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/>
|
|
63
63
|
<polyline points="3.29 7 12 12 20.71 7"/>
|
|
64
64
|
<line x1="12" y1="22" x2="12" y2="12"/>
|
|
65
65
|
</svg>
|
|
66
66
|
</div>
|
|
67
|
-
<p class="module-
|
|
67
|
+
<p class="smrt-module-panel__placeholder-title" data-smrt-part="title">
|
|
68
68
|
{t(M['ui.module_panel.component_not_registered'])}
|
|
69
69
|
</p>
|
|
70
|
-
<code class="module-
|
|
70
|
+
<code class="smrt-module-panel__placeholder-code" data-smrt-part="body">
|
|
71
71
|
{moduleName}/{slotId}
|
|
72
72
|
</code>
|
|
73
|
-
<p class="module-
|
|
73
|
+
<p class="smrt-module-panel__placeholder-hint" data-smrt-part="description">
|
|
74
74
|
{t(M['ui.module_panel.register_hint'])}
|
|
75
75
|
</p>
|
|
76
76
|
{#if slotMeta}
|
|
77
|
-
<p class="module-
|
|
77
|
+
<p class="smrt-module-panel__placeholder-meta" data-smrt-part="meta">
|
|
78
78
|
Expected: <strong>{slotMeta.label}</strong>
|
|
79
79
|
{#if slotMeta.description}
|
|
80
80
|
— {slotMeta.description}
|
|
@@ -86,52 +86,61 @@ const slotMeta = $derived(moduleMeta?.uiSlots?.[slotId]);
|
|
|
86
86
|
|
|
87
87
|
<style>
|
|
88
88
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
89
|
-
@layer smrt.
|
|
90
|
-
.module-
|
|
89
|
+
@layer smrt.structure {
|
|
90
|
+
.smrt-module-panel__placeholder {
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
93
|
align-items: center;
|
|
94
94
|
justify-content: center;
|
|
95
95
|
padding: 2rem;
|
|
96
|
+
min-height: 150px;
|
|
97
|
+
gap: 0.75rem;
|
|
98
|
+
}
|
|
99
|
+
.smrt-module-panel__placeholder-title {
|
|
100
|
+
margin: 0;
|
|
101
|
+
}
|
|
102
|
+
.smrt-module-panel__placeholder-code {
|
|
103
|
+
padding: var(--smrt-spacing-1, 0.25rem) var(--smrt-spacing-2, 0.5rem);
|
|
104
|
+
}
|
|
105
|
+
.smrt-module-panel__placeholder-hint {
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
.smrt-module-panel__placeholder-meta {
|
|
109
|
+
margin: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@layer smrt.theme {
|
|
114
|
+
.smrt-module-panel__placeholder {
|
|
96
115
|
text-align: center;
|
|
97
116
|
background: var(--smrt-color-surface-container-low);
|
|
98
117
|
border: 1px dashed var(--smrt-color-outline-variant);
|
|
99
118
|
border-radius: var(--smrt-radius-medium);
|
|
100
|
-
min-height: 150px;
|
|
101
|
-
gap: 0.75rem;
|
|
102
119
|
}
|
|
103
|
-
|
|
104
|
-
.module-panel-placeholder__icon {
|
|
120
|
+
.smrt-module-panel__placeholder-icon {
|
|
105
121
|
color: var(--smrt-color-on-surface-variant);
|
|
106
122
|
opacity: 0.6;
|
|
107
123
|
}
|
|
108
|
-
|
|
109
|
-
.module-panel-placeholder__title {
|
|
110
|
-
margin: 0;
|
|
124
|
+
.smrt-module-panel__placeholder-title {
|
|
111
125
|
font-size: var(--smrt-typography-title-medium-size, 1rem);
|
|
112
126
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
113
127
|
color: var(--smrt-color-on-surface);
|
|
114
128
|
}
|
|
115
|
-
|
|
116
|
-
.module-panel-placeholder__code {
|
|
129
|
+
.smrt-module-panel__placeholder-code {
|
|
117
130
|
font-family: var(--smrt-font-family-mono, 'SF Mono', 'Monaco', 'Consolas', monospace);
|
|
118
131
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
119
|
-
padding: var(--smrt-spacing-1, 0.25rem) var(--smrt-spacing-2, 0.5rem);
|
|
120
132
|
background: var(--smrt-color-surface-container-high);
|
|
121
133
|
border-radius: var(--smrt-radius-small);
|
|
122
134
|
color: var(--smrt-color-on-surface-variant);
|
|
123
135
|
}
|
|
124
|
-
|
|
125
|
-
.module-panel-placeholder__hint {
|
|
126
|
-
margin: 0;
|
|
136
|
+
.smrt-module-panel__placeholder-hint {
|
|
127
137
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
128
138
|
color: var(--smrt-color-on-surface-variant);
|
|
129
139
|
}
|
|
130
|
-
|
|
131
|
-
.module-panel-placeholder__meta {
|
|
132
|
-
margin: 0;
|
|
140
|
+
.smrt-module-panel__placeholder-meta {
|
|
133
141
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
134
142
|
color: var(--smrt-color-on-surface-variant);
|
|
135
143
|
}
|
|
136
144
|
}
|
|
145
|
+
|
|
137
146
|
</style>
|
|
@@ -155,25 +155,25 @@ $effect(() => {
|
|
|
155
155
|
|
|
156
156
|
<svelte:document onkeydown={keydown} />
|
|
157
157
|
|
|
158
|
-
<div bind:this={root} class="smrt-notification-
|
|
158
|
+
<div bind:this={root} class="smrt-notification-bell__root" data-placement={placement} data-smrt-component="NotificationBell">
|
|
159
159
|
<Button id={`${instanceId}-trigger`} aria-controls={`${instanceId}-panel`} {variant} aria-haspopup="dialog" aria-expanded={open} aria-label={iconOnly ? (unread > 0 ? `${heading}, ${unreadText}` : heading) : undefined} onclick={() => setOpen(!open)}>
|
|
160
160
|
{#if iconOnly}
|
|
161
|
-
<span class="smrt-notification-bell__icon" aria-hidden="true">
|
|
161
|
+
<span class="smrt-notification-bell__icon" aria-hidden="true" data-smrt-part="icon">
|
|
162
162
|
<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" focusable="false"><path d="M12 22c1.1 0 2-.9 2-2h-4a2 2 0 0 0 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4a1.5 1.5 0 0 0-3 0v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1z" /></svg>
|
|
163
|
-
{#if unread > 0}<span class="smrt-notification-bell__badge" data-unread={unread}>{unread > 99 ? '99+' : unread}</span>{/if}
|
|
163
|
+
{#if unread > 0}<span class="smrt-notification-bell__badge" data-unread={unread} data-smrt-part="status">{unread > 99 ? '99+' : unread}</span>{/if}
|
|
164
164
|
</span>
|
|
165
165
|
{:else}
|
|
166
166
|
{heading}{#if unread > 0}<span aria-label={unreadText}> ({unread})</span>{/if}
|
|
167
167
|
{/if}
|
|
168
168
|
</Button>
|
|
169
169
|
{#if open}
|
|
170
|
-
<div bind:this={panel} id={`${instanceId}-panel`} role="dialog" aria-label={heading} tabindex="-1" class="smrt-notification-bell__panel">
|
|
171
|
-
<header><strong>{heading}</strong><Button variant="ghost" size="sm" disabled={unread === 0 || loading} onclick={() => mutate()}>{t(M['ui.notification_bell.mark_all'])}</Button></header>
|
|
172
|
-
{#if error}<p role="alert">{t(error)}</p>{/if}
|
|
173
|
-
{#if loading}<p role="status">{t(M['ui.notification_bell.loading'])}</p>{:else if items.length === 0}<p>{t(M['ui.notification_bell.empty'])}</p>{:else}<ol>
|
|
174
|
-
{#each items as item (item.id)}<li data-read={item.readAt ? 'true' : 'false'}>
|
|
175
|
-
{#if safeHref(item.href)}<a href={safeHref(item.href) ?? undefined} onclick={() => setOpen(false)}>{item.title}</a>{:else}<strong>{item.title}</strong>{/if}
|
|
176
|
-
{#if item.body}<p>{item.body}</p>{/if}
|
|
170
|
+
<div bind:this={panel} id={`${instanceId}-panel`} role="dialog" aria-label={heading} tabindex="-1" class="smrt-notification-bell__panel" data-smrt-part="panel">
|
|
171
|
+
<header data-smrt-part="header"><strong>{heading}</strong><Button variant="ghost" size="sm" disabled={unread === 0 || loading} onclick={() => mutate()}>{t(M['ui.notification_bell.mark_all'])}</Button></header>
|
|
172
|
+
{#if error}<p role="alert" data-smrt-part="error">{t(error)}</p>{/if}
|
|
173
|
+
{#if loading}<p role="status" data-smrt-part="status">{t(M['ui.notification_bell.loading'])}</p>{:else if items.length === 0}<p data-smrt-part="empty">{t(M['ui.notification_bell.empty'])}</p>{:else}<ol data-smrt-part="list">
|
|
174
|
+
{#each items as item (item.id)}<li data-read={item.readAt ? 'true' : 'false'} data-smrt-part="row">
|
|
175
|
+
{#if safeHref(item.href)}<a href={safeHref(item.href) ?? undefined} onclick={() => setOpen(false)} data-smrt-part="title">{item.title}</a>{:else}<strong data-smrt-part="title">{item.title}</strong>{/if}
|
|
176
|
+
{#if item.body}<p data-smrt-part="body">{item.body}</p>{/if}
|
|
177
177
|
{#if !item.readAt}<Button variant="ghost" size="sm" onclick={() => mutate(item.id)}>{t(M['ui.notification_bell.mark_one'])}</Button>{/if}
|
|
178
178
|
</li>{/each}
|
|
179
179
|
</ol>{/if}
|
|
@@ -183,19 +183,89 @@ $effect(() => {
|
|
|
183
183
|
|
|
184
184
|
<style>
|
|
185
185
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
186
|
+
@layer smrt.structure {
|
|
187
|
+
.smrt-notification-bell__root {
|
|
188
|
+
position: relative;
|
|
189
|
+
}
|
|
190
|
+
.smrt-notification-bell__panel {
|
|
191
|
+
position: absolute;
|
|
192
|
+
z-index: 1;
|
|
193
|
+
inset-block-start: 100%;
|
|
194
|
+
inset-inline-end: 0;
|
|
195
|
+
inline-size: min(24rem, 90vw);
|
|
196
|
+
padding: var(--smrt-spacing-3);
|
|
197
|
+
}
|
|
198
|
+
.smrt-notification-bell__icon {
|
|
199
|
+
position: relative;
|
|
200
|
+
display: inline-grid;
|
|
201
|
+
place-items: center;
|
|
202
|
+
}
|
|
203
|
+
.smrt-notification-bell__badge {
|
|
204
|
+
position: absolute;
|
|
205
|
+
inset-block-start: -0.35rem;
|
|
206
|
+
inset-inline-end: -0.5rem;
|
|
207
|
+
min-inline-size: 1rem;
|
|
208
|
+
padding-inline: 0.25rem;
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
}
|
|
211
|
+
.smrt-notification-bell__root[data-placement='beside'] .smrt-notification-bell__panel {
|
|
212
|
+
inset-block-start: 0;
|
|
213
|
+
inset-inline-end: auto;
|
|
214
|
+
inset-inline-start: 100%;
|
|
215
|
+
margin-inline-start: var(--smrt-spacing-2);
|
|
216
|
+
}
|
|
217
|
+
header {
|
|
218
|
+
display: flex;
|
|
219
|
+
justify-content: space-between;
|
|
220
|
+
gap: var(--smrt-spacing-2);
|
|
221
|
+
}
|
|
222
|
+
ol {
|
|
223
|
+
display: grid;
|
|
224
|
+
gap: var(--smrt-spacing-2);
|
|
225
|
+
padding: 0;
|
|
226
|
+
list-style: none;
|
|
227
|
+
}
|
|
228
|
+
li {
|
|
229
|
+
padding-block: var(--smrt-spacing-2);
|
|
230
|
+
}
|
|
231
|
+
li[data-read='false'] {
|
|
232
|
+
padding-inline-start: var(--smrt-spacing-2);
|
|
233
|
+
}
|
|
234
|
+
p {
|
|
235
|
+
overflow-wrap: anywhere;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
186
239
|
@layer smrt.theme {
|
|
187
|
-
.smrt-notification-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
240
|
+
.smrt-notification-bell__panel {
|
|
241
|
+
background: var(--smrt-color-surface);
|
|
242
|
+
border: var(--smrt-hairline-strong);
|
|
243
|
+
border-radius: var(--smrt-radius-medium);
|
|
244
|
+
}
|
|
245
|
+
.smrt-notification-bell__badge {
|
|
246
|
+
border-radius: var(--smrt-radius-full);
|
|
247
|
+
background: var(--smrt-color-error);
|
|
248
|
+
color: var(--smrt-color-on-error);
|
|
249
|
+
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
250
|
+
line-height: 1rem;
|
|
251
|
+
text-align: center;
|
|
252
|
+
}
|
|
253
|
+
li {
|
|
254
|
+
border-block-end: var(--smrt-hairline);
|
|
255
|
+
}
|
|
256
|
+
li[data-read='false'] {
|
|
257
|
+
border-inline-start: 3px solid var(--smrt-color-primary);
|
|
258
|
+
}
|
|
196
259
|
/* Notice titles are links: themed like the panel's other text, not the browser's default link blue (#4567). */
|
|
197
|
-
li a {
|
|
198
|
-
|
|
199
|
-
|
|
260
|
+
li a {
|
|
261
|
+
color: var(--smrt-color-primary);
|
|
262
|
+
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
263
|
+
text-decoration: underline;
|
|
264
|
+
text-underline-offset: 0.15em;
|
|
265
|
+
}
|
|
266
|
+
li a:hover, li a:focus-visible {
|
|
267
|
+
color: var(--smrt-color-on-surface);
|
|
268
|
+
}
|
|
200
269
|
}
|
|
270
|
+
|
|
201
271
|
</style>
|