svelora 2.1.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 (484) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +145 -0
  3. package/dist/Accordion/Accordion.svelte +207 -0
  4. package/dist/Accordion/Accordion.svelte.d.ts +6 -0
  5. package/dist/Accordion/accordion.types.d.ts +225 -0
  6. package/dist/Accordion/accordion.types.js +1 -0
  7. package/dist/Accordion/accordion.variants.d.ts +88 -0
  8. package/dist/Accordion/accordion.variants.js +28 -0
  9. package/dist/Accordion/index.d.ts +2 -0
  10. package/dist/Accordion/index.js +1 -0
  11. package/dist/Alert/Alert.svelte +131 -0
  12. package/dist/Alert/Alert.svelte.d.ts +5 -0
  13. package/dist/Alert/alert.types.d.ts +103 -0
  14. package/dist/Alert/alert.types.js +1 -0
  15. package/dist/Alert/alert.variants.d.ts +213 -0
  16. package/dist/Alert/alert.variants.js +293 -0
  17. package/dist/Alert/index.d.ts +2 -0
  18. package/dist/Alert/index.js +1 -0
  19. package/dist/Avatar/Avatar.svelte +114 -0
  20. package/dist/Avatar/Avatar.svelte.d.ts +6 -0
  21. package/dist/Avatar/avatar.types.d.ts +73 -0
  22. package/dist/Avatar/avatar.types.js +1 -0
  23. package/dist/Avatar/avatar.variants.d.ts +316 -0
  24. package/dist/Avatar/avatar.variants.js +39 -0
  25. package/dist/Avatar/index.d.ts +2 -0
  26. package/dist/Avatar/index.js +1 -0
  27. package/dist/AvatarGroup/AvatarGroup.svelte +71 -0
  28. package/dist/AvatarGroup/AvatarGroup.svelte.d.ts +5 -0
  29. package/dist/AvatarGroup/avatar-group.types.d.ts +49 -0
  30. package/dist/AvatarGroup/avatar-group.types.js +1 -0
  31. package/dist/AvatarGroup/avatar-group.variants.d.ts +258 -0
  32. package/dist/AvatarGroup/avatar-group.variants.js +35 -0
  33. package/dist/AvatarGroup/index.d.ts +2 -0
  34. package/dist/AvatarGroup/index.js +1 -0
  35. package/dist/Badge/Badge.svelte +79 -0
  36. package/dist/Badge/Badge.svelte.d.ts +5 -0
  37. package/dist/Badge/badge.types.d.ts +83 -0
  38. package/dist/Badge/badge.types.js +1 -0
  39. package/dist/Badge/badge.variants.d.ts +303 -0
  40. package/dist/Badge/badge.variants.js +259 -0
  41. package/dist/Badge/index.d.ts +2 -0
  42. package/dist/Badge/index.js +1 -0
  43. package/dist/Banner/Banner.svelte +130 -0
  44. package/dist/Banner/Banner.svelte.d.ts +5 -0
  45. package/dist/Banner/banner.types.d.ts +148 -0
  46. package/dist/Banner/banner.types.js +1 -0
  47. package/dist/Banner/banner.variants.d.ts +293 -0
  48. package/dist/Banner/banner.variants.js +86 -0
  49. package/dist/Banner/index.d.ts +2 -0
  50. package/dist/Banner/index.js +1 -0
  51. package/dist/Breadcrumb/Breadcrumb.svelte +79 -0
  52. package/dist/Breadcrumb/Breadcrumb.svelte.d.ts +5 -0
  53. package/dist/Breadcrumb/breadcrumb.types.d.ts +66 -0
  54. package/dist/Breadcrumb/breadcrumb.types.js +1 -0
  55. package/dist/Breadcrumb/breadcrumb.variants.d.ts +138 -0
  56. package/dist/Breadcrumb/breadcrumb.variants.js +53 -0
  57. package/dist/Breadcrumb/index.d.ts +2 -0
  58. package/dist/Breadcrumb/index.js +1 -0
  59. package/dist/Button/Button.svelte +177 -0
  60. package/dist/Button/Button.svelte.d.ts +5 -0
  61. package/dist/Button/button.types.d.ts +151 -0
  62. package/dist/Button/button.types.js +1 -0
  63. package/dist/Button/button.variants.d.ts +388 -0
  64. package/dist/Button/button.variants.js +461 -0
  65. package/dist/Button/index.d.ts +2 -0
  66. package/dist/Button/index.js +1 -0
  67. package/dist/Calendar/Calendar.svelte +344 -0
  68. package/dist/Calendar/Calendar.svelte.d.ts +6 -0
  69. package/dist/Calendar/calendar.types.d.ts +122 -0
  70. package/dist/Calendar/calendar.types.js +1 -0
  71. package/dist/Calendar/calendar.variants.d.ts +553 -0
  72. package/dist/Calendar/calendar.variants.js +368 -0
  73. package/dist/Calendar/index.d.ts +2 -0
  74. package/dist/Calendar/index.js +1 -0
  75. package/dist/Card/Card.svelte +54 -0
  76. package/dist/Card/Card.svelte.d.ts +5 -0
  77. package/dist/Card/card.types.d.ts +36 -0
  78. package/dist/Card/card.types.js +1 -0
  79. package/dist/Card/card.variants.d.ts +108 -0
  80. package/dist/Card/card.variants.js +32 -0
  81. package/dist/Card/index.d.ts +2 -0
  82. package/dist/Card/index.js +1 -0
  83. package/dist/Carousel/Carousel.svelte +277 -0
  84. package/dist/Carousel/Carousel.svelte.d.ts +26 -0
  85. package/dist/Carousel/carousel.types.d.ts +251 -0
  86. package/dist/Carousel/carousel.types.js +1 -0
  87. package/dist/Carousel/carousel.variants.d.ts +408 -0
  88. package/dist/Carousel/carousel.variants.js +88 -0
  89. package/dist/Carousel/index.d.ts +2 -0
  90. package/dist/Carousel/index.js +1 -0
  91. package/dist/Checkbox/Checkbox.svelte +161 -0
  92. package/dist/Checkbox/Checkbox.svelte.d.ts +6 -0
  93. package/dist/Checkbox/checkbox.types.d.ts +101 -0
  94. package/dist/Checkbox/checkbox.types.js +1 -0
  95. package/dist/Checkbox/checkbox.variants.d.ts +448 -0
  96. package/dist/Checkbox/checkbox.variants.js +209 -0
  97. package/dist/Checkbox/index.d.ts +2 -0
  98. package/dist/Checkbox/index.js +1 -0
  99. package/dist/CheckboxGroup/CheckboxGroup.svelte +219 -0
  100. package/dist/CheckboxGroup/CheckboxGroup.svelte.d.ts +5 -0
  101. package/dist/CheckboxGroup/checkbox-group.types.d.ts +130 -0
  102. package/dist/CheckboxGroup/checkbox-group.types.js +1 -0
  103. package/dist/CheckboxGroup/checkbox-group.variants.d.ts +553 -0
  104. package/dist/CheckboxGroup/checkbox-group.variants.js +231 -0
  105. package/dist/CheckboxGroup/index.d.ts +2 -0
  106. package/dist/CheckboxGroup/index.js +1 -0
  107. package/dist/Chip/Chip.svelte +51 -0
  108. package/dist/Chip/Chip.svelte.d.ts +5 -0
  109. package/dist/Chip/chip.types.d.ts +66 -0
  110. package/dist/Chip/chip.types.js +1 -0
  111. package/dist/Chip/chip.variants.d.ts +418 -0
  112. package/dist/Chip/chip.variants.js +74 -0
  113. package/dist/Chip/index.d.ts +2 -0
  114. package/dist/Chip/index.js +1 -0
  115. package/dist/Collapsible/Collapsible.svelte +69 -0
  116. package/dist/Collapsible/Collapsible.svelte.d.ts +6 -0
  117. package/dist/Collapsible/CollapsibleTestWrapper.svelte +17 -0
  118. package/dist/Collapsible/CollapsibleTestWrapper.svelte.d.ts +4 -0
  119. package/dist/Collapsible/collapsible.types.d.ts +77 -0
  120. package/dist/Collapsible/collapsible.types.js +1 -0
  121. package/dist/Collapsible/collapsible.variants.d.ts +53 -0
  122. package/dist/Collapsible/collapsible.variants.js +21 -0
  123. package/dist/Collapsible/index.d.ts +2 -0
  124. package/dist/Collapsible/index.js +1 -0
  125. package/dist/Command/Command.svelte +183 -0
  126. package/dist/Command/Command.svelte.d.ts +6 -0
  127. package/dist/Command/CommandTestWrapper.svelte +13 -0
  128. package/dist/Command/CommandTestWrapper.svelte.d.ts +4 -0
  129. package/dist/Command/command.types.d.ts +100 -0
  130. package/dist/Command/command.types.js +1 -0
  131. package/dist/Command/command.variants.d.ts +226 -0
  132. package/dist/Command/command.variants.js +86 -0
  133. package/dist/Command/index.d.ts +2 -0
  134. package/dist/Command/index.js +1 -0
  135. package/dist/Container/Container.svelte +21 -0
  136. package/dist/Container/Container.svelte.d.ts +5 -0
  137. package/dist/Container/container.types.d.ts +19 -0
  138. package/dist/Container/container.types.js +1 -0
  139. package/dist/Container/container.variants.d.ts +29 -0
  140. package/dist/Container/container.variants.js +9 -0
  141. package/dist/Container/index.d.ts +2 -0
  142. package/dist/Container/index.js +1 -0
  143. package/dist/ContextMenu/ContextMenu.svelte +344 -0
  144. package/dist/ContextMenu/ContextMenu.svelte.d.ts +6 -0
  145. package/dist/ContextMenu/context-menu.types.d.ts +265 -0
  146. package/dist/ContextMenu/context-menu.types.js +1 -0
  147. package/dist/ContextMenu/context-menu.variants.d.ts +307 -0
  148. package/dist/ContextMenu/context-menu.variants.js +144 -0
  149. package/dist/ContextMenu/index.d.ts +2 -0
  150. package/dist/ContextMenu/index.js +1 -0
  151. package/dist/Drawer/Drawer.svelte +207 -0
  152. package/dist/Drawer/Drawer.svelte.d.ts +6 -0
  153. package/dist/Drawer/DrawerTriggerTestWrapper.svelte +10 -0
  154. package/dist/Drawer/DrawerTriggerTestWrapper.svelte.d.ts +18 -0
  155. package/dist/Drawer/drawer.types.d.ts +116 -0
  156. package/dist/Drawer/drawer.types.js +1 -0
  157. package/dist/Drawer/drawer.variants.d.ts +193 -0
  158. package/dist/Drawer/drawer.variants.js +139 -0
  159. package/dist/Drawer/index.d.ts +2 -0
  160. package/dist/Drawer/index.js +1 -0
  161. package/dist/DropdownMenu/DropdownMenu.svelte +363 -0
  162. package/dist/DropdownMenu/DropdownMenu.svelte.d.ts +6 -0
  163. package/dist/DropdownMenu/DropdownMenuTriggerTestWrapper.svelte +12 -0
  164. package/dist/DropdownMenu/DropdownMenuTriggerTestWrapper.svelte.d.ts +7 -0
  165. package/dist/DropdownMenu/dropdown-menu.types.d.ts +279 -0
  166. package/dist/DropdownMenu/dropdown-menu.types.js +1 -0
  167. package/dist/DropdownMenu/dropdown-menu.variants.d.ts +312 -0
  168. package/dist/DropdownMenu/dropdown-menu.variants.js +149 -0
  169. package/dist/DropdownMenu/index.d.ts +2 -0
  170. package/dist/DropdownMenu/index.js +1 -0
  171. package/dist/Editor/Editor.svelte +756 -0
  172. package/dist/Editor/Editor.svelte.d.ts +6 -0
  173. package/dist/Editor/EditorUrlPrompt.svelte +94 -0
  174. package/dist/Editor/EditorUrlPrompt.svelte.d.ts +15 -0
  175. package/dist/Editor/SlashPopup.svelte +74 -0
  176. package/dist/Editor/SlashPopup.svelte.d.ts +11 -0
  177. package/dist/Editor/editor.extensions.d.ts +23 -0
  178. package/dist/Editor/editor.extensions.js +132 -0
  179. package/dist/Editor/editor.schemas.d.ts +5 -0
  180. package/dist/Editor/editor.schemas.js +27 -0
  181. package/dist/Editor/editor.slash.svelte.d.ts +25 -0
  182. package/dist/Editor/editor.slash.svelte.js +299 -0
  183. package/dist/Editor/editor.suggestion.d.ts +7 -0
  184. package/dist/Editor/editor.suggestion.js +165 -0
  185. package/dist/Editor/editor.toolbar.d.ts +11 -0
  186. package/dist/Editor/editor.toolbar.js +204 -0
  187. package/dist/Editor/editor.types.d.ts +367 -0
  188. package/dist/Editor/editor.types.js +1 -0
  189. package/dist/Editor/editor.variants.d.ts +303 -0
  190. package/dist/Editor/editor.variants.js +135 -0
  191. package/dist/Editor/index.d.ts +55 -0
  192. package/dist/Editor/index.js +54 -0
  193. package/dist/Empty/Empty.svelte +118 -0
  194. package/dist/Empty/Empty.svelte.d.ts +5 -0
  195. package/dist/Empty/empty.types.d.ts +91 -0
  196. package/dist/Empty/empty.types.js +1 -0
  197. package/dist/Empty/empty.variants.d.ts +308 -0
  198. package/dist/Empty/empty.variants.js +73 -0
  199. package/dist/Empty/index.d.ts +2 -0
  200. package/dist/Empty/index.js +1 -0
  201. package/dist/FieldGroup/FieldGroup.svelte +53 -0
  202. package/dist/FieldGroup/FieldGroup.svelte.d.ts +5 -0
  203. package/dist/FieldGroup/field-group.types.d.ts +37 -0
  204. package/dist/FieldGroup/field-group.types.js +1 -0
  205. package/dist/FieldGroup/field-group.variants.d.ts +116 -0
  206. package/dist/FieldGroup/field-group.variants.js +49 -0
  207. package/dist/FieldGroup/index.d.ts +2 -0
  208. package/dist/FieldGroup/index.js +1 -0
  209. package/dist/FileUpload/FileUpload.svelte +639 -0
  210. package/dist/FileUpload/FileUpload.svelte.d.ts +8 -0
  211. package/dist/FileUpload/file-upload.types.d.ts +203 -0
  212. package/dist/FileUpload/file-upload.types.js +1 -0
  213. package/dist/FileUpload/file-upload.variants.d.ts +397 -0
  214. package/dist/FileUpload/file-upload.variants.js +224 -0
  215. package/dist/FileUpload/index.d.ts +2 -0
  216. package/dist/FileUpload/index.js +1 -0
  217. package/dist/Form/Form.svelte +197 -0
  218. package/dist/Form/Form.svelte.d.ts +26 -0
  219. package/dist/Form/form.context.svelte.d.ts +64 -0
  220. package/dist/Form/form.context.svelte.js +478 -0
  221. package/dist/Form/form.types.d.ts +164 -0
  222. package/dist/Form/form.types.js +12 -0
  223. package/dist/Form/form.variants.d.ts +39 -0
  224. package/dist/Form/form.variants.js +17 -0
  225. package/dist/Form/index.d.ts +4 -0
  226. package/dist/Form/index.js +6 -0
  227. package/dist/Form/validate-schema.d.ts +13 -0
  228. package/dist/Form/validate-schema.js +113 -0
  229. package/dist/FormField/FormField.svelte +186 -0
  230. package/dist/FormField/FormField.svelte.d.ts +5 -0
  231. package/dist/FormField/form-field.types.d.ts +109 -0
  232. package/dist/FormField/form-field.types.js +1 -0
  233. package/dist/FormField/form-field.variants.d.ts +313 -0
  234. package/dist/FormField/form-field.variants.js +74 -0
  235. package/dist/FormField/index.d.ts +2 -0
  236. package/dist/FormField/index.js +1 -0
  237. package/dist/Icon/Icon.svelte +46 -0
  238. package/dist/Icon/Icon.svelte.d.ts +6 -0
  239. package/dist/Icon/icon.types.d.ts +49 -0
  240. package/dist/Icon/icon.types.js +1 -0
  241. package/dist/Icon/index.d.ts +2 -0
  242. package/dist/Icon/index.js +1 -0
  243. package/dist/Input/Input.svelte +199 -0
  244. package/dist/Input/Input.svelte.d.ts +26 -0
  245. package/dist/Input/index.d.ts +2 -0
  246. package/dist/Input/index.js +1 -0
  247. package/dist/Input/input.types.d.ts +113 -0
  248. package/dist/Input/input.types.js +1 -0
  249. package/dist/Input/input.variants.d.ts +398 -0
  250. package/dist/Input/input.variants.js +387 -0
  251. package/dist/Kbd/Kbd.svelte +45 -0
  252. package/dist/Kbd/Kbd.svelte.d.ts +5 -0
  253. package/dist/Kbd/index.d.ts +3 -0
  254. package/dist/Kbd/index.js +2 -0
  255. package/dist/Kbd/kbd.types.d.ts +91 -0
  256. package/dist/Kbd/kbd.types.js +1 -0
  257. package/dist/Kbd/kbd.variants.d.ts +180 -0
  258. package/dist/Kbd/kbd.variants.js +168 -0
  259. package/dist/Kbd/useKbd.svelte.d.ts +29 -0
  260. package/dist/Kbd/useKbd.svelte.js +248 -0
  261. package/dist/Link/Link.svelte +168 -0
  262. package/dist/Link/Link.svelte.d.ts +5 -0
  263. package/dist/Link/index.d.ts +2 -0
  264. package/dist/Link/index.js +1 -0
  265. package/dist/Link/link.types.d.ts +86 -0
  266. package/dist/Link/link.types.js +1 -0
  267. package/dist/Link/link.variants.d.ts +113 -0
  268. package/dist/Link/link.variants.js +43 -0
  269. package/dist/Modal/Modal.svelte +218 -0
  270. package/dist/Modal/Modal.svelte.d.ts +5 -0
  271. package/dist/Modal/ModalTriggerTestWrapper.svelte +10 -0
  272. package/dist/Modal/ModalTriggerTestWrapper.svelte.d.ts +18 -0
  273. package/dist/Modal/index.d.ts +2 -0
  274. package/dist/Modal/index.js +1 -0
  275. package/dist/Modal/modal.types.d.ts +155 -0
  276. package/dist/Modal/modal.types.js +1 -0
  277. package/dist/Modal/modal.variants.d.ts +303 -0
  278. package/dist/Modal/modal.variants.js +90 -0
  279. package/dist/Pagination/Pagination.svelte +253 -0
  280. package/dist/Pagination/Pagination.svelte.d.ts +6 -0
  281. package/dist/Pagination/index.d.ts +2 -0
  282. package/dist/Pagination/index.js +1 -0
  283. package/dist/Pagination/pagination.types.d.ts +191 -0
  284. package/dist/Pagination/pagination.types.js +1 -0
  285. package/dist/Pagination/pagination.variants.d.ts +160 -0
  286. package/dist/Pagination/pagination.variants.js +125 -0
  287. package/dist/PinInput/PinInput.svelte +162 -0
  288. package/dist/PinInput/PinInput.svelte.d.ts +6 -0
  289. package/dist/PinInput/index.d.ts +2 -0
  290. package/dist/PinInput/index.js +1 -0
  291. package/dist/PinInput/pin-input.types.d.ts +110 -0
  292. package/dist/PinInput/pin-input.types.js +1 -0
  293. package/dist/PinInput/pin-input.variants.d.ts +303 -0
  294. package/dist/PinInput/pin-input.variants.js +196 -0
  295. package/dist/Popover/Popover.svelte +122 -0
  296. package/dist/Popover/Popover.svelte.d.ts +6 -0
  297. package/dist/Popover/index.d.ts +2 -0
  298. package/dist/Popover/index.js +1 -0
  299. package/dist/Popover/popover.types.d.ts +58 -0
  300. package/dist/Popover/popover.types.js +1 -0
  301. package/dist/Popover/popover.variants.d.ts +53 -0
  302. package/dist/Popover/popover.variants.js +31 -0
  303. package/dist/Progress/Progress.svelte +135 -0
  304. package/dist/Progress/Progress.svelte.d.ts +6 -0
  305. package/dist/Progress/index.d.ts +2 -0
  306. package/dist/Progress/index.js +1 -0
  307. package/dist/Progress/progress.types.d.ts +71 -0
  308. package/dist/Progress/progress.types.js +1 -0
  309. package/dist/Progress/progress.variants.d.ts +513 -0
  310. package/dist/Progress/progress.variants.js +204 -0
  311. package/dist/RadioGroup/RadioGroup.svelte +226 -0
  312. package/dist/RadioGroup/RadioGroup.svelte.d.ts +6 -0
  313. package/dist/RadioGroup/index.d.ts +2 -0
  314. package/dist/RadioGroup/index.js +1 -0
  315. package/dist/RadioGroup/radio-group.types.d.ts +111 -0
  316. package/dist/RadioGroup/radio-group.types.js +1 -0
  317. package/dist/RadioGroup/radio-group.variants.d.ts +543 -0
  318. package/dist/RadioGroup/radio-group.variants.js +232 -0
  319. package/dist/Select/Select.svelte +461 -0
  320. package/dist/Select/Select.svelte.d.ts +6 -0
  321. package/dist/Select/index.d.ts +2 -0
  322. package/dist/Select/index.js +1 -0
  323. package/dist/Select/select.types.d.ts +263 -0
  324. package/dist/Select/select.types.js +1 -0
  325. package/dist/Select/select.variants.d.ts +713 -0
  326. package/dist/Select/select.variants.js +482 -0
  327. package/dist/SelectMenu/SelectMenu.svelte +637 -0
  328. package/dist/SelectMenu/SelectMenu.svelte.d.ts +5 -0
  329. package/dist/SelectMenu/SelectMenuFormFieldTestWrapper.svelte +11 -0
  330. package/dist/SelectMenu/SelectMenuFormFieldTestWrapper.svelte.d.ts +7 -0
  331. package/dist/SelectMenu/index.d.ts +2 -0
  332. package/dist/SelectMenu/index.js +1 -0
  333. package/dist/SelectMenu/select-menu.types.d.ts +326 -0
  334. package/dist/SelectMenu/select-menu.types.js +1 -0
  335. package/dist/SelectMenu/select-menu.variants.d.ts +795 -0
  336. package/dist/SelectMenu/select-menu.variants.js +70 -0
  337. package/dist/Separator/Separator.svelte +77 -0
  338. package/dist/Separator/Separator.svelte.d.ts +6 -0
  339. package/dist/Separator/index.d.ts +2 -0
  340. package/dist/Separator/index.js +1 -0
  341. package/dist/Separator/separator.types.d.ts +53 -0
  342. package/dist/Separator/separator.types.js +1 -0
  343. package/dist/Separator/separator.variants.d.ts +509 -0
  344. package/dist/Separator/separator.variants.js +110 -0
  345. package/dist/Skeleton/Skeleton.svelte +39 -0
  346. package/dist/Skeleton/Skeleton.svelte.d.ts +5 -0
  347. package/dist/Skeleton/index.d.ts +2 -0
  348. package/dist/Skeleton/index.js +1 -0
  349. package/dist/Skeleton/skeleton.types.d.ts +27 -0
  350. package/dist/Skeleton/skeleton.types.js +1 -0
  351. package/dist/Skeleton/skeleton.variants.d.ts +18 -0
  352. package/dist/Skeleton/skeleton.variants.js +12 -0
  353. package/dist/Slideover/Slideover.svelte +212 -0
  354. package/dist/Slideover/Slideover.svelte.d.ts +5 -0
  355. package/dist/Slideover/SlideoverTriggerTestWrapper.svelte +10 -0
  356. package/dist/Slideover/SlideoverTriggerTestWrapper.svelte.d.ts +18 -0
  357. package/dist/Slideover/index.d.ts +2 -0
  358. package/dist/Slideover/index.js +1 -0
  359. package/dist/Slideover/slideover.types.d.ts +154 -0
  360. package/dist/Slideover/slideover.types.js +1 -0
  361. package/dist/Slideover/slideover.variants.d.ts +298 -0
  362. package/dist/Slideover/slideover.variants.js +145 -0
  363. package/dist/Slider/Slider.svelte +129 -0
  364. package/dist/Slider/Slider.svelte.d.ts +6 -0
  365. package/dist/Slider/index.d.ts +2 -0
  366. package/dist/Slider/index.js +1 -0
  367. package/dist/Slider/slider.types.d.ts +55 -0
  368. package/dist/Slider/slider.types.js +1 -0
  369. package/dist/Slider/slider.variants.d.ts +383 -0
  370. package/dist/Slider/slider.variants.js +102 -0
  371. package/dist/Stepper/Stepper.svelte +254 -0
  372. package/dist/Stepper/Stepper.svelte.d.ts +5 -0
  373. package/dist/Stepper/index.d.ts +2 -0
  374. package/dist/Stepper/index.js +1 -0
  375. package/dist/Stepper/stepper.types.d.ts +223 -0
  376. package/dist/Stepper/stepper.types.js +1 -0
  377. package/dist/Stepper/stepper.variants.d.ts +428 -0
  378. package/dist/Stepper/stepper.variants.js +204 -0
  379. package/dist/Switch/Switch.svelte +150 -0
  380. package/dist/Switch/Switch.svelte.d.ts +6 -0
  381. package/dist/Switch/index.d.ts +2 -0
  382. package/dist/Switch/index.js +1 -0
  383. package/dist/Switch/switch.types.d.ts +80 -0
  384. package/dist/Switch/switch.types.js +1 -0
  385. package/dist/Switch/switch.variants.d.ts +433 -0
  386. package/dist/Switch/switch.variants.js +171 -0
  387. package/dist/Table/Table.svelte +667 -0
  388. package/dist/Table/Table.svelte.d.ts +26 -0
  389. package/dist/Table/index.d.ts +2 -0
  390. package/dist/Table/index.js +1 -0
  391. package/dist/Table/table.types.d.ts +202 -0
  392. package/dist/Table/table.types.js +1 -0
  393. package/dist/Table/table.utils.d.ts +54 -0
  394. package/dist/Table/table.utils.js +167 -0
  395. package/dist/Table/table.variants.d.ts +205 -0
  396. package/dist/Table/table.variants.js +126 -0
  397. package/dist/Tabs/Tabs.svelte +188 -0
  398. package/dist/Tabs/Tabs.svelte.d.ts +6 -0
  399. package/dist/Tabs/index.d.ts +2 -0
  400. package/dist/Tabs/index.js +1 -0
  401. package/dist/Tabs/tabs.types.d.ts +207 -0
  402. package/dist/Tabs/tabs.types.js +1 -0
  403. package/dist/Tabs/tabs.variants.d.ts +298 -0
  404. package/dist/Tabs/tabs.variants.js +251 -0
  405. package/dist/Textarea/Textarea.svelte +215 -0
  406. package/dist/Textarea/Textarea.svelte.d.ts +5 -0
  407. package/dist/Textarea/index.d.ts +2 -0
  408. package/dist/Textarea/index.js +1 -0
  409. package/dist/Textarea/textarea.types.d.ts +103 -0
  410. package/dist/Textarea/textarea.types.js +1 -0
  411. package/dist/Textarea/textarea.variants.d.ts +403 -0
  412. package/dist/Textarea/textarea.variants.js +404 -0
  413. package/dist/ThemeModeButton/ThemeModeButton.svelte +74 -0
  414. package/dist/ThemeModeButton/ThemeModeButton.svelte.d.ts +5 -0
  415. package/dist/ThemeModeButton/index.d.ts +2 -0
  416. package/dist/ThemeModeButton/index.js +1 -0
  417. package/dist/ThemeModeButton/theme-mode-button.types.d.ts +69 -0
  418. package/dist/ThemeModeButton/theme-mode-button.types.js +1 -0
  419. package/dist/ThemeModeButton/theme-mode-button.variants.d.ts +21 -0
  420. package/dist/ThemeModeButton/theme-mode-button.variants.js +17 -0
  421. package/dist/Timeline/Timeline.svelte +116 -0
  422. package/dist/Timeline/Timeline.svelte.d.ts +5 -0
  423. package/dist/Timeline/index.d.ts +2 -0
  424. package/dist/Timeline/index.js +1 -0
  425. package/dist/Timeline/timeline.types.d.ts +138 -0
  426. package/dist/Timeline/timeline.types.js +1 -0
  427. package/dist/Timeline/timeline.variants.d.ts +413 -0
  428. package/dist/Timeline/timeline.variants.js +201 -0
  429. package/dist/Toast/Toaster.svelte +619 -0
  430. package/dist/Toast/Toaster.svelte.d.ts +5 -0
  431. package/dist/Toast/index.d.ts +4 -0
  432. package/dist/Toast/index.js +2 -0
  433. package/dist/Toast/toast.d.ts +38 -0
  434. package/dist/Toast/toast.js +73 -0
  435. package/dist/Toast/toast.types.d.ts +19 -0
  436. package/dist/Toast/toast.types.js +1 -0
  437. package/dist/Toast/toast.variants.d.ts +7 -0
  438. package/dist/Toast/toast.variants.js +5 -0
  439. package/dist/Tooltip/Tooltip.svelte +151 -0
  440. package/dist/Tooltip/Tooltip.svelte.d.ts +6 -0
  441. package/dist/Tooltip/TooltipTestWrapper.svelte +8 -0
  442. package/dist/Tooltip/TooltipTestWrapper.svelte.d.ts +4 -0
  443. package/dist/Tooltip/index.d.ts +2 -0
  444. package/dist/Tooltip/index.js +1 -0
  445. package/dist/Tooltip/tooltip.types.d.ts +62 -0
  446. package/dist/Tooltip/tooltip.types.js +1 -0
  447. package/dist/Tooltip/tooltip.variants.d.ts +68 -0
  448. package/dist/Tooltip/tooltip.variants.js +35 -0
  449. package/dist/User/User.svelte +98 -0
  450. package/dist/User/User.svelte.d.ts +5 -0
  451. package/dist/User/index.d.ts +2 -0
  452. package/dist/User/index.js +1 -0
  453. package/dist/User/user.types.d.ts +78 -0
  454. package/dist/User/user.types.js +1 -0
  455. package/dist/User/user.variants.d.ts +368 -0
  456. package/dist/User/user.variants.js +85 -0
  457. package/dist/config.d.ts +73 -0
  458. package/dist/config.js +108 -0
  459. package/dist/hooks/HookContextProbe.svelte +7 -0
  460. package/dist/hooks/HookContextProbe.svelte.d.ts +18 -0
  461. package/dist/hooks/HookContextProvider.svelte +9 -0
  462. package/dist/hooks/HookContextProvider.svelte.d.ts +18 -0
  463. package/dist/hooks/HookEmitProbe.svelte +14 -0
  464. package/dist/hooks/HookEmitProbe.svelte.d.ts +18 -0
  465. package/dist/hooks/index.d.ts +14 -0
  466. package/dist/hooks/index.js +7 -0
  467. package/dist/hooks/useClickOutside.svelte.d.ts +31 -0
  468. package/dist/hooks/useClickOutside.svelte.js +37 -0
  469. package/dist/hooks/useClipboard.svelte.d.ts +30 -0
  470. package/dist/hooks/useClipboard.svelte.js +45 -0
  471. package/dist/hooks/useDebounce.svelte.d.ts +36 -0
  472. package/dist/hooks/useDebounce.svelte.js +56 -0
  473. package/dist/hooks/useEscapeKeydown.svelte.d.ts +31 -0
  474. package/dist/hooks/useEscapeKeydown.svelte.js +37 -0
  475. package/dist/hooks/useFormField.svelte.d.ts +54 -0
  476. package/dist/hooks/useFormField.svelte.js +65 -0
  477. package/dist/hooks/useInfiniteScroll.svelte.d.ts +57 -0
  478. package/dist/hooks/useInfiniteScroll.svelte.js +69 -0
  479. package/dist/hooks/useMediaQuery.svelte.d.ts +31 -0
  480. package/dist/hooks/useMediaQuery.svelte.js +38 -0
  481. package/dist/index.d.ts +56 -0
  482. package/dist/index.js +57 -0
  483. package/dist/theme.css +680 -0
  484. package/package.json +237 -0
@@ -0,0 +1,148 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAnchorAttributes, HTMLAttributes } from 'svelte/elements';
3
+ import type { ClassNameValue } from 'tailwind-merge';
4
+ import type { ButtonProps } from '../Button/button.types.js';
5
+ import type { BannerSlots, BannerVariantProps } from './banner.variants.js';
6
+ /**
7
+ * Props for the Banner component.
8
+ *
9
+ * A full-width announcement bar typically rendered at the top of a page or
10
+ * layout. Supports optional `localStorage` persistence — once dismissed by a
11
+ * given `id`, the banner stays hidden across reloads.
12
+ *
13
+ * **Hydration note:** When a banner has been previously dismissed via `id`,
14
+ * users will see a one-frame flicker on initial render (server renders the
15
+ * banner, then `$effect` reads `localStorage` and hides it). Eliminating the
16
+ * flicker requires a SvelteKit prehydration script the consumer injects
17
+ * themselves — see the demo page for a recipe.
18
+ *
19
+ * @example
20
+ * ```svelte
21
+ * <Banner
22
+ * id="announce-2026-q2"
23
+ * icon="lucide:megaphone"
24
+ * title="New features available — check the changelog!"
25
+ * color="primary"
26
+ * close
27
+ * to="/changelog"
28
+ * />
29
+ * ```
30
+ */
31
+ export interface BannerProps extends Omit<HTMLAttributes<HTMLElement>, 'class' | 'title' | 'id'> {
32
+ /**
33
+ * Bindable reference to the root DOM element.
34
+ */
35
+ ref?: HTMLElement | null;
36
+ /**
37
+ * The HTML element to render as the root.
38
+ * @default 'div'
39
+ */
40
+ as?: keyof HTMLElementTagNameMap;
41
+ /**
42
+ * Unique identifier used as the localStorage persistence key. When set,
43
+ * clicking the close button writes `ps-banner-{id}` to localStorage
44
+ * and the banner remains hidden on subsequent loads.
45
+ *
46
+ * Without an explicit `id`, a stable per-instance id is generated via
47
+ * `useId()` (used for the `data-banner-id` DOM attribute), but **dismissal
48
+ * is session-only** — no localStorage interaction happens. Pass an
49
+ * explicit `id` to opt into cross-reload persistence.
50
+ *
51
+ * Allowed characters in the storage key: alphanumeric, underscore, dash.
52
+ * Other characters are replaced with `-`.
53
+ */
54
+ id?: string;
55
+ /**
56
+ * Banner text content.
57
+ */
58
+ title?: string;
59
+ /**
60
+ * Iconify icon name rendered before the title.
61
+ */
62
+ icon?: string;
63
+ /**
64
+ * Color theme. Applies background + foreground tokens.
65
+ * @default 'primary'
66
+ */
67
+ color?: NonNullable<BannerVariantProps['color']>;
68
+ /**
69
+ * When provided, the entire banner becomes a clickable link via an
70
+ * absolute-positioned overlay anchor. The `as` element stays unchanged
71
+ * (so close/action buttons inside aren't nested in an `<a>` — valid HTML).
72
+ * Pair with `target` for new-tab links.
73
+ */
74
+ to?: string;
75
+ /**
76
+ * Anchor `target` (e.g. `'_blank'`). Only honored when `to` is set.
77
+ */
78
+ target?: HTMLAnchorAttributes['target'];
79
+ /**
80
+ * Show close button. Pass `true` for default styling or a `ButtonProps`
81
+ * object to customize. When `id` is also set, dismissal persists across
82
+ * reloads via localStorage.
83
+ * @default false
84
+ */
85
+ close?: boolean | ButtonProps;
86
+ /**
87
+ * Override the close button icon.
88
+ * @default 'lucide:x' (from global icons config)
89
+ */
90
+ closeIcon?: string;
91
+ /**
92
+ * Action buttons rendered inline after the title. Each entry is spread
93
+ * onto a `<Button>` and accepts the full `ButtonProps` shape. Banner
94
+ * applies `size="xs" color="surface"` as the default — override any prop
95
+ * (variant, color, icon, to, etc.) per item.
96
+ *
97
+ * @example
98
+ * ```svelte
99
+ * <Banner
100
+ * title="Update available"
101
+ * actions={[
102
+ * { label: 'Learn more', variant: 'outline' },
103
+ * { label: 'Update now', trailingIcon: 'lucide:arrow-right' }
104
+ * ]}
105
+ * />
106
+ * ```
107
+ */
108
+ actions?: ButtonProps[];
109
+ /**
110
+ * Bindable visibility. Set to `false` to hide externally without
111
+ * persisting (e.g. for analytics-driven banners). When the user clicks
112
+ * the close button, this is set to `false` automatically.
113
+ * @default true
114
+ */
115
+ open?: boolean;
116
+ /**
117
+ * Fired when the close button is clicked, before any localStorage
118
+ * write. Cannot prevent dismissal — use `open` binding if you need
119
+ * conditional dismissal.
120
+ */
121
+ onClose?: () => void;
122
+ /**
123
+ * Additional CSS classes for the root element.
124
+ */
125
+ class?: ClassNameValue;
126
+ /**
127
+ * Override classes for component slots.
128
+ */
129
+ ui?: Partial<Record<BannerSlots, ClassNameValue>>;
130
+ /**
131
+ * Custom leading content. Replaces the default `icon` rendering.
132
+ */
133
+ leading?: Snippet;
134
+ /**
135
+ * Custom title content. Replaces the default `title` text.
136
+ */
137
+ titleSlot?: Snippet;
138
+ /**
139
+ * Custom actions content. Replaces the default `actions` array rendering.
140
+ */
141
+ actionsSlot?: Snippet;
142
+ /**
143
+ * Custom close button content. When provided, the consumer is
144
+ * responsible for wiring up the dismiss action (typically by binding
145
+ * `open` externally).
146
+ */
147
+ closeSlot?: Snippet;
148
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,293 @@
1
+ import { type VariantProps } from 'tailwind-variants';
2
+ export declare const bannerVariants: import("tailwind-variants").TVReturnType<{
3
+ color: {
4
+ primary: {
5
+ root: string;
6
+ icon: string;
7
+ title: string;
8
+ };
9
+ secondary: {
10
+ root: string;
11
+ icon: string;
12
+ title: string;
13
+ };
14
+ tertiary: {
15
+ root: string;
16
+ icon: string;
17
+ title: string;
18
+ };
19
+ success: {
20
+ root: string;
21
+ icon: string;
22
+ title: string;
23
+ };
24
+ warning: {
25
+ root: string;
26
+ icon: string;
27
+ title: string;
28
+ };
29
+ error: {
30
+ root: string;
31
+ icon: string;
32
+ title: string;
33
+ };
34
+ info: {
35
+ root: string;
36
+ icon: string;
37
+ title: string;
38
+ };
39
+ surface: {
40
+ root: string;
41
+ icon: string;
42
+ title: string;
43
+ };
44
+ };
45
+ to: {
46
+ true: string;
47
+ false: string;
48
+ };
49
+ }, {
50
+ root: string;
51
+ container: string;
52
+ left: string;
53
+ center: string;
54
+ right: string;
55
+ icon: string;
56
+ title: string;
57
+ actions: string[];
58
+ close: string;
59
+ }, undefined, {
60
+ color: {
61
+ primary: {
62
+ root: string;
63
+ icon: string;
64
+ title: string;
65
+ };
66
+ secondary: {
67
+ root: string;
68
+ icon: string;
69
+ title: string;
70
+ };
71
+ tertiary: {
72
+ root: string;
73
+ icon: string;
74
+ title: string;
75
+ };
76
+ success: {
77
+ root: string;
78
+ icon: string;
79
+ title: string;
80
+ };
81
+ warning: {
82
+ root: string;
83
+ icon: string;
84
+ title: string;
85
+ };
86
+ error: {
87
+ root: string;
88
+ icon: string;
89
+ title: string;
90
+ };
91
+ info: {
92
+ root: string;
93
+ icon: string;
94
+ title: string;
95
+ };
96
+ surface: {
97
+ root: string;
98
+ icon: string;
99
+ title: string;
100
+ };
101
+ };
102
+ to: {
103
+ true: string;
104
+ false: string;
105
+ };
106
+ }, {
107
+ root: string;
108
+ container: string;
109
+ left: string;
110
+ center: string;
111
+ right: string;
112
+ icon: string;
113
+ title: string;
114
+ actions: string[];
115
+ close: string;
116
+ }, import("tailwind-variants").TVReturnType<{
117
+ color: {
118
+ primary: {
119
+ root: string;
120
+ icon: string;
121
+ title: string;
122
+ };
123
+ secondary: {
124
+ root: string;
125
+ icon: string;
126
+ title: string;
127
+ };
128
+ tertiary: {
129
+ root: string;
130
+ icon: string;
131
+ title: string;
132
+ };
133
+ success: {
134
+ root: string;
135
+ icon: string;
136
+ title: string;
137
+ };
138
+ warning: {
139
+ root: string;
140
+ icon: string;
141
+ title: string;
142
+ };
143
+ error: {
144
+ root: string;
145
+ icon: string;
146
+ title: string;
147
+ };
148
+ info: {
149
+ root: string;
150
+ icon: string;
151
+ title: string;
152
+ };
153
+ surface: {
154
+ root: string;
155
+ icon: string;
156
+ title: string;
157
+ };
158
+ };
159
+ to: {
160
+ true: string;
161
+ false: string;
162
+ };
163
+ }, {
164
+ root: string;
165
+ container: string;
166
+ left: string;
167
+ center: string;
168
+ right: string;
169
+ icon: string;
170
+ title: string;
171
+ actions: string[];
172
+ close: string;
173
+ }, undefined, unknown, unknown, undefined>>;
174
+ export type BannerVariantProps = VariantProps<typeof bannerVariants>;
175
+ export type BannerSlots = keyof ReturnType<typeof bannerVariants>;
176
+ export declare const bannerDefaults: {
177
+ defaultVariants: import("tailwind-variants").TVDefaultVariants<{
178
+ color: {
179
+ primary: {
180
+ root: string;
181
+ icon: string;
182
+ title: string;
183
+ };
184
+ secondary: {
185
+ root: string;
186
+ icon: string;
187
+ title: string;
188
+ };
189
+ tertiary: {
190
+ root: string;
191
+ icon: string;
192
+ title: string;
193
+ };
194
+ success: {
195
+ root: string;
196
+ icon: string;
197
+ title: string;
198
+ };
199
+ warning: {
200
+ root: string;
201
+ icon: string;
202
+ title: string;
203
+ };
204
+ error: {
205
+ root: string;
206
+ icon: string;
207
+ title: string;
208
+ };
209
+ info: {
210
+ root: string;
211
+ icon: string;
212
+ title: string;
213
+ };
214
+ surface: {
215
+ root: string;
216
+ icon: string;
217
+ title: string;
218
+ };
219
+ };
220
+ to: {
221
+ true: string;
222
+ false: string;
223
+ };
224
+ }, {
225
+ root: string;
226
+ container: string;
227
+ left: string;
228
+ center: string;
229
+ right: string;
230
+ icon: string;
231
+ title: string;
232
+ actions: string[];
233
+ close: string;
234
+ }, {
235
+ color: {
236
+ primary: {
237
+ root: string;
238
+ icon: string;
239
+ title: string;
240
+ };
241
+ secondary: {
242
+ root: string;
243
+ icon: string;
244
+ title: string;
245
+ };
246
+ tertiary: {
247
+ root: string;
248
+ icon: string;
249
+ title: string;
250
+ };
251
+ success: {
252
+ root: string;
253
+ icon: string;
254
+ title: string;
255
+ };
256
+ warning: {
257
+ root: string;
258
+ icon: string;
259
+ title: string;
260
+ };
261
+ error: {
262
+ root: string;
263
+ icon: string;
264
+ title: string;
265
+ };
266
+ info: {
267
+ root: string;
268
+ icon: string;
269
+ title: string;
270
+ };
271
+ surface: {
272
+ root: string;
273
+ icon: string;
274
+ title: string;
275
+ };
276
+ };
277
+ to: {
278
+ true: string;
279
+ false: string;
280
+ };
281
+ }, {
282
+ root: string;
283
+ container: string;
284
+ left: string;
285
+ center: string;
286
+ right: string;
287
+ icon: string;
288
+ title: string;
289
+ actions: string[];
290
+ close: string;
291
+ }>;
292
+ slots: Partial<Record<BannerSlots, string>>;
293
+ };
@@ -0,0 +1,86 @@
1
+ import { tv } from 'tailwind-variants';
2
+ export const bannerVariants = tv({
3
+ slots: {
4
+ root: 'relative z-30 w-full transition-colors',
5
+ container: 'flex items-center justify-between gap-3 min-h-12 px-4 py-2',
6
+ left: 'hidden lg:flex lg:flex-1 lg:items-center',
7
+ center: 'flex items-center gap-2 min-w-0',
8
+ right: 'flex items-center justify-end gap-2 lg:flex-1',
9
+ icon: 'size-5 shrink-0 pointer-events-none',
10
+ title: 'text-sm font-medium truncate',
11
+ actions: [
12
+ 'flex items-center gap-2 ms-2',
13
+ '[&_button]:text-inherit [&_button]:border-current/30 [&_button]:hover:bg-current/10'
14
+ ],
15
+ close: 'shrink-0 text-inherit hover:bg-current/10'
16
+ },
17
+ variants: {
18
+ color: {
19
+ primary: {
20
+ root: 'bg-primary text-on-primary',
21
+ icon: 'text-on-primary',
22
+ title: 'text-on-primary'
23
+ },
24
+ secondary: {
25
+ root: 'bg-secondary text-on-secondary',
26
+ icon: 'text-on-secondary',
27
+ title: 'text-on-secondary'
28
+ },
29
+ tertiary: {
30
+ root: 'bg-tertiary text-on-tertiary',
31
+ icon: 'text-on-tertiary',
32
+ title: 'text-on-tertiary'
33
+ },
34
+ success: {
35
+ root: 'bg-success text-on-success',
36
+ icon: 'text-on-success',
37
+ title: 'text-on-success'
38
+ },
39
+ warning: {
40
+ root: 'bg-warning text-on-warning',
41
+ icon: 'text-on-warning',
42
+ title: 'text-on-warning'
43
+ },
44
+ error: {
45
+ root: 'bg-error text-on-error',
46
+ icon: 'text-on-error',
47
+ title: 'text-on-error'
48
+ },
49
+ info: {
50
+ root: 'bg-info text-on-info',
51
+ icon: 'text-on-info',
52
+ title: 'text-on-info'
53
+ },
54
+ surface: {
55
+ root: 'bg-inverse-surface text-inverse-on-surface',
56
+ icon: 'text-inverse-on-surface',
57
+ title: 'text-inverse-on-surface'
58
+ }
59
+ },
60
+ to: {
61
+ true: '',
62
+ false: ''
63
+ }
64
+ },
65
+ compoundVariants: [
66
+ // -------------------------------------------------------------------
67
+ // Hover effects when banner is clickable (`to` is set)
68
+ // -------------------------------------------------------------------
69
+ { color: 'primary', to: true, class: { root: 'hover:bg-primary/90' } },
70
+ { color: 'secondary', to: true, class: { root: 'hover:bg-secondary/90' } },
71
+ { color: 'tertiary', to: true, class: { root: 'hover:bg-tertiary/90' } },
72
+ { color: 'success', to: true, class: { root: 'hover:bg-success/90' } },
73
+ { color: 'warning', to: true, class: { root: 'hover:bg-warning/90' } },
74
+ { color: 'error', to: true, class: { root: 'hover:bg-error/90' } },
75
+ { color: 'info', to: true, class: { root: 'hover:bg-info/90' } },
76
+ { color: 'surface', to: true, class: { root: 'hover:bg-inverse-surface/90' } }
77
+ ],
78
+ defaultVariants: {
79
+ color: 'primary',
80
+ to: false
81
+ }
82
+ });
83
+ export const bannerDefaults = {
84
+ defaultVariants: bannerVariants.defaultVariants,
85
+ slots: {}
86
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Banner } from './Banner.svelte';
2
+ export type { BannerProps } from './banner.types.js';
@@ -0,0 +1 @@
1
+ export { default as Banner } from './Banner.svelte';
@@ -0,0 +1,79 @@
1
+ <script lang="ts" module>import type { BreadcrumbProps } from './breadcrumb.types.js';
2
+ export type Props = BreadcrumbProps;
3
+ </script>
4
+
5
+ <script lang="ts">import type { ClassNameValue } from 'tailwind-merge';
6
+ import { getComponentConfig } from '../config.js';
7
+ import Icon from '../Icon/Icon.svelte';
8
+ import Link from '../Link/Link.svelte';
9
+ import { breadcrumbDefaults, breadcrumbVariants } from './breadcrumb.variants.js';
10
+
11
+ const config = getComponentConfig('breadcrumb', breadcrumbDefaults);
12
+ let { ref = $bindable(null), as = 'nav', items, separatorIcon = 'lucide:chevron-right', class: className, ui, item: itemSnippet, separator: separatorSnippet, ...restProps }: Props = $props();
13
+ const variantSlots = $derived(breadcrumbVariants(config.defaultVariants));
14
+ const classes = $derived({
15
+ root: variantSlots.root({ class: [config.slots.root, className, ui?.root] }),
16
+ list: variantSlots.list({ class: [config.slots.list, ui?.list] }),
17
+ separator: variantSlots.separator({ class: [config.slots.separator, ui?.separator] }),
18
+ separatorIcon: variantSlots.separatorIcon({
19
+ class: [config.slots.separatorIcon, ui?.separatorIcon]
20
+ })
21
+ });
22
+ function getLinkClasses(active: boolean, disabled: boolean, to: boolean, itemClass: ClassNameValue | undefined) {
23
+ const slots = breadcrumbVariants({ ...config.defaultVariants, active, disabled, to });
24
+ return {
25
+ item: slots.item({ class: [config.slots.item, ui?.item] }),
26
+ link: slots.link({ class: [config.slots.link, itemClass, ui?.link] }),
27
+ linkLeadingIcon: slots.linkLeadingIcon({
28
+ class: [config.slots.linkLeadingIcon, ui?.linkLeadingIcon]
29
+ }),
30
+ linkLabel: slots.linkLabel({ class: [config.slots.linkLabel, ui?.linkLabel] })
31
+ };
32
+ }
33
+ </script>
34
+
35
+ <svelte:element
36
+ this={as}
37
+ bind:this={ref}
38
+ aria-label={as === 'nav' ? 'Breadcrumb' : undefined}
39
+ class={classes.root}
40
+ {...restProps}
41
+ >
42
+ <ol class={classes.list}>
43
+ {#each items as item, index (item.label ?? index)}
44
+ {@const active = index === items.length - 1}
45
+ {@const disabled = item.disabled ?? false}
46
+ {@const itemClasses = getLinkClasses(active, disabled, !!item.href, item.class)}
47
+
48
+ <li class={itemClasses.item}>
49
+ {#if itemSnippet}
50
+ {@render itemSnippet({ item, index, active })}
51
+ {:else if active || !item.href}
52
+ <span class={itemClasses.link} aria-current={active ? 'page' : undefined}>
53
+ {#if item.icon}
54
+ <Icon name={item.icon} class={itemClasses.linkLeadingIcon} />
55
+ {/if}
56
+ <span class={itemClasses.linkLabel}>{item.label}</span>
57
+ </span>
58
+ {:else}
59
+ <Link href={item.href} raw {disabled} class={itemClasses.link}>
60
+ {#if item.icon}
61
+ <Icon name={item.icon} class={itemClasses.linkLeadingIcon} />
62
+ {/if}
63
+ <span class={itemClasses.linkLabel}>{item.label}</span>
64
+ </Link>
65
+ {/if}
66
+ </li>
67
+
68
+ {#if index < items.length - 1}
69
+ <li role="presentation" aria-hidden="true" class={classes.separator}>
70
+ {#if separatorSnippet}
71
+ {@render separatorSnippet()}
72
+ {:else}
73
+ <Icon name={separatorIcon} class={classes.separatorIcon} />
74
+ {/if}
75
+ </li>
76
+ {/if}
77
+ {/each}
78
+ </ol>
79
+ </svelte:element>
@@ -0,0 +1,5 @@
1
+ import type { BreadcrumbProps } from './breadcrumb.types.js';
2
+ export type Props = BreadcrumbProps;
3
+ declare const Breadcrumb: import("svelte").Component<BreadcrumbProps, {}, "ref">;
4
+ type Breadcrumb = ReturnType<typeof Breadcrumb>;
5
+ export default Breadcrumb;
@@ -0,0 +1,66 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { ClassNameValue } from 'tailwind-merge';
3
+ import type { BreadcrumbSlots } from './breadcrumb.variants.js';
4
+ export interface BreadcrumbItem {
5
+ /**
6
+ * Display text for the breadcrumb item.
7
+ */
8
+ label: string;
9
+ /**
10
+ * The destination URL. When omitted, the item renders as a non-clickable span.
11
+ */
12
+ href?: string;
13
+ /**
14
+ * Leading icon name (e.g. 'lucide:home').
15
+ */
16
+ icon?: string;
17
+ /**
18
+ * Disables the breadcrumb item.
19
+ * @default false
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Additional CSS classes for this specific item's link/span.
24
+ */
25
+ class?: ClassNameValue;
26
+ }
27
+ export interface BreadcrumbProps {
28
+ /**
29
+ * Bindable reference to the root DOM element.
30
+ */
31
+ ref?: HTMLElement | null;
32
+ /**
33
+ * The HTML element to render as the root wrapper.
34
+ * @default 'nav'
35
+ */
36
+ as?: keyof HTMLElementTagNameMap;
37
+ /**
38
+ * Array of breadcrumb items to render.
39
+ */
40
+ items: BreadcrumbItem[];
41
+ /**
42
+ * Icon name for the separator between items.
43
+ * @default 'lucide:chevron-right'
44
+ */
45
+ separatorIcon?: string;
46
+ /**
47
+ * Additional CSS classes for the root element.
48
+ */
49
+ class?: ClassNameValue;
50
+ /**
51
+ * Override styles for specific breadcrumb slots.
52
+ */
53
+ ui?: Partial<Record<BreadcrumbSlots, ClassNameValue>>;
54
+ /**
55
+ * Custom snippet for rendering each breadcrumb item.
56
+ */
57
+ item?: Snippet<[{
58
+ item: BreadcrumbItem;
59
+ index: number;
60
+ active: boolean;
61
+ }]>;
62
+ /**
63
+ * Custom snippet for rendering the separator.
64
+ */
65
+ separator?: Snippet;
66
+ }
@@ -0,0 +1 @@
1
+ export {};