@svadmin/ui 0.120.0 → 0.122.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 +336 -7
- package/dist/app.theme.css +336 -7
- package/dist/components/AboutSettings.svelte +1 -1
- package/dist/components/AnnouncementBanner.svelte +314 -0
- package/dist/components/AnnouncementBanner.svelte.d.ts +45 -0
- package/dist/components/AsyncExportModal.svelte +551 -0
- package/dist/components/AsyncExportModal.svelte.d.ts +50 -0
- package/dist/components/AudioFeedbackProvider.svelte +131 -0
- package/dist/components/AudioFeedbackProvider.svelte.d.ts +11 -0
- package/dist/components/AuditLogViewer.svelte +1 -1
- package/dist/components/CanvasAnnotation.svelte +1 -1
- package/dist/components/ColumnFilterBuilder.svelte +135 -0
- package/dist/components/ColumnFilterBuilder.svelte.d.ts +20 -0
- package/dist/components/ColumnSettings.svelte +1 -1
- package/dist/components/ColumnVisibilityDrawer.svelte +541 -0
- package/dist/components/ColumnVisibilityDrawer.svelte.d.ts +16 -0
- package/dist/components/ConcurrentConflictModal.svelte +7 -7
- package/dist/components/ContextMenu.svelte +268 -0
- package/dist/components/ContextMenu.svelte.d.ts +22 -0
- package/dist/components/ConversionFunnel.svelte +154 -0
- package/dist/components/ConversionFunnel.svelte.d.ts +22 -0
- package/dist/components/CronExpressionBuilder.svelte +1 -1
- package/dist/components/DecisionTable.svelte +1 -1
- package/dist/components/DevTools.svelte +1 -1
- package/dist/components/DraggableRowTable.svelte +1 -1
- package/dist/components/DualApprovalGate.svelte +418 -0
- package/dist/components/DualApprovalGate.svelte.d.ts +39 -0
- package/dist/components/EditableTable.svelte +1 -1
- package/dist/components/ExcelImportWizard.svelte +2 -2
- package/dist/components/GlobalShortcuts.svelte +1 -1
- package/dist/components/ImageCropper.svelte +1 -1
- package/dist/components/ImportWizard.svelte +1 -1
- package/dist/components/JsonSchemaForm.svelte +1 -1
- package/dist/components/JsonViewer.svelte +323 -0
- package/dist/components/JsonViewer.svelte.d.ts +20 -0
- package/dist/components/KeyboardShortcutsModal.svelte +362 -0
- package/dist/components/KeyboardShortcutsModal.svelte.d.ts +22 -0
- package/dist/components/KpiCard.svelte +250 -0
- package/dist/components/KpiCard.svelte.d.ts +44 -0
- package/dist/components/MasterDetailView.svelte +1 -1
- package/dist/components/MetricGrid.svelte +2 -2
- package/dist/components/MicroAppBridge.svelte +59 -0
- package/dist/components/MicroAppBridge.svelte.d.ts +11 -0
- package/dist/components/OfflineSyncBanner.svelte +1 -1
- package/dist/components/OrgChart.svelte +1 -1
- package/dist/components/OrgTreePicker.svelte +1 -1
- package/dist/components/OtpInput.svelte +209 -0
- package/dist/components/OtpInput.svelte.d.ts +17 -0
- package/dist/components/PdfDocumentViewer.svelte +2 -2
- package/dist/components/PivotDrilldownModal.svelte +6 -6
- package/dist/components/PivotTable.svelte +1 -1
- package/dist/components/PricingCard.svelte +1 -1
- package/dist/components/PricingTable.svelte +1 -1
- package/dist/components/PrintableBill.svelte +2 -2
- package/dist/components/PrintableReportLayout.svelte +259 -0
- package/dist/components/PrintableReportLayout.svelte.d.ts +32 -0
- package/dist/components/ProSkeleton.svelte +6 -6
- package/dist/components/RecordCompareModal.svelte +428 -0
- package/dist/components/RecordCompareModal.svelte.d.ts +42 -0
- package/dist/components/ResultPage.svelte +166 -0
- package/dist/components/ResultPage.svelte.d.ts +28 -0
- package/dist/components/SafeDeleteConfirm.svelte +5 -5
- package/dist/components/SankeyChart.svelte +111 -0
- package/dist/components/SankeyChart.svelte.d.ts +22 -0
- package/dist/components/SchemaVisualModeler.svelte +336 -0
- package/dist/components/SchemaVisualModeler.svelte.d.ts +17 -0
- package/dist/components/SensitiveDataMask.svelte +81 -22
- package/dist/components/SensitiveDataMask.svelte.d.ts +15 -10
- package/dist/components/SessionTimeoutGuard.svelte +154 -0
- package/dist/components/SessionTimeoutGuard.svelte.d.ts +25 -0
- package/dist/components/SignaturePad.svelte +231 -67
- package/dist/components/SignaturePad.svelte.d.ts +6 -5
- package/dist/components/SliderCaptcha.svelte +1 -1
- package/dist/components/SplitPaneLayout.svelte +1 -1
- package/dist/components/SpreadsheetView.svelte +1 -1
- package/dist/components/StepForm.svelte +1 -1
- package/dist/components/StepWizard.svelte +513 -0
- package/dist/components/StepWizard.svelte.d.ts +49 -0
- package/dist/components/TableClipboardManager.svelte +307 -0
- package/dist/components/TableClipboardManager.svelte.d.ts +13 -0
- package/dist/components/TaskCenter.svelte +9 -9
- package/dist/components/TextDiffViewer.svelte +613 -0
- package/dist/components/TextDiffViewer.svelte.d.ts +39 -0
- package/dist/components/Tour.svelte +71 -13
- package/dist/components/Tour.svelte.d.ts +1 -1
- package/dist/components/TreeTransfer.svelte +1 -1
- package/dist/components/TrendIndicator.svelte +21 -13
- package/dist/components/TrendIndicator.svelte.d.ts +4 -2
- package/dist/components/UnsavedChangesGuard.svelte +138 -0
- package/dist/components/UnsavedChangesGuard.svelte.d.ts +32 -0
- package/dist/components/UsageCard.svelte +1 -1
- package/dist/components/VersionDiffViewer.svelte +1 -1
- package/dist/components/VirtualTable.svelte +1 -1
- package/dist/components/VirtualTreeSelect.svelte +1 -1
- package/dist/components/WatermarkContainer.svelte +196 -0
- package/dist/components/WatermarkContainer.svelte.d.ts +20 -0
- package/dist/components/WorkflowDesigner.svelte +3 -3
- package/dist/components/WorkflowProcessCard.svelte +1 -1
- package/dist/components/WorkflowStepper.svelte +250 -0
- package/dist/components/WorkflowStepper.svelte.d.ts +27 -0
- package/dist/components/charts/GaugeChart.svelte +1 -1
- package/dist/components/useAudioAlert.d.svelte.ts +1 -0
- package/dist/components/useAudioAlert.svelte.d.ts +13 -0
- package/dist/components/useAudioAlert.svelte.js +90 -0
- package/dist/components/useHotkeys.d.svelte.ts +1 -0
- package/dist/components/useHotkeys.svelte.d.ts +44 -0
- package/dist/components/useHotkeys.svelte.js +190 -0
- package/dist/components/useMicroAppEvent.d.svelte.ts +1 -0
- package/dist/components/useMicroAppEvent.svelte.d.ts +16 -0
- package/dist/components/useMicroAppEvent.svelte.js +61 -0
- package/dist/components/usePrintExport.d.svelte.ts +1 -0
- package/dist/components/usePrintExport.svelte.d.ts +11 -0
- package/dist/components/usePrintExport.svelte.js +45 -0
- package/dist/components/useSessionTimeout.d.svelte.ts +1 -0
- package/dist/components/useSessionTimeout.svelte.d.ts +28 -0
- package/dist/components/useSessionTimeout.svelte.js +182 -0
- package/dist/components/useTableClipboard.d.svelte.ts +1 -0
- package/dist/components/useTableClipboard.svelte.d.ts +28 -0
- package/dist/components/useTableClipboard.svelte.js +116 -0
- package/dist/components/useUnsavedChanges.d.svelte.ts +1 -0
- package/dist/components/useUnsavedChanges.svelte.d.ts +22 -0
- package/dist/components/useUnsavedChanges.svelte.js +105 -0
- package/dist/index.d.ts +47 -28
- package/dist/index.js +49 -2
- package/package.json +1 -1
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
>
|
|
126
126
|
{#each Array(skeletonCount) as _, i (i)}
|
|
127
127
|
<div
|
|
128
|
-
class="flex flex-col justify-between rounded-
|
|
128
|
+
class="flex flex-col justify-between rounded-md border border-border bg-card p-5 shadow-sm space-y-3"
|
|
129
129
|
>
|
|
130
130
|
<div class="flex items-center justify-between">
|
|
131
131
|
<Skeleton class="h-4 w-28" />
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
{:else}
|
|
148
148
|
<div
|
|
149
149
|
data-slot="metric-grid-empty"
|
|
150
|
-
class="flex flex-col items-center justify-center rounded-
|
|
150
|
+
class="flex flex-col items-center justify-center rounded-md border border-dashed border-border bg-card/50 p-8 text-center text-muted-foreground"
|
|
151
151
|
>
|
|
152
152
|
<p class="text-sm font-medium">{emptyMessage}</p>
|
|
153
153
|
</div>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack, type Snippet } from 'svelte';
|
|
3
|
+
import { useTranslation } from '@svadmin/core/i18n';
|
|
4
|
+
import { cn } from '../utils.js';
|
|
5
|
+
import { useMicroAppEvent } from './useMicroAppEvent.svelte.js';
|
|
6
|
+
|
|
7
|
+
export interface MicroAppBridgeProps {
|
|
8
|
+
channel?: string | undefined;
|
|
9
|
+
allowedOrigins?: string[] | undefined;
|
|
10
|
+
appId?: string | undefined;
|
|
11
|
+
class?: string | undefined;
|
|
12
|
+
children?: Snippet | undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
channel = 'svadmin_microapp',
|
|
17
|
+
allowedOrigins = ['*'],
|
|
18
|
+
appId = 'main-bridge',
|
|
19
|
+
class: className = '',
|
|
20
|
+
children,
|
|
21
|
+
}: MicroAppBridgeProps = $props();
|
|
22
|
+
|
|
23
|
+
const i18n = useTranslation();
|
|
24
|
+
|
|
25
|
+
const bridge = useMicroAppEvent({
|
|
26
|
+
channel: untrack(() => channel),
|
|
27
|
+
allowedOrigins: untrack(() => allowedOrigins),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
bridge.on('PING', (_, event) => {
|
|
31
|
+
if (event.source && typeof (event.source as Window).postMessage === 'function') {
|
|
32
|
+
bridge.emit('PONG', { appId, status: 'ready' }, event.source as Window);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
bridge.on('SYNC_REQUEST', (_, event) => {
|
|
37
|
+
if (event.source && typeof (event.source as Window).postMessage === 'function') {
|
|
38
|
+
bridge.emit(
|
|
39
|
+
'SYNC_RESPONSE',
|
|
40
|
+
{
|
|
41
|
+
locale: i18n.locale,
|
|
42
|
+
timestamp: Date.now(),
|
|
43
|
+
},
|
|
44
|
+
event.source as Window,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div
|
|
51
|
+
data-svadmin-component="MicroAppBridge"
|
|
52
|
+
data-app-id={appId}
|
|
53
|
+
data-channel={channel}
|
|
54
|
+
class={cn('relative w-full', className)}
|
|
55
|
+
>
|
|
56
|
+
{#if children}
|
|
57
|
+
{@render children()}
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Snippet } from 'svelte';
|
|
2
|
+
export interface MicroAppBridgeProps {
|
|
3
|
+
channel?: string | undefined;
|
|
4
|
+
allowedOrigins?: string[] | undefined;
|
|
5
|
+
appId?: string | undefined;
|
|
6
|
+
class?: string | undefined;
|
|
7
|
+
children?: Snippet | undefined;
|
|
8
|
+
}
|
|
9
|
+
declare const MicroAppBridge: import("svelte").Component<MicroAppBridgeProps, {}, "">;
|
|
10
|
+
type MicroAppBridge = ReturnType<typeof MicroAppBridge>;
|
|
11
|
+
export default MicroAppBridge;
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
{#if !isOnline || pendingMutations.length > 0}
|
|
79
79
|
<div
|
|
80
80
|
class={cn(
|
|
81
|
-
'rounded-
|
|
81
|
+
'rounded-md border shadow-xs text-xs p-3 transition-all',
|
|
82
82
|
!isOnline
|
|
83
83
|
? 'bg-warning/15 border-warning/30 text-warning-foreground'
|
|
84
84
|
: 'bg-muted/40 border-border/80 text-foreground',
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
role="button"
|
|
76
76
|
tabindex="0"
|
|
77
77
|
class={cn(
|
|
78
|
-
'group relative flex items-center gap-3 rounded-
|
|
78
|
+
'group relative flex items-center gap-3 rounded-md border border-border bg-card p-3 shadow-xs transition-all cursor-pointer',
|
|
79
79
|
'hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5 select-none min-w-[200px] max-w-[260px]'
|
|
80
80
|
)}
|
|
81
81
|
onclick={() => onnodeclick?.(node)}
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<div
|
|
134
134
|
data-svadmin-component="OrgTreePicker"
|
|
135
135
|
class={cn(
|
|
136
|
-
'flex flex-col lg:flex-row items-stretch border border-border rounded-
|
|
136
|
+
'flex flex-col lg:flex-row items-stretch border border-border rounded-md bg-card text-card-foreground shadow-xs overflow-hidden h-[540px]',
|
|
137
137
|
className,
|
|
138
138
|
)}
|
|
139
139
|
>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { cn } from '../utils.js';
|
|
4
|
+
|
|
5
|
+
export interface OtpInputProps {
|
|
6
|
+
length?: number;
|
|
7
|
+
value?: string | string[];
|
|
8
|
+
type?: 'number' | 'text' | 'alphanumeric';
|
|
9
|
+
mask?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
class?: string;
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
onchange?: (value: string) => void;
|
|
17
|
+
oncomplete?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let {
|
|
21
|
+
length = 6,
|
|
22
|
+
value = $bindable(''),
|
|
23
|
+
type = 'alphanumeric',
|
|
24
|
+
mask = false,
|
|
25
|
+
disabled = false,
|
|
26
|
+
error = false,
|
|
27
|
+
autoFocus = false,
|
|
28
|
+
size = 'md',
|
|
29
|
+
class: className = '',
|
|
30
|
+
'aria-label': groupAriaLabel = 'OTP verification code input',
|
|
31
|
+
onchange,
|
|
32
|
+
oncomplete,
|
|
33
|
+
}: OtpInputProps = $props();
|
|
34
|
+
|
|
35
|
+
let digits = $state<string[]>([]);
|
|
36
|
+
const inputRefs: (HTMLInputElement | null)[] = [];
|
|
37
|
+
|
|
38
|
+
function registerInput(node: HTMLInputElement, index: number) {
|
|
39
|
+
inputRefs[index] = node;
|
|
40
|
+
return {
|
|
41
|
+
destroy() {
|
|
42
|
+
if (inputRefs[index] === node) {
|
|
43
|
+
inputRefs[index] = null;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function isValidChar(char: string): boolean {
|
|
50
|
+
if (type === 'number') {
|
|
51
|
+
return /^[0-9]$/.test(char);
|
|
52
|
+
}
|
|
53
|
+
if (type === 'alphanumeric') {
|
|
54
|
+
return /^[a-zA-Z0-9]$/.test(char);
|
|
55
|
+
}
|
|
56
|
+
return char.length === 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getRawStringValue(): string {
|
|
60
|
+
if (Array.isArray(value)) {
|
|
61
|
+
return value.join('');
|
|
62
|
+
}
|
|
63
|
+
return value || '';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function syncFromValue() {
|
|
67
|
+
const raw = getRawStringValue();
|
|
68
|
+
const chars = raw.split('').slice(0, length);
|
|
69
|
+
const newDigits = Array.from({ length }, (_, i) => chars[i] || '');
|
|
70
|
+
digits = newDigits;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function notifyChange() {
|
|
74
|
+
const combined = digits.join('');
|
|
75
|
+
if (Array.isArray(value)) {
|
|
76
|
+
value = [...digits];
|
|
77
|
+
} else {
|
|
78
|
+
value = combined;
|
|
79
|
+
}
|
|
80
|
+
onchange?.(combined);
|
|
81
|
+
if (combined.length === length && digits.every((d) => d !== '')) {
|
|
82
|
+
oncomplete?.(combined);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function handleInput(e: Event, index: number) {
|
|
87
|
+
const input = e.target as HTMLInputElement;
|
|
88
|
+
const rawVal = input.value;
|
|
89
|
+
const char = rawVal.slice(-1);
|
|
90
|
+
|
|
91
|
+
if (char && isValidChar(char)) {
|
|
92
|
+
digits[index] = char;
|
|
93
|
+
if (index < length - 1) {
|
|
94
|
+
inputRefs[index + 1]?.focus();
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
digits[index] = '';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
notifyChange();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function handleKeyDown(e: KeyboardEvent, index: number) {
|
|
104
|
+
if (e.key === 'Backspace') {
|
|
105
|
+
if (digits[index] !== '') {
|
|
106
|
+
digits[index] = '';
|
|
107
|
+
notifyChange();
|
|
108
|
+
} else if (index > 0) {
|
|
109
|
+
digits[index - 1] = '';
|
|
110
|
+
inputRefs[index - 1]?.focus();
|
|
111
|
+
notifyChange();
|
|
112
|
+
}
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
} else if (e.key === 'ArrowLeft') {
|
|
115
|
+
if (index > 0) {
|
|
116
|
+
inputRefs[index - 1]?.focus();
|
|
117
|
+
e.preventDefault();
|
|
118
|
+
}
|
|
119
|
+
} else if (e.key === 'ArrowRight') {
|
|
120
|
+
if (index < length - 1) {
|
|
121
|
+
inputRefs[index + 1]?.focus();
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function handlePaste(e: ClipboardEvent) {
|
|
128
|
+
e.preventDefault();
|
|
129
|
+
const pastedText = e.clipboardData?.getData('text') || '';
|
|
130
|
+
if (!pastedText) return;
|
|
131
|
+
|
|
132
|
+
let validChars = '';
|
|
133
|
+
for (const char of pastedText) {
|
|
134
|
+
if (isValidChar(char)) {
|
|
135
|
+
validChars += char;
|
|
136
|
+
if (validChars.length === length) break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (!validChars) return;
|
|
141
|
+
|
|
142
|
+
const newDigits = [...digits];
|
|
143
|
+
for (let i = 0; i < length; i++) {
|
|
144
|
+
const char = validChars[i];
|
|
145
|
+
if (char) {
|
|
146
|
+
newDigits[i] = char;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
digits = newDigits;
|
|
150
|
+
notifyChange();
|
|
151
|
+
|
|
152
|
+
const nextIndex = Math.min(validChars.length, length - 1);
|
|
153
|
+
inputRefs[nextIndex]?.focus();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
$effect(() => {
|
|
157
|
+
const raw = getRawStringValue();
|
|
158
|
+
if (digits.length !== length || raw !== digits.join('')) {
|
|
159
|
+
syncFromValue();
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
onMount(() => {
|
|
164
|
+
syncFromValue();
|
|
165
|
+
if (autoFocus && inputRefs[0]) {
|
|
166
|
+
inputRefs[0].focus();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const sizeClasses = {
|
|
171
|
+
sm: 'h-7 w-7 text-xs',
|
|
172
|
+
md: 'h-8 w-8 text-sm',
|
|
173
|
+
lg: 'h-9 w-9 text-base',
|
|
174
|
+
};
|
|
175
|
+
</script>
|
|
176
|
+
|
|
177
|
+
<div
|
|
178
|
+
class={cn('inline-flex items-center gap-2', className)}
|
|
179
|
+
data-svadmin-component="OtpInput"
|
|
180
|
+
role="group"
|
|
181
|
+
aria-label={groupAriaLabel}
|
|
182
|
+
>
|
|
183
|
+
{#each digits as digit, index (index)}
|
|
184
|
+
<input
|
|
185
|
+
use:registerInput={index}
|
|
186
|
+
type={mask ? 'password' : 'text'}
|
|
187
|
+
inputmode={type === 'number' ? 'numeric' : 'text'}
|
|
188
|
+
pattern={type === 'number' ? '[0-9]*' : undefined}
|
|
189
|
+
maxlength={1}
|
|
190
|
+
value={digit}
|
|
191
|
+
{disabled}
|
|
192
|
+
aria-label={`Digit ${index + 1} of ${length}`}
|
|
193
|
+
aria-invalid={error ? 'true' : undefined}
|
|
194
|
+
class={cn(
|
|
195
|
+
'rounded-sm border text-center font-mono font-semibold transition-all outline-none',
|
|
196
|
+
'focus:border-primary focus:ring-2 focus:ring-primary/20',
|
|
197
|
+
sizeClasses[size],
|
|
198
|
+
error
|
|
199
|
+
? 'border-destructive text-destructive focus:ring-destructive'
|
|
200
|
+
: 'border-input bg-background text-foreground',
|
|
201
|
+
disabled ? 'cursor-not-allowed bg-muted opacity-50' : 'cursor-text'
|
|
202
|
+
)}
|
|
203
|
+
oninput={(e) => handleInput(e, index)}
|
|
204
|
+
onkeydown={(e) => handleKeyDown(e, index)}
|
|
205
|
+
onpaste={handlePaste}
|
|
206
|
+
onfocus={(e) => (e.target as HTMLInputElement).select()}
|
|
207
|
+
/>
|
|
208
|
+
{/each}
|
|
209
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface OtpInputProps {
|
|
2
|
+
length?: number;
|
|
3
|
+
value?: string | string[];
|
|
4
|
+
type?: 'number' | 'text' | 'alphanumeric';
|
|
5
|
+
mask?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
autoFocus?: boolean;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
class?: string;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
onchange?: (value: string) => void;
|
|
13
|
+
oncomplete?: (value: string) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const OtpInput: import("svelte").Component<OtpInputProps, {}, "value">;
|
|
16
|
+
type OtpInput = ReturnType<typeof OtpInput>;
|
|
17
|
+
export default OtpInput;
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
|
|
119
119
|
<div
|
|
120
120
|
class={cn(
|
|
121
|
-
'flex flex-col rounded-
|
|
122
|
-
isFullscreen ? 'fixed inset-4 z-50 shadow-
|
|
121
|
+
'flex flex-col rounded-md border border-border bg-card shadow-xs text-xs overflow-hidden transition-all',
|
|
122
|
+
isFullscreen ? 'fixed inset-4 z-50 shadow-[var(--shadow-overlay)]' : 'min-h-[500px]',
|
|
123
123
|
className
|
|
124
124
|
)}
|
|
125
125
|
>
|
|
@@ -83,17 +83,17 @@
|
|
|
83
83
|
>
|
|
84
84
|
<div
|
|
85
85
|
class={cn(
|
|
86
|
-
'flex flex-col bg-card border border-border text-card-foreground shadow-
|
|
86
|
+
'flex flex-col bg-card border border-border text-card-foreground shadow-[var(--shadow-overlay)] transition-all duration-200 overflow-hidden',
|
|
87
87
|
isFullscreen
|
|
88
|
-
? 'fixed inset-2 rounded-
|
|
89
|
-
: 'w-full max-w-4xl max-h-[85vh] rounded-
|
|
88
|
+
? 'fixed inset-2 rounded-md'
|
|
89
|
+
: 'w-full max-w-4xl max-h-[85vh] rounded-md',
|
|
90
90
|
className,
|
|
91
91
|
)}
|
|
92
92
|
>
|
|
93
93
|
<!-- 弹窗顶栏 -->
|
|
94
94
|
<div class="flex items-center justify-between border-b border-border px-5 py-4 bg-muted/20">
|
|
95
95
|
<div class="flex items-center gap-2.5">
|
|
96
|
-
<div class="flex h-8 w-8 items-center justify-center rounded-
|
|
96
|
+
<div class="flex h-8 w-8 items-center justify-center rounded-sm bg-primary/10 text-primary">
|
|
97
97
|
<TableProperties size={18} />
|
|
98
98
|
</div>
|
|
99
99
|
<div>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
|
|
177
177
|
<!-- 明细表格主体 -->
|
|
178
178
|
<div class="flex-1 overflow-auto p-4">
|
|
179
|
-
<div class="rounded-
|
|
179
|
+
<div class="rounded-md border border-border overflow-hidden">
|
|
180
180
|
<table class="w-full text-xs text-left whitespace-nowrap">
|
|
181
181
|
<thead class="bg-muted/40 border-b border-border text-muted-foreground font-semibold sticky top-0">
|
|
182
182
|
<tr>
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
</span>
|
|
218
218
|
<button
|
|
219
219
|
type="button"
|
|
220
|
-
class="px-4 py-1.5 rounded-
|
|
220
|
+
class="px-4 py-1.5 rounded-md border border-border bg-background text-xs font-medium hover:bg-muted transition-colors cursor-pointer"
|
|
221
221
|
onclick={handleClose}
|
|
222
222
|
>
|
|
223
223
|
关闭
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
</script>
|
|
222
222
|
|
|
223
|
-
<div aria-busy={effectiveLoading} class={cn('rounded-
|
|
223
|
+
<div aria-busy={effectiveLoading} class={cn('rounded-md border border-border bg-card p-4 shadow-xs text-xs space-y-3', className)}>
|
|
224
224
|
<div class="flex items-center justify-between gap-2 pb-2 border-b border-border/60">
|
|
225
225
|
<div class="font-semibold text-foreground">
|
|
226
226
|
{i18n.t('pivot.title')} <span class="text-muted-foreground font-normal">({rowLabel} × {columnLabel})</span>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
<div
|
|
69
69
|
class={cn(
|
|
70
|
-
'relative flex flex-col rounded-
|
|
70
|
+
'relative flex flex-col rounded-md border p-6 transition-all duration-200',
|
|
71
71
|
'bg-card text-card-foreground',
|
|
72
72
|
highlighted
|
|
73
73
|
? 'border-primary shadow-lg ring-1 ring-primary'
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
<!-- Detailed Feature Comparison Table (Optional) -->
|
|
123
123
|
{#if comparisonGroups.length > 0}
|
|
124
|
-
<div class="overflow-x-auto rounded-
|
|
124
|
+
<div class="overflow-x-auto rounded-md border border-border bg-card p-6 shadow-sm">
|
|
125
125
|
<div class="mb-6">
|
|
126
126
|
<h3 class="text-lg font-bold tracking-tight text-foreground">Feature Comparison</h3>
|
|
127
127
|
<p class="text-sm text-muted-foreground">Compare features across all subscription plans</p>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<div class={cn('space-y-4 text-xs', className)}>
|
|
58
58
|
<!-- Print Trigger Bar (Hidden during actual print) -->
|
|
59
|
-
<div class="flex items-center justify-between p-3 rounded-
|
|
59
|
+
<div class="flex items-center justify-between p-3 rounded-md border border-border bg-card shadow-xs print:hidden">
|
|
60
60
|
<div class="text-muted-foreground">
|
|
61
61
|
Document Ready: <strong class="text-foreground">{billNumber}</strong>
|
|
62
62
|
</div>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
69
|
<!-- Printable A4 Paper Container -->
|
|
70
|
-
<div class="rounded-
|
|
70
|
+
<div class="rounded-md border border-border bg-card p-8 shadow-xs max-w-3xl mx-auto space-y-6 print:border-none print:shadow-none print:p-0 print:m-0">
|
|
71
71
|
<!-- Header -->
|
|
72
72
|
<div class="flex items-start justify-between border-b-2 border-primary/40 pb-4">
|
|
73
73
|
<div>
|