@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.
- package/.eslintrc.cjs +20 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +30 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/docs_issue.yml +23 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +22 -0
- package/.github/pull_request_template.md +14 -0
- package/.prettierignore +12 -0
- package/.prettierrc +6 -0
- package/package.json +61 -159
- package/postcss.config.cjs +14 -0
- package/scripts/compile-css-to-js.cjs +50 -0
- package/scripts/generate-jss.js +67 -0
- package/scripts/post-build.js +17 -0
- package/scripts/pre-build.js +14 -0
- package/src/app.d.ts +13 -0
- package/src/app.html +43 -0
- package/src/app.postcss +10 -0
- package/src/docs/DocsAppBar/DocsAppBar.svelte +213 -0
- package/src/docs/DocsFooter/DocsFooter.svelte +78 -0
- package/src/docs/DocsLogo/DocsLogoAnim.svelte +44 -0
- package/src/docs/DocsLogo/DocsLogoFull.svelte +11 -0
- package/src/docs/DocsLogo/DocsLogoIcon.svelte +6 -0
- package/src/docs/DocsNavigation/DocsDrawer.svelte +23 -0
- package/src/docs/DocsNavigation/DocsSidebar.svelte +103 -0
- package/src/docs/DocsNavigation/links.ts +148 -0
- package/src/docs/DocsSearch/DocsSearch.svelte +78 -0
- package/src/docs/DocsShell/DocsShell.svelte +377 -0
- package/src/docs/DocsShell/sveldMapper.ts +143 -0
- package/src/docs/DocsShell/types.ts +96 -0
- package/src/docs/DocsStyles/blog.css +192 -0
- package/src/docs/DocsThemer/DocsThemer.svelte +254 -0
- package/src/docs/DocsThemer/Swatch.svelte +28 -0
- package/src/docs/DocsThemer/colors.ts +122 -0
- package/src/docs/DocsThemer/settings.ts +129 -0
- package/src/docs/DocsThemer/stores.ts +5 -0
- package/src/docs/DocsThemer/types.ts +20 -0
- package/src/docs/README.md +3 -0
- package/src/docs/stores.ts +15 -0
- package/src/lib/actions/Clipboard/clipboard.ts +39 -0
- package/src/lib/actions/Filters/filter.test.ts +40 -0
- package/src/lib/actions/Filters/filter.ts +23 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/Apollo.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/BlueNight.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/Emerald.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/GreenFall.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/Noir.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/NoirLight.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/Rustic.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/Summer84.svelte +0 -0
- package/{actions → src/lib/actions}/Filters/svg-filters/XPro.svelte +0 -0
- package/src/lib/actions/FocusTrap/focusTrap.ts +56 -0
- package/src/lib/components/Accordion/AccordionGroup.svelte +53 -0
- package/src/lib/components/Accordion/AccordionGroup.test.ts +22 -0
- package/src/lib/components/Accordion/AccordionItem.svelte +80 -0
- package/src/lib/components/Accordion/AccordionItem.test.ts +28 -0
- package/src/lib/components/Alert/Alert.svelte +71 -0
- package/src/lib/components/Alert/Alert.test.ts +30 -0
- package/src/lib/components/AppBar/AppBar.svelte +60 -0
- package/src/lib/components/AppBar/AppBar.test.ts +31 -0
- package/src/lib/components/AppRail/AppRail.svelte +58 -0
- package/src/lib/components/AppRail/AppRailTile.svelte +66 -0
- package/src/lib/components/AppShell/AppShell.svelte +84 -0
- package/src/lib/components/AppShell/AppShell.test.ts +26 -0
- package/src/lib/components/Avatar/Avatar.svelte +51 -0
- package/src/lib/components/Avatar/Avatar.test.ts +41 -0
- package/src/lib/components/Breadcrumb/Breadcrumb.svelte +30 -0
- package/src/lib/components/Breadcrumb/Breadcrumb.test.ts +20 -0
- package/{components → src/lib/components}/Breadcrumb/Crumb.svelte +23 -16
- package/src/lib/components/Breadcrumb/Crumb.test.ts +48 -0
- package/src/lib/components/ConicGradient/ConicGradient.svelte +88 -0
- package/src/lib/components/ConicGradient/ConicGradient.test.ts +26 -0
- package/src/lib/components/ConicGradient/settings.ts +345 -0
- package/src/lib/components/ConicGradient/types.ts +12 -0
- package/src/lib/components/Divider/Divider.svelte +26 -0
- package/src/lib/components/Divider/Divider.test.ts +32 -0
- package/src/lib/components/FileButton/FileButton.svelte +29 -0
- package/src/lib/components/FileButton/FileButton.test.ts +32 -0
- package/src/lib/components/FileDropzone/FileDropzone.svelte +108 -0
- package/src/lib/components/FileDropzone/FileDropzone.test.ts +32 -0
- package/src/lib/components/GradientHeading/GradientHeading.svelte +24 -0
- package/src/lib/components/GradientHeading/GradientHeading.test.ts +30 -0
- package/src/lib/components/InputChip/InputChip.svelte +118 -0
- package/src/lib/components/ListBox/ListBox.svelte +65 -0
- package/src/lib/components/ListBox/ListBox.test.ts +48 -0
- package/src/lib/components/ListBox/ListBoxItem.svelte +99 -0
- package/src/lib/components/ListBox/ListBoxItem.test.ts +22 -0
- package/src/lib/components/Paginator/Paginator.svelte +84 -0
- package/src/lib/components/Paginator/Paginator.test.ts +29 -0
- package/src/lib/components/Paginator/types.ts +12 -0
- package/src/lib/components/ProgressBar/ProgressBar.svelte +73 -0
- package/src/lib/components/ProgressBar/ProgressBar.test.ts +27 -0
- package/src/lib/components/ProgressRadial/ProgressRadial.svelte +98 -0
- package/src/lib/components/ProgressRadial/ProgressRadial.test.ts +26 -0
- package/src/lib/components/Radio/RadioGroup.svelte +54 -0
- package/src/lib/components/Radio/RadioGroup.test.ts +35 -0
- package/src/lib/components/Radio/RadioItem.svelte +71 -0
- package/src/lib/components/Radio/RadioItem.test.ts +32 -0
- package/src/lib/components/RangeSlider/RangeSlider.svelte +110 -0
- package/src/lib/components/RangeSlider/RangeSlider.test.ts +44 -0
- package/src/lib/components/SlideToggle/SlideToggle.svelte +106 -0
- package/src/lib/components/SlideToggle/SlideToggle.test.ts +23 -0
- package/src/lib/components/Stepper/Step.svelte +140 -0
- package/src/lib/components/Stepper/Step.test.ts +21 -0
- package/src/lib/components/Stepper/Stepper.svelte +71 -0
- package/src/lib/components/Stepper/Stepper.test.ts +31 -0
- package/src/lib/components/SvgIcon/SvgIcon.svelte +50 -0
- package/src/lib/components/SvgIcon/SvgIcon.test.ts +28 -0
- package/src/lib/components/SvgIcon/icons.ts +29 -0
- package/src/lib/components/Tab/Tab.svelte +79 -0
- package/src/lib/components/Tab/Tab.test.ts +26 -0
- package/src/lib/components/Tab/TabGroup.svelte +78 -0
- package/src/lib/components/Tab/TabGroup.test.ts +30 -0
- package/src/lib/components/Table/Table.svelte +106 -0
- package/src/lib/components/Table/types.ts +10 -0
- package/{components/Table/utils.js → src/lib/components/Table/utils.ts} +16 -10
- package/src/lib/components/TableOfContents/TableOfContents.svelte +139 -0
- package/{index.d.ts → src/lib/index.ts} +31 -1
- package/{styles → src/lib/styles}/all.css +0 -0
- package/{styles → src/lib/styles}/core.css +0 -0
- package/{styles → src/lib/styles}/elements/alerts.css +0 -0
- package/{styles → src/lib/styles}/elements/badges.css +0 -0
- package/{styles → src/lib/styles}/elements/breadcrumbs.css +0 -0
- package/{styles → src/lib/styles}/elements/buttons.css +0 -0
- package/{styles → src/lib/styles}/elements/cards.css +0 -0
- package/{styles → src/lib/styles}/elements/chips.css +0 -0
- package/{styles → src/lib/styles}/elements/lists.css +0 -0
- package/{styles → src/lib/styles}/elements/logo-clouds.css +0 -0
- package/{styles → src/lib/styles}/elements/menus.css +0 -0
- package/{styles → src/lib/styles}/elements/placeholders.css +0 -0
- package/{styles → src/lib/styles}/elements/tables.css +0 -0
- package/{styles → src/lib/styles}/elements/tooltips.css +0 -0
- package/{styles → src/lib/styles}/elements.css +0 -0
- package/{styles → src/lib/styles}/forms.css +0 -1
- package/{styles → src/lib/styles}/highlight-js.css +0 -0
- package/{styles → src/lib/styles}/tailwind.css +0 -0
- package/{styles → src/lib/styles}/typography.css +0 -0
- package/{tailwind → src/lib/tailwind}/settings.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/skeleton.cjs +1 -5
- package/{tailwind → src/lib/tailwind}/theme/colors.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/backgrounds.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/border-radius.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/borders.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/fills.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/rings.cjs +0 -0
- package/{tailwind → src/lib/tailwind}/tokens/text.cjs +0 -0
- package/{themes → src/lib/themes}/theme-crimson.css +0 -0
- package/{themes → src/lib/themes}/theme-gold-nouveau.css +0 -0
- package/{themes → src/lib/themes}/theme-hamlindigo.css +0 -0
- package/{themes → src/lib/themes}/theme-modern.css +0 -0
- package/{themes → src/lib/themes}/theme-rocket.css +0 -0
- package/{themes → src/lib/themes}/theme-sahara.css +0 -0
- package/{themes → src/lib/themes}/theme-seafoam.css +0 -0
- package/{themes → src/lib/themes}/theme-seasonal.css +0 -0
- package/{themes → src/lib/themes}/theme-skeleton.css +0 -0
- package/src/lib/themes/theme-test.css +96 -0
- package/{themes → src/lib/themes}/theme-vintage.css +0 -0
- package/src/lib/utilities/CodeBlock/CodeBlock.svelte +78 -0
- package/src/lib/utilities/CodeBlock/CodeBlock.test.ts +27 -0
- package/src/lib/utilities/CodeBlock/stores.ts +5 -0
- package/src/lib/utilities/DataTable/DataTable.ts +151 -0
- package/src/lib/utilities/DataTable/actions.ts +100 -0
- package/src/lib/utilities/DataTable/types.ts +33 -0
- package/src/lib/utilities/Drawer/Drawer.svelte +173 -0
- package/src/lib/utilities/Drawer/Drawer.test.ts +15 -0
- package/src/lib/utilities/Drawer/stores.ts +27 -0
- package/src/lib/utilities/Drawer/types.ts +47 -0
- package/src/lib/utilities/LightSwitch/LightSwitch.svelte +116 -0
- package/src/lib/utilities/LightSwitch/LightSwitch.test.ts +19 -0
- package/src/lib/utilities/LightSwitch/stores.ts +7 -0
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.test.ts +220 -0
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.ts +77 -0
- package/src/lib/utilities/Menu/menu.test.ts +22 -0
- package/src/lib/utilities/Menu/menu.ts +172 -0
- package/src/lib/utilities/Modal/Modal.svelte +206 -0
- package/src/lib/utilities/Modal/Modal.test.ts +50 -0
- package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleEmbed.svelte +7 -5
- package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleForm.svelte +24 -20
- package/{utilities → src/lib/utilities}/Modal/examples/ModalExampleList.svelte +18 -13
- package/src/lib/utilities/Modal/stores.ts +29 -0
- package/src/lib/utilities/Modal/types.ts +39 -0
- package/src/lib/utilities/Toast/Toast.svelte +95 -0
- package/src/lib/utilities/Toast/Toats.test.ts +25 -0
- package/src/lib/utilities/Toast/stores.ts +63 -0
- package/src/lib/utilities/Toast/types.ts +29 -0
- package/src/lib/utilities/Tooltip/tooltip.ts +137 -0
- package/src/routes/(inner)/+layout.svelte +3 -0
- package/src/routes/(inner)/actions/clipboard/+page.svelte +87 -0
- package/src/routes/(inner)/actions/filters/+page.svelte +151 -0
- package/src/routes/(inner)/actions/focus-trap/+page.svelte +59 -0
- package/src/routes/(inner)/components/accordions/+page.svelte +127 -0
- package/src/routes/(inner)/components/alerts/+page.svelte +130 -0
- package/src/routes/(inner)/components/app-bar/+page.svelte +52 -0
- package/src/routes/(inner)/components/app-rail/+page.svelte +105 -0
- package/src/routes/(inner)/components/app-shell/+page.svelte +159 -0
- package/src/routes/(inner)/components/avatars/+page.svelte +193 -0
- package/src/routes/(inner)/components/breadcrumbs/+page.svelte +121 -0
- package/src/routes/(inner)/components/conic-gradients/+page.svelte +161 -0
- package/src/routes/(inner)/components/dividers/+page.svelte +146 -0
- package/src/routes/(inner)/components/file-buttons/+page.svelte +46 -0
- package/src/routes/(inner)/components/file-dropzone/+page.svelte +71 -0
- package/src/routes/(inner)/components/gradient-headings/+page.svelte +138 -0
- package/src/routes/(inner)/components/input-chips/+page.svelte +128 -0
- package/src/routes/(inner)/components/listboxes/+page.svelte +92 -0
- package/src/routes/(inner)/components/paginators/+page.svelte +118 -0
- package/src/routes/(inner)/components/progress-bars/+page.svelte +157 -0
- package/src/routes/(inner)/components/progress-radials/+page.svelte +64 -0
- package/src/routes/(inner)/components/radio-groups/+page.svelte +91 -0
- package/src/routes/(inner)/components/range-sliders/+page.svelte +134 -0
- package/src/routes/(inner)/components/slide-toggles/+page.svelte +63 -0
- package/src/routes/(inner)/components/steppers/+page.svelte +168 -0
- package/src/routes/(inner)/components/svg-icons/+page.svelte +60 -0
- package/src/routes/(inner)/components/table-of-contents/+page.svelte +110 -0
- package/src/routes/(inner)/components/tables/+page.svelte +216 -0
- package/src/routes/(inner)/components/tabs/+page.svelte +146 -0
- package/src/routes/(inner)/docs/comparisons/+page.svelte +130 -0
- package/src/routes/(inner)/docs/contributions/+page.svelte +78 -0
- package/src/routes/(inner)/docs/contributions/documentation/+page.svelte +217 -0
- package/src/routes/(inner)/docs/contributions/requirements/+page.svelte +173 -0
- package/src/routes/(inner)/docs/contributions/style-guide/+page.svelte +164 -0
- package/src/routes/(inner)/docs/faqs/+page.svelte +80 -0
- package/src/routes/(inner)/docs/features/+page.svelte +121 -0
- package/src/routes/(inner)/docs/recommended/+page.svelte +162 -0
- package/src/routes/(inner)/docs/why/+page.svelte +104 -0
- package/src/routes/(inner)/elements/alerts/+page.svelte +142 -0
- package/src/routes/(inner)/elements/badges/+page.svelte +155 -0
- package/src/routes/(inner)/elements/breadcrumbs/+page.svelte +132 -0
- package/src/routes/(inner)/elements/buttons/+page.svelte +304 -0
- package/src/routes/(inner)/elements/cards/+page.svelte +117 -0
- package/src/routes/(inner)/elements/chips/+page.svelte +130 -0
- package/src/routes/(inner)/elements/core/+page.svelte +98 -0
- package/src/routes/(inner)/elements/forms/+page.svelte +89 -0
- package/src/routes/(inner)/elements/forms/preview/+page.svelte +256 -0
- package/src/routes/(inner)/elements/lists/+page.svelte +197 -0
- package/src/routes/(inner)/elements/logo-clouds/+page.svelte +105 -0
- package/src/routes/(inner)/elements/placeholders/+page.svelte +70 -0
- package/src/routes/(inner)/elements/tables/+page.svelte +138 -0
- package/src/routes/(inner)/elements/tokens/+page.svelte +176 -0
- package/src/routes/(inner)/elements/typography/+page.svelte +100 -0
- package/src/routes/(inner)/guides/install/+page.svelte +84 -0
- package/src/routes/(inner)/guides/quickstart/+page.svelte +118 -0
- package/src/routes/(inner)/guides/styling/+page.svelte +361 -0
- package/src/routes/(inner)/guides/tailwind/+page.svelte +150 -0
- package/src/routes/(inner)/guides/themes/+page.svelte +144 -0
- package/src/routes/(inner)/guides/themes/colors/+page.svelte +87 -0
- package/src/routes/(inner)/guides/themes/generator/+page.svelte +58 -0
- package/src/routes/(inner)/guides/themes/presets.ts +69 -0
- package/src/routes/(inner)/template/+page.svelte +52 -0
- package/src/routes/(inner)/utilities/codeblocks/+page.svelte +77 -0
- package/src/routes/(inner)/utilities/data-tables/+page.svelte +399 -0
- package/src/routes/(inner)/utilities/data-tables/+page.ts +18 -0
- package/src/routes/(inner)/utilities/drawers/+page.svelte +193 -0
- package/src/routes/(inner)/utilities/lightswitches/+page.svelte +86 -0
- package/src/routes/(inner)/utilities/local-storage-stores/+page.svelte +67 -0
- package/src/routes/(inner)/utilities/menus/+page.svelte +186 -0
- package/src/routes/(inner)/utilities/modals/+page.svelte +391 -0
- package/src/routes/(inner)/utilities/toasts/+page.svelte +212 -0
- package/src/routes/(inner)/utilities/tooltips/+page.svelte +153 -0
- package/src/routes/+error.svelte +16 -0
- package/src/routes/+layout.server.ts +13 -0
- package/src/routes/+layout.svelte +100 -0
- package/src/routes/+page.server.ts +12 -0
- package/src/routes/+page.svelte +197 -0
- package/src/routes/blog/+page.svelte +78 -0
- package/src/routes/blog/+page.ts +6 -0
- package/src/routes/blog/[slug]/+page.svelte +112 -0
- package/src/routes/blog/[slug]/+page.ts +6 -0
- package/src/routes/blog/blog-service.ts +31 -0
- package/src/routes/blog/rss/+server.ts +16 -0
- package/static/favicon.png +0 -0
- package/svelte.config.js +30 -0
- package/tailwind.config.cjs +14 -0
- package/tsconfig.json +37 -0
- package/vite.config.js +25 -0
- package/actions/Clipboard/clipboard.d.ts +0 -4
- package/actions/Clipboard/clipboard.js +0 -37
- package/actions/Filters/filter.d.ts +0 -3
- package/actions/Filters/filter.js +0 -23
- package/actions/Filters/svg-filters/Apollo.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/BlueNight.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/Emerald.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/GreenFall.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/Noir.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/NoirLight.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/Rustic.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/Summer84.svelte.d.ts +0 -23
- package/actions/Filters/svg-filters/XPro.svelte.d.ts +0 -23
- package/actions/FocusTrap/focusTrap.d.ts +0 -4
- package/actions/FocusTrap/focusTrap.js +0 -53
- package/components/Accordion/AccordionGroup.svelte +0 -46
- package/components/Accordion/AccordionGroup.svelte.d.ts +0 -24
- package/components/Accordion/AccordionItem.svelte +0 -73
- package/components/Accordion/AccordionItem.svelte.d.ts +0 -36
- package/components/Alert/Alert.svelte +0 -65
- package/components/Alert/Alert.svelte.d.ts +0 -30
- package/components/AppBar/AppBar.svelte +0 -54
- package/components/AppBar/AppBar.svelte.d.ts +0 -30
- package/components/AppRail/AppRail.svelte +0 -51
- package/components/AppRail/AppRail.svelte.d.ts +0 -32
- package/components/AppRail/AppRailTile.svelte +0 -57
- package/components/AppRail/AppRailTile.svelte.d.ts +0 -33
- package/components/AppShell/AppShell.svelte +0 -80
- package/components/AppShell/AppShell.svelte.d.ts +0 -31
- package/components/Avatar/Avatar.svelte +0 -46
- package/components/Avatar/Avatar.svelte.d.ts +0 -32
- package/components/Breadcrumb/Breadcrumb.svelte +0 -24
- package/components/Breadcrumb/Breadcrumb.svelte.d.ts +0 -21
- package/components/Breadcrumb/Crumb.svelte.d.ts +0 -26
- package/components/ConicGradient/ConicGradient.svelte +0 -80
- package/components/ConicGradient/ConicGradient.svelte.d.ts +0 -29
- package/components/ConicGradient/settings.d.ts +0 -13
- package/components/ConicGradient/settings.js +0 -335
- package/components/ConicGradient/types.d.ts +0 -10
- package/components/ConicGradient/types.js +0 -2
- package/components/Divider/Divider.svelte +0 -21
- package/components/Divider/Divider.svelte.d.ts +0 -22
- package/components/FileButton/FileButton.svelte +0 -25
- package/components/FileButton/FileButton.svelte.d.ts +0 -25
- package/components/FileDropzone/FileDropzone.svelte +0 -95
- package/components/FileDropzone/FileDropzone.svelte.d.ts +0 -32
- package/components/GradientHeading/GradientHeading.svelte +0 -21
- package/components/GradientHeading/GradientHeading.svelte.d.ts +0 -22
- package/components/InputChip/InputChip.svelte +0 -107
- package/components/InputChip/InputChip.svelte.d.ts +0 -29
- package/components/ListBox/ListBox.svelte +0 -57
- package/components/ListBox/ListBox.svelte.d.ts +0 -30
- package/components/ListBox/ListBoxItem.svelte +0 -88
- package/components/ListBox/ListBoxItem.svelte.d.ts +0 -32
- package/components/Paginator/Paginator.svelte +0 -74
- package/components/Paginator/Paginator.svelte.d.ts +0 -29
- package/components/Paginator/types.d.ts +0 -10
- package/components/Paginator/types.js +0 -2
- package/components/ProgressBar/ProgressBar.svelte +0 -67
- package/components/ProgressBar/ProgressBar.svelte.d.ts +0 -24
- package/components/ProgressRadial/ProgressRadial.svelte +0 -89
- package/components/ProgressRadial/ProgressRadial.svelte.d.ts +0 -25
- package/components/Radio/RadioGroup.svelte +0 -48
- package/components/Radio/RadioGroup.svelte.d.ts +0 -31
- package/components/Radio/RadioItem.svelte +0 -61
- package/components/Radio/RadioItem.svelte.d.ts +0 -33
- package/components/RangeSlider/RangeSlider.svelte +0 -101
- package/components/RangeSlider/RangeSlider.svelte.d.ts +0 -32
- package/components/SlideToggle/SlideToggle.svelte +0 -100
- package/components/SlideToggle/SlideToggle.svelte.d.ts +0 -34
- package/components/Stepper/Step.svelte +0 -133
- package/components/Stepper/Step.svelte.d.ts +0 -39
- package/components/Stepper/Stepper.svelte +0 -64
- package/components/Stepper/Stepper.svelte.d.ts +0 -32
- package/components/SvgIcon/SvgIcon.svelte +0 -45
- package/components/SvgIcon/SvgIcon.svelte.d.ts +0 -26
- package/components/SvgIcon/icons.d.ts +0 -1
- package/components/SvgIcon/icons.js +0 -25
- package/components/Tab/Tab.svelte +0 -69
- package/components/Tab/Tab.svelte.d.ts +0 -37
- package/components/Tab/TabGroup.svelte +0 -69
- package/components/Tab/TabGroup.svelte.d.ts +0 -30
- package/components/Table/Table.svelte +0 -99
- package/components/Table/Table.svelte.d.ts +0 -27
- package/components/Table/types.d.ts +0 -10
- package/components/Table/types.js +0 -1
- package/components/Table/utils.d.ts +0 -7
- package/components/TableOfContents/TableOfContents.svelte +0 -132
- package/components/TableOfContents/TableOfContents.svelte.d.ts +0 -32
- package/index.js +0 -71
- package/tailwind/generated/allComponents.cjs +0 -1
- package/tailwind/generated/allComponents.d.cts +0 -5552
- package/tailwind/settings.d.cts +0 -6
- package/tailwind/skeleton.d.cts +0 -5
- package/tailwind/theme/colors.d.cts +0 -2
- package/tailwind/tokens/backgrounds.d.cts +0 -2
- package/tailwind/tokens/border-radius.d.cts +0 -33
- package/tailwind/tokens/borders.d.cts +0 -6
- package/tailwind/tokens/fills.d.cts +0 -15
- package/tailwind/tokens/rings.d.cts +0 -17
- package/tailwind/tokens/text.d.cts +0 -21
- package/utilities/CodeBlock/CodeBlock.svelte +0 -68
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +0 -25
- package/utilities/CodeBlock/stores.d.ts +0 -2
- package/utilities/CodeBlock/stores.js +0 -3
- package/utilities/DataTable/DataTable.d.ts +0 -18
- package/utilities/DataTable/DataTable.js +0 -137
- package/utilities/DataTable/actions.d.ts +0 -8
- package/utilities/DataTable/actions.js +0 -114
- package/utilities/DataTable/types.d.ts +0 -33
- package/utilities/DataTable/types.js +0 -2
- package/utilities/Drawer/Drawer.svelte +0 -157
- package/utilities/Drawer/Drawer.svelte.d.ts +0 -33
- package/utilities/Drawer/stores.d.ts +0 -10
- package/utilities/Drawer/stores.js +0 -21
- package/utilities/Drawer/types.d.ts +0 -33
- package/utilities/Drawer/types.js +0 -2
- package/utilities/LightSwitch/LightSwitch.svelte +0 -98
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -21
- package/utilities/LightSwitch/stores.d.ts +0 -2
- package/utilities/LightSwitch/stores.js +0 -5
- package/utilities/LocalStorageStore/LocalStorageStore.d.ts +0 -12
- package/utilities/LocalStorageStore/LocalStorageStore.js +0 -49
- package/utilities/Menu/menu.d.ts +0 -18
- package/utilities/Menu/menu.js +0 -151
- package/utilities/Modal/Modal.svelte +0 -195
- package/utilities/Modal/Modal.svelte.d.ts +0 -35
- package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +0 -17
- package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +0 -17
- package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +0 -17
- package/utilities/Modal/stores.d.ts +0 -12
- package/utilities/Modal/stores.js +0 -24
- package/utilities/Modal/types.d.ts +0 -36
- package/utilities/Modal/types.js +0 -2
- package/utilities/Toast/Toast.svelte +0 -117
- package/utilities/Toast/Toast.svelte.d.ts +0 -28
- package/utilities/Toast/stores.d.ts +0 -10
- package/utilities/Toast/stores.js +0 -60
- package/utilities/Toast/types.d.ts +0 -26
- package/utilities/Toast/types.js +0 -2
- package/utilities/Tooltip/tooltip.d.ts +0 -35
- package/utilities/Tooltip/tooltip.js +0 -94
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import hljs from 'highlight.js';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
4
|
+
import { page } from '$app/stores';
|
|
5
|
+
|
|
6
|
+
// +page.ts
|
|
7
|
+
import type { PageData } from './$types';
|
|
8
|
+
export let data: PageData;
|
|
9
|
+
|
|
10
|
+
// Blog Utils
|
|
11
|
+
import { blogDateFormatter } from '../blog-service';
|
|
12
|
+
|
|
13
|
+
// Components
|
|
14
|
+
import Avatar from '$lib/components/Avatar/Avatar.svelte';
|
|
15
|
+
import Breadcrumb from '$lib/components/Breadcrumb/Breadcrumb.svelte';
|
|
16
|
+
import Crumb from '$lib/components/Breadcrumb/Crumb.svelte';
|
|
17
|
+
|
|
18
|
+
// Local
|
|
19
|
+
let elemPage: HTMLElement | null;
|
|
20
|
+
|
|
21
|
+
onMount(() => {
|
|
22
|
+
// Element Page
|
|
23
|
+
elemPage = document.querySelector('#page');
|
|
24
|
+
// CodeBlock Highlight
|
|
25
|
+
document.querySelectorAll('pre code').forEach((elem: any) => {
|
|
26
|
+
hljs.highlightElement(elem);
|
|
27
|
+
});
|
|
28
|
+
// Table
|
|
29
|
+
document.querySelectorAll('table').forEach((elem: any) => {
|
|
30
|
+
elem.classList.add('table');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
function scrollToTop(): void {
|
|
35
|
+
if (elemPage) elemPage.scrollTop = 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Local
|
|
39
|
+
const post = data.posts[0];
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<svelte:head>
|
|
43
|
+
<title>Skeleton Blog — {post.title}</title>
|
|
44
|
+
<!-- Meta -->
|
|
45
|
+
<meta name="title" content={post.title} />
|
|
46
|
+
<meta name="description" content={post.excerpt} />
|
|
47
|
+
<!-- Open Graph -->
|
|
48
|
+
<meta property="og:title" content={post.title} />
|
|
49
|
+
<meta property="og:description" content={post.excerpt} />
|
|
50
|
+
<meta property="og:type" content="image/jpeg" />
|
|
51
|
+
<meta property="og:url" content="https://www.skeleton.dev{$page.url.pathname}" />
|
|
52
|
+
<meta property="og:image" content={post.feature_image} />
|
|
53
|
+
<!-- Twitter -->
|
|
54
|
+
<meta name="twitter:card" content="summary" />
|
|
55
|
+
<meta name="twitter:site" content="@SkeletonUI" />
|
|
56
|
+
<meta name="twitter:creator" content="@SkeletonUI" />
|
|
57
|
+
<meta property="og:url" content="https://www.skeleton.dev{$page.url.pathname}" />
|
|
58
|
+
<meta property="og:title" content={post.title} />
|
|
59
|
+
<meta property="og:description" content={post.excerpt} />
|
|
60
|
+
<meta property="og:image" content={post.feature_image} />
|
|
61
|
+
</svelte:head>
|
|
62
|
+
|
|
63
|
+
<div class="page-container">
|
|
64
|
+
<!-- Breadcrumbs -->
|
|
65
|
+
<ol class="breadcrumb">
|
|
66
|
+
<li class="crumb"><a href="/blog">Blog</a></li>
|
|
67
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
68
|
+
<li>Article</li>
|
|
69
|
+
</ol>
|
|
70
|
+
<!-- Article -->
|
|
71
|
+
<article class="blog-post">
|
|
72
|
+
<!-- Header -->
|
|
73
|
+
<header class="space-y-4">
|
|
74
|
+
<!-- Timestamp / Read Time -->
|
|
75
|
+
<div class="blog-meta flex justify-between items-center">
|
|
76
|
+
<time class="block">{blogDateFormatter(post.updated_at)}</time>
|
|
77
|
+
<span class="hidden md:block text-xs opacity-50">{post.reading_time} min read</span>
|
|
78
|
+
</div>
|
|
79
|
+
<h1>{post.title}</h1>
|
|
80
|
+
<!-- Byline -->
|
|
81
|
+
<div class="flex items-center space-x-4 py-4">
|
|
82
|
+
<Avatar src={post.primary_author.profile_image} alt={post.primary_author.slug} />
|
|
83
|
+
<div>
|
|
84
|
+
<div class="text-sm">{post.primary_author.name}</div>
|
|
85
|
+
<a class="text-secondary-500 text-xs" href="https://twitter.com/{post.primary_author.twitter}">{post.primary_author.twitter}</a>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<!-- Featured Image -->
|
|
89
|
+
{#if post.feature_image}<img
|
|
90
|
+
src={post.feature_image}
|
|
91
|
+
alt={post.title}
|
|
92
|
+
class="w-full aspect-video rounded-container-token shadow-xl"
|
|
93
|
+
/>{/if}
|
|
94
|
+
</header>
|
|
95
|
+
<!-- HTML Content -->
|
|
96
|
+
<div class="blog-html space-y-4">{@html post.html}</div>
|
|
97
|
+
<!-- Footer -->
|
|
98
|
+
<footer class="card p-4 card-glass-surface flex justify-between items-center mb-28">
|
|
99
|
+
<!-- Tags -->
|
|
100
|
+
<div class="flex items-center space-x-4">
|
|
101
|
+
{#each post.tags as tag}
|
|
102
|
+
<span class="text-sm font-bold opacity-50 capitalize">{tag.slug}</span>
|
|
103
|
+
{/each}
|
|
104
|
+
</div>
|
|
105
|
+
<!-- Scroll to Top -->
|
|
106
|
+
<!-- prettier-ignore -->
|
|
107
|
+
<button class="btn btn-ghost-surface" on:click={()=>{scrollToTop()}}>Scroll to Top ↑</button>
|
|
108
|
+
</footer>
|
|
109
|
+
</article>
|
|
110
|
+
<!-- Twitter Embed Script -->
|
|
111
|
+
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
|
112
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Blog Utility Methods
|
|
2
|
+
|
|
3
|
+
// HTTP ---
|
|
4
|
+
|
|
5
|
+
const baseUrl = 'https://skeleton.ghost.io/ghost/api/content';
|
|
6
|
+
const ghostKey = 'c76a270f160dbf241b27b81dc2';
|
|
7
|
+
const headers = { 'Accept-Version': 'v5.0' };
|
|
8
|
+
|
|
9
|
+
export async function getBlogList(page = 1): Promise<any> {
|
|
10
|
+
const http = await fetch(`${baseUrl}/posts/?key=${ghostKey}&page=${page}&include=tags`, { headers });
|
|
11
|
+
const res = await http.json();
|
|
12
|
+
console.log(res);
|
|
13
|
+
|
|
14
|
+
if (http.ok) return res;
|
|
15
|
+
throw new Error(res);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function getBlogPost(slug: string): Promise<any> {
|
|
19
|
+
const http = await fetch(`${baseUrl}/posts/slug/${slug}/?key=${ghostKey}&include=tags,authors`, { headers });
|
|
20
|
+
const res = await http.json();
|
|
21
|
+
if (http.ok) return res;
|
|
22
|
+
throw new Error(res);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Formatters ---
|
|
26
|
+
|
|
27
|
+
export function blogDateFormatter(date: string): string {
|
|
28
|
+
const options: any = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
|
|
29
|
+
const d: Date = new Date(date);
|
|
30
|
+
return d.toLocaleDateString('en-US', options);
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RequestHandler } from './$types';
|
|
2
|
+
|
|
3
|
+
export const GET = (async ({ fetch }) => {
|
|
4
|
+
let rssFeed = await (await fetch('https://skeleton.ghost.io/rss/')).text();
|
|
5
|
+
rssFeed = rssFeed
|
|
6
|
+
.replaceAll('<link>https://skeleton.ghost.io', '<link>https://www.skeleton.dev/blog')
|
|
7
|
+
.replaceAll('<url>https://skeleton.ghost.io', '<url>https://www.skeleton.dev')
|
|
8
|
+
.replaceAll('<atom:link href="https://skeleton.ghost.io', '<atom:link href="www.skeleton.dev/blog');
|
|
9
|
+
|
|
10
|
+
// <atom:link href="https://skeleton.ghost.io
|
|
11
|
+
return new Response(rssFeed, {
|
|
12
|
+
headers: {
|
|
13
|
+
'Content-Type': 'application/xml'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}) satisfies RequestHandler;
|
|
Binary file
|
package/svelte.config.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import adapter from '@sveltejs/adapter-auto';
|
|
2
|
+
import preprocess from 'svelte-preprocess';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
6
|
+
const config = {
|
|
7
|
+
// Consult https://github.com/sveltejs/svelte-preprocess
|
|
8
|
+
// for more information about preprocessors
|
|
9
|
+
preprocess: [
|
|
10
|
+
preprocess({
|
|
11
|
+
postcss: true
|
|
12
|
+
})
|
|
13
|
+
],
|
|
14
|
+
kit: {
|
|
15
|
+
adapter: adapter(),
|
|
16
|
+
// https://kit.svelte.dev/docs/configuration#alias
|
|
17
|
+
alias: {
|
|
18
|
+
'@skeletonlabs/skeleton': path.resolve('./src/lib/index.ts'),
|
|
19
|
+
$docs: path.resolve('./src/docs')
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
package: {
|
|
23
|
+
// strip test files from packaging
|
|
24
|
+
files: (filepath) => {
|
|
25
|
+
return filepath.indexOf('test') == -1 ? true : false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default config;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
darkMode: 'class',
|
|
5
|
+
content: ['./src/**/*.{html,js,svelte,ts}'],
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
fontFamily: {
|
|
9
|
+
sans: ['Inter', ...defaultTheme.fontFamily.sans]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
plugins: [require('@tailwindcss/forms'), require('./src/lib/tailwind/skeleton.cjs')]
|
|
14
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./.svelte-kit/tsconfig.json",
|
|
3
|
+
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.svelte"], // remove: "src/**/*.js",
|
|
4
|
+
"exclude": ["node_modules/*", "package/*", "build/*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"declaration": true,
|
|
7
|
+
// "moduleResolution": "NodeNext", // causing issues, disabling for now (ex: SvgIcon component)
|
|
8
|
+
"module": "es2020",
|
|
9
|
+
"lib": ["es2020", "DOM", "ES2021.String"],
|
|
10
|
+
"target": "es2020",
|
|
11
|
+
/**
|
|
12
|
+
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
|
13
|
+
to enforce using \`import type\` instead of \`import\` for Types.
|
|
14
|
+
*/
|
|
15
|
+
"importsNotUsedAsValues": "error",
|
|
16
|
+
/**
|
|
17
|
+
TypeScript doesn't know about import usages in the template because it only sees the
|
|
18
|
+
script of a Svelte file. Therefore preserve all value imports. Requires TS 4.5 or higher.
|
|
19
|
+
*/
|
|
20
|
+
"preserveValueImports": true,
|
|
21
|
+
"isolatedModules": true,
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
/**
|
|
24
|
+
To have warnings/errors of the Svelte compiler at the correct position,
|
|
25
|
+
enable source maps by default.
|
|
26
|
+
*/
|
|
27
|
+
"sourceMap": true,
|
|
28
|
+
"esModuleInterop": true,
|
|
29
|
+
"skipLibCheck": true,
|
|
30
|
+
"forceConsistentCasingInFileNames": true,
|
|
31
|
+
"baseUrl": ".",
|
|
32
|
+
"allowJs": true,
|
|
33
|
+
"checkJs": true,
|
|
34
|
+
"strict": true,
|
|
35
|
+
"outDir": "package"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { sveltekit } from '@sveltejs/kit/vite';
|
|
2
|
+
import { configDefaults } from 'vitest/config';
|
|
3
|
+
import sveld from 'vite-plugin-sveld';
|
|
4
|
+
|
|
5
|
+
// Import package.json version
|
|
6
|
+
import { readFileSync } from 'fs';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const file = fileURLToPath(new URL('package.json', import.meta.url));
|
|
9
|
+
const json = readFileSync(file, 'utf8');
|
|
10
|
+
const pkg = JSON.parse(json);
|
|
11
|
+
|
|
12
|
+
/** @type {import('vite').UserConfig} */
|
|
13
|
+
const config = {
|
|
14
|
+
plugins: [sveltekit({ hot: !process.env.VITEST }), sveld()],
|
|
15
|
+
define: {
|
|
16
|
+
__PACKAGE__: pkg
|
|
17
|
+
},
|
|
18
|
+
test: {
|
|
19
|
+
globals: true,
|
|
20
|
+
environment: 'jsdom',
|
|
21
|
+
exclude: [...configDefaults.exclude, '**/package/**', '**/build/**']
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default config;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Action: Clipboard
|
|
2
|
-
export function clipboard(node, args) {
|
|
3
|
-
const onClick = () => {
|
|
4
|
-
// Handle `data-clipboard` target based on object key
|
|
5
|
-
if (typeof args === 'object') {
|
|
6
|
-
// Element Inner HTML
|
|
7
|
-
if (Object.prototype.hasOwnProperty.call(args, 'element')) {
|
|
8
|
-
const element = document.querySelector(`[data-clipboard="${args.element}"]`);
|
|
9
|
-
copyToClipboard(element?.innerHTML);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
// Form Input Value
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(args, 'input')) {
|
|
14
|
-
const input = document.querySelector(`[data-clipboard="${args.input}"]`);
|
|
15
|
-
copyToClipboard(input?.value);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
// Handle everything else.
|
|
20
|
-
copyToClipboard(args);
|
|
21
|
-
};
|
|
22
|
-
// Event Listner
|
|
23
|
-
node.addEventListener('click', onClick);
|
|
24
|
-
// Lifecycle
|
|
25
|
-
return {
|
|
26
|
-
update(newArgs) {
|
|
27
|
-
args = newArgs;
|
|
28
|
-
},
|
|
29
|
-
destroy() {
|
|
30
|
-
node.removeEventListener('click', onClick);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
// Shared copy method
|
|
35
|
-
function copyToClipboard(data) {
|
|
36
|
-
navigator.clipboard.writeText(String(data));
|
|
37
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Action: Filter
|
|
2
|
-
export function filter(node, filterName) {
|
|
3
|
-
if (filterName === undefined)
|
|
4
|
-
return;
|
|
5
|
-
const applyFilter = () => {
|
|
6
|
-
// Prevent this action on Firebox browsers
|
|
7
|
-
const isFirefox = navigator.userAgent.indexOf('Firefox') > -1;
|
|
8
|
-
if (isFirefox) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
// If the filter name availalbe, apply the Filter
|
|
12
|
-
node.setAttribute('style', `filter: url("#${filterName}")`);
|
|
13
|
-
};
|
|
14
|
-
// On Init
|
|
15
|
-
applyFilter();
|
|
16
|
-
// Lifecycle
|
|
17
|
-
return {
|
|
18
|
-
update(newArgs) {
|
|
19
|
-
filterName = newArgs;
|
|
20
|
-
applyFilter();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ApolloProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ApolloEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ApolloSlots */
|
|
4
|
-
export default class Apollo extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type ApolloProps = typeof __propDef.props;
|
|
11
|
-
export type ApolloEvents = typeof __propDef.events;
|
|
12
|
-
export type ApolloSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} BlueNightProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} BlueNightEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} BlueNightSlots */
|
|
4
|
-
export default class BlueNight extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type BlueNightProps = typeof __propDef.props;
|
|
11
|
-
export type BlueNightEvents = typeof __propDef.events;
|
|
12
|
-
export type BlueNightSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} EmeraldProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} EmeraldEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} EmeraldSlots */
|
|
4
|
-
export default class Emerald extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type EmeraldProps = typeof __propDef.props;
|
|
11
|
-
export type EmeraldEvents = typeof __propDef.events;
|
|
12
|
-
export type EmeraldSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} GreenFallProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} GreenFallEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} GreenFallSlots */
|
|
4
|
-
export default class GreenFall extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type GreenFallProps = typeof __propDef.props;
|
|
11
|
-
export type GreenFallEvents = typeof __propDef.events;
|
|
12
|
-
export type GreenFallSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} NoirProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} NoirEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} NoirSlots */
|
|
4
|
-
export default class Noir extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type NoirProps = typeof __propDef.props;
|
|
11
|
-
export type NoirEvents = typeof __propDef.events;
|
|
12
|
-
export type NoirSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} NoirLightProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} NoirLightEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} NoirLightSlots */
|
|
4
|
-
export default class NoirLight extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type NoirLightProps = typeof __propDef.props;
|
|
11
|
-
export type NoirLightEvents = typeof __propDef.events;
|
|
12
|
-
export type NoirLightSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} RusticProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} RusticEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} RusticSlots */
|
|
4
|
-
export default class Rustic extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type RusticProps = typeof __propDef.props;
|
|
11
|
-
export type RusticEvents = typeof __propDef.events;
|
|
12
|
-
export type RusticSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} Summer84Props */
|
|
2
|
-
/** @typedef {typeof __propDef.events} Summer84Events */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} Summer84Slots */
|
|
4
|
-
export default class Summer84 extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type Summer84Props = typeof __propDef.props;
|
|
11
|
-
export type Summer84Events = typeof __propDef.events;
|
|
12
|
-
export type Summer84Slots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} XProProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} XProEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} XProSlots */
|
|
4
|
-
export default class XPro extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {}> {
|
|
9
|
-
}
|
|
10
|
-
export type XProProps = typeof __propDef.props;
|
|
11
|
-
export type XProEvents = typeof __propDef.events;
|
|
12
|
-
export type XProSlots = typeof __propDef.slots;
|
|
13
|
-
import { SvelteComponentTyped } from "svelte";
|
|
14
|
-
declare const __propDef: {
|
|
15
|
-
props: {
|
|
16
|
-
[x: string]: never;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// Action: Focus Trap
|
|
2
|
-
export function focusTrap(node, enabled) {
|
|
3
|
-
const elemWhitelist = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
|
|
4
|
-
let elemFirst;
|
|
5
|
-
let elemLast;
|
|
6
|
-
// When the first element is selected, shift+tab pressed, jump to the last selectable item.
|
|
7
|
-
function onFirstElemKeydown(e) {
|
|
8
|
-
if (e.shiftKey && e.code === 'Tab') {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
elemLast.focus();
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
// When the last item selected, tab pressed, jump to the first selectable item.
|
|
14
|
-
function onLastElemKeydown(e) {
|
|
15
|
-
if (!e.shiftKey && e.code === 'Tab') {
|
|
16
|
-
e.preventDefault();
|
|
17
|
-
elemFirst.focus();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const onInit = () => {
|
|
21
|
-
if (enabled === false)
|
|
22
|
-
return;
|
|
23
|
-
// Gather all focusable elements
|
|
24
|
-
const focusableElems = Array.from(node.querySelectorAll(elemWhitelist));
|
|
25
|
-
if (focusableElems.length) {
|
|
26
|
-
// Set first/last focusable elements
|
|
27
|
-
elemFirst = focusableElems[0];
|
|
28
|
-
elemLast = focusableElems[focusableElems.length - 1];
|
|
29
|
-
// Auto-focus first focusable element
|
|
30
|
-
elemFirst.focus();
|
|
31
|
-
// Listen for keydown on first & last element
|
|
32
|
-
elemFirst.addEventListener('keydown', onFirstElemKeydown);
|
|
33
|
-
elemLast.addEventListener('keydown', onLastElemKeydown);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
onInit();
|
|
37
|
-
function onDestory() {
|
|
38
|
-
if (elemFirst)
|
|
39
|
-
elemFirst.removeEventListener('keydown', onFirstElemKeydown);
|
|
40
|
-
if (elemLast)
|
|
41
|
-
elemLast.removeEventListener('keydown', onLastElemKeydown);
|
|
42
|
-
}
|
|
43
|
-
// Lifecycle
|
|
44
|
-
return {
|
|
45
|
-
update(newArgs) {
|
|
46
|
-
enabled = newArgs;
|
|
47
|
-
newArgs ? onInit() : onDestory();
|
|
48
|
-
},
|
|
49
|
-
destroy() {
|
|
50
|
-
onDestory();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|