@pajohns/flowbite-svelte 0.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 (721) hide show
  1. package/License +22 -0
  2. package/README.md +471 -0
  3. package/dist/accordion/Accordion.svelte +58 -0
  4. package/dist/accordion/Accordion.svelte.d.ts +18 -0
  5. package/dist/accordion/AccordionItem.svelte +131 -0
  6. package/dist/accordion/AccordionItem.svelte.d.ts +23 -0
  7. package/dist/accordion/index.d.ts +3 -0
  8. package/dist/accordion/index.js +3 -0
  9. package/dist/accordion/theme.d.ts +96 -0
  10. package/dist/accordion/theme.js +59 -0
  11. package/dist/alert/Alert.svelte +94 -0
  12. package/dist/alert/Alert.svelte.d.ts +22 -0
  13. package/dist/alert/index.d.ts +2 -0
  14. package/dist/alert/index.js +2 -0
  15. package/dist/alert/theme.d.ts +108 -0
  16. package/dist/alert/theme.js +149 -0
  17. package/dist/avatar/Avatar.svelte +68 -0
  18. package/dist/avatar/Avatar.svelte.d.ts +24 -0
  19. package/dist/avatar/index.d.ts +2 -0
  20. package/dist/avatar/index.js +2 -0
  21. package/dist/avatar/theme.d.ts +63 -0
  22. package/dist/avatar/theme.js +31 -0
  23. package/dist/badge/Badge.svelte +98 -0
  24. package/dist/badge/Badge.svelte.d.ts +26 -0
  25. package/dist/badge/index.d.ts +2 -0
  26. package/dist/badge/index.js +2 -0
  27. package/dist/badge/theme.d.ts +247 -0
  28. package/dist/badge/theme.js +250 -0
  29. package/dist/banner/Banner.svelte +85 -0
  30. package/dist/banner/Banner.svelte.d.ts +24 -0
  31. package/dist/banner/index.d.ts +2 -0
  32. package/dist/banner/index.js +2 -0
  33. package/dist/banner/theme.d.ts +229 -0
  34. package/dist/banner/theme.js +45 -0
  35. package/dist/bottom-navigation/BottomNav.svelte +70 -0
  36. package/dist/bottom-navigation/BottomNav.svelte.d.ts +21 -0
  37. package/dist/bottom-navigation/BottomNavHeader.svelte +42 -0
  38. package/dist/bottom-navigation/BottomNavHeader.svelte.d.ts +16 -0
  39. package/dist/bottom-navigation/BottomNavHeaderItem.svelte +29 -0
  40. package/dist/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +14 -0
  41. package/dist/bottom-navigation/BottomNavItem.svelte +94 -0
  42. package/dist/bottom-navigation/BottomNavItem.svelte.d.ts +20 -0
  43. package/dist/bottom-navigation/index.d.ts +5 -0
  44. package/dist/bottom-navigation/index.js +5 -0
  45. package/dist/bottom-navigation/theme.d.ts +349 -0
  46. package/dist/bottom-navigation/theme.js +113 -0
  47. package/dist/breadcrumb/Breadcrumb.svelte +44 -0
  48. package/dist/breadcrumb/Breadcrumb.svelte.d.ts +17 -0
  49. package/dist/breadcrumb/BreadcrumbItem.svelte +73 -0
  50. package/dist/breadcrumb/BreadcrumbItem.svelte.d.ts +20 -0
  51. package/dist/breadcrumb/index.d.ts +3 -0
  52. package/dist/breadcrumb/index.js +3 -0
  53. package/dist/breadcrumb/theme.d.ts +72 -0
  54. package/dist/breadcrumb/theme.js +57 -0
  55. package/dist/button-group/ButtonGroup.svelte +43 -0
  56. package/dist/button-group/ButtonGroup.svelte.d.ts +15 -0
  57. package/dist/button-group/index.d.ts +2 -0
  58. package/dist/button-group/index.js +2 -0
  59. package/dist/button-group/theme.d.ts +21 -0
  60. package/dist/button-group/theme.js +14 -0
  61. package/dist/buttons/Button.svelte +74 -0
  62. package/dist/buttons/Button.svelte.d.ts +22 -0
  63. package/dist/buttons/GradientButton.svelte +47 -0
  64. package/dist/buttons/GradientButton.svelte.d.ts +21 -0
  65. package/dist/buttons/index.d.ts +3 -0
  66. package/dist/buttons/index.js +3 -0
  67. package/dist/buttons/theme.d.ts +707 -0
  68. package/dist/buttons/theme.js +303 -0
  69. package/dist/card/Card.svelte +79 -0
  70. package/dist/card/Card.svelte.d.ts +21 -0
  71. package/dist/card/index.d.ts +2 -0
  72. package/dist/card/index.js +2 -0
  73. package/dist/card/theme.d.ts +403 -0
  74. package/dist/card/theme.js +186 -0
  75. package/dist/carousel/Carousel.svelte +242 -0
  76. package/dist/carousel/Carousel.svelte.d.ts +26 -0
  77. package/dist/carousel/CarouselIndicators.svelte +48 -0
  78. package/dist/carousel/CarouselIndicators.svelte.d.ts +16 -0
  79. package/dist/carousel/CarouselSlide.d.ts +5 -0
  80. package/dist/carousel/CarouselSlide.js +7 -0
  81. package/dist/carousel/ControlButton.svelte +47 -0
  82. package/dist/carousel/ControlButton.svelte.d.ts +16 -0
  83. package/dist/carousel/Controls.svelte +37 -0
  84. package/dist/carousel/Controls.svelte.d.ts +13 -0
  85. package/dist/carousel/Slide.svelte +55 -0
  86. package/dist/carousel/Slide.svelte.d.ts +15 -0
  87. package/dist/carousel/Thumbnail.svelte +23 -0
  88. package/dist/carousel/Thumbnail.svelte.d.ts +13 -0
  89. package/dist/carousel/Thumbnails.svelte +59 -0
  90. package/dist/carousel/Thumbnails.svelte.d.ts +17 -0
  91. package/dist/carousel/index.d.ts +8 -0
  92. package/dist/carousel/index.js +8 -0
  93. package/dist/carousel/theme.d.ts +142 -0
  94. package/dist/carousel/theme.js +68 -0
  95. package/dist/clipboard/Clipboard.svelte +58 -0
  96. package/dist/clipboard/Clipboard.svelte.d.ts +17 -0
  97. package/dist/clipboard/index.d.ts +2 -0
  98. package/dist/clipboard/index.js +2 -0
  99. package/dist/clipboard/theme.d.ts +18 -0
  100. package/dist/clipboard/theme.js +13 -0
  101. package/dist/clipboard-manager/ClipboardManager.svelte +496 -0
  102. package/dist/clipboard-manager/ClipboardManager.svelte.d.ts +4 -0
  103. package/dist/clipboard-manager/index.d.ts +2 -0
  104. package/dist/clipboard-manager/index.js +2 -0
  105. package/dist/clipboard-manager/theme.d.ts +169 -0
  106. package/dist/clipboard-manager/theme.js +73 -0
  107. package/dist/command-palette/CommandPalette.svelte +209 -0
  108. package/dist/command-palette/CommandPalette.svelte.d.ts +20 -0
  109. package/dist/command-palette/index.d.ts +1 -0
  110. package/dist/command-palette/index.js +1 -0
  111. package/dist/command-palette/theme.d.ts +43 -0
  112. package/dist/command-palette/theme.js +17 -0
  113. package/dist/context.d.ts +50 -0
  114. package/dist/context.js +71 -0
  115. package/dist/darkmode/DarkMode.svelte +75 -0
  116. package/dist/darkmode/DarkMode.svelte.d.ts +16 -0
  117. package/dist/darkmode/index.d.ts +2 -0
  118. package/dist/darkmode/index.js +2 -0
  119. package/dist/darkmode/theme.d.ts +1 -0
  120. package/dist/darkmode/theme.js +4 -0
  121. package/dist/datepicker/Datepicker.svelte +589 -0
  122. package/dist/datepicker/Datepicker.svelte.d.ts +42 -0
  123. package/dist/datepicker/index.d.ts +2 -0
  124. package/dist/datepicker/index.js +2 -0
  125. package/dist/datepicker/theme.d.ts +388 -0
  126. package/dist/datepicker/theme.js +57 -0
  127. package/dist/device-mockups/Android.svelte +60 -0
  128. package/dist/device-mockups/Android.svelte.d.ts +21 -0
  129. package/dist/device-mockups/DefaultMockup.svelte +57 -0
  130. package/dist/device-mockups/DefaultMockup.svelte.d.ts +20 -0
  131. package/dist/device-mockups/Desktop.svelte +51 -0
  132. package/dist/device-mockups/Desktop.svelte.d.ts +18 -0
  133. package/dist/device-mockups/DeviceMockup.svelte +39 -0
  134. package/dist/device-mockups/DeviceMockup.svelte.d.ts +13 -0
  135. package/dist/device-mockups/Ios.svelte +57 -0
  136. package/dist/device-mockups/Ios.svelte.d.ts +20 -0
  137. package/dist/device-mockups/Laptop.svelte +55 -0
  138. package/dist/device-mockups/Laptop.svelte.d.ts +18 -0
  139. package/dist/device-mockups/Smartwatch.svelte +58 -0
  140. package/dist/device-mockups/Smartwatch.svelte.d.ts +20 -0
  141. package/dist/device-mockups/Tablet.svelte +57 -0
  142. package/dist/device-mockups/Tablet.svelte.d.ts +20 -0
  143. package/dist/device-mockups/index.d.ts +9 -0
  144. package/dist/device-mockups/index.js +9 -0
  145. package/dist/device-mockups/theme.d.ts +377 -0
  146. package/dist/device-mockups/theme.js +76 -0
  147. package/dist/dialog/Dialog.svelte +200 -0
  148. package/dist/dialog/Dialog.svelte.d.ts +28 -0
  149. package/dist/dialog/index.d.ts +2 -0
  150. package/dist/dialog/index.js +2 -0
  151. package/dist/dialog/theme.d.ts +16 -0
  152. package/dist/dialog/theme.js +17 -0
  153. package/dist/drawer/Drawer.svelte +163 -0
  154. package/dist/drawer/Drawer.svelte.d.ts +24 -0
  155. package/dist/drawer/DrawerHandle.svelte +33 -0
  156. package/dist/drawer/DrawerHandle.svelte.d.ts +16 -0
  157. package/dist/drawer/Drawerhead.svelte +52 -0
  158. package/dist/drawer/Drawerhead.svelte.d.ts +17 -0
  159. package/dist/drawer/index.d.ts +4 -0
  160. package/dist/drawer/index.js +4 -0
  161. package/dist/drawer/theme.d.ts +167 -0
  162. package/dist/drawer/theme.js +82 -0
  163. package/dist/dropdown/Dropdown.svelte +53 -0
  164. package/dist/dropdown/Dropdown.svelte.d.ts +19 -0
  165. package/dist/dropdown/DropdownDivider.svelte +22 -0
  166. package/dist/dropdown/DropdownDivider.svelte.d.ts +12 -0
  167. package/dist/dropdown/DropdownGroup.svelte +25 -0
  168. package/dist/dropdown/DropdownGroup.svelte.d.ts +13 -0
  169. package/dist/dropdown/DropdownHeader.svelte +25 -0
  170. package/dist/dropdown/DropdownHeader.svelte.d.ts +13 -0
  171. package/dist/dropdown/DropdownItem.svelte +60 -0
  172. package/dist/dropdown/DropdownItem.svelte.d.ts +19 -0
  173. package/dist/dropdown/index.d.ts +6 -0
  174. package/dist/dropdown/index.js +6 -0
  175. package/dist/dropdown/theme.d.ts +44 -0
  176. package/dist/dropdown/theme.js +20 -0
  177. package/dist/footer/Footer.svelte +28 -0
  178. package/dist/footer/Footer.svelte.d.ts +14 -0
  179. package/dist/footer/FooterBrand.svelte +45 -0
  180. package/dist/footer/FooterBrand.svelte.d.ts +19 -0
  181. package/dist/footer/FooterCopyright.svelte +55 -0
  182. package/dist/footer/FooterCopyright.svelte.d.ts +20 -0
  183. package/dist/footer/FooterIcon.svelte +31 -0
  184. package/dist/footer/FooterIcon.svelte.d.ts +15 -0
  185. package/dist/footer/FooterLink.svelte +43 -0
  186. package/dist/footer/FooterLink.svelte.d.ts +17 -0
  187. package/dist/footer/FooterLinkGroup.svelte +25 -0
  188. package/dist/footer/FooterLinkGroup.svelte.d.ts +13 -0
  189. package/dist/footer/index.d.ts +7 -0
  190. package/dist/footer/index.js +7 -0
  191. package/dist/footer/theme.d.ts +137 -0
  192. package/dist/footer/theme.js +39 -0
  193. package/dist/forms/button-toggle/ButtonToggle.svelte +98 -0
  194. package/dist/forms/button-toggle/ButtonToggle.svelte.d.ts +21 -0
  195. package/dist/forms/button-toggle/ButtonToggleGroup.svelte +115 -0
  196. package/dist/forms/button-toggle/ButtonToggleGroup.svelte.d.ts +4 -0
  197. package/dist/forms/button-toggle/CheckIcon.svelte +31 -0
  198. package/dist/forms/button-toggle/CheckIcon.svelte.d.ts +12 -0
  199. package/dist/forms/button-toggle/index.d.ts +4 -0
  200. package/dist/forms/button-toggle/index.js +4 -0
  201. package/dist/forms/button-toggle/theme.d.ts +347 -0
  202. package/dist/forms/button-toggle/theme.js +129 -0
  203. package/dist/forms/checkbox/Checkbox.svelte +84 -0
  204. package/dist/forms/checkbox/Checkbox.svelte.d.ts +4 -0
  205. package/dist/forms/checkbox/CheckboxButton.svelte +38 -0
  206. package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +21 -0
  207. package/dist/forms/checkbox/index.d.ts +3 -0
  208. package/dist/forms/checkbox/index.js +3 -0
  209. package/dist/forms/checkbox/theme.d.ts +321 -0
  210. package/dist/forms/checkbox/theme.js +114 -0
  211. package/dist/forms/dropzone/Dropzone.svelte +64 -0
  212. package/dist/forms/dropzone/Dropzone.svelte.d.ts +17 -0
  213. package/dist/forms/dropzone/index.d.ts +2 -0
  214. package/dist/forms/dropzone/index.js +2 -0
  215. package/dist/forms/dropzone/theme.d.ts +1 -0
  216. package/dist/forms/dropzone/theme.js +4 -0
  217. package/dist/forms/fileupload/Fileupload.svelte +73 -0
  218. package/dist/forms/fileupload/Fileupload.svelte.d.ts +22 -0
  219. package/dist/forms/fileupload/index.d.ts +2 -0
  220. package/dist/forms/fileupload/index.js +2 -0
  221. package/dist/forms/fileupload/theme.d.ts +55 -0
  222. package/dist/forms/fileupload/theme.js +16 -0
  223. package/dist/forms/floating-label/FloatingLabelInput.svelte +240 -0
  224. package/dist/forms/floating-label/FloatingLabelInput.svelte.d.ts +32 -0
  225. package/dist/forms/floating-label/index.d.ts +2 -0
  226. package/dist/forms/floating-label/index.js +2 -0
  227. package/dist/forms/floating-label/theme.d.ts +349 -0
  228. package/dist/forms/floating-label/theme.js +182 -0
  229. package/dist/forms/helper/Helper.svelte +28 -0
  230. package/dist/forms/helper/Helper.svelte.d.ts +14 -0
  231. package/dist/forms/helper/index.d.ts +2 -0
  232. package/dist/forms/helper/index.js +2 -0
  233. package/dist/forms/helper/theme.d.ts +75 -0
  234. package/dist/forms/helper/theme.js +29 -0
  235. package/dist/forms/input-addon/InputAddon.svelte +64 -0
  236. package/dist/forms/input-addon/InputAddon.svelte.d.ts +14 -0
  237. package/dist/forms/input-addon/index.d.ts +1 -0
  238. package/dist/forms/input-addon/index.js +1 -0
  239. package/dist/forms/input-field/Input.svelte +309 -0
  240. package/dist/forms/input-field/Input.svelte.d.ts +4 -0
  241. package/dist/forms/input-field/index.d.ts +4 -0
  242. package/dist/forms/input-field/index.js +5 -0
  243. package/dist/forms/input-field/theme.d.ts +304 -0
  244. package/dist/forms/input-field/theme.js +100 -0
  245. package/dist/forms/label/Label.svelte +33 -0
  246. package/dist/forms/label/Label.svelte.d.ts +15 -0
  247. package/dist/forms/label/index.d.ts +2 -0
  248. package/dist/forms/label/index.js +2 -0
  249. package/dist/forms/label/theme.d.ts +75 -0
  250. package/dist/forms/label/theme.js +29 -0
  251. package/dist/forms/phoneinput/PhoneInput.svelte +51 -0
  252. package/dist/forms/phoneinput/PhoneInput.svelte.d.ts +4 -0
  253. package/dist/forms/phoneinput/index.d.ts +2 -0
  254. package/dist/forms/phoneinput/index.js +2 -0
  255. package/dist/forms/phoneinput/theme.d.ts +79 -0
  256. package/dist/forms/phoneinput/theme.js +28 -0
  257. package/dist/forms/radio/Radio.svelte +49 -0
  258. package/dist/forms/radio/Radio.svelte.d.ts +30 -0
  259. package/dist/forms/radio/RadioButton.svelte +26 -0
  260. package/dist/forms/radio/RadioButton.svelte.d.ts +30 -0
  261. package/dist/forms/radio/index.d.ts +3 -0
  262. package/dist/forms/radio/index.js +3 -0
  263. package/dist/forms/radio/theme.d.ts +290 -0
  264. package/dist/forms/radio/theme.js +95 -0
  265. package/dist/forms/range/Range.svelte +29 -0
  266. package/dist/forms/range/Range.svelte.d.ts +17 -0
  267. package/dist/forms/range/index.d.ts +2 -0
  268. package/dist/forms/range/index.js +2 -0
  269. package/dist/forms/range/theme.d.ts +66 -0
  270. package/dist/forms/range/theme.js +74 -0
  271. package/dist/forms/search/Search.svelte +87 -0
  272. package/dist/forms/search/Search.svelte.d.ts +24 -0
  273. package/dist/forms/search/index.d.ts +2 -0
  274. package/dist/forms/search/index.js +2 -0
  275. package/dist/forms/search/theme.d.ts +73 -0
  276. package/dist/forms/search/theme.js +34 -0
  277. package/dist/forms/select/MultiSelect.svelte +271 -0
  278. package/dist/forms/select/MultiSelect.svelte.d.ts +25 -0
  279. package/dist/forms/select/Select.svelte +82 -0
  280. package/dist/forms/select/Select.svelte.d.ts +25 -0
  281. package/dist/forms/select/index.d.ts +3 -0
  282. package/dist/forms/select/index.js +3 -0
  283. package/dist/forms/select/theme.d.ts +264 -0
  284. package/dist/forms/select/theme.js +99 -0
  285. package/dist/forms/tags/Tags.svelte +245 -0
  286. package/dist/forms/tags/Tags.svelte.d.ts +25 -0
  287. package/dist/forms/tags/index.d.ts +2 -0
  288. package/dist/forms/tags/index.js +2 -0
  289. package/dist/forms/tags/theme.d.ts +70 -0
  290. package/dist/forms/tags/theme.js +13 -0
  291. package/dist/forms/textarea/Textarea.svelte +128 -0
  292. package/dist/forms/textarea/Textarea.svelte.d.ts +30 -0
  293. package/dist/forms/textarea/index.d.ts +2 -0
  294. package/dist/forms/textarea/index.js +2 -0
  295. package/dist/forms/textarea/theme.d.ts +100 -0
  296. package/dist/forms/textarea/theme.js +37 -0
  297. package/dist/forms/timepicker/Timepicker.svelte +436 -0
  298. package/dist/forms/timepicker/Timepicker.svelte.d.ts +34 -0
  299. package/dist/forms/timepicker/index.d.ts +2 -0
  300. package/dist/forms/timepicker/index.js +2 -0
  301. package/dist/forms/timepicker/theme.d.ts +190 -0
  302. package/dist/forms/timepicker/theme.js +72 -0
  303. package/dist/forms/toggle/Toggle.svelte +53 -0
  304. package/dist/forms/toggle/Toggle.svelte.d.ts +22 -0
  305. package/dist/forms/toggle/index.d.ts +2 -0
  306. package/dist/forms/toggle/index.js +2 -0
  307. package/dist/forms/toggle/theme.d.ts +280 -0
  308. package/dist/forms/toggle/theme.js +97 -0
  309. package/dist/gallery/Gallery.svelte +60 -0
  310. package/dist/gallery/Gallery.svelte.d.ts +17 -0
  311. package/dist/gallery/index.d.ts +2 -0
  312. package/dist/gallery/index.js +2 -0
  313. package/dist/gallery/theme.d.ts +34 -0
  314. package/dist/gallery/theme.js +7 -0
  315. package/dist/index.d.ts +89 -0
  316. package/dist/index.js +97 -0
  317. package/dist/indicator/Indicator.svelte +47 -0
  318. package/dist/indicator/Indicator.svelte.d.ts +19 -0
  319. package/dist/indicator/index.d.ts +2 -0
  320. package/dist/indicator/index.js +2 -0
  321. package/dist/indicator/theme.d.ts +177 -0
  322. package/dist/indicator/theme.js +114 -0
  323. package/dist/kanban/KanbanBoard.svelte +99 -0
  324. package/dist/kanban/KanbanBoard.svelte.d.ts +4 -0
  325. package/dist/kanban/KanbanCard.svelte +58 -0
  326. package/dist/kanban/KanbanCard.svelte.d.ts +16 -0
  327. package/dist/kanban/index.d.ts +3 -0
  328. package/dist/kanban/index.js +3 -0
  329. package/dist/kanban/theme.d.ts +108 -0
  330. package/dist/kanban/theme.js +43 -0
  331. package/dist/kbd/Kbd.svelte +27 -0
  332. package/dist/kbd/Kbd.svelte.d.ts +13 -0
  333. package/dist/kbd/index.d.ts +2 -0
  334. package/dist/kbd/index.js +2 -0
  335. package/dist/kbd/theme.d.ts +1 -0
  336. package/dist/kbd/theme.js +4 -0
  337. package/dist/list-group/Listgroup.svelte +71 -0
  338. package/dist/list-group/Listgroup.svelte.d.ts +21 -0
  339. package/dist/list-group/ListgroupItem.svelte +61 -0
  340. package/dist/list-group/ListgroupItem.svelte.d.ts +20 -0
  341. package/dist/list-group/index.d.ts +3 -0
  342. package/dist/list-group/index.js +3 -0
  343. package/dist/list-group/theme.d.ts +86 -0
  344. package/dist/list-group/theme.js +67 -0
  345. package/dist/mega-menu/MegaMenu.svelte +53 -0
  346. package/dist/mega-menu/MegaMenu.svelte.d.ts +20 -0
  347. package/dist/mega-menu/index.d.ts +2 -0
  348. package/dist/mega-menu/index.js +2 -0
  349. package/dist/mega-menu/theme.d.ts +46 -0
  350. package/dist/mega-menu/theme.js +24 -0
  351. package/dist/modal/Modal.svelte +107 -0
  352. package/dist/modal/Modal.svelte.d.ts +29 -0
  353. package/dist/modal/index.d.ts +2 -0
  354. package/dist/modal/index.js +2 -0
  355. package/dist/modal/theme.d.ts +82 -0
  356. package/dist/modal/theme.js +42 -0
  357. package/dist/navbar/Menu.svelte +46 -0
  358. package/dist/navbar/Menu.svelte.d.ts +16 -0
  359. package/dist/navbar/NavBrand.svelte +25 -0
  360. package/dist/navbar/NavBrand.svelte.d.ts +12 -0
  361. package/dist/navbar/NavContainer.svelte +26 -0
  362. package/dist/navbar/NavContainer.svelte.d.ts +14 -0
  363. package/dist/navbar/NavHamburger.svelte +50 -0
  364. package/dist/navbar/NavHamburger.svelte.d.ts +131 -0
  365. package/dist/navbar/NavLi.svelte +62 -0
  366. package/dist/navbar/NavLi.svelte.d.ts +16 -0
  367. package/dist/navbar/NavUl.svelte +108 -0
  368. package/dist/navbar/NavUl.svelte.d.ts +22 -0
  369. package/dist/navbar/Navbar.svelte +59 -0
  370. package/dist/navbar/Navbar.svelte.d.ts +17 -0
  371. package/dist/navbar/index.d.ts +7 -0
  372. package/dist/navbar/index.js +7 -0
  373. package/dist/navbar/theme.d.ts +233 -0
  374. package/dist/navbar/theme.js +160 -0
  375. package/dist/pagination/Pagination.svelte +81 -0
  376. package/dist/pagination/Pagination.svelte.d.ts +19 -0
  377. package/dist/pagination/PaginationButton.svelte +75 -0
  378. package/dist/pagination/PaginationButton.svelte.d.ts +18 -0
  379. package/dist/pagination/PaginationItem.svelte +52 -0
  380. package/dist/pagination/PaginationItem.svelte.d.ts +16 -0
  381. package/dist/pagination/PaginationNav.svelte +149 -0
  382. package/dist/pagination/PaginationNav.svelte.d.ts +28 -0
  383. package/dist/pagination/index.d.ts +5 -0
  384. package/dist/pagination/index.js +5 -0
  385. package/dist/pagination/theme.d.ts +228 -0
  386. package/dist/pagination/theme.js +118 -0
  387. package/dist/popover/Popover.svelte +66 -0
  388. package/dist/popover/Popover.svelte.d.ts +21 -0
  389. package/dist/popover/index.d.ts +2 -0
  390. package/dist/popover/index.js +2 -0
  391. package/dist/popover/theme.d.ts +280 -0
  392. package/dist/popover/theme.js +97 -0
  393. package/dist/progress/Progressbar.svelte +85 -0
  394. package/dist/progress/Progressbar.svelte.d.ts +22 -0
  395. package/dist/progress/Progressradial.svelte +113 -0
  396. package/dist/progress/Progressradial.svelte.d.ts +25 -0
  397. package/dist/progress/index.d.ts +3 -0
  398. package/dist/progress/index.js +3 -0
  399. package/dist/progress/theme.d.ts +570 -0
  400. package/dist/progress/theme.js +214 -0
  401. package/dist/rating/AdvancedRating.svelte +63 -0
  402. package/dist/rating/AdvancedRating.svelte.d.ts +21 -0
  403. package/dist/rating/CustomIcon.svelte +57 -0
  404. package/dist/rating/CustomIcon.svelte.d.ts +21 -0
  405. package/dist/rating/Heart.svelte +60 -0
  406. package/dist/rating/Heart.svelte.d.ts +20 -0
  407. package/dist/rating/Rating.svelte +70 -0
  408. package/dist/rating/Rating.svelte.d.ts +21 -0
  409. package/dist/rating/RatingComment.svelte +73 -0
  410. package/dist/rating/RatingComment.svelte.d.ts +15 -0
  411. package/dist/rating/Review.svelte +119 -0
  412. package/dist/rating/Review.svelte.d.ts +24 -0
  413. package/dist/rating/ScoreRating.svelte +78 -0
  414. package/dist/rating/ScoreRating.svelte.d.ts +14 -0
  415. package/dist/rating/Star.svelte +61 -0
  416. package/dist/rating/Star.svelte.d.ts +20 -0
  417. package/dist/rating/Thumbup.svelte +60 -0
  418. package/dist/rating/Thumbup.svelte.d.ts +20 -0
  419. package/dist/rating/index.d.ts +10 -0
  420. package/dist/rating/index.js +10 -0
  421. package/dist/rating/theme.d.ts +202 -0
  422. package/dist/rating/theme.js +38 -0
  423. package/dist/scroll-spy/ScrollSpy.svelte +276 -0
  424. package/dist/scroll-spy/ScrollSpy.svelte.d.ts +23 -0
  425. package/dist/scroll-spy/index.d.ts +2 -0
  426. package/dist/scroll-spy/index.js +2 -0
  427. package/dist/scroll-spy/theme.d.ts +148 -0
  428. package/dist/scroll-spy/theme.js +66 -0
  429. package/dist/sidebar/Sidebar.svelte +169 -0
  430. package/dist/sidebar/Sidebar.svelte.d.ts +31 -0
  431. package/dist/sidebar/SidebarBrand.svelte +50 -0
  432. package/dist/sidebar/SidebarBrand.svelte.d.ts +17 -0
  433. package/dist/sidebar/SidebarButton.svelte +35 -0
  434. package/dist/sidebar/SidebarButton.svelte.d.ts +14 -0
  435. package/dist/sidebar/SidebarCta.svelte +52 -0
  436. package/dist/sidebar/SidebarCta.svelte.d.ts +18 -0
  437. package/dist/sidebar/SidebarDropdownWrapper.svelte +126 -0
  438. package/dist/sidebar/SidebarDropdownWrapper.svelte.d.ts +26 -0
  439. package/dist/sidebar/SidebarGroup.svelte +23 -0
  440. package/dist/sidebar/SidebarGroup.svelte.d.ts +15 -0
  441. package/dist/sidebar/SidebarItem.svelte +46 -0
  442. package/dist/sidebar/SidebarItem.svelte.d.ts +21 -0
  443. package/dist/sidebar/SidebarWrapper.svelte +15 -0
  444. package/dist/sidebar/SidebarWrapper.svelte.d.ts +9 -0
  445. package/dist/sidebar/index.d.ts +10 -0
  446. package/dist/sidebar/index.js +10 -0
  447. package/dist/sidebar/theme.d.ts +312 -0
  448. package/dist/sidebar/theme.js +81 -0
  449. package/dist/skeleton/CardPlaceholder.svelte +50 -0
  450. package/dist/skeleton/CardPlaceholder.svelte.d.ts +14 -0
  451. package/dist/skeleton/ImagePlaceholder.svelte +81 -0
  452. package/dist/skeleton/ImagePlaceholder.svelte.d.ts +16 -0
  453. package/dist/skeleton/ListPlaceholder.svelte +61 -0
  454. package/dist/skeleton/ListPlaceholder.svelte.d.ts +16 -0
  455. package/dist/skeleton/Skeleton.svelte +51 -0
  456. package/dist/skeleton/Skeleton.svelte.d.ts +14 -0
  457. package/dist/skeleton/TestimonialPlaceholder.svelte +60 -0
  458. package/dist/skeleton/TestimonialPlaceholder.svelte.d.ts +13 -0
  459. package/dist/skeleton/TextPlaceholder.svelte +86 -0
  460. package/dist/skeleton/TextPlaceholder.svelte.d.ts +14 -0
  461. package/dist/skeleton/VideoPlaceholder.svelte +31 -0
  462. package/dist/skeleton/VideoPlaceholder.svelte.d.ts +12 -0
  463. package/dist/skeleton/WidgetPlaceholder.svelte +37 -0
  464. package/dist/skeleton/WidgetPlaceholder.svelte.d.ts +12 -0
  465. package/dist/skeleton/index.d.ts +9 -0
  466. package/dist/skeleton/index.js +9 -0
  467. package/dist/skeleton/theme.d.ts +585 -0
  468. package/dist/skeleton/theme.js +178 -0
  469. package/dist/speed-dial/SpeedDial.svelte +70 -0
  470. package/dist/speed-dial/SpeedDial.svelte.d.ts +21 -0
  471. package/dist/speed-dial/SpeedDialButton.svelte +73 -0
  472. package/dist/speed-dial/SpeedDialButton.svelte.d.ts +20 -0
  473. package/dist/speed-dial/SpeedDialTrigger.svelte +57 -0
  474. package/dist/speed-dial/SpeedDialTrigger.svelte.d.ts +18 -0
  475. package/dist/speed-dial/index.d.ts +4 -0
  476. package/dist/speed-dial/index.js +4 -0
  477. package/dist/speed-dial/theme.d.ts +75 -0
  478. package/dist/speed-dial/theme.js +36 -0
  479. package/dist/spinner/Spinner.svelte +95 -0
  480. package/dist/spinner/Spinner.svelte.d.ts +17 -0
  481. package/dist/spinner/index.d.ts +2 -0
  482. package/dist/spinner/index.js +2 -0
  483. package/dist/spinner/theme.d.ts +120 -0
  484. package/dist/spinner/theme.js +49 -0
  485. package/dist/split-pane/Divider.svelte +50 -0
  486. package/dist/split-pane/Divider.svelte.d.ts +18 -0
  487. package/dist/split-pane/Pane.svelte +55 -0
  488. package/dist/split-pane/Pane.svelte.d.ts +13 -0
  489. package/dist/split-pane/SplitPane.svelte +401 -0
  490. package/dist/split-pane/SplitPane.svelte.d.ts +21 -0
  491. package/dist/split-pane/index.d.ts +4 -0
  492. package/dist/split-pane/index.js +4 -0
  493. package/dist/split-pane/theme.d.ts +65 -0
  494. package/dist/split-pane/theme.js +45 -0
  495. package/dist/step-indicator/StepIndicator.svelte +134 -0
  496. package/dist/step-indicator/StepIndicator.svelte.d.ts +23 -0
  497. package/dist/step-indicator/index.d.ts +2 -0
  498. package/dist/step-indicator/index.js +2 -0
  499. package/dist/step-indicator/theme.d.ts +248 -0
  500. package/dist/step-indicator/theme.js +103 -0
  501. package/dist/stepper/BreadcrumbStepper.svelte +147 -0
  502. package/dist/stepper/BreadcrumbStepper.svelte.d.ts +18 -0
  503. package/dist/stepper/CheckmarkIcon.svelte +92 -0
  504. package/dist/stepper/CheckmarkIcon.svelte.d.ts +18 -0
  505. package/dist/stepper/DetailedStepper.svelte +156 -0
  506. package/dist/stepper/DetailedStepper.svelte.d.ts +19 -0
  507. package/dist/stepper/DoubleArrowIcon.svelte +34 -0
  508. package/dist/stepper/DoubleArrowIcon.svelte.d.ts +15 -0
  509. package/dist/stepper/ProfileCardIcon.svelte +25 -0
  510. package/dist/stepper/ProfileCardIcon.svelte.d.ts +15 -0
  511. package/dist/stepper/ProgressStepper.svelte +162 -0
  512. package/dist/stepper/ProgressStepper.svelte.d.ts +18 -0
  513. package/dist/stepper/Stepper.svelte +119 -0
  514. package/dist/stepper/Stepper.svelte.d.ts +18 -0
  515. package/dist/stepper/TimelineStepper.svelte +122 -0
  516. package/dist/stepper/TimelineStepper.svelte.d.ts +19 -0
  517. package/dist/stepper/VerticalStepper.svelte +122 -0
  518. package/dist/stepper/VerticalStepper.svelte.d.ts +19 -0
  519. package/dist/stepper/index.d.ts +10 -0
  520. package/dist/stepper/index.js +10 -0
  521. package/dist/stepper/theme.d.ts +395 -0
  522. package/dist/stepper/theme.js +175 -0
  523. package/dist/table/Table.svelte +85 -0
  524. package/dist/table/Table.svelte.d.ts +23 -0
  525. package/dist/table/TableBody.svelte +42 -0
  526. package/dist/table/TableBody.svelte.d.ts +14 -0
  527. package/dist/table/TableBodyCell.svelte +35 -0
  528. package/dist/table/TableBodyCell.svelte.d.ts +15 -0
  529. package/dist/table/TableBodyRow.svelte +41 -0
  530. package/dist/table/TableBodyRow.svelte.d.ts +17 -0
  531. package/dist/table/TableHead.svelte +67 -0
  532. package/dist/table/TableHead.svelte.d.ts +19 -0
  533. package/dist/table/TableHeadCell.svelte +27 -0
  534. package/dist/table/TableHeadCell.svelte.d.ts +13 -0
  535. package/dist/table/TableSearch.svelte +121 -0
  536. package/dist/table/TableSearch.svelte.d.ts +29 -0
  537. package/dist/table/index.d.ts +8 -0
  538. package/dist/table/index.js +8 -0
  539. package/dist/table/theme.d.ts +593 -0
  540. package/dist/table/theme.js +440 -0
  541. package/dist/tabs/TabItem.svelte +86 -0
  542. package/dist/tabs/TabItem.svelte.d.ts +22 -0
  543. package/dist/tabs/Tabs.svelte +109 -0
  544. package/dist/tabs/Tabs.svelte.d.ts +19 -0
  545. package/dist/tabs/index.d.ts +3 -0
  546. package/dist/tabs/index.js +3 -0
  547. package/dist/tabs/theme.d.ts +135 -0
  548. package/dist/tabs/theme.js +83 -0
  549. package/dist/theme/ThemeProvider.svelte +37 -0
  550. package/dist/theme/ThemeProvider.svelte.d.ts +17 -0
  551. package/dist/theme/index.d.ts +8 -0
  552. package/dist/theme/index.js +2 -0
  553. package/dist/theme/themeUtils.d.ts +24 -0
  554. package/dist/theme/themeUtils.js +74 -0
  555. package/dist/theme/themes.d.ts +78 -0
  556. package/dist/theme/themes.js +84 -0
  557. package/dist/timeline/Activity.svelte +25 -0
  558. package/dist/timeline/Activity.svelte.d.ts +13 -0
  559. package/dist/timeline/ActivityItem.svelte +81 -0
  560. package/dist/timeline/ActivityItem.svelte.d.ts +22 -0
  561. package/dist/timeline/Group.svelte +51 -0
  562. package/dist/timeline/Group.svelte.d.ts +18 -0
  563. package/dist/timeline/GroupItem.svelte +90 -0
  564. package/dist/timeline/GroupItem.svelte.d.ts +19 -0
  565. package/dist/timeline/Timeline.svelte +30 -0
  566. package/dist/timeline/Timeline.svelte.d.ts +14 -0
  567. package/dist/timeline/TimelineItem.svelte +156 -0
  568. package/dist/timeline/TimelineItem.svelte.d.ts +28 -0
  569. package/dist/timeline/index.d.ts +7 -0
  570. package/dist/timeline/index.js +7 -0
  571. package/dist/timeline/theme.d.ts +367 -0
  572. package/dist/timeline/theme.js +287 -0
  573. package/dist/toast/Toast.svelte +97 -0
  574. package/dist/toast/Toast.svelte.d.ts +24 -0
  575. package/dist/toast/ToastContainer.svelte +35 -0
  576. package/dist/toast/ToastContainer.svelte.d.ts +14 -0
  577. package/dist/toast/index.d.ts +3 -0
  578. package/dist/toast/index.js +3 -0
  579. package/dist/toast/theme.d.ts +323 -0
  580. package/dist/toast/theme.js +103 -0
  581. package/dist/toolbar/Toolbar.svelte +64 -0
  582. package/dist/toolbar/Toolbar.svelte.d.ts +17 -0
  583. package/dist/toolbar/ToolbarButton.svelte +46 -0
  584. package/dist/toolbar/ToolbarButton.svelte.d.ts +17 -0
  585. package/dist/toolbar/ToolbarGroup.svelte +35 -0
  586. package/dist/toolbar/ToolbarGroup.svelte.d.ts +16 -0
  587. package/dist/toolbar/index.d.ts +4 -0
  588. package/dist/toolbar/index.js +4 -0
  589. package/dist/toolbar/theme.d.ts +320 -0
  590. package/dist/toolbar/theme.js +155 -0
  591. package/dist/tooltip/Tooltip.svelte +51 -0
  592. package/dist/tooltip/Tooltip.svelte.d.ts +20 -0
  593. package/dist/tooltip/index.d.ts +2 -0
  594. package/dist/tooltip/index.js +2 -0
  595. package/dist/tooltip/theme.d.ts +90 -0
  596. package/dist/tooltip/theme.js +45 -0
  597. package/dist/tour/Tour.svelte +268 -0
  598. package/dist/tour/Tour.svelte.d.ts +4 -0
  599. package/dist/tour/index.d.ts +2 -0
  600. package/dist/tour/index.js +2 -0
  601. package/dist/tour/theme.d.ts +214 -0
  602. package/dist/tour/theme.js +79 -0
  603. package/dist/types.d.ts +2058 -0
  604. package/dist/types.js +1 -0
  605. package/dist/typography/a/A.svelte +55 -0
  606. package/dist/typography/a/A.svelte.d.ts +17 -0
  607. package/dist/typography/a/index.d.ts +2 -0
  608. package/dist/typography/a/index.js +2 -0
  609. package/dist/typography/a/theme.d.ts +72 -0
  610. package/dist/typography/a/theme.js +29 -0
  611. package/dist/typography/blockquote/Blockquote.svelte +41 -0
  612. package/dist/typography/blockquote/Blockquote.svelte.d.ts +18 -0
  613. package/dist/typography/blockquote/index.d.ts +2 -0
  614. package/dist/typography/blockquote/index.js +2 -0
  615. package/dist/typography/blockquote/theme.d.ts +102 -0
  616. package/dist/typography/blockquote/theme.js +45 -0
  617. package/dist/typography/descriptionlist/DescriptionList.svelte +33 -0
  618. package/dist/typography/descriptionlist/DescriptionList.svelte.d.ts +14 -0
  619. package/dist/typography/descriptionlist/index.d.ts +2 -0
  620. package/dist/typography/descriptionlist/index.js +2 -0
  621. package/dist/typography/descriptionlist/theme.d.ts +18 -0
  622. package/dist/typography/descriptionlist/theme.js +12 -0
  623. package/dist/typography/heading/Heading.svelte +28 -0
  624. package/dist/typography/heading/Heading.svelte.d.ts +14 -0
  625. package/dist/typography/heading/index.d.ts +2 -0
  626. package/dist/typography/heading/index.js +2 -0
  627. package/dist/typography/heading/theme.d.ts +30 -0
  628. package/dist/typography/heading/theme.js +17 -0
  629. package/dist/typography/hr/Hr.svelte +59 -0
  630. package/dist/typography/hr/Hr.svelte.d.ts +16 -0
  631. package/dist/typography/hr/index.d.ts +2 -0
  632. package/dist/typography/hr/index.js +2 -0
  633. package/dist/typography/hr/theme.d.ts +40 -0
  634. package/dist/typography/hr/theme.js +20 -0
  635. package/dist/typography/img/Img.svelte +78 -0
  636. package/dist/typography/img/Img.svelte.d.ts +21 -0
  637. package/dist/typography/img/index.d.ts +2 -0
  638. package/dist/typography/img/index.js +2 -0
  639. package/dist/typography/img/theme.d.ts +211 -0
  640. package/dist/typography/img/theme.js +42 -0
  641. package/dist/typography/layout/Layout.svelte +27 -0
  642. package/dist/typography/layout/Layout.svelte.d.ts +13 -0
  643. package/dist/typography/layout/index.d.ts +2 -0
  644. package/dist/typography/layout/index.js +2 -0
  645. package/dist/typography/layout/theme.d.ts +1 -0
  646. package/dist/typography/layout/theme.js +4 -0
  647. package/dist/typography/list/Li.svelte +27 -0
  648. package/dist/typography/list/Li.svelte.d.ts +14 -0
  649. package/dist/typography/list/List.svelte +48 -0
  650. package/dist/typography/list/List.svelte.d.ts +17 -0
  651. package/dist/typography/list/index.d.ts +3 -0
  652. package/dist/typography/list/index.js +3 -0
  653. package/dist/typography/list/theme.d.ts +33 -0
  654. package/dist/typography/list/theme.js +19 -0
  655. package/dist/typography/mark/Mark.svelte +25 -0
  656. package/dist/typography/mark/Mark.svelte.d.ts +13 -0
  657. package/dist/typography/mark/index.d.ts +2 -0
  658. package/dist/typography/mark/index.js +2 -0
  659. package/dist/typography/mark/theme.d.ts +1 -0
  660. package/dist/typography/mark/theme.js +4 -0
  661. package/dist/typography/paragraph/P.svelte +49 -0
  662. package/dist/typography/paragraph/P.svelte.d.ts +22 -0
  663. package/dist/typography/paragraph/index.d.ts +2 -0
  664. package/dist/typography/paragraph/index.js +2 -0
  665. package/dist/typography/paragraph/theme.d.ts +225 -0
  666. package/dist/typography/paragraph/theme.js +79 -0
  667. package/dist/typography/secondary/Secondary.svelte +25 -0
  668. package/dist/typography/secondary/Secondary.svelte.d.ts +13 -0
  669. package/dist/typography/secondary/index.d.ts +2 -0
  670. package/dist/typography/secondary/index.js +2 -0
  671. package/dist/typography/secondary/theme.d.ts +1 -0
  672. package/dist/typography/secondary/theme.js +4 -0
  673. package/dist/typography/span/Span.svelte +51 -0
  674. package/dist/typography/span/Span.svelte.d.ts +22 -0
  675. package/dist/typography/span/index.d.ts +2 -0
  676. package/dist/typography/span/index.js +2 -0
  677. package/dist/typography/span/theme.d.ts +246 -0
  678. package/dist/typography/span/theme.js +88 -0
  679. package/dist/uiHelpers.svelte.d.ts +10 -0
  680. package/dist/uiHelpers.svelte.js +50 -0
  681. package/dist/utils/Arrow.svelte +63 -0
  682. package/dist/utils/Arrow.svelte.d.ts +13 -0
  683. package/dist/utils/CloseButton.svelte +67 -0
  684. package/dist/utils/CloseButton.svelte.d.ts +19 -0
  685. package/dist/utils/Popper.svelte +289 -0
  686. package/dist/utils/Popper.svelte.d.ts +31 -0
  687. package/dist/utils/actions.d.ts +16 -0
  688. package/dist/utils/actions.js +107 -0
  689. package/dist/utils/countdown.svelte.d.ts +8 -0
  690. package/dist/utils/countdown.svelte.js +64 -0
  691. package/dist/utils/debounce.d.ts +17 -0
  692. package/dist/utils/debounce.js +41 -0
  693. package/dist/utils/dismissable.d.ts +9 -0
  694. package/dist/utils/dismissable.js +16 -0
  695. package/dist/utils/index.d.ts +8 -0
  696. package/dist/utils/index.js +14 -0
  697. package/dist/utils/nonPassiveTouch.d.ts +3 -0
  698. package/dist/utils/nonPassiveTouch.js +8 -0
  699. package/dist/utils/responsive.svelte +111 -0
  700. package/dist/utils/responsive.svelte.d.ts +45 -0
  701. package/dist/utils/singleselection.svelte.d.ts +15 -0
  702. package/dist/utils/singleselection.svelte.js +52 -0
  703. package/dist/utils/theme.d.ts +100 -0
  704. package/dist/utils/theme.js +69 -0
  705. package/dist/video/Video.svelte +34 -0
  706. package/dist/video/Video.svelte.d.ts +18 -0
  707. package/dist/video/index.d.ts +1 -0
  708. package/dist/video/index.js +1 -0
  709. package/dist/virtual-masonry/VirtualMasonry.svelte +185 -0
  710. package/dist/virtual-masonry/VirtualMasonry.svelte.d.ts +44 -0
  711. package/dist/virtual-masonry/index.d.ts +3 -0
  712. package/dist/virtual-masonry/index.js +2 -0
  713. package/dist/virtual-masonry/theme.d.ts +40 -0
  714. package/dist/virtual-masonry/theme.js +18 -0
  715. package/dist/virtuallist/VirtualList.svelte +145 -0
  716. package/dist/virtuallist/VirtualList.svelte.d.ts +42 -0
  717. package/dist/virtuallist/index.d.ts +2 -0
  718. package/dist/virtuallist/index.js +2 -0
  719. package/dist/virtuallist/theme.d.ts +40 -0
  720. package/dist/virtuallist/theme.js +18 -0
  721. package/package.json +917 -0
@@ -0,0 +1,401 @@
1
+ <script lang="ts">
2
+ import type { SplitPaneProps } from "../types";
3
+ import { setSplitPaneContext } from "../context";
4
+ import { splitpane } from "./theme";
5
+ import { getTheme } from "../theme/themeUtils";
6
+ import clsx from "clsx";
7
+
8
+ let {
9
+ direction = "horizontal",
10
+ minSize = 100,
11
+ responsive = true,
12
+ breakpoint = 768,
13
+ transition: transitionProp = true,
14
+ transitionDuration = 150,
15
+ keyboardStep = 2,
16
+ initialSizes,
17
+ onResize,
18
+ children,
19
+ class: className = ""
20
+ }: SplitPaneProps = $props();
21
+
22
+ const TOLERANCE = 0.5; // For pixel comparisons (minSize - TOLERANCE)
23
+ const MIN_CHANGE_THRESHOLD = 0.01; // For percentage changes (size deltas)
24
+ const MIN_DELTA = 1; // For mouse movement (Math.abs(delta) < MIN_DELTA)
25
+
26
+ // Validate numeric props
27
+ $effect(() => {
28
+ if (minSize <= 0) {
29
+ console.warn(`minSize must be positive, got ${minSize}.`);
30
+ }
31
+ if (keyboardStep <= 0) {
32
+ console.warn(`keyboardStep must be positive, got ${keyboardStep}.`);
33
+ }
34
+ });
35
+
36
+ let transition = $derived(transitionProp);
37
+ $effect(() => {
38
+ // syncing local transition state with prop changes
39
+ if (!isDragging) {
40
+ transition = transitionProp;
41
+ }
42
+ });
43
+ const theme = $derived(getTheme("splitpane"));
44
+
45
+ let isDragging = $state(false);
46
+ let startPos = $state(0);
47
+ let sizes = $state<number[]>([]);
48
+ let container: HTMLDivElement;
49
+ let currentDirection = $derived(direction);
50
+ let registeredPanes = $state(0);
51
+
52
+ // Register panes as they mount
53
+ function registerPane(): number {
54
+ const index = registeredPanes;
55
+ registeredPanes++;
56
+ return index;
57
+ }
58
+
59
+ function getPaneStyle(index: number): string {
60
+ if (sizes[index] === undefined) return "";
61
+
62
+ const size = `${sizes[index]}%`;
63
+ const transitionStyle = transition ? `${currentDirection === "horizontal" ? "width" : "height"} ${transitionDuration}ms ease` : "none";
64
+
65
+ if (currentDirection === "horizontal") {
66
+ return `width: ${size}; height: 100%; transition: ${transitionStyle};`;
67
+ } else {
68
+ return `height: ${size}; width: 100%; transition: ${transitionStyle};`;
69
+ }
70
+ }
71
+
72
+ function shouldRenderDivider(paneIndex: number): boolean {
73
+ return paneIndex < registeredPanes - 1;
74
+ }
75
+
76
+ // Set context for child Pane components
77
+ setSplitPaneContext({
78
+ registerPane,
79
+ getPaneStyle,
80
+ getPaneSize: (index: number) => sizes[index] ?? (registeredPanes > 0 ? 100 / registeredPanes : 0),
81
+ shouldRenderDivider,
82
+ getDirection: () => currentDirection,
83
+ getIsDragging: () => isDragging,
84
+ onMouseDown: startResize,
85
+ onTouchStart: startTouchResize,
86
+ onKeyDown: handleKeyResize
87
+ });
88
+
89
+ let containerSize = $state(0);
90
+
91
+ // Track container size changes
92
+ $effect(() => {
93
+ if (!container) return;
94
+
95
+ const updateSize = () => {
96
+ containerSize = currentDirection === "horizontal" ? container.offsetWidth : container.offsetHeight;
97
+ };
98
+
99
+ updateSize();
100
+
101
+ const resizeObserver = new ResizeObserver(updateSize);
102
+ resizeObserver.observe(container);
103
+
104
+ return () => resizeObserver.disconnect();
105
+ });
106
+
107
+ // Initialize and maintain sizes
108
+ $effect(() => {
109
+ if (registeredPanes === 0) {
110
+ sizes = [];
111
+ return;
112
+ }
113
+
114
+ // If container not ready yet, use equal distribution
115
+ if (containerSize < 1) {
116
+ if (sizes.length !== registeredPanes) {
117
+ const equal = 100 / registeredPanes;
118
+ sizes = Array.from({ length: registeredPanes }, () => equal);
119
+ }
120
+ return;
121
+ }
122
+
123
+ const minPercent = (minSize / containerSize) * 100;
124
+
125
+ // Check if minSize is achievable for all panes
126
+ const totalMinRequired = minPercent * registeredPanes;
127
+ if (totalMinRequired > 100) {
128
+ console.error(
129
+ `Cannot satisfy minSize=${minSize}px for ${registeredPanes} panes in ${containerSize}px container. ` + `Required: ${(minSize * registeredPanes).toFixed(0)}px. Using equal distribution.`
130
+ );
131
+ const equal = 100 / registeredPanes;
132
+ sizes = Array.from({ length: registeredPanes }, () => equal);
133
+ return;
134
+ }
135
+
136
+ // Check if current sizes violate minSize constraints
137
+ const currentPixelSizes = sizes.map((s) => (s / 100) * containerSize);
138
+ const violatesMinSize = currentPixelSizes.some((pixelSize) => pixelSize < minSize - TOLERANCE); // small tolerance
139
+
140
+ if (violatesMinSize) {
141
+ // Recalculate sizes to respect minSize
142
+ let newSizes = sizes.map((s) => Math.max((s / 100) * containerSize, minSize));
143
+ const totalPixels = newSizes.reduce((a, b) => a + b, 0);
144
+
145
+ // Convert back to percentages
146
+ if (totalPixels > containerSize) {
147
+ // If we can't fit all panes at minSize, distribute proportionally
148
+ newSizes = newSizes.map((s) => (s / totalPixels) * containerSize);
149
+ }
150
+
151
+ sizes = newSizes.map((pixelSize) => (pixelSize / containerSize) * 100);
152
+ }
153
+
154
+ // Handle initialSizes (only on first initialization)
155
+ if (initialSizes && initialSizes.length === registeredPanes && sizes.length !== registeredPanes) {
156
+ const hasInvalidValues = initialSizes.some((s) => s < 0 || !isFinite(s));
157
+
158
+ if (hasInvalidValues) {
159
+ console.warn("initialSizes contains invalid values. Using equal distribution.");
160
+ const equal = Math.max(100 / registeredPanes, minPercent);
161
+ sizes = Array.from({ length: registeredPanes }, () => equal);
162
+ return;
163
+ }
164
+
165
+ const sum = initialSizes.reduce((a, b) => a + b, 0);
166
+
167
+ if (sum <= 0 || sum < 0.01) {
168
+ console.warn("initialSizes sum to zero. Using equal distribution.");
169
+ const equal = Math.max(100 / registeredPanes, minPercent);
170
+ sizes = Array.from({ length: registeredPanes }, () => equal);
171
+ return;
172
+ }
173
+
174
+ let normalizedSizes = initialSizes.map((s) => (s / sum) * 100);
175
+
176
+ const violatesConstraints = normalizedSizes.some((size) => size < minPercent);
177
+
178
+ if (violatesConstraints) {
179
+ console.warn(
180
+ `initialSizes [${normalizedSizes.map((s) => s.toFixed(1)).join("%, ")}%] ` +
181
+ `violate minSize constraint (${minSize}px = ${minPercent.toFixed(1)}%). ` +
182
+ `Adjusting to respect minimum constraints.`
183
+ );
184
+
185
+ normalizedSizes = normalizedSizes.map((size) => Math.max(size, minPercent));
186
+ const newSum = normalizedSizes.reduce((a, b) => a + b, 0);
187
+ normalizedSizes = normalizedSizes.map((size) => (size / newSum) * 100);
188
+ }
189
+
190
+ sizes = normalizedSizes;
191
+ return;
192
+ }
193
+
194
+ // Default: equal distribution respecting minSize
195
+ if (sizes.length !== registeredPanes) {
196
+ const equal = Math.max(100 / registeredPanes, minPercent);
197
+ sizes = Array.from({ length: registeredPanes }, () => equal);
198
+ }
199
+ });
200
+
201
+ // Responsive direction handling
202
+ $effect(() => {
203
+ if (!responsive) {
204
+ currentDirection = direction;
205
+ return;
206
+ }
207
+
208
+ if (typeof window === "undefined") {
209
+ currentDirection = direction;
210
+ return;
211
+ }
212
+
213
+ const mq = window.matchMedia(`(max-width: ${breakpoint}px)`);
214
+
215
+ const handleResize = () => {
216
+ // deferring the direction switch until the drag completes
217
+ if (!isDragging) {
218
+ currentDirection = mq.matches ? "vertical" : "horizontal";
219
+ }
220
+ };
221
+
222
+ handleResize();
223
+ mq.addEventListener("change", handleResize);
224
+
225
+ return () => mq.removeEventListener("change", handleResize);
226
+ });
227
+
228
+ // Notify parent of size changes
229
+ $effect(() => {
230
+ if (sizes.length > 0 && onResize) {
231
+ onResize(sizes);
232
+ }
233
+ });
234
+
235
+ function startResize(e: MouseEvent, index: number) {
236
+ e.preventDefault();
237
+ isDragging = true;
238
+ transition = false;
239
+ startPos = currentDirection === "horizontal" ? e.clientX : e.clientY;
240
+
241
+ const moveHandler = (ev: MouseEvent) => resize(ev, index);
242
+ const upHandler = () => stopResize(moveHandler, upHandler);
243
+
244
+ window.addEventListener("mousemove", moveHandler);
245
+ window.addEventListener("mouseup", upHandler);
246
+
247
+ document.body.style.cursor = currentDirection === "horizontal" ? "col-resize" : "row-resize";
248
+ document.body.style.userSelect = "none";
249
+ }
250
+
251
+ function stopResize(moveHandler: (e: MouseEvent) => void, upHandler: () => void) {
252
+ isDragging = false;
253
+ transition = transitionProp;
254
+ window.removeEventListener("mousemove", moveHandler);
255
+ window.removeEventListener("mouseup", upHandler);
256
+
257
+ document.body.style.cursor = "";
258
+ document.body.style.userSelect = "";
259
+ }
260
+
261
+ function startTouchResize(e: TouchEvent, index: number) {
262
+ e.preventDefault();
263
+ isDragging = true;
264
+ transition = false;
265
+
266
+ const touch = e.touches[0];
267
+ startPos = currentDirection === "horizontal" ? touch.clientX : touch.clientY;
268
+
269
+ const moveHandler = (ev: TouchEvent) => resizeTouch(ev, index);
270
+ const endHandler = () => stopTouchResize(moveHandler, endHandler);
271
+
272
+ window.addEventListener("touchmove", moveHandler, { passive: false });
273
+ window.addEventListener("touchend", endHandler);
274
+ window.addEventListener("touchcancel", endHandler);
275
+
276
+ document.body.style.userSelect = "none";
277
+ }
278
+
279
+ function stopTouchResize(moveHandler: (e: TouchEvent) => void, endHandler: () => void) {
280
+ isDragging = false;
281
+ transition = transitionProp;
282
+ window.removeEventListener("touchmove", moveHandler);
283
+ window.removeEventListener("touchend", endHandler);
284
+ window.removeEventListener("touchcancel", endHandler);
285
+
286
+ document.body.style.userSelect = "";
287
+ }
288
+
289
+ function clampPaneSizes(index: number, targetSize: number, minPercent: number, total: number): boolean {
290
+ if (index < 0 || index + 1 >= sizes.length) return false;
291
+
292
+ let newSize1 = Math.min(total - minPercent, Math.max(minPercent, targetSize));
293
+ let newSize2 = total - newSize1;
294
+
295
+ if (newSize2 < minPercent) {
296
+ newSize2 = minPercent;
297
+ newSize1 = total - newSize2;
298
+ }
299
+
300
+ if (Math.abs(newSize1 - sizes[index]) > MIN_CHANGE_THRESHOLD) {
301
+ sizes[index] = newSize1;
302
+ sizes[index + 1] = newSize2;
303
+ return true;
304
+ }
305
+
306
+ return false;
307
+ }
308
+
309
+ function applyResize(currentPos: number, index: number) {
310
+ if (!isDragging || !container) return;
311
+ if (index < 0 || index + 1 >= sizes.length) return;
312
+
313
+ const delta = currentPos - startPos;
314
+ if (Math.abs(delta) < MIN_DELTA) return;
315
+
316
+ const currentContainerSize = currentDirection === "horizontal" ? container.offsetWidth : container.offsetHeight;
317
+ if (currentContainerSize < 1) return;
318
+
319
+ const deltaPercent = (delta / currentContainerSize) * 100;
320
+ const minPercent = (minSize / currentContainerSize) * 100;
321
+
322
+ const oldSize1 = sizes[index];
323
+ const oldSize2 = sizes[index + 1];
324
+ const totalSize = oldSize1 + oldSize2;
325
+
326
+ const targetSize = oldSize1 + deltaPercent;
327
+
328
+ if (clampPaneSizes(index, targetSize, minPercent, totalSize)) {
329
+ startPos = currentPos;
330
+ }
331
+ }
332
+
333
+ function handleKeyResize(e: KeyboardEvent, index: number) {
334
+ if (!container) return;
335
+ if (index < 0 || index + 1 >= sizes.length) return;
336
+
337
+ const isHorizontal = currentDirection === "horizontal";
338
+ const increaseKeys = isHorizontal ? ["ArrowRight"] : ["ArrowDown"];
339
+ const decreaseKeys = isHorizontal ? ["ArrowLeft"] : ["ArrowUp"];
340
+
341
+ const containerSize = isHorizontal ? container.offsetWidth : container.offsetHeight;
342
+ if (containerSize < 1) return;
343
+
344
+ const minPercent = (minSize / containerSize) * 100;
345
+ const total = sizes[index] + sizes[index + 1];
346
+
347
+ let handled = false;
348
+
349
+ if (increaseKeys.includes(e.key)) {
350
+ const targetSize = sizes[index] + keyboardStep;
351
+ handled = clampPaneSizes(index, targetSize, minPercent, total);
352
+ } else if (decreaseKeys.includes(e.key)) {
353
+ const targetSize = sizes[index] - keyboardStep;
354
+ handled = clampPaneSizes(index, targetSize, minPercent, total);
355
+ } else if (e.key === "Enter" || e.key === " ") {
356
+ // Reset to equal sizes
357
+ const equal = 100 / registeredPanes;
358
+ sizes = sizes.map(() => equal);
359
+ handled = true;
360
+ }
361
+
362
+ if (handled) {
363
+ e.preventDefault();
364
+ }
365
+ }
366
+
367
+ function resize(e: MouseEvent, index: number) {
368
+ const currentPos = currentDirection === "horizontal" ? e.clientX : e.clientY;
369
+ applyResize(currentPos, index);
370
+ }
371
+
372
+ function resizeTouch(e: TouchEvent, index: number) {
373
+ e.preventDefault(); // Prevent scrolling while dragging
374
+ const touch = e.touches[0];
375
+ const currentPos = currentDirection === "horizontal" ? touch.clientX : touch.clientY;
376
+ applyResize(currentPos, index);
377
+ }
378
+ </script>
379
+
380
+ <div bind:this={container} class={splitpane({ direction: currentDirection, class: clsx(theme, className) })}>
381
+ {@render children()}
382
+ </div>
383
+
384
+ <!--
385
+ @component
386
+ [Go to docs](https://flowbite-svelte.com/)
387
+ ## Type
388
+ [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2239)
389
+ ## Props
390
+ @prop direction = "horizontal"
391
+ @prop minSize = 100
392
+ @prop responsive = true
393
+ @prop breakpoint = 768
394
+ @prop transition: transitionProp = true
395
+ @prop transitionDuration = 150
396
+ @prop keyboardStep = 2
397
+ @prop initialSizes
398
+ @prop onResize
399
+ @prop children
400
+ @prop class: className = ""
401
+ -->
@@ -0,0 +1,21 @@
1
+ import type { SplitPaneProps } from "../types";
2
+ /**
3
+ * [Go to docs](https://flowbite-svelte.com/)
4
+ * ## Type
5
+ * [SplitPaneProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L2239)
6
+ * ## Props
7
+ * @prop direction = "horizontal"
8
+ * @prop minSize = 100
9
+ * @prop responsive = true
10
+ * @prop breakpoint = 768
11
+ * @prop transition: transitionProp = true
12
+ * @prop transitionDuration = 150
13
+ * @prop keyboardStep = 2
14
+ * @prop initialSizes
15
+ * @prop onResize
16
+ * @prop children
17
+ * @prop class: className = ""
18
+ */
19
+ declare const SplitPane: import("svelte").Component<SplitPaneProps, {}, "">;
20
+ type SplitPane = ReturnType<typeof SplitPane>;
21
+ export default SplitPane;
@@ -0,0 +1,4 @@
1
+ export { default as SplitPane } from "./SplitPane.svelte";
2
+ export { default as Pane } from "./Pane.svelte";
3
+ export { default as Divider } from "./Divider.svelte";
4
+ export { splitpane, pane, divider, dividerHitArea } from "./theme";
@@ -0,0 +1,4 @@
1
+ export { default as SplitPane } from "./SplitPane.svelte";
2
+ export { default as Pane } from "./Pane.svelte";
3
+ export { default as Divider } from "./Divider.svelte";
4
+ export { splitpane, pane, divider, dividerHitArea } from "./theme";
@@ -0,0 +1,65 @@
1
+ import { type VariantProps } from "tailwind-variants";
2
+ export type SplitPaneVariants = VariantProps<typeof splitpane>;
3
+ export type PaneVariants = VariantProps<typeof pane>;
4
+ export type DividerVariants = VariantProps<typeof divider>;
5
+ export declare const splitpane: import("tailwind-variants").TVReturnType<{
6
+ direction: {
7
+ horizontal: string;
8
+ vertical: string;
9
+ };
10
+ }, undefined, "relative flex h-full w-full overflow-hidden select-none", {
11
+ direction: {
12
+ horizontal: string;
13
+ vertical: string;
14
+ };
15
+ }, undefined, import("tailwind-variants").TVReturnType<{
16
+ direction: {
17
+ horizontal: string;
18
+ vertical: string;
19
+ };
20
+ }, undefined, "relative flex h-full w-full overflow-hidden select-none", unknown, unknown, undefined>>;
21
+ export declare const pane: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "flex flex-col relative overflow-hidden shrink-0 min-w-0 min-h-0", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "flex flex-col relative overflow-hidden shrink-0 min-w-0 min-h-0", unknown, unknown, undefined>>;
22
+ export declare const divider: import("tailwind-variants").TVReturnType<{
23
+ direction: {
24
+ horizontal: string;
25
+ vertical: string;
26
+ };
27
+ isDragging: {
28
+ true: string;
29
+ false: string;
30
+ };
31
+ }, undefined, "bg-gray-300 shrink-0 relative z-10 transition-colors duration-200 hover:bg-gray-400 focus:bg-gray-400 focus:outline focus:outline-2 focus:outline-blue-500 focus:-outline-offset-2", {
32
+ direction: {
33
+ horizontal: string;
34
+ vertical: string;
35
+ };
36
+ isDragging: {
37
+ true: string;
38
+ false: string;
39
+ };
40
+ }, undefined, import("tailwind-variants").TVReturnType<{
41
+ direction: {
42
+ horizontal: string;
43
+ vertical: string;
44
+ };
45
+ isDragging: {
46
+ true: string;
47
+ false: string;
48
+ };
49
+ }, undefined, "bg-gray-300 shrink-0 relative z-10 transition-colors duration-200 hover:bg-gray-400 focus:bg-gray-400 focus:outline focus:outline-2 focus:outline-blue-500 focus:-outline-offset-2", unknown, unknown, undefined>>;
50
+ export declare const dividerHitArea: import("tailwind-variants").TVReturnType<{
51
+ direction: {
52
+ horizontal: string;
53
+ vertical: string;
54
+ };
55
+ }, undefined, "absolute bg-transparent", {
56
+ direction: {
57
+ horizontal: string;
58
+ vertical: string;
59
+ };
60
+ }, undefined, import("tailwind-variants").TVReturnType<{
61
+ direction: {
62
+ horizontal: string;
63
+ vertical: string;
64
+ };
65
+ }, undefined, "absolute bg-transparent", unknown, unknown, undefined>>;
@@ -0,0 +1,45 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const splitpane = tv({
3
+ base: "relative flex h-full w-full overflow-hidden select-none",
4
+ variants: {
5
+ direction: {
6
+ horizontal: "",
7
+ vertical: "flex-col"
8
+ }
9
+ },
10
+ defaultVariants: {
11
+ direction: "horizontal"
12
+ }
13
+ });
14
+ export const pane = tv({
15
+ base: "flex flex-col relative overflow-hidden shrink-0 min-w-0 min-h-0"
16
+ });
17
+ export const divider = tv({
18
+ base: "bg-gray-300 shrink-0 relative z-10 transition-colors duration-200 hover:bg-gray-400 focus:bg-gray-400 focus:outline focus:outline-2 focus:outline-blue-500 focus:-outline-offset-2",
19
+ variants: {
20
+ direction: {
21
+ horizontal: "w-1 cursor-col-resize",
22
+ vertical: "h-1 cursor-row-resize"
23
+ },
24
+ isDragging: {
25
+ true: "bg-blue-500",
26
+ false: ""
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ direction: "horizontal",
31
+ isDragging: false
32
+ }
33
+ });
34
+ export const dividerHitArea = tv({
35
+ base: "absolute bg-transparent",
36
+ variants: {
37
+ direction: {
38
+ horizontal: "w-3 h-full -left-1 top-0",
39
+ vertical: "h-3 w-full -top-1 left-0"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ direction: "horizontal"
44
+ }
45
+ });
@@ -0,0 +1,134 @@
1
+ <script lang="ts">
2
+ import clsx from "clsx";
3
+ import type { StepIndicatorProps } from "../types";
4
+ import { stepIndicator, getStepStateClasses, type StepIndicatorTheme } from "./theme";
5
+ import { getTheme } from "../theme/themeUtils";
6
+
7
+ let {
8
+ steps = ["Step 1", "Step 2", "Step 3", "Step 4", "Step 5"],
9
+ currentStep = $bindable(1),
10
+ size = $bindable("md"),
11
+ color = $bindable("primary"),
12
+ glow = false,
13
+ hideLabel = false,
14
+ clickable = true,
15
+ completedCustom = "",
16
+ currentCustom = "",
17
+ onStepClick,
18
+ class: className,
19
+ classes,
20
+ ...restProps
21
+ }: StepIndicatorProps = $props();
22
+
23
+ const theme = $derived(getTheme("stepIndicator"));
24
+
25
+ const { base, label, container, wrapper, step: stepCls, glow: stepGlow, incomplete } = $derived(stepIndicator({ size, color, glow, hideLabel }));
26
+
27
+ // Ensure currentStep is within bounds
28
+ let safeCurrentStep = $derived(Math.max(1, Math.min(currentStep, steps.length)));
29
+ let currentStepLabel = $derived(steps[safeCurrentStep - 1] ?? "Unknown Step");
30
+
31
+ // Handle step click
32
+ function handleStepClick(stepIndex: number) {
33
+ if (!clickable || stepIndex < 0 || stepIndex >= steps.length) return;
34
+
35
+ const next = stepIndex + 1;
36
+ if (next === currentStep) return;
37
+
38
+ const last = currentStep;
39
+ currentStep = next;
40
+
41
+ if (onStepClick) {
42
+ onStepClick({ current: currentStep, last });
43
+ }
44
+ }
45
+
46
+ // Handle custom colors if provided
47
+ const getCustomStepClass = (stepIndex: number) => {
48
+ if (color !== "custom") return "";
49
+
50
+ if (stepIndex === currentStep - 1) {
51
+ return currentCustom;
52
+ } else if (stepIndex < currentStep - 1) {
53
+ return completedCustom;
54
+ }
55
+ return "";
56
+ };
57
+ </script>
58
+
59
+ <div {...restProps} class={base({ class: clsx((theme as StepIndicatorTheme)?.base, className) })}>
60
+ {#if !hideLabel}
61
+ <h3 class={label({ class: clsx((theme as StepIndicatorTheme)?.label, classes?.label) })}>{currentStepLabel}</h3>
62
+ {/if}
63
+
64
+ <div class={container({ class: clsx((theme as StepIndicatorTheme)?.container, classes?.container) })}>
65
+ {#each steps as _step, i (i)}
66
+ {#if clickable}
67
+ {#if i === currentStep - 1}
68
+ <button
69
+ type="button"
70
+ class={wrapper({ class: clsx((theme as StepIndicatorTheme)?.wrapper, classes?.wrapper, "cursor-pointer transition-opacity hover:opacity-75") })}
71
+ onclick={() => handleStepClick(i)}
72
+ aria-current="step"
73
+ aria-label={`Current step: ${steps[i]}`}
74
+ >
75
+ <div class={stepCls({ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step, classes?.step) })} data-state="current"></div>
76
+ {#if glow}
77
+ <div class={stepGlow({ class: clsx(getCustomStepClass(i), (theme as StepIndicatorTheme)?.glow, classes?.glow) })}></div>
78
+ {/if}
79
+ </button>
80
+ {:else if i < currentStep - 1}
81
+ <button
82
+ type="button"
83
+ aria-label={`Go to ${steps[i]} (completed)`}
84
+ class={stepCls({
85
+ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step, classes?.step, "cursor-pointer transition-opacity hover:opacity-75")
86
+ })}
87
+ data-state="completed"
88
+ onclick={() => handleStepClick(i)}
89
+ ></button>
90
+ {:else}
91
+ <button
92
+ type="button"
93
+ aria-label={`Go to ${steps[i]}`}
94
+ class={incomplete({ class: clsx((theme as StepIndicatorTheme)?.incomplete, classes?.incomplete, "cursor-pointer transition-opacity hover:opacity-75") })}
95
+ data-state="incomplete"
96
+ onclick={() => handleStepClick(i)}
97
+ ></button>
98
+ {/if}
99
+ {:else if i === currentStep - 1}
100
+ <div class={wrapper({ class: clsx((theme as StepIndicatorTheme)?.wrapper, classes?.wrapper) })}>
101
+ <div class={stepCls({ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step, classes?.step) })} data-state="current"></div>
102
+ {#if glow}
103
+ <div class={stepGlow({ class: clsx(getCustomStepClass(i), (theme as StepIndicatorTheme)?.glow, classes?.glow) })}></div>
104
+ {/if}
105
+ </div>
106
+ {:else if i < currentStep - 1}
107
+ <div class={stepCls({ class: clsx(getStepStateClasses(i, currentStep), getCustomStepClass(i), (theme as StepIndicatorTheme)?.step, classes?.step) })} data-state="completed"></div>
108
+ {:else}
109
+ <div class={incomplete({ class: clsx((theme as StepIndicatorTheme)?.incomplete, classes?.incomplete) })} data-state="incomplete"></div>
110
+ {/if}
111
+ {/each}
112
+ </div>
113
+ </div>
114
+
115
+ <!--
116
+ @component
117
+ [Go to docs](https://flowbite-svelte.com/)
118
+ ## Type
119
+ [StepIndicatorProps](https://github.com/themesberg/flowbite-svelte/blob/main/src/lib/types.ts#L1632)
120
+ ## Props
121
+ @prop steps = ["Step 1", "Step 2", "Step 3", "Step 4", "Step 5"]
122
+ @prop currentStep = $bindable(1)
123
+ @prop size = $bindable("md")
124
+ @prop color = $bindable("primary")
125
+ @prop glow = false
126
+ @prop hideLabel = false
127
+ @prop clickable = true
128
+ @prop completedCustom = ""
129
+ @prop currentCustom = ""
130
+ @prop onStepClick
131
+ @prop class: className
132
+ @prop classes
133
+ @prop ...restProps
134
+ -->