@makolabs/ripple 1.2.20 → 1.2.22
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/ai/AIChatInterface.svelte +10 -10
- package/dist/ai/ChatInput.svelte +5 -5
- package/dist/ai/CodeRenderer.svelte +6 -4
- package/dist/ai/ComposeDropdown.svelte +13 -13
- package/dist/ai/MermaidRenderer.svelte +3 -3
- package/dist/ai/MessageBox.svelte +2 -2
- package/dist/ai/ThinkingDisplay.svelte +13 -12
- package/dist/ai/ai-chat-interface.js +2 -2
- package/dist/elements/progress/Progress.svelte +2 -2
- package/dist/file-browser/FileBrowser.svelte +9 -7
- package/dist/filters/CompactFilters.svelte +11 -9
- package/dist/forms/Checkbox.svelte +1 -1
- package/dist/forms/Input.svelte +4 -4
- package/dist/forms/NumberInput.svelte +1 -1
- package/dist/forms/RadioInputs.svelte +4 -4
- package/dist/forms/Slider.svelte +2 -2
- package/dist/forms/Tags.svelte +4 -3
- package/dist/forms/Toggle.svelte +5 -5
- package/dist/index.d.ts +2 -1
- package/dist/layout/activity-list/ActivityList.svelte +1 -1
- package/dist/layout/activity-list/activity-list.js +9 -9
- package/dist/layout/navbar/navbar.js +5 -5
- package/dist/layout/sidebar/NavGroup.svelte +0 -5
- package/dist/layout/sidebar/Sidebar.svelte +6 -6
- package/dist/layout/table/Table.svelte +3 -3
- package/dist/layout/table/table.js +7 -7
- package/dist/modal/Modal.svelte +1 -1
- package/dist/modal/modal.js +5 -5
- package/dist/pipeline/Pipeline.svelte +13 -13
- package/dist/types/markdown.d.ts +17 -0
- package/dist/types/variants.d.ts +1 -0
- package/dist/types/variants.js +1 -0
- package/dist/user-management/UserModal.svelte +42 -36
- package/dist/user-management/UserTable.svelte +39 -33
- package/dist/user-management/UserViewModal.svelte +199 -324
- package/package.json +2 -3
|
@@ -338,17 +338,17 @@
|
|
|
338
338
|
|
|
339
339
|
<!-- Centered Content -->
|
|
340
340
|
<div class="mb-8 text-center">
|
|
341
|
-
<h1 class="mb-8 text-4xl font-medium
|
|
341
|
+
<h1 class="text-default-900 mb-8 text-4xl font-medium">{title}</h1>
|
|
342
342
|
{#if subtitle}
|
|
343
|
-
<p class="mb-6 text-lg
|
|
343
|
+
<p class="text-default-600 mb-6 text-lg">{subtitle}</p>
|
|
344
344
|
{/if}
|
|
345
345
|
</div>
|
|
346
346
|
{:else}
|
|
347
347
|
<!-- Chat Layout Header -->
|
|
348
348
|
<div
|
|
349
|
-
class="sticky top-0 z-10 flex flex-shrink-0 items-center justify-between border-b
|
|
349
|
+
class="border-default-200 sticky top-0 z-10 flex flex-shrink-0 items-center justify-between border-b bg-white/50 px-6 py-3 backdrop-blur-sm"
|
|
350
350
|
>
|
|
351
|
-
<h1 class="text-sm font-medium
|
|
351
|
+
<h1 class="text-default-900 text-sm font-medium">{title}</h1>
|
|
352
352
|
<div class="flex items-center gap-2">
|
|
353
353
|
{#if isAdapterConfigured}
|
|
354
354
|
<div
|
|
@@ -359,9 +359,9 @@
|
|
|
359
359
|
</div>
|
|
360
360
|
{:else}
|
|
361
361
|
<div
|
|
362
|
-
class="flex items-center gap-2 rounded-full
|
|
362
|
+
class="bg-default-100/50 text-default-500 flex items-center gap-2 rounded-full px-2 py-1 text-xs font-medium"
|
|
363
363
|
>
|
|
364
|
-
<div class="h-1.5 w-1.5 rounded-full
|
|
364
|
+
<div class="bg-default-400 h-1.5 w-1.5 rounded-full"></div>
|
|
365
365
|
Offline
|
|
366
366
|
</div>
|
|
367
367
|
{/if}
|
|
@@ -396,16 +396,16 @@
|
|
|
396
396
|
{#if isProcessing}
|
|
397
397
|
<div class="flex w-full justify-start">
|
|
398
398
|
<div
|
|
399
|
-
class="rounded-md border
|
|
399
|
+
class="border-default-200 rounded-md border bg-white/80 px-4 py-3 shadow-sm backdrop-blur-sm"
|
|
400
400
|
>
|
|
401
401
|
<div class="flex items-center space-x-1">
|
|
402
|
-
<div class="h-2 w-2 animate-bounce rounded-full
|
|
402
|
+
<div class="bg-default-400 h-2 w-2 animate-bounce rounded-full"></div>
|
|
403
403
|
<div
|
|
404
|
-
class="h-2 w-2 animate-bounce rounded-full
|
|
404
|
+
class="bg-default-400 h-2 w-2 animate-bounce rounded-full"
|
|
405
405
|
style="animation-delay: 0.1s"
|
|
406
406
|
></div>
|
|
407
407
|
<div
|
|
408
|
-
class="h-2 w-2 animate-bounce rounded-full
|
|
408
|
+
class="bg-default-400 h-2 w-2 animate-bounce rounded-full"
|
|
409
409
|
style="animation-delay: 0.2s"
|
|
410
410
|
></div>
|
|
411
411
|
</div>
|
package/dist/ai/ChatInput.svelte
CHANGED
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
}: ChatInputProps = $props();
|
|
34
34
|
|
|
35
35
|
const textarea = tv({
|
|
36
|
-
base: 'flex-1 rounded-md text-sm placeholder-
|
|
36
|
+
base: 'flex-1 rounded-md text-sm placeholder-default-400 focus:outline-none transition-all duration-200 bg-default-200/60 border-0 resize-none',
|
|
37
37
|
variants: {
|
|
38
38
|
layout: {
|
|
39
39
|
empty: 'px-6 py-4 min-h-[52px] max-h-[120px]',
|
|
40
40
|
chat: 'px-6 py-3 min-h-[48px] max-h-[393px] overflow-y-auto'
|
|
41
41
|
},
|
|
42
42
|
state: {
|
|
43
|
-
disabled: 'bg-
|
|
44
|
-
enabled: 'hover:bg-
|
|
43
|
+
disabled: 'bg-default-100 cursor-not-allowed text-default-500',
|
|
44
|
+
enabled: 'hover:bg-default-200/80 focus:bg-white focus:ring-2 focus:shadow-md'
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
compoundVariants: [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
base: 'flex h-12 w-12 items-center justify-center rounded-full transition-all duration-200',
|
|
57
57
|
variants: {
|
|
58
58
|
state: {
|
|
59
|
-
disabled: 'bg-
|
|
59
|
+
disabled: 'bg-default-200 text-default-400 cursor-not-allowed',
|
|
60
60
|
enabled:
|
|
61
61
|
'text-white bg-primary-500 hover:bg-primary-600 focus:ring-2 focus:ring-primary-500/20'
|
|
62
62
|
}
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
|
|
198
198
|
<div class="mt-2 h-6 px-2">
|
|
199
199
|
{#if userInput.trim() && !isProcessing}
|
|
200
|
-
<p class="text-
|
|
200
|
+
<p class="text-default-500 text-xs">Press Enter to send • Shift+Enter for new line</p>
|
|
201
201
|
{/if}
|
|
202
202
|
</div>
|
|
203
203
|
</div>
|
|
@@ -102,18 +102,20 @@
|
|
|
102
102
|
</svelte:head>
|
|
103
103
|
|
|
104
104
|
<div
|
|
105
|
-
class="code-renderer my-4 overflow-hidden rounded-lg border
|
|
105
|
+
class="code-renderer border-default-700 bg-default-900 my-4 overflow-hidden rounded-lg border {className}"
|
|
106
106
|
>
|
|
107
107
|
<!-- Header -->
|
|
108
|
-
<div
|
|
109
|
-
|
|
108
|
+
<div
|
|
109
|
+
class="border-default-700 bg-default-800 flex items-center justify-between border-b px-4 py-2"
|
|
110
|
+
>
|
|
111
|
+
<span class="text-default-300 text-xs font-medium tracking-wide uppercase">
|
|
110
112
|
{displayLanguage}
|
|
111
113
|
</span>
|
|
112
114
|
<button
|
|
113
115
|
onclick={copyCode}
|
|
114
116
|
class="flex items-center gap-1.5 rounded px-2 py-1 text-xs transition-all duration-200 {copied
|
|
115
117
|
? 'border border-green-500 bg-green-500/10 text-green-400'
|
|
116
|
-
: 'text-
|
|
118
|
+
: 'text-default-400 hover:bg-default-700 hover:text-default-200'}"
|
|
117
119
|
title={copied ? 'Copied!' : 'Copy code'}
|
|
118
120
|
>
|
|
119
121
|
{#if copied}
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
base: 'flex h-10 w-10 items-center justify-center rounded-full transition-all duration-200',
|
|
32
32
|
variants: {
|
|
33
33
|
state: {
|
|
34
|
-
disabled: 'bg-
|
|
34
|
+
disabled: 'bg-default-100 text-default-300 cursor-not-allowed',
|
|
35
35
|
enabled:
|
|
36
|
-
'bg-
|
|
36
|
+
'bg-default-200 text-default-600 hover:bg-default-300 hover:text-default-800 focus:ring-2 focus:ring-default-300/50'
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
const dropdown = tv({
|
|
42
|
-
base: 'absolute bottom-12 left-0 z-50 w-64 bg-white border border-
|
|
42
|
+
base: 'absolute bottom-12 left-0 z-50 w-64 bg-white border border-default-200 rounded-lg shadow-lg py-2',
|
|
43
43
|
variants: {
|
|
44
44
|
visible: {
|
|
45
45
|
true: 'opacity-100 scale-100',
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
base: 'flex items-center px-4 py-2 text-sm transition-colors',
|
|
53
53
|
variants: {
|
|
54
54
|
state: {
|
|
55
|
-
enabled: 'text-
|
|
56
|
-
disabled: 'text-
|
|
55
|
+
enabled: 'text-default-700 hover:bg-default-50 cursor-pointer',
|
|
56
|
+
disabled: 'text-default-400 cursor-not-allowed'
|
|
57
57
|
},
|
|
58
58
|
layout: {
|
|
59
59
|
default: 'justify-between',
|
|
@@ -131,33 +131,33 @@
|
|
|
131
131
|
<!-- Dropdown Menu -->
|
|
132
132
|
<div class={dropdownClasses}>
|
|
133
133
|
<!-- Models Section -->
|
|
134
|
-
<div class="border-
|
|
135
|
-
<h3 class="text-xs font-medium tracking-wide
|
|
134
|
+
<div class="border-default-100 border-b px-4 py-2">
|
|
135
|
+
<h3 class="text-default-500 text-xs font-medium tracking-wide uppercase">Models</h3>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
138
|
{#each models as model (model.name)}
|
|
139
139
|
<div class={menuItem({ state: 'disabled', layout: 'default' })}>
|
|
140
140
|
<div class="flex flex-col">
|
|
141
141
|
<span class="font-medium">{model.name}</span>
|
|
142
|
-
<span class="text-
|
|
142
|
+
<span class="text-default-400 text-xs">{model.provider}</span>
|
|
143
143
|
</div>
|
|
144
|
-
<div class="text-
|
|
144
|
+
<div class="text-default-400 text-xs">Disabled</div>
|
|
145
145
|
</div>
|
|
146
146
|
{/each}
|
|
147
147
|
|
|
148
148
|
<!-- Divider -->
|
|
149
|
-
<div class="my-2 border-t
|
|
149
|
+
<div class="border-default-100 my-2 border-t"></div>
|
|
150
150
|
|
|
151
151
|
<!-- Thinking Mode Option -->
|
|
152
|
-
<div class="border-
|
|
153
|
-
<h3 class="text-xs font-medium tracking-wide
|
|
152
|
+
<div class="border-default-100 border-b px-4 py-2">
|
|
153
|
+
<h3 class="text-default-500 text-xs font-medium tracking-wide uppercase">Options</h3>
|
|
154
154
|
</div>
|
|
155
155
|
|
|
156
156
|
<div class={menuItem({ state: 'enabled', layout: 'full' }) + ' w-full cursor-pointer'}>
|
|
157
157
|
<div class="flex w-full items-center justify-between">
|
|
158
158
|
<div class="flex flex-col items-start">
|
|
159
159
|
<span class="font-medium">Thinking Mode</span>
|
|
160
|
-
<span class="text-
|
|
160
|
+
<span class="text-default-500 text-xs">Show reasoning process</span>
|
|
161
161
|
</div>
|
|
162
162
|
<div class="ml-4 flex items-center">
|
|
163
163
|
<Toggle
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
<div class="mermaid-rounded">
|
|
67
67
|
<Mermaid string={diagram} {config}>
|
|
68
68
|
{#snippet error(errorObj)}
|
|
69
|
-
<div class="
|
|
70
|
-
<div class="flex items-center gap-2
|
|
69
|
+
<div class="border-danger-200 bg-danger-50 rounded-lg border p-4">
|
|
70
|
+
<div class="text-danger-800 flex items-center gap-2">
|
|
71
71
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
72
72
|
<path
|
|
73
73
|
stroke-linecap="round"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</svg>
|
|
79
79
|
<span class="font-medium">Failed to render Mermaid diagram</span>
|
|
80
80
|
</div>
|
|
81
|
-
<p class="mt-2 text-sm
|
|
81
|
+
<p class="text-danger-700 mt-2 text-sm">${errorObj.message}</p>
|
|
82
82
|
</div>
|
|
83
83
|
{/snippet}
|
|
84
84
|
</Mermaid>
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
{#if timestamp}
|
|
152
152
|
<div
|
|
153
153
|
class={cn(
|
|
154
|
-
'mt-1 text-xs
|
|
154
|
+
'text-default-500 mt-1 text-xs',
|
|
155
155
|
isUser ? 'ml-auto text-right' : 'mr-auto text-left'
|
|
156
156
|
)}
|
|
157
157
|
>
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
bind:this={copyButtonRef}
|
|
167
167
|
onclick={handleCopyClick}
|
|
168
168
|
ondblclick={handleCopyDoubleClick}
|
|
169
|
-
class="flex items-center gap-1 rounded-md
|
|
169
|
+
class="bg-default-100 text-default-600 hover:bg-default-200 hover:text-default-800 flex items-center gap-1 rounded-md px-3 py-1 text-xs font-medium opacity-0 transition-opacity duration-200 group-hover:opacity-100"
|
|
170
170
|
title="Click: Copy markdown • Double-click: Copy rich text"
|
|
171
171
|
>
|
|
172
172
|
{#if showCopied}
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
variants: {
|
|
88
88
|
state: {
|
|
89
89
|
thinking: 'border-blue-200 bg-blue-50/50',
|
|
90
|
-
complete: 'border-
|
|
90
|
+
complete: 'border-default-200 bg-default-50/50'
|
|
91
91
|
},
|
|
92
92
|
expanded: {
|
|
93
93
|
true: 'shadow-sm',
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
variants: {
|
|
102
102
|
state: {
|
|
103
103
|
thinking: 'text-blue-700',
|
|
104
|
-
complete: 'text-
|
|
104
|
+
complete: 'text-default-700'
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
});
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
variants: {
|
|
112
112
|
state: {
|
|
113
113
|
thinking: 'text-blue-800',
|
|
114
|
-
complete: 'text-
|
|
114
|
+
complete: 'text-default-700'
|
|
115
115
|
},
|
|
116
116
|
expanded: {
|
|
117
117
|
true: 'max-h-none',
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
<!-- Completed icon -->
|
|
186
186
|
<svg
|
|
187
187
|
xmlns="http://www.w3.org/2000/svg"
|
|
188
|
-
class="h-4 w-4
|
|
188
|
+
class="text-default-500 h-4 w-4"
|
|
189
189
|
width="24"
|
|
190
190
|
height="24"
|
|
191
191
|
viewBox="0 0 24 24"
|
|
@@ -228,11 +228,11 @@
|
|
|
228
228
|
<div class="mr-4 flex flex-col items-center">
|
|
229
229
|
<!-- Timeline Icon -->
|
|
230
230
|
<div
|
|
231
|
-
class="z-10 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border
|
|
231
|
+
class="border-default-300 z-10 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border bg-white"
|
|
232
232
|
>
|
|
233
233
|
{#if step.isComplete && index === parsedSteps.length - 1}
|
|
234
234
|
<!-- Checkmark only for the last completed step -->
|
|
235
|
-
<svg class="h-3 w-3
|
|
235
|
+
<svg class="text-default-600 h-3 w-3" fill="currentColor" viewBox="0 0 20 20">
|
|
236
236
|
<path
|
|
237
237
|
fill-rule="evenodd"
|
|
238
238
|
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
|
@@ -241,16 +241,16 @@
|
|
|
241
241
|
</svg>
|
|
242
242
|
{:else if step.isComplete}
|
|
243
243
|
<!-- Simple filled circle for other completed steps -->
|
|
244
|
-
<div class="h-2.5 w-2.5 rounded-full
|
|
244
|
+
<div class="bg-default-500 h-2.5 w-2.5 rounded-full"></div>
|
|
245
245
|
{:else}
|
|
246
246
|
<!-- Pulsing dot for in-progress step -->
|
|
247
|
-
<div class="h-2.5 w-2.5 animate-pulse rounded-full
|
|
247
|
+
<div class="bg-default-400 h-2.5 w-2.5 animate-pulse rounded-full"></div>
|
|
248
248
|
{/if}
|
|
249
249
|
</div>
|
|
250
250
|
|
|
251
251
|
<!-- Vertical Line (except for last item) -->
|
|
252
252
|
{#if index < parsedSteps.length - 1}
|
|
253
|
-
<div class="mt-1 h-full min-h-8 w-0.5
|
|
253
|
+
<div class="bg-default-200 mt-1 h-full min-h-8 w-0.5"></div>
|
|
254
254
|
{/if}
|
|
255
255
|
</div>
|
|
256
256
|
|
|
@@ -258,13 +258,13 @@
|
|
|
258
258
|
<div class="flex-1 pb-6 last:pb-0">
|
|
259
259
|
<!-- Step Title -->
|
|
260
260
|
<div class="mb-2">
|
|
261
|
-
<h4 class="text-sm leading-tight font-medium
|
|
261
|
+
<h4 class="text-default-800 text-sm leading-tight font-medium">
|
|
262
262
|
{step.title}
|
|
263
263
|
</h4>
|
|
264
264
|
</div>
|
|
265
265
|
|
|
266
266
|
<!-- Step Description -->
|
|
267
|
-
<div class="text-sm leading-relaxed
|
|
267
|
+
<div class="text-default-600 text-sm leading-relaxed">
|
|
268
268
|
{#if step.content.includes('•') || step.content.includes('-')}
|
|
269
269
|
<!-- Parse bullet points -->
|
|
270
270
|
<ul class="space-y-1">
|
|
@@ -272,7 +272,8 @@
|
|
|
272
272
|
{@const trimmedLine = line.trim()}
|
|
273
273
|
{#if trimmedLine.startsWith('•') || trimmedLine.startsWith('-')}
|
|
274
274
|
<li class="flex items-start">
|
|
275
|
-
<span
|
|
275
|
+
<span
|
|
276
|
+
class="bg-default-400 mt-2 mr-2 h-1 w-1 flex-shrink-0 rounded-full"
|
|
276
277
|
></span>
|
|
277
278
|
<span>{trimmedLine.substring(1).trim()}</span>
|
|
278
279
|
</li>
|
|
@@ -12,7 +12,7 @@ export const aiChatInterface = tv({
|
|
|
12
12
|
[Color.DEFAULT]: {
|
|
13
13
|
userMessage: 'bg-default-900 text-white',
|
|
14
14
|
sendButton: 'bg-default-900 hover:bg-default-800 text-white disabled:bg-default-300 disabled:text-default-500',
|
|
15
|
-
background: 'bg-
|
|
15
|
+
background: 'bg-default-50'
|
|
16
16
|
},
|
|
17
17
|
[Color.PRIMARY]: {
|
|
18
18
|
userMessage: 'bg-primary-600 text-white',
|
|
@@ -37,7 +37,7 @@ export const aiChatInterface = tv({
|
|
|
37
37
|
[Color.DANGER]: {
|
|
38
38
|
userMessage: 'bg-danger-600 text-white',
|
|
39
39
|
sendButton: 'bg-danger-600 hover:bg-danger-700 text-white disabled:bg-danger-300 disabled:text-danger-100',
|
|
40
|
-
background: 'bg-
|
|
40
|
+
background: 'bg-danger-50'
|
|
41
41
|
},
|
|
42
42
|
[Color.INFO]: {
|
|
43
43
|
userMessage: 'bg-info-600 text-white',
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
aria-valuemax="100"
|
|
105
105
|
>
|
|
106
106
|
{#if segments}
|
|
107
|
-
{#each segmentPercentages as segment (segment.label
|
|
107
|
+
{#each segmentPercentages as segment, index (segment.label ?? `segment-${index}`)}
|
|
108
108
|
{#if segment.percentage > 0}
|
|
109
109
|
<div
|
|
110
110
|
class={cn(getColorClass(segment.color), barClass)}
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
|
|
121
121
|
{#if segments && (showLabels || showValues)}
|
|
122
122
|
<div class="mt-1 flex justify-between">
|
|
123
|
-
{#each segmentPercentages as segment (segment.label
|
|
123
|
+
{#each segmentPercentages as segment, index (segment.label ?? `segment-${index}`)}
|
|
124
124
|
{#if segment.percentage > 0}
|
|
125
125
|
<div class={labelTextClass}>
|
|
126
126
|
{#if showLabels && segment.label}
|
|
@@ -696,11 +696,13 @@
|
|
|
696
696
|
<Button color={Color.PRIMARY} onclick={authenticate}>Authenticate</Button>
|
|
697
697
|
</div>
|
|
698
698
|
{:else}
|
|
699
|
-
<div
|
|
699
|
+
<div
|
|
700
|
+
class="border-default-100 mb-2 flex flex-wrap items-center justify-between border-b pb-3"
|
|
701
|
+
>
|
|
700
702
|
<div class="flex flex-wrap items-center">
|
|
701
703
|
{#if breadcrumbs.length > 1}
|
|
702
704
|
<button
|
|
703
|
-
class="text-default-600 mr-1 rounded-full px-2 py-1
|
|
705
|
+
class="text-default-600 hover:bg-default-100 mr-1 rounded-full px-2 py-1"
|
|
704
706
|
onclick={navigateUp}
|
|
705
707
|
title="Go up"
|
|
706
708
|
aria-label="Navigate to parent folder"
|
|
@@ -731,14 +733,14 @@
|
|
|
731
733
|
|
|
732
734
|
{#if crumb.clickable && !crumb.current}
|
|
733
735
|
<button
|
|
734
|
-
class="cursor-pointer border-0 bg-transparent px-1 py-0 text-sm
|
|
736
|
+
class="text-default-600 hover:bg-default-100 hover:text-default-900 cursor-pointer border-0 bg-transparent px-1 py-0 text-sm"
|
|
735
737
|
onclick={() => navigateToFolder(crumb.path)}
|
|
736
738
|
>
|
|
737
739
|
{crumb.name}
|
|
738
740
|
</button>
|
|
739
741
|
{:else}
|
|
740
742
|
<span
|
|
741
|
-
class={`px-1 text-sm ${crumb.current ? '
|
|
743
|
+
class={`px-1 text-sm ${crumb.current ? 'text-default-800 font-semibold' : 'text-default-600'}`}
|
|
742
744
|
>
|
|
743
745
|
{crumb.name}
|
|
744
746
|
</span>
|
|
@@ -782,7 +784,7 @@
|
|
|
782
784
|
<div class="relative flex items-center">
|
|
783
785
|
<input
|
|
784
786
|
type="text"
|
|
785
|
-
class="h-7 w-40 rounded border
|
|
787
|
+
class="border-default-300 h-7 w-40 rounded border px-2 py-1 text-xs"
|
|
786
788
|
placeholder="Search files..."
|
|
787
789
|
value={searchQuery}
|
|
788
790
|
oninput={(e) => {
|
|
@@ -794,7 +796,7 @@
|
|
|
794
796
|
/>
|
|
795
797
|
{#if searchQuery}
|
|
796
798
|
<button
|
|
797
|
-
class="
|
|
799
|
+
class="text-default-400 hover:text-default-600 absolute right-1 text-xs"
|
|
798
800
|
onclick={clearSearch}
|
|
799
801
|
title="Clear search"
|
|
800
802
|
>
|
|
@@ -804,7 +806,7 @@
|
|
|
804
806
|
</div>
|
|
805
807
|
<button
|
|
806
808
|
onclick={handleSearch}
|
|
807
|
-
class="
|
|
809
|
+
class="bg-default-200 hover:bg-default-300 rounded px-2 py-1 text-xs"
|
|
808
810
|
>
|
|
809
811
|
Search
|
|
810
812
|
</button>
|
|
@@ -70,23 +70,23 @@
|
|
|
70
70
|
</svg>
|
|
71
71
|
{/snippet}
|
|
72
72
|
|
|
73
|
-
<div class={cn('rounded-lg border
|
|
73
|
+
<div class={cn('border-default-200 rounded-lg border bg-white p-3 shadow-sm', className)}>
|
|
74
74
|
<button
|
|
75
75
|
onclick={toggleExpanded}
|
|
76
76
|
class="mb-2 flex min-w-full cursor-pointer items-center justify-between"
|
|
77
77
|
>
|
|
78
78
|
<div class="flex items-center gap-2">
|
|
79
79
|
{#if FilterIcon}
|
|
80
|
-
<FilterIcon size={16} class="text-
|
|
80
|
+
<FilterIcon size={16} class="text-default-500" />
|
|
81
81
|
{:else}
|
|
82
|
-
<span class="text-
|
|
82
|
+
<span class="text-default-500">
|
|
83
83
|
{@render DefaultFilterIcon()}
|
|
84
84
|
</span>
|
|
85
85
|
{/if}
|
|
86
86
|
<span class="text-sm font-medium">{title}</span>
|
|
87
87
|
</div>
|
|
88
88
|
<div
|
|
89
|
-
class="
|
|
89
|
+
class="text-default-500 hover:bg-default-100 hover:text-default-700 rounded-md p-1"
|
|
90
90
|
aria-label={isExpanded ? `Collapse ${title.toLowerCase()}` : `Expand ${title.toLowerCase()}`}
|
|
91
91
|
>
|
|
92
92
|
{#if isExpanded}
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
{#if !isExpanded}
|
|
101
101
|
<!-- Summary of selected filters when collapsed -->
|
|
102
102
|
<div class={cn('flex flex-wrap gap-2', summaryClass)}>
|
|
103
|
-
{#each filterGroups as group (group.
|
|
103
|
+
{#each filterGroups as group (group.key)}
|
|
104
104
|
{#if group.tabs.length > 0}
|
|
105
105
|
<div
|
|
106
106
|
class="bg-primary-50 text-primary-700 border-primary-200 flex items-center gap-1 rounded-full border px-3 py-1 text-xs"
|
|
@@ -113,15 +113,17 @@
|
|
|
113
113
|
</div>
|
|
114
114
|
{:else}
|
|
115
115
|
<div class={cn('flex flex-col gap-2', expandedClass)}>
|
|
116
|
-
{#each filterGroups as group, index (group.
|
|
116
|
+
{#each filterGroups as group, index (group.key)}
|
|
117
117
|
{#if group.tabs.length > 0}
|
|
118
118
|
<div
|
|
119
119
|
class={cn(
|
|
120
120
|
'flex items-center gap-2 pb-2',
|
|
121
|
-
index > 0 ? 'border-
|
|
121
|
+
index > 0 ? 'border-default-100 border-t pt-2' : ''
|
|
122
122
|
)}
|
|
123
123
|
>
|
|
124
|
-
<div
|
|
124
|
+
<div
|
|
125
|
+
class={cn('text-default-500 text-xs font-medium', group.minWidth || 'min-w-[70px]')}
|
|
126
|
+
>
|
|
125
127
|
{group.label}
|
|
126
128
|
</div>
|
|
127
129
|
<div class="flex flex-wrap gap-2">
|
|
@@ -132,7 +134,7 @@
|
|
|
132
134
|
'rounded-full border px-3 py-1 text-xs font-medium whitespace-nowrap',
|
|
133
135
|
group.selectedValue === tab.value
|
|
134
136
|
? 'bg-primary-50 text-primary-700 border-primary-200'
|
|
135
|
-
: 'border-
|
|
137
|
+
: 'border-default-200 text-default-700 hover:bg-default-50'
|
|
136
138
|
)}
|
|
137
139
|
>
|
|
138
140
|
{tab.label}
|
package/dist/forms/Input.svelte
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
'border rounded-lg shadow-xs w-full bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2':
|
|
26
26
|
BASIC_TYPES.includes(type),
|
|
27
27
|
'w-full bg-white px-3 py-2 text-sm resize-y min-h-[100px]': type === 'textarea',
|
|
28
|
-
'border-
|
|
28
|
+
'border-danger-300 focus:border-danger-500 focus:ring-danger-500': errors.length,
|
|
29
29
|
'opacity-50 cursor-not-allowed': disabled,
|
|
30
30
|
...(BASIC_TYPES.includes(type)
|
|
31
31
|
? {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
<input {...inputProps} bind:value />
|
|
71
71
|
{/if}
|
|
72
72
|
{#if errors.length}
|
|
73
|
-
{#each errors as error (
|
|
74
|
-
<p id="{name}-errors" class="mt-1 text-sm
|
|
73
|
+
{#each errors as error, i (i)}
|
|
74
|
+
<p id="{name}-errors" class="text-danger-600 mt-1 text-sm" role="alert">
|
|
75
75
|
{error}
|
|
76
76
|
</p>
|
|
77
77
|
{/each}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
'block w-full text-sm font-medium',
|
|
87
87
|
{
|
|
88
88
|
'text-default-700': !errors.length,
|
|
89
|
-
'text-
|
|
89
|
+
'text-danger-600': errors.length
|
|
90
90
|
},
|
|
91
91
|
extraClass
|
|
92
92
|
)}>{label}</label
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
const radioClass = $derived(
|
|
19
19
|
cn('w-4 h-4 text-primary-600 border-default-300 focus:ring-primary-500', {
|
|
20
20
|
'opacity-50 cursor-not-allowed': disabled,
|
|
21
|
-
'border-
|
|
21
|
+
'border-danger-300 focus:ring-danger-500': errors.length
|
|
22
22
|
})
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
const labelClass = $derived(
|
|
26
26
|
cn('block text-sm font-medium', {
|
|
27
27
|
'text-default-700': !errors.length,
|
|
28
|
-
'text-
|
|
28
|
+
'text-danger-600': errors.length
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
</script>
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
{/each}
|
|
56
56
|
</div>
|
|
57
57
|
{#if errors.length}
|
|
58
|
-
{#each errors as error (
|
|
59
|
-
<p id={`${name}-errors`} class="mt-1 text-sm
|
|
58
|
+
{#each errors as error, i (i)}
|
|
59
|
+
<p id={`${name}-errors`} class="text-danger-600 mt-1 text-sm" role="alert">
|
|
60
60
|
{error}
|
|
61
61
|
</p>
|
|
62
62
|
{/each}
|
package/dist/forms/Slider.svelte
CHANGED
|
@@ -333,8 +333,8 @@
|
|
|
333
333
|
</div>
|
|
334
334
|
|
|
335
335
|
{#if errors.length}
|
|
336
|
-
{#each errors as error (
|
|
337
|
-
<p class="mt-2.5 text-sm
|
|
336
|
+
{#each errors as error, i (i)}
|
|
337
|
+
<p class="text-danger-600 mt-2.5 text-sm" role="alert">
|
|
338
338
|
{error}
|
|
339
339
|
</p>
|
|
340
340
|
{/each}
|
package/dist/forms/Tags.svelte
CHANGED
|
@@ -108,7 +108,8 @@
|
|
|
108
108
|
'relative flex flex-wrap gap-2 rounded-lg border bg-white shadow-sm px-3 py-2',
|
|
109
109
|
'border-default-300 focus-within:border-primary-500 focus-within:ring-2 focus-within:ring-primary-500 focus-within:ring-offset-2',
|
|
110
110
|
{
|
|
111
|
-
'border-
|
|
111
|
+
'border-danger-300 focus-within:border-danger-500 focus-within:ring-danger-500':
|
|
112
|
+
errors?.length
|
|
112
113
|
},
|
|
113
114
|
className
|
|
114
115
|
)
|
|
@@ -174,8 +175,8 @@
|
|
|
174
175
|
</div>
|
|
175
176
|
|
|
176
177
|
{#if errors?.length}
|
|
177
|
-
{#each errors as error (
|
|
178
|
-
<p class="text-
|
|
178
|
+
{#each errors as error, i (i)}
|
|
179
|
+
<p class="text-danger-600 text-sm">{error}</p>
|
|
179
180
|
{/each}
|
|
180
181
|
{/if}
|
|
181
182
|
</div>
|
package/dist/forms/Toggle.svelte
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
[Color.PRIMARY]: 'bg-primary-500',
|
|
25
25
|
[Color.SECONDARY]: 'bg-secondary-500',
|
|
26
26
|
[Color.SUCCESS]: 'bg-green-500',
|
|
27
|
-
[Color.DANGER]: 'bg-
|
|
27
|
+
[Color.DANGER]: 'bg-danger-500',
|
|
28
28
|
[Color.WARNING]: 'bg-yellow-500',
|
|
29
29
|
[Color.INFO]: 'bg-blue-500',
|
|
30
30
|
[Color.DEFAULT]: 'bg-default-800'
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{
|
|
64
64
|
'opacity-50 cursor-not-allowed': disabled,
|
|
65
65
|
'cursor-pointer': !disabled,
|
|
66
|
-
'focus:ring-
|
|
66
|
+
'focus:ring-danger-500': errors.length,
|
|
67
67
|
[`focus:ring-${color}-500`]: !errors.length
|
|
68
68
|
},
|
|
69
69
|
className
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
const labelClasses = $derived(
|
|
82
82
|
cn('text-sm font-medium', {
|
|
83
83
|
'text-default-700': !errors.length,
|
|
84
|
-
'text-
|
|
84
|
+
'text-danger-600': errors.length,
|
|
85
85
|
'opacity-50': disabled
|
|
86
86
|
})
|
|
87
87
|
);
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
|
|
124
124
|
{#if errors.length}
|
|
125
125
|
<div id="{name}-errors" class="mt-1">
|
|
126
|
-
{#each errors as error (
|
|
127
|
-
<p class="text-
|
|
126
|
+
{#each errors as error, i (i)}
|
|
127
|
+
<p class="text-danger-600 text-sm" role="alert">
|
|
128
128
|
{error}
|
|
129
129
|
</p>
|
|
130
130
|
{/each}
|
package/dist/index.d.ts
CHANGED
|
@@ -984,9 +984,10 @@ export interface UserModalProps {
|
|
|
984
984
|
class?: ClassValue;
|
|
985
985
|
}
|
|
986
986
|
export interface UserViewModalProps {
|
|
987
|
-
open
|
|
987
|
+
open?: boolean;
|
|
988
988
|
user: User | null;
|
|
989
989
|
permissions?: Permission[];
|
|
990
|
+
roles?: Role[];
|
|
990
991
|
onEdit?: (user: User) => void;
|
|
991
992
|
onRegenerateApiKey?: (userId: string) => Promise<void>;
|
|
992
993
|
onClose: () => void;
|