@svadmin/ui 0.36.0 → 0.38.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/dist/app.css +76 -104
- package/dist/components/AdminApp.svelte +18 -14
- package/dist/components/AutoForm.svelte +32 -47
- package/dist/components/AutoTable.svelte +26 -31
- package/dist/components/CanAccess.svelte +3 -2
- package/dist/components/CanAccess.svelte.d.ts +1 -0
- package/dist/components/CreateInferencer.svelte +13 -0
- package/dist/components/CreateInferencer.svelte.d.ts +7 -0
- package/dist/components/EditInferencer.svelte +21 -0
- package/dist/components/EditInferencer.svelte.d.ts +9 -0
- package/dist/components/Header.svelte +6 -6
- package/dist/components/Layout.svelte +21 -11
- package/dist/components/ListInferencer.svelte +14 -0
- package/dist/components/ListInferencer.svelte.d.ts +7 -0
- package/dist/components/PageHeader.svelte +7 -9
- package/dist/components/ResourceInferencer.svelte +28 -0
- package/dist/components/ResourceInferencer.svelte.d.ts +7 -0
- package/dist/components/ResourceOperationsPage.svelte +168 -21
- package/dist/components/ResourceOperationsPage.svelte.d.ts +2 -0
- package/dist/components/SettingsPage.svelte +76 -41
- package/dist/components/ShowInferencer.svelte +21 -0
- package/dist/components/ShowInferencer.svelte.d.ts +9 -0
- package/dist/components/ShowPage.svelte +11 -11
- package/dist/components/ShowPage.svelte.d.ts +1 -0
- package/dist/components/Sidebar.svelte +214 -300
- package/dist/components/Sidebar.svelte.d.ts +0 -1
- package/dist/components/SidebarItem.svelte +141 -108
- package/dist/components/account/TeamMembersPage.svelte +9 -3
- package/dist/components/buttons/CloneButton.svelte +10 -2
- package/dist/components/buttons/CloneButton.svelte.d.ts +2 -4
- package/dist/components/buttons/CreateButton.svelte +9 -2
- package/dist/components/buttons/CreateButton.svelte.d.ts +2 -4
- package/dist/components/buttons/DeleteButton.svelte +10 -2
- package/dist/components/buttons/DeleteButton.svelte.d.ts +2 -4
- package/dist/components/buttons/EditButton.svelte +10 -2
- package/dist/components/buttons/EditButton.svelte.d.ts +2 -4
- package/dist/components/buttons/ExportButton.svelte +9 -2
- package/dist/components/buttons/ExportButton.svelte.d.ts +2 -4
- package/dist/components/buttons/ImportButton.svelte +9 -2
- package/dist/components/buttons/ImportButton.svelte.d.ts +2 -4
- package/dist/components/buttons/ShowButton.svelte +10 -2
- package/dist/components/buttons/ShowButton.svelte.d.ts +2 -4
- package/dist/components/buttons/access-control.d.ts +7 -0
- package/dist/components/buttons/access-control.js +5 -0
- package/dist/components/ui/sheet/sheet.svelte +3 -3
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/router-state.svelte.js +15 -0
- package/package.json +2 -2
package/dist/app.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* Typography — Inter font for clean, modern look */
|
|
2
2
|
|
|
3
|
-
/* @svadmin/ui — Design Tokens (
|
|
3
|
+
/* @svadmin/ui — Design Tokens (clean admin shell)
|
|
4
4
|
* Auto-imported by AdminApp. Can be overridden by consumer's CSS.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Clean dashboard style: indigo primary, light glassmorphism,
|
|
7
7
|
* professional admin aesthetic with subtle depth.
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
--warning-foreground: oklch(0.3 0.08 60);
|
|
49
49
|
--info: oklch(0.6 0.15 250);
|
|
50
50
|
--info-foreground: oklch(0.985 0 0);
|
|
51
|
-
--sidebar: oklch(
|
|
52
|
-
--sidebar-foreground: oklch(0.
|
|
51
|
+
--sidebar: oklch(0.985 0.002 264);
|
|
52
|
+
--sidebar-foreground: oklch(0.23 0.02 265);
|
|
53
53
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
54
54
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
55
|
-
--sidebar-accent: oklch(0.
|
|
55
|
+
--sidebar-accent: oklch(0.955 0.012 264);
|
|
56
56
|
--sidebar-accent-foreground: oklch(0.33 0.17 264);
|
|
57
57
|
--sidebar-border: oklch(0.935 0.005 264);
|
|
58
58
|
--sidebar-ring: oklch(0.488 0.243 264.376);
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
--warning-foreground: oklch(0.25 0.05 60);
|
|
90
90
|
--info: oklch(0.65 0.15 250);
|
|
91
91
|
--info-foreground: oklch(0.985 0 0);
|
|
92
|
-
--sidebar: oklch(0.
|
|
93
|
-
--sidebar-foreground: oklch(0.
|
|
92
|
+
--sidebar: oklch(0.17 0.015 265);
|
|
93
|
+
--sidebar-foreground: oklch(0.92 0.005 264);
|
|
94
94
|
--sidebar-primary: oklch(0.585 0.233 264);
|
|
95
95
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
96
|
-
--sidebar-accent: oklch(0.488 0.243 264.376 /
|
|
96
|
+
--sidebar-accent: oklch(0.488 0.243 264.376 / 12%);
|
|
97
97
|
--sidebar-accent-foreground: oklch(0.7 0.15 264);
|
|
98
98
|
--sidebar-border: oklch(0.27 0.02 265);
|
|
99
99
|
--sidebar-ring: oklch(0.55 0.18 264);
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
--chart-1: oklch(0.541 0.281 293.009);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
/*
|
|
256
|
+
/* Soft shadows — premium, multi-layered depth */
|
|
257
257
|
[data-slot="button"],
|
|
258
258
|
[data-slot="input"],
|
|
259
259
|
[data-slot="select-trigger"],
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04), 0 0 0 1px rgb(0 0 0 / 0.02);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
/*
|
|
266
|
+
/* Form inputs use card background instead of transparent */
|
|
267
267
|
[data-slot="input"],
|
|
268
268
|
[data-slot="textarea"],
|
|
269
269
|
[data-slot="select"] {
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
[data-slot="card"] {
|
|
274
|
-
/* Classic
|
|
274
|
+
/* Classic soft shadow: faint ambient + directional drop */
|
|
275
275
|
box-shadow: 0 2px 5px -1px rgb(0 0 0 / 0.04), 0 1px 1px -1px rgb(0 0 0 / 0.04), 0 0 0 1px rgb(0 0 0 / 0.02);
|
|
276
276
|
}
|
|
277
277
|
|
|
@@ -333,7 +333,7 @@ button:active:not(:disabled) {
|
|
|
333
333
|
.dark ::-webkit-scrollbar-thumb { background: oklch(0.35 0 0); }
|
|
334
334
|
.dark ::-webkit-scrollbar-thumb:hover { background: oklch(0.45 0 0); }
|
|
335
335
|
|
|
336
|
-
/*
|
|
336
|
+
/* Card Hover Elevation Lift — subtle float on hover */
|
|
337
337
|
[data-slot="card"] {
|
|
338
338
|
transition: box-shadow 0.2s ease, transform 0.2s ease;
|
|
339
339
|
}
|
|
@@ -521,13 +521,30 @@ main {
|
|
|
521
521
|
right: 0;
|
|
522
522
|
}
|
|
523
523
|
/* Mirror sidebar margins for RTL */
|
|
524
|
-
[dir="rtl"] .
|
|
524
|
+
[dir="rtl"] .sidebar-content-expanded {
|
|
525
525
|
margin-left: 0;
|
|
526
|
-
margin-right:
|
|
526
|
+
margin-right: 252px;
|
|
527
527
|
}
|
|
528
|
-
[dir="rtl"] .
|
|
528
|
+
[dir="rtl"] .sidebar-content-collapsed {
|
|
529
529
|
margin-left: 0;
|
|
530
|
-
margin-right:
|
|
530
|
+
margin-right: 70px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/* ── Sidebar Menu Item Styles ── */
|
|
534
|
+
.sidebar-menu-item {
|
|
535
|
+
position: relative;
|
|
536
|
+
cursor: pointer;
|
|
537
|
+
-webkit-tap-highlight-color: transparent;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.sidebar-menu-item-active {
|
|
541
|
+
position: relative;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.sidebar-scroll [data-radix-scroll-area-viewport] > div {
|
|
545
|
+
min-height: 100%;
|
|
546
|
+
display: flex;
|
|
547
|
+
flex-direction: column;
|
|
531
548
|
}
|
|
532
549
|
|
|
533
550
|
/* ⑰ Accessibility Minimum Touch Target — Apple HIG 44px minimum */
|
|
@@ -711,117 +728,54 @@ main {
|
|
|
711
728
|
background-color: rgba(43, 43, 64, 0.3) !important;
|
|
712
729
|
}
|
|
713
730
|
|
|
714
|
-
/* Sidebar layout adjustments */
|
|
715
|
-
.layout-clean-flat
|
|
716
|
-
background: #
|
|
731
|
+
/* Sidebar layout adjustments for clean-flat theme */
|
|
732
|
+
.layout-clean-flat aside {
|
|
733
|
+
background: #fafbfc !important;
|
|
717
734
|
color: #181c32 !important;
|
|
718
|
-
border-right:
|
|
735
|
+
border-right-color: #f1f3f7 !important;
|
|
719
736
|
box-shadow: none !important;
|
|
720
737
|
}
|
|
721
|
-
.dark.layout-clean-flat
|
|
722
|
-
.dark .layout-clean-flat
|
|
738
|
+
.dark.layout-clean-flat aside,
|
|
739
|
+
.dark .layout-clean-flat aside {
|
|
723
740
|
background: #1e1e2d !important;
|
|
724
741
|
color: #a1a5b7 !important;
|
|
725
|
-
border-right:
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.layout-clean-flat [data-sidebar="group-label"] {
|
|
729
|
-
font-size: 0.9375rem !important;
|
|
730
|
-
font-weight: 650 !important;
|
|
731
|
-
text-transform: none;
|
|
732
|
-
letter-spacing: 0;
|
|
733
|
-
color: #a1a5b7 !important;
|
|
734
|
-
padding: 0.5rem 0.5rem 0.375rem !important;
|
|
742
|
+
border-right-color: #2b2b40 !important;
|
|
735
743
|
}
|
|
736
744
|
|
|
737
|
-
.layout-clean-flat
|
|
745
|
+
.layout-clean-flat .sidebar-menu-item {
|
|
738
746
|
color: #5e6278 !important;
|
|
739
747
|
border-radius: 0.5rem !important;
|
|
740
748
|
transition: color 0.15s ease, background-color 0.15s ease !important;
|
|
741
|
-
font-weight: 500 !important;
|
|
742
749
|
box-shadow: none !important;
|
|
743
750
|
}
|
|
744
751
|
|
|
745
|
-
.layout-clean-flat
|
|
752
|
+
.layout-clean-flat .sidebar-menu-item:hover {
|
|
746
753
|
background: transparent !important;
|
|
747
754
|
color: #181c32 !important;
|
|
748
755
|
}
|
|
749
|
-
.dark.layout-clean-flat
|
|
750
|
-
.dark .layout-clean-flat
|
|
756
|
+
.dark.layout-clean-flat .sidebar-menu-item:hover,
|
|
757
|
+
.dark .layout-clean-flat .sidebar-menu-item:hover {
|
|
751
758
|
background: transparent !important;
|
|
752
759
|
color: #f1f6ff !important;
|
|
753
760
|
}
|
|
754
761
|
|
|
755
|
-
.layout-clean-flat
|
|
756
|
-
opacity: 0.85 !important;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.layout-clean-flat [data-sidebar="menu-button"][data-active="true"] {
|
|
762
|
+
.layout-clean-flat .sidebar-menu-item-active {
|
|
760
763
|
background: transparent !important;
|
|
761
764
|
color: #3e97ff !important;
|
|
762
765
|
font-weight: 600 !important;
|
|
763
766
|
box-shadow: none !important;
|
|
764
|
-
outline: none !important;
|
|
765
767
|
}
|
|
766
|
-
.dark.layout-clean-flat
|
|
767
|
-
.dark .layout-clean-flat
|
|
768
|
+
.dark.layout-clean-flat .sidebar-menu-item-active,
|
|
769
|
+
.dark .layout-clean-flat .sidebar-menu-item-active {
|
|
768
770
|
background: transparent !important;
|
|
769
771
|
color: #3e97ff !important;
|
|
770
772
|
}
|
|
771
773
|
|
|
772
|
-
.layout-clean-flat
|
|
774
|
+
.layout-clean-flat .sidebar-menu-item-active svg {
|
|
773
775
|
color: #3e97ff !important;
|
|
774
776
|
opacity: 1 !important;
|
|
775
777
|
}
|
|
776
778
|
|
|
777
|
-
.layout-clean-flat [data-sidebar="menu-button"] [data-sidebar="menu-icon"],
|
|
778
|
-
.layout-clean-flat [data-sidebar="menu-sub-button"] [data-sidebar="menu-icon"],
|
|
779
|
-
.layout-clean-flat [data-sidebar="menu-button"][data-active="true"] [data-sidebar="menu-icon"],
|
|
780
|
-
.layout-clean-flat [data-sidebar="menu-sub-button"][data-active="true"] [data-sidebar="menu-icon"] {
|
|
781
|
-
background: transparent !important;
|
|
782
|
-
color: inherit !important;
|
|
783
|
-
box-shadow: none !important;
|
|
784
|
-
outline: none !important;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
.layout-clean-flat [data-sidebar="menu-sub"] {
|
|
788
|
-
margin-left: 0 !important;
|
|
789
|
-
padding-left: 0 !important;
|
|
790
|
-
border-left: 0 !important;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
.layout-clean-flat [data-sidebar="menu-sub-button"] {
|
|
794
|
-
color: #5e6278 !important;
|
|
795
|
-
border-radius: 0.5rem !important;
|
|
796
|
-
font-size: 0.8125rem !important;
|
|
797
|
-
font-weight: 400 !important;
|
|
798
|
-
transition: color 0.15s ease, background-color 0.15s ease !important;
|
|
799
|
-
box-shadow: none !important;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
.layout-clean-flat [data-sidebar="menu-sub-button"]:hover {
|
|
803
|
-
background: transparent !important;
|
|
804
|
-
color: #181c32 !important;
|
|
805
|
-
}
|
|
806
|
-
.dark.layout-clean-flat [data-sidebar="menu-sub-button"]:hover,
|
|
807
|
-
.dark .layout-clean-flat [data-sidebar="menu-sub-button"]:hover {
|
|
808
|
-
background: transparent !important;
|
|
809
|
-
color: #f1f6ff !important;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.layout-clean-flat [data-sidebar="menu-sub-button"][data-active="true"] {
|
|
813
|
-
background: transparent !important;
|
|
814
|
-
color: #3e97ff !important;
|
|
815
|
-
font-weight: 500 !important;
|
|
816
|
-
box-shadow: none !important;
|
|
817
|
-
outline: none !important;
|
|
818
|
-
}
|
|
819
|
-
.dark.layout-clean-flat [data-sidebar="menu-sub-button"][data-active="true"],
|
|
820
|
-
.dark .layout-clean-flat [data-sidebar="menu-sub-button"][data-active="true"] {
|
|
821
|
-
background: transparent !important;
|
|
822
|
-
color: #3e97ff !important;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
779
|
/* Button & input styles override under clean-flat layout */
|
|
826
780
|
.layout-clean-flat [data-slot="button"][data-variant="default"] {
|
|
827
781
|
background: #3e97ff !important;
|
|
@@ -1245,16 +1199,16 @@ main {
|
|
|
1245
1199
|
}
|
|
1246
1200
|
|
|
1247
1201
|
.layout-clean-flat main [data-slot="card"] {
|
|
1248
|
-
border-left:
|
|
1249
|
-
border-right:
|
|
1250
|
-
border-radius: 0 !important;
|
|
1202
|
+
border-left: 1px solid color-mix(in oklch, var(--border) 72%, transparent) !important;
|
|
1203
|
+
border-right: 1px solid color-mix(in oklch, var(--border) 72%, transparent) !important;
|
|
1204
|
+
border-radius: 0.5rem !important;
|
|
1251
1205
|
}
|
|
1252
1206
|
|
|
1253
1207
|
.layout-clean-flat main [data-slot="card-header"],
|
|
1254
1208
|
.layout-clean-flat main [data-slot="card-content"],
|
|
1255
1209
|
.layout-clean-flat main [data-slot="card-footer"] {
|
|
1256
|
-
padding-left:
|
|
1257
|
-
padding-right:
|
|
1210
|
+
padding-left: 1rem !important;
|
|
1211
|
+
padding-right: 1rem !important;
|
|
1258
1212
|
}
|
|
1259
1213
|
|
|
1260
1214
|
.layout-clean-flat main > div[class*="space-y"] > section:first-child {
|
|
@@ -1275,6 +1229,24 @@ main {
|
|
|
1275
1229
|
.layout-clean-flat [data-svadmin-form-actions] {
|
|
1276
1230
|
width: 100% !important;
|
|
1277
1231
|
}
|
|
1232
|
+
|
|
1233
|
+
.layout-clean-flat [data-svadmin-table-card],
|
|
1234
|
+
.layout-clean-flat [data-svadmin-show-card],
|
|
1235
|
+
.layout-clean-flat [data-svadmin-form-card] {
|
|
1236
|
+
border-left: 1px solid color-mix(in oklch, var(--border) 72%, transparent) !important;
|
|
1237
|
+
border-right: 1px solid color-mix(in oklch, var(--border) 72%, transparent) !important;
|
|
1238
|
+
border-radius: 0.5rem !important;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.layout-clean-flat [data-svadmin-table-card] [data-slot="card-header"],
|
|
1242
|
+
.layout-clean-flat [data-svadmin-table-card] [data-slot="card-content"],
|
|
1243
|
+
.layout-clean-flat [data-svadmin-show-card] [data-slot="card-header"],
|
|
1244
|
+
.layout-clean-flat [data-svadmin-show-card] [data-slot="card-content"],
|
|
1245
|
+
.layout-clean-flat [data-svadmin-form-card] [data-slot="card-header"],
|
|
1246
|
+
.layout-clean-flat [data-svadmin-form-card] [data-slot="card-content"] {
|
|
1247
|
+
padding-left: 1rem !important;
|
|
1248
|
+
padding-right: 1rem !important;
|
|
1249
|
+
}
|
|
1278
1250
|
}
|
|
1279
1251
|
|
|
1280
1252
|
@media (min-width: 768px) and (max-width: 1023px) {
|
|
@@ -1375,15 +1347,15 @@ main {
|
|
|
1375
1347
|
}
|
|
1376
1348
|
|
|
1377
1349
|
.layout-clean-flat [data-svadmin-content-page] [data-slot="card"] {
|
|
1378
|
-
border-left:
|
|
1379
|
-
border-right:
|
|
1380
|
-
border-radius: 0 !important;
|
|
1350
|
+
border-left: 1px solid var(--svadmin-content-border) !important;
|
|
1351
|
+
border-right: 1px solid var(--svadmin-content-border) !important;
|
|
1352
|
+
border-radius: 0.5rem !important;
|
|
1381
1353
|
}
|
|
1382
1354
|
|
|
1383
1355
|
.layout-clean-flat [data-svadmin-content-page] [data-slot="card-content"],
|
|
1384
1356
|
.layout-clean-flat [data-svadmin-content-page] [data-slot="card-header"] {
|
|
1385
|
-
padding-left:
|
|
1386
|
-
padding-right:
|
|
1357
|
+
padding-left: 1rem !important;
|
|
1358
|
+
padding-right: 1rem !important;
|
|
1387
1359
|
}
|
|
1388
1360
|
|
|
1389
1361
|
.layout-clean-flat [data-svadmin-content-page] [class*="grid-cols-3"] {
|
|
@@ -235,46 +235,50 @@
|
|
|
235
235
|
<Layout {title} {menu} {siteUrl} routeMode={resolvedRouteMode}>
|
|
236
236
|
{#key route + (params.resource ?? '') + (params.id ?? '') + (params.variant ?? '') + (params.columns ?? '')}
|
|
237
237
|
<div class="svadmin-page-enter">
|
|
238
|
-
{#if route === '/2fa'}
|
|
238
|
+
{#if route === '/2fa' || route === '/authentication/branded/2fa'}
|
|
239
239
|
<TwoFactorAuthPage />
|
|
240
240
|
{:else if route === '/public-profile'}
|
|
241
241
|
<PublicProfilePage variant="default" initialTab="projects" />
|
|
242
242
|
{:else if route === '/public-profile/projects/:columns'}
|
|
243
|
-
<PublicProfilePage variant="default" initialTab="projects" columns={params.columns
|
|
243
|
+
<PublicProfilePage variant="default" initialTab="projects" columns={params.columns?.includes('3') ? 3 : 2} />
|
|
244
244
|
{:else if route === '/public-profile/activity'}
|
|
245
245
|
<PublicProfilePage variant="default" initialTab="activity" />
|
|
246
246
|
{:else if route === '/public-profile/teams'}
|
|
247
247
|
<PublicProfilePage variant="default" initialTab="teams" />
|
|
248
248
|
{:else if route === '/public-profile/profiles/:variant'}
|
|
249
249
|
<PublicProfilePage variant={(params.variant === 'company' || params.variant === 'gamer' || params.variant === 'default' ? params.variant : 'default') as 'company' | 'gamer' | 'default'} />
|
|
250
|
-
{:else if route === '/account/get-started'}
|
|
250
|
+
{:else if route === '/account/get-started' || route === '/account/home/get-started'}
|
|
251
251
|
<GetStartedPage />
|
|
252
|
-
{:else if route === '/account/
|
|
252
|
+
{:else if route === '/account/home/user-profile'}
|
|
253
|
+
<SettingsPage />
|
|
254
|
+
{:else if route === '/account/company-profile' || route === '/account/home/company-profile'}
|
|
253
255
|
<CompanyProfilePage />
|
|
254
|
-
{:else if route === '/account/settings-plain'}
|
|
256
|
+
{:else if route === '/account/settings-plain' || route === '/account/home/settings-plain'}
|
|
255
257
|
<SettingsPlainPage />
|
|
256
|
-
{:else if route === '/account/settings-sidebar'}
|
|
258
|
+
{:else if route === '/account/settings-sidebar' || route === '/account/home/settings-sidebar'}
|
|
257
259
|
<SettingsSidebarPage />
|
|
258
|
-
{:else if route === '/account/settings-enterprise'}
|
|
260
|
+
{:else if route === '/account/settings-enterprise' || route === '/account/home/settings-enterprise'}
|
|
259
261
|
<SettingsEnterprisePage />
|
|
260
|
-
{:else if route === '/account
|
|
262
|
+
{:else if route === '/account/:tab'}
|
|
263
|
+
<SettingsPage />
|
|
264
|
+
{:else if route === '/account/import-members' || route === '/account/members/import-members'}
|
|
261
265
|
<ImportMembersPage />
|
|
262
|
-
{:else if route === '/account/members-starter'}
|
|
266
|
+
{:else if route === '/account/members-starter' || route === '/account/members/members-starter'}
|
|
263
267
|
<MembersStarterPage />
|
|
264
|
-
{:else if route === '/account/team-members'}
|
|
268
|
+
{:else if route === '/account/team-members' || route === '/account/members/team-members'}
|
|
265
269
|
<TeamMembersPage />
|
|
266
|
-
{:else if route === '/account/security-log'}
|
|
270
|
+
{:else if route === '/account/security-log' || route === '/account/security/security-log'}
|
|
267
271
|
<SecurityLogPage />
|
|
268
|
-
{:else if route === '/network/user-cards'}
|
|
272
|
+
{:else if route === '/network/user-cards' || route === '/network/user-cards/nft'}
|
|
269
273
|
<UserCardsNFTPage />
|
|
270
|
-
{:else if route === '/network/team-crew'}
|
|
274
|
+
{:else if route === '/network/team-crew' || route === '/network/user-table/team-crew'}
|
|
271
275
|
<TeamCrewTablePage />
|
|
272
276
|
{:else if route.startsWith('/settings')}
|
|
273
277
|
<SettingsPage />
|
|
274
278
|
{:else if route === '/500' || (route === '/:resource' && params.resource === '500')}
|
|
275
279
|
{@const ErrorComp = mergedComponents.ErrorPage || ErrorPage}
|
|
276
280
|
<ErrorComp status="500" />
|
|
277
|
-
{:else if route === '/' || route === ''}
|
|
281
|
+
{:else if route === '/' || route === '' || route === '/inventory-dashboard'}
|
|
278
282
|
{#if dashboard}
|
|
279
283
|
{@render dashboard()}
|
|
280
284
|
{:else}
|
|
@@ -44,17 +44,14 @@
|
|
|
44
44
|
const hasGroups = $derived(formFields.some(f => f.group));
|
|
45
45
|
const groups = $derived((() => {
|
|
46
46
|
if (!hasGroups) return [];
|
|
47
|
-
const
|
|
47
|
+
const order: string[] = [];
|
|
48
|
+
const map = new Map<string, FieldDefinition[]>();
|
|
48
49
|
for (const f of formFields) {
|
|
49
50
|
const g = f.group ?? '';
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
group = { name: g, fields: [] };
|
|
53
|
-
result.push(group);
|
|
54
|
-
}
|
|
55
|
-
group.fields.push(f);
|
|
51
|
+
if (!map.has(g)) { order.push(g); map.set(g, []); }
|
|
52
|
+
(map.get(g) ?? []).push(f);
|
|
56
53
|
}
|
|
57
|
-
return
|
|
54
|
+
return order.map(g => ({ name: g, fields: map.get(g) ?? [] }));
|
|
58
55
|
})());
|
|
59
56
|
|
|
60
57
|
// ─── Default values from field metadata ───────────────────────────
|
|
@@ -135,37 +132,26 @@
|
|
|
135
132
|
}
|
|
136
133
|
</script>
|
|
137
134
|
|
|
138
|
-
<div class="space-y-6"
|
|
139
|
-
<div class="
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</Badge>
|
|
154
|
-
<p class="text-sm text-muted-foreground">{resource.label}</p>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
{#if headerContent}
|
|
158
|
-
{@render headerContent()}
|
|
159
|
-
{/if}
|
|
160
|
-
{#if form.isTainted()}
|
|
161
|
-
<Badge variant="outline" class="border-warning/30 bg-warning/10 text-warning-foreground">{t('common.unsaved')}</Badge>
|
|
162
|
-
{/if}
|
|
163
|
-
</div>
|
|
135
|
+
<div class="space-y-6">
|
|
136
|
+
<div class="flex items-center gap-4">
|
|
137
|
+
<TooltipButton
|
|
138
|
+
tooltip={t('common.back')}
|
|
139
|
+
onclick={() => guardNavigate(() => navigate(`/${resourceName}`))}
|
|
140
|
+
>
|
|
141
|
+
<ArrowLeft class="h-5 w-5" />
|
|
142
|
+
</TooltipButton>
|
|
143
|
+
<h1 class="text-xl font-semibold text-foreground">{pageTitle}</h1>
|
|
144
|
+
{#if headerContent}
|
|
145
|
+
{@render headerContent()}
|
|
146
|
+
{/if}
|
|
147
|
+
{#if form.isTainted()}
|
|
148
|
+
<Badge variant="outline" class="border-warning/30 bg-warning/10 text-warning-foreground">{t('common.unsaved')}</Badge>
|
|
149
|
+
{/if}
|
|
164
150
|
</div>
|
|
165
151
|
|
|
166
152
|
{#if form.loading}
|
|
167
|
-
<div class="max-w-
|
|
168
|
-
<div class="
|
|
153
|
+
<div class="max-w-3xl space-y-6">
|
|
154
|
+
<div class="rounded-lg shadow-sm ring-1 ring-border/10 p-6 space-y-5">
|
|
169
155
|
{#each Array(4) as _, _i (_i)}
|
|
170
156
|
<div class="space-y-2">
|
|
171
157
|
<Skeleton class="h-4 w-24" />
|
|
@@ -175,7 +161,7 @@
|
|
|
175
161
|
</div>
|
|
176
162
|
</div>
|
|
177
163
|
{:else}
|
|
178
|
-
<form onsubmit={(e: Event) => { e.preventDefault(); handleSubmit(); }} class="max-w-
|
|
164
|
+
<form onsubmit={(e: Event) => { e.preventDefault(); handleSubmit(); }} class="max-w-3xl space-y-6">
|
|
179
165
|
{#if submitError}
|
|
180
166
|
<div transition:slide={{ duration: 300, axis: 'y' }} class="svadmin-shake">
|
|
181
167
|
<Alert.Root variant="destructive">
|
|
@@ -187,15 +173,15 @@
|
|
|
187
173
|
|
|
188
174
|
{#if hasGroups}
|
|
189
175
|
{#each groups as group, _i (_i)}
|
|
190
|
-
<Card.Root class="border-border/
|
|
176
|
+
<Card.Root class="border-border/40 shadow-sm">
|
|
191
177
|
{#if group.name}
|
|
192
178
|
<Card.Header>
|
|
193
|
-
<Card.Title class="text-
|
|
179
|
+
<Card.Title class="text-lg">{group.name}</Card.Title>
|
|
194
180
|
</Card.Header>
|
|
195
181
|
{/if}
|
|
196
|
-
<Card.Content class="px-4
|
|
182
|
+
<Card.Content class="space-y-5 px-4 sm:px-6 pb-4 sm:pb-6 pt-0">
|
|
197
183
|
{#each group.fields as field (field.key)}
|
|
198
|
-
<div
|
|
184
|
+
<div class:border-destructive={!!form.errors[field.key]}>
|
|
199
185
|
{#if fieldRenderer}
|
|
200
186
|
{@render fieldRenderer({ field, value: form.values[field.key], onchange: (val: unknown) => form.setFieldValue(field.key, val) })}
|
|
201
187
|
{:else}
|
|
@@ -215,10 +201,10 @@
|
|
|
215
201
|
</Card.Root>
|
|
216
202
|
{/each}
|
|
217
203
|
{:else}
|
|
218
|
-
<Card.Root class="border-border/
|
|
219
|
-
<Card.Content class="px-4
|
|
204
|
+
<Card.Root class="border-border/40 shadow-sm">
|
|
205
|
+
<Card.Content class="space-y-5 px-4 pt-5 pb-4 sm:px-6 sm:pt-6 sm:pb-6">
|
|
220
206
|
{#each formFields as field (field.key)}
|
|
221
|
-
<div
|
|
207
|
+
<div class:border-destructive={!!form.errors[field.key]}>
|
|
222
208
|
{#if fieldRenderer}
|
|
223
209
|
{@render fieldRenderer({ field, value: form.values[field.key], onchange: (val: unknown) => form.setFieldValue(field.key, val) })}
|
|
224
210
|
{:else}
|
|
@@ -238,11 +224,11 @@
|
|
|
238
224
|
</Card.Root>
|
|
239
225
|
{/if}
|
|
240
226
|
|
|
241
|
-
<div class="
|
|
227
|
+
<div class="flex items-center gap-3">
|
|
242
228
|
{#if formActions}
|
|
243
229
|
{@render formActions({ isLoading: form.submitting, onSubmit: handleSubmit })}
|
|
244
230
|
{:else if !isReadonly}
|
|
245
|
-
<Button type="submit" disabled={form.submitting}
|
|
231
|
+
<Button type="submit" disabled={form.submitting}>
|
|
246
232
|
{#if form.submitting}
|
|
247
233
|
<Loader2 class="h-4 w-4 animate-spin" data-icon="inline-start" />
|
|
248
234
|
{:else}
|
|
@@ -253,7 +239,6 @@
|
|
|
253
239
|
<Button
|
|
254
240
|
type="button"
|
|
255
241
|
variant="outline"
|
|
256
|
-
class="h-10 rounded-xl"
|
|
257
242
|
onclick={() => guardNavigate(() => navigate(`/${resourceName}`))}
|
|
258
243
|
>
|
|
259
244
|
{t('common.cancel')}
|