@immich/ui 0.17.0 → 0.17.1
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.
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
|
|
29
29
|
const enabled = $derived(checked && !disabled);
|
|
30
30
|
|
|
31
|
-
const handleToggle = (
|
|
31
|
+
const handleToggle = () => {
|
|
32
|
+
checked = !checked;
|
|
33
|
+
onToggle?.(checked);
|
|
34
|
+
};
|
|
32
35
|
|
|
33
36
|
const wrapper = tv({
|
|
34
37
|
base: 'relative flex flex-col justify-center',
|
|
@@ -79,7 +82,11 @@
|
|
|
79
82
|
const labelId = `label-${id}`;
|
|
80
83
|
</script>
|
|
81
84
|
|
|
82
|
-
<
|
|
85
|
+
<button
|
|
86
|
+
class={cleanClass('flex justify-between gap-1', label && 'w-full')}
|
|
87
|
+
{disabled}
|
|
88
|
+
onclick={handleToggle}
|
|
89
|
+
>
|
|
83
90
|
{#if label}
|
|
84
91
|
<Label id={labelId} for={inputId} {label} {...labelProps} />
|
|
85
92
|
{/if}
|
|
@@ -91,7 +98,6 @@
|
|
|
91
98
|
class="hidden"
|
|
92
99
|
type="checkbox"
|
|
93
100
|
bind:checked
|
|
94
|
-
onclick={handleToggle}
|
|
95
101
|
{required}
|
|
96
102
|
aria-required={required}
|
|
97
103
|
{disabled}
|
|
@@ -104,4 +110,4 @@
|
|
|
104
110
|
<span class={bar({ fillColor: enabled ? color : 'default' })}> </span>
|
|
105
111
|
<span class={dot({ checked: enabled, fillColor: enabled ? color : 'default' })}></span>
|
|
106
112
|
</span>
|
|
107
|
-
</
|
|
113
|
+
</button>
|