sv5ui-plus 5.0.4 → 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 (215) hide show
  1. package/README.md +6 -6
  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 +2 -2
  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 -31
  188. package/dist/index.js +28 -30
  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 +17 -14
  193. package/dist/components/ColorPicker/ColorPicker.svelte +0 -109
  194. package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +0 -4
  195. package/dist/components/ColorPicker/color-picker.types.d.ts +0 -26
  196. package/dist/components/ColorPicker/color-picker.variants.d.ts +0 -69
  197. package/dist/components/ColorPicker/color-picker.variants.js +0 -13
  198. package/dist/components/ColorPicker/index.d.ts +0 -4
  199. package/dist/components/ColorPicker/index.js +0 -4
  200. package/dist/components/Resizable/Resizable.svelte.d.ts +0 -4
  201. package/dist/components/Resizable/index.d.ts +0 -4
  202. package/dist/components/Resizable/index.js +0 -4
  203. package/dist/components/Resizable/resizable.types.d.ts +0 -18
  204. package/dist/components/Resizable/resizable.types.js +0 -1
  205. package/dist/components/Resizable/resizable.variants.d.ts +0 -48
  206. package/dist/components/Resizable/resizable.variants.js +0 -17
  207. package/dist/components/ScrollArea/ScrollArea.svelte +0 -54
  208. package/dist/components/ScrollArea/ScrollArea.svelte.d.ts +0 -4
  209. package/dist/components/ScrollArea/index.d.ts +0 -4
  210. package/dist/components/ScrollArea/index.js +0 -4
  211. package/dist/components/ScrollArea/scroll-area.types.d.ts +0 -27
  212. package/dist/components/ScrollArea/scroll-area.types.js +0 -1
  213. package/dist/components/ScrollArea/scroll-area.variants.d.ts +0 -45
  214. package/dist/components/ScrollArea/scroll-area.variants.js +0 -27
  215. /package/dist/components/{ColorPicker/color-picker.types.js → ResizeContainer/resize-container.types.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from "tailwind-variants";
2
2
  export const spotlightVariants = tv({
3
3
  slots: {
4
- root: 'relative overflow-hidden group',
5
- spotlight: 'pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100',
6
- content: 'relative z-10 h-full w-full'
7
- }
4
+ root: "relative overflow-hidden group",
5
+ spotlight: "pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",
6
+ content: "relative z-10 h-full w-full",
7
+ },
8
8
  });
@@ -9,30 +9,30 @@ const slots = $derived(tableBulkActionBarVariants());
9
9
  </script>
10
10
 
11
11
  <div
12
- class={slots.root({ class: [ui?.root, className] })}
13
- transition:fly={{ y: 20, duration: 250 }}
14
- {...restProps}
12
+ class={slots.root({ class: [ui?.root, className] })}
13
+ transition:fly={{ y: 20, duration: 250 }}
14
+ {...restProps}
15
15
  >
16
- <div class={slots.content({ class: ui?.content })}>
17
- <span class={slots.countBadge({ class: ui?.countBadge })}>{count}</span>
18
- <span class="opacity-90">{text}</span>
19
- </div>
16
+ <div class={slots.content({ class: ui?.content })}>
17
+ <span class={slots.countBadge({ class: ui?.countBadge })}>{count}</span>
18
+ <span class="opacity-90">{text}</span>
19
+ </div>
20
20
 
21
- {#if children}
22
- <div class={slots.actions({ class: ui?.actions })}>
23
- {@render children()}
24
- </div>
25
- {/if}
21
+ {#if children}
22
+ <div class={slots.actions({ class: ui?.actions })}>
23
+ {@render children()}
24
+ </div>
25
+ {/if}
26
26
 
27
- <div class={slots.clearButton({ class: ui?.clearButton })}>
28
- <Button
29
- variant="ghost"
30
- color="surface"
31
- size="sm"
32
- icon="lucide:x"
33
- onclick={onClear}
34
- class="h-8 w-8 !p-0 rounded-full"
35
- aria-label="Clear selection"
36
- />
37
- </div>
27
+ <div class={slots.clearButton({ class: ui?.clearButton })}>
28
+ <Button
29
+ variant="ghost"
30
+ color="surface"
31
+ size="sm"
32
+ icon="lucide:x"
33
+ onclick={onClear}
34
+ class="h-8 w-8 !p-0 rounded-full"
35
+ aria-label="Clear selection"
36
+ />
37
+ </div>
38
38
  </div>
@@ -1,4 +1,4 @@
1
- import type { TableBulkActionBarProps } from './table-bulk-action-bar.types.js';
1
+ import type { TableBulkActionBarProps } from "./table-bulk-action-bar.types.js";
2
2
  export type Props = TableBulkActionBarProps;
3
3
  declare const TableBulkActionBar: import("svelte").Component<TableBulkActionBarProps, {}, "">;
4
4
  type TableBulkActionBar = ReturnType<typeof TableBulkActionBar>;
@@ -1,2 +1,2 @@
1
- export { default as TableBulkActionBar } from './TableBulkActionBar.svelte';
2
- export type { TableBulkActionBarProps } from './table-bulk-action-bar.types.js';
1
+ export { default as TableBulkActionBar } from "./TableBulkActionBar.svelte";
2
+ export type { TableBulkActionBarProps } from "./table-bulk-action-bar.types.js";
@@ -1 +1 @@
1
- export { default as TableBulkActionBar } from './TableBulkActionBar.svelte';
1
+ export { default as TableBulkActionBar } from "./TableBulkActionBar.svelte";
@@ -1,6 +1,6 @@
1
- import type { Snippet } from 'svelte';
2
- import type { ClassNameValue } from 'tailwind-merge';
3
- import type { TableBulkActionBarSlots } from './table-bulk-action-bar.variants.js';
1
+ import type { Snippet } from "svelte";
2
+ import type { ClassNameValue } from "tailwind-merge";
3
+ import type { TableBulkActionBarSlots } from "./table-bulk-action-bar.variants.js";
4
4
  export type TableBulkActionBarProps = {
5
5
  /**
6
6
  * The number of selected items to display.
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from "tailwind-variants";
2
2
  export declare const tableBulkActionBarVariants: import("tailwind-variants").TVReturnType<{
3
3
  [key: string]: {
4
4
  [key: string]: import("tailwind-variants").ClassValue | {
@@ -1,10 +1,10 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from "tailwind-variants";
2
2
  export const tableBulkActionBarVariants = tv({
3
3
  slots: {
4
- root: 'fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center justify-between gap-6 rounded-2xl border border-outline-variant/50 bg-surface/95 px-4 py-3 shadow-xl shadow-surface-container-highest/20 backdrop-blur-md',
5
- content: 'flex items-center gap-3 text-sm text-on-surface whitespace-nowrap',
6
- countBadge: 'font-semibold bg-primary text-on-primary px-2 py-0.5 rounded-full text-xs flex items-center justify-center min-w-[20px]',
7
- actions: 'flex items-center gap-2 border-l border-outline-variant/50 pl-4',
8
- clearButton: ''
9
- }
4
+ root: "fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center justify-between gap-6 rounded-2xl border border-outline-variant/50 bg-surface/95 px-4 py-3 shadow-xl shadow-surface-container-highest/20 backdrop-blur-md",
5
+ content: "flex items-center gap-3 text-sm text-on-surface whitespace-nowrap",
6
+ countBadge: "font-semibold bg-primary text-on-primary px-2 py-0.5 rounded-full text-xs flex items-center justify-center min-w-[20px]",
7
+ actions: "flex items-center gap-2 border-l border-outline-variant/50 pl-4",
8
+ clearButton: "",
9
+ },
10
10
  });
@@ -27,69 +27,69 @@ function handleRowClick(e, item) {
27
27
  </script>
28
28
 
29
29
  {#snippet renderTree(treeItems: TreeItem[])}
30
- <div class={styles.root()}>
31
- {#each treeItems as item}
32
- {@const hasChildren = item.children && item.children.length > 0}
33
- {@const isExpanded = expandedSet.has(item.id)}
34
- {@const isSelected = selectedSet.has(item.id)}
35
-
36
- <div class={styles.item()}>
37
- <!-- svelte-ignore a11y_click_events_have_key_events -->
38
- <!-- svelte-ignore a11y_no_static_element_interactions -->
39
- <div
40
- class={twMerge(
41
- styles.itemRow(),
42
- isSelected && styles.itemRowActive(),
43
- item.disabled && styles.itemRowDisabled()
44
- )}
45
- onclick={(e) => handleRowClick(e, item)}
46
- >
47
- <!-- Chevron / Spacer -->
48
- <div class={styles.chevronWrapper()}>
49
- {#if hasChildren}
50
- <button
51
- type="button"
52
- class="w-full h-full flex items-center justify-center outline-none"
53
- onclick={(e) => {
54
- if (!expandOnRowClick) toggleExpand(e, item)
55
- }}
56
- tabindex="-1"
57
- disabled={item.disabled}
58
- >
59
- <Icon
60
- name="lucide:chevron-right"
61
- class={twMerge(styles.chevron(), isExpanded && 'rotate-90')}
62
- />
63
- </button>
64
- {/if}
65
- </div>
30
+ <div class={styles.root()}>
31
+ {#each treeItems as item}
32
+ {@const hasChildren = item.children && item.children.length > 0}
33
+ {@const isExpanded = expandedSet.has(item.id)}
34
+ {@const isSelected = selectedSet.has(item.id)}
66
35
 
67
- <!-- Icon -->
68
- {#if item.icon}
69
- <Icon name={item.icon} class={styles.icon()} />
70
- {/if}
36
+ <div class={styles.item()}>
37
+ <!-- svelte-ignore a11y_click_events_have_key_events -->
38
+ <!-- svelte-ignore a11y_no_static_element_interactions -->
39
+ <div
40
+ class={twMerge(
41
+ styles.itemRow(),
42
+ isSelected && styles.itemRowActive(),
43
+ item.disabled && styles.itemRowDisabled(),
44
+ )}
45
+ onclick={(e) => handleRowClick(e, item)}
46
+ >
47
+ <!-- Chevron / Spacer -->
48
+ <div class={styles.chevronWrapper()}>
49
+ {#if hasChildren}
50
+ <button
51
+ type="button"
52
+ class="w-full h-full flex items-center justify-center outline-none"
53
+ onclick={(e) => {
54
+ if (!expandOnRowClick) toggleExpand(e, item);
55
+ }}
56
+ tabindex="-1"
57
+ disabled={item.disabled}
58
+ >
59
+ <Icon
60
+ name="lucide:chevron-right"
61
+ class={twMerge(styles.chevron(), isExpanded && "rotate-90")}
62
+ />
63
+ </button>
64
+ {/if}
65
+ </div>
71
66
 
72
- <!-- Label -->
73
- <div class={styles.label()}>
74
- {#if labelSnippet}
75
- {@render labelSnippet(item)}
76
- {:else}
77
- {item.label}
78
- {/if}
79
- </div>
80
- </div>
67
+ <!-- Icon -->
68
+ {#if item.icon}
69
+ <Icon name={item.icon} class={styles.icon()} />
70
+ {/if}
81
71
 
82
- <!-- Children -->
83
- {#if hasChildren && isExpanded}
84
- <div class={styles.childrenWrapper()}>
85
- {@render renderTree(item.children!)}
86
- </div>
87
- {/if}
88
- </div>
89
- {/each}
90
- </div>
72
+ <!-- Label -->
73
+ <div class={styles.label()}>
74
+ {#if labelSnippet}
75
+ {@render labelSnippet(item)}
76
+ {:else}
77
+ {item.label}
78
+ {/if}
79
+ </div>
80
+ </div>
81
+
82
+ <!-- Children -->
83
+ {#if hasChildren && isExpanded}
84
+ <div class={styles.childrenWrapper()}>
85
+ {@render renderTree(item.children!)}
86
+ </div>
87
+ {/if}
88
+ </div>
89
+ {/each}
90
+ </div>
91
91
  {/snippet}
92
92
 
93
93
  <div class={className} {...restProps}>
94
- {@render renderTree(items)}
94
+ {@render renderTree(items)}
95
95
  </div>
@@ -1,4 +1,4 @@
1
- import type { TreeViewProps } from './tree-view.types.js';
1
+ import type { TreeViewProps } from "./tree-view.types.js";
2
2
  declare const TreeView: import("svelte").Component<TreeViewProps, {}, "expandedIds">;
3
3
  type TreeView = ReturnType<typeof TreeView>;
4
4
  export default TreeView;
@@ -1,4 +1,4 @@
1
- import TreeView from './TreeView.svelte';
1
+ import TreeView from "./TreeView.svelte";
2
2
  export { TreeView };
3
- export type { TreeViewProps, TreeItem as TreeViewItem } from './tree-view.types.js';
4
- export * from './tree-view.variants.js';
3
+ export type { TreeViewProps, TreeItem as TreeViewItem } from "./tree-view.types.js";
4
+ export * from "./tree-view.variants.js";
@@ -1,3 +1,3 @@
1
- import TreeView from './TreeView.svelte';
1
+ import TreeView from "./TreeView.svelte";
2
2
  export { TreeView };
3
- export * from './tree-view.variants.js';
3
+ export * from "./tree-view.variants.js";
@@ -1,6 +1,6 @@
1
- import type { HTMLAttributes } from 'svelte/elements';
2
- import type { TreeViewVariantProps } from './tree-view.variants.js';
3
- import type { Snippet } from 'svelte';
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ import type { TreeViewVariantProps } from "./tree-view.variants.js";
3
+ import type { Snippet } from "svelte";
4
4
  export interface TreeItem {
5
5
  /**
6
6
  * Unique identifier for the item.
@@ -43,7 +43,7 @@ export interface TreeViewProps extends HTMLAttributes<HTMLDivElement> {
43
43
  /**
44
44
  * Component size.
45
45
  */
46
- size?: TreeViewVariantProps['size'];
46
+ size?: TreeViewVariantProps["size"];
47
47
  /**
48
48
  * Whether clicking the row expands the item, or only clicking the chevron expands it.
49
49
  * @default true
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from "tailwind-variants";
2
2
  export declare const treeViewVariants: import("tailwind-variants").TVReturnType<{
3
3
  size: {
4
4
  sm: {
@@ -1,30 +1,30 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from "tailwind-variants";
2
2
  export const treeViewVariants = tv({
3
3
  slots: {
4
- root: 'flex flex-col text-sm',
5
- item: 'flex flex-col',
6
- itemRow: 'flex items-center gap-1.5 py-1.5 px-2 rounded-md hover:bg-surface-100 dark:hover:bg-surface-800 cursor-pointer select-none transition-colors text-surface-900 dark:text-surface-50',
7
- itemRowActive: 'bg-primary-50 dark:bg-primary-900/30 text-primary-900 dark:text-primary-100',
8
- itemRowDisabled: 'opacity-50 cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent',
9
- chevronWrapper: 'flex items-center justify-center w-5 h-5 shrink-0 rounded hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors',
10
- chevron: 'w-4 h-4 transition-transform duration-200',
11
- icon: 'w-4 h-4 shrink-0 text-surface-500 dark:text-surface-400',
12
- label: 'truncate flex-1',
13
- childrenWrapper: 'flex flex-col pl-4 ml-2.5 border-l border-outline-variant/50 mt-1'
4
+ root: "flex flex-col text-sm",
5
+ item: "flex flex-col",
6
+ itemRow: "flex items-center gap-1.5 py-1.5 px-2 rounded-md hover:bg-surface-100 dark:hover:bg-surface-800 cursor-pointer select-none transition-colors text-surface-900 dark:text-surface-50",
7
+ itemRowActive: "bg-primary-50 dark:bg-primary-900/30 text-primary-900 dark:text-primary-100",
8
+ itemRowDisabled: "opacity-50 cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent",
9
+ chevronWrapper: "flex items-center justify-center w-5 h-5 shrink-0 rounded hover:bg-surface-200 dark:hover:bg-surface-700 transition-colors",
10
+ chevron: "w-4 h-4 transition-transform duration-200",
11
+ icon: "w-4 h-4 shrink-0 text-surface-500 dark:text-surface-400",
12
+ label: "truncate flex-1",
13
+ childrenWrapper: "flex flex-col pl-4 ml-2.5 border-l border-outline-variant/50 mt-1",
14
14
  },
15
15
  variants: {
16
16
  size: {
17
17
  sm: {
18
- itemRow: 'py-1 text-xs',
19
- chevron: 'w-3 h-3',
20
- icon: 'w-3 h-3'
18
+ itemRow: "py-1 text-xs",
19
+ chevron: "w-3 h-3",
20
+ icon: "w-3 h-3",
21
21
  },
22
22
  md: {
23
- itemRow: 'py-1.5 text-sm'
24
- }
25
- }
23
+ itemRow: "py-1.5 text-sm",
24
+ },
25
+ },
26
26
  },
27
27
  defaultVariants: {
28
- size: 'md'
29
- }
28
+ size: "md",
29
+ },
30
30
  });
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FontsConfig } from './components/Fonts/fonts.types.js';
1
+ import type { FontsConfig } from "./components/Fonts/fonts.types.js";
2
2
  /**
3
3
  * SV5UI Plus Global Configuration
4
4
  *
package/dist/config.js CHANGED
@@ -32,32 +32,32 @@
32
32
  * Default icons used across components
33
33
  */
34
34
  export const iconsDefaults = {
35
- loading: 'lucide:loader-circle',
36
- chevronDown: 'lucide:chevron-down',
37
- chevronLeft: 'lucide:chevron-left',
38
- chevronRight: 'lucide:chevron-right',
39
- chevronsLeft: 'lucide:chevrons-left',
40
- chevronsRight: 'lucide:chevrons-right',
41
- ellipsis: 'lucide:ellipsis',
42
- close: 'lucide:x',
43
- menu: 'lucide:menu',
44
- external: 'lucide:arrow-up-right',
45
- check: 'lucide:check',
46
- light: 'lucide:sun',
47
- dark: 'lucide:moon',
48
- upload: 'lucide:upload',
49
- file: 'lucide:file',
50
- zoomIn: 'lucide:zoom-in',
51
- trash: 'lucide:trash-2',
52
- search: 'lucide:search',
53
- star: 'lucide:star',
54
- folder: 'lucide:folder',
55
- folderOpen: 'lucide:folder-open',
56
- sortAsc: 'lucide:chevron-up',
57
- sortDesc: 'lucide:chevron-down',
58
- sortDefault: 'lucide:chevrons-up-down',
59
- panelLeft: 'lucide:panel-left',
60
- dragHandle: 'lucide:grip-vertical'
35
+ loading: "lucide:loader-circle",
36
+ chevronDown: "lucide:chevron-down",
37
+ chevronLeft: "lucide:chevron-left",
38
+ chevronRight: "lucide:chevron-right",
39
+ chevronsLeft: "lucide:chevrons-left",
40
+ chevronsRight: "lucide:chevrons-right",
41
+ ellipsis: "lucide:ellipsis",
42
+ close: "lucide:x",
43
+ menu: "lucide:menu",
44
+ external: "lucide:arrow-up-right",
45
+ check: "lucide:check",
46
+ light: "lucide:sun",
47
+ dark: "lucide:moon",
48
+ upload: "lucide:upload",
49
+ file: "lucide:file",
50
+ zoomIn: "lucide:zoom-in",
51
+ trash: "lucide:trash-2",
52
+ search: "lucide:search",
53
+ star: "lucide:star",
54
+ folder: "lucide:folder",
55
+ folderOpen: "lucide:folder-open",
56
+ sortAsc: "lucide:chevron-up",
57
+ sortDesc: "lucide:chevron-down",
58
+ sortDefault: "lucide:chevrons-up-down",
59
+ panelLeft: "lucide:panel-left",
60
+ dragHandle: "lucide:grip-vertical",
61
61
  };
62
62
  // ==================== GLOBAL STATE ====================
63
63
  let globalConfig = {};
@@ -93,10 +93,10 @@ function deepMerge(target, source) {
93
93
  const sourceValue = source[key];
94
94
  const targetValue = target[key];
95
95
  if (sourceValue !== undefined &&
96
- typeof sourceValue === 'object' &&
96
+ typeof sourceValue === "object" &&
97
97
  sourceValue !== null &&
98
98
  !Array.isArray(sourceValue) &&
99
- typeof targetValue === 'object' &&
99
+ typeof targetValue === "object" &&
100
100
  targetValue !== null &&
101
101
  !Array.isArray(targetValue)) {
102
102
  result[key] = deepMerge(targetValue, sourceValue);
package/dist/editor.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Compatibility proxy for the SV5UI editor subpath. */
2
- export * from 'sv5ui/editor';
2
+ export * from "sv5ui/editor";
package/dist/editor.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Compatibility proxy for the SV5UI editor subpath. */
2
- export * from 'sv5ui/editor';
2
+ export * from "sv5ui/editor";
@@ -7,5 +7,5 @@ export function resolveFormFieldName(name, multiple) {
7
7
  return undefined;
8
8
  if (!multiple)
9
9
  return name;
10
- return name.endsWith('[]') ? name : `${name}[]`;
10
+ return name.endsWith("[]") ? name : `${name}[]`;
11
11
  }
@@ -25,5 +25,5 @@ function handleDragEnd(event) {
25
25
  </script>
26
26
 
27
27
  <DragDropProvider onDragStart={handleDragStart} onDragEnd={handleDragEnd}>
28
- {@render children?.()}
28
+ {@render children?.()}
29
29
  </DragDropProvider>
@@ -1,4 +1,4 @@
1
- import { type Snippet } from 'svelte';
1
+ import { type Snippet } from "svelte";
2
2
  interface Props {
3
3
  children?: Snippet;
4
4
  }
@@ -53,16 +53,21 @@ function handleDragEnd(event) {
53
53
  </script>
54
54
 
55
55
  {#if isGrouped}
56
- {@render children?.()}
56
+ {@render children?.()}
57
57
  {:else}
58
- <DragDropProvider {modifiers} onDragStart={handleDragStart} onDragOver={handleDragOver} onDragEnd={handleDragEnd}>
59
- {@render children?.()}
60
- {#if overlay}
61
- <DragOverlay>
62
- {#snippet children(draggable)}
63
- {@render overlay({ item: draggable.data as T })}
64
- {/snippet}
65
- </DragOverlay>
66
- {/if}
67
- </DragDropProvider>
58
+ <DragDropProvider
59
+ {modifiers}
60
+ onDragStart={handleDragStart}
61
+ onDragOver={handleDragOver}
62
+ onDragEnd={handleDragEnd}
63
+ >
64
+ {@render children?.()}
65
+ {#if overlay}
66
+ <DragOverlay>
67
+ {#snippet children(draggable)}
68
+ {@render overlay({ item: draggable.data as T })}
69
+ {/snippet}
70
+ </DragOverlay>
71
+ {/if}
72
+ </DragDropProvider>
68
73
  {/if}
@@ -1,4 +1,4 @@
1
- import { type Snippet } from 'svelte';
1
+ import { type Snippet } from "svelte";
2
2
  declare function $$render<T>(): {
3
3
  props: {
4
4
  children?: Snippet;
@@ -1,4 +1,4 @@
1
- import type { DragPayload, UseDroppableOptions } from '../useDragDrop/useDragDrop.svelte.js';
1
+ import type { DragPayload, UseDroppableOptions } from "../useDragDrop/useDragDrop.svelte.js";
2
2
  export declare const DRAG_DROP_CONTEXT_KEY: unique symbol;
3
3
  export interface DragDropContextValue {
4
4
  registerDroppable: <T>(id: string, options: UseDroppableOptions<T>) => void;
@@ -1 +1 @@
1
- export const DRAG_DROP_CONTEXT_KEY = Symbol('sv5ui-plus-drag-drop');
1
+ export const DRAG_DROP_CONTEXT_KEY = Symbol("sv5ui-plus-drag-drop");
@@ -1,5 +1,5 @@
1
- import type { UseSortableOptions } from '../useSortable/useSortable.svelte.js';
2
- import type { Snippet } from 'svelte';
1
+ import type { UseSortableOptions } from "../useSortable/useSortable.svelte.js";
2
+ import type { Snippet } from "svelte";
3
3
  export declare const SORTABLE_CONTEXT_KEY: unique symbol;
4
4
  export declare const SORTABLE_GROUP_CONTEXT_KEY: unique symbol;
5
5
  export interface SortableGroupContextValue {
@@ -15,11 +15,11 @@ export interface SortableGroupContextValue {
15
15
  }
16
16
  export interface SortableContextValue<T> {
17
17
  groupId: string;
18
- getItems: UseSortableOptions<T>['getItems'];
19
- getId: UseSortableOptions<T>['getId'];
20
- onReorder: UseSortableOptions<T>['onReorder'];
18
+ getItems: UseSortableOptions<T>["getItems"];
19
+ getId: UseSortableOptions<T>["getId"];
20
+ onReorder: UseSortableOptions<T>["onReorder"];
21
21
  isDisabled: () => boolean;
22
- getAxis: () => 'vertical' | 'horizontal' | 'grid';
22
+ getAxis: () => "vertical" | "horizontal" | "grid";
23
23
  getHandle: () => string | undefined;
24
24
  setDraggingId: (id: string | number | null) => void;
25
25
  getDraggingId: () => string | number | null;
@@ -1,2 +1,2 @@
1
- export const SORTABLE_CONTEXT_KEY = Symbol('sv5ui-plus-sortable');
2
- export const SORTABLE_GROUP_CONTEXT_KEY = Symbol('sv5ui-plus-sortable-group');
1
+ export const SORTABLE_CONTEXT_KEY = Symbol("sv5ui-plus-sortable");
2
+ export const SORTABLE_GROUP_CONTEXT_KEY = Symbol("sv5ui-plus-sortable-group");
@@ -1 +1 @@
1
- export * from './useDragDrop.svelte.js';
1
+ export * from "./useDragDrop.svelte.js";
@@ -1 +1 @@
1
- export * from './useDragDrop.svelte.js';
1
+ export * from "./useDragDrop.svelte.js";
@@ -1,6 +1,6 @@
1
- import type { Action } from 'svelte/action';
2
- import type { Component } from 'svelte';
3
- import { type Snippet } from 'svelte';
1
+ import type { Action } from "svelte/action";
2
+ import type { Component } from "svelte";
3
+ import { type Snippet } from "svelte";
4
4
  export interface DragPayload<T = unknown> {
5
5
  id: string;
6
6
  data?: T;