runeforge 0.0.43 → 0.0.45
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.
|
@@ -295,13 +295,23 @@
|
|
|
295
295
|
/>
|
|
296
296
|
{/if}
|
|
297
297
|
{:else if readonly}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
298
|
+
{#if field.formatter}
|
|
299
|
+
<div
|
|
300
|
+
id={field.attribute}
|
|
301
|
+
class="input input-bordered w-full bg-base-200 border-base-200 text-base-content/40 shadow-none cursor-not-allowed"
|
|
302
|
+
>
|
|
303
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
304
|
+
{@html formattedValue}
|
|
305
|
+
</div>
|
|
306
|
+
{:else}
|
|
307
|
+
<input
|
|
308
|
+
type={field.type ?? 'text'}
|
|
309
|
+
id={field.attribute}
|
|
310
|
+
class="input input-bordered w-full"
|
|
311
|
+
value={formattedValue}
|
|
312
|
+
disabled
|
|
313
|
+
/>
|
|
314
|
+
{/if}
|
|
305
315
|
{:else}
|
|
306
316
|
<input
|
|
307
317
|
type={field.type ?? 'text'}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const pages = $derived(buildPages(page, totalPages));
|
|
51
|
+
const inputWidth = $derived(`${String(totalPages).length + 2}ch`);
|
|
51
52
|
|
|
52
53
|
function handlePageInput(e: KeyboardEvent) {
|
|
53
54
|
if (e.key !== 'Enter') return;
|
|
@@ -79,8 +80,8 @@
|
|
|
79
80
|
{:else if p === page}
|
|
80
81
|
<input
|
|
81
82
|
type="number"
|
|
82
|
-
class="join-item btn btn-sm
|
|
83
|
-
style="background-color: var(--color-base-100);"
|
|
83
|
+
class="join-item btn btn-sm no-spinner text-center"
|
|
84
|
+
style="background-color: var(--color-base-100); width: {inputWidth};"
|
|
84
85
|
min="1"
|
|
85
86
|
max={totalPages}
|
|
86
87
|
value={page}
|
|
@@ -96,3 +97,17 @@
|
|
|
96
97
|
</div>
|
|
97
98
|
</div>
|
|
98
99
|
{/if}
|
|
100
|
+
|
|
101
|
+
<style>
|
|
102
|
+
.no-spinner {
|
|
103
|
+
appearance: none;
|
|
104
|
+
-moz-appearance: textfield;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.no-spinner::-webkit-outer-spin-button,
|
|
108
|
+
.no-spinner::-webkit-inner-spin-button {
|
|
109
|
+
-webkit-appearance: none;
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
113
|
+
|