@skeletonlabs/skeleton 0.92.1 → 0.99.5
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.
- package/actions/Clipboard/clipboard.d.ts +4 -0
- package/actions/Clipboard/clipboard.js +37 -0
- package/actions/Filters/filter.d.ts +3 -0
- package/actions/Filters/filter.js +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Apollo.svelte +0 -0
- package/actions/Filters/svg-filters/Apollo.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/BlueNight.svelte +0 -0
- package/actions/Filters/svg-filters/BlueNight.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Emerald.svelte +0 -0
- package/actions/Filters/svg-filters/Emerald.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/GreenFall.svelte +0 -0
- package/actions/Filters/svg-filters/GreenFall.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Noir.svelte +0 -0
- package/actions/Filters/svg-filters/Noir.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/NoirLight.svelte +0 -0
- package/actions/Filters/svg-filters/NoirLight.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Rustic.svelte +0 -0
- package/actions/Filters/svg-filters/Rustic.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Summer84.svelte +0 -0
- package/actions/Filters/svg-filters/Summer84.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/XPro.svelte +0 -0
- package/actions/Filters/svg-filters/XPro.svelte.d.ts +23 -0
- package/actions/FocusTrap/focusTrap.d.ts +4 -0
- package/actions/FocusTrap/focusTrap.js +53 -0
- package/components/Accordion/AccordionGroup.svelte +33 -0
- package/components/Accordion/AccordionGroup.svelte.d.ts +24 -0
- package/components/Accordion/AccordionItem.svelte +57 -0
- package/components/Accordion/AccordionItem.svelte.d.ts +36 -0
- package/components/AppBar/AppBar.svelte +38 -0
- package/components/AppBar/AppBar.svelte.d.ts +30 -0
- package/components/AppRail/AppRail.svelte +30 -0
- package/components/AppRail/AppRail.svelte.d.ts +32 -0
- package/components/AppRail/AppRailTile.svelte +43 -0
- package/components/AppRail/AppRailTile.svelte.d.ts +33 -0
- package/components/AppShell/AppShell.svelte +70 -0
- package/components/AppShell/AppShell.svelte.d.ts +31 -0
- package/components/Avatar/Avatar.svelte +29 -0
- package/components/Avatar/Avatar.svelte.d.ts +32 -0
- package/components/ConicGradient/ConicGradient.svelte +64 -0
- package/components/ConicGradient/ConicGradient.svelte.d.ts +29 -0
- package/components/ConicGradient/settings.d.ts +13 -0
- package/components/ConicGradient/settings.js +335 -0
- package/components/ConicGradient/types.d.ts +10 -0
- package/components/ConicGradient/types.js +2 -0
- package/components/FileButton/FileButton.svelte +28 -0
- package/components/FileButton/FileButton.svelte.d.ts +25 -0
- package/components/FileDropzone/FileDropzone.svelte +75 -0
- package/components/FileDropzone/FileDropzone.svelte.d.ts +32 -0
- package/components/InputChip/InputChip.svelte +77 -0
- package/components/InputChip/InputChip.svelte.d.ts +28 -0
- package/components/ListBox/ListBox.svelte +37 -0
- package/components/ListBox/ListBox.svelte.d.ts +30 -0
- package/components/ListBox/ListBoxItem.svelte +72 -0
- package/components/ListBox/ListBoxItem.svelte.d.ts +32 -0
- package/components/Paginator/Paginator.svelte +58 -0
- package/components/Paginator/Paginator.svelte.d.ts +29 -0
- package/components/Paginator/types.d.ts +10 -0
- package/components/Paginator/types.js +2 -0
- package/components/ProgressBar/ProgressBar.svelte +55 -0
- package/components/ProgressBar/ProgressBar.svelte.d.ts +24 -0
- package/components/ProgressRadial/ProgressRadial.svelte +71 -0
- package/components/ProgressRadial/ProgressRadial.svelte.d.ts +25 -0
- package/components/Radio/RadioGroup.svelte +29 -0
- package/components/Radio/RadioGroup.svelte.d.ts +31 -0
- package/components/Radio/RadioItem.svelte +49 -0
- package/components/Radio/RadioItem.svelte.d.ts +33 -0
- package/components/RangeSlider/RangeSlider.svelte +78 -0
- package/components/RangeSlider/RangeSlider.svelte.d.ts +32 -0
- package/components/SlideToggle/SlideToggle.svelte +88 -0
- package/components/SlideToggle/SlideToggle.svelte.d.ts +34 -0
- package/components/Stepper/Step.svelte +125 -0
- package/components/Stepper/Step.svelte.d.ts +39 -0
- package/components/Stepper/Stepper.svelte +43 -0
- package/components/Stepper/Stepper.svelte.d.ts +32 -0
- package/components/SvgIcon/SvgIcon.svelte +33 -0
- package/components/SvgIcon/SvgIcon.svelte.d.ts +26 -0
- package/components/SvgIcon/icons.d.ts +1 -0
- package/components/SvgIcon/icons.js +25 -0
- package/components/Tab/Tab.svelte +54 -0
- package/components/Tab/Tab.svelte.d.ts +37 -0
- package/components/Tab/TabGroup.svelte +51 -0
- package/components/Tab/TabGroup.svelte.d.ts +30 -0
- package/components/Table/Table.svelte +83 -0
- package/components/Table/Table.svelte.d.ts +27 -0
- package/components/Table/types.d.ts +10 -0
- package/components/Table/types.js +1 -0
- package/components/Table/utils.d.ts +7 -0
- package/{src/lib/components/Table/utils.ts → components/Table/utils.js} +10 -16
- package/components/TableOfContents/TableOfContents.svelte +100 -0
- package/components/TableOfContents/TableOfContents.svelte.d.ts +32 -0
- package/{src/lib/index.ts → index.d.ts} +1 -36
- package/index.js +66 -0
- package/package.json +159 -61
- package/{src/lib/styles → styles}/all.css +3 -0
- package/{src/lib/styles → styles}/core.css +11 -2
- package/styles/elements/alerts.css +17 -0
- package/{src/lib/styles → styles}/elements/badges.css +0 -25
- package/{src/lib/styles → styles}/elements/breadcrumbs.css +3 -3
- package/styles/elements/buttons.css +101 -0
- package/styles/elements/cards.css +32 -0
- package/styles/elements/chips.css +22 -0
- package/{src/lib/styles → styles}/elements/lists.css +4 -3
- package/{src/lib/styles → styles}/elements/logo-clouds.css +2 -4
- package/{src/lib/styles → styles}/elements/menus.css +0 -0
- package/{src/lib/styles → styles}/elements/placeholders.css +0 -0
- package/{src/lib/styles → styles}/elements/tables.css +14 -10
- package/{src/lib/styles → styles}/elements/tooltips.css +0 -0
- package/{src/lib/styles → styles}/elements.css +0 -0
- package/styles/forms.css +195 -0
- package/{src/lib/styles → styles}/highlight-js.css +0 -0
- package/styles/tailwind.css +16 -0
- package/styles/typography.css +99 -0
- package/styles/variants.css +154 -0
- package/{src/lib/tailwind/skeleton.cjs → tailwind/core.cjs} +1 -14
- package/tailwind/core.d.cts +5 -0
- package/tailwind/generated/intellisense-classes.cjs +1 -0
- package/tailwind/generated/intellisense-classes.d.cts +1956 -0
- package/tailwind/intellisense.cjs +21 -0
- package/tailwind/intellisense.d.cts +5 -0
- package/tailwind/settings.cjs +20 -0
- package/tailwind/settings.d.cts +6 -0
- package/tailwind/skeleton.cjs +19 -0
- package/tailwind/skeleton.d.cts +7 -0
- package/{src/lib/tailwind → tailwind}/theme/colors.cjs +7 -7
- package/tailwind/theme/colors.d.cts +2 -0
- package/tailwind/tokens/backgrounds.cjs +38 -0
- package/tailwind/tokens/backgrounds.d.cts +2 -0
- package/tailwind/tokens/border-radius.cjs +21 -0
- package/tailwind/tokens/border-radius.d.cts +33 -0
- package/tailwind/tokens/borders.cjs +20 -0
- package/tailwind/tokens/borders.d.cts +6 -0
- package/tailwind/tokens/fills.cjs +20 -0
- package/tailwind/tokens/fills.d.cts +15 -0
- package/tailwind/tokens/rings.cjs +50 -0
- package/tailwind/tokens/rings.d.cts +22 -0
- package/tailwind/tokens/text.cjs +31 -0
- package/tailwind/tokens/text.d.cts +21 -0
- package/{src/lib/themes → themes}/theme-crimson.css +0 -0
- package/{src/lib/themes → themes}/theme-gold-nouveau.css +0 -0
- package/{src/lib/themes → themes}/theme-hamlindigo.css +0 -0
- package/{src/lib/themes → themes}/theme-modern.css +0 -0
- package/{src/lib/themes → themes}/theme-rocket.css +0 -0
- package/{src/lib/themes → themes}/theme-sahara.css +0 -0
- package/{src/lib/themes → themes}/theme-seafoam.css +0 -0
- package/{src/lib/themes → themes}/theme-seasonal.css +0 -0
- package/{src/lib/themes → themes}/theme-skeleton.css +6 -6
- package/{src/lib/themes → themes}/theme-vintage.css +0 -0
- package/utilities/CodeBlock/CodeBlock.svelte +54 -0
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +25 -0
- package/utilities/CodeBlock/stores.d.ts +2 -0
- package/utilities/CodeBlock/stores.js +3 -0
- package/utilities/DataTable/DataTable.d.ts +18 -0
- package/utilities/DataTable/DataTable.js +137 -0
- package/utilities/DataTable/actions.d.ts +8 -0
- package/utilities/DataTable/actions.js +114 -0
- package/utilities/DataTable/types.d.ts +33 -0
- package/utilities/DataTable/types.js +2 -0
- package/utilities/Drawer/Drawer.svelte +134 -0
- package/utilities/Drawer/Drawer.svelte.d.ts +33 -0
- package/utilities/Drawer/stores.d.ts +10 -0
- package/utilities/Drawer/stores.js +21 -0
- package/utilities/Drawer/types.d.ts +33 -0
- package/utilities/Drawer/types.js +2 -0
- package/utilities/LightSwitch/LightSwitch.svelte +80 -0
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +21 -0
- package/utilities/LightSwitch/stores.d.ts +2 -0
- package/utilities/LightSwitch/stores.js +5 -0
- package/utilities/LocalStorageStore/LocalStorageStore.d.ts +12 -0
- package/utilities/LocalStorageStore/LocalStorageStore.js +49 -0
- package/utilities/Menu/menu.d.ts +18 -0
- package/utilities/Menu/menu.js +151 -0
- package/utilities/Modal/Modal.svelte +160 -0
- package/utilities/Modal/Modal.svelte.d.ts +35 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleEmbed.svelte +3 -8
- package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +17 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleForm.svelte +17 -27
- package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +17 -0
- package/utilities/Modal/examples/ModalExampleImage.svelte +19 -0
- package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +16 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleList.svelte +10 -18
- package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +17 -0
- package/utilities/Modal/stores.d.ts +12 -0
- package/utilities/Modal/stores.js +24 -0
- package/utilities/Modal/types.d.ts +36 -0
- package/utilities/Modal/types.js +2 -0
- package/utilities/Toast/Toast.svelte +95 -0
- package/utilities/Toast/Toast.svelte.d.ts +28 -0
- package/utilities/Toast/stores.d.ts +10 -0
- package/utilities/Toast/stores.js +69 -0
- package/utilities/Toast/types.d.ts +26 -0
- package/utilities/Toast/types.js +2 -0
- package/utilities/Tooltip/tooltip.d.ts +35 -0
- package/utilities/Tooltip/tooltip.js +94 -0
- package/.eslintrc.cjs +0 -20
- package/.github/FUNDING.yml +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -30
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/docs_issue.yml +0 -23
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -22
- package/.github/pull_request_template.md +0 -14
- package/.prettierignore +0 -12
- package/.prettierrc +0 -6
- package/postcss.config.cjs +0 -14
- package/scripts/compile-css-to-js.cjs +0 -50
- package/scripts/generate-jss.js +0 -67
- package/scripts/post-build.js +0 -17
- package/scripts/pre-build.js +0 -14
- package/src/app.d.ts +0 -13
- package/src/app.html +0 -43
- package/src/app.postcss +0 -10
- package/src/docs/DocsAppBar/DocsAppBar.svelte +0 -213
- package/src/docs/DocsFooter/DocsFooter.svelte +0 -78
- package/src/docs/DocsLogo/DocsLogoAnim.svelte +0 -44
- package/src/docs/DocsLogo/DocsLogoFull.svelte +0 -11
- package/src/docs/DocsLogo/DocsLogoIcon.svelte +0 -6
- package/src/docs/DocsNavigation/DocsDrawer.svelte +0 -23
- package/src/docs/DocsNavigation/DocsSidebar.svelte +0 -103
- package/src/docs/DocsNavigation/links.ts +0 -148
- package/src/docs/DocsSearch/DocsSearch.svelte +0 -78
- package/src/docs/DocsShell/DocsShell.svelte +0 -377
- package/src/docs/DocsShell/sveldMapper.ts +0 -143
- package/src/docs/DocsShell/types.ts +0 -96
- package/src/docs/DocsStyles/blog.css +0 -192
- package/src/docs/DocsThemer/DocsThemer.svelte +0 -254
- package/src/docs/DocsThemer/Swatch.svelte +0 -28
- package/src/docs/DocsThemer/colors.ts +0 -122
- package/src/docs/DocsThemer/settings.ts +0 -129
- package/src/docs/DocsThemer/stores.ts +0 -5
- package/src/docs/DocsThemer/types.ts +0 -20
- package/src/docs/README.md +0 -3
- package/src/docs/stores.ts +0 -15
- package/src/lib/actions/Clipboard/clipboard.ts +0 -39
- package/src/lib/actions/Filters/filter.test.ts +0 -40
- package/src/lib/actions/Filters/filter.ts +0 -23
- package/src/lib/actions/FocusTrap/focusTrap.ts +0 -56
- package/src/lib/components/Accordion/AccordionGroup.svelte +0 -53
- package/src/lib/components/Accordion/AccordionGroup.test.ts +0 -22
- package/src/lib/components/Accordion/AccordionItem.svelte +0 -80
- package/src/lib/components/Accordion/AccordionItem.test.ts +0 -28
- package/src/lib/components/Alert/Alert.svelte +0 -71
- package/src/lib/components/Alert/Alert.test.ts +0 -30
- package/src/lib/components/AppBar/AppBar.svelte +0 -60
- package/src/lib/components/AppBar/AppBar.test.ts +0 -31
- package/src/lib/components/AppRail/AppRail.svelte +0 -58
- package/src/lib/components/AppRail/AppRailTile.svelte +0 -66
- package/src/lib/components/AppShell/AppShell.svelte +0 -84
- package/src/lib/components/AppShell/AppShell.test.ts +0 -26
- package/src/lib/components/Avatar/Avatar.svelte +0 -51
- package/src/lib/components/Avatar/Avatar.test.ts +0 -41
- package/src/lib/components/Breadcrumb/Breadcrumb.svelte +0 -30
- package/src/lib/components/Breadcrumb/Breadcrumb.test.ts +0 -20
- package/src/lib/components/Breadcrumb/Crumb.svelte +0 -44
- package/src/lib/components/Breadcrumb/Crumb.test.ts +0 -48
- package/src/lib/components/ConicGradient/ConicGradient.svelte +0 -88
- package/src/lib/components/ConicGradient/ConicGradient.test.ts +0 -26
- package/src/lib/components/ConicGradient/settings.ts +0 -345
- package/src/lib/components/ConicGradient/types.ts +0 -12
- package/src/lib/components/Divider/Divider.svelte +0 -26
- package/src/lib/components/Divider/Divider.test.ts +0 -32
- package/src/lib/components/FileButton/FileButton.svelte +0 -29
- package/src/lib/components/FileButton/FileButton.test.ts +0 -32
- package/src/lib/components/FileDropzone/FileDropzone.svelte +0 -108
- package/src/lib/components/FileDropzone/FileDropzone.test.ts +0 -32
- package/src/lib/components/GradientHeading/GradientHeading.svelte +0 -24
- package/src/lib/components/GradientHeading/GradientHeading.test.ts +0 -30
- package/src/lib/components/InputChip/InputChip.svelte +0 -118
- package/src/lib/components/ListBox/ListBox.svelte +0 -65
- package/src/lib/components/ListBox/ListBox.test.ts +0 -48
- package/src/lib/components/ListBox/ListBoxItem.svelte +0 -99
- package/src/lib/components/ListBox/ListBoxItem.test.ts +0 -22
- package/src/lib/components/Paginator/Paginator.svelte +0 -84
- package/src/lib/components/Paginator/Paginator.test.ts +0 -29
- package/src/lib/components/Paginator/types.ts +0 -12
- package/src/lib/components/ProgressBar/ProgressBar.svelte +0 -73
- package/src/lib/components/ProgressBar/ProgressBar.test.ts +0 -27
- package/src/lib/components/ProgressRadial/ProgressRadial.svelte +0 -98
- package/src/lib/components/ProgressRadial/ProgressRadial.test.ts +0 -26
- package/src/lib/components/Radio/RadioGroup.svelte +0 -54
- package/src/lib/components/Radio/RadioGroup.test.ts +0 -35
- package/src/lib/components/Radio/RadioItem.svelte +0 -71
- package/src/lib/components/Radio/RadioItem.test.ts +0 -32
- package/src/lib/components/RangeSlider/RangeSlider.svelte +0 -110
- package/src/lib/components/RangeSlider/RangeSlider.test.ts +0 -44
- package/src/lib/components/SlideToggle/SlideToggle.svelte +0 -106
- package/src/lib/components/SlideToggle/SlideToggle.test.ts +0 -23
- package/src/lib/components/Stepper/Step.svelte +0 -140
- package/src/lib/components/Stepper/Step.test.ts +0 -21
- package/src/lib/components/Stepper/Stepper.svelte +0 -71
- package/src/lib/components/Stepper/Stepper.test.ts +0 -31
- package/src/lib/components/SvgIcon/SvgIcon.svelte +0 -50
- package/src/lib/components/SvgIcon/SvgIcon.test.ts +0 -28
- package/src/lib/components/SvgIcon/icons.ts +0 -29
- package/src/lib/components/Tab/Tab.svelte +0 -79
- package/src/lib/components/Tab/Tab.test.ts +0 -26
- package/src/lib/components/Tab/TabGroup.svelte +0 -78
- package/src/lib/components/Tab/TabGroup.test.ts +0 -30
- package/src/lib/components/Table/Table.svelte +0 -106
- package/src/lib/components/Table/types.ts +0 -10
- package/src/lib/components/TableOfContents/TableOfContents.svelte +0 -139
- package/src/lib/styles/elements/alerts.css +0 -43
- package/src/lib/styles/elements/buttons.css +0 -186
- package/src/lib/styles/elements/cards.css +0 -59
- package/src/lib/styles/elements/chips.css +0 -71
- package/src/lib/styles/forms.css +0 -178
- package/src/lib/styles/tailwind.css +0 -12
- package/src/lib/styles/typography.css +0 -115
- package/src/lib/tailwind/settings.cjs +0 -20
- package/src/lib/tailwind/tokens/backgrounds.cjs +0 -40
- package/src/lib/tailwind/tokens/border-radius.cjs +0 -21
- package/src/lib/tailwind/tokens/borders.cjs +0 -20
- package/src/lib/tailwind/tokens/fills.cjs +0 -20
- package/src/lib/tailwind/tokens/rings.cjs +0 -42
- package/src/lib/tailwind/tokens/text.cjs +0 -33
- package/src/lib/themes/theme-test.css +0 -96
- package/src/lib/utilities/CodeBlock/CodeBlock.svelte +0 -78
- package/src/lib/utilities/CodeBlock/CodeBlock.test.ts +0 -27
- package/src/lib/utilities/CodeBlock/stores.ts +0 -5
- package/src/lib/utilities/DataTable/DataTable.ts +0 -151
- package/src/lib/utilities/DataTable/actions.ts +0 -100
- package/src/lib/utilities/DataTable/types.ts +0 -33
- package/src/lib/utilities/Drawer/Drawer.svelte +0 -173
- package/src/lib/utilities/Drawer/Drawer.test.ts +0 -15
- package/src/lib/utilities/Drawer/stores.ts +0 -27
- package/src/lib/utilities/Drawer/types.ts +0 -47
- package/src/lib/utilities/LightSwitch/LightSwitch.svelte +0 -116
- package/src/lib/utilities/LightSwitch/LightSwitch.test.ts +0 -19
- package/src/lib/utilities/LightSwitch/stores.ts +0 -7
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.test.ts +0 -220
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.ts +0 -77
- package/src/lib/utilities/Menu/menu.test.ts +0 -22
- package/src/lib/utilities/Menu/menu.ts +0 -172
- package/src/lib/utilities/Modal/Modal.svelte +0 -206
- package/src/lib/utilities/Modal/Modal.test.ts +0 -50
- package/src/lib/utilities/Modal/stores.ts +0 -29
- package/src/lib/utilities/Modal/types.ts +0 -39
- package/src/lib/utilities/Toast/Toast.svelte +0 -95
- package/src/lib/utilities/Toast/Toats.test.ts +0 -25
- package/src/lib/utilities/Toast/stores.ts +0 -63
- package/src/lib/utilities/Toast/types.ts +0 -29
- package/src/lib/utilities/Tooltip/tooltip.ts +0 -137
- package/src/routes/(inner)/+layout.svelte +0 -3
- package/src/routes/(inner)/actions/clipboard/+page.svelte +0 -87
- package/src/routes/(inner)/actions/filters/+page.svelte +0 -151
- package/src/routes/(inner)/actions/focus-trap/+page.svelte +0 -59
- package/src/routes/(inner)/components/accordions/+page.svelte +0 -127
- package/src/routes/(inner)/components/alerts/+page.svelte +0 -130
- package/src/routes/(inner)/components/app-bar/+page.svelte +0 -52
- package/src/routes/(inner)/components/app-rail/+page.svelte +0 -105
- package/src/routes/(inner)/components/app-shell/+page.svelte +0 -159
- package/src/routes/(inner)/components/avatars/+page.svelte +0 -193
- package/src/routes/(inner)/components/breadcrumbs/+page.svelte +0 -121
- package/src/routes/(inner)/components/conic-gradients/+page.svelte +0 -161
- package/src/routes/(inner)/components/dividers/+page.svelte +0 -146
- package/src/routes/(inner)/components/file-buttons/+page.svelte +0 -46
- package/src/routes/(inner)/components/file-dropzone/+page.svelte +0 -71
- package/src/routes/(inner)/components/gradient-headings/+page.svelte +0 -138
- package/src/routes/(inner)/components/input-chips/+page.svelte +0 -128
- package/src/routes/(inner)/components/listboxes/+page.svelte +0 -92
- package/src/routes/(inner)/components/paginators/+page.svelte +0 -118
- package/src/routes/(inner)/components/progress-bars/+page.svelte +0 -157
- package/src/routes/(inner)/components/progress-radials/+page.svelte +0 -64
- package/src/routes/(inner)/components/radio-groups/+page.svelte +0 -91
- package/src/routes/(inner)/components/range-sliders/+page.svelte +0 -134
- package/src/routes/(inner)/components/slide-toggles/+page.svelte +0 -63
- package/src/routes/(inner)/components/steppers/+page.svelte +0 -168
- package/src/routes/(inner)/components/svg-icons/+page.svelte +0 -60
- package/src/routes/(inner)/components/table-of-contents/+page.svelte +0 -110
- package/src/routes/(inner)/components/tables/+page.svelte +0 -216
- package/src/routes/(inner)/components/tabs/+page.svelte +0 -146
- package/src/routes/(inner)/docs/comparisons/+page.svelte +0 -130
- package/src/routes/(inner)/docs/contributions/+page.svelte +0 -78
- package/src/routes/(inner)/docs/contributions/documentation/+page.svelte +0 -217
- package/src/routes/(inner)/docs/contributions/requirements/+page.svelte +0 -173
- package/src/routes/(inner)/docs/contributions/style-guide/+page.svelte +0 -164
- package/src/routes/(inner)/docs/faqs/+page.svelte +0 -80
- package/src/routes/(inner)/docs/features/+page.svelte +0 -121
- package/src/routes/(inner)/docs/recommended/+page.svelte +0 -162
- package/src/routes/(inner)/docs/why/+page.svelte +0 -104
- package/src/routes/(inner)/elements/alerts/+page.svelte +0 -142
- package/src/routes/(inner)/elements/badges/+page.svelte +0 -155
- package/src/routes/(inner)/elements/breadcrumbs/+page.svelte +0 -132
- package/src/routes/(inner)/elements/buttons/+page.svelte +0 -304
- package/src/routes/(inner)/elements/cards/+page.svelte +0 -117
- package/src/routes/(inner)/elements/chips/+page.svelte +0 -130
- package/src/routes/(inner)/elements/core/+page.svelte +0 -98
- package/src/routes/(inner)/elements/forms/+page.svelte +0 -89
- package/src/routes/(inner)/elements/forms/preview/+page.svelte +0 -256
- package/src/routes/(inner)/elements/lists/+page.svelte +0 -197
- package/src/routes/(inner)/elements/logo-clouds/+page.svelte +0 -105
- package/src/routes/(inner)/elements/placeholders/+page.svelte +0 -70
- package/src/routes/(inner)/elements/tables/+page.svelte +0 -138
- package/src/routes/(inner)/elements/tokens/+page.svelte +0 -176
- package/src/routes/(inner)/elements/typography/+page.svelte +0 -100
- package/src/routes/(inner)/guides/install/+page.svelte +0 -84
- package/src/routes/(inner)/guides/quickstart/+page.svelte +0 -118
- package/src/routes/(inner)/guides/styling/+page.svelte +0 -361
- package/src/routes/(inner)/guides/tailwind/+page.svelte +0 -150
- package/src/routes/(inner)/guides/themes/+page.svelte +0 -144
- package/src/routes/(inner)/guides/themes/colors/+page.svelte +0 -87
- package/src/routes/(inner)/guides/themes/generator/+page.svelte +0 -58
- package/src/routes/(inner)/guides/themes/presets.ts +0 -69
- package/src/routes/(inner)/template/+page.svelte +0 -52
- package/src/routes/(inner)/utilities/codeblocks/+page.svelte +0 -77
- package/src/routes/(inner)/utilities/data-tables/+page.svelte +0 -399
- package/src/routes/(inner)/utilities/data-tables/+page.ts +0 -18
- package/src/routes/(inner)/utilities/drawers/+page.svelte +0 -193
- package/src/routes/(inner)/utilities/lightswitches/+page.svelte +0 -86
- package/src/routes/(inner)/utilities/local-storage-stores/+page.svelte +0 -67
- package/src/routes/(inner)/utilities/menus/+page.svelte +0 -186
- package/src/routes/(inner)/utilities/modals/+page.svelte +0 -391
- package/src/routes/(inner)/utilities/toasts/+page.svelte +0 -212
- package/src/routes/(inner)/utilities/tooltips/+page.svelte +0 -153
- package/src/routes/+error.svelte +0 -16
- package/src/routes/+layout.server.ts +0 -13
- package/src/routes/+layout.svelte +0 -100
- package/src/routes/+page.server.ts +0 -12
- package/src/routes/+page.svelte +0 -197
- package/src/routes/blog/+page.svelte +0 -78
- package/src/routes/blog/+page.ts +0 -6
- package/src/routes/blog/[slug]/+page.svelte +0 -112
- package/src/routes/blog/[slug]/+page.ts +0 -6
- package/src/routes/blog/blog-service.ts +0 -31
- package/src/routes/blog/rss/+server.ts +0 -16
- package/static/favicon.png +0 -0
- package/svelte.config.js +0 -30
- package/tailwind.config.cjs +0 -14
- package/tsconfig.json +0 -37
- package/vite.config.js +0 -25
|
@@ -1,217 +0,0 @@
|
|
|
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>›</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: [{ sveld: sveldAvatar }]</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>
|
|
@@ -1,173 +0,0 @@
|
|
|
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>›</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 & 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>
|
|
@@ -1,164 +0,0 @@
|
|
|
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>›</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>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<div class="page-container">
|
|
2
|
-
<header class="space-y-4">
|
|
3
|
-
<h1>Frequently Asked Questions</h1>
|
|
4
|
-
<p>A list of frequently asked questions from new users. We recommend reading these before submitting a new support request.</p>
|
|
5
|
-
</header>
|
|
6
|
-
|
|
7
|
-
<hr />
|
|
8
|
-
|
|
9
|
-
<section class="space-y-4">
|
|
10
|
-
<h2>Is Typescript required?</h2>
|
|
11
|
-
<p>
|
|
12
|
-
No, Skeleton does not require Typescript, though we highly recommend it. Please be aware all documentation examples are written with
|
|
13
|
-
Typescript by default. If you wish to learn Typescript we recommend <a
|
|
14
|
-
href="https://www.totaltypescript.com/tutorials"
|
|
15
|
-
target="_blank"
|
|
16
|
-
rel="noreferrer">Totally Typescript</a
|
|
17
|
-
>.
|
|
18
|
-
</p>
|
|
19
|
-
</section>
|
|
20
|
-
|
|
21
|
-
<section class="space-y-4">
|
|
22
|
-
<h2>What package managers are supported?</h2>
|
|
23
|
-
<p>
|
|
24
|
-
We support <a href="https://docs.npmjs.com/about-npm" target="_blank" rel="noreferrer">NPM (Node Package Manager)</a>. PNPM and Yarn
|
|
25
|
-
are currently only supported for the Skeleton CLI.
|
|
26
|
-
</p>
|
|
27
|
-
</section>
|
|
28
|
-
|
|
29
|
-
<section class="space-y-4">
|
|
30
|
-
<h2>Can I use a monorepo?</h2>
|
|
31
|
-
<p>
|
|
32
|
-
Yes, but please be mindful of the <code>node_modules</code> path in your project configuration. We <u>do not</u> tailor instruction for
|
|
33
|
-
this use case.
|
|
34
|
-
</p>
|
|
35
|
-
</section>
|
|
36
|
-
|
|
37
|
-
<section class="space-y-4">
|
|
38
|
-
<h2>Do you have a project roadmap?</h2>
|
|
39
|
-
<p>
|
|
40
|
-
Yes, <a href="https://github.com/skeletonlabs/skeleton/discussions/503" target="_blank" rel="noreferrer">view our roadmap</a>. This
|
|
41
|
-
covers major milestones leading up to the v1.0 release.
|
|
42
|
-
</p>
|
|
43
|
-
</section>
|
|
44
|
-
|
|
45
|
-
<section class="space-y-4">
|
|
46
|
-
<h2>How can I contribute?</h2>
|
|
47
|
-
<p>
|
|
48
|
-
See the <a href="/docs/contributions">contribution guide</a>. This covers all requirements for getting started.
|
|
49
|
-
</p>
|
|
50
|
-
</section>
|
|
51
|
-
|
|
52
|
-
<section class="space-y-4">
|
|
53
|
-
<h2>Where can I learn Svelte and SvelteKit?</h2>
|
|
54
|
-
<p>
|
|
55
|
-
We recommend the official <a href="https://svelte.dev/docs" target="_blank" rel="noreferrer">documentation</a> and
|
|
56
|
-
<a href="https://svelte.dev/tutorial/basics" target="_blank" rel="noreferrer">tutorial</a> for Svelte. As well as the official
|
|
57
|
-
<a href="https://kit.svelte.dev/" target="_blank" rel="noreferrer">documentation</a> for SvelteKit.
|
|
58
|
-
</p>
|
|
59
|
-
</section>
|
|
60
|
-
|
|
61
|
-
<section class="space-y-4">
|
|
62
|
-
<h2>Where can I learn Tailwind?</h2>
|
|
63
|
-
<p>
|
|
64
|
-
We recommend the official <a href="https://tailwindcss.com/docs/utility-first" target="_blank" rel="noreferrer">documentation</a> and
|
|
65
|
-
<a href="https://www.youtube.com/c/TailwindLabs/videos" target="_blank" rel="noreferrer">YouTube channel</a>.
|
|
66
|
-
</p>
|
|
67
|
-
</section>
|
|
68
|
-
|
|
69
|
-
<hr />
|
|
70
|
-
|
|
71
|
-
<section class="text-center space-y-4">
|
|
72
|
-
<p>Need additional support? Reach out.</p>
|
|
73
|
-
<div class="flex justify-center space-x-2">
|
|
74
|
-
<a class="btn btn-ghost-surface" href="https://github.com/skeletonlabs/skeleton/issues" target="_blank" rel="noreferrer"
|
|
75
|
-
>GitHub Support</a
|
|
76
|
-
>
|
|
77
|
-
<a class="btn btn-ghost-surface" href="https://github.com/skeletonlabs/skeleton" target="_blank" rel="noreferrer">Discord Support</a>
|
|
78
|
-
</div>
|
|
79
|
-
</section>
|
|
80
|
-
</div>
|