sv5ui 1.1.3 → 1.3.0

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 (187) hide show
  1. package/README.md +6 -0
  2. package/dist/Alert/Alert.svelte +33 -22
  3. package/dist/Alert/Alert.svelte.d.ts +1 -1
  4. package/dist/Alert/alert.types.d.ts +4 -0
  5. package/dist/Avatar/Avatar.svelte +72 -46
  6. package/dist/Avatar/avatar.types.d.ts +36 -3
  7. package/dist/Avatar/avatar.variants.d.ts +138 -0
  8. package/dist/Avatar/avatar.variants.js +23 -12
  9. package/dist/Avatar/index.d.ts +1 -1
  10. package/dist/AvatarGroup/AvatarGroup.svelte +11 -6
  11. package/dist/AvatarGroup/AvatarGroup.svelte.d.ts +1 -1
  12. package/dist/AvatarGroup/avatar-group.types.d.ts +18 -3
  13. package/dist/AvatarGroup/avatar-group.variants.d.ts +85 -0
  14. package/dist/AvatarGroup/avatar-group.variants.js +19 -29
  15. package/dist/Badge/Badge.svelte +4 -3
  16. package/dist/Badge/Badge.svelte.d.ts +1 -1
  17. package/dist/Badge/badge.types.d.ts +9 -0
  18. package/dist/Breadcrumb/Breadcrumb.svelte +20 -7
  19. package/dist/Breadcrumb/Breadcrumb.svelte.d.ts +1 -1
  20. package/dist/Breadcrumb/breadcrumb.types.d.ts +5 -1
  21. package/dist/Breadcrumb/breadcrumb.variants.d.ts +15 -5
  22. package/dist/Breadcrumb/breadcrumb.variants.js +7 -3
  23. package/dist/Button/Button.svelte +71 -16
  24. package/dist/Button/Button.svelte.d.ts +0 -1
  25. package/dist/Button/button.types.d.ts +61 -2
  26. package/dist/Calendar/Calendar.svelte +4 -0
  27. package/dist/Calendar/Calendar.svelte.d.ts +1 -1
  28. package/dist/Calendar/calendar.types.d.ts +4 -0
  29. package/dist/Card/Card.svelte +5 -4
  30. package/dist/Card/Card.svelte.d.ts +1 -1
  31. package/dist/Card/card.types.d.ts +5 -1
  32. package/dist/Checkbox/Checkbox.svelte +37 -11
  33. package/dist/Checkbox/Checkbox.svelte.d.ts +1 -1
  34. package/dist/Checkbox/checkbox.types.d.ts +16 -1
  35. package/dist/Checkbox/checkbox.variants.d.ts +90 -0
  36. package/dist/Checkbox/checkbox.variants.js +73 -4
  37. package/dist/CheckboxGroup/CheckboxGroup.svelte +215 -0
  38. package/dist/CheckboxGroup/CheckboxGroup.svelte.d.ts +5 -0
  39. package/dist/CheckboxGroup/checkbox-group.types.d.ts +130 -0
  40. package/dist/CheckboxGroup/checkbox-group.types.js +1 -0
  41. package/dist/CheckboxGroup/checkbox-group.variants.d.ts +553 -0
  42. package/dist/CheckboxGroup/checkbox-group.variants.js +231 -0
  43. package/dist/CheckboxGroup/index.d.ts +2 -0
  44. package/dist/CheckboxGroup/index.js +1 -0
  45. package/dist/Chip/Chip.svelte +3 -2
  46. package/dist/Chip/Chip.svelte.d.ts +1 -1
  47. package/dist/Chip/chip.types.d.ts +5 -1
  48. package/dist/Chip/chip.variants.d.ts +135 -45
  49. package/dist/Chip/chip.variants.js +9 -9
  50. package/dist/ContextMenu/ContextMenu.svelte +87 -77
  51. package/dist/ContextMenu/ContextMenu.svelte.d.ts +1 -1
  52. package/dist/ContextMenu/context-menu.types.d.ts +9 -3
  53. package/dist/ContextMenu/context-menu.types.js +1 -1
  54. package/dist/ContextMenu/context-menu.variants.d.ts +74 -160
  55. package/dist/ContextMenu/context-menu.variants.js +63 -95
  56. package/dist/DropdownMenu/DropdownMenu.svelte +37 -43
  57. package/dist/DropdownMenu/DropdownMenu.svelte.d.ts +1 -1
  58. package/dist/DropdownMenu/dropdown-menu.types.d.ts +9 -3
  59. package/dist/DropdownMenu/dropdown-menu.types.js +1 -1
  60. package/dist/DropdownMenu/dropdown-menu.variants.d.ts +79 -230
  61. package/dist/DropdownMenu/dropdown-menu.variants.js +68 -111
  62. package/dist/DropdownMenu/index.d.ts +1 -1
  63. package/dist/Empty/Empty.svelte +68 -33
  64. package/dist/Empty/Empty.svelte.d.ts +1 -1
  65. package/dist/Empty/empty.types.d.ts +26 -9
  66. package/dist/Empty/empty.variants.d.ts +150 -130
  67. package/dist/Empty/empty.variants.js +33 -324
  68. package/dist/FieldGroup/FieldGroup.svelte +11 -6
  69. package/dist/FieldGroup/FieldGroup.svelte.d.ts +1 -1
  70. package/dist/FieldGroup/field-group.types.d.ts +4 -0
  71. package/dist/FileUpload/FileUpload.svelte +561 -0
  72. package/dist/FileUpload/FileUpload.svelte.d.ts +8 -0
  73. package/dist/FileUpload/file-upload.types.d.ts +164 -0
  74. package/dist/FileUpload/file-upload.types.js +1 -0
  75. package/dist/FileUpload/file-upload.variants.d.ts +397 -0
  76. package/dist/FileUpload/file-upload.variants.js +224 -0
  77. package/dist/FileUpload/index.d.ts +2 -0
  78. package/dist/FileUpload/index.js +1 -0
  79. package/dist/FormField/FormField.svelte +17 -18
  80. package/dist/FormField/FormField.svelte.d.ts +1 -1
  81. package/dist/FormField/form-field.types.d.ts +4 -0
  82. package/dist/Icon/Icon.svelte +13 -7
  83. package/dist/Icon/icon.types.d.ts +18 -9
  84. package/dist/Input/Input.svelte +30 -29
  85. package/dist/Kbd/Kbd.svelte +13 -3
  86. package/dist/Kbd/Kbd.svelte.d.ts +1 -1
  87. package/dist/Kbd/index.d.ts +1 -1
  88. package/dist/Kbd/kbd.types.d.ts +15 -1
  89. package/dist/Kbd/kbd.variants.d.ts +92 -30
  90. package/dist/Kbd/kbd.variants.js +55 -35
  91. package/dist/Kbd/useKbd.svelte.d.ts +2 -2
  92. package/dist/Kbd/useKbd.svelte.js +34 -41
  93. package/dist/Link/Link.svelte +69 -24
  94. package/dist/Link/Link.svelte.d.ts +1 -1
  95. package/dist/Link/link.types.d.ts +26 -8
  96. package/dist/Link/link.variants.d.ts +35 -60
  97. package/dist/Link/link.variants.js +8 -110
  98. package/dist/Modal/Modal.svelte +9 -1
  99. package/dist/Modal/modal.types.d.ts +5 -0
  100. package/dist/Modal/modal.variants.d.ts +5 -0
  101. package/dist/Modal/modal.variants.js +1 -0
  102. package/dist/Pagination/Pagination.svelte +143 -94
  103. package/dist/Pagination/Pagination.svelte.d.ts +1 -1
  104. package/dist/Pagination/index.d.ts +1 -1
  105. package/dist/Pagination/pagination.types.d.ts +21 -2
  106. package/dist/Pagination/pagination.variants.d.ts +21 -387
  107. package/dist/Pagination/pagination.variants.js +63 -59
  108. package/dist/PinInput/PinInput.svelte +150 -0
  109. package/dist/PinInput/PinInput.svelte.d.ts +6 -0
  110. package/dist/PinInput/index.d.ts +2 -0
  111. package/dist/PinInput/index.js +1 -0
  112. package/dist/PinInput/pin-input.types.d.ts +99 -0
  113. package/dist/PinInput/pin-input.types.js +1 -0
  114. package/dist/PinInput/pin-input.variants.d.ts +303 -0
  115. package/dist/PinInput/pin-input.variants.js +196 -0
  116. package/dist/Popover/Popover.svelte +9 -12
  117. package/dist/Popover/Popover.svelte.d.ts +1 -1
  118. package/dist/Popover/popover.types.d.ts +4 -0
  119. package/dist/Popover/popover.variants.d.ts +5 -75
  120. package/dist/Popover/popover.variants.js +6 -16
  121. package/dist/Progress/Progress.svelte +58 -30
  122. package/dist/Progress/progress.types.d.ts +9 -1
  123. package/dist/Progress/progress.variants.d.ts +55 -25
  124. package/dist/Progress/progress.variants.js +34 -28
  125. package/dist/RadioGroup/RadioGroup.svelte +105 -61
  126. package/dist/RadioGroup/RadioGroup.svelte.d.ts +1 -1
  127. package/dist/RadioGroup/radio-group.types.d.ts +16 -1
  128. package/dist/RadioGroup/radio-group.variants.d.ts +90 -0
  129. package/dist/RadioGroup/radio-group.variants.js +73 -4
  130. package/dist/Select/Select.svelte +9 -6
  131. package/dist/Select/Select.svelte.d.ts +1 -1
  132. package/dist/Select/select.types.d.ts +4 -0
  133. package/dist/SelectMenu/SelectMenu.svelte +436 -0
  134. package/dist/SelectMenu/SelectMenu.svelte.d.ts +5 -0
  135. package/dist/SelectMenu/index.d.ts +2 -0
  136. package/dist/SelectMenu/index.js +1 -0
  137. package/dist/SelectMenu/select-menu.types.d.ts +262 -0
  138. package/dist/SelectMenu/select-menu.types.js +1 -0
  139. package/dist/SelectMenu/select-menu.variants.d.ts +759 -0
  140. package/dist/SelectMenu/select-menu.variants.js +33 -0
  141. package/dist/Separator/Separator.svelte +1 -2
  142. package/dist/Separator/separator.variants.d.ts +1 -5
  143. package/dist/Separator/separator.variants.js +2 -2
  144. package/dist/Skeleton/Skeleton.svelte +18 -2
  145. package/dist/Skeleton/Skeleton.svelte.d.ts +1 -1
  146. package/dist/Skeleton/skeleton.types.d.ts +10 -1
  147. package/dist/Slideover/Slideover.svelte +9 -1
  148. package/dist/Slideover/slideover.types.d.ts +5 -0
  149. package/dist/Slideover/slideover.variants.d.ts +20 -5
  150. package/dist/Slideover/slideover.variants.js +4 -29
  151. package/dist/Slider/Slider.svelte +135 -0
  152. package/dist/Slider/Slider.svelte.d.ts +6 -0
  153. package/dist/Slider/index.d.ts +2 -0
  154. package/dist/Slider/index.js +1 -0
  155. package/dist/Slider/slider.types.d.ts +55 -0
  156. package/dist/Slider/slider.types.js +1 -0
  157. package/dist/Slider/slider.variants.d.ts +383 -0
  158. package/dist/Slider/slider.variants.js +102 -0
  159. package/dist/Switch/Switch.svelte +32 -31
  160. package/dist/Switch/Switch.svelte.d.ts +1 -1
  161. package/dist/Switch/switch.types.d.ts +6 -1
  162. package/dist/Switch/switch.variants.js +6 -6
  163. package/dist/Tabs/Tabs.svelte +6 -9
  164. package/dist/Tabs/Tabs.svelte.d.ts +1 -1
  165. package/dist/Tabs/tabs.types.d.ts +4 -0
  166. package/dist/Tabs/tabs.variants.js +2 -0
  167. package/dist/Textarea/Textarea.svelte +26 -25
  168. package/dist/ThemeModeButton/theme-mode-button.types.d.ts +7 -2
  169. package/dist/Timeline/Timeline.svelte +62 -19
  170. package/dist/Timeline/Timeline.svelte.d.ts +1 -1
  171. package/dist/Timeline/index.d.ts +1 -1
  172. package/dist/Timeline/timeline.types.d.ts +8 -0
  173. package/dist/Tooltip/Tooltip.svelte +12 -10
  174. package/dist/Tooltip/Tooltip.svelte.d.ts +1 -1
  175. package/dist/Tooltip/tooltip.types.d.ts +8 -4
  176. package/dist/Tooltip/tooltip.variants.d.ts +10 -75
  177. package/dist/Tooltip/tooltip.variants.js +8 -17
  178. package/dist/User/User.svelte +13 -9
  179. package/dist/User/User.svelte.d.ts +1 -1
  180. package/dist/User/user.types.d.ts +4 -0
  181. package/dist/User/user.variants.d.ts +60 -0
  182. package/dist/User/user.variants.js +13 -1
  183. package/dist/config.d.ts +8 -0
  184. package/dist/config.js +9 -1
  185. package/dist/index.d.ts +5 -0
  186. package/dist/index.js +5 -0
  187. package/package.json +2 -2
@@ -1,16 +1,17 @@
1
- import type { HTMLAnchorAttributes } from 'svelte/elements';
2
- import type { LinkVariantProps, LinkSlots } from './link.variants.js';
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import type { LinkSlots } from './link.variants.js';
3
4
  import type { ClassNameValue } from 'tailwind-merge';
4
- export type LinkProps = Omit<HTMLAnchorAttributes, 'class' | 'href'> & {
5
+ export type LinkProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
5
6
  /**
6
- * The destination URL for the anchor element.
7
+ * Bindable reference to the root DOM element.
7
8
  */
8
- href: string;
9
+ ref?: HTMLElement | null;
9
10
  /**
10
- * Sets the color scheme applied to the link.
11
- * @default 'primary'
11
+ * The destination URL for the anchor element.
12
+ * When omitted, renders as a `<button>` element.
12
13
  */
13
- color?: NonNullable<LinkVariantProps['color']>;
14
+ href?: string;
14
15
  /**
15
16
  * Overrides the auto-detected active state.
16
17
  * When omitted, the active state is inferred from the current route.
@@ -57,6 +58,19 @@ export type LinkProps = Omit<HTMLAnchorAttributes, 'class' | 'href'> & {
57
58
  * Auto-detected from the `href` when omitted.
58
59
  */
59
60
  external?: boolean;
61
+ /**
62
+ * The button type attribute. Only applies when rendering as `<button>`.
63
+ * @default 'button'
64
+ */
65
+ type?: 'button' | 'submit' | 'reset';
66
+ /**
67
+ * The link target attribute. Only applies when rendering as `<a>`.
68
+ */
69
+ target?: string;
70
+ /**
71
+ * The link rel attribute. Only applies when rendering as `<a>`.
72
+ */
73
+ rel?: string;
60
74
  /**
61
75
  * Additional CSS classes for the root element.
62
76
  */
@@ -65,4 +79,8 @@ export type LinkProps = Omit<HTMLAnchorAttributes, 'class' | 'href'> & {
65
79
  * Override styles for specific link slots.
66
80
  */
67
81
  ui?: Partial<Record<LinkSlots, ClassNameValue>>;
82
+ /**
83
+ * Content rendered inside the link.
84
+ */
85
+ children?: Snippet;
68
86
  };
@@ -1,17 +1,12 @@
1
1
  import { type VariantProps } from 'tailwind-variants';
2
2
  export declare const linkVariants: import("tailwind-variants").TVReturnType<{
3
- color: {
4
- primary: string;
5
- secondary: string;
6
- tertiary: string;
7
- success: string;
8
- warning: string;
9
- error: string;
10
- info: string;
11
- };
12
3
  active: {
13
- true: string;
14
- false: string;
4
+ true: {
5
+ base: string;
6
+ };
7
+ false: {
8
+ base: string;
9
+ };
15
10
  };
16
11
  disabled: {
17
12
  true: {
@@ -24,20 +19,15 @@ export declare const linkVariants: import("tailwind-variants").TVReturnType<{
24
19
  false: string;
25
20
  };
26
21
  }, {
27
- base: string[];
22
+ base: string;
28
23
  }, undefined, {
29
- color: {
30
- primary: string;
31
- secondary: string;
32
- tertiary: string;
33
- success: string;
34
- warning: string;
35
- error: string;
36
- info: string;
37
- };
38
24
  active: {
39
- true: string;
40
- false: string;
25
+ true: {
26
+ base: string;
27
+ };
28
+ false: {
29
+ base: string;
30
+ };
41
31
  };
42
32
  disabled: {
43
33
  true: {
@@ -50,20 +40,15 @@ export declare const linkVariants: import("tailwind-variants").TVReturnType<{
50
40
  false: string;
51
41
  };
52
42
  }, {
53
- base: string[];
43
+ base: string;
54
44
  }, import("tailwind-variants").TVReturnType<{
55
- color: {
56
- primary: string;
57
- secondary: string;
58
- tertiary: string;
59
- success: string;
60
- warning: string;
61
- error: string;
62
- info: string;
63
- };
64
45
  active: {
65
- true: string;
66
- false: string;
46
+ true: {
47
+ base: string;
48
+ };
49
+ false: {
50
+ base: string;
51
+ };
67
52
  };
68
53
  disabled: {
69
54
  true: {
@@ -76,24 +61,19 @@ export declare const linkVariants: import("tailwind-variants").TVReturnType<{
76
61
  false: string;
77
62
  };
78
63
  }, {
79
- base: string[];
64
+ base: string;
80
65
  }, undefined, unknown, unknown, undefined>>;
81
66
  export type LinkVariantProps = VariantProps<typeof linkVariants>;
82
67
  export type LinkSlots = keyof ReturnType<typeof linkVariants>;
83
68
  export declare const linkDefaults: {
84
69
  defaultVariants: import("tailwind-variants").TVDefaultVariants<{
85
- color: {
86
- primary: string;
87
- secondary: string;
88
- tertiary: string;
89
- success: string;
90
- warning: string;
91
- error: string;
92
- info: string;
93
- };
94
70
  active: {
95
- true: string;
96
- false: string;
71
+ true: {
72
+ base: string;
73
+ };
74
+ false: {
75
+ base: string;
76
+ };
97
77
  };
98
78
  disabled: {
99
79
  true: {
@@ -106,20 +86,15 @@ export declare const linkDefaults: {
106
86
  false: string;
107
87
  };
108
88
  }, {
109
- base: string[];
89
+ base: string;
110
90
  }, {
111
- color: {
112
- primary: string;
113
- secondary: string;
114
- tertiary: string;
115
- success: string;
116
- warning: string;
117
- error: string;
118
- info: string;
119
- };
120
91
  active: {
121
- true: string;
122
- false: string;
92
+ true: {
93
+ base: string;
94
+ };
95
+ false: {
96
+ base: string;
97
+ };
123
98
  };
124
99
  disabled: {
125
100
  true: {
@@ -132,7 +107,7 @@ export declare const linkDefaults: {
132
107
  false: string;
133
108
  };
134
109
  }, {
135
- base: string[];
110
+ base: string;
136
111
  }>;
137
112
  slots: Partial<Record<LinkSlots, string>>;
138
113
  };
@@ -1,25 +1,16 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const linkVariants = tv({
3
3
  slots: {
4
- base: [
5
- 'inline-flex items-center',
6
- 'transition-colors duration-200',
7
- 'focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary'
8
- ]
4
+ base: 'focus-visible:outline-primary'
9
5
  },
10
6
  variants: {
11
- color: {
12
- primary: '',
13
- secondary: '',
14
- tertiary: '',
15
- success: '',
16
- warning: '',
17
- error: '',
18
- info: ''
19
- },
20
7
  active: {
21
- true: '',
22
- false: ''
8
+ true: {
9
+ base: 'text-primary'
10
+ },
11
+ false: {
12
+ base: 'text-on-surface-variant'
13
+ }
23
14
  },
24
15
  disabled: {
25
16
  true: {
@@ -33,107 +24,14 @@ export const linkVariants = tv({
33
24
  }
34
25
  },
35
26
  compoundVariants: [
36
- // ========== PRIMARY ==========
37
- {
38
- color: 'primary',
39
- active: true,
40
- raw: false,
41
- class: { base: 'text-primary' }
42
- },
43
- {
44
- color: 'primary',
45
- active: false,
46
- disabled: false,
47
- raw: false,
48
- class: { base: 'text-primary/80 hover:text-primary' }
49
- },
50
- // ========== SECONDARY ==========
51
- {
52
- color: 'secondary',
53
- active: true,
54
- raw: false,
55
- class: { base: 'text-secondary' }
56
- },
57
- {
58
- color: 'secondary',
59
- active: false,
60
- disabled: false,
61
- raw: false,
62
- class: { base: 'text-secondary/80 hover:text-secondary' }
63
- },
64
- // ========== TERTIARY ==========
65
- {
66
- color: 'tertiary',
67
- active: true,
68
- raw: false,
69
- class: { base: 'text-tertiary' }
70
- },
71
- {
72
- color: 'tertiary',
73
- active: false,
74
- disabled: false,
75
- raw: false,
76
- class: { base: 'text-tertiary/80 hover:text-tertiary' }
77
- },
78
- // ========== SUCCESS ==========
79
- {
80
- color: 'success',
81
- active: true,
82
- raw: false,
83
- class: { base: 'text-success' }
84
- },
85
- {
86
- color: 'success',
87
- active: false,
88
- disabled: false,
89
- raw: false,
90
- class: { base: 'text-success/80 hover:text-success' }
91
- },
92
- // ========== WARNING ==========
93
- {
94
- color: 'warning',
95
- active: true,
96
- raw: false,
97
- class: { base: 'text-warning' }
98
- },
99
- {
100
- color: 'warning',
101
- active: false,
102
- disabled: false,
103
- raw: false,
104
- class: { base: 'text-warning/80 hover:text-warning' }
105
- },
106
- // ========== ERROR ==========
107
- {
108
- color: 'error',
109
- active: true,
110
- raw: false,
111
- class: { base: 'text-error' }
112
- },
113
- {
114
- color: 'error',
115
- active: false,
116
- disabled: false,
117
- raw: false,
118
- class: { base: 'text-error/80 hover:text-error' }
119
- },
120
- // ========== INFO ==========
121
- {
122
- color: 'info',
123
- active: true,
124
- raw: false,
125
- class: { base: 'text-info' }
126
- },
127
27
  {
128
- color: 'info',
129
28
  active: false,
130
29
  disabled: false,
131
30
  raw: false,
132
- class: { base: 'text-info/80 hover:text-info' }
31
+ class: { base: 'hover:text-on-surface transition-colors' }
133
32
  }
134
33
  ],
135
34
  defaultVariants: {
136
- color: 'primary',
137
35
  active: false,
138
36
  disabled: false,
139
37
  raw: false
@@ -40,6 +40,7 @@
40
40
  header: headerSlot,
41
41
  titleSlot,
42
42
  descriptionSlot,
43
+ actions: actionsSlot,
43
44
  body: bodySlot,
44
45
  footer: footerSlot,
45
46
  closeSlot
@@ -51,7 +52,9 @@
51
52
  const hasTitle = $derived(!!title || !!titleSlot)
52
53
  const hasDescription = $derived(!!description || !!descriptionSlot)
53
54
  const hasHeading = $derived(hasTitle || hasDescription)
54
- const hasHeader = $derived(!!headerSlot || hasHeading || showClose || !!closeSlot)
55
+ const hasHeader = $derived(
56
+ !!headerSlot || hasHeading || !!actionsSlot || showClose || !!closeSlot
57
+ )
55
58
 
56
59
  const variantSlots = $derived(
57
60
  modalVariants({ transition, fullscreen, overlay: showOverlay, scrollable })
@@ -66,6 +69,7 @@
66
69
  description: variantSlots.description({
67
70
  class: [config.slots.description, ui?.description]
68
71
  }),
72
+ actions: variantSlots.actions({ class: [config.slots.actions, ui?.actions] }),
69
73
  body: variantSlots.body({ class: [config.slots.body, ui?.body] }),
70
74
  footer: variantSlots.footer({ class: [config.slots.footer, ui?.footer] }),
71
75
  close: variantSlots.close({ class: [config.slots.close, ui?.close] })
@@ -132,6 +136,10 @@
132
136
  {/if}
133
137
  </div>
134
138
 
139
+ {#if actionsSlot}
140
+ <div class={classes.actions}>{@render actionsSlot()}</div>
141
+ {/if}
142
+
135
143
  {#if showClose || closeSlot}
136
144
  <Dialog.Close>
137
145
  {#snippet child({ props })}
@@ -113,6 +113,11 @@ export interface ModalProps extends RootProps, ContentProps {
113
113
  * Custom description slot. Overrides the `description` prop when provided.
114
114
  */
115
115
  descriptionSlot?: Snippet;
116
+ /**
117
+ * Actions slot rendered between the title/description wrapper
118
+ * and the close button inside the header.
119
+ */
120
+ actions?: Snippet;
116
121
  /**
117
122
  * Body content rendered between the header and footer.
118
123
  */
@@ -38,6 +38,7 @@ export declare const modalVariants: import("tailwind-variants").TVReturnType<{
38
38
  footer: string;
39
39
  title: string;
40
40
  description: string;
41
+ actions: string;
41
42
  close: string;
42
43
  }, undefined, {
43
44
  transition: {
@@ -78,6 +79,7 @@ export declare const modalVariants: import("tailwind-variants").TVReturnType<{
78
79
  footer: string;
79
80
  title: string;
80
81
  description: string;
82
+ actions: string;
81
83
  close: string;
82
84
  }, import("tailwind-variants").TVReturnType<{
83
85
  transition: {
@@ -118,6 +120,7 @@ export declare const modalVariants: import("tailwind-variants").TVReturnType<{
118
120
  footer: string;
119
121
  title: string;
120
122
  description: string;
123
+ actions: string;
121
124
  close: string;
122
125
  }, undefined, unknown, unknown, undefined>>;
123
126
  export type ModalVariantProps = VariantProps<typeof modalVariants>;
@@ -162,6 +165,7 @@ export declare const modalDefaults: {
162
165
  footer: string;
163
166
  title: string;
164
167
  description: string;
168
+ actions: string;
165
169
  close: string;
166
170
  }, {
167
171
  transition: {
@@ -202,6 +206,7 @@ export declare const modalDefaults: {
202
206
  footer: string;
203
207
  title: string;
204
208
  description: string;
209
+ actions: string;
205
210
  close: string;
206
211
  }>;
207
212
  slots: Partial<Record<ModalSlots, string>>;
@@ -9,6 +9,7 @@ export const modalVariants = tv({
9
9
  footer: 'flex items-center gap-1.5 p-4 sm:px-6',
10
10
  title: 'text-on-surface font-semibold',
11
11
  description: 'mt-1 text-on-surface-variant text-sm',
12
+ actions: 'flex items-center gap-1.5 shrink-0',
12
13
  close: 'absolute top-4 end-4'
13
14
  },
14
15
  variants: {