@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
|
@@ -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;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
-->
|
|
18
18
|
<script lang="ts">
|
|
19
19
|
import type { Snippet } from "svelte";
|
|
20
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
21
20
|
import {
|
|
22
21
|
anchored,
|
|
23
22
|
type Side,
|
|
@@ -47,7 +46,6 @@
|
|
|
47
46
|
onclose,
|
|
48
47
|
onplaced,
|
|
49
48
|
children,
|
|
50
|
-
...rest
|
|
51
49
|
}: {
|
|
52
50
|
/** The trigger element to position against. */
|
|
53
51
|
anchor: HTMLElement | undefined;
|
|
@@ -82,11 +80,7 @@
|
|
|
82
80
|
* the box actually landed (e.g. edge-flush borders). */
|
|
83
81
|
onplaced?: (p: Placement) => void;
|
|
84
82
|
children: Snippet;
|
|
85
|
-
|
|
86
|
-
// which is this component's primary content container). `style` omitted — the box computes its own
|
|
87
|
-
// (the panel border when `surface`). `onclose` omitted — it collides with the DOM `onclose` event
|
|
88
|
-
// but is this component's own dismissal callback (`() => void`).
|
|
89
|
-
} & Omit<HTMLAttributes<HTMLDivElement>, "class" | "style" | "onclose"> = $props();
|
|
83
|
+
} = $props();
|
|
90
84
|
|
|
91
85
|
// Themed-panel styling (only used when `surface`). Border tints from the variant token; `borderless`
|
|
92
86
|
// paints it the panel's background. Padding scales with `size`.
|
|
@@ -143,7 +137,6 @@
|
|
|
143
137
|
</script>
|
|
144
138
|
|
|
145
139
|
<div
|
|
146
|
-
{...rest}
|
|
147
140
|
bind:this={el}
|
|
148
141
|
popover="manual"
|
|
149
142
|
data-open={open}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
3
2
|
import { type Side, type Align, type Boundary, type Placement } from "../positioning/anchored.js";
|
|
4
3
|
import type { Size } from "../types/sizes.js";
|
|
5
4
|
import { type Responsive } from "../types/responsive.js";
|
|
@@ -38,7 +37,7 @@ type $$ComponentProps = {
|
|
|
38
37
|
* the box actually landed (e.g. edge-flush borders). */
|
|
39
38
|
onplaced?: (p: Placement) => void;
|
|
40
39
|
children: Snippet;
|
|
41
|
-
}
|
|
40
|
+
};
|
|
42
41
|
declare const Popup: import("svelte").Component<$$ComponentProps, {}, "open">;
|
|
43
42
|
type Popup = ReturnType<typeof Popup>;
|
|
44
43
|
export default Popup;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
-->
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
10
9
|
import type { Variant } from "../../types/variants.js";
|
|
11
10
|
import { variantToken } from "../../types/variants.js";
|
|
12
11
|
import type { Size } from "../../types/sizes.js";
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
label,
|
|
22
21
|
showValue = false,
|
|
23
22
|
class: cls = "",
|
|
24
|
-
...rest
|
|
25
23
|
}: {
|
|
26
24
|
value?: number;
|
|
27
25
|
max?: number;
|
|
@@ -31,7 +29,7 @@
|
|
|
31
29
|
label?: string;
|
|
32
30
|
showValue?: boolean;
|
|
33
31
|
class?: string;
|
|
34
|
-
}
|
|
32
|
+
} = $props();
|
|
35
33
|
|
|
36
34
|
const token = $derived(variantToken[variant]);
|
|
37
35
|
const pct = $derived(
|
|
@@ -43,7 +41,7 @@
|
|
|
43
41
|
const textClass: Record<Size, string> = { sm: "text-xs", md: "text-sm", lg: "text-sm" };
|
|
44
42
|
</script>
|
|
45
43
|
|
|
46
|
-
<div class="w-full {cls}"
|
|
44
|
+
<div class="w-full {cls}">
|
|
47
45
|
{#if label || (showValue && !indeterminate)}
|
|
48
46
|
<div
|
|
49
47
|
class="mb-1 flex items-center justify-between {responsiveClasses(
|
|
@@ -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";
|
|
@@ -11,7 +10,7 @@ type $$ComponentProps = {
|
|
|
11
10
|
label?: string;
|
|
12
11
|
showValue?: boolean;
|
|
13
12
|
class?: string;
|
|
14
|
-
}
|
|
13
|
+
};
|
|
15
14
|
declare const Progress: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
16
15
|
type Progress = ReturnType<typeof Progress>;
|
|
17
16
|
export default Progress;
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
import { uiI18n } from "../i18n.js";
|
|
11
11
|
const i18n = uiI18n();
|
|
12
12
|
import { tick } from "svelte";
|
|
13
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
14
13
|
import IconSearch from "~icons/mdi/magnify";
|
|
15
14
|
import IconClose from "~icons/mdi/close";
|
|
16
15
|
import IconHelp from "~icons/mdi/help-circle-outline";
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
size = "md",
|
|
30
29
|
variant = "neutral",
|
|
31
30
|
borderless = false,
|
|
32
|
-
...rest
|
|
33
31
|
}: {
|
|
34
32
|
dataset: DataSet;
|
|
35
33
|
placeholder?: string;
|
|
@@ -37,7 +35,7 @@
|
|
|
37
35
|
size?: Responsive<Size>;
|
|
38
36
|
variant?: Variant;
|
|
39
37
|
borderless?: boolean;
|
|
40
|
-
}
|
|
38
|
+
} = $props();
|
|
41
39
|
|
|
42
40
|
let inputEl = $state<HTMLInputElement>();
|
|
43
41
|
let wrapperEl = $state<HTMLElement>();
|
|
@@ -136,7 +134,7 @@
|
|
|
136
134
|
const bc = "border-[color-mix(in_srgb,var(--ui-color-secondary)_30%,transparent)]";
|
|
137
135
|
</script>
|
|
138
136
|
|
|
139
|
-
<div
|
|
137
|
+
<div class="w-full [color:var(--ui-color-text)]">
|
|
140
138
|
<!-- Built on the core <Input> so the frame/border/hover/focus glow + themed autofill are shared,
|
|
141
139
|
not re-rolled. Search is the left icon; clear + help live in the `actions` slot; the parse
|
|
142
140
|
error reuses Input's own validation (danger) styling. -->
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
1
|
import type { DataSet } from "../data/dataset.js";
|
|
3
2
|
import type { Size } from "../types/sizes.js";
|
|
4
3
|
import type { Responsive } from "../types/responsive.js";
|
|
@@ -10,7 +9,7 @@ type $$ComponentProps = {
|
|
|
10
9
|
size?: Responsive<Size>;
|
|
11
10
|
variant?: Variant;
|
|
12
11
|
borderless?: boolean;
|
|
13
|
-
}
|
|
12
|
+
};
|
|
14
13
|
declare const Query: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
15
14
|
type Query = ReturnType<typeof Query>;
|
|
16
15
|
export default Query;
|
|
@@ -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 { Variant } from "../../types/variants.js";
|
|
11
10
|
import { variantToken } from "../../types/variants.js";
|
|
12
11
|
|
|
@@ -17,7 +16,6 @@
|
|
|
17
16
|
variant,
|
|
18
17
|
class: cls = "",
|
|
19
18
|
children,
|
|
20
|
-
...rest
|
|
21
19
|
}: {
|
|
22
20
|
orientation?: "vertical" | "horizontal" | "both";
|
|
23
21
|
/** Cap the height (any CSS length) — content beyond scrolls. */
|
|
@@ -27,8 +25,7 @@
|
|
|
27
25
|
variant?: Variant;
|
|
28
26
|
class?: string;
|
|
29
27
|
children: Snippet;
|
|
30
|
-
|
|
31
|
-
} & Omit<HTMLAttributes<HTMLDivElement>, "class" | "style"> = $props();
|
|
28
|
+
} = $props();
|
|
32
29
|
|
|
33
30
|
const overflow = $derived(
|
|
34
31
|
orientation === "horizontal"
|
|
@@ -46,7 +43,7 @@
|
|
|
46
43
|
);
|
|
47
44
|
</script>
|
|
48
45
|
|
|
49
|
-
<div
|
|
46
|
+
<div class="ui-scroll {overflow} {cls}" {style}>
|
|
50
47
|
{@render children()}
|
|
51
48
|
</div>
|
|
52
49
|
|
|
@@ -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
|
type $$ComponentProps = {
|
|
5
4
|
orientation?: "vertical" | "horizontal" | "both";
|
|
@@ -10,7 +9,7 @@ type $$ComponentProps = {
|
|
|
10
9
|
variant?: Variant;
|
|
11
10
|
class?: string;
|
|
12
11
|
children: Snippet;
|
|
13
|
-
}
|
|
12
|
+
};
|
|
14
13
|
declare const ScrollArea: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
15
14
|
type ScrollArea = ReturnType<typeof ScrollArea>;
|
|
16
15
|
export default ScrollArea;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
|
-
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
|
-
import type { FieldChromeProps } from "./field-chrome.js";
|
|
5
3
|
import ChevronDown from "~icons/mdi/chevron-down";
|
|
6
4
|
import Input from "./Input.svelte";
|
|
7
5
|
import List from "./List.svelte";
|
|
@@ -79,7 +77,7 @@
|
|
|
79
77
|
borderless?: boolean;
|
|
80
78
|
/** When set, render a hidden <input name> carrying the value so the Select submits in a form. */
|
|
81
79
|
name?: string;
|
|
82
|
-
} &
|
|
80
|
+
} & Record<string, any> = $props();
|
|
83
81
|
|
|
84
82
|
let isOpen = $state(false);
|
|
85
83
|
let containerElement = $state<HTMLElement>();
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { HTMLInputAttributes } from "svelte/elements";
|
|
3
|
-
import type { FieldChromeProps } from "./field-chrome.js";
|
|
4
2
|
import type { Size } from "../types/sizes.js";
|
|
5
3
|
import type { Responsive } from "../types/responsive.js";
|
|
6
4
|
import type { Variant } from "../types/variants.js";
|
|
@@ -41,7 +39,7 @@ type $$ComponentProps = {
|
|
|
41
39
|
borderless?: boolean;
|
|
42
40
|
/** When set, render a hidden <input name> carrying the value so the Select submits in a form. */
|
|
43
41
|
name?: string;
|
|
44
|
-
} &
|
|
42
|
+
} & Record<string, any>;
|
|
45
43
|
declare const Select: import("svelte").Component<$$ComponentProps, {}, "value" | "searchTerm" | "methods">;
|
|
46
44
|
type Select = ReturnType<typeof Select>;
|
|
47
45
|
export default Select;
|
|
@@ -128,7 +128,6 @@
|
|
|
128
128
|
import IconChevronRight from "~icons/mdi/chevron-right";
|
|
129
129
|
import IconChevronUp from "~icons/mdi/chevron-up";
|
|
130
130
|
import IconChevronDown from "~icons/mdi/chevron-down";
|
|
131
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
132
131
|
import type { Placement } from "../../positioning/anchored.js";
|
|
133
132
|
import type { Size } from "../../types/sizes.js";
|
|
134
133
|
import { variantToken, type Variant } from "../../types/variants.js";
|
|
@@ -157,7 +156,6 @@
|
|
|
157
156
|
activeMode = $bindable(),
|
|
158
157
|
publishWidthVar,
|
|
159
158
|
class: additionalClass = "",
|
|
160
|
-
...rest
|
|
161
159
|
}: {
|
|
162
160
|
items?: SideBarMenuItem[];
|
|
163
161
|
bottomItems?: SideBarMenuItem[];
|
|
@@ -246,10 +244,7 @@
|
|
|
246
244
|
* when you run more than one). Unset → nothing published. */
|
|
247
245
|
publishWidthVar?: boolean | string;
|
|
248
246
|
class?: string;
|
|
249
|
-
|
|
250
|
-
// container; the outer wrapper is `display:contents` in every non-hover-expand mode). `style` is
|
|
251
|
-
// omitted — the aside computes its own (`--sbm-accent`), as does the wrapper (spacer width).
|
|
252
|
-
} & Omit<HTMLAttributes<HTMLElement>, "class" | "style"> = $props();
|
|
247
|
+
} = $props();
|
|
253
248
|
|
|
254
249
|
// Per-instance, hydration-stable id prefix so popout DOM ids are unique when more than one
|
|
255
250
|
// SideBarMenu renders on a page (otherwise `sbm-popout-top-1` collides, breaking `aria-controls`
|
|
@@ -1179,7 +1174,6 @@
|
|
|
1179
1174
|
style="{hoverExpandActive ? `width: ${collapsedW}px;` : ''}"
|
|
1180
1175
|
>
|
|
1181
1176
|
<aside
|
|
1182
|
-
{...rest}
|
|
1183
1177
|
bind:this={asideRef}
|
|
1184
1178
|
bind:clientHeight={asideH}
|
|
1185
1179
|
data-sbm-aside={uid}
|
|
@@ -94,7 +94,6 @@ export type SideBarMenuItem = {
|
|
|
94
94
|
* the default `currentPath` segment-boundary match against `link`. */
|
|
95
95
|
activeMatch?: SideBarMenuActiveRule;
|
|
96
96
|
};
|
|
97
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
98
97
|
import type { Size } from "../../types/sizes.js";
|
|
99
98
|
import { type Variant } from "../../types/variants.js";
|
|
100
99
|
import { type Breakpoint } from "../../types/breakpoints.js";
|
|
@@ -187,7 +186,7 @@ type $$ComponentProps = {
|
|
|
187
186
|
* when you run more than one). Unset → nothing published. */
|
|
188
187
|
publishWidthVar?: boolean | string;
|
|
189
188
|
class?: string;
|
|
190
|
-
}
|
|
189
|
+
};
|
|
191
190
|
declare const SideBarMenu: import("svelte").Component<$$ComponentProps, {}, "open" | "stepLevel" | "api" | "activeMode">;
|
|
192
191
|
type SideBarMenu = ReturnType<typeof SideBarMenu>;
|
|
193
192
|
export default SideBarMenu;
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
-->
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
10
|
-
|
|
11
9
|
let {
|
|
12
10
|
shape = "text",
|
|
13
11
|
width,
|
|
@@ -16,7 +14,6 @@
|
|
|
16
14
|
radius,
|
|
17
15
|
animate = true,
|
|
18
16
|
class: cls = "",
|
|
19
|
-
...rest
|
|
20
17
|
}: {
|
|
21
18
|
shape?: "text" | "rect" | "circle";
|
|
22
19
|
width?: string | number;
|
|
@@ -25,8 +22,7 @@
|
|
|
25
22
|
radius?: string;
|
|
26
23
|
animate?: boolean;
|
|
27
24
|
class?: string;
|
|
28
|
-
|
|
29
|
-
} & Omit<HTMLAttributes<HTMLElement>, "class" | "style"> = $props();
|
|
25
|
+
} = $props();
|
|
30
26
|
|
|
31
27
|
const css = (v: string | number | undefined): string | undefined =>
|
|
32
28
|
typeof v === "number" ? `${v}px` : v;
|
|
@@ -43,7 +39,7 @@
|
|
|
43
39
|
</script>
|
|
44
40
|
|
|
45
41
|
{#if shape === "text" && lines > 1}
|
|
46
|
-
<div class="flex flex-col gap-2 {cls}" aria-hidden="true"
|
|
42
|
+
<div class="flex flex-col gap-2 {cls}" aria-hidden="true">
|
|
47
43
|
{#each Array(lines) as _, i (i)}
|
|
48
44
|
<span
|
|
49
45
|
class={blockClass}
|
|
@@ -56,7 +52,6 @@
|
|
|
56
52
|
class="{blockClass} {cls}"
|
|
57
53
|
style="width: {w}; height: {h}; border-radius: {rad};"
|
|
58
54
|
aria-hidden="true"
|
|
59
|
-
{...rest}
|
|
60
55
|
></span>
|
|
61
56
|
{/if}
|
|
62
57
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
1
|
type $$ComponentProps = {
|
|
3
2
|
shape?: "text" | "rect" | "circle";
|
|
4
3
|
width?: string | number;
|
|
@@ -7,7 +6,7 @@ type $$ComponentProps = {
|
|
|
7
6
|
radius?: string;
|
|
8
7
|
animate?: boolean;
|
|
9
8
|
class?: string;
|
|
10
|
-
}
|
|
9
|
+
};
|
|
11
10
|
declare const Skeleton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
11
|
type Skeleton = ReturnType<typeof Skeleton>;
|
|
13
12
|
export default Skeleton;
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import { variantToken } from "../../types/variants.js";
|
|
13
13
|
import type { Size } from "../../types/sizes.js";
|
|
14
14
|
import { responsiveClasses, type Responsive } from "../../types/responsive.js";
|
|
15
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
16
15
|
|
|
17
16
|
let {
|
|
18
17
|
value = $bindable(0),
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
required = false,
|
|
33
32
|
id,
|
|
34
33
|
class: cls = "",
|
|
35
|
-
...rest
|
|
36
34
|
}: {
|
|
37
35
|
value?: number | [number, number];
|
|
38
36
|
min?: number;
|
|
@@ -51,7 +49,7 @@
|
|
|
51
49
|
required?: boolean;
|
|
52
50
|
id?: string;
|
|
53
51
|
class?: string;
|
|
54
|
-
}
|
|
52
|
+
} = $props();
|
|
55
53
|
|
|
56
54
|
const controlId = id ?? nextFieldId();
|
|
57
55
|
const isRange = $derived(range || Array.isArray(value));
|
|
@@ -168,7 +166,7 @@
|
|
|
168
166
|
|
|
169
167
|
<FieldChrome {label} {aside} {error} {description} {required} {controlId} {size} class={cls}>
|
|
170
168
|
{#snippet control({ describedBy })}
|
|
171
|
-
<div
|
|
169
|
+
<div class="flex items-center gap-3 select-none">
|
|
172
170
|
<!-- The track is the click-to-position surface; the thumbs below carry role="slider". -->
|
|
173
171
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
174
172
|
<!-- Disabled keeps pointer events (so the not-allowed cursor shows) but every handler no-ops on
|
|
@@ -2,7 +2,6 @@ import type { Snippet } from "svelte";
|
|
|
2
2
|
import type { Variant } from "../../types/variants.js";
|
|
3
3
|
import type { Size } from "../../types/sizes.js";
|
|
4
4
|
import { type Responsive } from "../../types/responsive.js";
|
|
5
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
6
5
|
type $$ComponentProps = {
|
|
7
6
|
value?: number | [number, number];
|
|
8
7
|
min?: number;
|
|
@@ -21,7 +20,7 @@ type $$ComponentProps = {
|
|
|
21
20
|
required?: boolean;
|
|
22
21
|
id?: string;
|
|
23
22
|
class?: string;
|
|
24
|
-
}
|
|
23
|
+
};
|
|
25
24
|
declare const Slider: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
26
25
|
type Slider = ReturnType<typeof Slider>;
|
|
27
26
|
export default Slider;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
-->
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
12
11
|
import type { Variant } from "../../types/variants.js";
|
|
13
12
|
import { variantToken } from "../../types/variants.js";
|
|
14
13
|
import type { Size } from "../../types/sizes.js";
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
size = "md",
|
|
20
19
|
label = "Loading",
|
|
21
20
|
class: cls = "",
|
|
22
|
-
...rest
|
|
23
21
|
}: {
|
|
24
22
|
/** Colour accent. Omit to inherit `currentColor` (e.g. inside a filled Button). */
|
|
25
23
|
variant?: Variant;
|
|
@@ -27,7 +25,7 @@
|
|
|
27
25
|
/** Accessible label (visually hidden). */
|
|
28
26
|
label?: string;
|
|
29
27
|
class?: string;
|
|
30
|
-
}
|
|
28
|
+
} = $props();
|
|
31
29
|
|
|
32
30
|
// 16 / 20 / 24px rings on the shared size axis.
|
|
33
31
|
const sizeClass: Record<Size, string> = {
|
|
@@ -48,7 +46,6 @@
|
|
|
48
46
|
<span
|
|
49
47
|
role="status"
|
|
50
48
|
aria-live="polite"
|
|
51
|
-
{...rest}
|
|
52
49
|
class="inline-block shrink-0 animate-spin rounded-full border-solid align-[-0.125em] {responsiveClasses(
|
|
53
50
|
size,
|
|
54
51
|
sizeClass,
|
|
@@ -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";
|
|
@@ -9,7 +8,7 @@ type $$ComponentProps = {
|
|
|
9
8
|
/** Accessible label (visually hidden). */
|
|
10
9
|
label?: string;
|
|
11
10
|
class?: string;
|
|
12
|
-
}
|
|
11
|
+
};
|
|
13
12
|
declare const Spinner: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
13
|
type Spinner = ReturnType<typeof Spinner>;
|
|
15
14
|
export default Spinner;
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import type { Snippet } from "svelte";
|
|
10
10
|
import type { Variant } from "../../types/variants.js";
|
|
11
11
|
import { variantToken } from "../../types/variants.js";
|
|
12
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
13
12
|
|
|
14
13
|
let {
|
|
15
14
|
start,
|
|
@@ -22,7 +21,6 @@
|
|
|
22
21
|
variant = "primary",
|
|
23
22
|
disabled = false,
|
|
24
23
|
class: cls = "",
|
|
25
|
-
...rest
|
|
26
24
|
}: {
|
|
27
25
|
start: Snippet;
|
|
28
26
|
end: Snippet;
|
|
@@ -35,7 +33,7 @@
|
|
|
35
33
|
variant?: Variant;
|
|
36
34
|
disabled?: boolean;
|
|
37
35
|
class?: string;
|
|
38
|
-
}
|
|
36
|
+
} = $props();
|
|
39
37
|
|
|
40
38
|
const isH = $derived(orientation === "horizontal");
|
|
41
39
|
const token = $derived(variantToken[variant]);
|
|
@@ -84,7 +82,6 @@
|
|
|
84
82
|
</script>
|
|
85
83
|
|
|
86
84
|
<div
|
|
87
|
-
{...rest}
|
|
88
85
|
bind:this={containerEl}
|
|
89
86
|
class="flex {isH ? 'flex-row' : 'flex-col'} {cls}"
|
|
90
87
|
style={dragging ? "user-select: none;" : ""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
2
|
import type { Variant } from "../../types/variants.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
3
|
type $$ComponentProps = {
|
|
5
4
|
start: Snippet;
|
|
6
5
|
end: Snippet;
|
|
@@ -13,7 +12,7 @@ type $$ComponentProps = {
|
|
|
13
12
|
variant?: Variant;
|
|
14
13
|
disabled?: boolean;
|
|
15
14
|
class?: string;
|
|
16
|
-
}
|
|
15
|
+
};
|
|
17
16
|
declare const Splitter: import("svelte").Component<$$ComponentProps, {}, "size">;
|
|
18
17
|
type Splitter = ReturnType<typeof Splitter>;
|
|
19
18
|
export default Splitter;
|
|
@@ -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 Card from "../Card.svelte";
|
|
11
10
|
import IconUp from "~icons/mdi/trending-up";
|
|
12
11
|
import IconDown from "~icons/mdi/trending-down";
|
|
@@ -25,7 +24,6 @@
|
|
|
25
24
|
variant = "neutral",
|
|
26
25
|
size = "md",
|
|
27
26
|
class: cls = "",
|
|
28
|
-
...rest
|
|
29
27
|
}: {
|
|
30
28
|
label: string;
|
|
31
29
|
value: string | number;
|
|
@@ -39,7 +37,7 @@
|
|
|
39
37
|
variant?: Variant;
|
|
40
38
|
size?: Responsive<Size>;
|
|
41
39
|
class?: string;
|
|
42
|
-
}
|
|
40
|
+
} = $props();
|
|
43
41
|
|
|
44
42
|
const token = $derived(variantToken[variant]);
|
|
45
43
|
const deltaNum = $derived(typeof delta === "number" ? delta : null);
|
|
@@ -62,7 +60,7 @@
|
|
|
62
60
|
};
|
|
63
61
|
</script>
|
|
64
62
|
|
|
65
|
-
<Card class="p-4 {cls}"
|
|
63
|
+
<Card class="p-4 {cls}">
|
|
66
64
|
<div class="flex items-start justify-between gap-3">
|
|
67
65
|
<div class="min-w-0">
|
|
68
66
|
<div class="truncate text-sm [color:color-mix(in_srgb,var(--ui-color-text)_60%,transparent)]">
|
|
@@ -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";
|
|
@@ -16,7 +15,7 @@ type $$ComponentProps = {
|
|
|
16
15
|
variant?: Variant;
|
|
17
16
|
size?: Responsive<Size>;
|
|
18
17
|
class?: string;
|
|
19
|
-
}
|
|
18
|
+
};
|
|
20
19
|
declare const Stat: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
21
20
|
type Stat = ReturnType<typeof Stat>;
|
|
22
21
|
export default Stat;
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
import { variantToken } from "../../types/variants.js";
|
|
19
19
|
import type { Size } from "../../types/sizes.js";
|
|
20
20
|
import { responsiveClasses, type Responsive } from "../../types/responsive.js";
|
|
21
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
22
21
|
|
|
23
22
|
let {
|
|
24
23
|
steps,
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
size = "md",
|
|
29
28
|
onstep,
|
|
30
29
|
class: cls = "",
|
|
31
|
-
...rest
|
|
32
30
|
}: {
|
|
33
31
|
steps: StepItem[];
|
|
34
32
|
current?: number;
|
|
@@ -37,7 +35,7 @@
|
|
|
37
35
|
size?: Responsive<Size>;
|
|
38
36
|
onstep?: (index: number) => void;
|
|
39
37
|
class?: string;
|
|
40
|
-
}
|
|
38
|
+
} = $props();
|
|
41
39
|
|
|
42
40
|
const token = $derived(variantToken[variant]);
|
|
43
41
|
const isH = $derived(orientation === "horizontal");
|
|
@@ -64,7 +62,6 @@
|
|
|
64
62
|
</script>
|
|
65
63
|
|
|
66
64
|
<ol
|
|
67
|
-
{...rest}
|
|
68
65
|
class="flex {isH ? 'flex-row items-start' : 'flex-col'} {cls}"
|
|
69
66
|
aria-label={i18n.messages.progress}
|
|
70
67
|
>
|
|
@@ -7,7 +7,6 @@ export type StepItem = {
|
|
|
7
7
|
import type { Variant } from "../../types/variants.js";
|
|
8
8
|
import type { Size } from "../../types/sizes.js";
|
|
9
9
|
import { type Responsive } from "../../types/responsive.js";
|
|
10
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
11
10
|
type $$ComponentProps = {
|
|
12
11
|
steps: StepItem[];
|
|
13
12
|
current?: number;
|
|
@@ -16,7 +15,7 @@ type $$ComponentProps = {
|
|
|
16
15
|
size?: Responsive<Size>;
|
|
17
16
|
onstep?: (index: number) => void;
|
|
18
17
|
class?: string;
|
|
19
|
-
}
|
|
18
|
+
};
|
|
20
19
|
declare const Stepper: import("svelte").Component<$$ComponentProps, {}, "current">;
|
|
21
20
|
type Stepper = ReturnType<typeof Stepper>;
|
|
22
21
|
export default Stepper;
|
|
@@ -5,18 +5,10 @@
|
|
|
5
5
|
import type { Size } from "../types/sizes.js";
|
|
6
6
|
import { responsiveClasses, type Responsive } from "../types/responsive.js";
|
|
7
7
|
import type { Variant } from "../types/variants.js";
|
|
8
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
9
8
|
import { applyTheme, readStoredTheme, type ThemeValue } from "./theme.js";
|
|
10
9
|
|
|
11
10
|
// Shared axes, forwarded to the underlying Select (and the label text tracks size).
|
|
12
|
-
let {
|
|
13
|
-
size = "md",
|
|
14
|
-
variant,
|
|
15
|
-
...rest
|
|
16
|
-
}: { size?: Responsive<Size>; variant?: Variant } & Omit<
|
|
17
|
-
HTMLAttributes<HTMLDivElement>,
|
|
18
|
-
"class"
|
|
19
|
-
> = $props();
|
|
11
|
+
let { size = "md", variant }: { size?: Responsive<Size>; variant?: Variant } = $props();
|
|
20
12
|
const labelText: Record<Size, string> = { sm: "text-xs", md: "text-sm", lg: "text-base" };
|
|
21
13
|
const labelClass = $derived(responsiveClasses(size, labelText));
|
|
22
14
|
|
|
@@ -41,7 +33,7 @@
|
|
|
41
33
|
});
|
|
42
34
|
</script>
|
|
43
35
|
|
|
44
|
-
<div
|
|
36
|
+
<div class="flex items-center gap-2">
|
|
45
37
|
<label for="theme-selector" class="{labelClass} font-medium text-[var(--ui-color-text)]"
|
|
46
38
|
>Theme:</label
|
|
47
39
|
>
|