sv5ui-plus 5.0.5 → 5.0.6

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 (199) hide show
  1. package/README.md +5 -5
  2. package/dist/adapters/notify.d.ts +1 -1
  3. package/dist/adapters/notify.js +18 -18
  4. package/dist/compat.d.ts +2 -2
  5. package/dist/compat.js +2 -2
  6. package/dist/components/BentoGrid/BentoCard.svelte +33 -33
  7. package/dist/components/BentoGrid/BentoCard.svelte.d.ts +1 -1
  8. package/dist/components/BentoGrid/BentoGrid.svelte +1 -1
  9. package/dist/components/BentoGrid/BentoGrid.svelte.d.ts +1 -1
  10. package/dist/components/BentoGrid/bento-grid.types.d.ts +2 -2
  11. package/dist/components/BentoGrid/bento-grid.variants.d.ts +1 -1
  12. package/dist/components/BentoGrid/bento-grid.variants.js +10 -10
  13. package/dist/components/BentoGrid/index.d.ts +4 -4
  14. package/dist/components/BentoGrid/index.js +4 -4
  15. package/dist/components/Chart/Chart.svelte +1 -1
  16. package/dist/components/Chart/Chart.svelte.d.ts +1 -1
  17. package/dist/components/Chart/chart.types.d.ts +3 -3
  18. package/dist/components/Chart/index.d.ts +2 -2
  19. package/dist/components/Chart/index.js +2 -2
  20. package/dist/components/Chat/ChatBubble.svelte +19 -19
  21. package/dist/components/Chat/ChatBubble.svelte.d.ts +1 -1
  22. package/dist/components/Chat/ChatInput.svelte +26 -27
  23. package/dist/components/Chat/ChatInput.svelte.d.ts +1 -1
  24. package/dist/components/Chat/ChatMessage.svelte +1 -1
  25. package/dist/components/Chat/ChatMessage.svelte.d.ts +1 -1
  26. package/dist/components/Chat/chat.types.d.ts +6 -6
  27. package/dist/components/Chat/chat.variants.d.ts +1 -1
  28. package/dist/components/Chat/chat.variants.js +29 -29
  29. package/dist/components/Chat/index.d.ts +5 -5
  30. package/dist/components/Chat/index.js +5 -5
  31. package/dist/components/CodeBlock/CodeBlock.svelte +15 -15
  32. package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +1 -1
  33. package/dist/components/CodeBlock/code-block.types.d.ts +5 -5
  34. package/dist/components/CodeBlock/code-block.variants.d.ts +1 -1
  35. package/dist/components/CodeBlock/code-block.variants.js +40 -40
  36. package/dist/components/CodeBlock/index.d.ts +2 -2
  37. package/dist/components/CodeBlock/index.js +1 -1
  38. package/dist/components/ConfirmDialog/ConfirmDialog.svelte +93 -97
  39. package/dist/components/ConfirmDialog/ConfirmDialog.svelte.d.ts +1 -1
  40. package/dist/components/ConfirmDialog/confirm.d.ts +1 -1
  41. package/dist/components/ConfirmDialog/confirm.js +9 -9
  42. package/dist/components/ConfirmDialog/confirm.types.d.ts +4 -4
  43. package/dist/components/ConfirmDialog/index.d.ts +4 -4
  44. package/dist/components/ConfirmDialog/index.js +2 -2
  45. package/dist/components/DatePickerField/DatePickerField.svelte +11 -11
  46. package/dist/components/DatePickerField/DatePickerField.svelte.d.ts +2 -2
  47. package/dist/components/DatePickerField/date-picker-field.types.d.ts +1 -1
  48. package/dist/components/DatePickerField/index.d.ts +2 -2
  49. package/dist/components/DatePickerField/index.js +1 -1
  50. package/dist/components/DateRangePickerField/DateRangePickerField.svelte +26 -26
  51. package/dist/components/DateRangePickerField/DateRangePickerField.svelte.d.ts +2 -2
  52. package/dist/components/DateRangePickerField/date-range-picker-field.types.d.ts +1 -1
  53. package/dist/components/DateRangePickerField/index.d.ts +2 -2
  54. package/dist/components/DateRangePickerField/index.js +1 -1
  55. package/dist/components/Fonts/Fonts.svelte +12 -12
  56. package/dist/components/Fonts/Fonts.svelte.d.ts +1 -1
  57. package/dist/components/Fonts/fonts.d.ts +1 -1
  58. package/dist/components/Fonts/fonts.js +42 -42
  59. package/dist/components/Fonts/fonts.types.d.ts +6 -6
  60. package/dist/components/Fonts/index.d.ts +3 -3
  61. package/dist/components/Fonts/index.js +2 -2
  62. package/dist/components/FormSelect/FormSelect.svelte +4 -4
  63. package/dist/components/FormSelect/FormSelect.svelte.d.ts +2 -2
  64. package/dist/components/FormSelect/form-select.types.d.ts +3 -3
  65. package/dist/components/FormSelect/index.d.ts +2 -2
  66. package/dist/components/FormSelect/index.js +1 -1
  67. package/dist/components/List/List.svelte +1 -1
  68. package/dist/components/List/List.svelte.d.ts +1 -1
  69. package/dist/components/List/ListItem.svelte +31 -39
  70. package/dist/components/List/ListItem.svelte.d.ts +1 -1
  71. package/dist/components/List/index.d.ts +4 -4
  72. package/dist/components/List/index.js +4 -4
  73. package/dist/components/List/list.types.d.ts +4 -4
  74. package/dist/components/List/list.variants.d.ts +1 -1
  75. package/dist/components/List/list.variants.js +22 -22
  76. package/dist/components/LocaleButton/LocaleButton.svelte +104 -108
  77. package/dist/components/LocaleButton/LocaleButton.svelte.d.ts +1 -1
  78. package/dist/components/LocaleButton/index.d.ts +2 -2
  79. package/dist/components/LocaleButton/index.js +1 -1
  80. package/dist/components/LocaleButton/locale-button.types.d.ts +12 -12
  81. package/dist/components/LocaleButton/locale-button.variants.d.ts +2 -2
  82. package/dist/components/LocaleButton/locale-button.variants.js +68 -68
  83. package/dist/components/Marquee/Marquee.svelte +34 -34
  84. package/dist/components/Marquee/Marquee.svelte.d.ts +1 -1
  85. package/dist/components/Marquee/index.d.ts +3 -3
  86. package/dist/components/Marquee/index.js +3 -3
  87. package/dist/components/Marquee/marquee.types.d.ts +4 -4
  88. package/dist/components/Marquee/marquee.variants.d.ts +1 -1
  89. package/dist/components/Marquee/marquee.variants.js +15 -15
  90. package/dist/components/NavigationMenu/NavigationMenu.svelte +366 -379
  91. package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +1 -1
  92. package/dist/components/NavigationMenu/index.d.ts +2 -2
  93. package/dist/components/NavigationMenu/index.js +1 -1
  94. package/dist/components/NavigationMenu/navigation-menu.types.d.ts +17 -17
  95. package/dist/components/NavigationMenu/navigation-menu.variants.d.ts +1 -1
  96. package/dist/components/NavigationMenu/navigation-menu.variants.js +177 -177
  97. package/dist/components/NumberTicker/NumberTicker.svelte +1 -5
  98. package/dist/components/NumberTicker/NumberTicker.svelte.d.ts +1 -1
  99. package/dist/components/NumberTicker/index.d.ts +3 -3
  100. package/dist/components/NumberTicker/index.js +3 -3
  101. package/dist/components/NumberTicker/number-ticker.types.d.ts +1 -1
  102. package/dist/components/NumberTicker/number-ticker.variants.d.ts +1 -1
  103. package/dist/components/NumberTicker/number-ticker.variants.js +3 -3
  104. package/dist/components/PasswordInput/PasswordInput.svelte +58 -58
  105. package/dist/components/PasswordInput/PasswordInput.svelte.d.ts +1 -1
  106. package/dist/components/PasswordInput/index.d.ts +2 -2
  107. package/dist/components/PasswordInput/index.js +1 -1
  108. package/dist/components/PasswordInput/password-input.types.d.ts +9 -9
  109. package/dist/components/PasswordInput/password-input.variants.d.ts +1 -1
  110. package/dist/components/PasswordInput/password-input.variants.js +62 -62
  111. package/dist/components/Prose/Prose.svelte +5 -5
  112. package/dist/components/Prose/Prose.svelte.d.ts +1 -1
  113. package/dist/components/Prose/index.d.ts +3 -3
  114. package/dist/components/Prose/index.js +3 -3
  115. package/dist/components/Prose/prose.types.d.ts +4 -4
  116. package/dist/components/Prose/prose.variants.d.ts +1 -1
  117. package/dist/components/Prose/prose.variants.js +27 -27
  118. package/dist/components/{Resizable/Resizable.svelte → ResizeContainer/ResizeContainer.svelte} +3 -3
  119. package/dist/components/ResizeContainer/ResizeContainer.svelte.d.ts +4 -0
  120. package/dist/components/ResizeContainer/index.d.ts +4 -0
  121. package/dist/components/ResizeContainer/index.js +4 -0
  122. package/dist/components/ResizeContainer/resize-container.types.d.ts +18 -0
  123. package/dist/components/ResizeContainer/resize-container.variants.d.ts +30 -0
  124. package/dist/components/ResizeContainer/resize-container.variants.js +17 -0
  125. package/dist/components/SafeTable/SafeTable.svelte +74 -74
  126. package/dist/components/SafeTable/SafeTable.svelte.d.ts +2 -2
  127. package/dist/components/SafeTable/index.d.ts +2 -2
  128. package/dist/components/SafeTable/index.js +1 -1
  129. package/dist/components/SafeTable/safe-table.types.d.ts +1 -1
  130. package/dist/components/Search/Search.svelte +63 -63
  131. package/dist/components/Search/Search.svelte.d.ts +1 -1
  132. package/dist/components/Search/index.d.ts +2 -2
  133. package/dist/components/Search/index.js +1 -1
  134. package/dist/components/Search/search.types.d.ts +5 -5
  135. package/dist/components/SortableGroup/SortableGroup.svelte +16 -10
  136. package/dist/components/SortableGroup/SortableGroup.svelte.d.ts +3 -3
  137. package/dist/components/SortableGroup/index.d.ts +1 -1
  138. package/dist/components/SortableGroup/index.js +1 -1
  139. package/dist/components/SortableList/SortableList.svelte +49 -46
  140. package/dist/components/SortableList/SortableList.svelte.d.ts +2 -2
  141. package/dist/components/SortableList/index.d.ts +2 -2
  142. package/dist/components/SortableList/index.js +1 -1
  143. package/dist/components/SortableList/sortable-list.types.d.ts +3 -3
  144. package/dist/components/Spotlight/Spotlight.svelte +13 -13
  145. package/dist/components/Spotlight/Spotlight.svelte.d.ts +1 -1
  146. package/dist/components/Spotlight/index.d.ts +3 -3
  147. package/dist/components/Spotlight/index.js +3 -3
  148. package/dist/components/Spotlight/spotlight.types.d.ts +2 -2
  149. package/dist/components/Spotlight/spotlight.variants.d.ts +1 -1
  150. package/dist/components/Spotlight/spotlight.variants.js +5 -5
  151. package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte +23 -23
  152. package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte.d.ts +1 -1
  153. package/dist/components/TableBulkActionBar/index.d.ts +2 -2
  154. package/dist/components/TableBulkActionBar/index.js +1 -1
  155. package/dist/components/TableBulkActionBar/table-bulk-action-bar.types.d.ts +3 -3
  156. package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.d.ts +1 -1
  157. package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.js +7 -7
  158. package/dist/components/TreeView/TreeView.svelte +59 -59
  159. package/dist/components/TreeView/TreeView.svelte.d.ts +1 -1
  160. package/dist/components/TreeView/index.d.ts +3 -3
  161. package/dist/components/TreeView/index.js +2 -2
  162. package/dist/components/TreeView/tree-view.types.d.ts +4 -4
  163. package/dist/components/TreeView/tree-view.variants.d.ts +1 -1
  164. package/dist/components/TreeView/tree-view.variants.js +19 -19
  165. package/dist/config.d.ts +1 -1
  166. package/dist/config.js +28 -28
  167. package/dist/editor.d.ts +1 -1
  168. package/dist/editor.js +1 -1
  169. package/dist/form/resolve-form-field-name.js +1 -1
  170. package/dist/hooks/internal/DragDropProviderScope.svelte +1 -1
  171. package/dist/hooks/internal/DragDropProviderScope.svelte.d.ts +1 -1
  172. package/dist/hooks/internal/SortableProvider.svelte +16 -11
  173. package/dist/hooks/internal/SortableProvider.svelte.d.ts +1 -1
  174. package/dist/hooks/internal/drag-drop-context.d.ts +1 -1
  175. package/dist/hooks/internal/drag-drop-context.js +1 -1
  176. package/dist/hooks/internal/sortable-context.d.ts +6 -6
  177. package/dist/hooks/internal/sortable-context.js +2 -2
  178. package/dist/hooks/useDragDrop/index.d.ts +1 -1
  179. package/dist/hooks/useDragDrop/index.js +1 -1
  180. package/dist/hooks/useDragDrop/useDragDrop.svelte.d.ts +3 -3
  181. package/dist/hooks/useDragDrop/useDragDrop.svelte.js +15 -15
  182. package/dist/hooks/useSortable/index.d.ts +2 -2
  183. package/dist/hooks/useSortable/index.js +2 -2
  184. package/dist/hooks/useSortable/useSortable.svelte.d.ts +4 -4
  185. package/dist/hooks/useSortable/useSortable.svelte.js +23 -23
  186. package/dist/hooks/utils.js +1 -1
  187. package/dist/index.d.ts +29 -29
  188. package/dist/index.js +28 -28
  189. package/dist/mcp/install-template.mjs +44 -44
  190. package/dist/mcp/server.mjs +262 -263
  191. package/dist/mcp/sv5ui-plus-docs.data.json +4 -10
  192. package/package.json +16 -13
  193. package/dist/components/Resizable/Resizable.svelte.d.ts +0 -4
  194. package/dist/components/Resizable/index.d.ts +0 -4
  195. package/dist/components/Resizable/index.js +0 -4
  196. package/dist/components/Resizable/resizable.types.d.ts +0 -18
  197. package/dist/components/Resizable/resizable.variants.d.ts +0 -48
  198. package/dist/components/Resizable/resizable.variants.js +0 -17
  199. /package/dist/components/{Resizable/resizable.types.js → ResizeContainer/resize-container.types.js} +0 -0
@@ -1,6 +1,6 @@
1
- import ChatBubble from './ChatBubble.svelte';
2
- import ChatMessage from './ChatMessage.svelte';
3
- import ChatInput from './ChatInput.svelte';
1
+ import ChatBubble from "./ChatBubble.svelte";
2
+ import ChatMessage from "./ChatMessage.svelte";
3
+ import ChatInput from "./ChatInput.svelte";
4
4
  export { ChatBubble, ChatMessage, ChatInput };
5
- export * from './chat.types.js';
6
- export * from './chat.variants.js';
5
+ export * from "./chat.types.js";
6
+ export * from "./chat.variants.js";
@@ -45,22 +45,22 @@ async function handleCopy() {
45
45
  </script>
46
46
 
47
47
  <div class={classes.root}>
48
- <div class={classes.header}>
49
- <p class={classes.title}>{title}</p>
50
- <button type="button" class={classes.button} disabled={!canCopy} onclick={handleCopy}>
51
- {copyLabel}
52
- </button>
53
- </div>
48
+ <div class={classes.header}>
49
+ <p class={classes.title}>{title}</p>
50
+ <button type="button" class={classes.button} disabled={!canCopy} onclick={handleCopy}>
51
+ {copyLabel}
52
+ </button>
53
+ </div>
54
54
 
55
- <div class={classes.body}>
56
- {#if html}
57
- {@html html}
58
- {:else if children}
59
- {@render children()}
60
- {:else}
61
- <pre class="shiki">
55
+ <div class={classes.body}>
56
+ {#if html}
57
+ {@html html}
58
+ {:else if children}
59
+ {@render children()}
60
+ {:else}
61
+ <pre class="shiki">
62
62
  <code>{code}</code>
63
63
  </pre>
64
- {/if}
65
- </div>
64
+ {/if}
65
+ </div>
66
66
  </div>
@@ -1,4 +1,4 @@
1
- import type { CodeBlockProps } from './code-block.types.js';
1
+ import type { CodeBlockProps } from "./code-block.types.js";
2
2
  export type Props = CodeBlockProps;
3
3
  declare const CodeBlock: import("svelte").Component<CodeBlockProps, {}, "">;
4
4
  type CodeBlock = ReturnType<typeof CodeBlock>;
@@ -1,14 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- import type { ClassNameValue } from 'tailwind-merge';
3
- import type { CodeBlockVariantProps, CodeBlockSlots } from './code-block.variants.js';
1
+ import type { Snippet } from "svelte";
2
+ import type { ClassNameValue } from "tailwind-merge";
3
+ import type { CodeBlockVariantProps, CodeBlockSlots } from "./code-block.variants.js";
4
4
  export type CodeBlockProps = {
5
5
  title?: string;
6
6
  code?: string;
7
7
  copyText?: string;
8
8
  copyable?: boolean;
9
9
  html?: string;
10
- variant?: NonNullable<CodeBlockVariantProps['variant']>;
11
- size?: NonNullable<CodeBlockVariantProps['size']>;
10
+ variant?: NonNullable<CodeBlockVariantProps["variant"]>;
11
+ size?: NonNullable<CodeBlockVariantProps["size"]>;
12
12
  class?: ClassNameValue;
13
13
  ui?: Partial<Record<CodeBlockSlots, ClassNameValue>>;
14
14
  children?: Snippet;
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from "tailwind-variants";
2
2
  export declare const codeBlockVariants: import("tailwind-variants").TVReturnType<{
3
3
  variant: {
4
4
  outline: {
@@ -1,69 +1,69 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from "tailwind-variants";
2
2
  export const codeBlockVariants = tv({
3
3
  slots: {
4
- root: 'mt-4 overflow-hidden rounded-2xl border border-outline-variant bg-surface-container',
5
- header: 'flex items-center justify-between border-b border-outline-variant',
6
- title: 'text-sm font-medium text-on-surface-variant',
7
- button: 'rounded-md border border-outline-variant text-xs font-medium text-on-surface-variant transition-colors hover:bg-surface-container-highest disabled:cursor-not-allowed disabled:opacity-50',
8
- body: 'bg-surface-container-highest [&_.shiki]:rounded-none [&_.shiki]:overflow-x-auto [&_.shiki]:m-0'
4
+ root: "mt-4 overflow-hidden rounded-2xl border border-outline-variant bg-surface-container",
5
+ header: "flex items-center justify-between border-b border-outline-variant",
6
+ title: "text-sm font-medium text-on-surface-variant",
7
+ button: "rounded-md border border-outline-variant text-xs font-medium text-on-surface-variant transition-colors hover:bg-surface-container-highest disabled:cursor-not-allowed disabled:opacity-50",
8
+ body: "bg-surface-container-highest [&_.shiki]:rounded-none [&_.shiki]:overflow-x-auto [&_.shiki]:m-0",
9
9
  },
10
10
  variants: {
11
11
  variant: {
12
12
  outline: {
13
- root: 'border border-outline-variant bg-surface-container',
14
- header: 'border-outline-variant',
15
- button: 'border-outline-variant'
13
+ root: "border border-outline-variant bg-surface-container",
14
+ header: "border-outline-variant",
15
+ button: "border-outline-variant",
16
16
  },
17
17
  soft: {
18
- root: 'border border-outline-variant/60 bg-surface-container/40',
19
- header: 'border-outline-variant/60',
20
- button: 'border-outline-variant/60'
18
+ root: "border border-outline-variant/60 bg-surface-container/40",
19
+ header: "border-outline-variant/60",
20
+ button: "border-outline-variant/60",
21
21
  },
22
22
  subtle: {
23
- root: 'border border-outline-variant/40 bg-surface-container/20',
24
- header: 'border-outline-variant/40',
25
- button: 'border-outline-variant/40'
23
+ root: "border border-outline-variant/40 bg-surface-container/20",
24
+ header: "border-outline-variant/40",
25
+ button: "border-outline-variant/40",
26
26
  },
27
27
  solid: {
28
- root: 'border border-outline-variant/60 bg-surface-container-high',
29
- header: 'border-outline-variant/60',
30
- button: 'border-outline-variant/60'
28
+ root: "border border-outline-variant/60 bg-surface-container-high",
29
+ header: "border-outline-variant/60",
30
+ button: "border-outline-variant/60",
31
31
  },
32
32
  ghost: {
33
- root: 'border border-transparent bg-transparent',
34
- header: 'border-outline-variant/30',
35
- button: 'border-outline-variant/30'
33
+ root: "border border-transparent bg-transparent",
34
+ header: "border-outline-variant/30",
35
+ button: "border-outline-variant/30",
36
36
  },
37
37
  none: {
38
- root: 'border-0 bg-transparent rounded-none',
39
- header: 'border-0 px-0',
40
- button: 'border-outline-variant/40'
41
- }
38
+ root: "border-0 bg-transparent rounded-none",
39
+ header: "border-0 px-0",
40
+ button: "border-outline-variant/40",
41
+ },
42
42
  },
43
43
  size: {
44
44
  sm: {
45
- header: 'px-3 py-2',
46
- button: 'px-2 py-1',
47
- body: '[&_.shiki]:p-3 [&_.shiki]:text-xs [&_.shiki]:leading-5'
45
+ header: "px-3 py-2",
46
+ button: "px-2 py-1",
47
+ body: "[&_.shiki]:p-3 [&_.shiki]:text-xs [&_.shiki]:leading-5",
48
48
  },
49
49
  md: {
50
- header: 'px-4 py-3',
51
- button: 'px-2.5 py-1',
52
- body: '[&_.shiki]:p-4 [&_.shiki]:text-sm [&_.shiki]:leading-6'
50
+ header: "px-4 py-3",
51
+ button: "px-2.5 py-1",
52
+ body: "[&_.shiki]:p-4 [&_.shiki]:text-sm [&_.shiki]:leading-6",
53
53
  },
54
54
  lg: {
55
- header: 'px-5 py-4',
56
- button: 'px-3 py-1.5',
57
- body: '[&_.shiki]:p-5 [&_.shiki]:text-sm [&_.shiki]:leading-6'
58
- }
59
- }
55
+ header: "px-5 py-4",
56
+ button: "px-3 py-1.5",
57
+ body: "[&_.shiki]:p-5 [&_.shiki]:text-sm [&_.shiki]:leading-6",
58
+ },
59
+ },
60
60
  },
61
61
  defaultVariants: {
62
- variant: 'outline',
63
- size: 'md'
64
- }
62
+ variant: "outline",
63
+ size: "md",
64
+ },
65
65
  });
66
66
  export const codeBlockDefaults = {
67
67
  defaultVariants: codeBlockVariants.defaultVariants,
68
- slots: {}
68
+ slots: {},
69
69
  };
@@ -1,2 +1,2 @@
1
- export { default as CodeBlock } from './CodeBlock.svelte';
2
- export type { CodeBlockProps } from './code-block.types.js';
1
+ export { default as CodeBlock } from "./CodeBlock.svelte";
2
+ export type { CodeBlockProps } from "./code-block.types.js";
@@ -1 +1 @@
1
- export { default as CodeBlock } from './CodeBlock.svelte';
1
+ export { default as CodeBlock } from "./CodeBlock.svelte";
@@ -76,107 +76,103 @@ const contentProps = $derived.by(() => {
76
76
  </script>
77
77
 
78
78
  <Dialog.Root bind:open onOpenChange={handleOpenChange}>
79
- <Dialog.Portal>
80
- <Dialog.Overlay
81
- class="fixed inset-0 z-50 bg-(--scrim-bg,rgba(0,0,0,0.3)) backdrop-blur-sm"
82
- />
83
- {#if pending}
84
- <Dialog.Content
85
- {...contentProps}
86
- class="fixed top-1/2 left-1/2 z-50 w-[min(24rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-2xl border border-outline-variant bg-surface p-6 text-center text-on-surface shadow-2xl focus:outline-none"
87
- >
88
- {#if pending.options.title}
89
- <Dialog.Title class="sr-only">{pending.options.title}</Dialog.Title>
90
- {/if}
91
- {#if pending.options.message}
92
- <Dialog.Description class="sr-only"
93
- >{pending.options.message}</Dialog.Description
94
- >
95
- {/if}
79
+ <Dialog.Portal>
80
+ <Dialog.Overlay class="fixed inset-0 z-50 bg-(--scrim-bg,rgba(0,0,0,0.3)) backdrop-blur-sm" />
81
+ {#if pending}
82
+ <Dialog.Content
83
+ {...contentProps}
84
+ class="fixed top-1/2 left-1/2 z-50 w-[min(24rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-2xl border border-outline-variant bg-surface p-6 text-center text-on-surface shadow-2xl focus:outline-none"
85
+ >
86
+ {#if pending.options.title}
87
+ <Dialog.Title class="sr-only">{pending.options.title}</Dialog.Title>
88
+ {/if}
89
+ {#if pending.options.message}
90
+ <Dialog.Description class="sr-only">{pending.options.message}</Dialog.Description>
91
+ {/if}
96
92
 
97
- {#if pending.options.icon}
98
- {#key pending.options.icon}
99
- <div class="mb-4 flex min-h-20 justify-center">
100
- <Icon
101
- name={iconNames[pending.options.icon]}
102
- size={80}
103
- class={iconColors[pending.options.icon]}
104
- />
105
- </div>
106
- {/key}
107
- {/if}
93
+ {#if pending.options.icon}
94
+ {#key pending.options.icon}
95
+ <div class="mb-4 flex min-h-20 justify-center">
96
+ <Icon
97
+ name={iconNames[pending.options.icon]}
98
+ size={80}
99
+ class={iconColors[pending.options.icon]}
100
+ />
101
+ </div>
102
+ {/key}
103
+ {/if}
108
104
 
109
- {#if pending.options.title}
110
- <h3 class="mb-2 text-lg font-semibold text-on-surface">
111
- {pending.options.title}
112
- </h3>
113
- {/if}
105
+ {#if pending.options.title}
106
+ <h3 class="mb-2 text-lg font-semibold text-on-surface">
107
+ {pending.options.title}
108
+ </h3>
109
+ {/if}
114
110
 
115
- {#if pending.options.message}
116
- <p class="mb-6 text-sm text-on-surface-variant">
117
- {pending.options.message}
118
- </p>
119
- {:else if !pending.options.inputPlaceholder}
120
- <div class="mb-6"></div>
121
- {/if}
111
+ {#if pending.options.message}
112
+ <p class="mb-6 text-sm text-on-surface-variant">
113
+ {pending.options.message}
114
+ </p>
115
+ {:else if !pending.options.inputPlaceholder}
116
+ <div class="mb-6"></div>
117
+ {/if}
122
118
 
123
- {#if pending.options.inputPlaceholder}
124
- {#if pending.options.inputChoices && pending.options.inputChoices.length > 0}
125
- <div class="mb-3 flex flex-wrap justify-center gap-1">
126
- {#each pending.options.inputChoices as choice (choice)}
127
- <Button
128
- label={choice}
129
- size="xs"
130
- variant={currentInputValue === choice ? 'solid' : 'outline'}
131
- color={currentInputValue === choice ? 'primary' : 'surface'}
132
- onclick={() => (currentInputValue = choice)}
133
- />
134
- {/each}
135
- </div>
136
- {/if}
119
+ {#if pending.options.inputPlaceholder}
120
+ {#if pending.options.inputChoices && pending.options.inputChoices.length > 0}
121
+ <div class="mb-3 flex flex-wrap justify-center gap-1">
122
+ {#each pending.options.inputChoices as choice (choice)}
123
+ <Button
124
+ label={choice}
125
+ size="xs"
126
+ variant={currentInputValue === choice ? "solid" : "outline"}
127
+ color={currentInputValue === choice ? "primary" : "surface"}
128
+ onclick={() => (currentInputValue = choice)}
129
+ />
130
+ {/each}
131
+ </div>
132
+ {/if}
137
133
 
138
- <div class="mb-6 text-left">
139
- {#if pending.options.inputType === 'textarea'}
140
- <Textarea
141
- bind:value={currentInputValue}
142
- placeholder={pending.options.inputPlaceholder}
143
- class="w-full"
144
- />
145
- {:else}
146
- <Input
147
- type={pending.options.inputType ?? 'text'}
148
- bind:value={currentInputValue}
149
- placeholder={pending.options.inputPlaceholder}
150
- class="w-full"
151
- onkeydown={(e) => {
152
- if (e.key === 'Enter') {
153
- e.preventDefault()
154
- handleConfirm()
155
- }
156
- }}
157
- />
158
- {/if}
159
- </div>
160
- {/if}
134
+ <div class="mb-6 text-left">
135
+ {#if pending.options.inputType === "textarea"}
136
+ <Textarea
137
+ bind:value={currentInputValue}
138
+ placeholder={pending.options.inputPlaceholder}
139
+ class="w-full"
140
+ />
141
+ {:else}
142
+ <Input
143
+ type={pending.options.inputType ?? "text"}
144
+ bind:value={currentInputValue}
145
+ placeholder={pending.options.inputPlaceholder}
146
+ class="w-full"
147
+ onkeydown={(e) => {
148
+ if (e.key === "Enter") {
149
+ e.preventDefault();
150
+ handleConfirm();
151
+ }
152
+ }}
153
+ />
154
+ {/if}
155
+ </div>
156
+ {/if}
161
157
 
162
- <div class="flex justify-center gap-2">
163
- {#if showCancel}
164
- <Button
165
- label={pending.options.cancelText ?? defaultCancelText}
166
- variant="outline"
167
- class="flex-1"
168
- onclick={handleCancel}
169
- />
170
- {/if}
171
- <Button
172
- label={pending.options.confirmText ?? defaultConfirmText}
173
- variant="solid"
174
- color={pending.options.confirmColor ?? 'primary'}
175
- class={showCancel ? 'flex-1' : 'w-full'}
176
- onclick={handleConfirm}
177
- />
178
- </div>
179
- </Dialog.Content>
180
- {/if}
181
- </Dialog.Portal>
158
+ <div class="flex justify-center gap-2">
159
+ {#if showCancel}
160
+ <Button
161
+ label={pending.options.cancelText ?? defaultCancelText}
162
+ variant="outline"
163
+ class="flex-1"
164
+ onclick={handleCancel}
165
+ />
166
+ {/if}
167
+ <Button
168
+ label={pending.options.confirmText ?? defaultConfirmText}
169
+ variant="solid"
170
+ color={pending.options.confirmColor ?? "primary"}
171
+ class={showCancel ? "flex-1" : "w-full"}
172
+ onclick={handleConfirm}
173
+ />
174
+ </div>
175
+ </Dialog.Content>
176
+ {/if}
177
+ </Dialog.Portal>
182
178
  </Dialog.Root>
@@ -2,7 +2,7 @@ export type Props = {
2
2
  confirmText?: string;
3
3
  cancelText?: string;
4
4
  };
5
- import type { ConfirmOptions } from './confirm.types.js';
5
+ import type { ConfirmOptions } from "./confirm.types.js";
6
6
  declare const ConfirmDialog: import("svelte").Component<Props, {
7
7
  show: (options?: ConfirmOptions) => Promise<boolean>;
8
8
  }, "">;
@@ -1,4 +1,4 @@
1
- import type { ConfirmOptions } from './confirm.types.js';
1
+ import type { ConfirmOptions } from "./confirm.types.js";
2
2
  type ShowFn = (options?: ConfirmOptions) => Promise<boolean>;
3
3
  export declare function registerConfirmDialog(fn: ShowFn | null): void;
4
4
  export declare const confirmDialog: {
@@ -5,20 +5,20 @@ export function registerConfirmDialog(fn) {
5
5
  export const confirmDialog = {
6
6
  show(options = {}) {
7
7
  if (!showFn) {
8
- console.warn('[confirmDialog] ConfirmDialog is not registered — add <ConfirmDialog /> to your root layout.');
8
+ console.warn("[confirmDialog] ConfirmDialog is not registered — add <ConfirmDialog /> to your root layout.");
9
9
  return Promise.resolve(false);
10
10
  }
11
11
  return showFn(options);
12
12
  },
13
13
  delete(options = {}) {
14
14
  return this.show({
15
- title: 'Delete this item?',
16
- message: 'This action is permanent and cannot be undone.',
17
- confirmText: 'Delete',
18
- cancelText: 'Cancel',
19
- icon: 'warning',
20
- confirmColor: 'error',
21
- ...options
15
+ title: "Delete this item?",
16
+ message: "This action is permanent and cannot be undone.",
17
+ confirmText: "Delete",
18
+ cancelText: "Cancel",
19
+ icon: "warning",
20
+ confirmColor: "error",
21
+ ...options,
22
22
  });
23
- }
23
+ },
24
24
  };
@@ -1,6 +1,6 @@
1
- import type { ButtonProps } from 'sv5ui';
2
- export type ConfirmIcon = 'warning' | 'error' | 'question' | 'info' | 'success';
3
- export type ConfirmColor = NonNullable<ButtonProps['color']>;
1
+ import type { ButtonProps } from "sv5ui";
2
+ export type ConfirmIcon = "warning" | "error" | "question" | "info" | "success";
3
+ export type ConfirmColor = NonNullable<ButtonProps["color"]>;
4
4
  export interface ConfirmOptions {
5
5
  title?: string;
6
6
  message?: string;
@@ -14,7 +14,7 @@ export interface ConfirmOptions {
14
14
  dismissible?: boolean;
15
15
  inputPlaceholder?: string;
16
16
  inputValue?: string;
17
- inputType?: 'text' | 'password' | 'email' | 'number' | 'textarea';
17
+ inputType?: "text" | "password" | "email" | "number" | "textarea";
18
18
  inputChoices?: string[];
19
19
  onConfirm?: (value?: string) => void;
20
20
  onCancel?: () => void;
@@ -1,4 +1,4 @@
1
- export { default as ConfirmDialog } from './ConfirmDialog.svelte';
2
- export { confirmDialog, registerConfirmDialog } from './confirm.js';
3
- export type { ConfirmOptions, ConfirmIcon, ConfirmColor } from './confirm.types.js';
4
- export type { ConfirmDialogUtility } from './confirm.js';
1
+ export { default as ConfirmDialog } from "./ConfirmDialog.svelte";
2
+ export { confirmDialog, registerConfirmDialog } from "./confirm.js";
3
+ export type { ConfirmOptions, ConfirmIcon, ConfirmColor } from "./confirm.types.js";
4
+ export type { ConfirmDialogUtility } from "./confirm.js";
@@ -1,2 +1,2 @@
1
- export { default as ConfirmDialog } from './ConfirmDialog.svelte';
2
- export { confirmDialog, registerConfirmDialog } from './confirm.js';
1
+ export { default as ConfirmDialog } from "./ConfirmDialog.svelte";
2
+ export { confirmDialog, registerConfirmDialog } from "./confirm.js";
@@ -27,15 +27,15 @@ function handleValueChange(next) {
27
27
  </script>
28
28
 
29
29
  <DatePicker
30
- value={pickerValue}
31
- onValueChange={handleValueChange}
32
- {name}
33
- {granularity}
34
- {hourCycle}
35
- {locale}
36
- {weekStartsOn}
37
- {required}
38
- {disabled}
39
- {readonly}
40
- class={className}
30
+ value={pickerValue}
31
+ onValueChange={handleValueChange}
32
+ {name}
33
+ {granularity}
34
+ {hourCycle}
35
+ {locale}
36
+ {weekStartsOn}
37
+ {required}
38
+ {disabled}
39
+ {readonly}
40
+ class={className}
41
41
  />
@@ -1,5 +1,5 @@
1
- export type { DatePickerFieldProps as Props } from './date-picker-field.types.js';
2
- import type { DatePickerFieldProps } from './date-picker-field.types.js';
1
+ export type { DatePickerFieldProps as Props } from "./date-picker-field.types.js";
2
+ import type { DatePickerFieldProps } from "./date-picker-field.types.js";
3
3
  declare const DatePickerField: import("svelte").Component<DatePickerFieldProps, {}, "value">;
4
4
  type DatePickerField = ReturnType<typeof DatePickerField>;
5
5
  export default DatePickerField;
@@ -1,4 +1,4 @@
1
- export type DateFieldGranularity = 'day' | 'hour' | 'minute' | 'second';
1
+ export type DateFieldGranularity = "day" | "hour" | "minute" | "second";
2
2
  export type DatePickerFieldProps = {
3
3
  value?: string;
4
4
  name?: string;
@@ -1,2 +1,2 @@
1
- export { default as DatePickerField } from './DatePickerField.svelte';
2
- export type { DateFieldGranularity, DatePickerFieldProps } from './date-picker-field.types.js';
1
+ export { default as DatePickerField } from "./DatePickerField.svelte";
2
+ export type { DateFieldGranularity, DatePickerFieldProps } from "./date-picker-field.types.js";
@@ -1 +1 @@
1
- export { default as DatePickerField } from './DatePickerField.svelte';
1
+ export { default as DatePickerField } from "./DatePickerField.svelte";
@@ -56,32 +56,32 @@ function handleClear() {
56
56
  </script>
57
57
 
58
58
  <div class="flex items-center gap-2">
59
- <DateRangePicker
60
- bind:value={pickerValue}
61
- onValueChange={handleValueChange}
62
- onStartValueChange={handleStartValueChange}
63
- onEndValueChange={handleEndValueChange}
64
- {granularity}
65
- timeInput={showTimeInput}
66
- {hourCycle}
67
- {locale}
68
- {weekStartsOn}
69
- {required}
70
- {disabled}
71
- {readonly}
72
- class={className}
73
- />
74
- {#if clearable && (start || end) && !disabled && !readonly}
75
- <Button
76
- type="button"
77
- variant="ghost"
78
- color="secondary"
79
- size="sm"
80
- icon="lucide:x"
81
- onclick={handleClear}
82
- aria-label={clearLabel}
83
- />
84
- {/if}
59
+ <DateRangePicker
60
+ bind:value={pickerValue}
61
+ onValueChange={handleValueChange}
62
+ onStartValueChange={handleStartValueChange}
63
+ onEndValueChange={handleEndValueChange}
64
+ {granularity}
65
+ timeInput={showTimeInput}
66
+ {hourCycle}
67
+ {locale}
68
+ {weekStartsOn}
69
+ {required}
70
+ {disabled}
71
+ {readonly}
72
+ class={className}
73
+ />
74
+ {#if clearable && (start || end) && !disabled && !readonly}
75
+ <Button
76
+ type="button"
77
+ variant="ghost"
78
+ color="secondary"
79
+ size="sm"
80
+ icon="lucide:x"
81
+ onclick={handleClear}
82
+ aria-label={clearLabel}
83
+ />
84
+ {/if}
85
85
  </div>
86
86
  <input type="hidden" name={startName} value={start} />
87
87
  <input type="hidden" name={endName} value={end} />
@@ -1,5 +1,5 @@
1
- export type { DateRangePickerFieldProps as Props } from './date-range-picker-field.types.js';
2
- import type { DateRangePickerFieldProps } from './date-range-picker-field.types.js';
1
+ export type { DateRangePickerFieldProps as Props } from "./date-range-picker-field.types.js";
2
+ import type { DateRangePickerFieldProps } from "./date-range-picker-field.types.js";
3
3
  declare const DateRangePickerField: import("svelte").Component<DateRangePickerFieldProps, {}, "start" | "end">;
4
4
  type DateRangePickerField = ReturnType<typeof DateRangePickerField>;
5
5
  export default DateRangePickerField;
@@ -1,4 +1,4 @@
1
- import type { DateFieldGranularity } from '../DatePickerField/date-picker-field.types.js';
1
+ import type { DateFieldGranularity } from "../DatePickerField/date-picker-field.types.js";
2
2
  export type DateRangePickerFieldProps = {
3
3
  start?: string;
4
4
  end?: string;