@immich/ui 0.61.2 → 0.61.3

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.
@@ -75,44 +75,35 @@
75
75
 
76
76
  const inputId = $derived(`input-${id}`);
77
77
  const labelId = $derived(`label-${id}`);
78
- const descriptionId = $derived(description ? `description-${id}` : undefined);
78
+ const descriptionId = $derived(description ? `description-${id}` : restProps['aria-describedby']);
79
79
  </script>
80
80
 
81
- <Switch.Root
82
- bind:checked
83
- bind:ref
84
- id={inputId}
85
- disabled={disabled || readOnly}
86
- required={!!required}
87
- class={cleanClass(label && 'w-full', className)}
88
- aria-readonly={readOnly}
89
- aria-labelledby={labelId}
90
- aria-describedby={descriptionId}
91
- {...restProps}
92
- >
93
- <Switch.Thumb>
94
- {#snippet child()}
95
- <div class={cleanClass(label && 'flex items-center justify-between gap-1')}>
96
- {#if label}
97
- <div class="text-start">
98
- <Label
99
- id={labelId}
100
- for={inputId}
101
- {label}
102
- requiredIndicator={required === 'indicator'}
103
- {...labelProps}
104
- {size}
105
- />
106
- {#if description}
107
- <Text color="muted" size="small" id={descriptionId}>{description}</Text>
108
- {/if}
109
- </div>
110
- {/if}
111
- <span class={wrapper({ disabled })}>
112
- <span class={bar({ fillColor: enabled ? color : 'default' })}> </span>
113
- <span class={dot({ checked: enabled, fillColor: enabled ? color : 'default' })}></span>
114
- </span>
115
- </div>
116
- {/snippet}
117
- </Switch.Thumb>
118
- </Switch.Root>
81
+ <div class={cleanClass(label ? 'flex w-full items-center gap-3' : undefined, className)}>
82
+ {#if label}
83
+ <div class="min-w-0 flex-1 text-start">
84
+ <Label id={labelId} for={inputId} {label} requiredIndicator={required === 'indicator'} {...labelProps} {size} />
85
+ {#if description}
86
+ <Text color="muted" size="small" id={descriptionId}>{description}</Text>
87
+ {/if}
88
+ </div>
89
+ {/if}
90
+
91
+ <Switch.Root
92
+ bind:checked
93
+ bind:ref
94
+ id={inputId}
95
+ disabled={disabled || readOnly}
96
+ required={!!required}
97
+ aria-readonly={readOnly}
98
+ aria-labelledby={labelId}
99
+ aria-describedby={descriptionId}
100
+ {...restProps}
101
+ >
102
+ <Switch.Thumb>
103
+ <span class={wrapper({ disabled })}>
104
+ <span class={bar({ fillColor: enabled ? color : 'default' })}> </span>
105
+ <span class={dot({ checked: enabled, fillColor: enabled ? color : 'default' })}></span>
106
+ </span>
107
+ </Switch.Thumb>
108
+ </Switch.Root>
109
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immich/ui",
3
- "version": "0.61.2",
3
+ "version": "0.61.3",
4
4
  "license": "GNU Affero General Public License version 3",
5
5
  "repository": {
6
6
  "type": "git",