Skip to content

Commit 2d3f9f8

Browse files
committed
Format project (fix lint failure)
1 parent d3fc7da commit 2d3f9f8

File tree

20 files changed

+129
-56
lines changed

20 files changed

+129
-56
lines changed

packages/svelte-ux/src/lib/components/AppBar.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626
</script>
2727

2828
<header
29-
class={cls('AppBar', 'px-4 flex items-center relative z-50', settingsClasses.root, $$restProps.class)}
29+
class={cls(
30+
'AppBar',
31+
'px-4 flex items-center relative z-50',
32+
settingsClasses.root,
33+
$$restProps.class
34+
)}
3035
>
3136
<Button icon={mdiMenu} on:click={() => ($showDrawer = !$showDrawer)} class="p-3" />
3237
{#if $$slots.title}

packages/svelte-ux/src/lib/components/Checkbox.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@
4747
}
4848
</script>
4949

50-
<div class={cls('Checkbox', 'inline-flex items-center', settingsClasses.root, classes.root, $$props.class)}>
50+
<div
51+
class={cls(
52+
'Checkbox',
53+
'inline-flex items-center',
54+
settingsClasses.root,
55+
classes.root,
56+
$$props.class
57+
)}
58+
>
5159
<input
5260
{id}
5361
{name}

packages/svelte-ux/src/lib/components/Collapse.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@
9090
</button>
9191

9292
{#if open}
93-
<div transition:transition={transitionParams} class={cls(settingsClasses.content, classes.content)}>
93+
<div
94+
transition:transition={transitionParams}
95+
class={cls(settingsClasses.content, classes.content)}
96+
>
9497
<slot {open} />
9598
</div>
9699
{/if}

packages/svelte-ux/src/lib/components/Dialog.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@
131131

132132
<slot name="header">
133133
{#if $$slots.title}
134-
<div class={cls('text-xl font-bold pt-4 pb-2 px-6', settingsClasses.title, classes.title)}>
134+
<div
135+
class={cls('text-xl font-bold pt-4 pb-2 px-6', settingsClasses.title, classes.title)}
136+
>
135137
<slot name="title" />
136138
</div>
137139
{/if}

packages/svelte-ux/src/lib/components/Icon.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@
6565
.then((resp) => resp.text())
6666
.catch(() => {
6767
// Failed request, remove promise so fetched again
68-
if (svgUrl && typeof(svgUrl) === "string") {
68+
if (svgUrl && typeof svgUrl === 'string') {
6969
cache.delete(svgUrl);
7070
}
7171
// TODO: Consider showing error icon
7272
// throw e;
73-
return "";
73+
return '';
7474
});
7575
cache.set(svgUrl, promise);
7676
promise.then((text) => {

packages/svelte-ux/src/lib/components/ListItem.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@
9393

9494
<slot name="subheading">
9595
{#if subheading != null}
96-
<div class={cls('text-sm text-surface-content/50', settingsClasses.subheading, classes.subheading)}>
96+
<div
97+
class={cls(
98+
'text-sm text-surface-content/50',
99+
settingsClasses.subheading,
100+
classes.subheading
101+
)}
102+
>
97103
{subheading}
98104
</div>
99105
{/if}
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<script lang="ts">
2-
let self: ConstructorOfATypedSvelteComponent | undefined | null = undefined;
3-
export { self as this }
4-
5-
let component;
2+
let self: ConstructorOfATypedSvelteComponent | undefined | null = undefined;
3+
export { self as this };
64
5+
let component;
76
</script>
87

98
{#if self}
10-
<svelte:component bind:this={component} this={self} {...$$restProps}>
11-
<slot {component} />
12-
</svelte:component>
9+
<svelte:component this={self} bind:this={component} {...$$restProps}>
10+
<slot {component} />
11+
</svelte:component>
1312
{:else}
14-
<slot />
15-
{/if}
13+
<slot />
14+
{/if}

packages/svelte-ux/src/lib/components/MenuItem.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
import Button from './Button.svelte';
33
import type { ComponentProps } from '../types';
44
import { cls } from '../utils/styles';
5-
import { scrollIntoView as scrollIntoViewAction, type ScrollIntoViewOptions } from '../actions/scroll';
5+
import {
6+
scrollIntoView as scrollIntoViewAction,
7+
type ScrollIntoViewOptions,
8+
} from '../actions/scroll';
69
import { setButtonGroup } from './ButtonGroup.svelte';
710
import { getComponentClasses } from './theme';
811
import { settings, getSettings } from './settings';
@@ -22,7 +25,10 @@
2225
const settingsClasses = getComponentClasses('MenuItem');
2326
2427
let scrollOptions: ScrollIntoViewOptions;
25-
$: scrollOptions = typeof(scrollIntoView) === "boolean" ? { condition: scrollIntoView } as ScrollIntoViewOptions : scrollIntoView;
28+
$: scrollOptions =
29+
typeof scrollIntoView === 'boolean'
30+
? ({ condition: scrollIntoView } as ScrollIntoViewOptions)
31+
: scrollIntoView;
2632
2733
// Clear ButtonGroup if set
2834
setButtonGroup(undefined);

packages/svelte-ux/src/lib/components/MonthList.svelte

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
return disabledMonths instanceof Function
1515
? disabledMonths(date)
1616
: disabledMonths instanceof Date
17-
? isSameMonth(date, disabledMonths)
18-
: disabledMonths instanceof Array
19-
? disabledMonths.some((d) => isSameMonth(date, d))
20-
: disabledMonths instanceof Object
21-
? isWithinInterval(date, {
22-
start: startOfMonth(disabledMonths.from),
23-
end: endOfMonth(disabledMonths.to || disabledMonths.from),
24-
})
25-
: false;
17+
? isSameMonth(date, disabledMonths)
18+
: disabledMonths instanceof Array
19+
? disabledMonths.some((d) => isSameMonth(date, d))
20+
: disabledMonths instanceof Object
21+
? isWithinInterval(date, {
22+
start: startOfMonth(disabledMonths.from),
23+
end: endOfMonth(disabledMonths.to || disabledMonths.from),
24+
})
25+
: false;
2626
};
2727
</script>
2828

packages/svelte-ux/src/lib/components/Pagination.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@
4444

4545
{#if $pagination.totalPages > 1 || !hideSinglePage}
4646
<div
47-
class={cls('Pagination', 'flex items-center gap-1', settingsClasses.root, classes.root, $$props.class)}
47+
class={cls(
48+
'Pagination',
49+
'flex items-center gap-1',
50+
settingsClasses.root,
51+
classes.root,
52+
$$props.class
53+
)}
4854
>
4955
{#each show as component}
5056
{#if component === 'actions'}

0 commit comments

Comments
 (0)