Chore: linting

This commit is contained in:
Pieter Vander Vennet 2024-04-13 02:40:21 +02:00
parent 4625ad9a5c
commit 097141f944
307 changed files with 5346 additions and 2147 deletions

View file

@ -6,10 +6,10 @@
*/
export let selected: UIEventSource<boolean>
let _c: boolean = selected.data ?? true
let id = `checkbox-input-${Math.round(Math.random()*100000000)}`
let id = `checkbox-input-${Math.round(Math.random() * 100000000)}`
$: selected.set(_c)
selected.addCallbackD(s => {
_c = s
selected.addCallbackD((s) => {
_c = s
})
</script>

View file

@ -10,7 +10,7 @@
*/
const dispatch = createEventDispatcher()
export let cls = "m-0.5 p-0.5 sm:p-1 md:m-1"
export let enabled : Store<boolean> = new ImmutableStore(true)
export let enabled: Store<boolean> = new ImmutableStore(true)
export let arialabel: Translation = undefined
</script>
@ -18,7 +18,11 @@
on:click={(e) => dispatch("click", e)}
on:keydown
use:ariaLabel={arialabel}
class={twJoin("pointer-events-auto relative h-fit w-fit rounded-full", cls, $enabled ? "" : "disabled")}
class={twJoin(
"pointer-events-auto relative h-fit w-fit rounded-full",
cls,
$enabled ? "" : "disabled"
)}
>
<slot />
</button>

View file

@ -5,13 +5,9 @@
imgSize?: string
extraClasses?: string
} = {}
</script>
<button
class={twMerge(options.extraClasses, "secondary no-image-background")}
on:click
>
<button class={twMerge(options.extraClasses, "secondary no-image-background")} on:click>
<slot name="image" />
<slot name="message" />
</button>

View file

@ -22,7 +22,7 @@ export default class SvelteUIElement<
private readonly _props: Props
private readonly _events: Events
private readonly _slots: Slots
private tag : "div" | "span" = "div"
private tag: "div" | "span" = "div"
constructor(svelteElement, props?: Props, events?: Events, slots?: Slots) {
super()
@ -32,7 +32,7 @@ export default class SvelteUIElement<
this._slots = slots
}
public setSpan(){
public setSpan() {
this.tag = "span"
return this
}