sv5ui-plus 4.0.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 (214) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/adapters/notify.d.ts +29 -0
  4. package/dist/adapters/notify.js +88 -0
  5. package/dist/compat.d.ts +6 -0
  6. package/dist/compat.js +6 -0
  7. package/dist/components/BentoGrid/BentoCard.svelte +45 -0
  8. package/dist/components/BentoGrid/BentoCard.svelte.d.ts +4 -0
  9. package/dist/components/BentoGrid/BentoGrid.svelte +9 -0
  10. package/dist/components/BentoGrid/BentoGrid.svelte.d.ts +4 -0
  11. package/dist/components/BentoGrid/bento-grid.types.d.ts +47 -0
  12. package/dist/components/BentoGrid/bento-grid.types.js +1 -0
  13. package/dist/components/BentoGrid/bento-grid.variants.d.ts +30 -0
  14. package/dist/components/BentoGrid/bento-grid.variants.js +16 -0
  15. package/dist/components/BentoGrid/index.d.ts +5 -0
  16. package/dist/components/BentoGrid/index.js +5 -0
  17. package/dist/components/Chart/Chart.svelte +62 -0
  18. package/dist/components/Chart/Chart.svelte.d.ts +4 -0
  19. package/dist/components/Chart/chart.types.d.ts +16 -0
  20. package/dist/components/Chart/chart.types.js +1 -0
  21. package/dist/components/Chart/index.d.ts +2 -0
  22. package/dist/components/Chart/index.js +2 -0
  23. package/dist/components/Chat/ChatBubble.svelte +30 -0
  24. package/dist/components/Chat/ChatBubble.svelte.d.ts +4 -0
  25. package/dist/components/Chat/ChatInput.svelte +50 -0
  26. package/dist/components/Chat/ChatInput.svelte.d.ts +4 -0
  27. package/dist/components/Chat/ChatMessage.svelte +15 -0
  28. package/dist/components/Chat/ChatMessage.svelte.d.ts +4 -0
  29. package/dist/components/Chat/chat.types.d.ts +63 -0
  30. package/dist/components/Chat/chat.types.js +1 -0
  31. package/dist/components/Chat/chat.variants.d.ts +117 -0
  32. package/dist/components/Chat/chat.variants.js +47 -0
  33. package/dist/components/Chat/index.d.ts +6 -0
  34. package/dist/components/Chat/index.js +6 -0
  35. package/dist/components/CodeBlock/CodeBlock.svelte +66 -0
  36. package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +5 -0
  37. package/dist/components/CodeBlock/code-block.types.d.ts +15 -0
  38. package/dist/components/CodeBlock/code-block.types.js +1 -0
  39. package/dist/components/CodeBlock/code-block.variants.d.ts +288 -0
  40. package/dist/components/CodeBlock/code-block.variants.js +69 -0
  41. package/dist/components/CodeBlock/index.d.ts +2 -0
  42. package/dist/components/CodeBlock/index.js +1 -0
  43. package/dist/components/ColorPicker/ColorPicker.svelte +109 -0
  44. package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +4 -0
  45. package/dist/components/ColorPicker/color-picker.types.d.ts +26 -0
  46. package/dist/components/ColorPicker/color-picker.types.js +1 -0
  47. package/dist/components/ColorPicker/color-picker.variants.d.ts +69 -0
  48. package/dist/components/ColorPicker/color-picker.variants.js +13 -0
  49. package/dist/components/ColorPicker/index.d.ts +4 -0
  50. package/dist/components/ColorPicker/index.js +4 -0
  51. package/dist/components/ConfirmDialog/ConfirmDialog.svelte +175 -0
  52. package/dist/components/ConfirmDialog/ConfirmDialog.svelte.d.ts +10 -0
  53. package/dist/components/ConfirmDialog/confirm.d.ts +9 -0
  54. package/dist/components/ConfirmDialog/confirm.js +24 -0
  55. package/dist/components/ConfirmDialog/confirm.types.d.ts +21 -0
  56. package/dist/components/ConfirmDialog/confirm.types.js +1 -0
  57. package/dist/components/ConfirmDialog/index.d.ts +4 -0
  58. package/dist/components/ConfirmDialog/index.js +2 -0
  59. package/dist/components/Fonts/Fonts.svelte +32 -0
  60. package/dist/components/Fonts/Fonts.svelte.d.ts +5 -0
  61. package/dist/components/Fonts/fonts.d.ts +12 -0
  62. package/dist/components/Fonts/fonts.js +126 -0
  63. package/dist/components/Fonts/fonts.types.d.ts +40 -0
  64. package/dist/components/Fonts/fonts.types.js +1 -0
  65. package/dist/components/Fonts/index.d.ts +3 -0
  66. package/dist/components/Fonts/index.js +2 -0
  67. package/dist/components/List/List.svelte +14 -0
  68. package/dist/components/List/List.svelte.d.ts +4 -0
  69. package/dist/components/List/ListItem.svelte +64 -0
  70. package/dist/components/List/ListItem.svelte.d.ts +4 -0
  71. package/dist/components/List/index.d.ts +5 -0
  72. package/dist/components/List/index.js +5 -0
  73. package/dist/components/List/list.types.d.ts +62 -0
  74. package/dist/components/List/list.types.js +1 -0
  75. package/dist/components/List/list.variants.d.ts +99 -0
  76. package/dist/components/List/list.variants.js +42 -0
  77. package/dist/components/LocaleButton/LocaleButton.svelte +181 -0
  78. package/dist/components/LocaleButton/LocaleButton.svelte.d.ts +5 -0
  79. package/dist/components/LocaleButton/index.d.ts +2 -0
  80. package/dist/components/LocaleButton/index.js +1 -0
  81. package/dist/components/LocaleButton/locale-button.types.d.ts +208 -0
  82. package/dist/components/LocaleButton/locale-button.types.js +1 -0
  83. package/dist/components/LocaleButton/locale-button.variants.d.ts +245 -0
  84. package/dist/components/LocaleButton/locale-button.variants.js +98 -0
  85. package/dist/components/Marquee/Marquee.svelte +50 -0
  86. package/dist/components/Marquee/Marquee.svelte.d.ts +4 -0
  87. package/dist/components/Marquee/index.d.ts +4 -0
  88. package/dist/components/Marquee/index.js +4 -0
  89. package/dist/components/Marquee/marquee.types.d.ts +38 -0
  90. package/dist/components/Marquee/marquee.types.js +1 -0
  91. package/dist/components/Marquee/marquee.variants.d.ts +78 -0
  92. package/dist/components/Marquee/marquee.variants.js +28 -0
  93. package/dist/components/NavigationMenu/NavigationMenu.svelte +623 -0
  94. package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +5 -0
  95. package/dist/components/NavigationMenu/index.d.ts +2 -0
  96. package/dist/components/NavigationMenu/index.js +1 -0
  97. package/dist/components/NavigationMenu/navigation-menu.types.d.ts +245 -0
  98. package/dist/components/NavigationMenu/navigation-menu.types.js +1 -0
  99. package/dist/components/NavigationMenu/navigation-menu.variants.d.ts +543 -0
  100. package/dist/components/NavigationMenu/navigation-menu.variants.js +287 -0
  101. package/dist/components/NumberTicker/NumberTicker.svelte +59 -0
  102. package/dist/components/NumberTicker/NumberTicker.svelte.d.ts +4 -0
  103. package/dist/components/NumberTicker/index.d.ts +4 -0
  104. package/dist/components/NumberTicker/index.js +4 -0
  105. package/dist/components/NumberTicker/number-ticker.types.d.ts +26 -0
  106. package/dist/components/NumberTicker/number-ticker.types.js +1 -0
  107. package/dist/components/NumberTicker/number-ticker.variants.d.ts +27 -0
  108. package/dist/components/NumberTicker/number-ticker.variants.js +6 -0
  109. package/dist/components/PasswordInput/PasswordInput.svelte +182 -0
  110. package/dist/components/PasswordInput/PasswordInput.svelte.d.ts +5 -0
  111. package/dist/components/PasswordInput/index.d.ts +2 -0
  112. package/dist/components/PasswordInput/index.js +1 -0
  113. package/dist/components/PasswordInput/password-input.types.d.ts +111 -0
  114. package/dist/components/PasswordInput/password-input.types.js +1 -0
  115. package/dist/components/PasswordInput/password-input.variants.d.ts +273 -0
  116. package/dist/components/PasswordInput/password-input.variants.js +105 -0
  117. package/dist/components/Prose/Prose.svelte +13 -0
  118. package/dist/components/Prose/Prose.svelte.d.ts +4 -0
  119. package/dist/components/Prose/index.d.ts +4 -0
  120. package/dist/components/Prose/index.js +4 -0
  121. package/dist/components/Prose/prose.types.d.ts +22 -0
  122. package/dist/components/Prose/prose.types.js +1 -0
  123. package/dist/components/Prose/prose.variants.d.ts +45 -0
  124. package/dist/components/Prose/prose.variants.js +45 -0
  125. package/dist/components/Resizable/Resizable.svelte +9 -0
  126. package/dist/components/Resizable/Resizable.svelte.d.ts +4 -0
  127. package/dist/components/Resizable/index.d.ts +4 -0
  128. package/dist/components/Resizable/index.js +4 -0
  129. package/dist/components/Resizable/resizable.types.d.ts +18 -0
  130. package/dist/components/Resizable/resizable.types.js +1 -0
  131. package/dist/components/Resizable/resizable.variants.d.ts +48 -0
  132. package/dist/components/Resizable/resizable.variants.js +17 -0
  133. package/dist/components/ScrollArea/ScrollArea.svelte +54 -0
  134. package/dist/components/ScrollArea/ScrollArea.svelte.d.ts +4 -0
  135. package/dist/components/ScrollArea/index.d.ts +4 -0
  136. package/dist/components/ScrollArea/index.js +4 -0
  137. package/dist/components/ScrollArea/scroll-area.types.d.ts +27 -0
  138. package/dist/components/ScrollArea/scroll-area.types.js +1 -0
  139. package/dist/components/ScrollArea/scroll-area.variants.d.ts +45 -0
  140. package/dist/components/ScrollArea/scroll-area.variants.js +27 -0
  141. package/dist/components/Search/Search.svelte +94 -0
  142. package/dist/components/Search/Search.svelte.d.ts +4 -0
  143. package/dist/components/Search/index.d.ts +2 -0
  144. package/dist/components/Search/index.js +1 -0
  145. package/dist/components/Search/search.types.d.ts +40 -0
  146. package/dist/components/Search/search.types.js +1 -0
  147. package/dist/components/SortableGroup/SortableGroup.svelte +53 -0
  148. package/dist/components/SortableGroup/SortableGroup.svelte.d.ts +13 -0
  149. package/dist/components/SortableGroup/index.d.ts +1 -0
  150. package/dist/components/SortableGroup/index.js +1 -0
  151. package/dist/components/SortableList/SortableList.svelte +81 -0
  152. package/dist/components/SortableList/SortableList.svelte.d.ts +26 -0
  153. package/dist/components/SortableList/index.d.ts +2 -0
  154. package/dist/components/SortableList/index.js +1 -0
  155. package/dist/components/SortableList/sortable-list.types.d.ts +21 -0
  156. package/dist/components/SortableList/sortable-list.types.js +1 -0
  157. package/dist/components/Spotlight/Spotlight.svelte +31 -0
  158. package/dist/components/Spotlight/Spotlight.svelte.d.ts +4 -0
  159. package/dist/components/Spotlight/index.d.ts +4 -0
  160. package/dist/components/Spotlight/index.js +4 -0
  161. package/dist/components/Spotlight/spotlight.types.d.ts +22 -0
  162. package/dist/components/Spotlight/spotlight.types.js +1 -0
  163. package/dist/components/Spotlight/spotlight.variants.d.ts +39 -0
  164. package/dist/components/Spotlight/spotlight.variants.js +8 -0
  165. package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte +38 -0
  166. package/dist/components/TableBulkActionBar/TableBulkActionBar.svelte.d.ts +5 -0
  167. package/dist/components/TableBulkActionBar/index.d.ts +2 -0
  168. package/dist/components/TableBulkActionBar/index.js +1 -0
  169. package/dist/components/TableBulkActionBar/table-bulk-action-bar.types.d.ts +31 -0
  170. package/dist/components/TableBulkActionBar/table-bulk-action-bar.types.js +1 -0
  171. package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.d.ts +52 -0
  172. package/dist/components/TableBulkActionBar/table-bulk-action-bar.variants.js +10 -0
  173. package/dist/components/TreeView/TreeView.svelte +95 -0
  174. package/dist/components/TreeView/TreeView.svelte.d.ts +4 -0
  175. package/dist/components/TreeView/index.d.ts +4 -0
  176. package/dist/components/TreeView/index.js +3 -0
  177. package/dist/components/TreeView/tree-view.types.d.ts +68 -0
  178. package/dist/components/TreeView/tree-view.types.js +1 -0
  179. package/dist/components/TreeView/tree-view.variants.d.ts +69 -0
  180. package/dist/components/TreeView/tree-view.variants.js +30 -0
  181. package/dist/config.d.ts +91 -0
  182. package/dist/config.js +124 -0
  183. package/dist/editor.d.ts +2 -0
  184. package/dist/editor.js +2 -0
  185. package/dist/form/resolve-form-field-name.d.ts +5 -0
  186. package/dist/form/resolve-form-field-name.js +11 -0
  187. package/dist/hooks/internal/DragDropProviderScope.svelte +29 -0
  188. package/dist/hooks/internal/DragDropProviderScope.svelte.d.ts +7 -0
  189. package/dist/hooks/internal/SortableProvider.svelte +68 -0
  190. package/dist/hooks/internal/SortableProvider.svelte.d.ts +30 -0
  191. package/dist/hooks/internal/drag-drop-context.d.ts +12 -0
  192. package/dist/hooks/internal/drag-drop-context.js +1 -0
  193. package/dist/hooks/internal/sortable-context.d.ts +26 -0
  194. package/dist/hooks/internal/sortable-context.js +2 -0
  195. package/dist/hooks/useDragDrop/index.d.ts +1 -0
  196. package/dist/hooks/useDragDrop/index.js +1 -0
  197. package/dist/hooks/useDragDrop/useDragDrop.svelte.d.ts +40 -0
  198. package/dist/hooks/useDragDrop/useDragDrop.svelte.js +128 -0
  199. package/dist/hooks/useSortable/index.d.ts +2 -0
  200. package/dist/hooks/useSortable/index.js +2 -0
  201. package/dist/hooks/useSortable/sortable-utils.d.ts +1 -0
  202. package/dist/hooks/useSortable/sortable-utils.js +13 -0
  203. package/dist/hooks/useSortable/useSortable.svelte.d.ts +60 -0
  204. package/dist/hooks/useSortable/useSortable.svelte.js +151 -0
  205. package/dist/hooks/utils.d.ts +1 -0
  206. package/dist/hooks/utils.js +3 -0
  207. package/dist/index.d.ts +27 -0
  208. package/dist/index.js +30 -0
  209. package/dist/mcp/cursor.mcp.json +12 -0
  210. package/dist/mcp/install-template.mjs +55 -0
  211. package/dist/mcp/server.mjs +338 -0
  212. package/dist/mcp/sv5ui-plus-docs.data.json +17 -0
  213. package/dist/theme.css +64 -0
  214. package/package.json +176 -0
@@ -0,0 +1,111 @@
1
+ import type { ClassNameValue } from 'tailwind-merge';
2
+ import type { InputProps } from 'sv5ui';
3
+ import type { PasswordInputSlots, PasswordInputVariantProps } from './password-input.variants.js';
4
+ /**
5
+ * All slots available for class overrides in PasswordInput.
6
+ * Combines PasswordInput-specific slots with a subset of the inner
7
+ * Input's slots that are safe to forward.
8
+ */
9
+ export type PasswordInputUISlots = PasswordInputSlots
10
+ /** Root wrapper of the inner `<Input>` component. */
11
+ | 'inputRoot'
12
+ /** The `<input>` element base class inside the inner `<Input>`. */
13
+ | 'base' | 'leading' | 'leadingIcon' | 'trailing' | 'trailingIcon';
14
+ export type PasswordInputProps = Omit<InputProps, 'type'> & {
15
+ /**
16
+ * Bind a reference to the underlying HTMLInputElement.
17
+ */
18
+ ref?: HTMLInputElement | null;
19
+ /**
20
+ * Whether to show the password strength meter below the input.
21
+ * @default false
22
+ */
23
+ showStrength?: boolean;
24
+ /**
25
+ * Custom function to calculate password strength.
26
+ * Should return a number from 0 (Very Weak) to 4 (Strong).
27
+ * Falls back to the built-in heuristic when not provided.
28
+ */
29
+ strengthFn?: (password: string) => number;
30
+ /**
31
+ * Labels for the five strength levels, indexed 0–4.
32
+ * @default ['Very Weak', 'Weak', 'Fair', 'Good', 'Strong']
33
+ */
34
+ strengthLabels?: [string, string, string, string, string];
35
+ /**
36
+ * Iconify icon name to use for each strength meter segment instead of the
37
+ * default filled bar. When set, four icons are rendered side-by-side and
38
+ * coloured by strength level.
39
+ *
40
+ * @example 'lucide:star' // ★ ★ ☆ ☆
41
+ * @example 'lucide:shield' // shields
42
+ * @example 'ph:lock-fill' // locks
43
+ * @example 'lucide:circle' // circles
44
+ */
45
+ segmentIcon?: string;
46
+ /**
47
+ * Custom Unicode character to display as mask symbol instead of the default bullet (•).
48
+ * Works natively with password input selection, focus caret, and accessibility.
49
+ *
50
+ * @example '✦'
51
+ * @example '★'
52
+ * @example '●'
53
+ * @example '*'
54
+ */
55
+ maskChar?: string;
56
+ /**
57
+ * Icon to display when the password is hidden (eye-off state).
58
+ * Supports any valid Iconify icon name.
59
+ * @default 'lucide:eye-off'
60
+ */
61
+ hideIcon?: string;
62
+ /**
63
+ * Icon to display when the password is visible (eye state).
64
+ * Supports any valid Iconify icon name.
65
+ * @default 'lucide:eye'
66
+ */
67
+ showIcon?: string;
68
+ /**
69
+ * Accessible label for the toggle button when password is visible (clicking will hide it).
70
+ * @default 'Hide password'
71
+ */
72
+ hideLabel?: string;
73
+ /**
74
+ * Accessible label for the toggle button when password is hidden (clicking will show it).
75
+ * @default 'Show password'
76
+ */
77
+ showLabel?: string;
78
+ /**
79
+ * Controls the dimensions and text size of the field.
80
+ * Also scales the toggle button icon and strength meter segments to match.
81
+ * @default 'md'
82
+ */
83
+ size?: NonNullable<PasswordInputVariantProps['size']>;
84
+ /**
85
+ * Controls the visual style of the input field.
86
+ * Mirrors `<Input>` variants — the value is forwarded directly to the inner Input.
87
+ * @default 'outline'
88
+ */
89
+ variant?: NonNullable<InputProps['variant']>;
90
+ /**
91
+ * Sets the color scheme for focus ring and highlight.
92
+ * Also applied to the toggle button's focus ring for visual consistency.
93
+ * Automatically overridden with `'error'` when inside a FormField with an error.
94
+ * @default 'primary'
95
+ */
96
+ color?: NonNullable<InputProps['color']>;
97
+ /**
98
+ * Additional CSS classes for the root element.
99
+ */
100
+ class?: ClassNameValue;
101
+ /**
102
+ * Override styles for specific slots.
103
+ *
104
+ * **PasswordInput slots:** `root`, `inputWrapper`, `toggleBtn`, `toggleIcon`,
105
+ * `meterWrapper`, `meterSegment`, `meterIcon`, `strengthText`.
106
+ *
107
+ * **Inner Input slots:** `base`, `inputRoot`, `leading`, `leadingIcon`,
108
+ * `trailing`, `trailingIcon`.
109
+ */
110
+ ui?: Partial<Record<PasswordInputUISlots, ClassNameValue>>;
111
+ };
@@ -0,0 +1,273 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ export declare const passwordInputVariants: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ xs: {
5
+ toggleBtn: string;
6
+ toggleIcon: string;
7
+ meterSegment: string;
8
+ meterIcon: string;
9
+ maskOverlay: string;
10
+ maskIconItem: string;
11
+ };
12
+ sm: {
13
+ toggleBtn: string;
14
+ toggleIcon: string;
15
+ meterSegment: string;
16
+ meterIcon: string;
17
+ maskOverlay: string;
18
+ maskIconItem: string;
19
+ };
20
+ md: {
21
+ toggleBtn: string;
22
+ toggleIcon: string;
23
+ meterSegment: string;
24
+ meterIcon: string;
25
+ maskOverlay: string;
26
+ maskIconItem: string;
27
+ };
28
+ lg: {
29
+ toggleBtn: string;
30
+ toggleIcon: string;
31
+ meterSegment: string;
32
+ meterIcon: string;
33
+ maskOverlay: string;
34
+ maskIconItem: string;
35
+ };
36
+ xl: {
37
+ toggleBtn: string;
38
+ toggleIcon: string;
39
+ meterSegment: string;
40
+ meterIcon: string;
41
+ maskOverlay: string;
42
+ maskIconItem: string;
43
+ };
44
+ };
45
+ color: {
46
+ primary: {
47
+ toggleBtn: string;
48
+ };
49
+ secondary: {
50
+ toggleBtn: string;
51
+ };
52
+ tertiary: {
53
+ toggleBtn: string;
54
+ };
55
+ success: {
56
+ toggleBtn: string;
57
+ };
58
+ warning: {
59
+ toggleBtn: string;
60
+ };
61
+ error: {
62
+ toggleBtn: string;
63
+ };
64
+ info: {
65
+ toggleBtn: string;
66
+ };
67
+ surface: {
68
+ toggleBtn: string;
69
+ };
70
+ };
71
+ variant: {
72
+ outline: {};
73
+ soft: {};
74
+ subtle: {};
75
+ ghost: {};
76
+ none: {};
77
+ };
78
+ }, {
79
+ root: string;
80
+ inputWrapper: string;
81
+ toggleBtn: string[];
82
+ toggleIcon: string;
83
+ meterWrapper: string;
84
+ meterSegment: string;
85
+ meterIcon: string;
86
+ strengthText: string;
87
+ maskOverlay: string[];
88
+ maskIconItem: string;
89
+ }, undefined, {
90
+ size: {
91
+ xs: {
92
+ toggleBtn: string;
93
+ toggleIcon: string;
94
+ meterSegment: string;
95
+ meterIcon: string;
96
+ maskOverlay: string;
97
+ maskIconItem: string;
98
+ };
99
+ sm: {
100
+ toggleBtn: string;
101
+ toggleIcon: string;
102
+ meterSegment: string;
103
+ meterIcon: string;
104
+ maskOverlay: string;
105
+ maskIconItem: string;
106
+ };
107
+ md: {
108
+ toggleBtn: string;
109
+ toggleIcon: string;
110
+ meterSegment: string;
111
+ meterIcon: string;
112
+ maskOverlay: string;
113
+ maskIconItem: string;
114
+ };
115
+ lg: {
116
+ toggleBtn: string;
117
+ toggleIcon: string;
118
+ meterSegment: string;
119
+ meterIcon: string;
120
+ maskOverlay: string;
121
+ maskIconItem: string;
122
+ };
123
+ xl: {
124
+ toggleBtn: string;
125
+ toggleIcon: string;
126
+ meterSegment: string;
127
+ meterIcon: string;
128
+ maskOverlay: string;
129
+ maskIconItem: string;
130
+ };
131
+ };
132
+ color: {
133
+ primary: {
134
+ toggleBtn: string;
135
+ };
136
+ secondary: {
137
+ toggleBtn: string;
138
+ };
139
+ tertiary: {
140
+ toggleBtn: string;
141
+ };
142
+ success: {
143
+ toggleBtn: string;
144
+ };
145
+ warning: {
146
+ toggleBtn: string;
147
+ };
148
+ error: {
149
+ toggleBtn: string;
150
+ };
151
+ info: {
152
+ toggleBtn: string;
153
+ };
154
+ surface: {
155
+ toggleBtn: string;
156
+ };
157
+ };
158
+ variant: {
159
+ outline: {};
160
+ soft: {};
161
+ subtle: {};
162
+ ghost: {};
163
+ none: {};
164
+ };
165
+ }, {
166
+ root: string;
167
+ inputWrapper: string;
168
+ toggleBtn: string[];
169
+ toggleIcon: string;
170
+ meterWrapper: string;
171
+ meterSegment: string;
172
+ meterIcon: string;
173
+ strengthText: string;
174
+ maskOverlay: string[];
175
+ maskIconItem: string;
176
+ }, import("tailwind-variants").TVReturnTypeLike<{
177
+ size: {
178
+ xs: {
179
+ toggleBtn: string;
180
+ toggleIcon: string;
181
+ meterSegment: string;
182
+ meterIcon: string;
183
+ maskOverlay: string;
184
+ maskIconItem: string;
185
+ };
186
+ sm: {
187
+ toggleBtn: string;
188
+ toggleIcon: string;
189
+ meterSegment: string;
190
+ meterIcon: string;
191
+ maskOverlay: string;
192
+ maskIconItem: string;
193
+ };
194
+ md: {
195
+ toggleBtn: string;
196
+ toggleIcon: string;
197
+ meterSegment: string;
198
+ meterIcon: string;
199
+ maskOverlay: string;
200
+ maskIconItem: string;
201
+ };
202
+ lg: {
203
+ toggleBtn: string;
204
+ toggleIcon: string;
205
+ meterSegment: string;
206
+ meterIcon: string;
207
+ maskOverlay: string;
208
+ maskIconItem: string;
209
+ };
210
+ xl: {
211
+ toggleBtn: string;
212
+ toggleIcon: string;
213
+ meterSegment: string;
214
+ meterIcon: string;
215
+ maskOverlay: string;
216
+ maskIconItem: string;
217
+ };
218
+ };
219
+ color: {
220
+ primary: {
221
+ toggleBtn: string;
222
+ };
223
+ secondary: {
224
+ toggleBtn: string;
225
+ };
226
+ tertiary: {
227
+ toggleBtn: string;
228
+ };
229
+ success: {
230
+ toggleBtn: string;
231
+ };
232
+ warning: {
233
+ toggleBtn: string;
234
+ };
235
+ error: {
236
+ toggleBtn: string;
237
+ };
238
+ info: {
239
+ toggleBtn: string;
240
+ };
241
+ surface: {
242
+ toggleBtn: string;
243
+ };
244
+ };
245
+ variant: {
246
+ outline: {};
247
+ soft: {};
248
+ subtle: {};
249
+ ghost: {};
250
+ none: {};
251
+ };
252
+ }, {
253
+ root: string;
254
+ inputWrapper: string;
255
+ toggleBtn: string[];
256
+ toggleIcon: string;
257
+ meterWrapper: string;
258
+ meterSegment: string;
259
+ meterIcon: string;
260
+ strengthText: string;
261
+ maskOverlay: string[];
262
+ maskIconItem: string;
263
+ }>>;
264
+ export type PasswordInputVariantProps = VariantProps<typeof passwordInputVariants>;
265
+ export type PasswordInputSlots = keyof ReturnType<typeof passwordInputVariants>;
266
+ export declare const passwordInputDefaults: {
267
+ defaultVariants: {
268
+ color?: "primary" | "surface" | "error" | "secondary" | "tertiary" | "success" | "warning" | "info" | undefined;
269
+ variant?: "none" | "outline" | "soft" | "subtle" | "ghost" | undefined;
270
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
271
+ };
272
+ slots: Partial<Record<PasswordInputSlots, string>>;
273
+ };
@@ -0,0 +1,105 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const passwordInputVariants = tv({
3
+ slots: {
4
+ root: 'flex flex-col gap-2 w-full',
5
+ inputWrapper: 'relative flex items-center w-full',
6
+ toggleBtn: [
7
+ 'absolute end-0 inset-y-0 flex items-center justify-center',
8
+ 'text-on-surface-variant/75 hover:text-on-surface',
9
+ 'focus:outline-none focus-visible:ring-2 rounded-sm',
10
+ 'transition-colors select-none'
11
+ ],
12
+ toggleIcon: 'shrink-0',
13
+ meterWrapper: 'flex items-center gap-1 w-full mt-1',
14
+ meterSegment: 'flex-1 rounded-full transition-colors duration-300',
15
+ meterIcon: 'shrink-0 transition-colors duration-300',
16
+ strengthText: 'text-xs text-on-surface-variant mt-1 text-right',
17
+ // maskOverlay covers the transparent input text with icon rows.
18
+ // ps-* aligns with the input's own horizontal padding;
19
+ // end-* stops before the toggle button.
20
+ maskOverlay: [
21
+ 'absolute inset-y-0 start-0 flex items-center',
22
+ 'gap-0.5 overflow-hidden pointer-events-none select-none'
23
+ ],
24
+ maskIconItem: 'shrink-0 text-on-surface/80'
25
+ },
26
+ variants: {
27
+ // ==================== SIZE ====================
28
+ size: {
29
+ xs: {
30
+ toggleBtn: 'w-7',
31
+ toggleIcon: 'size-3.5',
32
+ meterSegment: 'h-1',
33
+ meterIcon: 'size-3',
34
+ maskOverlay: 'ps-2 end-7',
35
+ maskIconItem: 'size-2'
36
+ },
37
+ sm: {
38
+ toggleBtn: 'w-8',
39
+ toggleIcon: 'size-4',
40
+ meterSegment: 'h-1.5',
41
+ meterIcon: 'size-3.5',
42
+ maskOverlay: 'ps-2.5 end-8',
43
+ maskIconItem: 'size-2.5'
44
+ },
45
+ md: {
46
+ toggleBtn: 'w-9',
47
+ toggleIcon: 'size-5',
48
+ meterSegment: 'h-1.5',
49
+ meterIcon: 'size-4',
50
+ maskOverlay: 'ps-3 end-9',
51
+ maskIconItem: 'size-3'
52
+ },
53
+ lg: {
54
+ toggleBtn: 'w-10',
55
+ toggleIcon: 'size-5',
56
+ meterSegment: 'h-2',
57
+ meterIcon: 'size-5',
58
+ maskOverlay: 'ps-4 end-10',
59
+ maskIconItem: 'size-3.5'
60
+ },
61
+ xl: {
62
+ toggleBtn: 'w-12',
63
+ toggleIcon: 'size-6',
64
+ meterSegment: 'h-2',
65
+ meterIcon: 'size-6',
66
+ maskOverlay: 'ps-5 end-12',
67
+ maskIconItem: 'size-4'
68
+ }
69
+ },
70
+ // ==================== COLOR ====================
71
+ // Controls the toggle button's focus ring color to match the input's color.
72
+ color: {
73
+ primary: { toggleBtn: 'focus-visible:ring-primary' },
74
+ secondary: { toggleBtn: 'focus-visible:ring-secondary' },
75
+ tertiary: { toggleBtn: 'focus-visible:ring-tertiary' },
76
+ success: { toggleBtn: 'focus-visible:ring-success' },
77
+ warning: { toggleBtn: 'focus-visible:ring-warning' },
78
+ error: { toggleBtn: 'focus-visible:ring-error' },
79
+ info: { toggleBtn: 'focus-visible:ring-info' },
80
+ surface: { toggleBtn: 'focus-visible:ring-surface-foreground' }
81
+ },
82
+ // ==================== VARIANT ====================
83
+ // Kept for API symmetry with <Input>; visual differences are handled by
84
+ // the inner <Input> component. PasswordInput-level slots have no
85
+ // variant-specific styling by default.
86
+ variant: {
87
+ outline: {},
88
+ soft: {},
89
+ subtle: {},
90
+ ghost: {},
91
+ none: {}
92
+ }
93
+ },
94
+ defaultVariants: {
95
+ size: 'md',
96
+ color: 'primary',
97
+ variant: 'outline'
98
+ }
99
+ });
100
+ export const passwordInputDefaults = {
101
+ defaultVariants: {
102
+ ...passwordInputVariants.defaultVariants
103
+ },
104
+ slots: {}
105
+ };
@@ -0,0 +1,13 @@
1
+ <script lang="ts">import { twMerge } from "tailwind-merge";
2
+ import { proseVariants } from "./prose.variants.js";
3
+ let { size = "base", html, class: className, children, ...restProps } = $props();
4
+ let styles = $derived(proseVariants({ size }));
5
+ </script>
6
+
7
+ <div class={twMerge(styles.base() as string, className)} {...restProps}>
8
+ {#if html}
9
+ <!-- eslint-disable-next-line svelte/no-at-html-tags -->
10
+ {@html html}
11
+ {/if}
12
+ {@render children?.()}
13
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { ProseProps } from './prose.types.js';
2
+ declare const Prose: import("svelte").Component<ProseProps, {}, "">;
3
+ type Prose = ReturnType<typeof Prose>;
4
+ export default Prose;
@@ -0,0 +1,4 @@
1
+ import Prose from './Prose.svelte';
2
+ export { Prose };
3
+ export * from './prose.types.js';
4
+ export * from './prose.variants.js';
@@ -0,0 +1,4 @@
1
+ import Prose from './Prose.svelte';
2
+ export { Prose };
3
+ export * from './prose.types.js';
4
+ export * from './prose.variants.js';
@@ -0,0 +1,22 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import type { ProseVariantProps } from './prose.variants.js';
4
+ export interface ProseProps extends HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * Size of the typography text.
7
+ * @default 'base'
8
+ */
9
+ size?: ProseVariantProps['size'];
10
+ /**
11
+ * Html string to render. Usually coming from a markdown parser.
12
+ */
13
+ html?: string;
14
+ /**
15
+ * Additional CSS classes.
16
+ */
17
+ class?: string;
18
+ /**
19
+ * Content inside the prose container.
20
+ */
21
+ children?: Snippet;
22
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,45 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ export declare const proseVariants: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ sm: {
5
+ base: string;
6
+ };
7
+ base: {
8
+ base: string;
9
+ };
10
+ lg: {
11
+ base: string;
12
+ };
13
+ };
14
+ }, {
15
+ base: string[];
16
+ }, undefined, {
17
+ size: {
18
+ sm: {
19
+ base: string;
20
+ };
21
+ base: {
22
+ base: string;
23
+ };
24
+ lg: {
25
+ base: string;
26
+ };
27
+ };
28
+ }, {
29
+ base: string[];
30
+ }, import("tailwind-variants").TVReturnTypeLike<{
31
+ size: {
32
+ sm: {
33
+ base: string;
34
+ };
35
+ base: {
36
+ base: string;
37
+ };
38
+ lg: {
39
+ base: string;
40
+ };
41
+ };
42
+ }, {
43
+ base: string[];
44
+ }>>;
45
+ export type ProseVariantProps = VariantProps<typeof proseVariants>;
@@ -0,0 +1,45 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const proseVariants = tv({
3
+ slots: {
4
+ base: [
5
+ 'text-surface-900 dark:text-surface-50 max-w-none',
6
+ // Paragraphs
7
+ '[&_p]:leading-7 [&_p]:mb-6 [&_p:last-child]:mb-0',
8
+ // Headings
9
+ '[&_h1]:text-4xl [&_h1]:font-extrabold [&_h1]:tracking-tight [&_h1]:mt-0 [&_h1]:mb-6',
10
+ '[&_h2]:text-3xl [&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:mt-10 [&_h2]:mb-4',
11
+ '[&_h3]:text-2xl [&_h3]:font-semibold [&_h3]:tracking-tight [&_h3]:mt-8 [&_h3]:mb-4',
12
+ '[&_h4]:text-xl [&_h4]:font-semibold [&_h4]:tracking-tight [&_h4]:mt-8 [&_h4]:mb-4',
13
+ // Links
14
+ '[&_a]:font-medium [&_a]:text-primary-600 dark:[&_a]:text-primary-400 [&_a]:underline [&_a]:underline-offset-4 hover:[&_a]:text-primary-500',
15
+ // Blockquotes
16
+ '[&_blockquote]:mt-6 [&_blockquote]:mb-6 [&_blockquote]:border-l-4 [&_blockquote]:border-primary-500 [&_blockquote]:pl-6 [&_blockquote]:italic [&_blockquote]:text-surface-700 dark:[&_blockquote]:text-surface-300',
17
+ // Lists
18
+ '[&_ul]:my-6 [&_ul]:ml-6 [&_ul]:list-disc [&_ul>li]:mt-2',
19
+ '[&_ol]:my-6 [&_ol]:ml-6 [&_ol]:list-decimal [&_ol>li]:mt-2',
20
+ // Code & Pre
21
+ '[&_code]:relative [&_code]:rounded [&_code]:bg-surface-200 dark:[&_code]:bg-surface-800 [&_code]:px-[0.3rem] [&_code]:py-[0.2rem] [&_code]:font-mono [&_code]:text-sm [&_code]:font-semibold',
22
+ '[&_pre]:mb-6 [&_pre]:mt-6 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-surface-900 [&_pre]:py-4 [&_pre]:dark:bg-surface-800',
23
+ '[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-surface-50 [&_pre_code]:font-normal',
24
+ // Images & Media
25
+ '[&_img]:rounded-lg [&_img]:border [&_img]:border-outline-variant [&_video]:rounded-lg',
26
+ // Tables
27
+ '[&_table]:w-full [&_table]:my-6 [&_table]:overflow-y-auto [&_table]:text-left',
28
+ '[&_th]:border [&_th]:border-outline-variant [&_th]:px-4 [&_th]:py-2 [&_th]:font-semibold [&_th]:bg-surface-100 dark:[&_th]:bg-surface-800',
29
+ '[&_td]:border [&_td]:border-outline-variant [&_td]:px-4 [&_td]:py-2',
30
+ '[&_tr:nth-child(even)]:bg-surface-50 dark:[&_tr:nth-child(even)]:bg-surface-900/50',
31
+ // HR
32
+ '[&_hr]:my-8 [&_hr]:border-outline-variant'
33
+ ]
34
+ },
35
+ variants: {
36
+ size: {
37
+ sm: { base: 'text-sm [&_h1]:text-3xl [&_h2]:text-2xl [&_h3]:text-xl' },
38
+ base: { base: 'text-base' },
39
+ lg: { base: 'text-lg [&_h1]:text-5xl [&_h2]:text-4xl [&_h3]:text-3xl' }
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ size: 'base'
44
+ }
45
+ });
@@ -0,0 +1,9 @@
1
+ <script lang="ts">import { twMerge } from "tailwind-merge";
2
+ import { resizableVariants } from "./resizable.variants.js";
3
+ let { direction = "both", class: className, children, ...restProps } = $props();
4
+ let styles = $derived(resizableVariants({ direction }));
5
+ </script>
6
+
7
+ <div class={twMerge(styles.base(), className)} {...restProps}>
8
+ {@render children?.()}
9
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { ResizableProps } from './resizable.types.js';
2
+ declare const Resizable: import("svelte").Component<ResizableProps, {}, "">;
3
+ type Resizable = ReturnType<typeof Resizable>;
4
+ export default Resizable;
@@ -0,0 +1,4 @@
1
+ import Resizable from './Resizable.svelte';
2
+ export { Resizable };
3
+ export * from './resizable.types.js';
4
+ export * from './resizable.variants.js';
@@ -0,0 +1,4 @@
1
+ import Resizable from './Resizable.svelte';
2
+ export { Resizable };
3
+ export * from './resizable.types.js';
4
+ export * from './resizable.variants.js';
@@ -0,0 +1,18 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import type { ResizableVariantProps } from './resizable.variants.js';
4
+ export interface ResizableProps extends HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * The direction in which the element can be resized.
7
+ * @default 'both'
8
+ */
9
+ direction?: ResizableVariantProps['direction'];
10
+ /**
11
+ * Additional CSS classes.
12
+ */
13
+ class?: string;
14
+ /**
15
+ * Content inside the resizable container.
16
+ */
17
+ children?: Snippet;
18
+ }