@skeletonlabs/skeleton 0.86.9 → 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 -149
- 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} +33 -1
- package/{styles → src/lib/styles}/all.css +0 -3
- package/{styles → src/lib/styles}/core.css +3 -0
- package/src/lib/styles/elements/alerts.css +43 -0
- package/{styles → src/lib/styles}/elements/badges.css +1 -1
- package/src/lib/styles/elements/breadcrumbs.css +27 -0
- package/{styles → src/lib/styles}/elements/buttons.css +1 -1
- package/{styles → src/lib/styles}/elements/cards.css +1 -1
- package/src/lib/styles/elements/chips.css +71 -0
- package/{styles → src/lib/styles}/elements/lists.css +1 -1
- package/{styles → src/lib/styles}/elements/logo-clouds.css +1 -1
- package/{styles → src/lib/styles}/elements/menus.css +1 -1
- package/{styles → src/lib/styles}/elements/placeholders.css +1 -1
- package/{styles → src/lib/styles}/elements/tables.css +0 -0
- package/{styles → src/lib/styles}/elements/tooltips.css +1 -1
- package/{styles → src/lib/styles}/elements.css +2 -0
- package/{styles → src/lib/styles}/forms.css +57 -40
- 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 +2 -2
- package/src/lib/tailwind/settings.cjs +20 -0
- package/src/lib/tailwind/skeleton.cjs +50 -0
- package/src/lib/tailwind/theme/colors.cjs +18 -0
- package/src/lib/tailwind/tokens/backgrounds.cjs +40 -0
- package/src/lib/tailwind/tokens/border-radius.cjs +21 -0
- package/src/lib/tailwind/tokens/borders.cjs +20 -0
- package/src/lib/tailwind/tokens/fills.cjs +20 -0
- package/src/lib/tailwind/tokens/rings.cjs +42 -0
- package/src/lib/tailwind/tokens/text.cjs +33 -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 +2 -2
- package/{themes → src/lib/themes}/theme-skeleton.css +6 -6
- 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 -70
- 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/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 -98
- 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/ListBox/ListBox.svelte +0 -57
- package/components/ListBox/ListBox.svelte.d.ts +0 -30
- package/components/ListBox/ListBoxItem.svelte +0 -89
- 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 -114
- package/components/Stepper/Step.svelte.d.ts +0 -34
- package/components/Stepper/Stepper.svelte +0 -51
- package/components/Stepper/Stepper.svelte.d.ts +0 -30
- 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 -171
- 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/index.js +0 -69
- package/styles/elements/chips.css +0 -20
- package/styles/tokens/backgrounds.css +0 -329
- package/styles/tokens/border-radius.css +0 -41
- package/styles/tokens/borders.css +0 -253
- package/styles/tokens/fills.css +0 -38
- package/styles/tokens/rings.css +0 -253
- package/styles/tokens/text.css +0 -293
- package/styles/tokens.css +0 -8
- package/tailwind/colors.d.ts +0 -13
- package/tailwind/colors.js +0 -335
- package/tailwind/theme.cjs +0 -39
- package/tailwind/theme.d.cts +0 -5
- 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 -75
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -21
- package/utilities/LightSwitch/stores.d.ts +0 -3
- 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 -194
- 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 -34
- 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 -61
- 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,155 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
3
|
+
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
4
|
+
|
|
5
|
+
import Avatar from '$lib/components/Avatar/Avatar.svelte';
|
|
6
|
+
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
7
|
+
|
|
8
|
+
// Docs Shell
|
|
9
|
+
const settings: DocsShellSettings = {
|
|
10
|
+
feature: DocsFeature.Element,
|
|
11
|
+
name: 'Badges',
|
|
12
|
+
description: 'Provides a robust set of non-interactive badge styles',
|
|
13
|
+
stylesheetIncludes: ['all', 'elements'],
|
|
14
|
+
stylesheets: ['elements/badges'],
|
|
15
|
+
source: 'styles/elements/badges.css',
|
|
16
|
+
classes: [
|
|
17
|
+
['<code>badge</code>', '-', 'Provides the standard badge style.'],
|
|
18
|
+
['<code>badge-icon</code>', '-', 'Provides the icon badge style.'],
|
|
19
|
+
['<code>badge-[variant]</code>', '-', 'Preset styles for badge and badge icons.']
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<DocsShell {settings}>
|
|
25
|
+
<!-- Slot: Sandbox -->
|
|
26
|
+
<svelte:fragment slot="sandbox">
|
|
27
|
+
<section class="grid grid-cols-1 lg:grid-cols-3 gap-4">
|
|
28
|
+
<!-- - -->
|
|
29
|
+
<div class="card p-4">
|
|
30
|
+
<span class="badge badge-filled-surface">Skeleton</span>
|
|
31
|
+
</div>
|
|
32
|
+
<!-- - -->
|
|
33
|
+
<div class="lg:col-span-2 card p-4">
|
|
34
|
+
<span class="badge badge-filled-primary">
|
|
35
|
+
<i class="fa-solid fa-check" />
|
|
36
|
+
<span>Complete</span>
|
|
37
|
+
</span>
|
|
38
|
+
<span class="badge badge-filled-secondary">
|
|
39
|
+
<span>Skeleton</span>
|
|
40
|
+
<i class="fa-solid fa-skull" />
|
|
41
|
+
</span>
|
|
42
|
+
<span class="badge badge-filled-tertiary">
|
|
43
|
+
<i class="fa-solid fa-heart" />
|
|
44
|
+
<span>Favorite</span>
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
<!-- - -->
|
|
48
|
+
<div class="card p-4">
|
|
49
|
+
<h4>Skeleton</h4>
|
|
50
|
+
<sup class="badge badge-filled-primary -ml-0">Sup</sup>
|
|
51
|
+
</div>
|
|
52
|
+
<!-- - -->
|
|
53
|
+
<div class="card p-4">
|
|
54
|
+
<h4>Skeleton</h4>
|
|
55
|
+
<sub class="badge badge-filled-secondary -ml-0">Sub</sub>
|
|
56
|
+
</div>
|
|
57
|
+
<!-- - -->
|
|
58
|
+
<div class="card p-4 !space-x-6">
|
|
59
|
+
<div class="relative inline-block">
|
|
60
|
+
<span class="badge badge-filled-primary absolute -top-3 -right-4 z-10">50k</span>
|
|
61
|
+
<button class="btn btn-sm btn-ghost-surface">Button</button>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="relative inline-block">
|
|
64
|
+
<span class="badge-icon badge-filled-secondary absolute -top-1 -right-1 z-10">2</span>
|
|
65
|
+
<Avatar />
|
|
66
|
+
</div>
|
|
67
|
+
<div class="relative inline-block">
|
|
68
|
+
<span class="badge-icon badge-filled-tertiary absolute -top-1 -right-1 z-10">
|
|
69
|
+
<i class="fa-solid fa-heart" />
|
|
70
|
+
</span>
|
|
71
|
+
<Avatar />
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</section>
|
|
75
|
+
</svelte:fragment>
|
|
76
|
+
|
|
77
|
+
<!-- Slot: Usage -->
|
|
78
|
+
<svelte:fragment slot="usage">
|
|
79
|
+
<section class="space-y-4">
|
|
80
|
+
<p>Apply to any inline element, such as a <em>span</em> or <em>anchor</em> tag.</p>
|
|
81
|
+
<CodeBlock language="html" code={`<span class="badge badge-filled-primary">Skeleton</span>`} />
|
|
82
|
+
</section>
|
|
83
|
+
<!-- Icon -->
|
|
84
|
+
<section class="space-y-4">
|
|
85
|
+
<h2>Badge Icon</h2>
|
|
86
|
+
<p>A compact circular variation badge style.</p>
|
|
87
|
+
<CodeBlock language="html" code={`<span class="badge-icon badge-filled-primary">💀</span>`} />
|
|
88
|
+
</section>
|
|
89
|
+
|
|
90
|
+
<!-- Variants -->
|
|
91
|
+
<section class="space-y-4">
|
|
92
|
+
<h2>Variants</h2>
|
|
93
|
+
<p>
|
|
94
|
+
A set of canned preset styles are available using <code>.badge-[variant]</code>. These are available for both badge and badge icons.
|
|
95
|
+
</p>
|
|
96
|
+
<CodeBlock language="html" code={`<span class="badge badge-filled-surface">Skeleton</span>`} />
|
|
97
|
+
<section class="lg:col-span-3 card p-4">
|
|
98
|
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
99
|
+
<span class="badge badge-filled-surface">
|
|
100
|
+
<i class="fa-solid fa-skull" />
|
|
101
|
+
<span>filled-surface</span>
|
|
102
|
+
</span>
|
|
103
|
+
<span class="badge badge-filled-primary">
|
|
104
|
+
<i class="fa-solid fa-skull" />
|
|
105
|
+
<span>filled-primary</span>
|
|
106
|
+
</span>
|
|
107
|
+
<span class="badge badge-filled-secondary">
|
|
108
|
+
<i class="fa-solid fa-skull" />
|
|
109
|
+
<span>filled-secondary</span>
|
|
110
|
+
</span>
|
|
111
|
+
<span class="badge badge-filled-tertiary">
|
|
112
|
+
<i class="fa-solid fa-skull" />
|
|
113
|
+
<span>filled-tertiary</span>
|
|
114
|
+
</span>
|
|
115
|
+
<span class="badge badge-glass">
|
|
116
|
+
<i class="fa-solid fa-skull" />
|
|
117
|
+
<span>glass</span>
|
|
118
|
+
</span>
|
|
119
|
+
<span class="badge badge-filled-success">
|
|
120
|
+
<i class="fa-solid fa-skull" />
|
|
121
|
+
<span>filled-success</span>
|
|
122
|
+
</span>
|
|
123
|
+
<span class="badge badge-filled-warning">
|
|
124
|
+
<i class="fa-solid fa-skull" />
|
|
125
|
+
<span>filled-warning</span>
|
|
126
|
+
</span>
|
|
127
|
+
<span class="badge badge-filled-error">
|
|
128
|
+
<i class="fa-solid fa-skull" />
|
|
129
|
+
<span>filled-error</span>
|
|
130
|
+
</span>
|
|
131
|
+
</div>
|
|
132
|
+
</section>
|
|
133
|
+
</section>
|
|
134
|
+
<!-- Overlapping -->
|
|
135
|
+
<section class="space-y-4">
|
|
136
|
+
<h2>Overlapping Icon</h2>
|
|
137
|
+
<p>Use Tailwind utility classes to create overlapping elements.</p>
|
|
138
|
+
<CodeBlock
|
|
139
|
+
language="html"
|
|
140
|
+
code={`
|
|
141
|
+
<div class="relative inline-block">
|
|
142
|
+
<span class="badge-icon badge-filled-primary absolute -top-1 -right-1 z-10">💀</span>
|
|
143
|
+
<Avatar />
|
|
144
|
+
</div>
|
|
145
|
+
`.trim()}
|
|
146
|
+
/>
|
|
147
|
+
</section>
|
|
148
|
+
</svelte:fragment>
|
|
149
|
+
</DocsShell>
|
|
150
|
+
|
|
151
|
+
<style lang="postcss">
|
|
152
|
+
.p-4 {
|
|
153
|
+
@apply flex justify-center items-center space-x-2;
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
3
|
+
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
4
|
+
|
|
5
|
+
import Avatar from '$lib/components/Avatar/Avatar.svelte';
|
|
6
|
+
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
7
|
+
|
|
8
|
+
// Docs Shell
|
|
9
|
+
const settings: DocsShellSettings = {
|
|
10
|
+
feature: DocsFeature.Element,
|
|
11
|
+
name: 'Breadcrumbs',
|
|
12
|
+
description: 'Displays the current navigation hierarchy.',
|
|
13
|
+
stylesheetIncludes: ['all', 'elements'],
|
|
14
|
+
stylesheets: ['elements/breadcrumbs'],
|
|
15
|
+
source: 'styles/elements/breadcrumbs.css',
|
|
16
|
+
classes: [
|
|
17
|
+
['<code>breadcrumb</code>', '-', 'Add to an <em>ol</em> tag element.'],
|
|
18
|
+
['<code>breadcrumb-nonresponsive</code>', '-', 'Shows all crumbs on small mobile breakpoints.'],
|
|
19
|
+
['<code>crumb</code>', '-', 'Apply to each crumb list item element.'],
|
|
20
|
+
['<code>crumb-separator</code>', '-', 'Apply to each separator list item element.']
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<DocsShell {settings}>
|
|
26
|
+
<!-- Slot: Sandbox -->
|
|
27
|
+
<svelte:fragment slot="sandbox">
|
|
28
|
+
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4">
|
|
29
|
+
<!-- 1 -->
|
|
30
|
+
<div class="card card-glass p-4">
|
|
31
|
+
<ol class="breadcrumb">
|
|
32
|
+
<li class="crumb"><a href="/">Tailwind</a></li>
|
|
33
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
34
|
+
<li class="crumb"><a href="/">Elements</a></li>
|
|
35
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
36
|
+
<li>breadcrumb</li>
|
|
37
|
+
</ol>
|
|
38
|
+
</div>
|
|
39
|
+
<!-- 2 -->
|
|
40
|
+
<div class="card card-glass p-4">
|
|
41
|
+
<ol class="breadcrumb">
|
|
42
|
+
<li class="crumb"><a href="/">Home</a></li>
|
|
43
|
+
<li class="crumb-separator" aria-hidden>/</li>
|
|
44
|
+
<li class="crumb"><a href="/">Articles</a></li>
|
|
45
|
+
<li class="crumb-separator" aria-hidden>/</li>
|
|
46
|
+
<li>Current</li>
|
|
47
|
+
</ol>
|
|
48
|
+
</div>
|
|
49
|
+
<!-- 3 -->
|
|
50
|
+
<div class="card card-glass p-4">
|
|
51
|
+
<ol class="breadcrumb">
|
|
52
|
+
<li class="crumb"><a href="/"><i class="fa-solid fa-house" /></a></li>
|
|
53
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
54
|
+
<li class="crumb"><a href="/"><i class="fa-solid fa-skull" /></a></li>
|
|
55
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
56
|
+
<li>Current</li>
|
|
57
|
+
</ol>
|
|
58
|
+
</div>
|
|
59
|
+
<!-- 4 -->
|
|
60
|
+
<div class="card card-glass p-4">
|
|
61
|
+
<ol class="breadcrumb">
|
|
62
|
+
<li class="crumb">
|
|
63
|
+
<i class="fa-solid fa-house" />
|
|
64
|
+
<a href="/">Home</a>
|
|
65
|
+
</li>
|
|
66
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
67
|
+
<li class="crumb">
|
|
68
|
+
<i class="fa-solid fa-skull" />
|
|
69
|
+
<a href="/">About</a>
|
|
70
|
+
</li>
|
|
71
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
72
|
+
<li>Current</li>
|
|
73
|
+
</ol>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</svelte:fragment>
|
|
77
|
+
|
|
78
|
+
<!-- Slot: Usage -->
|
|
79
|
+
<svelte:fragment slot="usage">
|
|
80
|
+
<section class="space-y-4">
|
|
81
|
+
<p>
|
|
82
|
+
Create an ordered list, apply the <code>.breadcrumb</code> class, then set <code>.crumb</code> and <code>.crumb-separator</code>
|
|
83
|
+
to each list item.
|
|
84
|
+
</p>
|
|
85
|
+
<CodeBlock
|
|
86
|
+
language="html"
|
|
87
|
+
code={`
|
|
88
|
+
<ol class="breadcrumb">
|
|
89
|
+
<li class="crumb"><a href="/">Home</a></li>
|
|
90
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
91
|
+
<li class="crumb"><a href="/articles">Articles</a></li>
|
|
92
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
93
|
+
<li>Current</li>
|
|
94
|
+
</ol>
|
|
95
|
+
`}
|
|
96
|
+
/>
|
|
97
|
+
</section>
|
|
98
|
+
<section class="space-y-4">
|
|
99
|
+
<h2>Non-Responsive</h2>
|
|
100
|
+
<p>
|
|
101
|
+
Breadcrumbs are responsive by default and will auto-hide all but the last two crumb elements on small screens. If you wish to
|
|
102
|
+
disable this behavior, replace <code>.breadcrumb</code> with <code>.breadcrumb-nonresponsive</code>.
|
|
103
|
+
</p>
|
|
104
|
+
<CodeBlock language="html" code={`<ol class="breadcrumb-nonresponsive">...</ol>`} />
|
|
105
|
+
</section>
|
|
106
|
+
<section class="space-y-4">
|
|
107
|
+
<h2>Using Icons</h2>
|
|
108
|
+
<p>Add your icon before or after your anchor tag within the <code>.crumb</code> list item.</p>
|
|
109
|
+
<CodeBlock
|
|
110
|
+
language="html"
|
|
111
|
+
code={`
|
|
112
|
+
<li class="crumb">
|
|
113
|
+
<span>(icon)</span>
|
|
114
|
+
<a href="/">Home</a>
|
|
115
|
+
</li>
|
|
116
|
+
`}
|
|
117
|
+
/>
|
|
118
|
+
</section>
|
|
119
|
+
<section class="space-y-4">
|
|
120
|
+
<h2>Separators</h2>
|
|
121
|
+
<!-- prettier-ignore -->
|
|
122
|
+
<p>Apply the <code>.crumb-separator</code> class to each list item containing your separator icon or <a href="https://unicode-table.com/en/sets/arrow-symbols/#right-arrows" target="_blank" rel="noreferrer">unicode symbol</a>. Per accessability, make sure to implement <code>aria-hidden</code> to hide this element from screen readers.</p>
|
|
123
|
+
<CodeBlock language="html" code={`<li class="crumb-separator" aria-hidden>›</li>`} />
|
|
124
|
+
<CodeBlock language="html" code={`<li class="crumb-separator" aria-hidden>(icon)</li>`} />
|
|
125
|
+
</section>
|
|
126
|
+
<section class="space-y-4">
|
|
127
|
+
<h2>Current Page</h2>
|
|
128
|
+
<p>We recommend the last item not include an anchor link, as this indicates the page the user is currently on.</p>
|
|
129
|
+
<CodeBlock language="html" code={`<li>Current</li>`} />
|
|
130
|
+
</section>
|
|
131
|
+
</svelte:fragment>
|
|
132
|
+
</DocsShell>
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { writable, type Writable } from 'svelte/store';
|
|
3
|
+
|
|
4
|
+
// Docs
|
|
5
|
+
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
6
|
+
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
7
|
+
// Components
|
|
8
|
+
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
9
|
+
import RadioGroup from '$lib/components/Radio/RadioGroup.svelte';
|
|
10
|
+
import RadioItem from '$lib/components/Radio/RadioItem.svelte';
|
|
11
|
+
|
|
12
|
+
// Docs Shell
|
|
13
|
+
const settings: DocsShellSettings = {
|
|
14
|
+
feature: DocsFeature.Element,
|
|
15
|
+
name: 'Buttons',
|
|
16
|
+
description: 'Provides a robust set of button styles, including preset variants.',
|
|
17
|
+
stylesheetIncludes: ['all', 'elements'],
|
|
18
|
+
stylesheets: ['elements/buttons'],
|
|
19
|
+
source: 'styles/elements/buttons.css',
|
|
20
|
+
classes: [
|
|
21
|
+
['<code>.btn</code>', '-', 'Creates a text button using a button or anchor.'],
|
|
22
|
+
['<code>.btn-icon</code>', '-', 'Creates a text icon button using a button or anchor.'],
|
|
23
|
+
['<code>.btn-[value]</code>', 'sm | base | lg | xl', 'Canned button sizes that define padding and text sizes.'],
|
|
24
|
+
['<code>.btn-icon-[value]</code>', 'sm | base | lg | xl', 'Canned icon button sizes that define padding and text sizes.'],
|
|
25
|
+
['<code>.btn-[variant]</code>', '(see usage)', 'A set of preset class styles for buttons or icon buttons.']
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Local:
|
|
30
|
+
const href = '/elements/buttons';
|
|
31
|
+
|
|
32
|
+
// Stores
|
|
33
|
+
const storeTag: Writable<string> = writable('button');
|
|
34
|
+
const storeDisabled: Writable<boolean> = writable(false);
|
|
35
|
+
const storeBtnSize: Writable<string> = writable('btn-base');
|
|
36
|
+
|
|
37
|
+
// Reactive
|
|
38
|
+
$: btnValues = {
|
|
39
|
+
variant: 'btn-filled-primary',
|
|
40
|
+
size: $storeBtnSize,
|
|
41
|
+
ring: undefined,
|
|
42
|
+
color: undefined
|
|
43
|
+
};
|
|
44
|
+
$: btnClases = Object.values(btnValues)
|
|
45
|
+
.filter((x) => x !== undefined)
|
|
46
|
+
.join(' ');
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<DocsShell {settings}>
|
|
50
|
+
<!-- Slot: Sandbox -->
|
|
51
|
+
<svelte:fragment slot="sandbox">
|
|
52
|
+
<div class="grid grid-cols-1 xl:grid-cols-[1fr_300px] gap-2">
|
|
53
|
+
<!-- Example -->
|
|
54
|
+
<div class="card grid grid-rows-[1fr_auto]">
|
|
55
|
+
<div class="p-4 flex justify-center items-center">
|
|
56
|
+
<!-- prettier-ignore -->
|
|
57
|
+
<svelte:element this={$storeTag} class="btn {btnClases}" disabled={$storeDisabled}>
|
|
58
|
+
<i class="fa-solid fa-skull" />
|
|
59
|
+
<span>Skeleton</span>
|
|
60
|
+
</svelte:element>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="p-4">
|
|
63
|
+
<CodeBlock
|
|
64
|
+
language="html"
|
|
65
|
+
code={`<` +
|
|
66
|
+
$storeTag +
|
|
67
|
+
($storeTag === 'a' ? ' href="/"' : '') +
|
|
68
|
+
` class="btn ` +
|
|
69
|
+
btnClases +
|
|
70
|
+
`"` +
|
|
71
|
+
($storeDisabled ? ' disabled' : '') +
|
|
72
|
+
`>Skeleton</` +
|
|
73
|
+
$storeTag +
|
|
74
|
+
`>`}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<!-- Options -->
|
|
79
|
+
<div class="card p-4 space-y-4">
|
|
80
|
+
<!-- Tag -->
|
|
81
|
+
<label for="">
|
|
82
|
+
<RadioGroup selected={storeTag} display="flex">
|
|
83
|
+
<RadioItem value="button">Button</RadioItem>
|
|
84
|
+
<RadioItem value="a">Anchor</RadioItem>
|
|
85
|
+
</RadioGroup>
|
|
86
|
+
</label>
|
|
87
|
+
<!-- Size -->
|
|
88
|
+
<label for="">
|
|
89
|
+
<span>Size</span>
|
|
90
|
+
<RadioGroup selected={storeBtnSize} display="flex">
|
|
91
|
+
<RadioItem value="btn-sm">sm</RadioItem>
|
|
92
|
+
<RadioItem value="btn-base">base</RadioItem>
|
|
93
|
+
<RadioItem value="btn-lg">lg</RadioItem>
|
|
94
|
+
<RadioItem value="btn-xl">xl</RadioItem>
|
|
95
|
+
</RadioGroup>
|
|
96
|
+
</label>
|
|
97
|
+
<!-- Variant -->
|
|
98
|
+
<label>
|
|
99
|
+
<span>Variant</span>
|
|
100
|
+
<select name="variant" id="variant" bind:value={btnValues.variant}>
|
|
101
|
+
<option value={undefined}>None</option>
|
|
102
|
+
<!-- Filled -->
|
|
103
|
+
<option value="btn-filled-primary">btn-filled-primary</option>
|
|
104
|
+
<option value="btn-filled-secondary">btn-filled-secondary</option>
|
|
105
|
+
<option value="btn-filled-tertiary">btn-filled-tertiary</option>
|
|
106
|
+
<option value="btn-filled-success">btn-filled-success</option>
|
|
107
|
+
<option value="btn-filled-warning">btn-filled-warning</option>
|
|
108
|
+
<option value="btn-filled-error">btn-filled-error</option>
|
|
109
|
+
<option value="btn-filled-surface">btn-filled-surface</option>
|
|
110
|
+
<!-- Ringed -->
|
|
111
|
+
<option value="btn-ringed-primary">btn-ringed-primary</option>
|
|
112
|
+
<option value="btn-ringed-secondary">btn-ringed-secondary</option>
|
|
113
|
+
<option value="btn-ringed-tertiary">btn-ringed-tertiary</option>
|
|
114
|
+
<option value="btn-ringed-success">btn-ringed-success</option>
|
|
115
|
+
<option value="btn-ringed-warning">btn-ringed-warning</option>
|
|
116
|
+
<option value="btn-ringed-error">btn-ringed-error</option>
|
|
117
|
+
<option value="btn-ringed-surface">btn-ringed-surface</option>
|
|
118
|
+
<!-- Ghost -->
|
|
119
|
+
<option value="btn-ghost-primary">btn-ghost-primary</option>
|
|
120
|
+
<option value="btn-ghost-secondary">btn-ghost-secondary</option>
|
|
121
|
+
<option value="btn-ghost-tertiary">btn-ghost-tertiary</option>
|
|
122
|
+
<option value="btn-ghost-success">btn-ghost-success</option>
|
|
123
|
+
<option value="btn-ghost-warning">btn-ghost-warning</option>
|
|
124
|
+
<option value="btn-ghost-error">btn-ghost-error</option>
|
|
125
|
+
<option value="btn-ghost-surface">btn-ghost-surface</option>
|
|
126
|
+
</select>
|
|
127
|
+
</label>
|
|
128
|
+
<!-- Ring -->
|
|
129
|
+
<label>
|
|
130
|
+
<span>Ring</span>
|
|
131
|
+
<select name="ring" id="ring" bind:value={btnValues.ring}>
|
|
132
|
+
<option value={undefined}>None</option>
|
|
133
|
+
<option value="ring-2 ring-primary-500 ring-inset">ring-2 ring-primary-500 ring-inset</option>
|
|
134
|
+
<option value="ring-2 ring-secondary-500 ring-inset">ring-2 ring-secondary-500 ring-inset</option>
|
|
135
|
+
<option value="ring-2 ring-tertiary-500 ring-inset">ring-2 ring-tertiary-500 ring-inset</option>
|
|
136
|
+
<option value="ring-2 ring-success-500 ring-inset">ring-2 ring-success-500 ring-inset</option>
|
|
137
|
+
<option value="ring-2 ring-warning-500 ring-inset">ring-2 ring-warning-500 ring-inset</option>
|
|
138
|
+
<option value="ring-2 ring-error-500 ring-inset">ring-2 ring-error-500 ring-inset</option>
|
|
139
|
+
<option value="ring-2 ring-surface-500 ring-inset">ring-2 ring-surface-500 ring-inset</option>
|
|
140
|
+
</select>
|
|
141
|
+
</label>
|
|
142
|
+
<!-- Color -->
|
|
143
|
+
<label>
|
|
144
|
+
<span>Color</span>
|
|
145
|
+
<select name="color" id="color" bind:value={btnValues.color}>
|
|
146
|
+
<option value={undefined}>Inherent</option>
|
|
147
|
+
<option value="text-white">text-white</option>
|
|
148
|
+
<option value="text-black">text-black</option>
|
|
149
|
+
<option value="text-primary-500">text-primary-500</option>
|
|
150
|
+
<option value="text-secondary-500">text-secondary-500</option>
|
|
151
|
+
<option value="text-tertiary-500">text-tertiary-500</option>
|
|
152
|
+
<option value="text-success-500">text-success-500</option>
|
|
153
|
+
<option value="text-warning-500">text-warning-500</option>
|
|
154
|
+
<option value="text-error-500">text-error-500</option>
|
|
155
|
+
<option value="text-surface-500">text-surface-500</option>
|
|
156
|
+
</select>
|
|
157
|
+
</label>
|
|
158
|
+
<!-- Disabled -->
|
|
159
|
+
<label for="">
|
|
160
|
+
<span>Disabled</span>
|
|
161
|
+
<RadioGroup selected={storeDisabled} display="flex">
|
|
162
|
+
<RadioItem value={false}>Enabled</RadioItem>
|
|
163
|
+
<RadioItem value={true}>Disabled</RadioItem>
|
|
164
|
+
</RadioGroup>
|
|
165
|
+
</label>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</svelte:fragment>
|
|
169
|
+
|
|
170
|
+
<!-- Slot: Usage -->
|
|
171
|
+
<svelte:fragment slot="usage">
|
|
172
|
+
<!-- Buttons -->
|
|
173
|
+
<div class="space-y-4">
|
|
174
|
+
<h2>Standard Button</h2>
|
|
175
|
+
<p>Add the <code>.btn</code> class to any button or anchor to create a button with minimal styling.</p>
|
|
176
|
+
<CodeBlock language="html" code={`<button class="btn">Button</button>\n<a href="/" class="btn">Anchor</a>`} />
|
|
177
|
+
<div class="card p-4 flex flex-col md:flex-row justify-center items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
178
|
+
<button class="btn">Button</button>
|
|
179
|
+
<a {href} class="btn">Anchor</a>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<!-- Icon Buttons -->
|
|
183
|
+
<div class="space-y-4">
|
|
184
|
+
<h2>Icon Buttons</h2>
|
|
185
|
+
<p>Add the <code>.btn-icon</code> class to any button or anchor to create a icon button with minimal styling.</p>
|
|
186
|
+
<CodeBlock language="html" code={`<button class="btn-icon">B</button>\n<a href="/" class="btn-icon">A</a>`} />
|
|
187
|
+
<div class="card p-4 flex flex-col md:flex-row justify-center items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
188
|
+
<button class="btn-icon">B</button>
|
|
189
|
+
<!-- FIXME: the :not() style isn't applying here so I supplemented `.unstyled` class. Browser bug perhaps? -CHRIS -->
|
|
190
|
+
<a {href} class="btn-icon unstyled">A</a>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
<!-- Icons -->
|
|
194
|
+
<div class="space-y-4">
|
|
195
|
+
<h2>Leading and Trailing Icons</h2>
|
|
196
|
+
<p>
|
|
197
|
+
By default, buttons use <code>flex-row</code> and <code>space-x-4</code> to create an evenly spaced row. Wrap children with
|
|
198
|
+
<em>span</em> tags to ensure spacing works as expected.
|
|
199
|
+
</p>
|
|
200
|
+
<CodeBlock
|
|
201
|
+
language="html"
|
|
202
|
+
code={`<button class="btn bg-primary-500">\n\t<span>💀</span>\n\t<span>Icons</span>\n\t<span>🦴</span>\n</button>`}
|
|
203
|
+
/>
|
|
204
|
+
<div class="card p-4 flex flex-col md:flex-row justify-center items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
205
|
+
<button class="btn btn-filled-primary">
|
|
206
|
+
<span>💀</span>
|
|
207
|
+
<span>Icons</span>
|
|
208
|
+
<span>🦴</span>
|
|
209
|
+
</button>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<!-- Variants -->
|
|
213
|
+
<div class="space-y-4">
|
|
214
|
+
<h2>Variants</h2>
|
|
215
|
+
<p>A set of canned preset styles are available using <code>.btn-[variant]</code>. This works for both standard and icon buttons.</p>
|
|
216
|
+
<CodeBlock language="html" code={`<button class="btn btn-filled-primary">filled-primary</button>`} />
|
|
217
|
+
<div class="card p-4 flex flex-col md:flex-row justify-center items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
218
|
+
<!-- Filled -->
|
|
219
|
+
<div class="grid grid-cols-1 gap-4">
|
|
220
|
+
<button class="btn btn-filled">filled</button>
|
|
221
|
+
<button class="btn btn-filled-primary">filled-primary</button>
|
|
222
|
+
<button class="btn btn-filled-secondary">filled-secondary</button>
|
|
223
|
+
<button class="btn btn-filled-tertiary">filled-tertiary</button>
|
|
224
|
+
<button class="btn btn-filled-success">filled-success</button>
|
|
225
|
+
<button class="btn btn-filled-warning">filled-warning</button>
|
|
226
|
+
<button class="btn btn-filled-error">filled-error</button>
|
|
227
|
+
<button class="btn btn-filled-surface">filled-surface</button>
|
|
228
|
+
</div>
|
|
229
|
+
<!-- Ringed -->
|
|
230
|
+
<div class="grid grid-cols-1 gap-4">
|
|
231
|
+
<button class="btn btn-ringed">ringed</button>
|
|
232
|
+
<button class="btn btn-ringed-primary">ringed-primary</button>
|
|
233
|
+
<button class="btn btn-ringed-secondary">ringed-secondary</button>
|
|
234
|
+
<button class="btn btn-ringed-tertiary">ringed-tertiary</button>
|
|
235
|
+
<button class="btn btn-ringed-success">ringed-success</button>
|
|
236
|
+
<button class="btn btn-ringed-warning">ringed-warning</button>
|
|
237
|
+
<button class="btn btn-ringed-error">ringed-error</button>
|
|
238
|
+
<button class="btn btn-ringed-surface">ringed-surface</button>
|
|
239
|
+
</div>
|
|
240
|
+
<!-- Ringed -->
|
|
241
|
+
<div class="grid grid-cols-1 gap-4">
|
|
242
|
+
<button class="btn btn-ghost">ghost</button>
|
|
243
|
+
<button class="btn btn-ghost-primary">ghost-primary</button>
|
|
244
|
+
<button class="btn btn-ghost-secondary">ghost-secondary</button>
|
|
245
|
+
<button class="btn btn-ghost-tertiary">ghost-tertiary</button>
|
|
246
|
+
<button class="btn btn-ghost-success">ghost-success</button>
|
|
247
|
+
<button class="btn btn-ghost-warning">ghost-warning</button>
|
|
248
|
+
<button class="btn btn-ghost-error">ghost-error</button>
|
|
249
|
+
<button class="btn btn-ghost-surface">ghost-surface</button>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
<CodeBlock language="html" code={`<button class="btn-icon btn-filled-primary">💀</button>`} />
|
|
253
|
+
<div class="card p-4 flex flex-col md:flex-row justify-center items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
254
|
+
<!-- Text -->
|
|
255
|
+
<div class="grid grid-cols-1 gap-4">
|
|
256
|
+
<button class="btn-icon btn-filled"><i class="fa-solid fa-skull" /></button>
|
|
257
|
+
<button class="btn-icon btn-filled-primary"><i class="fa-solid fa-skull" /></button>
|
|
258
|
+
<button class="btn-icon btn-filled-secondary"><i class="fa-solid fa-skull" /></button>
|
|
259
|
+
<button class="btn-icon btn-filled-tertiary"><i class="fa-solid fa-skull" /></button>
|
|
260
|
+
<button class="btn-icon btn-filled-success"><i class="fa-solid fa-skull" /></button>
|
|
261
|
+
<button class="btn-icon btn-filled-warning"><i class="fa-solid fa-skull" /></button>
|
|
262
|
+
<button class="btn-icon btn-filled-error"><i class="fa-solid fa-skull" /></button>
|
|
263
|
+
<button class="btn-icon btn-filled-surface"><i class="fa-solid fa-skull" /></button>
|
|
264
|
+
</div>
|
|
265
|
+
<!-- Ringed -->
|
|
266
|
+
<div class="grid grid-cols-1 gap-4">
|
|
267
|
+
<button class="btn-icon btn-ringed"><i class="fa-solid fa-skull" /></button>
|
|
268
|
+
<button class="btn-icon btn-ringed-primary"><i class="fa-solid fa-skull" /></button>
|
|
269
|
+
<button class="btn-icon btn-ringed-secondary"><i class="fa-solid fa-skull" /></button>
|
|
270
|
+
<button class="btn-icon btn-ringed-tertiary"><i class="fa-solid fa-skull" /></button>
|
|
271
|
+
<button class="btn-icon btn-ringed-success"><i class="fa-solid fa-skull" /></button>
|
|
272
|
+
<button class="btn-icon btn-ringed-warning"><i class="fa-solid fa-skull" /></button>
|
|
273
|
+
<button class="btn-icon btn-ringed-error"><i class="fa-solid fa-skull" /></button>
|
|
274
|
+
<button class="btn-icon btn-ringed-surface"><i class="fa-solid fa-skull" /></button>
|
|
275
|
+
</div>
|
|
276
|
+
<!-- Ringed -->
|
|
277
|
+
<div class="grid grid-cols-1 gap-4">
|
|
278
|
+
<button class="btn-icon btn-ghost"><i class="fa-solid fa-skull" /></button>
|
|
279
|
+
<button class="btn-icon btn-ghost-primary"><i class="fa-solid fa-skull" /></button>
|
|
280
|
+
<button class="btn-icon btn-ghost-secondary"><i class="fa-solid fa-skull" /></button>
|
|
281
|
+
<button class="btn-icon btn-ghost-tertiary"><i class="fa-solid fa-skull" /></button>
|
|
282
|
+
<button class="btn-icon btn-ghost-success"><i class="fa-solid fa-skull" /></button>
|
|
283
|
+
<button class="btn-icon btn-ghost-warning"><i class="fa-solid fa-skull" /></button>
|
|
284
|
+
<button class="btn-icon btn-ghost-error"><i class="fa-solid fa-skull" /></button>
|
|
285
|
+
<button class="btn-icon btn-ghost-surface"><i class="fa-solid fa-skull" /></button>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
<!-- SvelteKit Link Options -->
|
|
290
|
+
<div class="space-y-4">
|
|
291
|
+
<h2>SvelteKit Link Options</h2>
|
|
292
|
+
<p>
|
|
293
|
+
Since we use native elements, this means we can utilize <a
|
|
294
|
+
href="https://kit.svelte.dev/docs/link-options"
|
|
295
|
+
target="_blank"
|
|
296
|
+
rel="noreferrer">SvelteKit Link Options</a
|
|
297
|
+
>
|
|
298
|
+
such as a
|
|
299
|
+
<em>prefetch</em>.
|
|
300
|
+
</p>
|
|
301
|
+
<CodeBlock language="html" code={`<a href="/" class="btn" data-sveltekit-preload-data="hover">Skeleton</a>`} />
|
|
302
|
+
</div>
|
|
303
|
+
</svelte:fragment>
|
|
304
|
+
</DocsShell>
|