@svadmin/ui 0.100.0 → 0.102.0
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 +1 -1
- package/dist/app.css +99 -0
- package/dist/app.theme.css +99 -0
- package/dist/components/AboutSettings.svelte +1 -1
- package/dist/components/AdminApp.svelte +13 -1
- package/dist/components/AdminApp.svelte.d.ts +7 -0
- package/dist/components/Affix.svelte +43 -0
- package/dist/components/Affix.svelte.d.ts +11 -0
- package/dist/components/Anchor.svelte +60 -0
- package/dist/components/Anchor.svelte.d.ts +14 -0
- package/dist/components/AutoTable.svelte +35 -16
- package/dist/components/AutoTable.svelte.d.ts +6 -0
- package/dist/components/Calendar.svelte +152 -0
- package/dist/components/Calendar.svelte.d.ts +20 -0
- package/dist/components/Carousel.svelte +107 -0
- package/dist/components/Carousel.svelte.d.ts +15 -0
- package/dist/components/Collapse.svelte +177 -0
- package/dist/components/Collapse.svelte.d.ts +32 -0
- package/dist/components/CommentThread.svelte +109 -0
- package/dist/components/CommentThread.svelte.d.ts +22 -0
- package/dist/components/CopyButton.svelte +148 -0
- package/dist/components/CopyButton.svelte.d.ts +19 -0
- package/dist/components/DataTableShell.svelte +140 -0
- package/dist/components/DataTableShell.svelte.d.ts +18 -0
- package/dist/components/Header.svelte +28 -0
- package/dist/components/Header.svelte.d.ts +8 -0
- package/dist/components/ImagePreview.svelte +83 -0
- package/dist/components/ImagePreview.svelte.d.ts +14 -0
- package/dist/components/Layout.svelte +86 -6
- package/dist/components/Layout.svelte.d.ts +6 -0
- package/dist/components/ListFooter.svelte +9 -3
- package/dist/components/ListFooter.svelte.d.ts +1 -0
- package/dist/components/ListPagination.svelte +25 -19
- package/dist/components/ListPagination.svelte.d.ts +4 -3
- package/dist/components/NotificationCenter.svelte +215 -0
- package/dist/components/NotificationCenter.svelte.d.ts +28 -0
- package/dist/components/ScrollableTable.svelte +211 -0
- package/dist/components/ScrollableTable.svelte.d.ts +14 -0
- package/dist/components/ThemeSettingsDrawer.svelte +212 -0
- package/dist/components/ThemeSettingsDrawer.svelte.d.ts +10 -0
- package/dist/components/TypographyEllipsis.svelte +123 -0
- package/dist/components/TypographyEllipsis.svelte.d.ts +18 -0
- package/dist/components/ViewModeToggle.svelte +47 -0
- package/dist/components/ViewModeToggle.svelte.d.ts +11 -0
- package/dist/components/list-i18n.d.ts +27 -0
- package/dist/components/list-i18n.js +53 -0
- package/dist/components/templates/AdvancedDetailTemplate.svelte +36 -0
- package/dist/components/templates/AdvancedDetailTemplate.svelte.d.ts +17 -0
- package/dist/components/templates/AdvancedFormTemplate.svelte +32 -0
- package/dist/components/templates/AdvancedFormTemplate.svelte.d.ts +15 -0
- package/dist/components/templates/AnalysisTemplate.svelte +34 -0
- package/dist/components/templates/AnalysisTemplate.svelte.d.ts +16 -0
- package/dist/components/templates/BasicDetailTemplate.svelte +32 -0
- package/dist/components/templates/BasicDetailTemplate.svelte.d.ts +15 -0
- package/dist/components/templates/CardListTemplate.svelte +29 -0
- package/dist/components/templates/CardListTemplate.svelte.d.ts +14 -0
- package/dist/components/templates/ExceptionTemplate.svelte +28 -0
- package/dist/components/templates/ExceptionTemplate.svelte.d.ts +11 -0
- package/dist/components/templates/GroupFormTemplate.svelte +30 -0
- package/dist/components/templates/GroupFormTemplate.svelte.d.ts +14 -0
- package/dist/components/templates/MonitorTemplate.svelte +39 -0
- package/dist/components/templates/MonitorTemplate.svelte.d.ts +15 -0
- package/dist/components/templates/ProfileTemplate.svelte +30 -0
- package/dist/components/templates/ProfileTemplate.svelte.d.ts +14 -0
- package/dist/components/templates/ResultTemplate.svelte +39 -0
- package/dist/components/templates/ResultTemplate.svelte.d.ts +14 -0
- package/dist/components/templates/SearchTableTemplate.svelte +31 -0
- package/dist/components/templates/SearchTableTemplate.svelte.d.ts +15 -0
- package/dist/components/templates/StepFormTemplate.svelte +62 -0
- package/dist/components/templates/StepFormTemplate.svelte.d.ts +23 -0
- package/dist/components/templates/TemplatePageShell.svelte +109 -0
- package/dist/components/templates/TemplatePageShell.svelte.d.ts +20 -0
- package/dist/components/templates/WorkplaceTemplate.svelte +34 -0
- package/dist/components/templates/WorkplaceTemplate.svelte.d.ts +16 -0
- package/dist/components/templates/index.d.ts +16 -0
- package/dist/components/templates/index.js +16 -0
- package/dist/design-system-components.d.ts +64 -0
- package/dist/design-system-components.js +72 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +17 -0
- package/dist/ui-preferences.svelte.d.ts +19 -0
- package/dist/ui-preferences.svelte.js +69 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
actions?: Snippet;
|
|
10
|
+
details: Snippet;
|
|
11
|
+
summary?: Snippet;
|
|
12
|
+
footer?: Snippet;
|
|
13
|
+
pageId?: string;
|
|
14
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { title, eyebrow, description, actions, details, summary, footer, pageId = 'detail', width = 'default' }: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<TemplatePageShell
|
|
21
|
+
{title}
|
|
22
|
+
{...(eyebrow ? { eyebrow } : {})}
|
|
23
|
+
{...(description ? { description } : {})}
|
|
24
|
+
{...(actions ? { actions } : {})}
|
|
25
|
+
primary={details}
|
|
26
|
+
{...(summary ? { secondary: summary } : {})}
|
|
27
|
+
{...(footer ? { footer } : {})}
|
|
28
|
+
{pageId}
|
|
29
|
+
{width}
|
|
30
|
+
primaryLabel="Record details"
|
|
31
|
+
secondaryLabel="Summary"
|
|
32
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: Snippet;
|
|
7
|
+
details: Snippet;
|
|
8
|
+
summary?: Snippet;
|
|
9
|
+
footer?: Snippet;
|
|
10
|
+
pageId?: string;
|
|
11
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
12
|
+
}
|
|
13
|
+
declare const BasicDetailTemplate: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type BasicDetailTemplate = ReturnType<typeof BasicDetailTemplate>;
|
|
15
|
+
export default BasicDetailTemplate;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: Snippet;
|
|
9
|
+
filters?: Snippet;
|
|
10
|
+
items: Snippet;
|
|
11
|
+
footer?: Snippet;
|
|
12
|
+
pageId?: string;
|
|
13
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { title, description, actions, filters, items, footer, pageId = 'card-list', width = 'wide' }: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<TemplatePageShell
|
|
20
|
+
{title}
|
|
21
|
+
{...(description ? { description } : {})}
|
|
22
|
+
{...(actions ? { actions } : {})}
|
|
23
|
+
{...(filters ? { toolbar: filters } : {})}
|
|
24
|
+
primary={items}
|
|
25
|
+
{...(footer ? { footer } : {})}
|
|
26
|
+
{pageId}
|
|
27
|
+
{width}
|
|
28
|
+
primaryLabel="Cards"
|
|
29
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: Snippet;
|
|
6
|
+
filters?: Snippet;
|
|
7
|
+
items: Snippet;
|
|
8
|
+
footer?: Snippet;
|
|
9
|
+
pageId?: string;
|
|
10
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
11
|
+
}
|
|
12
|
+
declare const CardListTemplate: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type CardListTemplate = ReturnType<typeof CardListTemplate>;
|
|
14
|
+
export default CardListTemplate;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import ResultTemplate from './ResultTemplate.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
status: 403 | 404 | 500;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
actions?: Snippet;
|
|
10
|
+
pageId?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { status, title, subtitle, actions, pageId = 'exception' }: Props = $props();
|
|
14
|
+
const defaults: Record<403 | 404 | 500, { title: string; subtitle: string }> = {
|
|
15
|
+
403: { title: 'Access denied', subtitle: 'You do not have permission to view this page.' },
|
|
16
|
+
404: { title: 'Page not found', subtitle: 'The page may have moved or no longer exists.' },
|
|
17
|
+
500: { title: 'Service unavailable', subtitle: 'Try again or contact your administrator.' },
|
|
18
|
+
};
|
|
19
|
+
const copy = $derived(defaults[status]);
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<ResultTemplate
|
|
23
|
+
status={String(status) as '403' | '404' | '500'}
|
|
24
|
+
title={title ?? copy.title}
|
|
25
|
+
subtitle={subtitle ?? copy.subtitle}
|
|
26
|
+
{...(actions ? { actions } : {})}
|
|
27
|
+
{pageId}
|
|
28
|
+
/>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
status: 403 | 404 | 500;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
actions?: Snippet;
|
|
7
|
+
pageId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const ExceptionTemplate: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type ExceptionTemplate = ReturnType<typeof ExceptionTemplate>;
|
|
11
|
+
export default ExceptionTemplate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: Snippet;
|
|
9
|
+
form: Snippet;
|
|
10
|
+
summary?: Snippet;
|
|
11
|
+
footer?: Snippet;
|
|
12
|
+
pageId?: string;
|
|
13
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { title, description, actions, form, summary, footer, pageId = 'group-form', width = 'default' }: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<TemplatePageShell
|
|
20
|
+
{title}
|
|
21
|
+
{...(description ? { description } : {})}
|
|
22
|
+
{...(actions ? { actions } : {})}
|
|
23
|
+
primary={form}
|
|
24
|
+
{...(summary ? { secondary: summary } : {})}
|
|
25
|
+
{...(footer ? { footer } : {})}
|
|
26
|
+
{pageId}
|
|
27
|
+
{width}
|
|
28
|
+
primaryLabel="Form"
|
|
29
|
+
secondaryLabel="Guidance"
|
|
30
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: Snippet;
|
|
6
|
+
form: Snippet;
|
|
7
|
+
summary?: Snippet;
|
|
8
|
+
footer?: Snippet;
|
|
9
|
+
pageId?: string;
|
|
10
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
11
|
+
}
|
|
12
|
+
declare const GroupFormTemplate: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type GroupFormTemplate = ReturnType<typeof GroupFormTemplate>;
|
|
14
|
+
export default GroupFormTemplate;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: Snippet;
|
|
9
|
+
metrics: Snippet;
|
|
10
|
+
alerts?: Snippet;
|
|
11
|
+
activity?: Snippet;
|
|
12
|
+
chart?: Snippet;
|
|
13
|
+
pageId?: string;
|
|
14
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { title, description, actions, metrics, alerts, activity, chart, pageId = 'monitor', width = 'wide' }: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<TemplatePageShell
|
|
21
|
+
{title}
|
|
22
|
+
{...(description ? { description } : {})}
|
|
23
|
+
{...(actions ? { actions } : {})}
|
|
24
|
+
{metrics}
|
|
25
|
+
primary={chart ?? alerts ?? fallback}
|
|
26
|
+
{...(activity ? { secondary: activity } : {})}
|
|
27
|
+
{pageId}
|
|
28
|
+
{width}
|
|
29
|
+
primaryLabel="Live monitor"
|
|
30
|
+
secondaryLabel="Recent activity"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
{#snippet fallback()}
|
|
34
|
+
<p class="svadmin-monitor-template__empty">No live monitor content.</p>
|
|
35
|
+
{/snippet}
|
|
36
|
+
|
|
37
|
+
<style>
|
|
38
|
+
.svadmin-monitor-template__empty { margin: 0; padding: var(--svadmin-space-5); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--muted-foreground); text-align: center; }
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: Snippet;
|
|
6
|
+
metrics: Snippet;
|
|
7
|
+
alerts?: Snippet;
|
|
8
|
+
activity?: Snippet;
|
|
9
|
+
chart?: Snippet;
|
|
10
|
+
pageId?: string;
|
|
11
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
12
|
+
}
|
|
13
|
+
declare const MonitorTemplate: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type MonitorTemplate = ReturnType<typeof MonitorTemplate>;
|
|
15
|
+
export default MonitorTemplate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: Snippet;
|
|
9
|
+
profile: Snippet;
|
|
10
|
+
activity?: Snippet;
|
|
11
|
+
projects?: Snippet;
|
|
12
|
+
pageId?: string;
|
|
13
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { title, description, actions, profile, activity, projects, pageId = 'profile', width = 'wide' }: Props = $props();
|
|
17
|
+
const secondary = $derived(activity ?? projects);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<TemplatePageShell
|
|
21
|
+
{title}
|
|
22
|
+
{...(description ? { description } : {})}
|
|
23
|
+
{...(actions ? { actions } : {})}
|
|
24
|
+
primary={profile}
|
|
25
|
+
{...(secondary ? { secondary } : {})}
|
|
26
|
+
{pageId}
|
|
27
|
+
{width}
|
|
28
|
+
primaryLabel="Profile"
|
|
29
|
+
secondaryLabel="Activity"
|
|
30
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: Snippet;
|
|
6
|
+
profile: Snippet;
|
|
7
|
+
activity?: Snippet;
|
|
8
|
+
projects?: Snippet;
|
|
9
|
+
pageId?: string;
|
|
10
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
11
|
+
}
|
|
12
|
+
declare const ProfileTemplate: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type ProfileTemplate = ReturnType<typeof ProfileTemplate>;
|
|
14
|
+
export default ProfileTemplate;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import ContentPageShell from '../content/ContentPageShell.svelte';
|
|
4
|
+
import Result from '../Result.svelte';
|
|
5
|
+
import { cn } from '../../utils.js';
|
|
6
|
+
|
|
7
|
+
type ResultStatus = 'success' | 'failure' | '403' | '404' | '500' | 'info' | 'warning';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
status: ResultStatus;
|
|
11
|
+
title: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
actions?: Snippet;
|
|
14
|
+
details?: Snippet;
|
|
15
|
+
pageId?: string;
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let { status, title, subtitle, actions, details, pageId = 'result', class: className = '' }: Props = $props();
|
|
20
|
+
const resultStatus = $derived(status === 'failure' ? 'error' : status);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<ContentPageShell {pageId} width="narrow" class={cn('svadmin-result-page', className)}>
|
|
24
|
+
<Result status={resultStatus} {title} {...(subtitle ? { subtitle } : {})}>
|
|
25
|
+
{#if details}{@render details()}{/if}
|
|
26
|
+
</Result>
|
|
27
|
+
{#if actions}<div class="svadmin-result-page__actions">{@render actions()}</div>{/if}
|
|
28
|
+
</ContentPageShell>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
:global(.svadmin-result-page) { display: grid; place-items: center; padding-block: var(--svadmin-space-6); }
|
|
32
|
+
.svadmin-result-page__actions {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: var(--svadmin-space-2);
|
|
37
|
+
margin-block-start: var(--svadmin-space-4);
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
type ResultStatus = 'success' | 'failure' | '403' | '404' | '500' | 'info' | 'warning';
|
|
3
|
+
interface Props {
|
|
4
|
+
status: ResultStatus;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
actions?: Snippet;
|
|
8
|
+
details?: Snippet;
|
|
9
|
+
pageId?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ResultTemplate: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type ResultTemplate = ReturnType<typeof ResultTemplate>;
|
|
14
|
+
export default ResultTemplate;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: Snippet;
|
|
9
|
+
filters?: Snippet;
|
|
10
|
+
metrics?: Snippet;
|
|
11
|
+
table: Snippet;
|
|
12
|
+
footer?: Snippet;
|
|
13
|
+
pageId?: string;
|
|
14
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { title, description, actions, filters, metrics, table, footer, pageId = 'search-table', width = 'wide' }: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<TemplatePageShell
|
|
21
|
+
{title}
|
|
22
|
+
{...(description ? { description } : {})}
|
|
23
|
+
{...(actions ? { actions } : {})}
|
|
24
|
+
{...(filters ? { toolbar: filters } : {})}
|
|
25
|
+
{...(metrics ? { metrics } : {})}
|
|
26
|
+
primary={table}
|
|
27
|
+
{...(footer ? { footer } : {})}
|
|
28
|
+
{pageId}
|
|
29
|
+
{width}
|
|
30
|
+
primaryLabel="Search results"
|
|
31
|
+
/>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: Snippet;
|
|
6
|
+
filters?: Snippet;
|
|
7
|
+
metrics?: Snippet;
|
|
8
|
+
table: Snippet;
|
|
9
|
+
footer?: Snippet;
|
|
10
|
+
pageId?: string;
|
|
11
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
12
|
+
}
|
|
13
|
+
declare const SearchTableTemplate: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type SearchTableTemplate = ReturnType<typeof SearchTableTemplate>;
|
|
15
|
+
export default SearchTableTemplate;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import ContentPageShell from '../content/ContentPageShell.svelte';
|
|
4
|
+
import ContentPageHeader from '../content/ContentPageHeader.svelte';
|
|
5
|
+
import StepForm, { type FormStep } from '../StepForm.svelte';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
actions?: Snippet;
|
|
11
|
+
steps: FormStep[];
|
|
12
|
+
currentStep?: number;
|
|
13
|
+
children: Snippet;
|
|
14
|
+
stepContent?: Snippet<[number]>;
|
|
15
|
+
onstepchange?: (newStep: number, prevStep: number) => boolean | Promise<boolean> | undefined;
|
|
16
|
+
onfinish?: () => void | Promise<void>;
|
|
17
|
+
oncancel?: () => void;
|
|
18
|
+
submitText?: string;
|
|
19
|
+
nextText?: string;
|
|
20
|
+
prevText?: string;
|
|
21
|
+
isSubmitting?: boolean;
|
|
22
|
+
pageId?: string;
|
|
23
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
title,
|
|
28
|
+
description,
|
|
29
|
+
actions,
|
|
30
|
+
steps,
|
|
31
|
+
currentStep = $bindable(0),
|
|
32
|
+
children,
|
|
33
|
+
stepContent,
|
|
34
|
+
onstepchange,
|
|
35
|
+
onfinish,
|
|
36
|
+
oncancel,
|
|
37
|
+
submitText = 'Submit',
|
|
38
|
+
nextText = 'Next step',
|
|
39
|
+
prevText = 'Previous step',
|
|
40
|
+
isSubmitting = false,
|
|
41
|
+
pageId = 'step-form',
|
|
42
|
+
width = 'default',
|
|
43
|
+
}: Props = $props();
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<ContentPageShell {pageId} {width}>
|
|
47
|
+
<ContentPageHeader {title} {...(description ? { description } : {})} {...(actions ? { actions } : {})} />
|
|
48
|
+
<StepForm
|
|
49
|
+
{steps}
|
|
50
|
+
bind:currentStep
|
|
51
|
+
{...(stepContent ? { stepContent } : {})}
|
|
52
|
+
{...(onstepchange ? { onstepchange } : {})}
|
|
53
|
+
{...(onfinish ? { onfinish } : {})}
|
|
54
|
+
{...(oncancel ? { oncancel } : {})}
|
|
55
|
+
{submitText}
|
|
56
|
+
{nextText}
|
|
57
|
+
{prevText}
|
|
58
|
+
{isSubmitting}
|
|
59
|
+
>
|
|
60
|
+
{@render children()}
|
|
61
|
+
</StepForm>
|
|
62
|
+
</ContentPageShell>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import { type FormStep } from '../StepForm.svelte';
|
|
3
|
+
interface Props {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: Snippet;
|
|
7
|
+
steps: FormStep[];
|
|
8
|
+
currentStep?: number;
|
|
9
|
+
children: Snippet;
|
|
10
|
+
stepContent?: Snippet<[number]>;
|
|
11
|
+
onstepchange?: (newStep: number, prevStep: number) => boolean | Promise<boolean> | undefined;
|
|
12
|
+
onfinish?: () => void | Promise<void>;
|
|
13
|
+
oncancel?: () => void;
|
|
14
|
+
submitText?: string;
|
|
15
|
+
nextText?: string;
|
|
16
|
+
prevText?: string;
|
|
17
|
+
isSubmitting?: boolean;
|
|
18
|
+
pageId?: string;
|
|
19
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
20
|
+
}
|
|
21
|
+
declare const StepFormTemplate: import("svelte").Component<Props, {}, "currentStep">;
|
|
22
|
+
type StepFormTemplate = ReturnType<typeof StepFormTemplate>;
|
|
23
|
+
export default StepFormTemplate;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import ContentPageShell from '../content/ContentPageShell.svelte';
|
|
4
|
+
import ContentPageHeader from '../content/ContentPageHeader.svelte';
|
|
5
|
+
import { cn } from '../../utils.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title: string;
|
|
9
|
+
eyebrow?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
actions?: Snippet;
|
|
12
|
+
metrics?: Snippet;
|
|
13
|
+
toolbar?: Snippet;
|
|
14
|
+
primary: Snippet;
|
|
15
|
+
secondary?: Snippet;
|
|
16
|
+
footer?: Snippet;
|
|
17
|
+
pageId?: string;
|
|
18
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
19
|
+
primaryLabel?: string;
|
|
20
|
+
secondaryLabel?: string;
|
|
21
|
+
class?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
title,
|
|
26
|
+
eyebrow,
|
|
27
|
+
description,
|
|
28
|
+
actions,
|
|
29
|
+
metrics,
|
|
30
|
+
toolbar,
|
|
31
|
+
primary,
|
|
32
|
+
secondary,
|
|
33
|
+
footer,
|
|
34
|
+
pageId = 'template',
|
|
35
|
+
width = 'default',
|
|
36
|
+
primaryLabel,
|
|
37
|
+
secondaryLabel,
|
|
38
|
+
class: className = '',
|
|
39
|
+
}: Props = $props();
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<ContentPageShell {pageId} {width} class={cn('svadmin-template-page', className)}>
|
|
43
|
+
<ContentPageHeader {title} {...(eyebrow ? { eyebrow } : {})} {...(description ? { description } : {})} {...(actions ? { actions } : {})} />
|
|
44
|
+
{#if metrics}<section class="svadmin-template-page__metrics" aria-label="Summary">{@render metrics()}</section>{/if}
|
|
45
|
+
{#if toolbar}<div class="svadmin-template-page__toolbar">{@render toolbar()}</div>{/if}
|
|
46
|
+
<div class="svadmin-template-page__body" class:has-secondary={Boolean(secondary)}>
|
|
47
|
+
<div class="svadmin-template-page__primary" aria-label={primaryLabel}>{@render primary()}</div>
|
|
48
|
+
{#if secondary}<aside class="svadmin-template-page__secondary" aria-label={secondaryLabel}>{@render secondary()}</aside>{/if}
|
|
49
|
+
</div>
|
|
50
|
+
{#if footer}<footer class="svadmin-template-page__footer">{@render footer()}</footer>{/if}
|
|
51
|
+
</ContentPageShell>
|
|
52
|
+
|
|
53
|
+
<style>
|
|
54
|
+
.svadmin-template-page__metrics {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
57
|
+
gap: var(--svadmin-space-4);
|
|
58
|
+
}
|
|
59
|
+
.svadmin-template-page__toolbar {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
gap: var(--svadmin-space-3);
|
|
65
|
+
padding-block: var(--svadmin-space-3);
|
|
66
|
+
border-block: 1px solid var(--border);
|
|
67
|
+
}
|
|
68
|
+
.svadmin-template-page__body {
|
|
69
|
+
display: grid;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
gap: var(--svadmin-space-5);
|
|
72
|
+
}
|
|
73
|
+
.svadmin-template-page__body.has-secondary {
|
|
74
|
+
grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
|
|
75
|
+
align-items: start;
|
|
76
|
+
}
|
|
77
|
+
.svadmin-template-page__primary,
|
|
78
|
+
.svadmin-template-page__secondary {
|
|
79
|
+
display: grid;
|
|
80
|
+
min-width: 0;
|
|
81
|
+
gap: var(--svadmin-space-4);
|
|
82
|
+
}
|
|
83
|
+
.svadmin-template-page__secondary {
|
|
84
|
+
padding: var(--svadmin-space-4);
|
|
85
|
+
border: 1px solid var(--border);
|
|
86
|
+
border-radius: var(--radius-lg);
|
|
87
|
+
background: var(--card);
|
|
88
|
+
}
|
|
89
|
+
.svadmin-template-page__footer {
|
|
90
|
+
position: sticky;
|
|
91
|
+
inset-block-end: 0;
|
|
92
|
+
z-index: 5;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-wrap: wrap;
|
|
95
|
+
justify-content: flex-end;
|
|
96
|
+
gap: var(--svadmin-space-2);
|
|
97
|
+
padding-block: var(--svadmin-space-3);
|
|
98
|
+
border-block-start: 1px solid var(--border);
|
|
99
|
+
background: color-mix(in srgb, var(--card) 96%, var(--background));
|
|
100
|
+
}
|
|
101
|
+
@media (max-width: 48rem) {
|
|
102
|
+
.svadmin-template-page__body.has-secondary {
|
|
103
|
+
grid-template-columns: minmax(0, 1fr);
|
|
104
|
+
}
|
|
105
|
+
.svadmin-template-page__secondary {
|
|
106
|
+
order: 2;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: Snippet;
|
|
7
|
+
metrics?: Snippet;
|
|
8
|
+
toolbar?: Snippet;
|
|
9
|
+
primary: Snippet;
|
|
10
|
+
secondary?: Snippet;
|
|
11
|
+
footer?: Snippet;
|
|
12
|
+
pageId?: string;
|
|
13
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
14
|
+
primaryLabel?: string;
|
|
15
|
+
secondaryLabel?: string;
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const TemplatePageShell: import("svelte").Component<Props, {}, "">;
|
|
19
|
+
type TemplatePageShell = ReturnType<typeof TemplatePageShell>;
|
|
20
|
+
export default TemplatePageShell;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import TemplatePageShell from './TemplatePageShell.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title: string;
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
actions?: Snippet;
|
|
10
|
+
metrics?: Snippet;
|
|
11
|
+
primary: Snippet;
|
|
12
|
+
secondary?: Snippet;
|
|
13
|
+
footer?: Snippet;
|
|
14
|
+
pageId?: string;
|
|
15
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let { title, eyebrow, description, actions, metrics, primary, secondary, footer, pageId = 'workplace', width = 'default' }: Props = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<TemplatePageShell
|
|
22
|
+
{title}
|
|
23
|
+
{...(eyebrow ? { eyebrow } : {})}
|
|
24
|
+
{...(description ? { description } : {})}
|
|
25
|
+
{...(actions ? { actions } : {})}
|
|
26
|
+
{...(metrics ? { metrics } : {})}
|
|
27
|
+
{primary}
|
|
28
|
+
{...(secondary ? { secondary } : {})}
|
|
29
|
+
{...(footer ? { footer } : {})}
|
|
30
|
+
{pageId}
|
|
31
|
+
{width}
|
|
32
|
+
primaryLabel="Work area"
|
|
33
|
+
secondaryLabel="Context"
|
|
34
|
+
/>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: Snippet;
|
|
7
|
+
metrics?: Snippet;
|
|
8
|
+
primary: Snippet;
|
|
9
|
+
secondary?: Snippet;
|
|
10
|
+
footer?: Snippet;
|
|
11
|
+
pageId?: string;
|
|
12
|
+
width?: 'narrow' | 'default' | 'wide';
|
|
13
|
+
}
|
|
14
|
+
declare const WorkplaceTemplate: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type WorkplaceTemplate = ReturnType<typeof WorkplaceTemplate>;
|
|
16
|
+
export default WorkplaceTemplate;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as TemplatePageShell } from './TemplatePageShell.svelte';
|
|
2
|
+
export { default as WorkplaceTemplate } from './WorkplaceTemplate.svelte';
|
|
3
|
+
export { default as MonitorTemplate } from './MonitorTemplate.svelte';
|
|
4
|
+
export { default as AnalysisTemplate } from './AnalysisTemplate.svelte';
|
|
5
|
+
export { default as SearchTableTemplate } from './SearchTableTemplate.svelte';
|
|
6
|
+
export { default as CardListTemplate } from './CardListTemplate.svelte';
|
|
7
|
+
export { default as GroupFormTemplate } from './GroupFormTemplate.svelte';
|
|
8
|
+
export { default as AdvancedFormTemplate } from './AdvancedFormTemplate.svelte';
|
|
9
|
+
export { default as StepFormTemplate } from './StepFormTemplate.svelte';
|
|
10
|
+
export { default as BasicDetailTemplate } from './BasicDetailTemplate.svelte';
|
|
11
|
+
export { default as AdvancedDetailTemplate } from './AdvancedDetailTemplate.svelte';
|
|
12
|
+
export { default as ResultTemplate } from './ResultTemplate.svelte';
|
|
13
|
+
export { default as ExceptionTemplate } from './ExceptionTemplate.svelte';
|
|
14
|
+
export { default as ProfileTemplate } from './ProfileTemplate.svelte';
|
|
15
|
+
export { default as BasicProfileTemplate } from './ProfileTemplate.svelte';
|
|
16
|
+
export { default as AdvancedProfileTemplate } from './ProfileTemplate.svelte';
|