@spaethtech/svelte-ui 0.20.1-dev.103.a762c22 → 0.20.1-dev.99.8654270
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.
- package/dist/components/Alert.svelte +6 -15
- package/dist/components/Alert.svelte.d.ts +1 -4
- package/dist/components/Avatar/Avatar.svelte +2 -4
- package/dist/components/Avatar/Avatar.svelte.d.ts +1 -2
- package/dist/components/Avatar/AvatarGroup.svelte +1 -4
- package/dist/components/Avatar/AvatarGroup.svelte.d.ts +1 -2
- package/dist/components/Badge/Badge.svelte +2 -9
- package/dist/components/Badge/Badge.svelte.d.ts +1 -2
- package/dist/components/Banner.svelte +1 -4
- package/dist/components/Banner.svelte.d.ts +1 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.svelte +2 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.svelte.d.ts +1 -2
- package/dist/components/CardFooter.svelte +1 -12
- package/dist/components/CardFooter.svelte.d.ts +0 -3
- package/dist/components/Carousel/Carousel.svelte +1 -4
- package/dist/components/Carousel/Carousel.svelte.d.ts +1 -2
- package/dist/components/Chip/Chip.svelte +1 -4
- package/dist/components/Chip/Chip.svelte.d.ts +1 -2
- package/dist/components/Combobox/Combobox.svelte +1 -4
- package/dist/components/Combobox/Combobox.svelte.d.ts +1 -2
- package/dist/components/CommandPalette/CommandPalette.svelte +2 -4
- package/dist/components/CommandPalette/CommandPalette.svelte.d.ts +1 -2
- package/dist/components/ConfirmDialog.svelte +1 -4
- package/dist/components/ConfirmDialog.svelte.d.ts +1 -2
- package/dist/components/ContextMenu/ContextMenu.svelte +2 -4
- package/dist/components/ContextMenu/ContextMenu.svelte.d.ts +1 -2
- package/dist/components/DataTable.svelte +1 -4
- package/dist/components/DataTable.svelte.d.ts +1 -2
- package/dist/components/DatePicker.svelte +2 -4
- package/dist/components/DatePicker.svelte.d.ts +1 -2
- package/dist/components/Divider/Divider.svelte +3 -6
- package/dist/components/Divider/Divider.svelte.d.ts +1 -2
- package/dist/components/Drawer/Drawer.svelte +1 -4
- package/dist/components/Drawer/Drawer.svelte.d.ts +1 -2
- package/dist/components/EmailInput.svelte +1 -2
- package/dist/components/EmailInput.svelte.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.svelte +2 -4
- package/dist/components/EmptyState/EmptyState.svelte.d.ts +1 -2
- package/dist/components/FileUpload/FileUpload.svelte +2 -4
- package/dist/components/FileUpload/FileUpload.svelte.d.ts +1 -2
- package/dist/components/Grid.svelte +2 -4
- package/dist/components/Grid.svelte.d.ts +1 -2
- package/dist/components/Kbd/Kbd.svelte +3 -5
- package/dist/components/Kbd/Kbd.svelte.d.ts +1 -2
- package/dist/components/List.svelte +2 -4
- package/dist/components/List.svelte.d.ts +1 -2
- package/dist/components/Menu.svelte +1 -4
- package/dist/components/Menu.svelte.d.ts +1 -2
- package/dist/components/NumberInput.svelte +1 -2
- package/dist/components/NumberInput.svelte.d.ts +1 -2
- package/dist/components/Pagination/Pagination.svelte +1 -4
- package/dist/components/Pagination/Pagination.svelte.d.ts +1 -2
- package/dist/components/PasswordInput.svelte +1 -2
- package/dist/components/PasswordInput.svelte.d.ts +1 -2
- package/dist/components/Popup.svelte +1 -8
- package/dist/components/Popup.svelte.d.ts +1 -2
- package/dist/components/Progress/Progress.svelte +2 -4
- package/dist/components/Progress/Progress.svelte.d.ts +1 -2
- package/dist/components/Query.svelte +2 -4
- package/dist/components/Query.svelte.d.ts +1 -2
- package/dist/components/ScrollArea/ScrollArea.svelte +2 -5
- package/dist/components/ScrollArea/ScrollArea.svelte.d.ts +1 -2
- package/dist/components/SearchInput.svelte +1 -2
- package/dist/components/SearchInput.svelte.d.ts +1 -2
- package/dist/components/Select.svelte +1 -3
- package/dist/components/Select.svelte.d.ts +1 -3
- package/dist/components/SideBarMenu/SideBarMenu.svelte +1 -7
- package/dist/components/SideBarMenu/SideBarMenu.svelte.d.ts +1 -2
- package/dist/components/Skeleton/Skeleton.svelte +2 -7
- package/dist/components/Skeleton/Skeleton.svelte.d.ts +1 -2
- package/dist/components/Slider/Slider.svelte +2 -4
- package/dist/components/Slider/Slider.svelte.d.ts +1 -2
- package/dist/components/Spinner/Spinner.svelte +1 -4
- package/dist/components/Spinner/Spinner.svelte.d.ts +1 -2
- package/dist/components/Splitter/Splitter.svelte +1 -4
- package/dist/components/Splitter/Splitter.svelte.d.ts +1 -2
- package/dist/components/Stat/Stat.svelte +2 -4
- package/dist/components/Stat/Stat.svelte.d.ts +1 -2
- package/dist/components/Stepper/Stepper.svelte +1 -4
- package/dist/components/Stepper/Stepper.svelte.d.ts +1 -2
- package/dist/components/ThemeSelector.svelte +2 -10
- package/dist/components/ThemeSelector.svelte.d.ts +1 -2
- package/dist/components/ThemeToggle.svelte +1 -10
- package/dist/components/ThemeToggle.svelte.d.ts +1 -2
- package/dist/components/TimeRangeInput.svelte +1 -5
- package/dist/components/TimeRangeInput.svelte.d.ts +1 -3
- package/dist/components/Timeline/Timeline.svelte +2 -4
- package/dist/components/Timeline/Timeline.svelte.d.ts +1 -2
- package/dist/components/TokenInput/TokenInput.svelte +1 -6
- package/dist/components/TokenInput/TokenInput.svelte.d.ts +1 -2
- package/dist/components/Tree/Tree.svelte +2 -11
- package/dist/components/Tree/Tree.svelte.d.ts +1 -2
- package/docs/components.md +1 -5
- package/package.json +1 -1
- package/dist/components/field-chrome.d.ts +0 -22
- package/dist/components/field-chrome.js +0 -1
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import type { Snippet } from "svelte";
|
|
10
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
11
10
|
import Menu from "../Menu.svelte";
|
|
12
11
|
import type { MenuItem } from "../../data/table/types.js";
|
|
13
12
|
import type { Variant } from "../../types/variants.js";
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
disabled = false,
|
|
22
21
|
class: cls = "",
|
|
23
22
|
children,
|
|
24
|
-
...rest
|
|
25
23
|
}: {
|
|
26
24
|
items: MenuItem[];
|
|
27
25
|
size?: Responsive<Size>;
|
|
@@ -29,7 +27,7 @@
|
|
|
29
27
|
disabled?: boolean;
|
|
30
28
|
class?: string;
|
|
31
29
|
children: Snippet;
|
|
32
|
-
}
|
|
30
|
+
} = $props();
|
|
33
31
|
|
|
34
32
|
let open = $state(false);
|
|
35
33
|
let anchorEl = $state<HTMLElement>();
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
</script>
|
|
47
45
|
|
|
48
46
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
49
|
-
<div
|
|
47
|
+
<div class="contents {cls}" oncontextmenu={onContextMenu}>
|
|
50
48
|
{@render children()}
|
|
51
49
|
</div>
|
|
52
50
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { MenuItem } from "../../data/table/types.js";
|
|
4
3
|
import type { Variant } from "../../types/variants.js";
|
|
5
4
|
import type { Size } from "../../types/sizes.js";
|
|
@@ -11,7 +10,7 @@ type $$ComponentProps = {
|
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
class?: string;
|
|
13
12
|
children: Snippet;
|
|
14
|
-
}
|
|
13
|
+
};
|
|
15
14
|
declare const ContextMenu: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
16
15
|
type ContextMenu = ReturnType<typeof ContextMenu>;
|
|
17
16
|
export default ContextMenu;
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
import { uiI18n } from "../i18n.js";
|
|
14
14
|
const i18n = uiI18n();
|
|
15
15
|
import type { Snippet } from "svelte";
|
|
16
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
17
16
|
import IconDots from "~icons/mdi/dots-vertical";
|
|
18
17
|
import IconBulk from "~icons/mdi/format-list-checks";
|
|
19
18
|
import IconSortAsc from "~icons/mdi/sort-ascending";
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
truncate = true,
|
|
52
51
|
borderless = false,
|
|
53
52
|
variant,
|
|
54
|
-
...rest
|
|
55
53
|
}: {
|
|
56
54
|
grid: DataGrid<T>;
|
|
57
55
|
selectable?: boolean;
|
|
@@ -99,7 +97,7 @@
|
|
|
99
97
|
* `ghost` additionally drops ALL section fills (bands + body) for a bare,
|
|
100
98
|
* see-through table. Omit for the default grey tint. */
|
|
101
99
|
variant?: Variant;
|
|
102
|
-
}
|
|
100
|
+
} = $props();
|
|
103
101
|
|
|
104
102
|
/** When a variant is set, override --ui-accent so the shared interactive
|
|
105
103
|
* tints re-mix from that colour (the `.ui-accent` class on the root does
|
|
@@ -230,7 +228,6 @@
|
|
|
230
228
|
</script>
|
|
231
229
|
|
|
232
230
|
<div
|
|
233
|
-
{...rest}
|
|
234
231
|
role="table"
|
|
235
232
|
class="ui-accent relative [color:var(--ui-color-text)]"
|
|
236
233
|
style="font-size: {textVar}; {accentVar}"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { MenuItem, DataGrid } from "../data/table/index.js";
|
|
4
3
|
import type { Size } from "../types/sizes.js";
|
|
5
4
|
import { type Responsive } from "../types/responsive.js";
|
|
@@ -52,7 +51,7 @@ declare function $$render<T>(): {
|
|
|
52
51
|
* `ghost` additionally drops ALL section fills (bands + body) for a bare,
|
|
53
52
|
* see-through table. Omit for the default grey tint. */
|
|
54
53
|
variant?: Variant;
|
|
55
|
-
}
|
|
54
|
+
};
|
|
56
55
|
exports: {};
|
|
57
56
|
bindings: "";
|
|
58
57
|
slots: {};
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
<script lang="ts">
|
|
16
16
|
import { uiI18n } from "../i18n.js";
|
|
17
17
|
const i18n = uiI18n();
|
|
18
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
19
18
|
import type { Size } from "../types/sizes.js";
|
|
20
19
|
import { responsiveClasses, type Responsive } from "../types/responsive.js";
|
|
21
20
|
import { variantToken, type Variant } from "../types/variants.js";
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
import IconClose from "~icons/mdi/close";
|
|
29
28
|
|
|
30
29
|
type RangeValue = { start: string | null; end: string | null };
|
|
31
|
-
interface Props
|
|
30
|
+
interface Props {
|
|
32
31
|
value?: string | RangeValue | null;
|
|
33
32
|
range?: boolean;
|
|
34
33
|
time?: boolean;
|
|
@@ -67,7 +66,6 @@
|
|
|
67
66
|
variant = "primary",
|
|
68
67
|
class: cls = "",
|
|
69
68
|
name,
|
|
70
|
-
...rest
|
|
71
69
|
}: Props = $props();
|
|
72
70
|
|
|
73
71
|
const accent = $derived(`var(${variantToken[variant]})`);
|
|
@@ -180,7 +178,7 @@
|
|
|
180
178
|
}
|
|
181
179
|
</script>
|
|
182
180
|
|
|
183
|
-
<div
|
|
181
|
+
<div bind:this={anchorEl} class="w-full {cls}">
|
|
184
182
|
<Input
|
|
185
183
|
value={label}
|
|
186
184
|
readonly
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
1
|
import type { Size } from "../types/sizes.js";
|
|
3
2
|
import { type Responsive } from "../types/responsive.js";
|
|
4
3
|
import { type Variant } from "../types/variants.js";
|
|
@@ -7,7 +6,7 @@ type RangeValue = {
|
|
|
7
6
|
start: string | null;
|
|
8
7
|
end: string | null;
|
|
9
8
|
};
|
|
10
|
-
interface Props
|
|
9
|
+
interface Props {
|
|
11
10
|
value?: string | RangeValue | null;
|
|
12
11
|
range?: boolean;
|
|
13
12
|
time?: boolean;
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import type { Snippet } from "svelte";
|
|
10
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
11
10
|
|
|
12
11
|
let {
|
|
13
12
|
orientation = "horizontal",
|
|
@@ -15,14 +14,13 @@
|
|
|
15
14
|
labelAlign = "center",
|
|
16
15
|
class: cls = "",
|
|
17
16
|
children,
|
|
18
|
-
...rest
|
|
19
17
|
}: {
|
|
20
18
|
orientation?: "horizontal" | "vertical";
|
|
21
19
|
label?: string;
|
|
22
20
|
labelAlign?: "start" | "center" | "end";
|
|
23
21
|
class?: string;
|
|
24
22
|
children?: Snippet;
|
|
25
|
-
}
|
|
23
|
+
} = $props();
|
|
26
24
|
|
|
27
25
|
const hasLabel = $derived(orientation === "horizontal" && (!!label || !!children));
|
|
28
26
|
</script>
|
|
@@ -32,10 +30,9 @@
|
|
|
32
30
|
role="separator"
|
|
33
31
|
aria-orientation="vertical"
|
|
34
32
|
class="inline-block w-px self-stretch [background-color:var(--ui-border-color)] {cls}"
|
|
35
|
-
{...rest}
|
|
36
33
|
></div>
|
|
37
34
|
{:else if hasLabel}
|
|
38
|
-
<div role="separator" aria-orientation="horizontal" class="flex items-center gap-3 {cls}"
|
|
35
|
+
<div role="separator" aria-orientation="horizontal" class="flex items-center gap-3 {cls}">
|
|
39
36
|
{#if labelAlign !== "start"}
|
|
40
37
|
<div class="h-px flex-1 [background-color:var(--ui-border-color)]"></div>
|
|
41
38
|
{/if}
|
|
@@ -47,5 +44,5 @@
|
|
|
47
44
|
{/if}
|
|
48
45
|
</div>
|
|
49
46
|
{:else}
|
|
50
|
-
<hr class="w-full border-0 h-px [background-color:var(--ui-border-color)] {cls}"
|
|
47
|
+
<hr class="w-full border-0 h-px [background-color:var(--ui-border-color)] {cls}" />
|
|
51
48
|
{/if}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
type $$ComponentProps = {
|
|
4
3
|
orientation?: "horizontal" | "vertical";
|
|
5
4
|
label?: string;
|
|
6
5
|
labelAlign?: "start" | "center" | "end";
|
|
7
6
|
class?: string;
|
|
8
7
|
children?: Snippet;
|
|
9
|
-
}
|
|
8
|
+
};
|
|
10
9
|
declare const Divider: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
10
|
type Divider = ReturnType<typeof Divider>;
|
|
12
11
|
export default Divider;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
-->
|
|
9
9
|
<script lang="ts">
|
|
10
10
|
import type { Snippet } from "svelte";
|
|
11
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
12
11
|
import { cubicOut } from "svelte/easing";
|
|
13
12
|
import type { TransitionConfig } from "svelte/transition";
|
|
14
13
|
import { fade } from "svelte/transition";
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
ariaLabel,
|
|
34
33
|
class: cls = "",
|
|
35
34
|
children,
|
|
36
|
-
...rest
|
|
37
35
|
}: {
|
|
38
36
|
open?: boolean;
|
|
39
37
|
side?: "left" | "right" | "top" | "bottom";
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
ariaLabel?: string;
|
|
47
45
|
class?: string;
|
|
48
46
|
children?: Snippet;
|
|
49
|
-
}
|
|
47
|
+
} = $props();
|
|
50
48
|
|
|
51
49
|
const FOCUSABLE =
|
|
52
50
|
'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
@@ -171,7 +169,6 @@
|
|
|
171
169
|
></div>
|
|
172
170
|
{/if}
|
|
173
171
|
<div
|
|
174
|
-
{...rest}
|
|
175
172
|
bind:this={panelEl}
|
|
176
173
|
class="fixed {sideClass} overflow-auto z-[10000] shadow-xl [background-color:var(--ui-color-background)] [border-color:var(--ui-border-color)] {cls}"
|
|
177
174
|
style={panelStyle}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
interface DrawerShowContext {
|
|
4
3
|
panel: HTMLElement;
|
|
5
4
|
autoFocus: string | HTMLElement | false;
|
|
@@ -19,7 +18,7 @@ type $$ComponentProps = {
|
|
|
19
18
|
ariaLabel?: string;
|
|
20
19
|
class?: string;
|
|
21
20
|
children?: Snippet;
|
|
22
|
-
}
|
|
21
|
+
};
|
|
23
22
|
declare const Drawer: import("svelte").Component<$$ComponentProps, {}, "open">;
|
|
24
23
|
type Drawer = ReturnType<typeof Drawer>;
|
|
25
24
|
export default Drawer;
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
import type { Size } from "../types/sizes.js";
|
|
6
6
|
import type { Responsive } from "../types/responsive.js";
|
|
7
7
|
import type { Variant } from "../types/variants.js";
|
|
8
|
-
import type { FieldChromeProps } from "./field-chrome.js";
|
|
9
8
|
|
|
10
|
-
interface Props extends Omit<HTMLInputAttributes, "type" | "size"
|
|
9
|
+
interface Props extends Omit<HTMLInputAttributes, "type" | "size"> {
|
|
11
10
|
value: string;
|
|
12
11
|
class?: string;
|
|
13
12
|
inputClass?: string;
|
|
@@ -2,8 +2,7 @@ import type { HTMLInputAttributes } from "svelte/elements";
|
|
|
2
2
|
import type { Size } from "../types/sizes.js";
|
|
3
3
|
import type { Responsive } from "../types/responsive.js";
|
|
4
4
|
import type { Variant } from "../types/variants.js";
|
|
5
|
-
|
|
6
|
-
interface Props extends Omit<HTMLInputAttributes, "type" | "size">, FieldChromeProps {
|
|
5
|
+
interface Props extends Omit<HTMLInputAttributes, "type" | "size"> {
|
|
7
6
|
value: string;
|
|
8
7
|
class?: string;
|
|
9
8
|
inputClass?: string;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import type { Snippet } from "svelte";
|
|
9
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
10
9
|
import IconInbox from "~icons/mdi/inbox-outline";
|
|
11
10
|
import type { Variant } from "../../types/variants.js";
|
|
12
11
|
import { variantToken } from "../../types/variants.js";
|
|
@@ -22,7 +21,6 @@
|
|
|
22
21
|
size = "md",
|
|
23
22
|
class: cls = "",
|
|
24
23
|
children,
|
|
25
|
-
...rest
|
|
26
24
|
}: {
|
|
27
25
|
title?: string;
|
|
28
26
|
description?: string;
|
|
@@ -34,7 +32,7 @@
|
|
|
34
32
|
size?: Responsive<Size>;
|
|
35
33
|
class?: string;
|
|
36
34
|
children?: Snippet;
|
|
37
|
-
}
|
|
35
|
+
} = $props();
|
|
38
36
|
|
|
39
37
|
const token = $derived(variantToken[variant]);
|
|
40
38
|
const iconBox: Record<Size, string> = {
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
const padSize: Record<Size, string> = { sm: "py-6 gap-2", md: "py-10 gap-3", lg: "py-16 gap-4" };
|
|
47
45
|
</script>
|
|
48
46
|
|
|
49
|
-
<div class="flex flex-col items-center text-center {responsiveClasses(size, padSize)} {cls}"
|
|
47
|
+
<div class="flex flex-col items-center text-center {responsiveClasses(size, padSize)} {cls}">
|
|
50
48
|
<div
|
|
51
49
|
class="inline-flex items-center justify-center rounded-full {responsiveClasses(size, iconBox)}"
|
|
52
50
|
style="background-color: color-mix(in srgb, var({token}) 14%, transparent); color: color-mix(in srgb, var({token}) var(--ui-tint-strong), var(--ui-color-text));"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { Variant } from "../../types/variants.js";
|
|
4
3
|
import type { Size } from "../../types/sizes.js";
|
|
5
4
|
import { type Responsive } from "../../types/responsive.js";
|
|
@@ -14,7 +13,7 @@ type $$ComponentProps = {
|
|
|
14
13
|
size?: Responsive<Size>;
|
|
15
14
|
class?: string;
|
|
16
15
|
children?: Snippet;
|
|
17
|
-
}
|
|
16
|
+
};
|
|
18
17
|
declare const EmptyState: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
19
18
|
type EmptyState = ReturnType<typeof EmptyState>;
|
|
20
19
|
export default EmptyState;
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
const i18n = uiI18n();
|
|
12
12
|
import { onDestroy, untrack } from "svelte";
|
|
13
13
|
import type { Snippet } from "svelte";
|
|
14
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
15
14
|
import FieldChrome, { nextFieldId } from "../FieldChrome.svelte";
|
|
16
15
|
import Button from "../Button.svelte";
|
|
17
16
|
import Progress from "../Progress/Progress.svelte";
|
|
@@ -40,7 +39,6 @@
|
|
|
40
39
|
id,
|
|
41
40
|
required = false,
|
|
42
41
|
class: cls = "",
|
|
43
|
-
...rest
|
|
44
42
|
}: {
|
|
45
43
|
files?: File[];
|
|
46
44
|
accept?: string;
|
|
@@ -58,7 +56,7 @@
|
|
|
58
56
|
id?: string;
|
|
59
57
|
required?: boolean;
|
|
60
58
|
class?: string;
|
|
61
|
-
}
|
|
59
|
+
} = $props();
|
|
62
60
|
|
|
63
61
|
const controlId = id ?? nextFieldId();
|
|
64
62
|
let inputEl = $state<HTMLInputElement>();
|
|
@@ -120,7 +118,7 @@
|
|
|
120
118
|
|
|
121
119
|
<FieldChrome {label} {aside} error={error ?? (reject || null)} {description} {required} {controlId} {size} class={cls}>
|
|
122
120
|
{#snippet control({ describedBy })}
|
|
123
|
-
<div
|
|
121
|
+
<div class="flex flex-col gap-2">
|
|
124
122
|
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
125
123
|
<div
|
|
126
124
|
role="button"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { Variant } from "../../types/variants.js";
|
|
4
3
|
import type { Size } from "../../types/sizes.js";
|
|
5
4
|
import { type Responsive } from "../../types/responsive.js";
|
|
@@ -20,7 +19,7 @@ type $$ComponentProps = {
|
|
|
20
19
|
id?: string;
|
|
21
20
|
required?: boolean;
|
|
22
21
|
class?: string;
|
|
23
|
-
}
|
|
22
|
+
};
|
|
24
23
|
declare const FileUpload: import("svelte").Component<$$ComponentProps, {}, "files">;
|
|
25
24
|
type FileUpload = ReturnType<typeof FileUpload>;
|
|
26
25
|
export default FileUpload;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import type { Snippet } from "svelte";
|
|
13
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
14
13
|
import { gridColsClass, gapClass, type Columns, type Gap } from "./field-group.js";
|
|
15
14
|
|
|
16
15
|
let {
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
gap = 4,
|
|
19
18
|
class: cls = "",
|
|
20
19
|
children,
|
|
21
|
-
...rest
|
|
22
20
|
}: {
|
|
23
21
|
/** Track count — a number (1–6) or a responsive map like `{ base: 1, md: 3 }`. Default 1. */
|
|
24
22
|
columns?: Columns;
|
|
@@ -26,11 +24,11 @@
|
|
|
26
24
|
gap?: Gap;
|
|
27
25
|
class?: string;
|
|
28
26
|
children: Snippet;
|
|
29
|
-
}
|
|
27
|
+
} = $props();
|
|
30
28
|
|
|
31
29
|
const gridClass = $derived(`grid ${gridColsClass(columns)} ${gapClass(gap, 4)}`);
|
|
32
30
|
</script>
|
|
33
31
|
|
|
34
|
-
<div class="{gridClass} {cls}"
|
|
32
|
+
<div class="{gridClass} {cls}">
|
|
35
33
|
{@render children()}
|
|
36
34
|
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import { type Columns, type Gap } from "./field-group.js";
|
|
4
3
|
type $$ComponentProps = {
|
|
5
4
|
/** Track count — a number (1–6) or a responsive map like `{ base: 1, md: 3 }`. Default 1. */
|
|
@@ -8,7 +7,7 @@ type $$ComponentProps = {
|
|
|
8
7
|
gap?: Gap;
|
|
9
8
|
class?: string;
|
|
10
9
|
children: Snippet;
|
|
11
|
-
}
|
|
10
|
+
};
|
|
12
11
|
declare const Grid: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
12
|
type Grid = ReturnType<typeof Grid>;
|
|
14
13
|
export default Grid;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
-->
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import type { Snippet } from "svelte";
|
|
9
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
10
9
|
import type { Size } from "../../types/sizes.js";
|
|
11
10
|
import { responsiveClasses, type Responsive } from "../../types/responsive.js";
|
|
12
11
|
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
size = "md",
|
|
17
16
|
class: cls = "",
|
|
18
17
|
children,
|
|
19
|
-
...rest
|
|
20
18
|
}: {
|
|
21
19
|
/** A combo — each string is rendered as its own keycap, joined with "+". */
|
|
22
20
|
keys?: string[];
|
|
@@ -25,7 +23,7 @@
|
|
|
25
23
|
size?: Responsive<Size>;
|
|
26
24
|
class?: string;
|
|
27
25
|
children?: Snippet;
|
|
28
|
-
}
|
|
26
|
+
} = $props();
|
|
29
27
|
|
|
30
28
|
const list = $derived(keys ?? null);
|
|
31
29
|
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
</script>
|
|
41
39
|
|
|
42
40
|
{#if list}
|
|
43
|
-
<span class="inline-flex items-center gap-1 {cls}"
|
|
41
|
+
<span class="inline-flex items-center gap-1 {cls}">
|
|
44
42
|
{#each list as k, i (i)}
|
|
45
43
|
{#if i > 0}<span class="text-xs [color:color-mix(in_srgb,var(--ui-color-text)_50%,transparent)]"
|
|
46
44
|
>+</span
|
|
@@ -49,7 +47,7 @@
|
|
|
49
47
|
{/each}
|
|
50
48
|
</span>
|
|
51
49
|
{:else}
|
|
52
|
-
<kbd class="{cap} {responsiveClasses(size, capSize)} {cls}"
|
|
50
|
+
<kbd class="{cap} {responsiveClasses(size, capSize)} {cls}"
|
|
53
51
|
>{#if children}{@render children()}{:else}{text}{/if}</kbd
|
|
54
52
|
>
|
|
55
53
|
{/if}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { Size } from "../../types/sizes.js";
|
|
4
3
|
import { type Responsive } from "../../types/responsive.js";
|
|
5
4
|
type $$ComponentProps = {
|
|
@@ -10,7 +9,7 @@ type $$ComponentProps = {
|
|
|
10
9
|
size?: Responsive<Size>;
|
|
11
10
|
class?: string;
|
|
12
11
|
children?: Snippet;
|
|
13
|
-
}
|
|
12
|
+
};
|
|
14
13
|
declare const Kbd: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
15
14
|
type Kbd = ReturnType<typeof Kbd>;
|
|
16
15
|
export default Kbd;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const i18n = uiI18n();
|
|
4
4
|
import { untrack } from "svelte";
|
|
5
5
|
import type { Snippet } from "svelte";
|
|
6
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
7
6
|
import type { Size } from "../types/sizes.js";
|
|
8
7
|
import { responsiveClasses, type Responsive } from "../types/responsive.js";
|
|
9
8
|
import { variantToken, type Variant } from "../types/variants.js";
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
label: string;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
|
-
interface Props
|
|
15
|
+
interface Props {
|
|
17
16
|
options: Option[];
|
|
18
17
|
value?: string | string[]; // Bindable selected value - string[] when multiSelect is true
|
|
19
18
|
multiSelect?: boolean; // Enable multi-select mode
|
|
@@ -82,7 +81,6 @@
|
|
|
82
81
|
onLoadStart,
|
|
83
82
|
onLoadEnd,
|
|
84
83
|
onSelection,
|
|
85
|
-
...rest
|
|
86
84
|
}: Props = $props();
|
|
87
85
|
|
|
88
86
|
// Size axis (see types/sizes.ts): option text scales with the trigger (forwarded by Select).
|
|
@@ -501,7 +499,7 @@
|
|
|
501
499
|
});
|
|
502
500
|
</script>
|
|
503
501
|
|
|
504
|
-
<div class="relative {className}"
|
|
502
|
+
<div class="relative {className}">
|
|
505
503
|
<div class="relative">
|
|
506
504
|
<div
|
|
507
505
|
bind:this={listElement}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import type { Size } from "../types/sizes.js";
|
|
4
3
|
import { type Responsive } from "../types/responsive.js";
|
|
5
4
|
import { type Variant } from "../types/variants.js";
|
|
@@ -7,7 +6,7 @@ type Option = Record<string, any> & {
|
|
|
7
6
|
value: string;
|
|
8
7
|
label: string;
|
|
9
8
|
};
|
|
10
|
-
interface Props
|
|
9
|
+
interface Props {
|
|
11
10
|
options: Option[];
|
|
12
11
|
value?: string | string[];
|
|
13
12
|
multiSelect?: boolean;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
-->
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
12
11
|
import Popup from "./Popup.svelte";
|
|
13
12
|
import type { Side, Align, Boundary } from "../positioning/anchored.js";
|
|
14
13
|
import type { MenuItem, MenuAction, MenuSeparator } from "../data/table/types.js";
|
|
@@ -25,7 +24,6 @@
|
|
|
25
24
|
boundary = "viewport",
|
|
26
25
|
size = "md",
|
|
27
26
|
variant,
|
|
28
|
-
...rest
|
|
29
27
|
}: {
|
|
30
28
|
anchor: HTMLElement | undefined;
|
|
31
29
|
open?: boolean;
|
|
@@ -37,7 +35,7 @@
|
|
|
37
35
|
/** Tints the highlighted item with a semantic colour (via `.ui-accent` / `--ui-accent`) instead
|
|
38
36
|
* of neutral grey. Omit for the default. */
|
|
39
37
|
variant?: Variant;
|
|
40
|
-
}
|
|
38
|
+
} = $props();
|
|
41
39
|
|
|
42
40
|
let active = $state(-1);
|
|
43
41
|
const isSeparator = (i: MenuItem): i is MenuSeparator => "divider" in i;
|
|
@@ -89,7 +87,6 @@
|
|
|
89
87
|
<Popup {anchor} bind:open {side} {align} {boundary}>
|
|
90
88
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
91
89
|
<ul
|
|
92
|
-
{...rest}
|
|
93
90
|
role="menu"
|
|
94
91
|
tabindex="0"
|
|
95
92
|
{onkeydown}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
1
|
import type { Side, Align, Boundary } from "../positioning/anchored.js";
|
|
3
2
|
import type { MenuItem } from "../data/table/types.js";
|
|
4
3
|
import type { Size } from "../types/sizes.js";
|
|
@@ -15,7 +14,7 @@ type $$ComponentProps = {
|
|
|
15
14
|
/** Tints the highlighted item with a semantic colour (via `.ui-accent` / `--ui-accent`) instead
|
|
16
15
|
* of neutral grey. Omit for the default. */
|
|
17
16
|
variant?: Variant;
|
|
18
|
-
}
|
|
17
|
+
};
|
|
19
18
|
declare const Menu: import("svelte").Component<$$ComponentProps, {}, "open">;
|
|
20
19
|
type Menu = ReturnType<typeof Menu>;
|
|
21
20
|
export default Menu;
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
import type { Size } from "../types/sizes.js";
|
|
12
12
|
import type { Responsive } from "../types/responsive.js";
|
|
13
13
|
import type { Variant } from "../types/variants.js";
|
|
14
|
-
import type { FieldChromeProps } from "./field-chrome.js";
|
|
15
14
|
|
|
16
|
-
interface Props extends Omit<HTMLInputAttributes, "type" | "value" | "size"
|
|
15
|
+
interface Props extends Omit<HTMLInputAttributes, "type" | "value" | "size"> {
|
|
17
16
|
value: number | null;
|
|
18
17
|
class?: string;
|
|
19
18
|
inputClass?: string;
|
|
@@ -2,8 +2,7 @@ import type { HTMLInputAttributes } from "svelte/elements";
|
|
|
2
2
|
import type { Size } from "../types/sizes.js";
|
|
3
3
|
import type { Responsive } from "../types/responsive.js";
|
|
4
4
|
import type { Variant } from "../types/variants.js";
|
|
5
|
-
|
|
6
|
-
interface Props extends Omit<HTMLInputAttributes, "type" | "value" | "size">, FieldChromeProps {
|
|
5
|
+
interface Props extends Omit<HTMLInputAttributes, "type" | "value" | "size"> {
|
|
7
6
|
value: number | null;
|
|
8
7
|
class?: string;
|
|
9
8
|
inputClass?: string;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import { uiI18n } from "../../i18n.js";
|
|
12
12
|
const i18n = uiI18n();
|
|
13
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
14
13
|
import Button from "../Button.svelte";
|
|
15
14
|
import Select from "../Select.svelte";
|
|
16
15
|
import NumberInput from "../NumberInput.svelte";
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
borderless = false,
|
|
36
35
|
disabled = false,
|
|
37
36
|
class: cls = "",
|
|
38
|
-
...rest
|
|
39
37
|
}: {
|
|
40
38
|
page?: number;
|
|
41
39
|
total: number;
|
|
@@ -54,7 +52,7 @@
|
|
|
54
52
|
borderless?: boolean;
|
|
55
53
|
disabled?: boolean;
|
|
56
54
|
class?: string;
|
|
57
|
-
}
|
|
55
|
+
} = $props();
|
|
58
56
|
|
|
59
57
|
const pageCount = $derived(Math.max(1, Math.ceil((total || 0) / (perPage || 1))));
|
|
60
58
|
// Keep `page` in range as total/perPage change.
|
|
@@ -108,7 +106,6 @@
|
|
|
108
106
|
|
|
109
107
|
<nav
|
|
110
108
|
aria-label={i18n.messages.pagination}
|
|
111
|
-
{...rest}
|
|
112
109
|
class="ui-accent flex flex-wrap items-center justify-between gap-3 border rounded-[var(--ui-border-radius)] {bandPad} {cls}"
|
|
113
110
|
style="border-color: {bandBorder}; background-color: {bandBg}; {accentVar}"
|
|
114
111
|
>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
1
|
import type { Variant } from "../../types/variants.js";
|
|
3
2
|
import type { Size } from "../../types/sizes.js";
|
|
4
3
|
import { type Responsive } from "../../types/responsive.js";
|
|
@@ -20,7 +19,7 @@ type $$ComponentProps = {
|
|
|
20
19
|
borderless?: boolean;
|
|
21
20
|
disabled?: boolean;
|
|
22
21
|
class?: string;
|
|
23
|
-
}
|
|
22
|
+
};
|
|
24
23
|
declare const Pagination: import("svelte").Component<$$ComponentProps, {}, "perPage" | "page">;
|
|
25
24
|
type Pagination = ReturnType<typeof Pagination>;
|
|
26
25
|
export default Pagination;
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
import type { Size } from "../types/sizes.js";
|
|
7
7
|
import type { Responsive } from "../types/responsive.js";
|
|
8
8
|
import type { Variant } from "../types/variants.js";
|
|
9
|
-
import type { FieldChromeProps } from "./field-chrome.js";
|
|
10
9
|
|
|
11
|
-
interface Props extends Omit<HTMLInputAttributes, "type" | "size"
|
|
10
|
+
interface Props extends Omit<HTMLInputAttributes, "type" | "size"> {
|
|
12
11
|
value: string;
|
|
13
12
|
class?: string;
|
|
14
13
|
inputClass?: string;
|