@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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View Transitions helpers for hosts. Plain functions: no SvelteKit, no
|
|
3
|
+
* `$app/*`, usable from a hash router or any non-SvelteKit host.
|
|
4
|
+
*
|
|
5
|
+
* While a transition runs, `<html data-smrt-view-transition>` is set. The
|
|
6
|
+
* shell assigns these `view-transition-name`s only during that window (so the
|
|
7
|
+
* names never create containing blocks the rest of the time), and each must be
|
|
8
|
+
* unique per document: hosts must not reuse them.
|
|
9
|
+
*
|
|
10
|
+
* - `smrt-shell-brand` the brand
|
|
11
|
+
* - `smrt-shell-nav` the left sidebar navigation
|
|
12
|
+
* - `smrt-shell-dock` the right dock
|
|
13
|
+
*/
|
|
14
|
+
export declare const VIEW_TRANSITION_ATTRIBUTE = "data-smrt-view-transition";
|
|
15
|
+
export interface RunViewTransitionOptions {
|
|
16
|
+
/** Run `update` without a transition. */
|
|
17
|
+
skip?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Runs `update` inside `document.startViewTransition` when the API exists and
|
|
21
|
+
* reduced motion is off; otherwise just awaits `update()`. Resolves once the
|
|
22
|
+
* DOM update has been applied (not when the animation ends). An aborted or
|
|
23
|
+
* skipped transition never throws; an error thrown by `update` itself does.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runViewTransition(update: () => void | Promise<void>, options?: RunViewTransitionOptions): Promise<void>;
|
|
26
|
+
/** The slice of SvelteKit's `Navigation` the adapter needs. */
|
|
27
|
+
export interface ViewTransitionNavigation {
|
|
28
|
+
complete: Promise<unknown>;
|
|
29
|
+
type?: string;
|
|
30
|
+
willUnload?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Adapter for SvelteKit's `onNavigate`:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* onNavigate(createOnNavigateViewTransition());
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Returns a promise that resolves once the transition has captured the old
|
|
40
|
+
* view, which is what `onNavigate` awaits before updating the DOM.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createOnNavigateViewTransition(options?: RunViewTransitionOptions): (navigation: ViewTransitionNavigation) => Promise<void> | void;
|
|
43
|
+
//# sourceMappingURL=view-transition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-transition.d.ts","sourceRoot":"","sources":["../../../src/components/app/view-transition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAsBD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAClC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED,+DAA+D;AAC/D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,GAAE,wBAA6B,GACrC,CAAC,UAAU,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAUhE"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View Transitions helpers for hosts. Plain functions: no SvelteKit, no
|
|
3
|
+
* `$app/*`, usable from a hash router or any non-SvelteKit host.
|
|
4
|
+
*
|
|
5
|
+
* While a transition runs, `<html data-smrt-view-transition>` is set. The
|
|
6
|
+
* shell assigns these `view-transition-name`s only during that window (so the
|
|
7
|
+
* names never create containing blocks the rest of the time), and each must be
|
|
8
|
+
* unique per document: hosts must not reuse them.
|
|
9
|
+
*
|
|
10
|
+
* - `smrt-shell-brand` the brand
|
|
11
|
+
* - `smrt-shell-nav` the left sidebar navigation
|
|
12
|
+
* - `smrt-shell-dock` the right dock
|
|
13
|
+
*/
|
|
14
|
+
export const VIEW_TRANSITION_ATTRIBUTE = 'data-smrt-view-transition';
|
|
15
|
+
let active = 0;
|
|
16
|
+
function reducedMotion() {
|
|
17
|
+
return (typeof window !== 'undefined' &&
|
|
18
|
+
typeof window.matchMedia === 'function' &&
|
|
19
|
+
window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Runs `update` inside `document.startViewTransition` when the API exists and
|
|
23
|
+
* reduced motion is off; otherwise just awaits `update()`. Resolves once the
|
|
24
|
+
* DOM update has been applied (not when the animation ends). An aborted or
|
|
25
|
+
* skipped transition never throws; an error thrown by `update` itself does.
|
|
26
|
+
*/
|
|
27
|
+
export async function runViewTransition(update, options = {}) {
|
|
28
|
+
const doc = typeof document === 'undefined' ? undefined : document;
|
|
29
|
+
const start = doc?.startViewTransition;
|
|
30
|
+
if (!doc || options.skip || typeof start !== 'function' || reducedMotion()) {
|
|
31
|
+
await update();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
let transition;
|
|
35
|
+
active += 1;
|
|
36
|
+
doc.documentElement.setAttribute(VIEW_TRANSITION_ATTRIBUTE, '');
|
|
37
|
+
const release = () => {
|
|
38
|
+
active = Math.max(0, active - 1);
|
|
39
|
+
if (active === 0)
|
|
40
|
+
doc.documentElement.removeAttribute(VIEW_TRANSITION_ATTRIBUTE);
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
transition = start.call(doc, update);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
release();
|
|
47
|
+
await update();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// Aborts reject `ready` / `finished`; they are not errors.
|
|
51
|
+
transition.ready?.catch(() => { });
|
|
52
|
+
void Promise.resolve(transition.finished).then(release, release);
|
|
53
|
+
await transition.updateCallbackDone;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Adapter for SvelteKit's `onNavigate`:
|
|
57
|
+
*
|
|
58
|
+
* ```ts
|
|
59
|
+
* onNavigate(createOnNavigateViewTransition());
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* Returns a promise that resolves once the transition has captured the old
|
|
63
|
+
* view, which is what `onNavigate` awaits before updating the DOM.
|
|
64
|
+
*/
|
|
65
|
+
export function createOnNavigateViewTransition(options = {}) {
|
|
66
|
+
return (navigation) => {
|
|
67
|
+
if (navigation.willUnload || navigation.type === 'leave')
|
|
68
|
+
return;
|
|
69
|
+
return new Promise((resolve) => {
|
|
70
|
+
runViewTransition(async () => {
|
|
71
|
+
resolve();
|
|
72
|
+
await navigation.complete;
|
|
73
|
+
}, options).then(resolve, resolve);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -80,7 +80,7 @@ function apply() {
|
|
|
80
80
|
}
|
|
81
81
|
</script>
|
|
82
82
|
|
|
83
|
-
<section aria-label={t(M['ui.audit.list'])}>
|
|
83
|
+
<section aria-label={t(M['ui.audit.list'])} data-smrt-component="AuditList">
|
|
84
84
|
{#if showFilters}
|
|
85
85
|
<Form onsubmit={apply} class="smrt-audit-filters">
|
|
86
86
|
<FormGroup label={t(M['ui.audit.person'])}><Input bind:value={profileId} /></FormGroup>
|
|
@@ -103,5 +103,8 @@ function apply() {
|
|
|
103
103
|
</section>
|
|
104
104
|
|
|
105
105
|
<style>
|
|
106
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
107
|
+
@layer smrt.theme {
|
|
106
108
|
.smrt-audit-filters { display: flex; flex-wrap: wrap; gap: var(--smrt-spacing-3); align-items: end; }
|
|
109
|
+
}
|
|
107
110
|
</style>
|
|
@@ -146,7 +146,7 @@ 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-history">
|
|
149
|
+
<section aria-label={label ?? t(M['ui.audit.history'])} aria-busy={loading} class="smrt-record-history" data-smrt-component="RecordHistory">
|
|
150
150
|
{#if error}<p role="alert">{error}</p>{/if}
|
|
151
151
|
{#if loading}<p role="status">{t(M['ui.audit.loading'])}</p>{/if}
|
|
152
152
|
{#if !loading && visible.length === 0}<p>{t(M['ui.audit.empty'])}</p>{/if}
|
|
@@ -180,6 +180,8 @@ function date(value: string): string {
|
|
|
180
180
|
</section>
|
|
181
181
|
|
|
182
182
|
<style>
|
|
183
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
184
|
+
@layer smrt.theme {
|
|
183
185
|
.smrt-record-history > ol {
|
|
184
186
|
display: grid;
|
|
185
187
|
margin: 0;
|
|
@@ -231,4 +233,5 @@ function date(value: string): string {
|
|
|
231
233
|
background: var(--smrt-color-surface-container-low);
|
|
232
234
|
list-style: none;
|
|
233
235
|
}
|
|
236
|
+
}
|
|
234
237
|
</style>
|
|
@@ -212,7 +212,7 @@ function toggleColumn(columnId: string): void {
|
|
|
212
212
|
}
|
|
213
213
|
</script>
|
|
214
214
|
|
|
215
|
-
<section bind:this={root} class="smrt-board" aria-label={label ?? t(M['ui.board.label'])} aria-roledescription="board">
|
|
215
|
+
<section bind:this={root} class="smrt-board" aria-label={label ?? t(M['ui.board.label'])} aria-roledescription="board" data-smrt-component="Board">
|
|
216
216
|
<div class="smrt-board__lanes">
|
|
217
217
|
{#each columns as column, columnIndex (column.id)}
|
|
218
218
|
{@const items = cardsInColumn(column.id)}
|
|
@@ -291,6 +291,8 @@ function toggleColumn(columnId: string): void {
|
|
|
291
291
|
</section>
|
|
292
292
|
|
|
293
293
|
<style>
|
|
294
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
295
|
+
@layer smrt.theme {
|
|
294
296
|
.smrt-board { min-width: 0; }
|
|
295
297
|
.smrt-board__lanes { display: flex; gap: var(--smrt-spacing-4); overflow-x: auto; overscroll-behavior-x: contain; padding-block-end: var(--smrt-spacing-2); }
|
|
296
298
|
.smrt-board__lane { display: grid; grid-template-rows: auto minmax(0, 1fr); flex: 0 0 min(18rem, 82vw); min-block-size: 12rem; max-block-size: min(42rem, 70vh); border: 1px solid var(--smrt-color-outline-variant); border-radius: var(--smrt-radius-md); background: var(--smrt-color-surface-container); overflow: hidden; }
|
|
@@ -307,4 +309,5 @@ function toggleColumn(columnId: string): void {
|
|
|
307
309
|
.smrt-board__empty { margin: 0; color: var(--smrt-color-on-surface-variant); font: var(--smrt-typography-body-small-font); }
|
|
308
310
|
.smrt-board__live { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
|
|
309
311
|
@media (prefers-reduced-motion: reduce) { .smrt-board__card { scroll-behavior: auto; } }
|
|
312
|
+
}
|
|
310
313
|
</style>
|
|
@@ -34,6 +34,8 @@ interface Props {
|
|
|
34
34
|
hotkeys?: readonly string[] | false;
|
|
35
35
|
/** Trigger text and dialog name (default "Search"). */
|
|
36
36
|
label?: string;
|
|
37
|
+
/** Search box placeholder in the dialog. */
|
|
38
|
+
placeholder?: string;
|
|
37
39
|
/** Show only the glyph in the trigger. */
|
|
38
40
|
compact?: boolean;
|
|
39
41
|
/** Render the dialog and shortcut without a trigger. */
|
|
@@ -46,6 +48,7 @@ let {
|
|
|
46
48
|
navigate,
|
|
47
49
|
hotkeys = DEFAULT_PALETTE_HOTKEYS,
|
|
48
50
|
label,
|
|
51
|
+
placeholder,
|
|
49
52
|
compact = false,
|
|
50
53
|
hideTrigger = false,
|
|
51
54
|
}: Props = $props();
|
|
@@ -72,4 +75,4 @@ const palette = $derived(
|
|
|
72
75
|
hotkeys={hotkeys === false ? [] : hotkeys}
|
|
73
76
|
/>
|
|
74
77
|
{/if}
|
|
75
|
-
<CommandPaletteDialog {palette} {hotkeys} {label} />
|
|
78
|
+
<CommandPaletteDialog {palette} {hotkeys} {label} {placeholder} />
|
|
@@ -11,6 +11,8 @@ interface Props {
|
|
|
11
11
|
hotkeys?: readonly string[] | false;
|
|
12
12
|
/** Trigger text and dialog name (default "Search"). */
|
|
13
13
|
label?: string;
|
|
14
|
+
/** Search box placeholder in the dialog. */
|
|
15
|
+
placeholder?: string;
|
|
14
16
|
/** Show only the glyph in the trigger. */
|
|
15
17
|
compact?: boolean;
|
|
16
18
|
/** Render the dialog and shortcut without a trigger. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/CommandPalette.svelte.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,wBAAwB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,UAAU,KAAK;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC7C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,CAAC;IACpC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"CommandPalette.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/command-palette/CommandPalette.svelte.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,wBAAwB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,UAAU,KAAK;IACb,4DAA4D;IAC5D,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC7C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,KAAK,CAAC;IACpC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4CD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -256,6 +256,8 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
256
256
|
</Modal>
|
|
257
257
|
|
|
258
258
|
<style>
|
|
259
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
260
|
+
@layer smrt.theme {
|
|
259
261
|
.smrt-command-palette {
|
|
260
262
|
display: flex;
|
|
261
263
|
flex-direction: column;
|
|
@@ -403,4 +405,5 @@ const inputLabel = $derived(label ?? t(M['ui.command_palette.input_label']));
|
|
|
403
405
|
clip-path: inset(50%);
|
|
404
406
|
white-space: nowrap;
|
|
405
407
|
}
|
|
408
|
+
}
|
|
406
409
|
</style>
|
|
@@ -69,6 +69,8 @@ const hint = $derived(hotkeys[0] ? formatPaletteHotkey(hotkeys[0], apple) : '');
|
|
|
69
69
|
</Button>
|
|
70
70
|
|
|
71
71
|
<style>
|
|
72
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
73
|
+
@layer smrt.theme {
|
|
72
74
|
:global(.smrt-command-palette-trigger) {
|
|
73
75
|
gap: 0.5rem;
|
|
74
76
|
}
|
|
@@ -88,4 +90,5 @@ const hint = $derived(hotkeys[0] ? formatPaletteHotkey(hotkeys[0], apple) : '');
|
|
|
88
90
|
display: none;
|
|
89
91
|
}
|
|
90
92
|
}
|
|
93
|
+
}
|
|
91
94
|
</style>
|
|
@@ -41,6 +41,7 @@ let {
|
|
|
41
41
|
sectionPath,
|
|
42
42
|
href,
|
|
43
43
|
title,
|
|
44
|
+
navMode = 'sections-with-items',
|
|
44
45
|
slotItems = [],
|
|
45
46
|
children,
|
|
46
47
|
...shellProps
|
|
@@ -220,7 +221,7 @@ setCookbookContext({
|
|
|
220
221
|
<AppShell
|
|
221
222
|
{...shellProps}
|
|
222
223
|
title={shell.title}
|
|
223
|
-
navMode
|
|
224
|
+
{navMode}
|
|
224
225
|
navGroups={shell.navGroups}
|
|
225
226
|
{layout}
|
|
226
227
|
onlayoutchange={(next) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CookbookApp.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/CookbookApp.svelte.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"CookbookApp.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/CookbookApp.svelte.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAuNnD,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -43,7 +43,7 @@ const store = {
|
|
|
43
43
|
{#if title}<title>{title}</title>{/if}
|
|
44
44
|
</svelte:head>
|
|
45
45
|
|
|
46
|
-
<main class="cookbook-section">
|
|
46
|
+
<main class="cookbook-section" data-smrt-component="CookbookSectionPage">
|
|
47
47
|
{#if section}
|
|
48
48
|
<header>
|
|
49
49
|
<span class="mark"><ShellSectionIcon name={icon} size={28} /></span>
|
|
@@ -82,6 +82,8 @@ const store = {
|
|
|
82
82
|
</main>
|
|
83
83
|
|
|
84
84
|
<style>
|
|
85
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
86
|
+
@layer smrt.theme {
|
|
85
87
|
.cookbook-section {
|
|
86
88
|
display: grid;
|
|
87
89
|
gap: var(--smrt-spacing-6);
|
|
@@ -130,4 +132,5 @@ const store = {
|
|
|
130
132
|
margin: 0;
|
|
131
133
|
font-size: var(--smrt-typography-title-medium-size, 1rem);
|
|
132
134
|
}
|
|
135
|
+
}
|
|
133
136
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-theme.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/brand-theme.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"brand-theme.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/brand-theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAIxD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,GAAG,WAAW,CAqC5E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createThemeFromColor, isValidPreset, registerTheme, } from '@happyvertical/smrt-ui/themes';
|
|
1
|
+
import { createThemeFromColor, getTheme, isValidPreset, registerTheme, } from '@happyvertical/smrt-ui/themes';
|
|
2
2
|
import { DEFAULT_THEME_PRESET, THEME_FONTS } from './theme.js';
|
|
3
3
|
const registered = new Set();
|
|
4
4
|
/**
|
|
@@ -20,5 +20,24 @@ export function applyCookbookTheme(theme) {
|
|
|
20
20
|
}
|
|
21
21
|
return theme.preset;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
const basePreset = (isValidPreset(theme.preset) ? theme.preset : DEFAULT_THEME_PRESET);
|
|
24
|
+
const font = theme.fontFamily && THEME_FONTS[theme.fontFamily];
|
|
25
|
+
if (!font)
|
|
26
|
+
return basePreset;
|
|
27
|
+
const id = `cookbook-preset-${basePreset}-${theme.fontFamily?.toLowerCase().replace(/[^a-z0-9]/g, '')}`;
|
|
28
|
+
if (!registered.has(id)) {
|
|
29
|
+
const base = getTheme(basePreset);
|
|
30
|
+
const typography = Object.fromEntries(Object.entries(base.typography).map(([key, token]) => [
|
|
31
|
+
key,
|
|
32
|
+
{ ...token, fontFamily: 'var(--smrt-font-family)' },
|
|
33
|
+
]));
|
|
34
|
+
registerTheme({
|
|
35
|
+
...base,
|
|
36
|
+
id: id,
|
|
37
|
+
fontFamily: font,
|
|
38
|
+
typography,
|
|
39
|
+
});
|
|
40
|
+
registered.add(id);
|
|
41
|
+
}
|
|
42
|
+
return id;
|
|
24
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,EAAG,QAAiB,CAAC;AAEtD,gGAAgG;AAChG,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxD,CAAC;AAIF,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAO1D;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAC3C,eAAO,MAAM,oBAAoB,EAAG,QAAiB,CAAC;AAEtD,gGAAgG;AAChG,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxD,CAAC;AAIF,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAO1D;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC/B,qBAAqB,CAuBvB"}
|
|
@@ -38,16 +38,20 @@ export function resolveCookbookTheme(theme) {
|
|
|
38
38
|
? theme.colorScheme
|
|
39
39
|
: DEFAULT_COLOR_SCHEME;
|
|
40
40
|
const primary = theme?.custom ? normalizeHex(theme.custom.primary) : null;
|
|
41
|
+
const font = theme?.fontFamily ?? theme?.custom?.fontFamily;
|
|
42
|
+
const fontFamily = typeof font === 'string' && Object.hasOwn(THEME_FONTS, font)
|
|
43
|
+
? font
|
|
44
|
+
: undefined;
|
|
41
45
|
if (theme?.custom && primary) {
|
|
42
|
-
const font = theme.custom.fontFamily;
|
|
43
|
-
const fontFamily = typeof font === 'string' && Object.hasOwn(THEME_FONTS, font)
|
|
44
|
-
? font
|
|
45
|
-
: undefined;
|
|
46
46
|
return {
|
|
47
47
|
preset: brandThemeId(primary, fontFamily),
|
|
48
48
|
colorScheme,
|
|
49
49
|
brand: { primary, ...(fontFamily ? { fontFamily } : {}) },
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
return {
|
|
52
|
+
return {
|
|
53
|
+
preset: theme?.preset || DEFAULT_THEME_PRESET,
|
|
54
|
+
colorScheme,
|
|
55
|
+
...(fontFamily ? { fontFamily } : {}),
|
|
56
|
+
};
|
|
53
57
|
}
|
|
@@ -96,6 +96,8 @@ export interface ResolvedCookbookTheme {
|
|
|
96
96
|
/** Preset id: a built-in smrt-ui preset, or the brand theme's id. */
|
|
97
97
|
preset: string;
|
|
98
98
|
colorScheme: 'light' | 'dark' | 'system';
|
|
99
|
+
/** Known font key applied without changing a built-in preset's palette. */
|
|
100
|
+
fontFamily?: string;
|
|
99
101
|
/** Present when the cookbook names a brand colour (it wins over `preset`). */
|
|
100
102
|
brand?: {
|
|
101
103
|
primary: string;
|
|
@@ -142,7 +144,7 @@ export interface BuildCookbookShellOptions {
|
|
|
142
144
|
/** Everything `AppShell` and the section pages need, derived from a cookbook. */
|
|
143
145
|
export interface CookbookShell {
|
|
144
146
|
title: string;
|
|
145
|
-
navMode: 'sections';
|
|
147
|
+
navMode: 'sections-with-items';
|
|
146
148
|
/** Sections as the shell takes them (layout is applied by the shell). */
|
|
147
149
|
navGroups: ShellNavGroup[];
|
|
148
150
|
/** The cookbook's layout, or `null` when it has none. */
|
|
@@ -183,6 +185,8 @@ export interface CookbookSectionPageProps {
|
|
|
183
185
|
export interface CookbookAppProps extends Omit<ComponentProps<typeof AppShell>, 'navGroups' | 'nav' | 'navMode' | 'layout' | 'onlayoutchange' | 'preset' | 'colorScheme' | 'sectionHref' | 'title' | 'children'>, Pick<BuildCookbookShellOptions, 'recipeOrder' | 'entryPath' | 'sectionPath' | 'href' | 'title'> {
|
|
184
186
|
cookbook: Cookbook;
|
|
185
187
|
catalog: CookbookCatalog;
|
|
188
|
+
/** Expanded section entries are the default; use `sections` for headings only. */
|
|
189
|
+
navMode?: 'sections' | 'sections-with-items';
|
|
186
190
|
/**
|
|
187
191
|
* Data loaders for the `metric`, `records` and `chart` widgets. With
|
|
188
192
|
* `metric` and `records`, section pages also show a record count and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/cookbook/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK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;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBACf,SAAQ,IAAI,CACR,cAAc,CAAC,OAAO,QAAQ,CAAC,EAC7B,WAAW,GACX,KAAK,GACL,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,aAAa,GACb,OAAO,GACP,UAAU,CACb,EACD,IAAI,CACF,yBAAyB,EACzB,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,MAAM,GAAG,OAAO,CAC/D;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,kFAAkF;IAClF,OAAO,CAAC,EAAE,UAAU,GAAG,qBAAqB,CAAC;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAC/C,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C;;;;OAIG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,OAAO,QAAQ,EAAE,OAAO,CAAC;CACpC"}
|
|
@@ -395,7 +395,7 @@ function handleCountryChange(e: Event) {
|
|
|
395
395
|
}
|
|
396
396
|
</script>
|
|
397
397
|
|
|
398
|
-
<div class="smrt-address" data-smrt-field-owner={fieldOwnerToken}>
|
|
398
|
+
<div class="smrt-address" data-smrt-field-owner={fieldOwnerToken} data-smrt-component="AddressInput">
|
|
399
399
|
{#if label}
|
|
400
400
|
<FieldLabel for={primaryFieldId} {label} {required} />
|
|
401
401
|
{/if}
|
|
@@ -517,36 +517,38 @@ function handleCountryChange(e: Event) {
|
|
|
517
517
|
</div>
|
|
518
518
|
|
|
519
519
|
<style>
|
|
520
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
521
|
+
@layer smrt.theme {
|
|
520
522
|
.smrt-address {
|
|
521
523
|
display: flex;
|
|
522
524
|
flex-direction: column;
|
|
523
|
-
gap: var(--smrt-spacing-2
|
|
525
|
+
gap: var(--smrt-spacing-2);
|
|
524
526
|
}
|
|
525
527
|
|
|
526
528
|
.address-fields {
|
|
527
529
|
display: flex;
|
|
528
530
|
flex-direction: column;
|
|
529
|
-
gap: var(--smrt-spacing-3
|
|
530
|
-
padding: var(--smrt-spacing-4
|
|
531
|
-
background: var(--smrt-color-surface-container-low
|
|
532
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
533
|
-
border-radius: var(--smrt-radius-medium
|
|
531
|
+
gap: var(--smrt-spacing-3);
|
|
532
|
+
padding: var(--smrt-spacing-4);
|
|
533
|
+
background: var(--smrt-color-surface-container-low);
|
|
534
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
535
|
+
border-radius: var(--smrt-radius-medium);
|
|
534
536
|
}
|
|
535
537
|
|
|
536
538
|
.address-fields.smrt-mode {
|
|
537
|
-
border-color: var(--smrt-color-tertiary
|
|
538
|
-
background: var(--smrt-color-tertiary-container
|
|
539
|
+
border-color: var(--smrt-color-tertiary);
|
|
540
|
+
background: var(--smrt-color-tertiary-container);
|
|
539
541
|
}
|
|
540
542
|
|
|
541
543
|
.field-row {
|
|
542
544
|
display: flex;
|
|
543
545
|
flex-direction: column;
|
|
544
|
-
gap: var(--smrt-spacing-1
|
|
546
|
+
gap: var(--smrt-spacing-1);
|
|
545
547
|
}
|
|
546
548
|
|
|
547
549
|
.field-row-group {
|
|
548
550
|
display: flex;
|
|
549
|
-
gap: var(--smrt-spacing-3
|
|
551
|
+
gap: var(--smrt-spacing-3);
|
|
550
552
|
}
|
|
551
553
|
|
|
552
554
|
.full-width {
|
|
@@ -564,33 +566,33 @@ function handleCountryChange(e: Event) {
|
|
|
564
566
|
.field-label {
|
|
565
567
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
566
568
|
font-weight: var(--smrt-typography-body-small-weight, 500);
|
|
567
|
-
color: var(--smrt-color-on-surface-variant
|
|
569
|
+
color: var(--smrt-color-on-surface-variant);
|
|
568
570
|
text-transform: uppercase;
|
|
569
571
|
letter-spacing: 0.025em;
|
|
570
572
|
}
|
|
571
573
|
|
|
572
574
|
.smrt-input {
|
|
573
|
-
padding: var(--smrt-spacing-2
|
|
575
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
574
576
|
font-size: var(--smrt-typography-body-large-size, 1rem);
|
|
575
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
576
|
-
border-radius: var(--smrt-radius-small
|
|
577
|
-
background: var(--smrt-color-surface
|
|
577
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
578
|
+
border-radius: var(--smrt-radius-small);
|
|
579
|
+
background: var(--smrt-color-surface);
|
|
578
580
|
transition: all var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
|
|
579
581
|
}
|
|
580
582
|
|
|
581
583
|
.smrt-input:focus {
|
|
582
584
|
outline: none;
|
|
583
|
-
border-color: var(--smrt-color-primary
|
|
584
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--smrt-color-primary
|
|
585
|
+
border-color: var(--smrt-color-primary);
|
|
586
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--smrt-color-primary) 10%, transparent);
|
|
585
587
|
}
|
|
586
588
|
|
|
587
589
|
.smrt-input:disabled {
|
|
588
|
-
background: var(--smrt-color-surface-container-high
|
|
590
|
+
background: var(--smrt-color-surface-container-high);
|
|
589
591
|
cursor: not-allowed;
|
|
590
592
|
}
|
|
591
593
|
|
|
592
594
|
.smrt-input.invalid {
|
|
593
|
-
border-color: var(--smrt-color-error
|
|
595
|
+
border-color: var(--smrt-color-error);
|
|
594
596
|
}
|
|
595
597
|
|
|
596
598
|
.smrt-select {
|
|
@@ -599,8 +601,8 @@ function handleCountryChange(e: Event) {
|
|
|
599
601
|
|
|
600
602
|
.validation-error {
|
|
601
603
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
602
|
-
color: var(--smrt-color-error
|
|
603
|
-
margin-top: var(--smrt-spacing-1
|
|
604
|
+
color: var(--smrt-color-error);
|
|
605
|
+
margin-top: var(--smrt-spacing-1);
|
|
604
606
|
}
|
|
605
607
|
|
|
606
608
|
@media (max-width: 600px) {
|
|
@@ -608,4 +610,5 @@ function handleCountryChange(e: Event) {
|
|
|
608
610
|
flex-direction: column;
|
|
609
611
|
}
|
|
610
612
|
}
|
|
613
|
+
}
|
|
611
614
|
</style>
|
|
@@ -110,7 +110,7 @@ function handleChange(e: Event) {
|
|
|
110
110
|
}
|
|
111
111
|
</script>
|
|
112
112
|
|
|
113
|
-
<div class="smrt-checkbox-field" class:disabled class:smrt-mode={isSmrt}>
|
|
113
|
+
<div class="smrt-checkbox-field" class:disabled class:smrt-mode={isSmrt} data-smrt-component="CheckboxInput">
|
|
114
114
|
<div class="container" use:ripple>
|
|
115
115
|
<input
|
|
116
116
|
type="checkbox"
|
|
@@ -140,11 +140,13 @@ function handleChange(e: Event) {
|
|
|
140
140
|
</div>
|
|
141
141
|
|
|
142
142
|
<style>
|
|
143
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
144
|
+
@layer smrt.theme {
|
|
143
145
|
.smrt-checkbox-field {
|
|
144
146
|
display: inline-flex;
|
|
145
147
|
min-width: 0;
|
|
146
148
|
align-items: center;
|
|
147
|
-
gap: var(--smrt-spacing-2
|
|
149
|
+
gap: var(--smrt-spacing-2);
|
|
148
150
|
cursor: pointer;
|
|
149
151
|
vertical-align: middle;
|
|
150
152
|
user-select: none;
|
|
@@ -157,7 +159,7 @@ function handleChange(e: Event) {
|
|
|
157
159
|
display: flex;
|
|
158
160
|
align-items: center;
|
|
159
161
|
justify-content: center;
|
|
160
|
-
border-radius: var(--smrt-radius-full
|
|
162
|
+
border-radius: var(--smrt-radius-full);
|
|
161
163
|
margin: -10px; /* Offset the 40x40 container to align 18x18 checkbox */
|
|
162
164
|
}
|
|
163
165
|
|
|
@@ -175,7 +177,7 @@ function handleChange(e: Event) {
|
|
|
175
177
|
width: 18px;
|
|
176
178
|
height: 18px;
|
|
177
179
|
border: 2px solid var(--smrt-color-on-surface-variant);
|
|
178
|
-
border-radius: var(--smrt-radius-sm
|
|
180
|
+
border-radius: var(--smrt-radius-sm);
|
|
179
181
|
display: flex;
|
|
180
182
|
align-items: center;
|
|
181
183
|
justify-content: center;
|
|
@@ -226,7 +228,7 @@ function handleChange(e: Event) {
|
|
|
226
228
|
left: 0;
|
|
227
229
|
right: 0;
|
|
228
230
|
bottom: 0;
|
|
229
|
-
border-radius: var(--smrt-radius-full
|
|
231
|
+
border-radius: var(--smrt-radius-full);
|
|
230
232
|
pointer-events: none;
|
|
231
233
|
transition: opacity var(--smrt-duration-short3, 200ms) var(--smrt-easing-standard, ease);
|
|
232
234
|
}
|
|
@@ -235,4 +237,5 @@ function handleChange(e: Event) {
|
|
|
235
237
|
background-color: var(--smrt-color-on-surface);
|
|
236
238
|
opacity: 0.08;
|
|
237
239
|
}
|
|
240
|
+
}
|
|
238
241
|
</style>
|