@svadmin/ui 0.111.0 → 0.113.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 +216 -0
- package/dist/app.theme.css +216 -0
- package/dist/components/AboutSettings.svelte +1 -1
- package/dist/components/AutoForm.svelte +24 -35
- package/dist/components/FormDependency.svelte +36 -0
- package/dist/components/FormDependency.svelte.d.ts +12 -0
- package/dist/components/Icon.svelte +57 -0
- package/dist/components/Icon.svelte.d.ts +10 -0
- package/dist/components/JsonSchemaForm.svelte +68 -10
- package/dist/components/PageContainer.svelte +263 -0
- package/dist/components/PageContainer.svelte.d.ts +53 -0
- package/dist/components/ProDescriptions.svelte +278 -0
- package/dist/components/ProDescriptions.svelte.d.ts +37 -0
- package/dist/components/QueryFilter.svelte +194 -0
- package/dist/components/QueryFilter.svelte.d.ts +34 -0
- package/dist/components/RealtimeMonitorView.svelte +245 -0
- package/dist/components/RealtimeMonitorView.svelte.d.ts +40 -0
- package/dist/components/RoleSwitcher.svelte +267 -0
- package/dist/components/RoleSwitcher.svelte.d.ts +40 -0
- package/dist/components/WorkflowDesigner.svelte +244 -0
- package/dist/components/WorkflowDesigner.svelte.d.ts +29 -0
- package/dist/components/auto-form-layout.d.ts +28 -0
- package/dist/components/auto-form-layout.js +70 -0
- package/dist/components/fields/UploadField.svelte +222 -0
- package/dist/components/fields/UploadField.svelte.d.ts +14 -0
- package/dist/components/icons/IconApprove.svelte +35 -0
- package/dist/components/icons/IconApprove.svelte.d.ts +4 -0
- package/dist/components/icons/IconAudit.svelte +38 -0
- package/dist/components/icons/IconAudit.svelte.d.ts +4 -0
- package/dist/components/icons/IconBilling.svelte +37 -0
- package/dist/components/icons/IconBilling.svelte.d.ts +4 -0
- package/dist/components/icons/IconCluster.svelte +41 -0
- package/dist/components/icons/IconCluster.svelte.d.ts +4 -0
- package/dist/components/icons/IconMonitor.svelte +37 -0
- package/dist/components/icons/IconMonitor.svelte.d.ts +4 -0
- package/dist/components/icons/IconReject.svelte +36 -0
- package/dist/components/icons/IconReject.svelte.d.ts +4 -0
- package/dist/components/icons/IconSeal.svelte +36 -0
- package/dist/components/icons/IconSeal.svelte.d.ts +4 -0
- package/dist/components/icons/IconSecurity.svelte +35 -0
- package/dist/components/icons/IconSecurity.svelte.d.ts +4 -0
- package/dist/components/icons/IconTenant.svelte +39 -0
- package/dist/components/icons/IconTenant.svelte.d.ts +4 -0
- package/dist/components/icons/IconWorkflow.svelte +38 -0
- package/dist/components/icons/IconWorkflow.svelte.d.ts +4 -0
- package/dist/components/icons/index.d.ts +11 -0
- package/dist/components/icons/index.js +10 -0
- package/dist/components/icons/types.d.ts +15 -0
- package/dist/components/icons/types.js +1 -0
- package/dist/components/json-schema-form-state.d.ts +3 -1
- package/dist/icon-registry.d.ts +27 -0
- package/dist/icon-registry.js +52 -0
- package/dist/icons.d.ts +5 -1
- package/dist/icons.js +4 -0
- package/dist/index.d.ts +27 -7
- package/dist/index.js +19 -6
- package/dist/intent-preload.d.ts +28 -0
- package/dist/intent-preload.js +76 -0
- package/package.json +5 -5
package/dist/app.theme.css
CHANGED
|
@@ -5530,6 +5530,7 @@
|
|
|
5530
5530
|
--container-3xl: 48rem;
|
|
5531
5531
|
--container-4xl: 56rem;
|
|
5532
5532
|
--container-6xl: 72rem;
|
|
5533
|
+
--container-7xl: 80rem;
|
|
5533
5534
|
--text-xs: 0.75rem;
|
|
5534
5535
|
--text-xs--line-height: calc(1 / 0.75);
|
|
5535
5536
|
--text-sm: 0.875rem;
|
|
@@ -5616,6 +5617,9 @@
|
|
|
5616
5617
|
.inset-4 {
|
|
5617
5618
|
inset: calc(var(--spacing) * 4);
|
|
5618
5619
|
}
|
|
5620
|
+
.inset-auto {
|
|
5621
|
+
inset: auto;
|
|
5622
|
+
}
|
|
5619
5623
|
.inset-y-0 {
|
|
5620
5624
|
inset-block: 0px;
|
|
5621
5625
|
}
|
|
@@ -5646,6 +5650,9 @@
|
|
|
5646
5650
|
.top-3 {
|
|
5647
5651
|
top: calc(var(--spacing) * 3);
|
|
5648
5652
|
}
|
|
5653
|
+
.top-8 {
|
|
5654
|
+
top: calc(var(--spacing) * 8);
|
|
5655
|
+
}
|
|
5649
5656
|
.top-full {
|
|
5650
5657
|
top: 100%;
|
|
5651
5658
|
}
|
|
@@ -5721,6 +5728,9 @@
|
|
|
5721
5728
|
.z-30 {
|
|
5722
5729
|
z-index: 30;
|
|
5723
5730
|
}
|
|
5731
|
+
.z-40 {
|
|
5732
|
+
z-index: 40;
|
|
5733
|
+
}
|
|
5724
5734
|
.z-50 {
|
|
5725
5735
|
z-index: 50;
|
|
5726
5736
|
}
|
|
@@ -5736,6 +5746,9 @@
|
|
|
5736
5746
|
.z-\[999999\] {
|
|
5737
5747
|
z-index: 999999;
|
|
5738
5748
|
}
|
|
5749
|
+
.col-span-1 {
|
|
5750
|
+
grid-column: span 1 / span 1;
|
|
5751
|
+
}
|
|
5739
5752
|
.col-span-full {
|
|
5740
5753
|
grid-column: 1 / -1;
|
|
5741
5754
|
}
|
|
@@ -5841,6 +5854,9 @@
|
|
|
5841
5854
|
.mr-2 {
|
|
5842
5855
|
margin-right: calc(var(--spacing) * 2);
|
|
5843
5856
|
}
|
|
5857
|
+
.-mb-\[1px\] {
|
|
5858
|
+
margin-bottom: calc(1px * -1);
|
|
5859
|
+
}
|
|
5844
5860
|
.-mb-px {
|
|
5845
5861
|
margin-bottom: -1px;
|
|
5846
5862
|
}
|
|
@@ -5853,6 +5869,9 @@
|
|
|
5853
5869
|
.mb-2 {
|
|
5854
5870
|
margin-bottom: calc(var(--spacing) * 2);
|
|
5855
5871
|
}
|
|
5872
|
+
.mb-2\.5 {
|
|
5873
|
+
margin-bottom: calc(var(--spacing) * 2.5);
|
|
5874
|
+
}
|
|
5856
5875
|
.mb-3 {
|
|
5857
5876
|
margin-bottom: calc(var(--spacing) * 3);
|
|
5858
5877
|
}
|
|
@@ -6059,6 +6078,9 @@
|
|
|
6059
6078
|
.h-72 {
|
|
6060
6079
|
height: calc(var(--spacing) * 72);
|
|
6061
6080
|
}
|
|
6081
|
+
.h-\[2px\] {
|
|
6082
|
+
height: 2px;
|
|
6083
|
+
}
|
|
6062
6084
|
.h-\[5px\] {
|
|
6063
6085
|
height: 5px;
|
|
6064
6086
|
}
|
|
@@ -6185,6 +6207,9 @@
|
|
|
6185
6207
|
.min-h-\[calc\(100vh-70px\)\] {
|
|
6186
6208
|
min-height: calc(100vh - 70px);
|
|
6187
6209
|
}
|
|
6210
|
+
.min-h-full {
|
|
6211
|
+
min-height: 100%;
|
|
6212
|
+
}
|
|
6188
6213
|
.min-h-screen {
|
|
6189
6214
|
min-height: 100vh;
|
|
6190
6215
|
}
|
|
@@ -6281,6 +6306,9 @@
|
|
|
6281
6306
|
.w-80 {
|
|
6282
6307
|
width: calc(var(--spacing) * 80);
|
|
6283
6308
|
}
|
|
6309
|
+
.w-\[1\.5px\] {
|
|
6310
|
+
width: 1.5px;
|
|
6311
|
+
}
|
|
6284
6312
|
.w-\[5px\] {
|
|
6285
6313
|
width: 5px;
|
|
6286
6314
|
}
|
|
@@ -6344,6 +6372,9 @@
|
|
|
6344
6372
|
.max-w-6xl {
|
|
6345
6373
|
max-width: var(--container-6xl);
|
|
6346
6374
|
}
|
|
6375
|
+
.max-w-7xl {
|
|
6376
|
+
max-width: var(--container-7xl);
|
|
6377
|
+
}
|
|
6347
6378
|
.max-w-16 {
|
|
6348
6379
|
max-width: calc(var(--spacing) * 16);
|
|
6349
6380
|
}
|
|
@@ -6386,6 +6417,9 @@
|
|
|
6386
6417
|
.max-w-\[95vw\] {
|
|
6387
6418
|
max-width: 95vw;
|
|
6388
6419
|
}
|
|
6420
|
+
.max-w-\[200px\] {
|
|
6421
|
+
max-width: 200px;
|
|
6422
|
+
}
|
|
6389
6423
|
.max-w-\[400px\] {
|
|
6390
6424
|
max-width: 400px;
|
|
6391
6425
|
}
|
|
@@ -6677,6 +6711,9 @@
|
|
|
6677
6711
|
.gap-3 {
|
|
6678
6712
|
gap: calc(var(--spacing) * 3);
|
|
6679
6713
|
}
|
|
6714
|
+
.gap-3\.5 {
|
|
6715
|
+
gap: calc(var(--spacing) * 3.5);
|
|
6716
|
+
}
|
|
6680
6717
|
.gap-4 {
|
|
6681
6718
|
gap: calc(var(--spacing) * 4);
|
|
6682
6719
|
}
|
|
@@ -6813,6 +6850,9 @@
|
|
|
6813
6850
|
.gap-y-1 {
|
|
6814
6851
|
row-gap: var(--spacing);
|
|
6815
6852
|
}
|
|
6853
|
+
.gap-y-3\.5 {
|
|
6854
|
+
row-gap: calc(var(--spacing) * 3.5);
|
|
6855
|
+
}
|
|
6816
6856
|
.gap-y-5 {
|
|
6817
6857
|
row-gap: calc(var(--spacing) * 5);
|
|
6818
6858
|
}
|
|
@@ -6850,6 +6890,9 @@
|
|
|
6850
6890
|
border-color: color-mix(in oklab, var(--border) 60%, transparent);
|
|
6851
6891
|
}
|
|
6852
6892
|
}
|
|
6893
|
+
.self-center {
|
|
6894
|
+
align-self: center;
|
|
6895
|
+
}
|
|
6853
6896
|
.truncate {
|
|
6854
6897
|
overflow: hidden;
|
|
6855
6898
|
text-overflow: ellipsis;
|
|
@@ -6873,6 +6916,12 @@
|
|
|
6873
6916
|
.rounded {
|
|
6874
6917
|
border-radius: 0.25rem;
|
|
6875
6918
|
}
|
|
6919
|
+
.rounded-\[2px\] {
|
|
6920
|
+
border-radius: 2px;
|
|
6921
|
+
}
|
|
6922
|
+
.rounded-\[4px\] {
|
|
6923
|
+
border-radius: 4px;
|
|
6924
|
+
}
|
|
6876
6925
|
.rounded-\[20px\] {
|
|
6877
6926
|
border-radius: 20px;
|
|
6878
6927
|
}
|
|
@@ -6894,6 +6943,10 @@
|
|
|
6894
6943
|
.rounded-xl {
|
|
6895
6944
|
border-radius: calc(var(--radius) + 4px);
|
|
6896
6945
|
}
|
|
6946
|
+
.rounded-t-\[3px\] {
|
|
6947
|
+
border-top-left-radius: 3px;
|
|
6948
|
+
border-top-right-radius: 3px;
|
|
6949
|
+
}
|
|
6897
6950
|
.rounded-t-xl {
|
|
6898
6951
|
border-top-left-radius: calc(var(--radius) + 4px);
|
|
6899
6952
|
border-top-right-radius: calc(var(--radius) + 4px);
|
|
@@ -7057,6 +7110,12 @@
|
|
|
7057
7110
|
border-color: color-mix(in oklab, var(--foreground) 40%, transparent);
|
|
7058
7111
|
}
|
|
7059
7112
|
}
|
|
7113
|
+
.border-info\/20 {
|
|
7114
|
+
border-color: var(--info);
|
|
7115
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
7116
|
+
border-color: color-mix(in oklab, var(--info) 20%, transparent);
|
|
7117
|
+
}
|
|
7118
|
+
}
|
|
7060
7119
|
.border-input {
|
|
7061
7120
|
border-color: var(--input);
|
|
7062
7121
|
}
|
|
@@ -7564,6 +7623,9 @@
|
|
|
7564
7623
|
.px-3 {
|
|
7565
7624
|
padding-inline: calc(var(--spacing) * 3);
|
|
7566
7625
|
}
|
|
7626
|
+
.px-3\.5 {
|
|
7627
|
+
padding-inline: calc(var(--spacing) * 3.5);
|
|
7628
|
+
}
|
|
7567
7629
|
.px-4 {
|
|
7568
7630
|
padding-inline: calc(var(--spacing) * 4);
|
|
7569
7631
|
}
|
|
@@ -7606,6 +7668,9 @@
|
|
|
7606
7668
|
.py-3 {
|
|
7607
7669
|
padding-block: calc(var(--spacing) * 3);
|
|
7608
7670
|
}
|
|
7671
|
+
.py-3\.5 {
|
|
7672
|
+
padding-block: calc(var(--spacing) * 3.5);
|
|
7673
|
+
}
|
|
7609
7674
|
.py-4 {
|
|
7610
7675
|
padding-block: calc(var(--spacing) * 4);
|
|
7611
7676
|
}
|
|
@@ -7651,6 +7716,9 @@
|
|
|
7651
7716
|
.pt-1 {
|
|
7652
7717
|
padding-top: var(--spacing);
|
|
7653
7718
|
}
|
|
7719
|
+
.pt-1\.5 {
|
|
7720
|
+
padding-top: calc(var(--spacing) * 1.5);
|
|
7721
|
+
}
|
|
7654
7722
|
.pt-2 {
|
|
7655
7723
|
padding-top: calc(var(--spacing) * 2);
|
|
7656
7724
|
}
|
|
@@ -7678,6 +7746,9 @@
|
|
|
7678
7746
|
.pr-12 {
|
|
7679
7747
|
padding-right: calc(var(--spacing) * 12);
|
|
7680
7748
|
}
|
|
7749
|
+
.pb-0 {
|
|
7750
|
+
padding-bottom: 0px;
|
|
7751
|
+
}
|
|
7681
7752
|
.pb-1 {
|
|
7682
7753
|
padding-bottom: var(--spacing);
|
|
7683
7754
|
}
|
|
@@ -7696,6 +7767,9 @@
|
|
|
7696
7767
|
.pl-2 {
|
|
7697
7768
|
padding-left: calc(var(--spacing) * 2);
|
|
7698
7769
|
}
|
|
7770
|
+
.pl-2\.5 {
|
|
7771
|
+
padding-left: calc(var(--spacing) * 2.5);
|
|
7772
|
+
}
|
|
7699
7773
|
.pl-3 {
|
|
7700
7774
|
padding-left: calc(var(--spacing) * 3);
|
|
7701
7775
|
}
|
|
@@ -7909,6 +7983,12 @@
|
|
|
7909
7983
|
.text-accent-foreground {
|
|
7910
7984
|
color: var(--accent-foreground);
|
|
7911
7985
|
}
|
|
7986
|
+
.text-background {
|
|
7987
|
+
color: var(--background);
|
|
7988
|
+
}
|
|
7989
|
+
.text-card-foreground {
|
|
7990
|
+
color: var(--card-foreground);
|
|
7991
|
+
}
|
|
7912
7992
|
.text-chart-1 {
|
|
7913
7993
|
color: var(--chart-1);
|
|
7914
7994
|
}
|
|
@@ -7942,6 +8022,12 @@
|
|
|
7942
8022
|
.text-info {
|
|
7943
8023
|
color: var(--info);
|
|
7944
8024
|
}
|
|
8025
|
+
.text-info-foreground {
|
|
8026
|
+
color: var(--info-foreground);
|
|
8027
|
+
}
|
|
8028
|
+
.text-muted {
|
|
8029
|
+
color: var(--muted);
|
|
8030
|
+
}
|
|
7945
8031
|
.text-muted-foreground {
|
|
7946
8032
|
color: var(--muted-foreground);
|
|
7947
8033
|
}
|
|
@@ -7975,6 +8061,12 @@
|
|
|
7975
8061
|
color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
|
|
7976
8062
|
}
|
|
7977
8063
|
}
|
|
8064
|
+
.text-muted-foreground\/80 {
|
|
8065
|
+
color: var(--muted-foreground);
|
|
8066
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8067
|
+
color: color-mix(in oklab, var(--muted-foreground) 80%, transparent);
|
|
8068
|
+
}
|
|
8069
|
+
}
|
|
7978
8070
|
.text-popover-foreground {
|
|
7979
8071
|
color: var(--popover-foreground);
|
|
7980
8072
|
}
|
|
@@ -8158,6 +8250,10 @@
|
|
|
8158
8250
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
8159
8251
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
8160
8252
|
}
|
|
8253
|
+
.shadow-xl {
|
|
8254
|
+
--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
8255
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
8256
|
+
}
|
|
8161
8257
|
.shadow-xs {
|
|
8162
8258
|
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
|
|
8163
8259
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -8312,6 +8408,10 @@
|
|
|
8312
8408
|
--tw-duration: 75ms;
|
|
8313
8409
|
transition-duration: 75ms;
|
|
8314
8410
|
}
|
|
8411
|
+
.duration-100 {
|
|
8412
|
+
--tw-duration: 100ms;
|
|
8413
|
+
transition-duration: 100ms;
|
|
8414
|
+
}
|
|
8315
8415
|
.duration-150 {
|
|
8316
8416
|
--tw-duration: 150ms;
|
|
8317
8417
|
transition-duration: 150ms;
|
|
@@ -8429,6 +8529,12 @@
|
|
|
8429
8529
|
.group-hover\:opacity-100:is(:where(.group):hover *) {
|
|
8430
8530
|
opacity: 100%;
|
|
8431
8531
|
}
|
|
8532
|
+
.group-hover\/cell\:opacity-100:is(:where(.group\/cell):hover *) {
|
|
8533
|
+
opacity: 100%;
|
|
8534
|
+
}
|
|
8535
|
+
.group-hover\/node\:opacity-100:is(:where(.group\/node):hover *) {
|
|
8536
|
+
opacity: 100%;
|
|
8537
|
+
}
|
|
8432
8538
|
}
|
|
8433
8539
|
.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *) {
|
|
8434
8540
|
opacity: 100%;
|
|
@@ -8519,6 +8625,22 @@
|
|
|
8519
8625
|
border-color: color-mix(in oklab, var(--muted-foreground) 30%, transparent);
|
|
8520
8626
|
}
|
|
8521
8627
|
}
|
|
8628
|
+
.hover\:border-primary\/40:hover {
|
|
8629
|
+
border-color: var(--primary);
|
|
8630
|
+
}
|
|
8631
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8632
|
+
.hover\:border-primary\/40:hover {
|
|
8633
|
+
border-color: color-mix(in oklab, var(--primary) 40%, transparent);
|
|
8634
|
+
}
|
|
8635
|
+
}
|
|
8636
|
+
.hover\:border-primary\/50:hover {
|
|
8637
|
+
border-color: var(--primary);
|
|
8638
|
+
}
|
|
8639
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8640
|
+
.hover\:border-primary\/50:hover {
|
|
8641
|
+
border-color: color-mix(in oklab, var(--primary) 50%, transparent);
|
|
8642
|
+
}
|
|
8643
|
+
}
|
|
8522
8644
|
.hover\:border-primary\/60:hover {
|
|
8523
8645
|
border-color: var(--primary);
|
|
8524
8646
|
}
|
|
@@ -8624,6 +8746,14 @@
|
|
|
8624
8746
|
background-color: color-mix(in oklab, var(--muted) 60%, transparent);
|
|
8625
8747
|
}
|
|
8626
8748
|
}
|
|
8749
|
+
.hover\:bg-muted\/70:hover {
|
|
8750
|
+
background-color: var(--muted);
|
|
8751
|
+
}
|
|
8752
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8753
|
+
.hover\:bg-muted\/70:hover {
|
|
8754
|
+
background-color: color-mix(in oklab, var(--muted) 70%, transparent);
|
|
8755
|
+
}
|
|
8756
|
+
}
|
|
8627
8757
|
.hover\:bg-primary\/20:hover {
|
|
8628
8758
|
background-color: var(--primary);
|
|
8629
8759
|
}
|
|
@@ -8689,9 +8819,20 @@
|
|
|
8689
8819
|
.hover\:text-foreground:hover {
|
|
8690
8820
|
color: var(--foreground);
|
|
8691
8821
|
}
|
|
8822
|
+
.hover\:text-inherit:hover {
|
|
8823
|
+
color: inherit;
|
|
8824
|
+
}
|
|
8692
8825
|
.hover\:text-primary:hover {
|
|
8693
8826
|
color: var(--primary);
|
|
8694
8827
|
}
|
|
8828
|
+
.hover\:text-primary\/80:hover {
|
|
8829
|
+
color: var(--primary);
|
|
8830
|
+
}
|
|
8831
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8832
|
+
.hover\:text-primary\/80:hover {
|
|
8833
|
+
color: color-mix(in oklab, var(--primary) 80%, transparent);
|
|
8834
|
+
}
|
|
8835
|
+
}
|
|
8695
8836
|
.hover\:text-sidebar-foreground:hover {
|
|
8696
8837
|
color: var(--sidebar-foreground);
|
|
8697
8838
|
}
|
|
@@ -8715,6 +8856,10 @@
|
|
|
8715
8856
|
.hover\:opacity-100:hover {
|
|
8716
8857
|
opacity: 100%;
|
|
8717
8858
|
}
|
|
8859
|
+
.hover\:shadow-md:hover {
|
|
8860
|
+
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
8861
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
8862
|
+
}
|
|
8718
8863
|
.hover\:shadow-sm:hover {
|
|
8719
8864
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
8720
8865
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -8782,6 +8927,18 @@
|
|
|
8782
8927
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
8783
8928
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
8784
8929
|
}
|
|
8930
|
+
.focus-visible\:ring-primary\/20:focus-visible {
|
|
8931
|
+
--tw-ring-color: var(--primary);
|
|
8932
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8933
|
+
--tw-ring-color: color-mix(in oklab, var(--primary) 20%, transparent);
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8936
|
+
.focus-visible\:ring-primary\/40:focus-visible {
|
|
8937
|
+
--tw-ring-color: var(--primary);
|
|
8938
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8939
|
+
--tw-ring-color: color-mix(in oklab, var(--primary) 40%, transparent);
|
|
8940
|
+
}
|
|
8941
|
+
}
|
|
8785
8942
|
.focus-visible\:ring-ring:focus-visible {
|
|
8786
8943
|
--tw-ring-color: var(--ring);
|
|
8787
8944
|
}
|
|
@@ -8802,9 +8959,24 @@
|
|
|
8802
8959
|
.focus-visible\:ring-inset:focus-visible {
|
|
8803
8960
|
--tw-ring-inset: inset;
|
|
8804
8961
|
}
|
|
8962
|
+
.active\:scale-95:active {
|
|
8963
|
+
--tw-scale-x: 95%;
|
|
8964
|
+
--tw-scale-y: 95%;
|
|
8965
|
+
--tw-scale-z: 95%;
|
|
8966
|
+
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
8967
|
+
}
|
|
8805
8968
|
.active\:cursor-grabbing:active {
|
|
8806
8969
|
cursor: grabbing;
|
|
8807
8970
|
}
|
|
8971
|
+
.active\:bg-accent:active {
|
|
8972
|
+
background-color: var(--accent);
|
|
8973
|
+
}
|
|
8974
|
+
.active\:bg-primary\/80:active {
|
|
8975
|
+
background-color: var(--primary);
|
|
8976
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
8977
|
+
background-color: color-mix(in oklab, var(--primary) 80%, transparent);
|
|
8978
|
+
}
|
|
8979
|
+
}
|
|
8808
8980
|
.disabled\:pointer-events-none:disabled {
|
|
8809
8981
|
pointer-events: none;
|
|
8810
8982
|
}
|
|
@@ -8902,6 +9074,9 @@
|
|
|
8902
9074
|
.sm\:inline {
|
|
8903
9075
|
display: inline;
|
|
8904
9076
|
}
|
|
9077
|
+
.sm\:inline-block {
|
|
9078
|
+
display: inline-block;
|
|
9079
|
+
}
|
|
8905
9080
|
.sm\:inline-flex {
|
|
8906
9081
|
display: inline-flex;
|
|
8907
9082
|
}
|
|
@@ -8920,9 +9095,15 @@
|
|
|
8920
9095
|
.sm\:w-7 {
|
|
8921
9096
|
width: calc(var(--spacing) * 7);
|
|
8922
9097
|
}
|
|
9098
|
+
.sm\:w-36 {
|
|
9099
|
+
width: calc(var(--spacing) * 36);
|
|
9100
|
+
}
|
|
8923
9101
|
.sm\:w-80 {
|
|
8924
9102
|
width: calc(var(--spacing) * 80);
|
|
8925
9103
|
}
|
|
9104
|
+
.sm\:w-96 {
|
|
9105
|
+
width: calc(var(--spacing) * 96);
|
|
9106
|
+
}
|
|
8926
9107
|
.sm\:w-\[min\(32rem\,calc\(100vw-3rem\)\)\] {
|
|
8927
9108
|
width: min(32rem, calc(100vw - 3rem));
|
|
8928
9109
|
}
|
|
@@ -9017,6 +9198,9 @@
|
|
|
9017
9198
|
.sm\:p-4 {
|
|
9018
9199
|
padding: calc(var(--spacing) * 4);
|
|
9019
9200
|
}
|
|
9201
|
+
.sm\:p-6 {
|
|
9202
|
+
padding: calc(var(--spacing) * 6);
|
|
9203
|
+
}
|
|
9020
9204
|
.sm\:p-7 {
|
|
9021
9205
|
padding: calc(var(--spacing) * 7);
|
|
9022
9206
|
}
|
|
@@ -9038,6 +9222,9 @@
|
|
|
9038
9222
|
.sm\:py-8 {
|
|
9039
9223
|
padding-block: calc(var(--spacing) * 8);
|
|
9040
9224
|
}
|
|
9225
|
+
.sm\:pt-0 {
|
|
9226
|
+
padding-top: 0px;
|
|
9227
|
+
}
|
|
9041
9228
|
.sm\:pt-6 {
|
|
9042
9229
|
padding-top: calc(var(--spacing) * 6);
|
|
9043
9230
|
}
|
|
@@ -9047,6 +9234,14 @@
|
|
|
9047
9234
|
.sm\:text-right {
|
|
9048
9235
|
text-align: right;
|
|
9049
9236
|
}
|
|
9237
|
+
.sm\:text-2xl {
|
|
9238
|
+
font-size: var(--text-2xl);
|
|
9239
|
+
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
9240
|
+
}
|
|
9241
|
+
.sm\:text-lg {
|
|
9242
|
+
font-size: var(--text-lg);
|
|
9243
|
+
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
9244
|
+
}
|
|
9050
9245
|
.sm\:text-sm {
|
|
9051
9246
|
font-size: var(--text-sm);
|
|
9052
9247
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
@@ -9060,6 +9255,12 @@
|
|
|
9060
9255
|
.md\:col-span-2 {
|
|
9061
9256
|
grid-column: span 2 / span 2;
|
|
9062
9257
|
}
|
|
9258
|
+
.md\:col-span-3 {
|
|
9259
|
+
grid-column: span 3 / span 3;
|
|
9260
|
+
}
|
|
9261
|
+
.md\:col-span-4 {
|
|
9262
|
+
grid-column: span 4 / span 4;
|
|
9263
|
+
}
|
|
9063
9264
|
.md\:hidden {
|
|
9064
9265
|
display: none;
|
|
9065
9266
|
}
|
|
@@ -9069,6 +9270,9 @@
|
|
|
9069
9270
|
.md\:grid-cols-3 {
|
|
9070
9271
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
9071
9272
|
}
|
|
9273
|
+
.md\:grid-cols-4 {
|
|
9274
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
9275
|
+
}
|
|
9072
9276
|
.md\:grid-cols-\[minmax\(0\,1fr\)_180px_160px\] {
|
|
9073
9277
|
grid-template-columns: minmax(0,1fr) 180px 160px;
|
|
9074
9278
|
}
|
|
@@ -9095,6 +9299,12 @@
|
|
|
9095
9299
|
.lg\:col-span-2 {
|
|
9096
9300
|
grid-column: span 2 / span 2;
|
|
9097
9301
|
}
|
|
9302
|
+
.lg\:col-span-3 {
|
|
9303
|
+
grid-column: span 3 / span 3;
|
|
9304
|
+
}
|
|
9305
|
+
.lg\:col-span-4 {
|
|
9306
|
+
grid-column: span 4 / span 4;
|
|
9307
|
+
}
|
|
9098
9308
|
.lg\:flex {
|
|
9099
9309
|
display: flex;
|
|
9100
9310
|
}
|
|
@@ -9190,12 +9400,18 @@
|
|
|
9190
9400
|
}
|
|
9191
9401
|
}
|
|
9192
9402
|
@media (width >= 80rem) {
|
|
9403
|
+
.xl\:col-span-4 {
|
|
9404
|
+
grid-column: span 4 / span 4;
|
|
9405
|
+
}
|
|
9193
9406
|
.xl\:grid-cols-1 {
|
|
9194
9407
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
9195
9408
|
}
|
|
9196
9409
|
.xl\:grid-cols-3 {
|
|
9197
9410
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
9198
9411
|
}
|
|
9412
|
+
.xl\:grid-cols-4 {
|
|
9413
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
9414
|
+
}
|
|
9199
9415
|
.xl\:grid-cols-\[18rem_minmax\(0\,1fr\)\] {
|
|
9200
9416
|
grid-template-columns: 18rem minmax(0,1fr);
|
|
9201
9417
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
const resources = $derived(adminContext.resources.filter((resource) => resource.meta?.['aboutVisible'] !== false));
|
|
12
12
|
const providerNames = $derived(adminContext.getDataProviderNames());
|
|
13
13
|
let { version: suppliedVersion, headingLevel = 'h1' }: { version?: string; headingLevel?: 'h1' | 'h2' } = $props();
|
|
14
|
-
const buildVersion = "0.
|
|
14
|
+
const buildVersion = "0.113.0";
|
|
15
15
|
const version = $derived(suppliedVersion ?? (
|
|
16
16
|
buildVersion.startsWith('__')
|
|
17
17
|
? (i18n.locale === 'zh-CN' ? '开发构建(未提供版本)' : 'Development build (version unavailable)')
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { definedOptions } from '@svadmin/core/options';
|
|
6
6
|
|
|
7
7
|
import { captureAdminContext, captureAuthSession, useResourceContract, getContractFormFields, deriveValidator, useNavigation, useCan, useForm, parseQueryKey } from '@svadmin/core';
|
|
8
|
+
import { resolveDeclaredFieldLayout } from '@svadmin/core/schema-form';
|
|
8
9
|
import { useQueryClient } from '@tanstack/svelte-query';
|
|
9
10
|
import { slide } from 'svelte/transition';
|
|
10
11
|
import { untrack } from 'svelte';
|
|
@@ -17,6 +18,14 @@
|
|
|
17
18
|
import { Badge } from './ui/badge/index.js';
|
|
18
19
|
import { Save, ArrowLeft, Loader2, AlertCircle } from '@lucide/svelte';
|
|
19
20
|
import FieldRenderer from './FieldRenderer.svelte';
|
|
21
|
+
import {
|
|
22
|
+
buildFormGroups,
|
|
23
|
+
buildSpanByKey,
|
|
24
|
+
gridClassFor,
|
|
25
|
+
isFullWidthField,
|
|
26
|
+
spanClass,
|
|
27
|
+
type FormLayoutGroup,
|
|
28
|
+
} from './auto-form-layout.js';
|
|
20
29
|
import type { UploadCancelHandler, UploadHandler } from './file-upload-types.js';
|
|
21
30
|
import * as Alert from './ui/alert/index.js';
|
|
22
31
|
import { Skeleton } from './ui/skeleton/index.js';
|
|
@@ -132,38 +141,17 @@
|
|
|
132
141
|
return true;
|
|
133
142
|
}));
|
|
134
143
|
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const order: string[] = [];
|
|
139
|
-
const map = new Map<string, FieldDefinition[]>();
|
|
140
|
-
for (const f of formFields) {
|
|
141
|
-
const g = f.group ?? '';
|
|
142
|
-
if (!map.has(g)) { order.push(g); map.set(g, []); }
|
|
143
|
-
(map.get(g) ?? []).push(f);
|
|
144
|
-
}
|
|
145
|
-
return order.map(g => ({ name: g, fields: map.get(g) ?? [] }));
|
|
146
|
-
})());
|
|
147
|
-
|
|
148
|
-
const gridClass = $derived(
|
|
149
|
-
columns === 4
|
|
150
|
-
? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4'
|
|
151
|
-
: columns === 3
|
|
152
|
-
? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4'
|
|
153
|
-
: columns === 2
|
|
154
|
-
? 'grid grid-cols-1 md:grid-cols-2 gap-4'
|
|
155
|
-
: 'space-y-5'
|
|
156
|
-
);
|
|
144
|
+
const declarativeLayout = $derived(resolveDeclaredFieldLayout(formFields));
|
|
145
|
+
const spanByKey = $derived(buildSpanByKey(declarativeLayout));
|
|
146
|
+
const effectiveColumns = $derived(declarativeLayout?.kind === 'flat' ? declarativeLayout.columns : columns);
|
|
157
147
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
);
|
|
166
|
-
}
|
|
148
|
+
const groups = $derived.by((): FormLayoutGroup[] => buildFormGroups({
|
|
149
|
+
layout: declarativeLayout,
|
|
150
|
+
fields: formFields,
|
|
151
|
+
columns,
|
|
152
|
+
}));
|
|
153
|
+
const hasGroups = $derived(groups.length > 0);
|
|
154
|
+
const gridClass = $derived(gridClassFor(effectiveColumns));
|
|
167
155
|
|
|
168
156
|
// ─── Default values from field metadata ───────────────────────────
|
|
169
157
|
function getDefaultForType(field: FieldDefinition): unknown {
|
|
@@ -639,10 +627,11 @@
|
|
|
639
627
|
{#if group.name}
|
|
640
628
|
<Card.Header>
|
|
641
629
|
<Card.Title class="text-lg">{group.name}</Card.Title>
|
|
630
|
+
{#if group.description}<p class="text-[11px] text-muted-foreground">{group.description}</p>{/if}
|
|
642
631
|
</Card.Header>
|
|
643
632
|
{/if}
|
|
644
633
|
<Card.Content class="px-4 sm:px-6 pb-4 sm:pb-6 pt-0">
|
|
645
|
-
<div class={
|
|
634
|
+
<div class={gridClassFor(group.columns)} data-svadmin-form-grid data-columns={group.columns}>
|
|
646
635
|
{#each group.fields as field (field.key)}
|
|
647
636
|
{@const customField = fields?.[field.key]}
|
|
648
637
|
<div
|
|
@@ -650,7 +639,7 @@
|
|
|
650
639
|
data-svadmin-field-key={field.key}
|
|
651
640
|
data-svadmin-field={field.key}
|
|
652
641
|
data-svadmin-field-type={field.type}
|
|
653
|
-
class={cn(columns > 1 && isFullWidthField(field) && 'col-span-full', !!form.errors[field.key] && 'border-destructive')}
|
|
642
|
+
class={cn(group.columns > 1 && isFullWidthField(field) && 'col-span-full', spanClass(spanByKey.get(field.key)), !!form.errors[field.key] && 'border-destructive')}
|
|
654
643
|
>
|
|
655
644
|
{#if customField}
|
|
656
645
|
{@render customField({
|
|
@@ -688,7 +677,7 @@
|
|
|
688
677
|
{:else}
|
|
689
678
|
<Card.Root class="border-border/40 shadow-sm">
|
|
690
679
|
<Card.Content class="px-4 pt-5 pb-4 sm:px-6 sm:pt-6 sm:pb-6">
|
|
691
|
-
<div class={gridClass} data-svadmin-form-grid data-columns={
|
|
680
|
+
<div class={gridClass} data-svadmin-form-grid data-columns={effectiveColumns}>
|
|
692
681
|
{#each formFields as field (field.key)}
|
|
693
682
|
{@const customField = fields?.[field.key]}
|
|
694
683
|
<div
|
|
@@ -696,7 +685,7 @@
|
|
|
696
685
|
data-svadmin-field-key={field.key}
|
|
697
686
|
data-svadmin-field={field.key}
|
|
698
687
|
data-svadmin-field-type={field.type}
|
|
699
|
-
class={cn(
|
|
688
|
+
class={cn(effectiveColumns > 1 && isFullWidthField(field) && 'col-span-full', spanClass(spanByKey.get(field.key)), !!form.errors[field.key] && 'border-destructive')}
|
|
700
689
|
>
|
|
701
690
|
{#if customField}
|
|
702
691
|
{@render customField({
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
export interface FormDependencyProps {
|
|
5
|
+
/** Field name or list of field names to observe */
|
|
6
|
+
name: string | string[];
|
|
7
|
+
/** Form values dictionary containing monitored field keys */
|
|
8
|
+
values?: Record<string, unknown>;
|
|
9
|
+
/** Render snippet invoked with the watched subset of values */
|
|
10
|
+
children?: Snippet<[Record<string, unknown>]>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
name,
|
|
15
|
+
values = {},
|
|
16
|
+
children,
|
|
17
|
+
}: FormDependencyProps = $props();
|
|
18
|
+
|
|
19
|
+
let watched = $derived.by(() => {
|
|
20
|
+
const names = Array.isArray(name) ? name : [name];
|
|
21
|
+
const subset: Record<string, unknown> = {};
|
|
22
|
+
for (const key of names) {
|
|
23
|
+
subset[key] = values[key];
|
|
24
|
+
}
|
|
25
|
+
return subset;
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
data-svadmin-component="FormDependency"
|
|
31
|
+
class="svadmin-form-dependency contents"
|
|
32
|
+
>
|
|
33
|
+
{#if children}
|
|
34
|
+
{@render children(watched)}
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
export interface FormDependencyProps {
|
|
3
|
+
/** Field name or list of field names to observe */
|
|
4
|
+
name: string | string[];
|
|
5
|
+
/** Form values dictionary containing monitored field keys */
|
|
6
|
+
values?: Record<string, unknown>;
|
|
7
|
+
/** Render snippet invoked with the watched subset of values */
|
|
8
|
+
children?: Snippet<[Record<string, unknown>]>;
|
|
9
|
+
}
|
|
10
|
+
declare const FormDependency: import("svelte").Component<FormDependencyProps, {}, "">;
|
|
11
|
+
type FormDependency = ReturnType<typeof FormDependency>;
|
|
12
|
+
export default FormDependency;
|