@spaethtech/svelte-ui 0.20.1-dev.105.894ecae → 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.
Files changed (96) hide show
  1. package/dist/components/Alert.svelte +6 -15
  2. package/dist/components/Alert.svelte.d.ts +1 -4
  3. package/dist/components/Avatar/Avatar.svelte +2 -4
  4. package/dist/components/Avatar/Avatar.svelte.d.ts +1 -2
  5. package/dist/components/Avatar/AvatarGroup.svelte +1 -4
  6. package/dist/components/Avatar/AvatarGroup.svelte.d.ts +1 -2
  7. package/dist/components/Badge/Badge.svelte +2 -9
  8. package/dist/components/Badge/Badge.svelte.d.ts +1 -2
  9. package/dist/components/Banner.svelte +1 -4
  10. package/dist/components/Banner.svelte.d.ts +1 -2
  11. package/dist/components/Breadcrumbs/Breadcrumbs.svelte +2 -4
  12. package/dist/components/Breadcrumbs/Breadcrumbs.svelte.d.ts +1 -2
  13. package/dist/components/CardFooter.svelte +1 -12
  14. package/dist/components/CardFooter.svelte.d.ts +0 -3
  15. package/dist/components/Carousel/Carousel.svelte +1 -4
  16. package/dist/components/Carousel/Carousel.svelte.d.ts +1 -2
  17. package/dist/components/Chip/Chip.svelte +1 -4
  18. package/dist/components/Chip/Chip.svelte.d.ts +1 -2
  19. package/dist/components/Combobox/Combobox.svelte +1 -4
  20. package/dist/components/Combobox/Combobox.svelte.d.ts +1 -2
  21. package/dist/components/CommandPalette/CommandPalette.svelte +2 -4
  22. package/dist/components/CommandPalette/CommandPalette.svelte.d.ts +1 -2
  23. package/dist/components/ConfirmDialog.svelte +1 -4
  24. package/dist/components/ConfirmDialog.svelte.d.ts +1 -2
  25. package/dist/components/ContextMenu/ContextMenu.svelte +2 -4
  26. package/dist/components/ContextMenu/ContextMenu.svelte.d.ts +1 -2
  27. package/dist/components/DataTable.svelte +1 -4
  28. package/dist/components/DataTable.svelte.d.ts +1 -2
  29. package/dist/components/DatePicker.svelte +2 -4
  30. package/dist/components/DatePicker.svelte.d.ts +1 -2
  31. package/dist/components/Divider/Divider.svelte +3 -6
  32. package/dist/components/Divider/Divider.svelte.d.ts +1 -2
  33. package/dist/components/Drawer/Drawer.svelte +1 -4
  34. package/dist/components/Drawer/Drawer.svelte.d.ts +1 -2
  35. package/dist/components/EmailInput.svelte +1 -2
  36. package/dist/components/EmailInput.svelte.d.ts +1 -2
  37. package/dist/components/EmptyState/EmptyState.svelte +2 -4
  38. package/dist/components/EmptyState/EmptyState.svelte.d.ts +1 -2
  39. package/dist/components/FileUpload/FileUpload.svelte +2 -4
  40. package/dist/components/FileUpload/FileUpload.svelte.d.ts +1 -2
  41. package/dist/components/Grid.svelte +2 -4
  42. package/dist/components/Grid.svelte.d.ts +1 -2
  43. package/dist/components/Kbd/Kbd.svelte +3 -5
  44. package/dist/components/Kbd/Kbd.svelte.d.ts +1 -2
  45. package/dist/components/List.svelte +2 -4
  46. package/dist/components/List.svelte.d.ts +1 -2
  47. package/dist/components/Menu.svelte +1 -4
  48. package/dist/components/Menu.svelte.d.ts +1 -2
  49. package/dist/components/NumberInput.svelte +1 -2
  50. package/dist/components/NumberInput.svelte.d.ts +1 -2
  51. package/dist/components/Pagination/Pagination.svelte +1 -4
  52. package/dist/components/Pagination/Pagination.svelte.d.ts +1 -2
  53. package/dist/components/PasswordInput.svelte +1 -2
  54. package/dist/components/PasswordInput.svelte.d.ts +1 -2
  55. package/dist/components/Popup.svelte +1 -8
  56. package/dist/components/Popup.svelte.d.ts +1 -2
  57. package/dist/components/Progress/Progress.svelte +2 -4
  58. package/dist/components/Progress/Progress.svelte.d.ts +1 -2
  59. package/dist/components/Query.svelte +2 -4
  60. package/dist/components/Query.svelte.d.ts +1 -2
  61. package/dist/components/ScrollArea/ScrollArea.svelte +2 -5
  62. package/dist/components/ScrollArea/ScrollArea.svelte.d.ts +1 -2
  63. package/dist/components/SearchInput.svelte +1 -2
  64. package/dist/components/SearchInput.svelte.d.ts +1 -2
  65. package/dist/components/Select.svelte +1 -3
  66. package/dist/components/Select.svelte.d.ts +1 -3
  67. package/dist/components/SideBarMenu/SideBarMenu.svelte +1 -7
  68. package/dist/components/SideBarMenu/SideBarMenu.svelte.d.ts +1 -2
  69. package/dist/components/Skeleton/Skeleton.svelte +2 -7
  70. package/dist/components/Skeleton/Skeleton.svelte.d.ts +1 -2
  71. package/dist/components/Slider/Slider.svelte +2 -4
  72. package/dist/components/Slider/Slider.svelte.d.ts +1 -2
  73. package/dist/components/Spinner/Spinner.svelte +1 -4
  74. package/dist/components/Spinner/Spinner.svelte.d.ts +1 -2
  75. package/dist/components/Splitter/Splitter.svelte +1 -4
  76. package/dist/components/Splitter/Splitter.svelte.d.ts +1 -2
  77. package/dist/components/Stat/Stat.svelte +2 -4
  78. package/dist/components/Stat/Stat.svelte.d.ts +1 -2
  79. package/dist/components/Stepper/Stepper.svelte +1 -4
  80. package/dist/components/Stepper/Stepper.svelte.d.ts +1 -2
  81. package/dist/components/ThemeSelector.svelte +2 -10
  82. package/dist/components/ThemeSelector.svelte.d.ts +1 -2
  83. package/dist/components/ThemeToggle.svelte +1 -10
  84. package/dist/components/ThemeToggle.svelte.d.ts +1 -2
  85. package/dist/components/TimeRangeInput.svelte +1 -5
  86. package/dist/components/TimeRangeInput.svelte.d.ts +1 -3
  87. package/dist/components/Timeline/Timeline.svelte +2 -4
  88. package/dist/components/Timeline/Timeline.svelte.d.ts +1 -2
  89. package/dist/components/TokenInput/TokenInput.svelte +1 -6
  90. package/dist/components/TokenInput/TokenInput.svelte.d.ts +1 -2
  91. package/dist/components/Tree/Tree.svelte +2 -11
  92. package/dist/components/Tree/Tree.svelte.d.ts +1 -2
  93. package/docs/components.md +1 -17
  94. package/package.json +1 -1
  95. package/dist/components/field-chrome.d.ts +0 -22
  96. package/dist/components/field-chrome.js +0 -1
@@ -1,6 +1,5 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLAttributes } from "svelte/elements";
4
3
  import type { Size } from "../types/sizes.js";
5
4
  import { responsiveClasses, type Responsive } from "../types/responsive.js";
6
5
 
@@ -11,12 +10,10 @@
11
10
  */
12
11
  type AlertVariant =
13
12
  "neutral" | "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "ghost";
14
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class" | "style"> {
13
+ interface Props {
15
14
  variant?: AlertVariant;
16
15
  size?: Responsive<Size>;
17
16
  text?: string;
18
- /** Optional bold heading rendered above the body (`text`/`children`). Icon top-aligns when set. */
19
- title?: string;
20
17
  /** Faint tinted background in addition to the bordered + coloured text. */
21
18
  filled?: boolean;
22
19
  /** Drop the visible frame while keeping the 1px box: border colour = the alert's own background
@@ -34,14 +31,12 @@
34
31
  variant = "info",
35
32
  size = "md",
36
33
  text = "",
37
- title,
38
34
  filled = false,
39
35
  borderless = false,
40
36
  icon,
41
37
  iconPosition = "left",
42
38
  class: cls = "",
43
39
  children,
44
- ...rest
45
40
  }: Props = $props();
46
41
 
47
42
  // Variant → semantic token (danger maps to the renamed --ui-color-error).
@@ -91,14 +86,13 @@
91
86
  ` color: ${textColor};` +
92
87
  (filled ? ` background-color: ${bgColor};` : ""),
93
88
  );
94
- const has = $derived(!!children || !!text || !!title);
89
+ const has = $derived(!!children || !!text);
95
90
  </script>
96
91
 
97
92
  {#if has}
98
93
  <div
99
94
  role="alert"
100
- {...rest}
101
- class="flex {title ? 'items-start' : 'items-center'} [border-radius:var(--ui-border-radius)] border {responsiveClasses(
95
+ class="flex items-center [border-radius:var(--ui-border-radius)] border {responsiveClasses(
102
96
  size,
103
97
  sizeClass,
104
98
  )} {cls}"
@@ -110,12 +104,9 @@
110
104
  >{@render icon()}</span
111
105
  >
112
106
  {/if}
113
- <div class="flex min-w-0 flex-col">
114
- {#if title}<span class="font-semibold">{title}</span>{/if}
115
- <span class="min-w-0"
116
- >{#if children}{@render children()}{:else}{text}{/if}</span
117
- >
118
- </div>
107
+ <span class="min-w-0"
108
+ >{#if children}{@render children()}{:else}{text}{/if}</span
109
+ >
119
110
  {#if icon && iconPosition === "right"}
120
111
  <span
121
112
  class="ml-auto inline-flex shrink-0 [&_svg]:fill-current {responsiveClasses(
@@ -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
  /**
@@ -8,12 +7,10 @@ import { type Responsive } from "../types/responsive.js";
8
7
  * hand-rolled `[color:var(--ui-color-error)]` divs. Renders nothing when empty (drop-in for `{#if err}`).
9
8
  */
10
9
  type AlertVariant = "neutral" | "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "ghost";
11
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class" | "style"> {
10
+ interface Props {
12
11
  variant?: AlertVariant;
13
12
  size?: Responsive<Size>;
14
13
  text?: string;
15
- /** Optional bold heading rendered above the body (`text`/`children`). Icon top-aligns when set. */
16
- title?: string;
17
14
  /** Faint tinted background in addition to the bordered + coloured text. */
18
15
  filled?: boolean;
19
16
  /** Drop the visible frame while keeping the 1px box: border colour = the alert's own background
@@ -12,7 +12,6 @@
12
12
 
13
13
  <script lang="ts">
14
14
  import type { Snippet } from "svelte";
15
- import type { HTMLAttributes } from "svelte/elements";
16
15
  import type { Variant } from "../../types/variants.js";
17
16
  import { variantToken } from "../../types/variants.js";
18
17
  import type { Size } from "../../types/sizes.js";
@@ -29,7 +28,6 @@
29
28
  shape = "circle",
30
29
  status,
31
30
  class: cls = "",
32
- ...rest
33
31
  }: {
34
32
  src?: string;
35
33
  name?: string;
@@ -40,7 +38,7 @@
40
38
  shape?: AvatarShape;
41
39
  status?: AvatarStatus;
42
40
  class?: string;
43
- } & Omit<HTMLAttributes<HTMLSpanElement>, "class"> = $props();
41
+ } = $props();
44
42
 
45
43
  let imgFailed = $state(false);
46
44
  // Reset the failed flag whenever the source changes.
@@ -82,7 +80,7 @@
82
80
  const shapeClass = $derived(shape === "circle" ? "rounded-full" : "rounded-[var(--ui-border-radius)]");
83
81
  </script>
84
82
 
85
- <span class="relative inline-flex shrink-0 {cls}" {...rest}>
83
+ <span class="relative inline-flex shrink-0 {cls}">
86
84
  <span
87
85
  class="ui-avatar inline-flex items-center justify-center overflow-hidden font-medium select-none {shapeClass} {responsiveClasses(
88
86
  size,
@@ -1,7 +1,6 @@
1
1
  export type AvatarShape = "circle" | "square";
2
2
  export type AvatarStatus = "online" | "offline" | "busy" | "away";
3
3
  import type { Snippet } from "svelte";
4
- import type { HTMLAttributes } from "svelte/elements";
5
4
  import type { Variant } from "../../types/variants.js";
6
5
  import type { Size } from "../../types/sizes.js";
7
6
  import { type Responsive } from "../../types/responsive.js";
@@ -15,7 +14,7 @@ type $$ComponentProps = {
15
14
  shape?: AvatarShape;
16
15
  status?: AvatarStatus;
17
16
  class?: string;
18
- } & Omit<HTMLAttributes<HTMLSpanElement>, "class">;
17
+ };
19
18
  declare const Avatar: import("svelte").Component<$$ComponentProps, {}, "">;
20
19
  type Avatar = ReturnType<typeof Avatar>;
21
20
  export default Avatar;
@@ -21,7 +21,6 @@
21
21
 
22
22
  <script lang="ts">
23
23
  import Avatar from "./Avatar.svelte";
24
- import type { HTMLAttributes } from "svelte/elements";
25
24
  import { variantToken } from "../../types/variants.js";
26
25
  import type { Size } from "../../types/sizes.js";
27
26
  import { responsiveClasses, type Responsive } from "../../types/responsive.js";
@@ -34,7 +33,6 @@
34
33
  variant = "neutral",
35
34
  class: cls = "",
36
35
  children,
37
- ...rest
38
36
  }: {
39
37
  items?: AvatarItem[];
40
38
  max?: number;
@@ -43,7 +41,7 @@
43
41
  variant?: Variant;
44
42
  class?: string;
45
43
  children?: Snippet;
46
- } & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
44
+ } = $props();
47
45
 
48
46
  const shown = $derived(
49
47
  items ? (max != null && items.length > max ? items.slice(0, max) : items) : [],
@@ -63,7 +61,6 @@
63
61
  avatars stay visually separated. -->
64
62
  <div
65
63
  class="flex items-center [&_.ui-avatar]:border-2 [&_.ui-avatar]:[border-color:var(--ui-color-background)] [&>*:not(:first-child)]:-ml-2 {cls}"
66
- {...rest}
67
64
  >
68
65
  {#if items}
69
66
  {#each shown as it, i (i)}
@@ -8,7 +8,6 @@ export type AvatarItem = {
8
8
  variant?: Variant;
9
9
  icon?: Snippet;
10
10
  };
11
- import type { HTMLAttributes } from "svelte/elements";
12
11
  import type { Size } from "../../types/sizes.js";
13
12
  import { type Responsive } from "../../types/responsive.js";
14
13
  type $$ComponentProps = {
@@ -19,7 +18,7 @@ type $$ComponentProps = {
19
18
  variant?: Variant;
20
19
  class?: string;
21
20
  children?: Snippet;
22
- } & Omit<HTMLAttributes<HTMLDivElement>, "class">;
21
+ };
23
22
  declare const AvatarGroup: import("svelte").Component<$$ComponentProps, {}, "">;
24
23
  type AvatarGroup = ReturnType<typeof AvatarGroup>;
25
24
  export default AvatarGroup;
@@ -2,7 +2,6 @@
2
2
  import { uiI18n } from "../../i18n.js";
3
3
  const i18n = uiI18n();
4
4
  import type { Snippet } from "svelte";
5
- import type { HTMLAttributes } from "svelte/elements";
6
5
  import Close from "~icons/mdi/close";
7
6
  import type { Size } from "../../types/sizes.js";
8
7
  import { responsiveClasses, type Responsive } from "../../types/responsive.js";
@@ -28,10 +27,7 @@
28
27
  | "danger"
29
28
  | "ghost";
30
29
 
31
- // Spreads leftover HTML attributes (`class`, `data-*`, `aria-*`, `title`, `id`, event handlers, …)
32
- // onto the chip's root element. `style` is OMITTED — the chip computes its own themed `style`
33
- // (fill/border/text `color-mix`); a passthrough would clobber it. Use `class` for overrides.
34
- interface Props extends Omit<HTMLAttributes<HTMLElement>, "style"> {
30
+ interface Props {
35
31
  text?: string;
36
32
  variant?: BadgeVariant;
37
33
  size?: Responsive<Size>;
@@ -59,8 +55,6 @@
59
55
  href,
60
56
  ondismiss,
61
57
  children,
62
- class: cls = "",
63
- ...rest
64
58
  }: Props = $props();
65
59
 
66
60
  // Every variant maps to a library-wide colour token — no Tailwind
@@ -134,13 +128,12 @@
134
128
  {#if hasContent}
135
129
  <svelte:element
136
130
  this={href ? "a" : "span"}
137
- {...rest}
138
131
  {href}
139
132
  class="inline-flex items-center gap-1 border no-underline select-none {href
140
133
  ? 'cursor-pointer hover:brightness-95'
141
134
  : 'cursor-default'} {responsiveClasses(size, sizeClass)} {rounded
142
135
  ? 'rounded-full'
143
- : 'rounded'} transition-[filter,background-color,border-color] duration-150 {cls}"
136
+ : 'rounded'} transition-[filter,background-color,border-color] duration-150"
144
137
  {style}
145
138
  >
146
139
  <span class="truncate">
@@ -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
  /**
@@ -13,7 +12,7 @@ import { type Responsive } from "../../types/responsive.js";
13
12
  * text stays high-contrast against the background.
14
13
  */
15
14
  type BadgeVariant = "neutral" | "default" | "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "ghost";
16
- interface Props extends Omit<HTMLAttributes<HTMLElement>, "style"> {
15
+ interface Props {
17
16
  text?: string;
18
17
  variant?: BadgeVariant;
19
18
  size?: Responsive<Size>;
@@ -2,7 +2,6 @@
2
2
  import { uiI18n } from "../i18n.js";
3
3
  const i18n = uiI18n();
4
4
  import type { Snippet } from "svelte";
5
- import type { HTMLAttributes } from "svelte/elements";
6
5
  import type { Size } from "../types/sizes.js";
7
6
  import { responsiveClasses, type Responsive } from "../types/responsive.js";
8
7
  import IconClose from "~icons/mdi/close";
@@ -15,7 +14,7 @@
15
14
  */
16
15
  type BannerVariant =
17
16
  "neutral" | "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "ghost";
18
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class" | "style"> {
17
+ interface Props {
19
18
  variant?: BannerVariant;
20
19
  size?: Responsive<Size>;
21
20
  text?: string;
@@ -44,7 +43,6 @@
44
43
  onClose,
45
44
  class: cls = "",
46
45
  children,
47
- ...rest
48
46
  }: Props = $props();
49
47
 
50
48
  // Variant → semantic token (danger maps to --ui-color-error).
@@ -106,7 +104,6 @@
106
104
  {#if open}
107
105
  <div
108
106
  role="status"
109
- {...rest}
110
107
  class="flex w-full items-center border [border-radius:var(--ui-border-radius)] [&_svg]:fill-current {responsiveClasses(
111
108
  size,
112
109
  sizeClass,
@@ -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
  /**
@@ -9,7 +8,7 @@ import { type Responsive } from "../types/responsive.js";
9
8
  * inline field/form status, use <Alert> instead. Honours the shared Size axis (scalar OR responsive).
10
9
  */
11
10
  type BannerVariant = "neutral" | "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "ghost";
12
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class" | "style"> {
11
+ interface Props {
13
12
  variant?: BannerVariant;
14
13
  size?: Responsive<Size>;
15
14
  text?: string;
@@ -19,7 +19,6 @@
19
19
  <script lang="ts">
20
20
  import { uiI18n } from "../../i18n.js";
21
21
  const i18n = uiI18n();
22
- import type { HTMLAttributes } from "svelte/elements";
23
22
  import Button from "../Button.svelte";
24
23
  import Menu from "../Menu.svelte";
25
24
  import type { MenuItem } from "../../data/table/types.js";
@@ -34,14 +33,13 @@
34
33
  maxItems,
35
34
  size = "md",
36
35
  class: cls = "",
37
- ...rest
38
36
  }: {
39
37
  items: BreadcrumbItem[];
40
38
  separator?: Snippet | string;
41
39
  maxItems?: number;
42
40
  size?: Responsive<Size>;
43
41
  class?: string;
44
- } & Omit<HTMLAttributes<HTMLElement>, "class"> = $props();
42
+ } = $props();
45
43
 
46
44
  type Node =
47
45
  | { kind: "crumb"; item: BreadcrumbItem; last: boolean }
@@ -75,7 +73,7 @@
75
73
  }
76
74
  </script>
77
75
 
78
- <nav aria-label={i18n.messages.breadcrumb} class={cls} {...rest}>
76
+ <nav aria-label={i18n.messages.breadcrumb} class={cls}>
79
77
  <ol
80
78
  class="flex flex-wrap items-center gap-1 [color:color-mix(in_srgb,var(--ui-color-text)_60%,transparent)]"
81
79
  >
@@ -5,7 +5,6 @@ export type BreadcrumbItem = {
5
5
  onclick?: () => void;
6
6
  icon?: Snippet;
7
7
  };
8
- import type { HTMLAttributes } from "svelte/elements";
9
8
  import type { Size } from "../../types/sizes.js";
10
9
  import { type Responsive } from "../../types/responsive.js";
11
10
  type $$ComponentProps = {
@@ -14,7 +13,7 @@ type $$ComponentProps = {
14
13
  maxItems?: number;
15
14
  size?: Responsive<Size>;
16
15
  class?: string;
17
- } & Omit<HTMLAttributes<HTMLElement>, "class">;
16
+ };
18
17
  declare const Breadcrumbs: import("svelte").Component<$$ComponentProps, {}, "">;
19
18
  type Breadcrumbs = ReturnType<typeof Breadcrumbs>;
20
19
  export default Breadcrumbs;
@@ -17,7 +17,6 @@
17
17
  variant = "neutral",
18
18
  size = "md",
19
19
  separator = true,
20
- align = "right",
21
20
  class: cls = "",
22
21
  children,
23
22
  ...rest
@@ -26,20 +25,10 @@
26
25
  size?: Responsive<Size>;
27
26
  /** Show the top separator (default true). */
28
27
  separator?: boolean;
29
- /** Horizontal placement of the footer content (action buttons). Default `"right"` — footers
30
- * right-align actions. Convenience over `class`; a `class` justify-* still overrides (applied last). */
31
- align?: "left" | "center" | "right" | "between";
32
28
  class?: string;
33
29
  children?: Snippet;
34
30
  } & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
35
31
 
36
- const justifyClass: Record<NonNullable<typeof align>, string> = {
37
- left: "justify-start",
38
- center: "justify-center",
39
- right: "justify-end",
40
- between: "justify-between",
41
- };
42
-
43
32
  // The body→footer gap (`pad`) is ALWAYS applied, so `separator={false}` still leaves breathing room
44
33
  // above the footer (just no line). `separator={true}` adds the line + a matching margin above it
45
34
  // (`sepGap`), giving the margin → line → pad rhythm.
@@ -55,7 +44,7 @@
55
44
  </script>
56
45
 
57
46
  <div
58
- class="flex items-center {justifyClass[align]} gap-3 {responsiveClasses(size, pad)} {separator
47
+ class="flex items-center justify-end gap-3 {responsiveClasses(size, pad)} {separator
59
48
  ? 'border-t ' + responsiveClasses(size, sepGap)
60
49
  : ''} {cls}"
61
50
  style={separator ? `border-color: ${sepColor}` : ""}
@@ -8,9 +8,6 @@ type $$ComponentProps = {
8
8
  size?: Responsive<Size>;
9
9
  /** Show the top separator (default true). */
10
10
  separator?: boolean;
11
- /** Horizontal placement of the footer content (action buttons). Default `"right"` — footers
12
- * right-align actions. Convenience over `class`; a `class` justify-* still overrides (applied last). */
13
- align?: "left" | "center" | "right" | "between";
14
11
  class?: string;
15
12
  children?: Snippet;
16
13
  } & Omit<HTMLAttributes<HTMLDivElement>, "class">;
@@ -17,7 +17,6 @@
17
17
  import IconNext from "~icons/mdi/chevron-right";
18
18
  import type { Variant } from "../../types/variants.js";
19
19
  import { variantToken } from "../../types/variants.js";
20
- import type { HTMLAttributes } from "svelte/elements";
21
20
 
22
21
  let {
23
22
  items,
@@ -30,7 +29,6 @@
30
29
  variant = "primary",
31
30
  ariaLabel = "Carousel",
32
31
  class: cls = "",
33
- ...rest
34
32
  }: {
35
33
  items: T[];
36
34
  slide: Snippet<[T, number]>;
@@ -43,7 +41,7 @@
43
41
  variant?: Variant;
44
42
  ariaLabel?: string;
45
43
  class?: string;
46
- } & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
44
+ } = $props();
47
45
 
48
46
  const n = $derived(items.length);
49
47
  const token = $derived(variantToken[variant]);
@@ -79,7 +77,6 @@
79
77
 
80
78
  <!-- svelte-ignore a11y_no_noninteractive_element_interactions a11y_no_noninteractive_tabindex (focusable carousel region for keyboard nav) -->
81
79
  <div
82
- {...rest}
83
80
  role="region"
84
81
  aria-roledescription="carousel"
85
82
  aria-label={ariaLabel}
@@ -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
  declare function $$render<T>(): {
5
4
  props: {
6
5
  items: T[];
@@ -14,7 +13,7 @@ declare function $$render<T>(): {
14
13
  variant?: Variant;
15
14
  ariaLabel?: string;
16
15
  class?: string;
17
- } & Omit<HTMLAttributes<HTMLDivElement>, "class">;
16
+ };
18
17
  exports: {};
19
18
  bindings: "index";
20
19
  slots: {};
@@ -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 IconClose from "~icons/mdi/close";
15
14
  import type { Variant } from "../../types/variants.js";
16
15
  import { variantToken } from "../../types/variants.js";
@@ -31,7 +30,6 @@
31
30
  rounded = true,
32
31
  class: cls = "",
33
32
  children,
34
- ...rest
35
33
  }: {
36
34
  text?: string;
37
35
  icon?: Snippet;
@@ -46,7 +44,7 @@
46
44
  rounded?: boolean;
47
45
  class?: string;
48
46
  children?: Snippet;
49
- } & Omit<HTMLAttributes<HTMLElement>, "class" | "style"> = $props();
47
+ } = $props();
50
48
 
51
49
  const interactive = $derived(!!onclick || !!href);
52
50
  const isButton = $derived(!!onclick && !href); // role=button (href navigates instead)
@@ -109,7 +107,6 @@
109
107
 
110
108
  <svelte:element
111
109
  this={href ? "a" : "span"}
112
- {...rest}
113
110
  {href}
114
111
  role={isButton ? "button" : undefined}
115
112
  tabindex={isButton ? (disabled ? -1 : 0) : undefined}
@@ -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";
@@ -17,7 +16,7 @@ type $$ComponentProps = {
17
16
  rounded?: boolean;
18
17
  class?: string;
19
18
  children?: Snippet;
20
- } & Omit<HTMLAttributes<HTMLElement>, "class" | "style">;
19
+ };
21
20
  declare const Chip: import("svelte").Component<$$ComponentProps, {}, "">;
22
21
  type Chip = ReturnType<typeof Chip>;
23
22
  export default Chip;
@@ -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 Input from "../Input.svelte";
12
11
  import Popup from "../Popup.svelte";
13
12
  import IconChevronDown from "~icons/mdi/chevron-down";
@@ -36,7 +35,6 @@
36
35
  id,
37
36
  required = false,
38
37
  class: cls = "",
39
- ...rest
40
38
  }: {
41
39
  value?: string;
42
40
  options?: string[];
@@ -57,7 +55,7 @@
57
55
  id?: string;
58
56
  required?: boolean;
59
57
  class?: string;
60
- } & Omit<HTMLAttributes<HTMLInputElement>, "class"> = $props();
58
+ } = $props();
61
59
 
62
60
  const baseId = $props.id();
63
61
  const listId = `${baseId}-listbox`;
@@ -157,7 +155,6 @@
157
155
  </script>
158
156
 
159
157
  <Input
160
- {...rest}
161
158
  bind:value
162
159
  bind:element={inputEl}
163
160
  bind:fieldElement={fieldEl}
@@ -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";
@@ -23,7 +22,7 @@ type $$ComponentProps = {
23
22
  id?: string;
24
23
  required?: boolean;
25
24
  class?: string;
26
- } & Omit<HTMLAttributes<HTMLInputElement>, "class">;
25
+ };
27
26
  declare const Combobox: import("svelte").Component<$$ComponentProps, {}, "value">;
28
27
  type Combobox = ReturnType<typeof Combobox>;
29
28
  export default Combobox;
@@ -22,7 +22,6 @@
22
22
  <script lang="ts">
23
23
  import { uiI18n } from "../../i18n.js";
24
24
  const i18n = uiI18n();
25
- import type { HTMLAttributes } from "svelte/elements";
26
25
  import Input from "../Input.svelte";
27
26
  import Kbd from "../Kbd/Kbd.svelte";
28
27
  import IconSearch from "~icons/mdi/magnify";
@@ -34,7 +33,6 @@
34
33
  placeholder = "Type a command or search…",
35
34
  empty = "No matching commands",
36
35
  onopen,
37
- ...rest
38
36
  }: {
39
37
  open?: boolean;
40
38
  commands: Command[];
@@ -43,7 +41,7 @@
43
41
  placeholder?: string;
44
42
  empty?: string;
45
43
  onopen?: () => void;
46
- } & Omit<HTMLAttributes<HTMLDivElement>, "class"> = $props();
44
+ } = $props();
47
45
 
48
46
  let query = $state("");
49
47
  let highlight = $state(0);
@@ -141,7 +139,7 @@
141
139
 
142
140
  {#if open}
143
141
  <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
144
- <div use:portal {...rest} class="fixed inset-0 z-[9999] flex justify-center bg-black/40 p-4 pt-[12vh]" role="presentation"
142
+ <div use:portal class="fixed inset-0 z-[9999] flex justify-center bg-black/40 p-4 pt-[12vh]" role="presentation"
145
143
  onclick={(e) => { if (e.target === e.currentTarget) open = false; }}>
146
144
  <div
147
145
  class="h-max w-full max-w-xl overflow-hidden rounded-[var(--ui-border-radius)] border shadow-2xl [background-color:var(--ui-color-background)] [border-color:var(--ui-border-color)]"
@@ -9,7 +9,6 @@ export type Command = {
9
9
  disabled?: boolean;
10
10
  onrun: () => void;
11
11
  };
12
- import type { HTMLAttributes } from "svelte/elements";
13
12
  type $$ComponentProps = {
14
13
  open?: boolean;
15
14
  commands: Command[];
@@ -18,7 +17,7 @@ type $$ComponentProps = {
18
17
  placeholder?: string;
19
18
  empty?: string;
20
19
  onopen?: () => void;
21
- } & Omit<HTMLAttributes<HTMLDivElement>, "class">;
20
+ };
22
21
  declare const CommandPalette: import("svelte").Component<$$ComponentProps, {}, "open">;
23
22
  type CommandPalette = ReturnType<typeof CommandPalette>;
24
23
  export default CommandPalette;
@@ -5,7 +5,6 @@
5
5
  import CardFooter from "./CardFooter.svelte";
6
6
  import Button from "./Button.svelte";
7
7
  import type { ComponentProps, Snippet } from "svelte";
8
- import type { HTMLAttributes } from "svelte/elements";
9
8
  import type { Size } from "../types/sizes.js";
10
9
  import type { Responsive } from "../types/responsive.js";
11
10
 
@@ -15,7 +14,7 @@
15
14
  * consistent with every other surface. Pass `children` to replace the message body with custom
16
15
  * content (the header + footer stay). For a fully custom modal, use `Dialog` directly.
17
16
  */
18
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class"> {
17
+ interface Props {
19
18
  isOpen: boolean;
20
19
  title?: string;
21
20
  message?: string;
@@ -58,7 +57,6 @@
58
57
  onShow,
59
58
  onHide,
60
59
  children,
61
- ...rest
62
60
  }: Props = $props();
63
61
 
64
62
  function handleConfirm() {
@@ -72,7 +70,6 @@
72
70
  </script>
73
71
 
74
72
  <Dialog
75
- {...rest}
76
73
  bind:isOpen
77
74
  {dismissible}
78
75
  {width}
@@ -1,6 +1,5 @@
1
1
  import Dialog from "./Dialog.svelte";
2
2
  import type { ComponentProps, Snippet } from "svelte";
3
- import type { HTMLAttributes } from "svelte/elements";
4
3
  import type { Size } from "../types/sizes.js";
5
4
  import type { Responsive } from "../types/responsive.js";
6
5
  /**
@@ -9,7 +8,7 @@ import type { Responsive } from "../types/responsive.js";
9
8
  * consistent with every other surface. Pass `children` to replace the message body with custom
10
9
  * content (the header + footer stay). For a fully custom modal, use `Dialog` directly.
11
10
  */
12
- interface Props extends Omit<HTMLAttributes<HTMLDivElement>, "class"> {
11
+ interface Props {
13
12
  isOpen: boolean;
14
13
  title?: string;
15
14
  message?: string;