@svadmin/lite 0.16.11 → 0.22.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 +71 -2
- package/dist/components/LiteActivityFeed.svelte +31 -9
- package/dist/components/LiteActivityFeed.svelte.d.ts +6 -0
- package/dist/components/LiteAffix.svelte +29 -0
- package/dist/components/LiteAffix.svelte.d.ts +13 -0
- package/dist/components/LiteAnchor.svelte +38 -0
- package/dist/components/LiteAnchor.svelte.d.ts +14 -0
- package/dist/components/LiteApprovalActionCard.svelte +8 -5
- package/dist/components/LiteApprovalActionCard.svelte.d.ts +2 -0
- package/dist/components/LiteAuditLog.svelte +9 -9
- package/dist/components/LiteAutoComplete.svelte +41 -0
- package/dist/components/LiteAutoComplete.svelte.d.ts +13 -0
- package/dist/components/LiteBackTop.svelte +16 -0
- package/dist/components/LiteBackTop.svelte.d.ts +8 -0
- package/dist/components/LiteBreadcrumbs.svelte +4 -1
- package/dist/components/LiteBreadcrumbs.svelte.d.ts +2 -0
- package/dist/components/LiteCalendar.svelte +124 -0
- package/dist/components/LiteCalendar.svelte.d.ts +20 -0
- package/dist/components/LiteCanvasAnnotation.svelte +13 -13
- package/dist/components/LiteCarousel.svelte +72 -0
- package/dist/components/LiteCarousel.svelte.d.ts +14 -0
- package/dist/components/LiteChatDialog.svelte +8 -8
- package/dist/components/LiteCollapse.svelte +49 -0
- package/dist/components/LiteCollapse.svelte.d.ts +15 -0
- package/dist/components/LiteColumnHeaderFilter.svelte +4 -1
- package/dist/components/LiteColumnHeaderFilter.svelte.d.ts +2 -0
- package/dist/components/LiteColumnSettings.svelte +7 -4
- package/dist/components/LiteColumnSettings.svelte.d.ts +2 -0
- package/dist/components/LiteCommentThread.svelte +113 -0
- package/dist/components/LiteCommentThread.svelte.d.ts +26 -0
- package/dist/components/LiteConfirmDialog.svelte +2 -2
- package/dist/components/LiteCountdown.svelte +49 -0
- package/dist/components/LiteCountdown.svelte.d.ts +10 -0
- package/dist/components/LiteDecisionTable.svelte +14 -14
- package/dist/components/LiteDetailDrawer.svelte +45 -0
- package/dist/components/LiteDetailDrawer.svelte.d.ts +14 -0
- package/dist/components/LiteDraggableRowTable.svelte +5 -2
- package/dist/components/LiteDraggableRowTable.svelte.d.ts +2 -0
- package/dist/components/LiteDrawerForm.svelte +11 -8
- package/dist/components/LiteDrawerForm.svelte.d.ts +2 -0
- package/dist/components/LiteDynamicFormList.svelte +5 -5
- package/dist/components/LiteEditableTable.svelte +5 -2
- package/dist/components/LiteEditableTable.svelte.d.ts +2 -0
- package/dist/components/LiteEmptyState.svelte +11 -4
- package/dist/components/LiteEmptyState.svelte.d.ts +3 -0
- package/dist/components/LiteFilterBuilder.svelte +8 -5
- package/dist/components/LiteFilterBuilder.svelte.d.ts +2 -0
- package/dist/components/LiteFloatButton.svelte +54 -0
- package/dist/components/LiteFloatButton.svelte.d.ts +15 -0
- package/dist/components/LiteGanttChart.svelte +20 -20
- package/dist/components/LiteGrid.svelte +34 -0
- package/dist/components/LiteGrid.svelte.d.ts +11 -0
- package/dist/components/LiteImage.svelte +54 -0
- package/dist/components/LiteImage.svelte.d.ts +14 -0
- package/dist/components/LiteImageCropper.svelte +7 -4
- package/dist/components/LiteImageCropper.svelte.d.ts +2 -0
- package/dist/components/LiteImagePreview.svelte +36 -0
- package/dist/components/LiteImagePreview.svelte.d.ts +13 -0
- package/dist/components/LiteImportWizard.svelte +7 -7
- package/dist/components/LiteItemList.svelte +50 -0
- package/dist/components/LiteItemList.svelte.d.ts +15 -0
- package/dist/components/LiteJsonSchemaForm.svelte +10 -7
- package/dist/components/LiteJsonSchemaForm.svelte.d.ts +2 -0
- package/dist/components/LiteKanbanBoard.svelte +19 -19
- package/dist/components/LiteLayout.svelte +18 -6
- package/dist/components/LiteLayout.svelte.d.ts +8 -0
- package/dist/components/LiteLink.svelte +32 -0
- package/dist/components/LiteLink.svelte.d.ts +11 -0
- package/dist/components/LiteLogin.svelte +9 -2
- package/dist/components/LiteLogin.svelte.d.ts +2 -0
- package/dist/components/LiteMasterDetailView.svelte +13 -10
- package/dist/components/LiteMasterDetailView.svelte.d.ts +2 -0
- package/dist/components/LiteMediaLibraryModal.svelte +8 -5
- package/dist/components/LiteMediaLibraryModal.svelte.d.ts +2 -0
- package/dist/components/LiteMediaThumbnail.svelte +3 -3
- package/dist/components/LiteMentionsInput.svelte +9 -9
- package/dist/components/LiteMenu.svelte +22 -0
- package/dist/components/LiteMenu.svelte.d.ts +12 -0
- package/dist/components/LiteMenuList.svelte +55 -0
- package/dist/components/LiteMenuList.svelte.d.ts +17 -0
- package/dist/components/LiteModalForm.svelte +9 -6
- package/dist/components/LiteModalForm.svelte.d.ts +2 -0
- package/dist/components/LiteMultiTabKeepAlive.svelte +6 -6
- package/dist/components/LiteNotificationCenter.svelte +85 -0
- package/dist/components/LiteNotificationCenter.svelte.d.ts +22 -0
- package/dist/components/LiteOfflineSyncBanner.svelte +6 -6
- package/dist/components/LiteOtpInput.svelte +50 -0
- package/dist/components/LiteOtpInput.svelte.d.ts +15 -0
- package/dist/components/LitePageHeader.svelte +34 -0
- package/dist/components/LitePageHeader.svelte.d.ts +13 -0
- package/dist/components/LitePagination.svelte +10 -2
- package/dist/components/LitePagination.svelte.d.ts +2 -0
- package/dist/components/LitePdfDocumentViewer.svelte +14 -14
- package/dist/components/LitePermissionMatrix.svelte +8 -8
- package/dist/components/LitePivotTable.svelte +11 -11
- package/dist/components/LitePopconfirm.svelte +49 -0
- package/dist/components/LitePopconfirm.svelte.d.ts +14 -0
- package/dist/components/LitePresenceAvatarGroup.svelte +8 -5
- package/dist/components/LitePresenceAvatarGroup.svelte.d.ts +2 -0
- package/dist/components/LitePrintableBill.svelte +12 -9
- package/dist/components/LitePrintableBill.svelte.d.ts +2 -0
- package/dist/components/LiteProgress.svelte +46 -0
- package/dist/components/LiteProgress.svelte.d.ts +12 -0
- package/dist/components/LiteQRCode.svelte +62 -0
- package/dist/components/LiteQRCode.svelte.d.ts +14 -0
- package/dist/components/LiteResizeBox.svelte +34 -0
- package/dist/components/LiteResizeBox.svelte.d.ts +12 -0
- package/dist/components/LiteResult.svelte +52 -0
- package/dist/components/LiteResult.svelte.d.ts +14 -0
- package/dist/components/LiteRowActions.svelte +36 -0
- package/dist/components/LiteRowActions.svelte.d.ts +17 -0
- package/dist/components/LiteSensitiveDataMask.svelte +4 -1
- package/dist/components/LiteSensitiveDataMask.svelte.d.ts +2 -0
- package/dist/components/LiteShow.svelte +1 -1
- package/dist/components/LiteShowField.svelte +2 -2
- package/dist/components/LiteSignaturePad.svelte +9 -9
- package/dist/components/LiteSkeleton.svelte +100 -0
- package/dist/components/LiteSkeleton.svelte.d.ts +19 -0
- package/dist/components/LiteSpace.svelte +31 -0
- package/dist/components/LiteSpace.svelte.d.ts +12 -0
- package/dist/components/LiteSpin.svelte +27 -0
- package/dist/components/LiteSpin.svelte.d.ts +10 -0
- package/dist/components/LiteSplitPaneLayout.svelte +18 -6
- package/dist/components/LiteSplitPaneLayout.svelte.d.ts +8 -0
- package/dist/components/LiteSpreadsheetView.svelte +8 -8
- package/dist/components/LiteStatistic.svelte +63 -0
- package/dist/components/LiteStatistic.svelte.d.ts +15 -0
- package/dist/components/LiteStatsCard.svelte +5 -2
- package/dist/components/LiteStatsCard.svelte.d.ts +2 -0
- package/dist/components/LiteStatusBadge.svelte +33 -0
- package/dist/components/LiteStatusBadge.svelte.d.ts +12 -0
- package/dist/components/LiteStatusTabs.svelte +35 -0
- package/dist/components/LiteStatusTabs.svelte.d.ts +14 -0
- package/dist/components/LiteStepForm.svelte +14 -11
- package/dist/components/LiteStepForm.svelte.d.ts +2 -0
- package/dist/components/LiteSteps.svelte +64 -0
- package/dist/components/LiteSteps.svelte.d.ts +18 -0
- package/dist/components/LiteTable.svelte +5 -2
- package/dist/components/LiteTable.svelte.d.ts +2 -0
- package/dist/components/LiteTableSummary.svelte +8 -5
- package/dist/components/LiteTableSummary.svelte.d.ts +2 -0
- package/dist/components/LiteTabs.svelte +30 -20
- package/dist/components/LiteTabs.svelte.d.ts +11 -2
- package/dist/components/LiteTag.svelte +31 -0
- package/dist/components/LiteTag.svelte.d.ts +13 -0
- package/dist/components/LiteTimeline.svelte +48 -0
- package/dist/components/LiteTimeline.svelte.d.ts +17 -0
- package/dist/components/LiteTour.svelte +54 -0
- package/dist/components/LiteTour.svelte.d.ts +15 -0
- package/dist/components/LiteTransfer.svelte +9 -6
- package/dist/components/LiteTransfer.svelte.d.ts +2 -0
- package/dist/components/LiteTree.svelte +48 -0
- package/dist/components/LiteTree.svelte.d.ts +17 -0
- package/dist/components/LiteTreeTable.svelte +1 -1
- package/dist/components/LiteTwoFactorStepper.svelte +53 -0
- package/dist/components/LiteTwoFactorStepper.svelte.d.ts +16 -0
- package/dist/components/LiteVersionDiffViewer.svelte +16 -13
- package/dist/components/LiteVersionDiffViewer.svelte.d.ts +2 -0
- package/dist/components/LiteVideoPlayer.svelte +67 -0
- package/dist/components/LiteVideoPlayer.svelte.d.ts +22 -0
- package/dist/components/LiteVirtualTable.svelte +1 -1
- package/dist/components/advanced/LiteAutoSaveIndicator.svelte +42 -13
- package/dist/components/advanced/LiteAutoSaveIndicator.svelte.d.ts +10 -4
- package/dist/components/advanced/LiteDraggableHeader.svelte +2 -2
- package/dist/components/advanced/LiteDrawerForm.svelte +4 -1
- package/dist/components/advanced/LiteDrawerForm.svelte.d.ts +2 -0
- package/dist/components/advanced/LiteInlineEdit.svelte +1 -1
- package/dist/components/advanced/LiteModalForm.svelte +4 -1
- package/dist/components/advanced/LiteModalForm.svelte.d.ts +2 -0
- package/dist/components/advanced/LiteToast.svelte +3 -3
- package/dist/components/advanced/LiteUndoableNotification.svelte +1 -1
- package/dist/components/compatibility/LiteRealtimeStatus.svelte +41 -2
- package/dist/components/compatibility/LiteRealtimeStatus.svelte.d.ts +15 -0
- package/dist/components/fields/LiteBooleanField.svelte +4 -2
- package/dist/components/fields/LiteBooleanField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteCascader.svelte +5 -2
- package/dist/components/fields/LiteCascader.svelte.d.ts +2 -0
- package/dist/components/fields/LiteDateField.svelte +39 -9
- package/dist/components/fields/LiteDateField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteDateRangeField.svelte +1 -1
- package/dist/components/fields/LiteImageField.svelte +6 -2
- package/dist/components/fields/LiteImageField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteJsonField.svelte +1 -1
- package/dist/components/fields/LiteMarkdownField.svelte +49 -3
- package/dist/components/fields/LiteMarkdownField.svelte.d.ts +5 -0
- package/dist/components/fields/LiteNumberField.svelte +5 -3
- package/dist/components/fields/LiteNumberField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteRichTextField.svelte +49 -12
- package/dist/components/fields/LiteRichTextField.svelte.d.ts +3 -0
- package/dist/components/fields/LiteSelectField.svelte +5 -3
- package/dist/components/fields/LiteSelectField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteTagField.svelte +38 -15
- package/dist/components/fields/LiteTagField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteTextField.svelte +26 -5
- package/dist/components/fields/LiteTextField.svelte.d.ts +2 -0
- package/dist/components/fields/LiteTreeSelect.svelte +5 -2
- package/dist/components/fields/LiteTreeSelect.svelte.d.ts +2 -0
- package/dist/components/fields/LiteUrlField.svelte +5 -3
- package/dist/components/fields/LiteUrlField.svelte.d.ts +2 -0
- package/dist/components/layout/LiteAuthenticated.svelte +2 -2
- package/dist/components/layout/LiteCanAccess.svelte +1 -1
- package/dist/components/layout/LiteErrorComponent.svelte +4 -4
- package/dist/components/layout/LiteHeader.svelte +2 -2
- package/dist/components/layout/LiteSidebar.svelte +6 -3
- package/dist/components/layout/LiteSidebar.svelte.d.ts +2 -0
- package/dist/components/pages/LiteCreatePage.svelte +4 -1
- package/dist/components/pages/LiteCreatePage.svelte.d.ts +2 -0
- package/dist/components/pages/LiteEditPage.svelte +4 -1
- package/dist/components/pages/LiteEditPage.svelte.d.ts +2 -0
- package/dist/components/pages/LiteForgotPasswordPage.svelte +7 -7
- package/dist/components/pages/LiteListPage.svelte +6 -3
- package/dist/components/pages/LiteListPage.svelte.d.ts +2 -0
- package/dist/components/pages/LiteProfilePage.svelte +2 -2
- package/dist/components/pages/LiteRegisterPage.svelte +6 -6
- package/dist/components/pages/LiteShowPage.svelte +6 -3
- package/dist/components/pages/LiteShowPage.svelte.d.ts +2 -0
- package/dist/components/pages/LiteUpdatePasswordPage.svelte +4 -4
- package/dist/components/widgets/LiteAnomalyBadge.svelte +6 -3
- package/dist/components/widgets/LiteAnomalyBadge.svelte.d.ts +2 -0
- package/dist/components/widgets/LiteAreaChart.svelte +20 -0
- package/dist/components/widgets/LiteAreaChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteBarChart.svelte +6 -6
- package/dist/components/widgets/LiteChartSvg.svelte +102 -0
- package/dist/components/widgets/LiteChartSvg.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteChartTable.svelte +44 -0
- package/dist/components/widgets/LiteChartTable.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteDonutChart.svelte +20 -0
- package/dist/components/widgets/LiteDonutChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteFunnelChart.svelte +20 -0
- package/dist/components/widgets/LiteFunnelChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteGaugeChart.svelte +20 -0
- package/dist/components/widgets/LiteGaugeChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteHeatmapChart.svelte +20 -0
- package/dist/components/widgets/LiteHeatmapChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteInsightCard.svelte +35 -13
- package/dist/components/widgets/LiteInsightCard.svelte.d.ts +7 -4
- package/dist/components/widgets/LiteLineChart.svelte +13 -10
- package/dist/components/widgets/LiteLineChart.svelte.d.ts +0 -5
- package/dist/components/widgets/LitePieChart.svelte +11 -9
- package/dist/components/widgets/LitePieChart.svelte.d.ts +0 -5
- package/dist/components/widgets/LiteRadarChart.svelte +20 -0
- package/dist/components/widgets/LiteRadarChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteRoseChart.svelte +20 -0
- package/dist/components/widgets/LiteRoseChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteScatterChart.svelte +20 -0
- package/dist/components/widgets/LiteScatterChart.svelte.d.ts +10 -0
- package/dist/components/widgets/LiteWaterfallChart.svelte +20 -0
- package/dist/components/widgets/LiteWaterfallChart.svelte.d.ts +10 -0
- package/dist/components/widgets/chart-geometry.d.ts +65 -0
- package/dist/components/widgets/chart-geometry.js +229 -0
- package/dist/components/widgets/index.d.ts +10 -0
- package/dist/components/widgets/index.js +10 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +47 -0
- package/dist/lite-code-theme.css +139 -0
- package/dist/lite.css +234 -127
- package/dist/rich-content.d.ts +47 -0
- package/dist/rich-content.js +498 -0
- package/dist/schema-generator.js +3 -1
- package/dist/server-adapter.js +6 -11
- package/dist/value-normalization.d.ts +4 -0
- package/dist/value-normalization.js +13 -0
- package/package.json +18 -4
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
value?: unknown;
|
|
7
7
|
error?: string[];
|
|
8
8
|
mode?: 'show' | 'edit' | 'create';
|
|
9
|
+
/** Caller class merged with the built-in class list. */
|
|
10
|
+
class?: string;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
let { field, value, error = [], mode = 'show' }: Props = $props();
|
|
13
|
+
let { field, value, error = [], mode = 'show', class: className = '' }: Props = $props();
|
|
12
14
|
let hasError = $derived(error.length > 0);
|
|
13
15
|
const tags = $derived(Array.isArray(value) ? value.map(String) : []);
|
|
14
16
|
</script>
|
|
15
17
|
|
|
16
18
|
{#if mode === 'show'}
|
|
17
|
-
<div class="lite-inline-xs lite-flex-wrap">
|
|
19
|
+
<div class="lite-inline-xs lite-flex-wrap {className}">
|
|
18
20
|
{#each tags as tag, _i (_i)}
|
|
19
21
|
<span class="lite-badge">{tag}</span>
|
|
20
22
|
{:else}
|
|
@@ -22,19 +24,33 @@
|
|
|
22
24
|
{/each}
|
|
23
25
|
</div>
|
|
24
26
|
{:else}
|
|
25
|
-
<div>
|
|
26
|
-
<!--
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
<div class="lite-tags-input {className}">
|
|
28
|
+
<!-- SSR 无脚本:每个标签一个同名字段,服务端按 getAll 解析为数组。 -->
|
|
29
|
+
{#each tags as tag, index (index)}
|
|
30
|
+
<label class="lite-tags-input__row">
|
|
31
|
+
<span class="lite-visually-hidden">{field.label ?? 'Tag'} {index + 1}</span>
|
|
32
|
+
<input
|
|
33
|
+
type="text"
|
|
34
|
+
name={field.key}
|
|
35
|
+
value={tag}
|
|
36
|
+
class="lite-input{hasError ? ' lite-input-error' : ''}"
|
|
37
|
+
aria-label={`${field.label ?? 'Tag'} ${index + 1}`}
|
|
38
|
+
placeholder="Remove this tag by clearing the field"
|
|
39
|
+
/>
|
|
40
|
+
</label>
|
|
41
|
+
{/each}
|
|
42
|
+
<label class="lite-tags-input__row">
|
|
43
|
+
<span class="lite-visually-hidden">{field.label ?? 'Tag'} (new)</span>
|
|
44
|
+
<input
|
|
45
|
+
type="text"
|
|
46
|
+
name={field.key}
|
|
47
|
+
value=""
|
|
48
|
+
class="lite-input{hasError ? ' lite-input-error' : ''}"
|
|
49
|
+
aria-label={`${field.label ?? 'Tag'} (new)`}
|
|
50
|
+
placeholder="Add a tag"
|
|
51
|
+
/>
|
|
52
|
+
</label>
|
|
53
|
+
<span class="lite-tags-input__hint">One tag per field. Leave a field blank to drop it.</span>
|
|
38
54
|
{#if hasError}
|
|
39
55
|
{#each error as err, _i (_i)}
|
|
40
56
|
<div class="lite-error-text">{err}</div>
|
|
@@ -42,3 +58,10 @@
|
|
|
42
58
|
{/if}
|
|
43
59
|
</div>
|
|
44
60
|
{/if}
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
.lite-tags-input { display: block; }
|
|
64
|
+
.lite-tags-input__row { display: block; margin-bottom: 6px; }
|
|
65
|
+
.lite-tags-input__hint { display: block; margin-top: 4px; color: #6B7280; font-size: 11px; }
|
|
66
|
+
.lite-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
67
|
+
</style>
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
value?: unknown;
|
|
5
5
|
error?: string[];
|
|
6
6
|
mode?: 'show' | 'edit' | 'create';
|
|
7
|
+
/** Caller class merged with the built-in class list. */
|
|
8
|
+
class?: string;
|
|
7
9
|
}
|
|
8
10
|
declare const LiteTagField: import("svelte").Component<Props, {}, "">;
|
|
9
11
|
type LiteTagField = ReturnType<typeof LiteTagField>;
|
|
@@ -6,21 +6,42 @@
|
|
|
6
6
|
value?: unknown;
|
|
7
7
|
error?: string[];
|
|
8
8
|
mode?: 'show' | 'edit' | 'create';
|
|
9
|
+
/** Caller class merged with the built-in class list. */
|
|
10
|
+
class?: string;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
let { field, value, error = [], mode = 'show' }: Props = $props();
|
|
13
|
+
let { field, value, error = [], mode = 'show', class: className = '' }: Props = $props();
|
|
12
14
|
let hasError = $derived(error.length > 0);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Native input type per value domain. Time, datetime, color, email, url and
|
|
18
|
+
* phone fields must not degrade to a free-text box.
|
|
19
|
+
*/
|
|
20
|
+
const nativeType: Record<string, string> = {
|
|
21
|
+
time: 'time',
|
|
22
|
+
datetime: 'datetime-local',
|
|
23
|
+
color: 'color',
|
|
24
|
+
email: 'email',
|
|
25
|
+
url: 'url',
|
|
26
|
+
phone: 'tel',
|
|
27
|
+
};
|
|
28
|
+
const hexColour = $derived(typeof value === 'string' && /^#[0-9a-f]{6}$/iu.test(value) ? value : '#000000');
|
|
29
|
+
const colorNeedsTextFallback = $derived(field.type === 'color' && value != null && String(value) !== '' && !/^#[0-9a-f]{6}$/iu.test(String(value)));
|
|
30
|
+
const inputType = $derived(
|
|
31
|
+
field.type === 'color' && colorNeedsTextFallback ? 'text' : nativeType[field.type] ?? 'text',
|
|
32
|
+
);
|
|
33
|
+
const inputValue = $derived(inputType === 'color' ? hexColour : String(value ?? ''));
|
|
13
34
|
</script>
|
|
14
35
|
|
|
15
36
|
{#if mode === 'show'}
|
|
16
|
-
<span>{value == null ? '—' : String(value)}</span>
|
|
37
|
+
<span class="lite-field-value {className}">{value == null ? '—' : String(value)}</span>
|
|
17
38
|
{:else}
|
|
18
|
-
<div>
|
|
39
|
+
<div class="lite-field-edit {className}">
|
|
19
40
|
<input
|
|
20
|
-
type=
|
|
41
|
+
type={inputType}
|
|
21
42
|
name={field.key}
|
|
22
43
|
id={field.key}
|
|
23
|
-
value={
|
|
44
|
+
value={inputValue}
|
|
24
45
|
class="lite-input {hasError ? 'lite-input-error' : ''}"
|
|
25
46
|
placeholder={field.label}
|
|
26
47
|
{...field.required ? { required: true } : {}}
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
value?: unknown;
|
|
5
5
|
error?: string[];
|
|
6
6
|
mode?: 'show' | 'edit' | 'create';
|
|
7
|
+
/** Caller class merged with the built-in class list. */
|
|
8
|
+
class?: string;
|
|
7
9
|
}
|
|
8
10
|
declare const LiteTextField: import("svelte").Component<Props, {}, "">;
|
|
9
11
|
type LiteTextField = ReturnType<typeof LiteTextField>;
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
required?: boolean;
|
|
24
24
|
error?: string[];
|
|
25
25
|
mode?: 'show' | 'edit' | 'create';
|
|
26
|
+
/** Caller class merged with the built-in class list. */
|
|
27
|
+
class?: string;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
let {
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
required = field?.required ?? false,
|
|
38
40
|
error = [],
|
|
39
41
|
mode = 'show',
|
|
42
|
+
class: className = ''
|
|
40
43
|
}: Props = $props();
|
|
41
44
|
|
|
42
45
|
const hasError = $derived(error.length > 0);
|
|
@@ -87,9 +90,9 @@
|
|
|
87
90
|
</script>
|
|
88
91
|
|
|
89
92
|
{#if mode === 'show'}
|
|
90
|
-
<span class="lite-badge">{formatDisplay(value)}</span>
|
|
93
|
+
<span class="lite-badge {className}">{formatDisplay(value)}</span>
|
|
91
94
|
{:else}
|
|
92
|
-
<div class="lite-form-group">
|
|
95
|
+
<div class="lite-form-group {className}">
|
|
93
96
|
{#if label}
|
|
94
97
|
<label class="lite-label" for={name}>
|
|
95
98
|
{label}
|
|
@@ -17,6 +17,8 @@ interface Props {
|
|
|
17
17
|
required?: boolean;
|
|
18
18
|
error?: string[];
|
|
19
19
|
mode?: 'show' | 'edit' | 'create';
|
|
20
|
+
/** Caller class merged with the built-in class list. */
|
|
21
|
+
class?: string;
|
|
20
22
|
}
|
|
21
23
|
declare const LiteTreeSelect: import("svelte").Component<Props, {}, "">;
|
|
22
24
|
type LiteTreeSelect = ReturnType<typeof LiteTreeSelect>;
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
value?: unknown;
|
|
8
8
|
error?: string[];
|
|
9
9
|
mode?: 'show' | 'edit' | 'create';
|
|
10
|
+
/** Caller class merged with the built-in class list. */
|
|
11
|
+
class?: string;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
let { field, value, error = [], mode = 'show' }: Props = $props();
|
|
14
|
+
let { field, value, error = [], mode = 'show', class: className = '' }: Props = $props();
|
|
13
15
|
let hasError = $derived(error.length > 0);
|
|
14
16
|
let displayValue = $derived(toSafeText(value));
|
|
15
17
|
let safeHref = $derived(toSafeHref(value));
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
</script>
|
|
18
20
|
|
|
19
21
|
{#if mode === 'show'}
|
|
20
|
-
<span>
|
|
22
|
+
<span class="lite-field-value {className}">
|
|
21
23
|
{#if displayValue}
|
|
22
24
|
{#if safeHref}
|
|
23
25
|
<a href={safeHref} target="_blank" rel="noopener noreferrer">{displayValue}</a>
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
{/if}
|
|
30
32
|
</span>
|
|
31
33
|
{:else}
|
|
32
|
-
<div>
|
|
34
|
+
<div class="lite-field-edit {className}">
|
|
33
35
|
<input
|
|
34
36
|
type="url"
|
|
35
37
|
name={field.key}
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
value?: unknown;
|
|
5
5
|
error?: string[];
|
|
6
6
|
mode?: 'show' | 'edit' | 'create';
|
|
7
|
+
/** Caller class merged with the built-in class list. */
|
|
8
|
+
class?: string;
|
|
7
9
|
}
|
|
8
10
|
declare const LiteUrlField: import("svelte").Component<Props, {}, "">;
|
|
9
11
|
type LiteUrlField = ReturnType<typeof LiteUrlField>;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
{@render children()}
|
|
17
17
|
{/if}
|
|
18
18
|
{:else}
|
|
19
|
-
<div style="padding: 40px; text-align: center; color: #
|
|
19
|
+
<div style="padding: 40px; text-align: center; color: #4E5969;">
|
|
20
20
|
<h2>Authentication Required</h2>
|
|
21
|
-
<p>Please <a href={loginUrl} style="color: #
|
|
21
|
+
<p>Please <a href={loginUrl} style="color: #165DFF;">login here</a> to access this page.</p>
|
|
22
22
|
</div>
|
|
23
23
|
{/if}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{#if fallback}
|
|
20
20
|
{@render fallback()}
|
|
21
21
|
{:else}
|
|
22
|
-
<div style="padding: 24px; background: #
|
|
22
|
+
<div style="padding: 24px; background: #FFECE8; color: #be123c; border-radius: 6px; border: 1px solid #fecdd3;">
|
|
23
23
|
<h3>Access Denied</h3>
|
|
24
24
|
<p>You do not have permission to view this content.</p>
|
|
25
25
|
</div>
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
|
|
20
20
|
<div style="min-height: 50vh; display: flex; align-items: center; justify-content: center; padding: 20px;">
|
|
21
21
|
<div class="lite-card" style="max-width: 480px; width: 100%; text-align: center; padding: 40px;">
|
|
22
|
-
<AlertTriangle style="width: 48px; height: 48px; color: #
|
|
22
|
+
<AlertTriangle style="width: 48px; height: 48px; color: #F53F3F; margin: 0 auto 16px;" />
|
|
23
23
|
|
|
24
|
-
<h1 style="font-size: 24px; font-weight: 600; color: #
|
|
24
|
+
<h1 style="font-size: 24px; font-weight: 600; color: #1D2129; margin: 0 0 8px;">
|
|
25
25
|
{#if code}
|
|
26
|
-
<span style="color: #
|
|
26
|
+
<span style="color: #F53F3F; margin-right: 8px;">{code}</span>
|
|
27
27
|
{/if}
|
|
28
28
|
{title}
|
|
29
29
|
</h1>
|
|
30
30
|
|
|
31
|
-
<p style="color: #
|
|
31
|
+
<p style="color: #4E5969; font-size: 15px; margin: 0 0 24px; line-height: 1.5;">{message}</p>
|
|
32
32
|
|
|
33
33
|
<a href={homeUrl} class="lite-btn lite-btn-primary" style="display: inline-block;">
|
|
34
34
|
{t('common.returnHome') || 'Return to Home'}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
let { title = '', children }: Props = $props();
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
-
<header class="lite-header" style="padding: 16px 24px; background: white; border-bottom: 1px solid #
|
|
13
|
-
<h2 style="margin: 0; font-size: 18px; font-weight: 600; color: #
|
|
12
|
+
<header class="lite-header" style="padding: 16px 24px; background: white; border-bottom: 1px solid #E5E6EB; display: flex; justify-content: space-between; align-items: center;">
|
|
13
|
+
<h2 style="margin: 0; font-size: 18px; font-weight: 600; color: #1D2129;">{title}</h2>
|
|
14
14
|
<div class="lite-inline-lg" style="align-items: center;">
|
|
15
15
|
{#if children}
|
|
16
16
|
{@render children()}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
basePath?: string;
|
|
12
12
|
menu?: MenuItem[];
|
|
13
13
|
canAccess?: (resource: string, action: string) => boolean;
|
|
14
|
+
/** Caller class merged with the built-in class list. */
|
|
15
|
+
class?: string;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
let {
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
basePath = '/lite',
|
|
22
24
|
menu,
|
|
23
25
|
canAccess,
|
|
26
|
+
class: className = ''
|
|
24
27
|
}: Props = $props();
|
|
25
28
|
|
|
26
29
|
const menuResources = $derived(filterVisibleResources(resources, canAccess));
|
|
@@ -29,7 +32,7 @@
|
|
|
29
32
|
const visibleMenu = $derived(menu ? filterVisibleMenu(menu, canAccess) : []);
|
|
30
33
|
</script>
|
|
31
34
|
|
|
32
|
-
<nav class=
|
|
35
|
+
<nav class={`lite-sidebar ${className}`.trim()}>
|
|
33
36
|
<div class="lite-sidebar-brand">{brandName}</div>
|
|
34
37
|
{#if hasCustomMenu}
|
|
35
38
|
<LiteMenuList items={visibleMenu} {basePath} {currentResource} />
|
|
@@ -44,10 +47,10 @@
|
|
|
44
47
|
{/each}
|
|
45
48
|
{/if}
|
|
46
49
|
{#if userName}
|
|
47
|
-
<div style="position:absolute;bottom:0;left:0;right:0;padding:12px 16px;border-top:1px solid #
|
|
50
|
+
<div style="position:absolute;bottom:0;left:0;right:0;padding:12px 16px;border-top:1px solid #1D2129;font-size:12px;color:#86909C;">
|
|
48
51
|
{userName}
|
|
49
52
|
<form method="POST" action={`${basePath}/login?/logout`} style="display:inline;margin-left:8px;">
|
|
50
|
-
<button type="submit" class="lite-btn lite-btn-sm" style="color:#
|
|
53
|
+
<button type="submit" class="lite-btn lite-btn-sm" style="color:#86909C;border-color:#4E5969;background:transparent;padding:2px 8px;">Logout</button>
|
|
51
54
|
</form>
|
|
52
55
|
</div>
|
|
53
56
|
{/if}
|
|
@@ -7,6 +7,8 @@ interface Props {
|
|
|
7
7
|
basePath?: string;
|
|
8
8
|
menu?: MenuItem[];
|
|
9
9
|
canAccess?: (resource: string, action: string) => boolean;
|
|
10
|
+
/** Caller class merged with the built-in class list. */
|
|
11
|
+
class?: string;
|
|
10
12
|
}
|
|
11
13
|
declare const LiteSidebar: import("svelte").Component<Props, {}, "">;
|
|
12
14
|
type LiteSidebar = ReturnType<typeof LiteSidebar>;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
errors?: Record<string, string[]>;
|
|
11
11
|
values?: Record<string, unknown>;
|
|
12
12
|
basePath?: string;
|
|
13
|
+
/** Caller class merged with the built-in class list. */
|
|
14
|
+
class?: string;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
let {
|
|
@@ -17,10 +19,11 @@
|
|
|
17
19
|
errors = {},
|
|
18
20
|
values = {},
|
|
19
21
|
basePath = "/lite",
|
|
22
|
+
class: className = '',
|
|
20
23
|
}: Props = $props();
|
|
21
24
|
</script>
|
|
22
25
|
|
|
23
|
-
<div class="lite-page">
|
|
26
|
+
<div class="lite-page {className}">
|
|
24
27
|
<LiteBreadcrumbs
|
|
25
28
|
items={[
|
|
26
29
|
{ label: t("common.dashboard") || "Dashboard", href: basePath },
|
|
@@ -4,6 +4,8 @@ interface Props {
|
|
|
4
4
|
errors?: Record<string, string[]>;
|
|
5
5
|
values?: Record<string, unknown>;
|
|
6
6
|
basePath?: string;
|
|
7
|
+
/** Caller class merged with the built-in class list. */
|
|
8
|
+
class?: string;
|
|
7
9
|
}
|
|
8
10
|
declare const LiteCreatePage: import("svelte").Component<Props, {}, "">;
|
|
9
11
|
type LiteCreatePage = ReturnType<typeof LiteCreatePage>;
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
basePath?: string;
|
|
15
15
|
canDelete?: boolean;
|
|
16
16
|
canShow?: boolean;
|
|
17
|
+
/** Caller class merged with the built-in class list. */
|
|
18
|
+
class?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
let {
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
basePath = "/lite",
|
|
24
26
|
canDelete,
|
|
25
27
|
canShow,
|
|
28
|
+
class: className = '',
|
|
26
29
|
}: Props = $props();
|
|
27
30
|
|
|
28
31
|
let pk = $derived(resource.primaryKey ?? "id");
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
const showView = $derived(canShow ?? resource.canShow !== false);
|
|
32
35
|
</script>
|
|
33
36
|
|
|
34
|
-
<div class="lite-page">
|
|
37
|
+
<div class="lite-page {className}">
|
|
35
38
|
<LiteBreadcrumbs
|
|
36
39
|
items={[
|
|
37
40
|
{ label: t("common.dashboard") || "Dashboard", href: basePath },
|
|
@@ -6,6 +6,8 @@ interface Props {
|
|
|
6
6
|
basePath?: string;
|
|
7
7
|
canDelete?: boolean;
|
|
8
8
|
canShow?: boolean;
|
|
9
|
+
/** Caller class merged with the built-in class list. */
|
|
10
|
+
class?: string;
|
|
9
11
|
}
|
|
10
12
|
declare const LiteEditPage: import("svelte").Component<Props, {}, "">;
|
|
11
13
|
type LiteEditPage = ReturnType<typeof LiteEditPage>;
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
}: Props = $props();
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
|
-
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #
|
|
21
|
+
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F7F8FA; padding: 20px;">
|
|
22
22
|
<div class="lite-card" style="width: 100%; max-width: 400px; padding: 32px;">
|
|
23
23
|
<div style="text-align: center; margin-bottom: 24px;">
|
|
24
|
-
<h1 style="font-size: 24px; font-weight: 600; color: #
|
|
25
|
-
<p style="font-size: 14px; color: #
|
|
24
|
+
<h1 style="font-size: 24px; font-weight: 600; color: #1D2129; margin: 0 0 8px;">{title}</h1>
|
|
25
|
+
<p style="font-size: 14px; color: #4E5969; margin: 0;">{description}</p>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<form method="POST" {action} class="lite-stack-lg">
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
{#if errors.length > 0}
|
|
35
|
-
<div style="padding: 12px; background: #
|
|
35
|
+
<div style="padding: 12px; background: #FFECE8; border-radius: 6px; color: #F53F3F; font-size: 13px;">
|
|
36
36
|
<ul style="margin: 0; padding-left: 20px;">
|
|
37
37
|
{#each errors as err, _i (_i)}
|
|
38
38
|
<li>{err}</li>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
{/if}
|
|
43
43
|
|
|
44
44
|
{#if successMessage}
|
|
45
|
-
<div style="padding: 12px; background: #
|
|
45
|
+
<div style="padding: 12px; background: #E8FFEA; border-radius: 6px; color: #00B42A; font-size: 13px;">
|
|
46
46
|
{successMessage}
|
|
47
47
|
</div>
|
|
48
48
|
{/if}
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
Send Reset Link
|
|
52
52
|
</button>
|
|
53
53
|
|
|
54
|
-
<div style="text-align: center; font-size: 13px; color: #
|
|
55
|
-
Remember your password? <a href={loginUrl} style="color: #
|
|
54
|
+
<div style="text-align: center; font-size: 13px; color: #4E5969; margin-top: 8px;">
|
|
55
|
+
Remember your password? <a href={loginUrl} style="color: #165DFF; text-decoration: none;">Back to Login</a>
|
|
56
56
|
</div>
|
|
57
57
|
</form>
|
|
58
58
|
</div>
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
canEdit?: boolean;
|
|
25
25
|
canDelete?: boolean;
|
|
26
26
|
enableBatch?: boolean;
|
|
27
|
+
/** Caller class merged with the built-in class list. */
|
|
28
|
+
class?: string;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
let {
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
canEdit,
|
|
42
44
|
canDelete,
|
|
43
45
|
enableBatch = true,
|
|
46
|
+
class: className = '',
|
|
44
47
|
}: Props = $props();
|
|
45
48
|
|
|
46
49
|
const showCreate = $derived(canCreate ?? resource.canCreate !== false);
|
|
@@ -59,7 +62,7 @@
|
|
|
59
62
|
);
|
|
60
63
|
</script>
|
|
61
64
|
|
|
62
|
-
<div class="lite-page">
|
|
65
|
+
<div class="lite-page {className}">
|
|
63
66
|
<LiteBreadcrumbs
|
|
64
67
|
items={[
|
|
65
68
|
{ label: t("common.dashboard") || "Dashboard", href: basePath },
|
|
@@ -78,7 +81,7 @@
|
|
|
78
81
|
</div>
|
|
79
82
|
|
|
80
83
|
<div class="lite-card" style="margin-bottom: 20px;">
|
|
81
|
-
<div style="padding: 16px; border-bottom: 1px solid #
|
|
84
|
+
<div style="padding: 16px; border-bottom: 1px solid #E5E6EB; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;">
|
|
82
85
|
<form method="GET" class="lite-filter-bar" style="margin: 0;">
|
|
83
86
|
<input
|
|
84
87
|
type="text"
|
|
@@ -127,7 +130,7 @@
|
|
|
127
130
|
{/if}
|
|
128
131
|
</form>
|
|
129
132
|
|
|
130
|
-
<span style="font-size: 13px; color: #
|
|
133
|
+
<span style="font-size: 13px; color: #4E5969;">
|
|
131
134
|
{t("common.total") || "Total"}: <strong>{total}</strong>
|
|
132
135
|
</span>
|
|
133
136
|
</div>
|
|
@@ -17,6 +17,8 @@ interface Props {
|
|
|
17
17
|
canEdit?: boolean;
|
|
18
18
|
canDelete?: boolean;
|
|
19
19
|
enableBatch?: boolean;
|
|
20
|
+
/** Caller class merged with the built-in class list. */
|
|
21
|
+
class?: string;
|
|
20
22
|
}
|
|
21
23
|
declare const LiteListPage: import("svelte").Component<Props, {}, "">;
|
|
22
24
|
type LiteListPage = ReturnType<typeof LiteListPage>;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<!-- Password update fields can be added here or handled in a separate form -->
|
|
37
37
|
|
|
38
38
|
{#if errors.length > 0}
|
|
39
|
-
<div style="padding: 12px; background: #
|
|
39
|
+
<div style="padding: 12px; background: #FFECE8; border-radius: 6px; color: #F53F3F; font-size: 13px;">
|
|
40
40
|
<ul style="margin: 0; padding-left: 20px;">
|
|
41
41
|
{#each errors as err, _i (_i)}
|
|
42
42
|
<li>{err}</li>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
{/if}
|
|
47
47
|
|
|
48
48
|
{#if successMessage}
|
|
49
|
-
<div style="padding: 12px; background: #
|
|
49
|
+
<div style="padding: 12px; background: #E8FFEA; border-radius: 6px; color: #00B42A; font-size: 13px;">
|
|
50
50
|
{successMessage}
|
|
51
51
|
</div>
|
|
52
52
|
{/if}
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
}: Props = $props();
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #
|
|
20
|
+
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F7F8FA; padding: 20px;">
|
|
21
21
|
<div class="lite-card" style="width: 100%; max-width: 400px; padding: 32px;">
|
|
22
22
|
<div style="text-align: center; margin-bottom: 24px;">
|
|
23
|
-
<h1 style="font-size: 24px; font-weight: 600; color: #
|
|
24
|
-
<p style="font-size: 14px; color: #
|
|
23
|
+
<h1 style="font-size: 24px; font-weight: 600; color: #1D2129; margin: 0 0 8px;">{title}</h1>
|
|
24
|
+
<p style="font-size: 14px; color: #4E5969; margin: 0;">{description}</p>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<form method="POST" {action} class="lite-stack-lg">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
43
|
{#if errors.length > 0}
|
|
44
|
-
<div style="padding: 12px; background: #
|
|
44
|
+
<div style="padding: 12px; background: #FFECE8; border-radius: 6px; color: #F53F3F; font-size: 13px;">
|
|
45
45
|
<ul style="margin: 0; padding-left: 20px;">
|
|
46
46
|
{#each errors as err, _i (_i)}
|
|
47
47
|
<li>{err}</li>
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
Register
|
|
55
55
|
</button>
|
|
56
56
|
|
|
57
|
-
<div style="text-align: center; font-size: 13px; color: #
|
|
58
|
-
Already have an account? <a href={loginUrl} style="color: #
|
|
57
|
+
<div style="text-align: center; font-size: 13px; color: #4E5969; margin-top: 8px;">
|
|
58
|
+
Already have an account? <a href={loginUrl} style="color: #165DFF; text-decoration: none;">Login</a>
|
|
59
59
|
</div>
|
|
60
60
|
</form>
|
|
61
61
|
</div>
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
basePath?: string;
|
|
14
14
|
canEdit?: boolean;
|
|
15
15
|
canDelete?: boolean;
|
|
16
|
+
/** Caller class merged with the built-in class list. */
|
|
17
|
+
class?: string;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
let {
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
basePath = "/lite",
|
|
22
24
|
canEdit,
|
|
23
25
|
canDelete,
|
|
26
|
+
class: className = '',
|
|
24
27
|
}: Props = $props();
|
|
25
28
|
|
|
26
29
|
let pk = $derived(resource.primaryKey ?? "id");
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
);
|
|
34
37
|
</script>
|
|
35
38
|
|
|
36
|
-
<div class="lite-page">
|
|
39
|
+
<div class="lite-page {className}">
|
|
37
40
|
<LiteBreadcrumbs
|
|
38
41
|
items={[
|
|
39
42
|
{ label: t("common.dashboard") || "Dashboard", href: basePath },
|
|
@@ -59,10 +62,10 @@
|
|
|
59
62
|
<div class="lite-stack-lg">
|
|
60
63
|
{#each showFields as field, _i (_i)}
|
|
61
64
|
<div>
|
|
62
|
-
<div style="display: block; font-size: 13px; font-weight: 500; color: #
|
|
65
|
+
<div style="display: block; font-size: 13px; font-weight: 500; color: #4E5969; margin-bottom: 8px;">
|
|
63
66
|
{field.label}
|
|
64
67
|
</div>
|
|
65
|
-
<div style="color: #
|
|
68
|
+
<div style="color: #1D2129; font-size: 14px;">
|
|
66
69
|
<LiteShowField {field} value={record[field.key]} {basePath} />
|
|
67
70
|
</div>
|
|
68
71
|
</div>
|
|
@@ -5,6 +5,8 @@ interface Props {
|
|
|
5
5
|
basePath?: string;
|
|
6
6
|
canEdit?: boolean;
|
|
7
7
|
canDelete?: boolean;
|
|
8
|
+
/** Caller class merged with the built-in class list. */
|
|
9
|
+
class?: string;
|
|
8
10
|
}
|
|
9
11
|
declare const LiteShowPage: import("svelte").Component<Props, {}, "">;
|
|
10
12
|
type LiteShowPage = ReturnType<typeof LiteShowPage>;
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
}: Props = $props();
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
|
-
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #
|
|
17
|
+
<div style="min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F7F8FA; padding: 20px;">
|
|
18
18
|
<div class="lite-card" style="width: 100%; max-width: 400px; padding: 32px;">
|
|
19
19
|
<div style="text-align: center; margin-bottom: 24px;">
|
|
20
|
-
<h1 style="font-size: 24px; font-weight: 600; color: #
|
|
21
|
-
<p style="font-size: 14px; color: #
|
|
20
|
+
<h1 style="font-size: 24px; font-weight: 600; color: #1D2129; margin: 0 0 8px;">{title}</h1>
|
|
21
|
+
<p style="font-size: 14px; color: #4E5969; margin: 0;">{description}</p>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<form method="POST" {action} class="lite-stack-lg">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
{#if errors.length > 0}
|
|
36
|
-
<div style="padding: 12px; background: #
|
|
36
|
+
<div style="padding: 12px; background: #FFECE8; border-radius: 6px; color: #F53F3F; font-size: 13px;">
|
|
37
37
|
<ul style="margin: 0; padding-left: 20px;">
|
|
38
38
|
{#each errors as err, _i (_i)}
|
|
39
39
|
<li>{err}</li>
|