@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,78 @@
1
+ <!-- <script lang="ts"></script> -->
2
+
3
+ <div class="page-container">
4
+ <!-- Header -->
5
+ <header class="space-y-4">
6
+ <h1>Contributions</h1>
7
+ <p>
8
+ Thank you for your interest in contributing to Skeleton. We ask that you please review the sections below in full before submitting
9
+ your first pull request.
10
+ </p>
11
+ </header>
12
+
13
+ <hr />
14
+
15
+ <!-- Resources -->
16
+ <section class="grid grid-cols-1 md:grid-cols-2 gap-4">
17
+ <!-- Article: How to Contribute -->
18
+ <a class="card p-4 space-y-4" href="https://opensource.guide/how-to-contribute/" target="_blank" rel="noreferrer">
19
+ <h2>How to Contribute</h2>
20
+ <p>Are you new to open source? Read this helpful guide covering the basic concepts and best practices for contributing.</p>
21
+ <div class="flex justify-end">
22
+ <button class="btn btn-filled-secondary">Read Article</button>
23
+ </div>
24
+ </a>
25
+ <!-- GitHub: First Contributions -->
26
+ <a class="card p-4 space-y-4" href="https://github.com/firstcontributions/first-contributions" target="_blank" rel="noreferrer">
27
+ <h2>First Contributions</h2>
28
+ <p>Need a guided tour? Follow a written step-by-step guide explaining the process for contributing to open source.</p>
29
+ <div class="flex justify-end">
30
+ <button class="btn btn-filled-secondary">View Project</button>
31
+ </div>
32
+ </a>
33
+ </section>
34
+
35
+ <hr />
36
+
37
+ <section class="space-y-4">
38
+ <h2>Guides</h2>
39
+ <!-- Basics -->
40
+ <a class="card p-4 grid grid-cols-[1fr_auto] gap-4" href="/docs/contributions/requirements">
41
+ <div class="space-y-4">
42
+ <h2>Requirements</h2>
43
+ <p>Ready to contribute to Skeleton? Read our requirements and recommended workflow process.</p>
44
+ </div>
45
+ <button class="btn btn-filled-secondary place-self-center">Read Guide</button>
46
+ </a>
47
+ <!-- Style Guide -->
48
+ <a class="card p-4 grid grid-cols-[1fr_auto] gap-4" href="/docs/contributions/style-guide">
49
+ <div class="space-y-4">
50
+ <h2>Style Guide</h2>
51
+ <p>Review recommended conventions for writing code, naming properties, and handling CSS styling.</p>
52
+ </div>
53
+ <button class="btn btn-filled-secondary place-self-center">Read Guide</button>
54
+ </a>
55
+ <!-- Docs Guide -->
56
+ <a class="card p-4 grid grid-cols-[1fr_auto] gap-4" href="/docs/contributions/documentation">
57
+ <div class="space-y-4">
58
+ <h2>Documentation Guide</h2>
59
+ <p>Good documentation makes life easier for everyone involved, check out how easy it is with this guide.</p>
60
+ </div>
61
+ <button class="btn btn-filled-secondary place-self-center">Read Guide</button>
62
+ </a>
63
+ </section>
64
+
65
+ <hr />
66
+
67
+ <section class="space-y-4">
68
+ <h2>Videos</h2>
69
+ <!-- Testing (video) -->
70
+ <a class="card p-4 grid grid-cols-[1fr_auto] gap-4" href="https://youtu.be/Ru3FtSzN128" target="_blank" rel="noreferrer">
71
+ <div class="space-y-4">
72
+ <h2>Automated Tests</h2>
73
+ <p>Watch an in-depth video covering automated testing with Vitest, provided by Skeleton contributors.</p>
74
+ </div>
75
+ <button class="btn btn-filled-secondary place-self-center">Watch Video</button>
76
+ </a>
77
+ </section>
78
+ </div>
@@ -0,0 +1,217 @@
1
+ <script lang="ts">
2
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
3
+ </script>
4
+
5
+ <div class="page-container">
6
+ <!-- Breadcrumbs -->
7
+ <ol class="breadcrumb">
8
+ <li class="crumb"><a href="/docs/contributions">Contributions</a></li>
9
+ <li class="crumb-separator" aria-hidden>&rsaquo;</li>
10
+ <li>Documentation</li>
11
+ </ol>
12
+
13
+ <!-- Header -->
14
+ <header class="space-y-4">
15
+ <div class="grid grid-cols-[1fr_auto] gap-4">
16
+ <div class="space-y-4">
17
+ <h1>Documentation</h1>
18
+ <p>
19
+ Below is an introduction to automated documentation features, using tools like <a
20
+ href="https://github.com/carbon-design-system/sveld"
21
+ target="_blank"
22
+ rel="noreferrer">Sveld</a
23
+ >. First we'll learn how to document component props, slots, and events. Then we'll cover how to provide this information to the
24
+ documentation pages themselves.
25
+ </p>
26
+ </div>
27
+ <div class="place-self-end grid grid-cols-1 gap-2">
28
+ <a class="btn btn-filled-primary" href="https://github.com/carbon-design-system/sveld" target="_blank" rel="noreferrer"
29
+ >Sveld Documentation</a
30
+ >
31
+ </div>
32
+ </div>
33
+ </header>
34
+
35
+ <hr />
36
+
37
+ <!-- Intro -->
38
+ <section class="space-y-4">
39
+ <h2>Components</h2>
40
+ <p>
41
+ Sveld makes use of <a href="https://tsdoc.org" target="_blank" rel="noreferrer">TSDoc tags</a> (a superset of JSDocs) to generate
42
+ component documentation from the component code itself. This comes with the benefit of providing additional
43
+ <a href="https://code.visualstudio.com/docs/editor/intellisense" target="_blank" rel="noreferrer">Intellisense</a>
44
+ features to aid developers implementing Skeleton components in tools like VS Code. Tap <kbd>Ctrl/⌘ + i</kbd> in a component declaration
45
+ to see the extended docs come through.
46
+ </p>
47
+ </section>
48
+
49
+ <!-- TSDocs -->
50
+ <section class="space-y-4">
51
+ <h3>Props</h3>
52
+ <p><a href="https://github.com/carbon-design-system/sveld#type" target="_blank" rel="noreferrer">Sveld Reference</a></p>
53
+ <p>
54
+ To document component props, simply add TSDoc description comments using the <code>/** ... */</code> format. In most use cases Sveld will
55
+ automatically parse all relevant information - including the prop name, type, value, and your provided description.
56
+ </p>
57
+ <CodeBlock
58
+ language="js"
59
+ code={`
60
+ /** Provide classes to set vertical item spacing. */
61
+ export let space: string = 'space-y-1';
62
+ `}
63
+ />
64
+ <p>
65
+ For non-primitive or custom types, you may need to specify this information. This can be accomplished using the <code>@type</code> tag
66
+ with block-style comments. Specify the type in curly brackets immediately following the tag.
67
+ </p>
68
+ <CodeBlock
69
+ language="js"
70
+ code={`
71
+ /**
72
+ * Bind this to your form data, represents the "files" data from the input.
73
+ * @type {FileList}
74
+ */
75
+ export let files: FileList;
76
+ `}
77
+ />
78
+ <p>
79
+ Ensure you document Context API <code>getContext</code> values to provide Intellisense. However, we intentionally exclude these values
80
+ from the Props table.
81
+ </p>
82
+ <CodeBlock
83
+ language="js"
84
+ code={`
85
+ /** Provide classes to set the hover background color. */
86
+ export let hover: string = getContext('hover');
87
+ `}
88
+ />
89
+ <p>For additonal examples, look at existing components in the project.</p>
90
+ </section>
91
+
92
+ <!-- Slots -->
93
+ <section class="space-y-4">
94
+ <h3>Slots</h3>
95
+ <p><a href="https://github.com/carbon-design-system/sveld#slot" target="_blank" rel="noreferrer">Sveld Reference</a></p>
96
+ <p>
97
+ Slot documentation is provided by placing a TSDoc comment block at the top (by convention) of your script block. Note that Sveld does
98
+ not currently support descriptions for the
99
+ <code>default</code> slot at this time. Instead, we recommend you opt for a Usage tab example and instructions to illustrate the use of
100
+ this slot.
101
+ </p>
102
+ <CodeBlock
103
+ language="js"
104
+ code={`
105
+ // Slots
106
+ /**
107
+ * @slot lead - Provide a leading element, such as an icon.
108
+ * @slot content - Provide the alert message text.
109
+ */`}
110
+ />
111
+ <aside class="alert">
112
+ <i class="fa-solid fa-lightbulb text-2xl" />
113
+ <div class="alert-message">
114
+ <strong>NOTE:</strong> The leading <code>// ...</code> comment is required for Sveld to successfully parse the slot descriptions. This
115
+ is not optional.
116
+ </div>
117
+ </aside>
118
+ </section>
119
+
120
+ <!-- Events -->
121
+ <section class="space-y-4">
122
+ <h3>Events</h3>
123
+ <p><a href="https://github.com/carbon-design-system/sveld#event" target="_blank" rel="noreferrer">Sveld Reference</a></p>
124
+ <p>
125
+ Sveld will automatically document forwarded events. You should not attempt to document these. However, dispatched events may be
126
+ documented similar to props - with a TSDocs comment applied directly above the <code>dispatch()</code> method. Provide the event response
127
+ in curly brackets, followed by the event name, a dash, and then the event description.
128
+ </p>
129
+ <CodeBlock
130
+ language="js"
131
+ code={`
132
+ /** @event {{ event: DragEvent }} dragover - When a file is dragged over the component. */
133
+ dispatch('dragover', event);`}
134
+ />
135
+ </section>
136
+
137
+ <hr />
138
+
139
+ <!-- Documentation Pages -->
140
+ <section class="space-y-4">
141
+ <h2>Documentation Pages</h2>
142
+ <p>
143
+ Now that our components are ready, it's time to create the documentation page that displays all of the information derived by Sveld.
144
+ </p>
145
+ <p>
146
+ We provide a boilerplate template here:<br /><code>/src/routes/(inner)/template/+page.svelte</code>.
147
+ </p>
148
+ <p>
149
+ Copy this to the appropriate file route location and use our recommend naming convention:<br />e.g.
150
+ <code>/routes/components/your-new-component/+page.svelte</code>.
151
+ </p>
152
+ <!-- Documentation Tables -->
153
+ <h3>Documentation Tables</h3>
154
+ <p>To populate each documentation table we'll need to import our Sveld documentation data. Follow the instructions below:</p>
155
+ <ol class="list-decimal list-inside space-y-1">
156
+ <li>
157
+ Create a duplicate of your component import statement, e.g. <code>import Avatar from '$lib/components/Avatar/Avatar.svelte';</code>
158
+ </li>
159
+ <li>Implement a <code>// @ts-expect-error sveld import</code> comment above the new import to silence any warnings.</li>
160
+ <li>Rename the import reference using the convention: <code>Avatar</code> -> <code>sveldAvatar</code>.</li>
161
+ <li>Append the following URL parameters to the end of your import statement, e.g.: <code>.../Accordion.svelte?raw&sveld</code>.</li>
162
+ <li>
163
+ Finally, pass the import reference to the DocShell settings like so: <code>components: [&#123; sveld: sveldAvatar &#125;]</code>
164
+ </li>
165
+ </ol>
166
+ <!-- DocShell Settings -->
167
+ <h3>DocShell Settings</h3>
168
+ <p>
169
+ We can provide settings to our DocShell component using <code>const settings: DocsShellSettings</code>. This allows you to populate
170
+ all relevant settings on the page.
171
+ </p>
172
+ <section class="card p-4 flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0 md:space-x-4">
173
+ <div class="space-y-2">
174
+ <p>Reference all available settings from the Typescript interface defintion.</p>
175
+ </div>
176
+ <a
177
+ class="btn btn-filled-secondary"
178
+ href="https://github.com/skeletonlabs/skeleton/blob/dev/src/docs/DocsShell/types.ts#L42"
179
+ target="_blank"
180
+ rel="noreferrer">View Available Settings</a
181
+ >
182
+ </section>
183
+ <p>Below are existing documentation pages we recommend you reference:</p>
184
+ <ul class="list-disc list-inside space-y-1">
185
+ <li><a href="/elements/buttons">Buttons</a> showcases how to document Tailwind Element classes.</li>
186
+ <li><a href="/components/accordions">Accordion</a> makes use of most Component settings utilizing Sveld.</li>
187
+ <li><a href="/components/paginators">Accordion</a> uses Dipatched Event documentation.</li>
188
+ <li><a href="/utilities/tooltips">Tooltips</a> provides an excellent reference for Action params.</li>
189
+ </ul>
190
+ <!-- Examples -->
191
+ <h3>Examples</h3>
192
+ <p>When showcasing examples of new features we typically handle this by one of two methods:</p>
193
+ <ul class="list-disc list-inside space-y-1">
194
+ <li>
195
+ <strong>Sandbox</strong> (e.g. <a href="/components/range-sliders">Range Sliders</a>) - which provide a dynamic and interactive
196
+ example that can be adjusted live.
197
+ </li>
198
+ <li>
199
+ <strong>Static</strong> (e.g. <a href="/components/accordions">Accordion</a>) - with multiple static examples displaying various
200
+ configurations.
201
+ </li>
202
+ </ul>
203
+ <p>Dynamic examples are preferred, but remember the overall goal is to showcase how the feature operates.</p>
204
+ <!-- Usage -->
205
+ <h3>Usage</h3>
206
+ <p>
207
+ In addition to examples, you should provide multiple use case demonstrations using <code>CodeBlock</code> snippets to help end developers
208
+ understand how to make use of your new components and features.
209
+ </p>
210
+ <!-- Keyboard Interactions -->
211
+ <h3>Keyboard Interactions</h3>
212
+ <p>
213
+ Finally, don't forget to document any relevant keyboard interactions for accessibility. These can easily be provided via the DocShell
214
+ settings.
215
+ </p>
216
+ </section>
217
+ </div>
@@ -0,0 +1,173 @@
1
+ <script lang="ts">
2
+ import type { TableSource } from '$lib/components/Table/types';
3
+
4
+ import Table from '$lib/components/Table/Table.svelte';
5
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
6
+
7
+ // Tables
8
+ const tableProjectStructure: TableSource = {
9
+ head: ['Path', 'Description'],
10
+ body: [
11
+ ['<code>/src/docs</code>', 'Houses Skeleton-specific documentation site components, such as the theme generator.'],
12
+ ['<code>/src/lib</code>', 'Houses only features and assets distributed with the NPM package.'],
13
+ ['<code>/src/routes</code>', 'House documentation pages for the public-facing documentation website, such as this page.']
14
+ ]
15
+ };
16
+ const tableBranches: TableSource = {
17
+ head: ['Branch', 'Description', 'PRs Allowed'],
18
+ body: [
19
+ ['<code>master</code>', 'Represents the production branch. Pull requests sent to this branch will be rejected.', 'No'],
20
+ ['<code>dev</code>', 'The active development branch containing bleeding edge changes. Target this branch for PRs', 'Yes']
21
+ ]
22
+ };
23
+ const tableBranchNaming: TableSource = {
24
+ head: ['Prefix', 'Description'],
25
+ body: [
26
+ ['<code>docs/*</code>', 'Updates to the documentation pages or text copy.'],
27
+ ['<code>feat/*</code>', 'New features, components, or far-reaching updates.'],
28
+ ['<code>chore/*</code>', 'Simple and localized updates.'],
29
+ ['<code>bugfix/*</code>', 'Commits that address or fix issues.']
30
+ ]
31
+ };
32
+ const tableDocs: TableSource = {
33
+ head: ['Path', 'Description'],
34
+ body: [
35
+ ['<code>/src/docs/DocsAppBar</code>', 'The AppBar found at the top of the page.'],
36
+ ['<code>/src/docs/DocFooter</code>', 'The footer found at the bottom of each page.'],
37
+ ['<code>/src/docs/DocsNavigation/DocsDrawer.svelte</code>', 'The left navigation drawer visible on small screens.'],
38
+ ['<code>/src/docs/DocsNavigation/DocsSidebar.svelte</code>', 'The left sidebar component for large screens.'],
39
+ ['<code>/src/docs/DocsNavigation/links.ts</code>', 'Used to configure all sidebar navigation links.'],
40
+ ['<code>/src/docs/DocsThemer</code>', 'The theme generator found on the Getting Starts > Themes section.']
41
+ ]
42
+ };
43
+ </script>
44
+
45
+ <div class="page-container">
46
+ <!-- Breadcrumbs -->
47
+ <ol class="breadcrumb">
48
+ <li class="crumb"><a href="/docs/contributions">Contributions</a></li>
49
+ <li class="crumb-separator" aria-hidden>&rsaquo;</li>
50
+ <li>Requirements</li>
51
+ </ol>
52
+
53
+ <!-- Header -->
54
+ <header class="space-y-4">
55
+ <h1>Requirements</h1>
56
+ <p>If you wish to contribute to Skeleton, please ensure you have read and understand our requirements below.</p>
57
+ </header>
58
+
59
+ <hr />
60
+
61
+ <!-- Roadmap -->
62
+ <section class="space-y-4">
63
+ <h2>Contribution Workflow</h2>
64
+ <ol class="list-decimal list-inside space-y-1">
65
+ <li>
66
+ <a href="https://github.com/skeletonlabs/skeleton/issues" target="_blank" rel="noreferrer">Select an issue</a>
67
+ or
68
+ <a href="https://github.com/skeletonlabs/skeleton/wiki/%F0%9F%9B%A3%EF%B8%8F-The-Skeleton-Roadmap" target="_blank" rel="noreferrer"
69
+ >roadmap task</a
70
+ > you wish to contribute to.
71
+ </li>
72
+ <li>
73
+ Leave a comment, join the <a href="https://github.com/skeletonlabs/skeleton/discussions/79" target="_blank" rel="noreferrer"
74
+ >roadmap discussion</a
75
+ >, or
76
+ <a href="https://discord.gg/EXqV7W8MtY" target="_blank" rel="noreferrer">give us a heads up on Discord</a>.
77
+ </li>
78
+ <li>Review with core contributors to define the requirements before you write your first line of code.</li>
79
+ <li>Follow our branch naming conventions described below.</li>
80
+ <li>Don't be afraid to submit a draft pull request early on to ensure your meeting our guidelines.</li>
81
+ <li>Make sure you run our automated tests to confirm no regressions were introduced from your changes.</li>
82
+ <li>
83
+ Everything needs a docs page to explain how it works to end users. See our <a
84
+ href="/docs/contributions/documentation"
85
+ target="_blank"
86
+ rel="noreferrer">docs section</a
87
+ > for more info.
88
+ </li>
89
+ <li>When ready, submit or set your pull request to the ready state. This will begin the code review process.</li>
90
+ <li>If your PR meets all requirements it will be merged, otherwise feedback will be provided.</li>
91
+ </ol>
92
+ <aside class="alert">
93
+ <i class="fa-solid fa-thumbs-up text-2xl" />
94
+ <div class="alert-message">
95
+ Remember to be a team player, don't be a hero! Open-source is most successful when we all work together.
96
+ </div>
97
+ </aside>
98
+ </section>
99
+
100
+ <hr />
101
+
102
+ <!--Branches -->
103
+ <section class="space-y-4">
104
+ <h2>Branches</h2>
105
+ <Table source={tableBranches} />
106
+ <h4>Feature Branch Conventions</h4>
107
+ <Table source={tableBranchNaming} />
108
+ <p>The wildcards (*) should be replaced with short and semantic descriptions that are lowercase and seperated by dashes.</p>
109
+ <pre>feat/my-new-component-name</pre>
110
+ </section>
111
+
112
+ <hr />
113
+
114
+ <!-- File Names -->
115
+ <section class="space-y-4">
116
+ <h2>File Name Conventions</h2>
117
+ <ul class="list-disc list-inside space-y-1">
118
+ <li>Feature directories should be singular and title case: <code>../LightSwitch/..</code></li>
119
+ <li>Components should be singular and title case: <code>LightSwitch.svelte</code></li>
120
+ <li>Svelte Actions should singular, lowercase, and use Typescript: <code>clipboard.ts</code></li>
121
+ <li>Tailwind Element stylesheets are plural and lowercase: <code>buttons.css</code></li>
122
+ <li>Documentation should be lowercase and use dashes: <code>/routes/components/radio-groups/+page.svelte</code></li>
123
+ <li>
124
+ Tests should be suffixed with <code>*.test.ts</code> and match the feature naming convention: <code>LightSwitch.test.ts</code>
125
+ </li>
126
+ </ul>
127
+ </section>
128
+
129
+ <hr />
130
+
131
+ <!-- Dependencies -->
132
+ <section class="space-y-4">
133
+ <h2>Third Party Dependencies</h2>
134
+ <p>
135
+ Adding additional project depedencies is not allowed without prior discussion. Please contact a core contributor before adding or
136
+ modifying depedencies.
137
+ </p>
138
+ </section>
139
+
140
+ <hr />
141
+
142
+ <!-- Code Formatting -->
143
+ <section class="space-y-4">
144
+ <h2>Code Linting &amp; Formatting</h2>
145
+ <p>
146
+ This is is handled via <a href="https://prettier.io/" target="_blank" rel="noreferrer">Prettier</a>. To check for linting issues, run:
147
+ </p>
148
+ <CodeBlock language="console" code={`npm run lint`} />
149
+ <p>To automatically apply formatting, run:</p>
150
+ <CodeBlock language="console" code={`npm run format`} />
151
+ </section>
152
+
153
+ <hr />
154
+
155
+ <!-- Automated Tests -->
156
+ <section class="space-y-4">
157
+ <h2>Automated Tests</h2>
158
+ <p>
159
+ Tests are handled via <a href="https://vitest.dev/" target="_blank" rel="noreferrer">Vitest</a>, which uses similar conventions and
160
+ syntax to Jest. Please ensure you write or update tests before submitting a pull request.
161
+ </p>
162
+ <CodeBlock language="console" code={`npm run test`} />
163
+ </section>
164
+
165
+ <hr />
166
+
167
+ <!-- Project Structure -->
168
+ <section class="space-y-4">
169
+ <h2>Project Structure</h2>
170
+ <Table source={tableProjectStructure} />
171
+ <Table source={tableDocs} />
172
+ </section>
173
+ </div>
@@ -0,0 +1,164 @@
1
+ <script lang="ts">
2
+ import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
3
+ </script>
4
+
5
+ <div class="page-container">
6
+ <!-- Breadcrumbs -->
7
+ <ol class="breadcrumb">
8
+ <li class="crumb"><a href="/docs/contributions">Contributions</a></li>
9
+ <li class="crumb-separator" aria-hidden>&rsaquo;</li>
10
+ <li>Style Guide</li>
11
+ </ol>
12
+
13
+ <!-- Header -->
14
+ <header class="space-y-4">
15
+ <h1>Style Guide</h1>
16
+ <p>If you wish to contribute to Skeleton, please review our opinionated code style guide below.</p>
17
+ </header>
18
+
19
+ <hr />
20
+
21
+ <!-- Component -->
22
+ <section class="space-y-4">
23
+ <h2>General Conventions</h2>
24
+ <p>
25
+ Ensure relevant events bubble via <a href="https://svelte.dev/tutorial/dom-event-forwarding" target="_blank" rel="noreferrer"
26
+ >event forwarding</a
27
+ >.
28
+ </p>
29
+ <CodeBlock language="html" code={`<button on:click on:mouseover>Skeleton</button>`} />
30
+ <p>
31
+ Follow conventions set by existing components when naming slots. These should be short, semantic, and agnostic. Avoid names that are
32
+ too specific, such as <code>name="icon"</code>.
33
+ </p>
34
+ <CodeBlock language="html" code={`{#if $$slots.lead}<slot name="lead" />{/if}`} />
35
+ <p>Use caution when inlining Tailwind color classes that would clash with custom themes. Consider using a prop for customization.</p>
36
+ <CodeBlock
37
+ language="html"
38
+ code={`
39
+ ❌ <div class="bg-orange-500">Skeleton</div>
40
+ ✅ <div class="bg-secondary-500">Skeleton</div>
41
+ `.trim()}
42
+ />
43
+ <p>
44
+ If you need to include miscellaneous attributes that were not defined as props, use Svelte's <code>$$restProps</code>. Be careful
45
+ though, this can overwrite the element's
46
+ <code>$$props.class</code>
47
+ attribute. To avoid this, delete the <code>class</code> key from <code>$$restProps</code>. The function provided below can handle this
48
+ on both in it and after any form of attribute updates.
49
+ </p>
50
+ <CodeBlock
51
+ language="js"
52
+ code={`
53
+ function prunedRestProps(): any {
54
+ delete $$restProps.class;
55
+ return $$restProps;
56
+ }`}
57
+ />
58
+ <CodeBlock language="html" code={`<button class="... {$$props.class ?? ''}" {...prunedRestProps()}>Skeleton</button>`} />
59
+ </section>
60
+
61
+ <hr />
62
+
63
+ <!-- Properties -->
64
+ <section class="space-y-4">
65
+ <h2>Property Naming Conventions</h2>
66
+ <p>Follow these guidelines when creating or adding new component props.</p>
67
+ <ul class="list-disc list-inside space-y-1">
68
+ <li>Each prop should be a single word, all lowercase, and semantic. Match Tailwind class naming conventions whenever possible.</li>
69
+ <li>Color props should follow standard CSS style conventions (ex: <code>color</code> for text color).</li>
70
+ <li>If you need multiple words, use camel-casing (ex: <code>ringWidth</code>).</li>
71
+ <li>Never pass class props as arrays or objects. Strings work better (ex: <code>border border-primary-500</code>).</li>
72
+ <li>Always pass the full Tailwind class name. <u>Tailwind does not support contructed class names</u>.</li>
73
+ <li>Ensure Typescript types are provided and set relevant default values when possible.</li>
74
+ <li>If a new prop is added or modified then please update the documentation. End users need to know this!</li>
75
+ </ul>
76
+ <p>Here's a few examples:</p>
77
+ <CodeBlock
78
+ language="typescript"
79
+ code={`
80
+ export let background: string = 'bg-primary-500'; // background color
81
+ export let color: string = 'text-primary-500'; // text color
82
+ export let rounded: string = 'rounded-xl'; // border radius
83
+ export let visible: boolean = false;
84
+ `}
85
+ />
86
+ </section>
87
+
88
+ <hr />
89
+
90
+ <!-- Styles -->
91
+ <section class="space-y-4">
92
+ <h2>CSS Styling Conventions</h2>
93
+ <p>
94
+ Skeleton utilizes a specific paradigm for handling static and dynamic Tailwind styles for components. This is accomplished by passing
95
+ Tailwind classes to the component as props, as well as by defining base structural classes within the component's script tag. While
96
+ this may feel odd at first, you will find it works really well in execution.
97
+ </p>
98
+ <!-- Base Classes -->
99
+ <h3>Base Classes</h3>
100
+ <p>
101
+ Any core or structural Tailwind classes can be defined as follows. Note the "c" is short for <strong>classes</strong>.
102
+ </p>
103
+ <CodeBlock
104
+ language="typescript"
105
+ code={`
106
+ let cBase: string = 'bg-surface-500 p-4 rounded'; // parent element styles
107
+ let cLabel: string = 'text-base'; // child element label styles
108
+ `}
109
+ />
110
+ <!-- Dynamic Classes -->
111
+ <h3>Dynamic Classes</h3>
112
+ <p>If you expect to set one or more styles based on the current value of a property, handle this within a function as shown below.</p>
113
+ <CodeBlock
114
+ language="typescript"
115
+ code={`
116
+ // Prop for outlined state
117
+ export let outlined: boolean;
118
+
119
+ // Create a reactive property that uses a tertiary statement
120
+ $: classesOutlined = outlined ? 'border-2 border-primary-500' : 'border-none';
121
+ `}
122
+ />
123
+ <!-- Reactive Classes -->
124
+ <h3>Reactive Classes</h3>
125
+ <p>Reactive classes combine all base and dynamic classes. These are applied directly to each respective element.</p>
126
+ <CodeBlock
127
+ language="typescript"
128
+ code={`
129
+ $: classesTab = \`\${cBase} \${classesOutlined}\`; // parent element
130
+ $: classesLabel = \`\${cBaseLabel}\`; // child element
131
+ `}
132
+ />
133
+ <p>Classes are applied in three ways:</p>
134
+ <ol class="list-decimal list-inside space-y-1">
135
+ <li>The first class should be an "identifier" class, providing a selection target for global stylesheet overrides.</li>
136
+ <li>The combined set of reactive class values, which can mix base and dynamic classes.</li>
137
+ <li>For parent elements, add <code>$$props.classes</code> to supply additional arbitrary classes.</li>
138
+ </ol>
139
+ <CodeBlock
140
+ language="html"
141
+ code={`
142
+ <div class="tab {classesTab} {$$props.classes ?? ''}">
143
+ <span class="tab-label {classesLabel}">Label</span>
144
+ </div>
145
+ `}
146
+ />
147
+ </section>
148
+
149
+ <hr />
150
+
151
+ <!-- Pitfalls -->
152
+ <section class="space-y-4">
153
+ <h2>Pitfalls</h2>
154
+ <p>Below are a few pitfalls we've encountered when creating Skeleton. Do your best to avoid these whenever possible.</p>
155
+ <ul class="list-disc list-inside space-y-1">
156
+ <li>
157
+ Avoid <code>style</code> blocks and <code>@apply</code> in component files. This can increase the final stylesheet bundle size.
158
+ </li>
159
+ <li>Do not mix script-defined and inline Tailwind classes. Doing so can have a negative impact on the readability of the code.</li>
160
+ <li>Avoid switch-case statements to create shorthand property values (ex: sm, md, lg). This limits customization.</li>
161
+ <li>Keep Skeleton icon library agnostic. Embed SVGs or unicode instead. Consider adding a component slot if an icon is required.</li>
162
+ </ul>
163
+ </section>
164
+ </div>