@skeletonlabs/skeleton 0.92.0 → 0.92.1

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 (416) hide show
  1. package/.eslintrc.cjs +20 -0
  2. package/.github/FUNDING.yml +13 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yml +30 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. package/.github/ISSUE_TEMPLATE/docs_issue.yml +23 -0
  6. package/.github/ISSUE_TEMPLATE/feature_request.yml +22 -0
  7. package/.github/pull_request_template.md +14 -0
  8. package/.prettierignore +12 -0
  9. package/.prettierrc +6 -0
  10. package/package.json +61 -159
  11. package/postcss.config.cjs +14 -0
  12. package/scripts/compile-css-to-js.cjs +50 -0
  13. package/scripts/generate-jss.js +67 -0
  14. package/scripts/post-build.js +17 -0
  15. package/scripts/pre-build.js +14 -0
  16. package/src/app.d.ts +13 -0
  17. package/src/app.html +43 -0
  18. package/src/app.postcss +10 -0
  19. package/src/docs/DocsAppBar/DocsAppBar.svelte +213 -0
  20. package/src/docs/DocsFooter/DocsFooter.svelte +78 -0
  21. package/src/docs/DocsLogo/DocsLogoAnim.svelte +44 -0
  22. package/src/docs/DocsLogo/DocsLogoFull.svelte +11 -0
  23. package/src/docs/DocsLogo/DocsLogoIcon.svelte +6 -0
  24. package/src/docs/DocsNavigation/DocsDrawer.svelte +23 -0
  25. package/src/docs/DocsNavigation/DocsSidebar.svelte +103 -0
  26. package/src/docs/DocsNavigation/links.ts +148 -0
  27. package/src/docs/DocsSearch/DocsSearch.svelte +78 -0
  28. package/src/docs/DocsShell/DocsShell.svelte +377 -0
  29. package/src/docs/DocsShell/sveldMapper.ts +143 -0
  30. package/src/docs/DocsShell/types.ts +96 -0
  31. package/src/docs/DocsStyles/blog.css +192 -0
  32. package/src/docs/DocsThemer/DocsThemer.svelte +254 -0
  33. package/src/docs/DocsThemer/Swatch.svelte +28 -0
  34. package/src/docs/DocsThemer/colors.ts +122 -0
  35. package/src/docs/DocsThemer/settings.ts +129 -0
  36. package/src/docs/DocsThemer/stores.ts +5 -0
  37. package/src/docs/DocsThemer/types.ts +20 -0
  38. package/src/docs/README.md +3 -0
  39. package/src/docs/stores.ts +15 -0
  40. package/src/lib/actions/Clipboard/clipboard.ts +39 -0
  41. package/src/lib/actions/Filters/filter.test.ts +40 -0
  42. package/src/lib/actions/Filters/filter.ts +23 -0
  43. package/{actions → src/lib/actions}/Filters/svg-filters/Apollo.svelte +0 -0
  44. package/{actions → src/lib/actions}/Filters/svg-filters/BlueNight.svelte +0 -0
  45. package/{actions → src/lib/actions}/Filters/svg-filters/Emerald.svelte +0 -0
  46. package/{actions → src/lib/actions}/Filters/svg-filters/GreenFall.svelte +0 -0
  47. package/{actions → src/lib/actions}/Filters/svg-filters/Noir.svelte +0 -0
  48. package/{actions → src/lib/actions}/Filters/svg-filters/NoirLight.svelte +0 -0
  49. package/{actions → src/lib/actions}/Filters/svg-filters/Rustic.svelte +0 -0
  50. package/{actions → src/lib/actions}/Filters/svg-filters/Summer84.svelte +0 -0
  51. package/{actions → src/lib/actions}/Filters/svg-filters/XPro.svelte +0 -0
  52. package/src/lib/actions/FocusTrap/focusTrap.ts +56 -0
  53. package/src/lib/components/Accordion/AccordionGroup.svelte +53 -0
  54. package/src/lib/components/Accordion/AccordionGroup.test.ts +22 -0
  55. package/src/lib/components/Accordion/AccordionItem.svelte +80 -0
  56. package/src/lib/components/Accordion/AccordionItem.test.ts +28 -0
  57. package/src/lib/components/Alert/Alert.svelte +71 -0
  58. package/src/lib/components/Alert/Alert.test.ts +30 -0
  59. package/src/lib/components/AppBar/AppBar.svelte +60 -0
  60. package/src/lib/components/AppBar/AppBar.test.ts +31 -0
  61. package/src/lib/components/AppRail/AppRail.svelte +58 -0
  62. package/src/lib/components/AppRail/AppRailTile.svelte +66 -0
  63. package/src/lib/components/AppShell/AppShell.svelte +84 -0
  64. package/src/lib/components/AppShell/AppShell.test.ts +26 -0
  65. package/src/lib/components/Avatar/Avatar.svelte +51 -0
  66. package/src/lib/components/Avatar/Avatar.test.ts +41 -0
  67. package/src/lib/components/Breadcrumb/Breadcrumb.svelte +30 -0
  68. package/src/lib/components/Breadcrumb/Breadcrumb.test.ts +20 -0
  69. package/{components → src/lib/components}/Breadcrumb/Crumb.svelte +23 -16
  70. package/src/lib/components/Breadcrumb/Crumb.test.ts +48 -0
  71. package/src/lib/components/ConicGradient/ConicGradient.svelte +88 -0
  72. package/src/lib/components/ConicGradient/ConicGradient.test.ts +26 -0
  73. package/src/lib/components/ConicGradient/settings.ts +345 -0
  74. package/src/lib/components/ConicGradient/types.ts +12 -0
  75. package/src/lib/components/Divider/Divider.svelte +26 -0
  76. package/src/lib/components/Divider/Divider.test.ts +32 -0
  77. package/src/lib/components/FileButton/FileButton.svelte +29 -0
  78. package/src/lib/components/FileButton/FileButton.test.ts +32 -0
  79. package/src/lib/components/FileDropzone/FileDropzone.svelte +108 -0
  80. package/src/lib/components/FileDropzone/FileDropzone.test.ts +32 -0
  81. package/src/lib/components/GradientHeading/GradientHeading.svelte +24 -0
  82. package/src/lib/components/GradientHeading/GradientHeading.test.ts +30 -0
  83. package/src/lib/components/InputChip/InputChip.svelte +118 -0
  84. package/src/lib/components/ListBox/ListBox.svelte +65 -0
  85. package/src/lib/components/ListBox/ListBox.test.ts +48 -0
  86. package/src/lib/components/ListBox/ListBoxItem.svelte +99 -0
  87. package/src/lib/components/ListBox/ListBoxItem.test.ts +22 -0
  88. package/src/lib/components/Paginator/Paginator.svelte +84 -0
  89. package/src/lib/components/Paginator/Paginator.test.ts +29 -0
  90. package/src/lib/components/Paginator/types.ts +12 -0
  91. package/src/lib/components/ProgressBar/ProgressBar.svelte +73 -0
  92. package/src/lib/components/ProgressBar/ProgressBar.test.ts +27 -0
  93. package/src/lib/components/ProgressRadial/ProgressRadial.svelte +98 -0
  94. package/src/lib/components/ProgressRadial/ProgressRadial.test.ts +26 -0
  95. package/src/lib/components/Radio/RadioGroup.svelte +54 -0
  96. package/src/lib/components/Radio/RadioGroup.test.ts +35 -0
  97. package/src/lib/components/Radio/RadioItem.svelte +71 -0
  98. package/src/lib/components/Radio/RadioItem.test.ts +32 -0
  99. package/src/lib/components/RangeSlider/RangeSlider.svelte +110 -0
  100. package/src/lib/components/RangeSlider/RangeSlider.test.ts +44 -0
  101. package/src/lib/components/SlideToggle/SlideToggle.svelte +106 -0
  102. package/src/lib/components/SlideToggle/SlideToggle.test.ts +23 -0
  103. package/src/lib/components/Stepper/Step.svelte +140 -0
  104. package/src/lib/components/Stepper/Step.test.ts +21 -0
  105. package/src/lib/components/Stepper/Stepper.svelte +71 -0
  106. package/src/lib/components/Stepper/Stepper.test.ts +31 -0
  107. package/src/lib/components/SvgIcon/SvgIcon.svelte +50 -0
  108. package/src/lib/components/SvgIcon/SvgIcon.test.ts +28 -0
  109. package/src/lib/components/SvgIcon/icons.ts +29 -0
  110. package/src/lib/components/Tab/Tab.svelte +79 -0
  111. package/src/lib/components/Tab/Tab.test.ts +26 -0
  112. package/src/lib/components/Tab/TabGroup.svelte +78 -0
  113. package/src/lib/components/Tab/TabGroup.test.ts +30 -0
  114. package/src/lib/components/Table/Table.svelte +106 -0
  115. package/src/lib/components/Table/types.ts +10 -0
  116. package/{components/Table/utils.js → src/lib/components/Table/utils.ts} +16 -10
  117. package/src/lib/components/TableOfContents/TableOfContents.svelte +139 -0
  118. package/{index.d.ts → src/lib/index.ts} +31 -1
  119. package/{styles → src/lib/styles}/all.css +0 -0
  120. package/{styles → src/lib/styles}/core.css +0 -0
  121. package/{styles → src/lib/styles}/elements/alerts.css +0 -0
  122. package/{styles → src/lib/styles}/elements/badges.css +0 -0
  123. package/{styles → src/lib/styles}/elements/breadcrumbs.css +0 -0
  124. package/{styles → src/lib/styles}/elements/buttons.css +0 -0
  125. package/{styles → src/lib/styles}/elements/cards.css +0 -0
  126. package/{styles → src/lib/styles}/elements/chips.css +0 -0
  127. package/{styles → src/lib/styles}/elements/lists.css +0 -0
  128. package/{styles → src/lib/styles}/elements/logo-clouds.css +0 -0
  129. package/{styles → src/lib/styles}/elements/menus.css +0 -0
  130. package/{styles → src/lib/styles}/elements/placeholders.css +0 -0
  131. package/{styles → src/lib/styles}/elements/tables.css +0 -0
  132. package/{styles → src/lib/styles}/elements/tooltips.css +0 -0
  133. package/{styles → src/lib/styles}/elements.css +0 -0
  134. package/{styles → src/lib/styles}/forms.css +0 -1
  135. package/{styles → src/lib/styles}/highlight-js.css +0 -0
  136. package/{styles → src/lib/styles}/tailwind.css +0 -0
  137. package/{styles → src/lib/styles}/typography.css +0 -0
  138. package/{tailwind → src/lib/tailwind}/settings.cjs +0 -0
  139. package/{tailwind → src/lib/tailwind}/skeleton.cjs +1 -5
  140. package/{tailwind → src/lib/tailwind}/theme/colors.cjs +0 -0
  141. package/{tailwind → src/lib/tailwind}/tokens/backgrounds.cjs +0 -0
  142. package/{tailwind → src/lib/tailwind}/tokens/border-radius.cjs +0 -0
  143. package/{tailwind → src/lib/tailwind}/tokens/borders.cjs +0 -0
  144. package/{tailwind → src/lib/tailwind}/tokens/fills.cjs +0 -0
  145. package/{tailwind → src/lib/tailwind}/tokens/rings.cjs +0 -0
  146. package/{tailwind → src/lib/tailwind}/tokens/text.cjs +0 -0
  147. package/{themes → src/lib/themes}/theme-crimson.css +0 -0
  148. package/{themes → src/lib/themes}/theme-gold-nouveau.css +0 -0
  149. package/{themes → src/lib/themes}/theme-hamlindigo.css +0 -0
  150. package/{themes → src/lib/themes}/theme-modern.css +0 -0
  151. package/{themes → src/lib/themes}/theme-rocket.css +0 -0
  152. package/{themes → src/lib/themes}/theme-sahara.css +0 -0
  153. package/{themes → src/lib/themes}/theme-seafoam.css +0 -0
  154. package/{themes → src/lib/themes}/theme-seasonal.css +0 -0
  155. package/{themes → src/lib/themes}/theme-skeleton.css +0 -0
  156. package/src/lib/themes/theme-test.css +96 -0
  157. package/{themes → src/lib/themes}/theme-vintage.css +0 -0
  158. package/src/lib/utilities/CodeBlock/CodeBlock.svelte +78 -0
  159. package/src/lib/utilities/CodeBlock/CodeBlock.test.ts +27 -0
  160. package/src/lib/utilities/CodeBlock/stores.ts +5 -0
  161. package/src/lib/utilities/DataTable/DataTable.ts +151 -0
  162. package/src/lib/utilities/DataTable/actions.ts +100 -0
  163. package/src/lib/utilities/DataTable/types.ts +33 -0
  164. package/src/lib/utilities/Drawer/Drawer.svelte +173 -0
  165. package/src/lib/utilities/Drawer/Drawer.test.ts +15 -0
  166. package/src/lib/utilities/Drawer/stores.ts +27 -0
  167. package/src/lib/utilities/Drawer/types.ts +47 -0
  168. package/src/lib/utilities/LightSwitch/LightSwitch.svelte +116 -0
  169. package/src/lib/utilities/LightSwitch/LightSwitch.test.ts +19 -0
  170. package/src/lib/utilities/LightSwitch/stores.ts +7 -0
  171. package/src/lib/utilities/LocalStorageStore/LocalStorageStore.test.ts +220 -0
  172. package/src/lib/utilities/LocalStorageStore/LocalStorageStore.ts +77 -0
  173. package/src/lib/utilities/Menu/menu.test.ts +22 -0
  174. package/src/lib/utilities/Menu/menu.ts +172 -0
  175. package/src/lib/utilities/Modal/Modal.svelte +206 -0
  176. package/src/lib/utilities/Modal/Modal.test.ts +50 -0
  177. package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleEmbed.svelte +7 -5
  178. package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleForm.svelte +24 -20
  179. package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleList.svelte +18 -13
  180. package/src/lib/utilities/Modal/stores.ts +29 -0
  181. package/src/lib/utilities/Modal/types.ts +39 -0
  182. package/src/lib/utilities/Toast/Toast.svelte +95 -0
  183. package/src/lib/utilities/Toast/Toats.test.ts +25 -0
  184. package/src/lib/utilities/Toast/stores.ts +63 -0
  185. package/src/lib/utilities/Toast/types.ts +29 -0
  186. package/src/lib/utilities/Tooltip/tooltip.ts +137 -0
  187. package/src/routes/(inner)/+layout.svelte +3 -0
  188. package/src/routes/(inner)/actions/clipboard/+page.svelte +87 -0
  189. package/src/routes/(inner)/actions/filters/+page.svelte +151 -0
  190. package/src/routes/(inner)/actions/focus-trap/+page.svelte +59 -0
  191. package/src/routes/(inner)/components/accordions/+page.svelte +127 -0
  192. package/src/routes/(inner)/components/alerts/+page.svelte +130 -0
  193. package/src/routes/(inner)/components/app-bar/+page.svelte +52 -0
  194. package/src/routes/(inner)/components/app-rail/+page.svelte +105 -0
  195. package/src/routes/(inner)/components/app-shell/+page.svelte +159 -0
  196. package/src/routes/(inner)/components/avatars/+page.svelte +193 -0
  197. package/src/routes/(inner)/components/breadcrumbs/+page.svelte +121 -0
  198. package/src/routes/(inner)/components/conic-gradients/+page.svelte +161 -0
  199. package/src/routes/(inner)/components/dividers/+page.svelte +146 -0
  200. package/src/routes/(inner)/components/file-buttons/+page.svelte +46 -0
  201. package/src/routes/(inner)/components/file-dropzone/+page.svelte +71 -0
  202. package/src/routes/(inner)/components/gradient-headings/+page.svelte +138 -0
  203. package/src/routes/(inner)/components/input-chips/+page.svelte +128 -0
  204. package/src/routes/(inner)/components/listboxes/+page.svelte +92 -0
  205. package/src/routes/(inner)/components/paginators/+page.svelte +118 -0
  206. package/src/routes/(inner)/components/progress-bars/+page.svelte +157 -0
  207. package/src/routes/(inner)/components/progress-radials/+page.svelte +64 -0
  208. package/src/routes/(inner)/components/radio-groups/+page.svelte +91 -0
  209. package/src/routes/(inner)/components/range-sliders/+page.svelte +134 -0
  210. package/src/routes/(inner)/components/slide-toggles/+page.svelte +63 -0
  211. package/src/routes/(inner)/components/steppers/+page.svelte +168 -0
  212. package/src/routes/(inner)/components/svg-icons/+page.svelte +60 -0
  213. package/src/routes/(inner)/components/table-of-contents/+page.svelte +110 -0
  214. package/src/routes/(inner)/components/tables/+page.svelte +216 -0
  215. package/src/routes/(inner)/components/tabs/+page.svelte +146 -0
  216. package/src/routes/(inner)/docs/comparisons/+page.svelte +130 -0
  217. package/src/routes/(inner)/docs/contributions/+page.svelte +78 -0
  218. package/src/routes/(inner)/docs/contributions/documentation/+page.svelte +217 -0
  219. package/src/routes/(inner)/docs/contributions/requirements/+page.svelte +173 -0
  220. package/src/routes/(inner)/docs/contributions/style-guide/+page.svelte +164 -0
  221. package/src/routes/(inner)/docs/faqs/+page.svelte +80 -0
  222. package/src/routes/(inner)/docs/features/+page.svelte +121 -0
  223. package/src/routes/(inner)/docs/recommended/+page.svelte +162 -0
  224. package/src/routes/(inner)/docs/why/+page.svelte +104 -0
  225. package/src/routes/(inner)/elements/alerts/+page.svelte +142 -0
  226. package/src/routes/(inner)/elements/badges/+page.svelte +155 -0
  227. package/src/routes/(inner)/elements/breadcrumbs/+page.svelte +132 -0
  228. package/src/routes/(inner)/elements/buttons/+page.svelte +304 -0
  229. package/src/routes/(inner)/elements/cards/+page.svelte +117 -0
  230. package/src/routes/(inner)/elements/chips/+page.svelte +130 -0
  231. package/src/routes/(inner)/elements/core/+page.svelte +98 -0
  232. package/src/routes/(inner)/elements/forms/+page.svelte +89 -0
  233. package/src/routes/(inner)/elements/forms/preview/+page.svelte +256 -0
  234. package/src/routes/(inner)/elements/lists/+page.svelte +197 -0
  235. package/src/routes/(inner)/elements/logo-clouds/+page.svelte +105 -0
  236. package/src/routes/(inner)/elements/placeholders/+page.svelte +70 -0
  237. package/src/routes/(inner)/elements/tables/+page.svelte +138 -0
  238. package/src/routes/(inner)/elements/tokens/+page.svelte +176 -0
  239. package/src/routes/(inner)/elements/typography/+page.svelte +100 -0
  240. package/src/routes/(inner)/guides/install/+page.svelte +84 -0
  241. package/src/routes/(inner)/guides/quickstart/+page.svelte +118 -0
  242. package/src/routes/(inner)/guides/styling/+page.svelte +361 -0
  243. package/src/routes/(inner)/guides/tailwind/+page.svelte +150 -0
  244. package/src/routes/(inner)/guides/themes/+page.svelte +144 -0
  245. package/src/routes/(inner)/guides/themes/colors/+page.svelte +87 -0
  246. package/src/routes/(inner)/guides/themes/generator/+page.svelte +58 -0
  247. package/src/routes/(inner)/guides/themes/presets.ts +69 -0
  248. package/src/routes/(inner)/template/+page.svelte +52 -0
  249. package/src/routes/(inner)/utilities/codeblocks/+page.svelte +77 -0
  250. package/src/routes/(inner)/utilities/data-tables/+page.svelte +399 -0
  251. package/src/routes/(inner)/utilities/data-tables/+page.ts +18 -0
  252. package/src/routes/(inner)/utilities/drawers/+page.svelte +193 -0
  253. package/src/routes/(inner)/utilities/lightswitches/+page.svelte +86 -0
  254. package/src/routes/(inner)/utilities/local-storage-stores/+page.svelte +67 -0
  255. package/src/routes/(inner)/utilities/menus/+page.svelte +186 -0
  256. package/src/routes/(inner)/utilities/modals/+page.svelte +391 -0
  257. package/src/routes/(inner)/utilities/toasts/+page.svelte +212 -0
  258. package/src/routes/(inner)/utilities/tooltips/+page.svelte +153 -0
  259. package/src/routes/+error.svelte +16 -0
  260. package/src/routes/+layout.server.ts +13 -0
  261. package/src/routes/+layout.svelte +100 -0
  262. package/src/routes/+page.server.ts +12 -0
  263. package/src/routes/+page.svelte +197 -0
  264. package/src/routes/blog/+page.svelte +78 -0
  265. package/src/routes/blog/+page.ts +6 -0
  266. package/src/routes/blog/[slug]/+page.svelte +112 -0
  267. package/src/routes/blog/[slug]/+page.ts +6 -0
  268. package/src/routes/blog/blog-service.ts +31 -0
  269. package/src/routes/blog/rss/+server.ts +16 -0
  270. package/static/favicon.png +0 -0
  271. package/svelte.config.js +30 -0
  272. package/tailwind.config.cjs +14 -0
  273. package/tsconfig.json +37 -0
  274. package/vite.config.js +25 -0
  275. package/actions/Clipboard/clipboard.d.ts +0 -4
  276. package/actions/Clipboard/clipboard.js +0 -37
  277. package/actions/Filters/filter.d.ts +0 -3
  278. package/actions/Filters/filter.js +0 -23
  279. package/actions/Filters/svg-filters/Apollo.svelte.d.ts +0 -23
  280. package/actions/Filters/svg-filters/BlueNight.svelte.d.ts +0 -23
  281. package/actions/Filters/svg-filters/Emerald.svelte.d.ts +0 -23
  282. package/actions/Filters/svg-filters/GreenFall.svelte.d.ts +0 -23
  283. package/actions/Filters/svg-filters/Noir.svelte.d.ts +0 -23
  284. package/actions/Filters/svg-filters/NoirLight.svelte.d.ts +0 -23
  285. package/actions/Filters/svg-filters/Rustic.svelte.d.ts +0 -23
  286. package/actions/Filters/svg-filters/Summer84.svelte.d.ts +0 -23
  287. package/actions/Filters/svg-filters/XPro.svelte.d.ts +0 -23
  288. package/actions/FocusTrap/focusTrap.d.ts +0 -4
  289. package/actions/FocusTrap/focusTrap.js +0 -53
  290. package/components/Accordion/AccordionGroup.svelte +0 -46
  291. package/components/Accordion/AccordionGroup.svelte.d.ts +0 -24
  292. package/components/Accordion/AccordionItem.svelte +0 -73
  293. package/components/Accordion/AccordionItem.svelte.d.ts +0 -36
  294. package/components/Alert/Alert.svelte +0 -65
  295. package/components/Alert/Alert.svelte.d.ts +0 -30
  296. package/components/AppBar/AppBar.svelte +0 -54
  297. package/components/AppBar/AppBar.svelte.d.ts +0 -30
  298. package/components/AppRail/AppRail.svelte +0 -51
  299. package/components/AppRail/AppRail.svelte.d.ts +0 -32
  300. package/components/AppRail/AppRailTile.svelte +0 -57
  301. package/components/AppRail/AppRailTile.svelte.d.ts +0 -33
  302. package/components/AppShell/AppShell.svelte +0 -80
  303. package/components/AppShell/AppShell.svelte.d.ts +0 -31
  304. package/components/Avatar/Avatar.svelte +0 -46
  305. package/components/Avatar/Avatar.svelte.d.ts +0 -32
  306. package/components/Breadcrumb/Breadcrumb.svelte +0 -24
  307. package/components/Breadcrumb/Breadcrumb.svelte.d.ts +0 -21
  308. package/components/Breadcrumb/Crumb.svelte.d.ts +0 -26
  309. package/components/ConicGradient/ConicGradient.svelte +0 -80
  310. package/components/ConicGradient/ConicGradient.svelte.d.ts +0 -29
  311. package/components/ConicGradient/settings.d.ts +0 -13
  312. package/components/ConicGradient/settings.js +0 -335
  313. package/components/ConicGradient/types.d.ts +0 -10
  314. package/components/ConicGradient/types.js +0 -2
  315. package/components/Divider/Divider.svelte +0 -21
  316. package/components/Divider/Divider.svelte.d.ts +0 -22
  317. package/components/FileButton/FileButton.svelte +0 -25
  318. package/components/FileButton/FileButton.svelte.d.ts +0 -25
  319. package/components/FileDropzone/FileDropzone.svelte +0 -95
  320. package/components/FileDropzone/FileDropzone.svelte.d.ts +0 -32
  321. package/components/GradientHeading/GradientHeading.svelte +0 -21
  322. package/components/GradientHeading/GradientHeading.svelte.d.ts +0 -22
  323. package/components/InputChip/InputChip.svelte +0 -107
  324. package/components/InputChip/InputChip.svelte.d.ts +0 -29
  325. package/components/ListBox/ListBox.svelte +0 -57
  326. package/components/ListBox/ListBox.svelte.d.ts +0 -30
  327. package/components/ListBox/ListBoxItem.svelte +0 -88
  328. package/components/ListBox/ListBoxItem.svelte.d.ts +0 -32
  329. package/components/Paginator/Paginator.svelte +0 -74
  330. package/components/Paginator/Paginator.svelte.d.ts +0 -29
  331. package/components/Paginator/types.d.ts +0 -10
  332. package/components/Paginator/types.js +0 -2
  333. package/components/ProgressBar/ProgressBar.svelte +0 -67
  334. package/components/ProgressBar/ProgressBar.svelte.d.ts +0 -24
  335. package/components/ProgressRadial/ProgressRadial.svelte +0 -89
  336. package/components/ProgressRadial/ProgressRadial.svelte.d.ts +0 -25
  337. package/components/Radio/RadioGroup.svelte +0 -48
  338. package/components/Radio/RadioGroup.svelte.d.ts +0 -31
  339. package/components/Radio/RadioItem.svelte +0 -61
  340. package/components/Radio/RadioItem.svelte.d.ts +0 -33
  341. package/components/RangeSlider/RangeSlider.svelte +0 -101
  342. package/components/RangeSlider/RangeSlider.svelte.d.ts +0 -32
  343. package/components/SlideToggle/SlideToggle.svelte +0 -100
  344. package/components/SlideToggle/SlideToggle.svelte.d.ts +0 -34
  345. package/components/Stepper/Step.svelte +0 -133
  346. package/components/Stepper/Step.svelte.d.ts +0 -39
  347. package/components/Stepper/Stepper.svelte +0 -64
  348. package/components/Stepper/Stepper.svelte.d.ts +0 -32
  349. package/components/SvgIcon/SvgIcon.svelte +0 -45
  350. package/components/SvgIcon/SvgIcon.svelte.d.ts +0 -26
  351. package/components/SvgIcon/icons.d.ts +0 -1
  352. package/components/SvgIcon/icons.js +0 -25
  353. package/components/Tab/Tab.svelte +0 -69
  354. package/components/Tab/Tab.svelte.d.ts +0 -37
  355. package/components/Tab/TabGroup.svelte +0 -69
  356. package/components/Tab/TabGroup.svelte.d.ts +0 -30
  357. package/components/Table/Table.svelte +0 -99
  358. package/components/Table/Table.svelte.d.ts +0 -27
  359. package/components/Table/types.d.ts +0 -10
  360. package/components/Table/types.js +0 -1
  361. package/components/Table/utils.d.ts +0 -7
  362. package/components/TableOfContents/TableOfContents.svelte +0 -132
  363. package/components/TableOfContents/TableOfContents.svelte.d.ts +0 -32
  364. package/index.js +0 -71
  365. package/tailwind/generated/allComponents.cjs +0 -1
  366. package/tailwind/generated/allComponents.d.cts +0 -5552
  367. package/tailwind/settings.d.cts +0 -6
  368. package/tailwind/skeleton.d.cts +0 -5
  369. package/tailwind/theme/colors.d.cts +0 -2
  370. package/tailwind/tokens/backgrounds.d.cts +0 -2
  371. package/tailwind/tokens/border-radius.d.cts +0 -33
  372. package/tailwind/tokens/borders.d.cts +0 -6
  373. package/tailwind/tokens/fills.d.cts +0 -15
  374. package/tailwind/tokens/rings.d.cts +0 -17
  375. package/tailwind/tokens/text.d.cts +0 -21
  376. package/utilities/CodeBlock/CodeBlock.svelte +0 -68
  377. package/utilities/CodeBlock/CodeBlock.svelte.d.ts +0 -25
  378. package/utilities/CodeBlock/stores.d.ts +0 -2
  379. package/utilities/CodeBlock/stores.js +0 -3
  380. package/utilities/DataTable/DataTable.d.ts +0 -18
  381. package/utilities/DataTable/DataTable.js +0 -137
  382. package/utilities/DataTable/actions.d.ts +0 -8
  383. package/utilities/DataTable/actions.js +0 -114
  384. package/utilities/DataTable/types.d.ts +0 -33
  385. package/utilities/DataTable/types.js +0 -2
  386. package/utilities/Drawer/Drawer.svelte +0 -157
  387. package/utilities/Drawer/Drawer.svelte.d.ts +0 -33
  388. package/utilities/Drawer/stores.d.ts +0 -10
  389. package/utilities/Drawer/stores.js +0 -21
  390. package/utilities/Drawer/types.d.ts +0 -33
  391. package/utilities/Drawer/types.js +0 -2
  392. package/utilities/LightSwitch/LightSwitch.svelte +0 -98
  393. package/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -21
  394. package/utilities/LightSwitch/stores.d.ts +0 -2
  395. package/utilities/LightSwitch/stores.js +0 -5
  396. package/utilities/LocalStorageStore/LocalStorageStore.d.ts +0 -12
  397. package/utilities/LocalStorageStore/LocalStorageStore.js +0 -49
  398. package/utilities/Menu/menu.d.ts +0 -18
  399. package/utilities/Menu/menu.js +0 -151
  400. package/utilities/Modal/Modal.svelte +0 -195
  401. package/utilities/Modal/Modal.svelte.d.ts +0 -35
  402. package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +0 -17
  403. package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +0 -17
  404. package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +0 -17
  405. package/utilities/Modal/stores.d.ts +0 -12
  406. package/utilities/Modal/stores.js +0 -24
  407. package/utilities/Modal/types.d.ts +0 -36
  408. package/utilities/Modal/types.js +0 -2
  409. package/utilities/Toast/Toast.svelte +0 -117
  410. package/utilities/Toast/Toast.svelte.d.ts +0 -28
  411. package/utilities/Toast/stores.d.ts +0 -10
  412. package/utilities/Toast/stores.js +0 -60
  413. package/utilities/Toast/types.d.ts +0 -26
  414. package/utilities/Toast/types.js +0 -2
  415. package/utilities/Tooltip/tooltip.d.ts +0 -35
  416. package/utilities/Tooltip/tooltip.js +0 -94
@@ -0,0 +1,110 @@
1
+ <script lang="ts">
2
+ import DocsShell from '$docs/DocsShell/DocsShell.svelte';
3
+ import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
4
+
5
+ // Utilities
6
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
7
+
8
+ // @ts-expect-error
9
+ import sveldTableOfContents from '$lib/components/TableOfContents/TableOfContents.svelte?raw&sveld';
10
+
11
+ // Docs Shell
12
+ const settings: DocsShellSettings = {
13
+ feature: DocsFeature.Component,
14
+ name: 'Table of Contents',
15
+ description: 'Allows you to quickly navigate the hierarchy of headings for the current page.',
16
+ imports: ['TableOfContents'],
17
+ source: 'components/TableOfContents',
18
+ components: [{ sveld: sveldTableOfContents }]
19
+ };
20
+ </script>
21
+
22
+ <DocsShell {settings}>
23
+ <!-- Slot: Usage -->
24
+ <svelte:fragment slot="usage">
25
+ <section class="space-y-4">
26
+ <p>
27
+ Add the component to a page, set the target property, then a list of links will be auto-generated based on available HTML headings.
28
+ </p>
29
+ <CodeBlock language="html" code={`<TableOfContents target="#toc-target" />`} />
30
+ <CodeBlock
31
+ language="html"
32
+ code={`
33
+ <!-- NOTE: this can be the body element, App Shell #page, etc. -->
34
+ <main>
35
+ <!-- The region to scan for heading elements. -->
36
+ <div id="toc-target">
37
+ <h2>Heading<h2>
38
+ <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
39
+ <h3>Subheading<h3>
40
+ <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
41
+ </div>
42
+ </main>
43
+ `}
44
+ />
45
+ </section>
46
+ <section class="space-y-4">
47
+ <h2>How It Works</h2>
48
+ <h3>Key Props</h3>
49
+ <p>The following props are critical to how this operates.</p>
50
+ <div class="table-container">
51
+ <table class="table">
52
+ <thead>
53
+ <tr>
54
+ <th>Property</th>
55
+ <th>Example</th>
56
+ <th>Description</th>
57
+ </tr>
58
+ </thead>
59
+ <!-- prettier-ignore -->
60
+ <tbody>
61
+ <tr>
62
+ <td><code>scrollParent</code></td>
63
+ <td>"#page"</td>
64
+ <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" target="_blank" rel="noreferrer">Query selector</a> for the scrollable page element.</td>
65
+ </tr>
66
+ <tr>
67
+ <td><code>target</code></td>
68
+ <td>"#page"</td>
69
+ <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" target="_blank" rel="noreferrer">Query selector</a> for the element to scan for headings.</td>
70
+ </tr>
71
+ <tr>
72
+ <td><code>allowedHeadings</code></td>
73
+ <td>'h2, h3'</td>
74
+ <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" target="_blank" rel="noreferrer">Query selector</a> for the allowed headings. From H2-H6.</td>
75
+ </tr>
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ <h3>Heading IDs</h3>
80
+ <p>
81
+ The component will scan the target region and query all matching headings. If a heading has an <code>ID</code> set, that will be used
82
+ as the scroll target, otherwise an ID will be auto-generated and assigned.
83
+ </p>
84
+ <h3>Click to Scroll</h3>
85
+ <p>
86
+ When a link is clicked, the scrollable parent container will be scrolled using the JavaScript <code>scrollIntoView</code> method. This
87
+ will smoothly scroll the container element to the heading with the matching ID.
88
+ </p>
89
+ </section>
90
+ <section class="space-y-4">
91
+ <h2>Ignore a Heading</h2>
92
+ <p>
93
+ By default, the Table of Contents creates links for <u>all headings</u> within the target region. If you wish to ignore certain headings,
94
+ add the following data attribute to that heading.
95
+ </p>
96
+ <CodeBlock language="html" code={`<h2 data-toc-ignore>Ignore Me!</h2>`} />
97
+ </section>
98
+ <section class="space-y-4">
99
+ <h2>Screen Reader Headings</h2>
100
+ <!-- prettier-ignore -->
101
+ <p>If you wish to include a section link that's not visibly shown within the target element, use <a href="https://tailwindcss.com/docs/screen-readers#screen-reader-only-elements" target="_blank" rel="noreferrer">Screen Reader</a> <code>.sr-only</code> class from Tailwind.</p>
102
+ <CodeBlock language="html" code={`<h2 class="sr-only">Include Me!</h2>`} />
103
+ </section>
104
+ <section class="space-y-4">
105
+ <h2>Sticky Positioning</h2>
106
+ <!-- prettier-ignore -->
107
+ <p>See Tailwind's documentation on <a href="https://tailwindcss.com/docs/position#sticky-positioning-elements" target="_blank" rel="noreferrer">sticky positioning</a> if you wish to keep the Table of Contents component visible during scrolling.</p>
108
+ </section>
109
+ </svelte:fragment>
110
+ </DocsShell>
@@ -0,0 +1,216 @@
1
+ <script lang="ts">
2
+ import { writable, type Writable } from 'svelte/store';
3
+
4
+ import DocsShell from '$docs/DocsShell/DocsShell.svelte';
5
+ import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
6
+
7
+ // Types
8
+ import type { TableSource } from '$lib/components/Table/types';
9
+
10
+ // Utils
11
+ import { tableMapperValues } from '$lib/components/Table/utils';
12
+
13
+ // Components
14
+ import Table from '$lib/components/Table/Table.svelte';
15
+ import TabGroup from '$lib/components/Tab/TabGroup.svelte';
16
+ import Tab from '$lib/components/Tab/Tab.svelte';
17
+ // Utilities
18
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
19
+
20
+ // @ts-expect-error sveld import
21
+ import sveldTable from '$lib/components/Table/Table.svelte?raw&sveld';
22
+
23
+ // Stores
24
+ let storeService: Writable<string> = writable('tableMapperValues');
25
+
26
+ // Docs Shell
27
+ const settings: DocsShellSettings = {
28
+ feature: DocsFeature.Component,
29
+ name: 'Tables',
30
+ description: 'Utilize a data-driven model to create simple presentational tables.',
31
+ imports: ['Table'],
32
+ types: ['TableSource'],
33
+ source: 'components/Table',
34
+ aria: 'https://www.w3.org/WAI/ARIA/apg/patterns/grid/',
35
+ components: [{ sveld: sveldTable }],
36
+ keyboard: [
37
+ ['<kbd>Right Arrow</kbd>', 'Moves focus one cell to the right. If focus is on the right-most cell in the row, focus does not move.'],
38
+ ['<kbd>Left Arrow</kbd>', 'Moves focus one cell to the left. If focus is on the left-most cell in the row, focus does not move.'],
39
+ ['<kbd>Down Arrow</kbd>', 'Moves focus one cell down. If focus is on the bottom cell in the column, focus does not move.'],
40
+ ['<kbd>Up Arrow</kbd>', 'Moves focus one cell Up. If focus is on the top cell in the column, focus does not move.'],
41
+ ['<kbd>Home</kbd>', 'Moves focus to the first cell in the row that contains focus.'],
42
+ ['<kbd>End</kbd>', ' Moves focus to the last cell in the row that contains focus.'],
43
+ ['<kbd>Enter</kbd> or <kbd>Space</kbd>', 'Triggers the on:selected event.']
44
+ ]
45
+ };
46
+
47
+ // Local
48
+ const sourceData = [
49
+ { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
50
+ { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
51
+ { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
52
+ { position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be' },
53
+ { position: 5, name: 'Boron', weight: 10.811, symbol: 'B' }
54
+ // { position: 6, name: 'Carbon', weight: 12.0107, symbol: 'C' },
55
+ // { position: 7, name: 'Nitrogen', weight: 14.0067, symbol: 'N' },
56
+ // { position: 8, name: 'Oxygen', weight: 15.9994, symbol: 'O' },
57
+ // { position: 9, name: 'Fluorine', weight: 18.9984, symbol: 'F' },
58
+ // { position: 10, name: 'Neon', weight: 20.1797, symbol: 'Ne' }
59
+ ];
60
+ const totalWeight = sourceData.reduce((accumulator, obj) => accumulator + obj.weight, 0);
61
+
62
+ // Table Simple
63
+ const tableSimple: TableSource = {
64
+ head: ['Symbol', 'Name', 'Weight'],
65
+ body: tableMapperValues(sourceData, ['symbol', 'name', 'weight']),
66
+ meta: tableMapperValues(sourceData, ['position', 'name', 'symbol', 'weight']),
67
+ foot: ['Total', '', `<code>${totalWeight}</code>`]
68
+ };
69
+
70
+ // On Row Selected
71
+ function onSelected(meta: any): void {
72
+ console.log(meta.detail);
73
+ }
74
+ </script>
75
+
76
+ <DocsShell {settings}>
77
+ <!-- Slot: Sandbox -->
78
+ <svelte:fragment slot="sandbox">
79
+ <section class="space-y-4">
80
+ <Table source={tableSimple} interactive={true} on:selected={onSelected} />
81
+ <div class="text-sm text-center">View your browser console when selecting a row above.</div>
82
+ </section>
83
+ </svelte:fragment>
84
+
85
+ <!-- Slot: Usage -->
86
+ <svelte:fragment slot="usage">
87
+ <!-- Tab: Table -->
88
+ <section class="space-y-4">
89
+ <p>
90
+ First we need a set of source data. This can start as either an array of objects, or an array of arrays. For this example we'll use
91
+ the former.
92
+ </p>
93
+ <CodeBlock
94
+ language="typescript"
95
+ code={`
96
+ const sourceData = [
97
+ { position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H' },
98
+ { position: 2, name: 'Helium', weight: 4.0026, symbol: 'He' },
99
+ { position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li' },
100
+ { position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be' },
101
+ { position: 5, name: 'Boron', weight: 10.811, symbol: 'B' },
102
+ ];
103
+ `}
104
+ />
105
+ <p>
106
+ Create a <code>TableSource</code> object that houses all of our table information. Note we're using the
107
+ <code>tableMapperValues()</code> method to prune and map our data between the body and meta values. We cover the use of this method
108
+ in the <em>Table Utilities</em> section below.
109
+ </p>
110
+ <CodeBlock
111
+ language="typescript"
112
+ code={`
113
+ const tableSimple: TableSource = {
114
+ // A list of heading labels.
115
+ head: ['Name', 'Symbol', 'Weight'],
116
+ // The data visibly shown in your table body UI.
117
+ body: tableMapperValues(sourceData, ['name', 'symbol', 'weight']),
118
+ // Optional: The data returned when interactive is enabled and a row is clicked.
119
+ meta: tableMapperValues(sourceData, ['position', 'name', 'symbol', 'weight']),
120
+ // Optional: A list of footer labels.
121
+ foot: ['Total', '', '<code>${totalWeight}</code>']
122
+ };
123
+ `}
124
+ />
125
+ <p>
126
+ Finally, we pass our table source data to the component for display. The <code>interactive</code> prop is optional, but indicates
127
+ the table is interactive, and will provide <code>meta</code> data via the <code>on:selected</code> event when a row is clicked clicked.
128
+ </p>
129
+ <CodeBlock language="html" code={`<Table source={tableSimple} interactive={true} on:selected={mySelectionHandler} />`} />
130
+ </section>
131
+ <!-- Table Utilities -->
132
+ <section class="space-y-4">
133
+ <h2>Table Utilities</h2>
134
+ <p>The following utility methods allow you to format your source data for use within a Table component.</p>
135
+ <TabGroup selected={storeService}>
136
+ <Tab value="tableMapperValues">Mapper Values</Tab>
137
+ <Tab value="tableSourceMapper">Source Mapper</Tab>
138
+ <Tab value="tableSourceValues">Source Values</Tab>
139
+ <!-- <Tab value="tableCellFormatter">Cell Formatter</Tab> -->
140
+ </TabGroup>
141
+ <CodeBlock language="ts" code={`import { ${$storeService} } from '@skeletonlabs/skeleton';>`} />
142
+ {#if $storeService === 'tableMapperValues'}
143
+ <!-- Table Mapper Values -->
144
+ <p>
145
+ Combines Source Mapper and Source Values methods to handle both operations at once. This allows you to use the same source object,
146
+ but format differently between display (body) and selected response (meta). It's recommended to use this in most use cases.
147
+ </p>
148
+ <CodeBlock
149
+ language="ts"
150
+ code={`
151
+ tableMapperValues(sourceData, ['name', 'symbol', 'weight'])\n
152
+ // [
153
+ // ['Hydrogen', 'H', '1.0079'],
154
+ // ['Helium', 'He', '4.0026'],
155
+ // ...
156
+ // ]
157
+ `}
158
+ />
159
+ {:else if $storeService === 'tableSourceMapper'}
160
+ <!-- Source Mapper -->
161
+ <p>Allows you to both whitelist object keys and map the order of display.</p>
162
+ <CodeBlock
163
+ language="ts"
164
+ code={`
165
+ tableSourceMapper(sourceData, ['name', 'symbol', 'weight']);\n
166
+ //[
167
+ // { name: 'Hydrogen', symbol: 'H', weight: '1.0079' },
168
+ // { name: 'Helium', symbol: 'He', weight: '4.0026' },
169
+ // ...
170
+ //]
171
+ `}
172
+ />
173
+ {:else if $storeService === 'tableSourceValues'}
174
+ <!-- Source Values -->
175
+ <p>
176
+ Returns an array of array values from an array of objects. This is the desired format for <code>TableSource</code> <em>body</em>
177
+ and <em>meta</em>.
178
+ </p>
179
+ <CodeBlock
180
+ language="ts"
181
+ code={`
182
+ tableSourceValues(sourceData);\n
183
+ //[
184
+ // [ 1, 'Hydrogen', '1.0079', 'H' ],
185
+ // [ 2, 'Helium', '4.0026', 'He' ],
186
+ // ...
187
+ //]
188
+ `}
189
+ />
190
+ <!-- DISABLED: see comments in utils.ts -->
191
+ <!-- {else if $storeService === 'tableCellFormatter'}
192
+ <p>Table cells can accept HTML via template literals. This method allows wrapping HTML tags arround a particular object value.</p>
193
+ <CodeBlock
194
+ language="ts"
195
+ code={`
196
+ tableCellFormatter(sourceData, 'weight', 'em', 'opacity-50');\n
197
+ // [
198
+ // { position: 1, name: 'Hydrogen', weight: '<em class="opacity-50">1.0079</em>', symbol: 'H' },
199
+ // { position: 2, name: 'Helium', weight: '<em class="opacity-50">4.0026</em>', symbol: 'He' },
200
+ // ...
201
+ // ]
202
+ `}
203
+ /> -->
204
+ {/if}
205
+ </section>
206
+ <hr />
207
+ <!-- Data Table Callout -->
208
+ <section class="grid grid-cols-[1fr_auto] gap-4">
209
+ <div class="space-y-4">
210
+ <h2>Data Tables</h2>
211
+ <p>Need a fully featured data table with powerful features like selection and sort? See data tables.</p>
212
+ </div>
213
+ <a class="btn btn-filled-secondary place-self-center" href="/utilities/data-tables">Data Tables</a>
214
+ </section>
215
+ </svelte:fragment>
216
+ </DocsShell>
@@ -0,0 +1,146 @@
1
+ <script lang="ts">
2
+ import { writable } from 'svelte/store';
3
+
4
+ import DocsShell from '$docs/DocsShell/DocsShell.svelte';
5
+ import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
6
+
7
+ import TabGroup from '$lib/components/Tab/TabGroup.svelte';
8
+ import Tab from '$lib/components/Tab/Tab.svelte';
9
+ import SvgIcon from '$lib/components/SvgIcon/SvgIcon.svelte';
10
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
11
+
12
+ // @ts-expect-error sveld import
13
+ import sveldTabGroup from '$lib/components/Tab/TabGroup.svelte?raw&sveld';
14
+ // @ts-expect-error sveld import
15
+ import sveldTab from '$lib/components/Tab/Tab.svelte?raw&sveld';
16
+
17
+ let storeOne = writable('a');
18
+ let storeTwo = writable('a');
19
+ let storeThree = writable('a');
20
+
21
+ // Docs Shell
22
+ const settings: DocsShellSettings = {
23
+ feature: DocsFeature.Component,
24
+ name: 'Tabs',
25
+ description: 'Use tabs to quickly switch between different views.',
26
+ imports: ['TabGroup', 'Tab'],
27
+ source: 'components/Tab',
28
+ aria: 'https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/',
29
+ components: [
30
+ { label: 'TabGroup', sveld: sveldTabGroup },
31
+ { label: 'Tab', sveld: sveldTab, overrideProps: ['borderWidth', 'borderColor', 'color', 'fill', 'hover', 'rounded'] }
32
+ ]
33
+ };
34
+ </script>
35
+
36
+ <DocsShell {settings}>
37
+ <!-- Slot: Sandbox -->
38
+ <svelte:fragment slot="sandbox">
39
+ <section class="space-y-4">
40
+ <h2 class="sr-only">Examples</h2>
41
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
42
+ <div class="card p-4 space-y-4">
43
+ <TabGroup selected={storeOne}>
44
+ <Tab value="a">Tab A</Tab>
45
+ <Tab value="b">Tab B</Tab>
46
+ <Tab value="c">Tab C</Tab>
47
+ </TabGroup>
48
+ <div>
49
+ {#if $storeOne === 'a'}Content A{/if}
50
+ {#if $storeOne === 'b'}Content B{/if}
51
+ {#if $storeOne === 'c'}Content C{/if}
52
+ </div>
53
+ </div>
54
+ <div class="card p-4 space-y-4">
55
+ <TabGroup
56
+ selected={storeTwo}
57
+ justify="justify-start md:justify-end"
58
+ borderColor="border-secondary-500"
59
+ color="text-secondary-500"
60
+ hover="hover:bg-secondary-500/10"
61
+ >
62
+ <Tab value="a">Tab A</Tab>
63
+ <Tab value="b">Tab B</Tab>
64
+ <Tab value="c">Tab C</Tab>
65
+ </TabGroup>
66
+ <div>
67
+ {#if $storeTwo === 'a'}Content A{/if}
68
+ {#if $storeTwo === 'b'}Content B{/if}
69
+ {#if $storeTwo === 'c'}Content C{/if}
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <div class="card p-4 space-y-4">
74
+ <TabGroup
75
+ selected={storeThree}
76
+ justify="justify-start md:justify-center"
77
+ borderColor="border-tertiary-500"
78
+ fill="fill-tertiary-500"
79
+ color="text-tertiary-500"
80
+ hover="hover:bg-tertiary-500/10"
81
+ >
82
+ <Tab value="a">
83
+ <svelte:fragment slot="lead">
84
+ <i class="fa-solid fa-book" />
85
+ </svelte:fragment>
86
+ Books
87
+ </Tab>
88
+ <Tab value="b">
89
+ <svelte:fragment slot="lead">
90
+ <i class="fa-solid fa-clapperboard" />
91
+ </svelte:fragment>
92
+ Movies
93
+ </Tab>
94
+ <Tab value="c">
95
+ <svelte:fragment slot="lead">
96
+ <i class="fa-solid fa-tv" />
97
+ </svelte:fragment>
98
+ Television
99
+ </Tab>
100
+ </TabGroup>
101
+ <div>
102
+ {#if $storeThree === 'a'}
103
+ <h3>Books</h3>
104
+ <p>
105
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
106
+ </p>
107
+ {/if}
108
+ {#if $storeThree === 'b'}
109
+ <h3>Movies</h3>
110
+ <p>
111
+ Nisl nunc mi ipsum faucibus vitae aliquet nec. Ac ut consequat semper viverra nam libero justo laoreet. Nec sagittis aliquam
112
+ malesuada.
113
+ </p>
114
+ {/if}
115
+ {#if $storeThree === 'c'}
116
+ <h3>Television</h3>
117
+ <p>
118
+ Ut sem viverra aliquet eget sit. Porttitor lacus luctus accumsan tortor posuere ac ut consequat. Vulputate enim nulla aliquet
119
+ porttitor.
120
+ </p>
121
+ {/if}
122
+ </div>
123
+ </div>
124
+ </section>
125
+ </svelte:fragment>
126
+
127
+ <!-- Slot: Usage -->
128
+ <svelte:fragment slot="usage">
129
+ <section class="space-y-4">
130
+ <CodeBlock language="typescript" code={`import { writable, type Writable } from 'svelte/store';`} />
131
+ <CodeBlock language="typescript" code={`const storeTab: Writable<string> = writable('a');`} />
132
+ <CodeBlock
133
+ language="html"
134
+ code={`
135
+ <TabGroup selected={storeTab}>
136
+ <Tab value="a">(labelA)</Tab>
137
+ <Tab value="b">(labelB)</Tab>
138
+ </TabGroup>
139
+
140
+ <!-- Conditionally display content -->
141
+ {#if $storeTab === 'a'}Content A{/if}
142
+ {#if $storeTab === 'b'}Content B{/if}`}
143
+ />
144
+ </section>
145
+ </svelte:fragment>
146
+ </DocsShell>
@@ -0,0 +1,130 @@
1
+ <script lang="ts">
2
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
3
+ import AccordionGroup from '$lib/components/Accordion/AccordionGroup.svelte';
4
+ import AccordionItem from '$lib/components/Accordion/AccordionItem.svelte';
5
+ </script>
6
+
7
+ <div class="page-container">
8
+ <!-- Header -->
9
+ <header class="space-y-4">
10
+ <h1>Comparisons</h1>
11
+ <p>See how Skeleton compares to other UI component libraries.</p>
12
+ </header>
13
+
14
+ <hr />
15
+
16
+ <!-- Mantine -->
17
+ <section class="space-y-4">
18
+ <h2>Mantine</h2>
19
+ <a href="https://mantine.dev/" target="_blank" rel="noreferrer">https://mantine.dev/</a>
20
+ <p>
21
+ It’s no secret that Mantine has had a huge influence on the features and design of Skeleton. We love Mantine’s huge set of components,
22
+ modular add-ons, and, of course, the best-in-class documentation. We’re also huge fans of the deep customization provided per
23
+ component. However, Mantine is unfortunately only available for React. That said, the Skeleton team hopes to bridge the gap and
24
+ provide a similar experience for Svelte developers.
25
+ </p>
26
+ </section>
27
+
28
+ <!-- Flowbite -->
29
+ <section class="space-y-4">
30
+ <h2>Flowbite</h2>
31
+ <a href="https://flowbite.com/" target="_blank" rel="noreferrer">https://flowbite.com/</a>
32
+ <p>
33
+ Flowbite provides a set of turnkey HTML/CSS components built with Tailwind’s utility class system. Unlike other libraries, Flowbite
34
+ focuses on a singular and opinionated design aesthetic. Flowbite is a general purpose library, which means it can be used within any
35
+ framework, but also provides framework-specific variations like <a
36
+ href="https://flowbite-svelte.com/"
37
+ target="_blank"
38
+ rel="noreferrer">Flowbite Svelte</a
39
+ >. It’s relatively simple to tailor a Flowbite component to work within an existing Tailwind design system. In fact, it’s even
40
+ possible to pair Flowbite with Skeleton, allowing you to mix and match components, while taking advantage of Skeleton’s theme system.
41
+ </p>
42
+ <div class="card p-4 card-glass-surface">
43
+ <AccordionGroup>
44
+ <AccordionItem>
45
+ <svelte:fragment slot="summary">
46
+ <strong>View Flowbite integration mini-guide.</strong>
47
+ </svelte:fragment>
48
+ <svelte:fragment slot="content">
49
+ <div class="space-y-4 pb-3">
50
+ <p>
51
+ Let's integrate a <a href="https://flowbite.com/docs/components/card/" target="_blank" rel="noreferrer">Flowbite Card</a>.
52
+ Here's the default markup:
53
+ </p>
54
+ <CodeBlock
55
+ language="html"
56
+ code={`
57
+ <a href="#" class="block p-6 max-w-sm bg-white rounded-lg border border-gray-200 shadow-md hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700">
58
+ <h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Flowbite Version</h5>
59
+ <p class="font-normal text-gray-700 dark:text-gray-400">Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
60
+ </a>
61
+ `}
62
+ />
63
+ <p>We make several small adjustments to take advantage of Skeleton's styles and theme system:</p>
64
+ <ul class="list-disc list-inside">
65
+ <li>Replaced all instances of the <code>bg-gray-X</code> class with <code>bg-surface-X</code>.</li>
66
+ <li>Added a <code>!no-outline</code> class to prevent text underlines.</li>
67
+ <li>Modified the the heading to be an H2 and dropped <code>text-2xl font-bold</code> classes.</li>
68
+ <li>Bumped <code>max-w-sm</code> up to <code>max-w-lg</code> to fit our content width.</li>
69
+ </ul>
70
+ <CodeBlock
71
+ language="html"
72
+ code={`
73
+ <a href="#" class="block p-6 max-w-lg bg-white rounded-lg border border-surface-200 shadow-md hover:bg-surface-100 dark:bg-surface-800 dark:border-surface-700 dark:hover:bg-surface-700 !no-underline">
74
+ <h2 class="mb-2 tracking-tight text-surface-900 dark:text-white">Flowbite + Skeleton = ❤️</h2>
75
+ <p class="font-normal text-surface-700 dark:text-surface-400">Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
76
+ </a>
77
+ `}
78
+ />
79
+ <p>Here's the final result. Try toggling various themes to see how the Flowbite component adapts.</p>
80
+ <a
81
+ href="/docs/comparisons"
82
+ class="block p-6 max-w-lg bg-white rounded-lg border border-surface-200 shadow-md hover:bg-surface-100 dark:bg-surface-800 dark:border-surface-700 dark:hover:bg-surface-700 !no-underline"
83
+ >
84
+ <h2 class="mb-2 tracking-tight text-surface-900 dark:text-white">Skeleton + Flowbite = ❤️</h2>
85
+ <p class="font-normal text-surface-700 dark:text-surface-400">Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
86
+ </a>
87
+ </div>
88
+ </svelte:fragment>
89
+ </AccordionItem>
90
+ </AccordionGroup>
91
+ </div>
92
+ </section>
93
+
94
+ <!-- Daisy UI -->
95
+ <section class="space-y-4">
96
+ <h2>Daisy UI</h2>
97
+ <a href="https://daisyui.com/" target="_blank" rel="noreferrer">https://daisyui.com/</a>
98
+ <p>
99
+ Daisy can be compared to Skeleton due to our shared use of Tailwind CSS and highly customizable theme systems. Unfortunately, Daisy
100
+ themes rely on hex color values which <a
101
+ href="https://tailwindcss.com/docs/customizing-colors#using-css-variables"
102
+ target="_blank"
103
+ rel="noreferrer">prevents the use of the opacity modifier syntax</a
104
+ >. Daisy also opts to forgo the biggest benefit of Tailwind, the deeply extensible utility class system, instead relying on
105
+ <a href="https://tailwindcss.com/docs/reusing-styles#avoiding-premature-abstraction" target="_blank" rel="noreferrer">@apply</a> to generate
106
+ canned style sets. Skeleton, on the other hand, treats utility classes as first class citizens, providing hooks to set and override Tailwind
107
+ classes within each component. Skeleton components also accept arbitrary classes, allowing full customization from top to bottom. However,
108
+ it’s worth noting that Daisy is a general purpose library available to any framework, while Skeleton focuses purely on Svelte.
109
+ </p>
110
+ </section>
111
+
112
+ <!-- Svelte Material UI -->
113
+ <section class="space-y-4">
114
+ <h2>Svelte Material UI</h2>
115
+ <a href="https://sveltematerialui.com/" target="_blank" rel="noreferrer">https://sveltematerialui.com/</a>
116
+ <p>
117
+ The founding members of Skeleton are huge fans of Material Design and recognize its influence on modern web UI, UX, and component
118
+ systems in general. Our team has extensive experience with <a href="https://material.angular.io/" target="_blank" rel="noreferrer"
119
+ >Angular Material</a
120
+ >, which adapts the Material Design conventions for the <a href="https://angular.io/" target="_blank" rel="noreferrer">Angular</a>
121
+ framework. This has actually influenced many of the design decisions for creating Skeleton, including our opinions on
122
+ <a href="/elements/forms">form components</a>. It makes sense that Svelte Material UI would be popular, as it bridges the benefits of
123
+ Material Design with the power of Svelte. However, Skeleton has chosen to shy away from the look and feel of Material Design, and
124
+ instead create a more unique aesthetic. Additionally, Skeleton features tight integration with Tailwind to aid in building a fully
125
+ realized design system, allowing you to control every aspect of your interface from the ground up. If, for some reason, you are
126
+ adverse to Tailwind or you wish to lean into the Material Design style, then we would recommend Svelte Material UI. It also has the
127
+ benefit of being one of the oldest and most mature UI component libraries available for Svelte today.
128
+ </p>
129
+ </section>
130
+ </div>