aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Layout
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-01 16:20:51 -0800
committerFuwn <[email protected]>2026-03-01 16:21:02 -0800
commiteae5d24d9e79e59a19d4721caaeaa0ca650ecb33 (patch)
tree1b685bb248e051dfa26d2bfdebe6689402dd93c5 /src/lib/Layout
parentchore(tooling): remove legacy eslint and prettier (diff)
downloaddue.moe-eae5d24d9e79e59a19d4721caaeaa0ca650ecb33.tar.xz
due.moe-eae5d24d9e79e59a19d4721caaeaa0ca650ecb33.zip
chore(biome): drop formatter style overrides
Diffstat (limited to 'src/lib/Layout')
-rw-r--r--src/lib/Layout/Dropdown.svelte10
-rw-r--r--src/lib/Layout/NumberTicker.svelte12
-rw-r--r--src/lib/Layout/Popup.svelte26
-rw-r--r--src/lib/Layout/Spacer.svelte2
-rw-r--r--src/lib/Layout/TextTransition.svelte18
5 files changed, 34 insertions, 34 deletions
diff --git a/src/lib/Layout/Dropdown.svelte b/src/lib/Layout/Dropdown.svelte
index 324c9498..d27b2590 100644
--- a/src/lib/Layout/Dropdown.svelte
+++ b/src/lib/Layout/Dropdown.svelte
@@ -1,9 +1,9 @@
<script lang="ts">
interface Item {
- name: string;
- url: string;
- onClick?: () => void;
- preventDefault?: boolean;
+ name: string;
+ url: string;
+ onClick?: () => void;
+ preventDefault?: boolean;
}
export let items: Item[] = [];
@@ -14,7 +14,7 @@ export let center = false;
let open = false;
const handleClickOutside = (event: MouseEvent) => {
- if (!(event.target as HTMLElement).closest('.dropdown')) open = false;
+ if (!(event.target as HTMLElement).closest(".dropdown")) open = false;
};
</script>
diff --git a/src/lib/Layout/NumberTicker.svelte b/src/lib/Layout/NumberTicker.svelte
index 61e1757d..67d19fa0 100644
--- a/src/lib/Layout/NumberTicker.svelte
+++ b/src/lib/Layout/NumberTicker.svelte
@@ -1,6 +1,6 @@
<script>
-import { tweened } from 'svelte/motion';
-import { cubicOut } from 'svelte/easing';
+import { tweened } from "svelte/motion";
+import { cubicOut } from "svelte/easing";
export let start = 0;
export let end = 100;
@@ -8,13 +8,13 @@ export let duration = 2000;
export let delay = 0;
const count = tweened(start, {
- duration: duration,
- easing: cubicOut,
- delay: delay
+ duration: duration,
+ easing: cubicOut,
+ delay: delay,
});
$: {
- count.set(end);
+ count.set(end);
}
</script>
diff --git a/src/lib/Layout/Popup.svelte b/src/lib/Layout/Popup.svelte
index 92261a5b..103e4e26 100644
--- a/src/lib/Layout/Popup.svelte
+++ b/src/lib/Layout/Popup.svelte
@@ -1,9 +1,9 @@
<script lang="ts">
-import { browser } from '$app/environment';
-import { onMount } from 'svelte';
+import { browser } from "$app/environment";
+import { onMount } from "svelte";
export let onLeave = () => {
- return;
+ return;
};
export let card = true;
export let smallCard = false;
@@ -13,24 +13,24 @@ export let locked = false;
export let center = false;
const handleClickOutside = (event: MouseEvent) => {
- if (!locked && (event.target as HTMLElement).classList.contains('popup')) {
- show = false;
+ if (!locked && (event.target as HTMLElement).classList.contains("popup")) {
+ show = false;
- onLeave();
- }
+ onLeave();
+ }
};
onMount(() => {
- if (browser) document.body.style.overflow = 'auto';
+ if (browser) document.body.style.overflow = "auto";
});
$: {
- if (browser) {
- document.body.style.overflow = 'auto';
+ if (browser) {
+ document.body.style.overflow = "auto";
- if (show) document.body.style.overflow = 'hidden';
- else document.body.style.overflow = 'auto';
- }
+ if (show) document.body.style.overflow = "hidden";
+ else document.body.style.overflow = "auto";
+ }
}
</script>
diff --git a/src/lib/Layout/Spacer.svelte b/src/lib/Layout/Spacer.svelte
index a4ecef18..a3fb1497 100644
--- a/src/lib/Layout/Spacer.svelte
+++ b/src/lib/Layout/Spacer.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
-export let size: 'sm' | 'md' | 'lg' = 'md';
+export let size: "sm" | "md" | "lg" = "md";
</script>
<div class="spacer {size}"></div>
diff --git a/src/lib/Layout/TextTransition.svelte b/src/lib/Layout/TextTransition.svelte
index 13a4ed9b..a31b3ae3 100644
--- a/src/lib/Layout/TextTransition.svelte
+++ b/src/lib/Layout/TextTransition.svelte
@@ -1,23 +1,23 @@
<script>
-import { tweened } from 'svelte/motion';
-import { cubicOut } from 'svelte/easing';
+import { tweened } from "svelte/motion";
+import { cubicOut } from "svelte/easing";
-export let text = '';
+export let text = "";
export let opacityTransitionDuration = 50;
export let blurTransitionDuration = opacityTransitionDuration;
export let easing = cubicOut;
-let previousValue = '';
+let previousValue = "";
let opacity = tweened(1, { duration: opacityTransitionDuration, easing });
let blur = tweened(0, { duration: blurTransitionDuration, easing });
$: {
- if (text !== previousValue)
- Promise.all([opacity.set(0), blur.set(10)]).then(() => {
- previousValue = text;
+ if (text !== previousValue)
+ Promise.all([opacity.set(0), blur.set(10)]).then(() => {
+ previousValue = text;
- Promise.all([opacity.set(1), blur.set(0)]);
- });
+ Promise.all([opacity.set(1), blur.set(0)]);
+ });
}
</script>