@skeletonlabs/skeleton 0.92.1 → 0.92.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/Clipboard/clipboard.d.ts +4 -0
- package/actions/Clipboard/clipboard.js +37 -0
- package/actions/Filters/filter.d.ts +3 -0
- package/actions/Filters/filter.js +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Apollo.svelte +0 -0
- package/actions/Filters/svg-filters/Apollo.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/BlueNight.svelte +0 -0
- package/actions/Filters/svg-filters/BlueNight.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Emerald.svelte +0 -0
- package/actions/Filters/svg-filters/Emerald.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/GreenFall.svelte +0 -0
- package/actions/Filters/svg-filters/GreenFall.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Noir.svelte +0 -0
- package/actions/Filters/svg-filters/Noir.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/NoirLight.svelte +0 -0
- package/actions/Filters/svg-filters/NoirLight.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Rustic.svelte +0 -0
- package/actions/Filters/svg-filters/Rustic.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/Summer84.svelte +0 -0
- package/actions/Filters/svg-filters/Summer84.svelte.d.ts +23 -0
- package/{src/lib/actions → actions}/Filters/svg-filters/XPro.svelte +0 -0
- package/actions/Filters/svg-filters/XPro.svelte.d.ts +23 -0
- package/actions/FocusTrap/focusTrap.d.ts +4 -0
- package/actions/FocusTrap/focusTrap.js +53 -0
- package/components/Accordion/AccordionGroup.svelte +46 -0
- package/components/Accordion/AccordionGroup.svelte.d.ts +24 -0
- package/components/Accordion/AccordionItem.svelte +73 -0
- package/components/Accordion/AccordionItem.svelte.d.ts +36 -0
- package/components/Alert/Alert.svelte +65 -0
- package/components/Alert/Alert.svelte.d.ts +30 -0
- package/components/AppBar/AppBar.svelte +54 -0
- package/components/AppBar/AppBar.svelte.d.ts +30 -0
- package/components/AppRail/AppRail.svelte +51 -0
- package/components/AppRail/AppRail.svelte.d.ts +32 -0
- package/components/AppRail/AppRailTile.svelte +57 -0
- package/components/AppRail/AppRailTile.svelte.d.ts +33 -0
- package/components/AppShell/AppShell.svelte +80 -0
- package/components/AppShell/AppShell.svelte.d.ts +31 -0
- package/components/Avatar/Avatar.svelte +46 -0
- package/components/Avatar/Avatar.svelte.d.ts +32 -0
- package/components/Breadcrumb/Breadcrumb.svelte +24 -0
- package/components/Breadcrumb/Breadcrumb.svelte.d.ts +21 -0
- package/{src/lib/components → components}/Breadcrumb/Crumb.svelte +16 -23
- package/components/Breadcrumb/Crumb.svelte.d.ts +26 -0
- package/components/ConicGradient/ConicGradient.svelte +80 -0
- package/components/ConicGradient/ConicGradient.svelte.d.ts +29 -0
- package/components/ConicGradient/settings.d.ts +13 -0
- package/components/ConicGradient/settings.js +335 -0
- package/components/ConicGradient/types.d.ts +10 -0
- package/components/ConicGradient/types.js +2 -0
- package/components/Divider/Divider.svelte +21 -0
- package/components/Divider/Divider.svelte.d.ts +22 -0
- package/components/FileButton/FileButton.svelte +25 -0
- package/components/FileButton/FileButton.svelte.d.ts +25 -0
- package/components/FileDropzone/FileDropzone.svelte +95 -0
- package/components/FileDropzone/FileDropzone.svelte.d.ts +32 -0
- package/components/GradientHeading/GradientHeading.svelte +21 -0
- package/components/GradientHeading/GradientHeading.svelte.d.ts +22 -0
- package/components/InputChip/InputChip.svelte +107 -0
- package/components/InputChip/InputChip.svelte.d.ts +29 -0
- package/components/ListBox/ListBox.svelte +57 -0
- package/components/ListBox/ListBox.svelte.d.ts +30 -0
- package/components/ListBox/ListBoxItem.svelte +88 -0
- package/components/ListBox/ListBoxItem.svelte.d.ts +32 -0
- package/components/Paginator/Paginator.svelte +74 -0
- package/components/Paginator/Paginator.svelte.d.ts +29 -0
- package/components/Paginator/types.d.ts +10 -0
- package/components/Paginator/types.js +2 -0
- package/components/ProgressBar/ProgressBar.svelte +67 -0
- package/components/ProgressBar/ProgressBar.svelte.d.ts +24 -0
- package/components/ProgressRadial/ProgressRadial.svelte +89 -0
- package/components/ProgressRadial/ProgressRadial.svelte.d.ts +25 -0
- package/components/Radio/RadioGroup.svelte +48 -0
- package/components/Radio/RadioGroup.svelte.d.ts +31 -0
- package/components/Radio/RadioItem.svelte +61 -0
- package/components/Radio/RadioItem.svelte.d.ts +33 -0
- package/components/RangeSlider/RangeSlider.svelte +101 -0
- package/components/RangeSlider/RangeSlider.svelte.d.ts +32 -0
- package/components/SlideToggle/SlideToggle.svelte +100 -0
- package/components/SlideToggle/SlideToggle.svelte.d.ts +34 -0
- package/components/Stepper/Step.svelte +133 -0
- package/components/Stepper/Step.svelte.d.ts +39 -0
- package/components/Stepper/Stepper.svelte +64 -0
- package/components/Stepper/Stepper.svelte.d.ts +32 -0
- package/components/SvgIcon/SvgIcon.svelte +45 -0
- package/components/SvgIcon/SvgIcon.svelte.d.ts +26 -0
- package/components/SvgIcon/icons.d.ts +1 -0
- package/components/SvgIcon/icons.js +25 -0
- package/components/Tab/Tab.svelte +69 -0
- package/components/Tab/Tab.svelte.d.ts +37 -0
- package/components/Tab/TabGroup.svelte +69 -0
- package/components/Tab/TabGroup.svelte.d.ts +30 -0
- package/components/Table/Table.svelte +99 -0
- package/components/Table/Table.svelte.d.ts +27 -0
- package/components/Table/types.d.ts +10 -0
- package/components/Table/types.js +1 -0
- package/components/Table/utils.d.ts +7 -0
- package/{src/lib/components/Table/utils.ts → components/Table/utils.js} +10 -16
- package/components/TableOfContents/TableOfContents.svelte +132 -0
- package/components/TableOfContents/TableOfContents.svelte.d.ts +32 -0
- package/{src/lib/index.ts → index.d.ts} +1 -31
- package/index.js +71 -0
- package/package.json +158 -61
- package/{src/lib/styles → styles}/all.css +0 -0
- package/{src/lib/styles → styles}/core.css +0 -0
- package/{src/lib/styles → styles}/elements/alerts.css +0 -0
- package/{src/lib/styles → styles}/elements/badges.css +0 -0
- package/{src/lib/styles → styles}/elements/breadcrumbs.css +0 -0
- package/{src/lib/styles → styles}/elements/buttons.css +0 -0
- package/{src/lib/styles → styles}/elements/cards.css +0 -0
- package/{src/lib/styles → styles}/elements/chips.css +0 -0
- package/{src/lib/styles → styles}/elements/lists.css +0 -0
- package/{src/lib/styles → styles}/elements/logo-clouds.css +0 -0
- package/{src/lib/styles → styles}/elements/menus.css +0 -0
- package/{src/lib/styles → styles}/elements/placeholders.css +0 -0
- package/{src/lib/styles → styles}/elements/tables.css +0 -0
- package/{src/lib/styles → styles}/elements/tooltips.css +0 -0
- package/{src/lib/styles → styles}/elements.css +0 -0
- package/{src/lib/styles → styles}/forms.css +0 -0
- package/{src/lib/styles → styles}/highlight-js.css +0 -0
- package/{src/lib/styles → styles}/tailwind.css +0 -0
- package/{src/lib/styles → styles}/typography.css +0 -0
- package/tailwind/generated/allComponents.cjs +1 -0
- package/tailwind/generated/allComponents.d.cts +2156 -0
- package/{src/lib/tailwind → tailwind}/settings.cjs +0 -0
- package/tailwind/settings.d.cts +6 -0
- package/{src/lib/tailwind → tailwind}/skeleton.cjs +0 -0
- package/tailwind/skeleton.d.cts +5 -0
- package/{src/lib/tailwind → tailwind}/theme/colors.cjs +0 -0
- package/tailwind/theme/colors.d.cts +2 -0
- package/{src/lib/tailwind → tailwind}/tokens/backgrounds.cjs +0 -0
- package/tailwind/tokens/backgrounds.d.cts +2 -0
- package/{src/lib/tailwind → tailwind}/tokens/border-radius.cjs +0 -0
- package/tailwind/tokens/border-radius.d.cts +33 -0
- package/{src/lib/tailwind → tailwind}/tokens/borders.cjs +0 -0
- package/tailwind/tokens/borders.d.cts +6 -0
- package/{src/lib/tailwind → tailwind}/tokens/fills.cjs +0 -0
- package/tailwind/tokens/fills.d.cts +15 -0
- package/{src/lib/tailwind → tailwind}/tokens/rings.cjs +0 -0
- package/tailwind/tokens/rings.d.cts +17 -0
- package/{src/lib/tailwind → tailwind}/tokens/text.cjs +0 -0
- package/tailwind/tokens/text.d.cts +21 -0
- package/{src/lib/themes → themes}/theme-crimson.css +0 -0
- package/{src/lib/themes → themes}/theme-gold-nouveau.css +0 -0
- package/{src/lib/themes → themes}/theme-hamlindigo.css +0 -0
- package/{src/lib/themes → themes}/theme-modern.css +0 -0
- package/{src/lib/themes → themes}/theme-rocket.css +0 -0
- package/{src/lib/themes → themes}/theme-sahara.css +0 -0
- package/{src/lib/themes → themes}/theme-seafoam.css +0 -0
- package/{src/lib/themes → themes}/theme-seasonal.css +0 -0
- package/{src/lib/themes → themes}/theme-skeleton.css +0 -0
- package/{src/lib/themes → themes}/theme-vintage.css +0 -0
- package/utilities/CodeBlock/CodeBlock.svelte +68 -0
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +25 -0
- package/utilities/CodeBlock/stores.d.ts +2 -0
- package/utilities/CodeBlock/stores.js +3 -0
- package/utilities/DataTable/DataTable.d.ts +18 -0
- package/utilities/DataTable/DataTable.js +137 -0
- package/utilities/DataTable/actions.d.ts +8 -0
- package/utilities/DataTable/actions.js +114 -0
- package/utilities/DataTable/types.d.ts +33 -0
- package/utilities/DataTable/types.js +2 -0
- package/utilities/Drawer/Drawer.svelte +157 -0
- package/utilities/Drawer/Drawer.svelte.d.ts +33 -0
- package/utilities/Drawer/stores.d.ts +10 -0
- package/utilities/Drawer/stores.js +21 -0
- package/utilities/Drawer/types.d.ts +33 -0
- package/utilities/Drawer/types.js +2 -0
- package/utilities/LightSwitch/LightSwitch.svelte +98 -0
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +21 -0
- package/utilities/LightSwitch/stores.d.ts +2 -0
- package/utilities/LightSwitch/stores.js +5 -0
- package/utilities/LocalStorageStore/LocalStorageStore.d.ts +12 -0
- package/utilities/LocalStorageStore/LocalStorageStore.js +49 -0
- package/utilities/Menu/menu.d.ts +18 -0
- package/utilities/Menu/menu.js +151 -0
- package/utilities/Modal/Modal.svelte +195 -0
- package/utilities/Modal/Modal.svelte.d.ts +35 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleEmbed.svelte +5 -7
- package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +17 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleForm.svelte +20 -24
- package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +17 -0
- package/{src/lib/utilities → utilities}/Modal/examples/ModalExampleList.svelte +13 -18
- package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +17 -0
- package/utilities/Modal/stores.d.ts +12 -0
- package/utilities/Modal/stores.js +24 -0
- package/utilities/Modal/types.d.ts +36 -0
- package/utilities/Modal/types.js +2 -0
- package/utilities/Toast/Toast.svelte +117 -0
- package/utilities/Toast/Toast.svelte.d.ts +28 -0
- package/utilities/Toast/stores.d.ts +10 -0
- package/utilities/Toast/stores.js +60 -0
- package/utilities/Toast/types.d.ts +26 -0
- package/utilities/Toast/types.js +2 -0
- package/utilities/Tooltip/tooltip.d.ts +35 -0
- package/utilities/Tooltip/tooltip.js +94 -0
- package/.eslintrc.cjs +0 -20
- package/.github/FUNDING.yml +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -30
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/docs_issue.yml +0 -23
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -22
- package/.github/pull_request_template.md +0 -14
- package/.prettierignore +0 -12
- package/.prettierrc +0 -6
- package/postcss.config.cjs +0 -14
- package/scripts/compile-css-to-js.cjs +0 -50
- package/scripts/generate-jss.js +0 -67
- package/scripts/post-build.js +0 -17
- package/scripts/pre-build.js +0 -14
- package/src/app.d.ts +0 -13
- package/src/app.html +0 -43
- package/src/app.postcss +0 -10
- package/src/docs/DocsAppBar/DocsAppBar.svelte +0 -213
- package/src/docs/DocsFooter/DocsFooter.svelte +0 -78
- package/src/docs/DocsLogo/DocsLogoAnim.svelte +0 -44
- package/src/docs/DocsLogo/DocsLogoFull.svelte +0 -11
- package/src/docs/DocsLogo/DocsLogoIcon.svelte +0 -6
- package/src/docs/DocsNavigation/DocsDrawer.svelte +0 -23
- package/src/docs/DocsNavigation/DocsSidebar.svelte +0 -103
- package/src/docs/DocsNavigation/links.ts +0 -148
- package/src/docs/DocsSearch/DocsSearch.svelte +0 -78
- package/src/docs/DocsShell/DocsShell.svelte +0 -377
- package/src/docs/DocsShell/sveldMapper.ts +0 -143
- package/src/docs/DocsShell/types.ts +0 -96
- package/src/docs/DocsStyles/blog.css +0 -192
- package/src/docs/DocsThemer/DocsThemer.svelte +0 -254
- package/src/docs/DocsThemer/Swatch.svelte +0 -28
- package/src/docs/DocsThemer/colors.ts +0 -122
- package/src/docs/DocsThemer/settings.ts +0 -129
- package/src/docs/DocsThemer/stores.ts +0 -5
- package/src/docs/DocsThemer/types.ts +0 -20
- package/src/docs/README.md +0 -3
- package/src/docs/stores.ts +0 -15
- package/src/lib/actions/Clipboard/clipboard.ts +0 -39
- package/src/lib/actions/Filters/filter.test.ts +0 -40
- package/src/lib/actions/Filters/filter.ts +0 -23
- package/src/lib/actions/FocusTrap/focusTrap.ts +0 -56
- package/src/lib/components/Accordion/AccordionGroup.svelte +0 -53
- package/src/lib/components/Accordion/AccordionGroup.test.ts +0 -22
- package/src/lib/components/Accordion/AccordionItem.svelte +0 -80
- package/src/lib/components/Accordion/AccordionItem.test.ts +0 -28
- package/src/lib/components/Alert/Alert.svelte +0 -71
- package/src/lib/components/Alert/Alert.test.ts +0 -30
- package/src/lib/components/AppBar/AppBar.svelte +0 -60
- package/src/lib/components/AppBar/AppBar.test.ts +0 -31
- package/src/lib/components/AppRail/AppRail.svelte +0 -58
- package/src/lib/components/AppRail/AppRailTile.svelte +0 -66
- package/src/lib/components/AppShell/AppShell.svelte +0 -84
- package/src/lib/components/AppShell/AppShell.test.ts +0 -26
- package/src/lib/components/Avatar/Avatar.svelte +0 -51
- package/src/lib/components/Avatar/Avatar.test.ts +0 -41
- package/src/lib/components/Breadcrumb/Breadcrumb.svelte +0 -30
- package/src/lib/components/Breadcrumb/Breadcrumb.test.ts +0 -20
- package/src/lib/components/Breadcrumb/Crumb.test.ts +0 -48
- package/src/lib/components/ConicGradient/ConicGradient.svelte +0 -88
- package/src/lib/components/ConicGradient/ConicGradient.test.ts +0 -26
- package/src/lib/components/ConicGradient/settings.ts +0 -345
- package/src/lib/components/ConicGradient/types.ts +0 -12
- package/src/lib/components/Divider/Divider.svelte +0 -26
- package/src/lib/components/Divider/Divider.test.ts +0 -32
- package/src/lib/components/FileButton/FileButton.svelte +0 -29
- package/src/lib/components/FileButton/FileButton.test.ts +0 -32
- package/src/lib/components/FileDropzone/FileDropzone.svelte +0 -108
- package/src/lib/components/FileDropzone/FileDropzone.test.ts +0 -32
- package/src/lib/components/GradientHeading/GradientHeading.svelte +0 -24
- package/src/lib/components/GradientHeading/GradientHeading.test.ts +0 -30
- package/src/lib/components/InputChip/InputChip.svelte +0 -118
- package/src/lib/components/ListBox/ListBox.svelte +0 -65
- package/src/lib/components/ListBox/ListBox.test.ts +0 -48
- package/src/lib/components/ListBox/ListBoxItem.svelte +0 -99
- package/src/lib/components/ListBox/ListBoxItem.test.ts +0 -22
- package/src/lib/components/Paginator/Paginator.svelte +0 -84
- package/src/lib/components/Paginator/Paginator.test.ts +0 -29
- package/src/lib/components/Paginator/types.ts +0 -12
- package/src/lib/components/ProgressBar/ProgressBar.svelte +0 -73
- package/src/lib/components/ProgressBar/ProgressBar.test.ts +0 -27
- package/src/lib/components/ProgressRadial/ProgressRadial.svelte +0 -98
- package/src/lib/components/ProgressRadial/ProgressRadial.test.ts +0 -26
- package/src/lib/components/Radio/RadioGroup.svelte +0 -54
- package/src/lib/components/Radio/RadioGroup.test.ts +0 -35
- package/src/lib/components/Radio/RadioItem.svelte +0 -71
- package/src/lib/components/Radio/RadioItem.test.ts +0 -32
- package/src/lib/components/RangeSlider/RangeSlider.svelte +0 -110
- package/src/lib/components/RangeSlider/RangeSlider.test.ts +0 -44
- package/src/lib/components/SlideToggle/SlideToggle.svelte +0 -106
- package/src/lib/components/SlideToggle/SlideToggle.test.ts +0 -23
- package/src/lib/components/Stepper/Step.svelte +0 -140
- package/src/lib/components/Stepper/Step.test.ts +0 -21
- package/src/lib/components/Stepper/Stepper.svelte +0 -71
- package/src/lib/components/Stepper/Stepper.test.ts +0 -31
- package/src/lib/components/SvgIcon/SvgIcon.svelte +0 -50
- package/src/lib/components/SvgIcon/SvgIcon.test.ts +0 -28
- package/src/lib/components/SvgIcon/icons.ts +0 -29
- package/src/lib/components/Tab/Tab.svelte +0 -79
- package/src/lib/components/Tab/Tab.test.ts +0 -26
- package/src/lib/components/Tab/TabGroup.svelte +0 -78
- package/src/lib/components/Tab/TabGroup.test.ts +0 -30
- package/src/lib/components/Table/Table.svelte +0 -106
- package/src/lib/components/Table/types.ts +0 -10
- package/src/lib/components/TableOfContents/TableOfContents.svelte +0 -139
- package/src/lib/themes/theme-test.css +0 -96
- package/src/lib/utilities/CodeBlock/CodeBlock.svelte +0 -78
- package/src/lib/utilities/CodeBlock/CodeBlock.test.ts +0 -27
- package/src/lib/utilities/CodeBlock/stores.ts +0 -5
- package/src/lib/utilities/DataTable/DataTable.ts +0 -151
- package/src/lib/utilities/DataTable/actions.ts +0 -100
- package/src/lib/utilities/DataTable/types.ts +0 -33
- package/src/lib/utilities/Drawer/Drawer.svelte +0 -173
- package/src/lib/utilities/Drawer/Drawer.test.ts +0 -15
- package/src/lib/utilities/Drawer/stores.ts +0 -27
- package/src/lib/utilities/Drawer/types.ts +0 -47
- package/src/lib/utilities/LightSwitch/LightSwitch.svelte +0 -116
- package/src/lib/utilities/LightSwitch/LightSwitch.test.ts +0 -19
- package/src/lib/utilities/LightSwitch/stores.ts +0 -7
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.test.ts +0 -220
- package/src/lib/utilities/LocalStorageStore/LocalStorageStore.ts +0 -77
- package/src/lib/utilities/Menu/menu.test.ts +0 -22
- package/src/lib/utilities/Menu/menu.ts +0 -172
- package/src/lib/utilities/Modal/Modal.svelte +0 -206
- package/src/lib/utilities/Modal/Modal.test.ts +0 -50
- package/src/lib/utilities/Modal/stores.ts +0 -29
- package/src/lib/utilities/Modal/types.ts +0 -39
- package/src/lib/utilities/Toast/Toast.svelte +0 -95
- package/src/lib/utilities/Toast/Toats.test.ts +0 -25
- package/src/lib/utilities/Toast/stores.ts +0 -63
- package/src/lib/utilities/Toast/types.ts +0 -29
- package/src/lib/utilities/Tooltip/tooltip.ts +0 -137
- package/src/routes/(inner)/+layout.svelte +0 -3
- package/src/routes/(inner)/actions/clipboard/+page.svelte +0 -87
- package/src/routes/(inner)/actions/filters/+page.svelte +0 -151
- package/src/routes/(inner)/actions/focus-trap/+page.svelte +0 -59
- package/src/routes/(inner)/components/accordions/+page.svelte +0 -127
- package/src/routes/(inner)/components/alerts/+page.svelte +0 -130
- package/src/routes/(inner)/components/app-bar/+page.svelte +0 -52
- package/src/routes/(inner)/components/app-rail/+page.svelte +0 -105
- package/src/routes/(inner)/components/app-shell/+page.svelte +0 -159
- package/src/routes/(inner)/components/avatars/+page.svelte +0 -193
- package/src/routes/(inner)/components/breadcrumbs/+page.svelte +0 -121
- package/src/routes/(inner)/components/conic-gradients/+page.svelte +0 -161
- package/src/routes/(inner)/components/dividers/+page.svelte +0 -146
- package/src/routes/(inner)/components/file-buttons/+page.svelte +0 -46
- package/src/routes/(inner)/components/file-dropzone/+page.svelte +0 -71
- package/src/routes/(inner)/components/gradient-headings/+page.svelte +0 -138
- package/src/routes/(inner)/components/input-chips/+page.svelte +0 -128
- package/src/routes/(inner)/components/listboxes/+page.svelte +0 -92
- package/src/routes/(inner)/components/paginators/+page.svelte +0 -118
- package/src/routes/(inner)/components/progress-bars/+page.svelte +0 -157
- package/src/routes/(inner)/components/progress-radials/+page.svelte +0 -64
- package/src/routes/(inner)/components/radio-groups/+page.svelte +0 -91
- package/src/routes/(inner)/components/range-sliders/+page.svelte +0 -134
- package/src/routes/(inner)/components/slide-toggles/+page.svelte +0 -63
- package/src/routes/(inner)/components/steppers/+page.svelte +0 -168
- package/src/routes/(inner)/components/svg-icons/+page.svelte +0 -60
- package/src/routes/(inner)/components/table-of-contents/+page.svelte +0 -110
- package/src/routes/(inner)/components/tables/+page.svelte +0 -216
- package/src/routes/(inner)/components/tabs/+page.svelte +0 -146
- package/src/routes/(inner)/docs/comparisons/+page.svelte +0 -130
- package/src/routes/(inner)/docs/contributions/+page.svelte +0 -78
- package/src/routes/(inner)/docs/contributions/documentation/+page.svelte +0 -217
- package/src/routes/(inner)/docs/contributions/requirements/+page.svelte +0 -173
- package/src/routes/(inner)/docs/contributions/style-guide/+page.svelte +0 -164
- package/src/routes/(inner)/docs/faqs/+page.svelte +0 -80
- package/src/routes/(inner)/docs/features/+page.svelte +0 -121
- package/src/routes/(inner)/docs/recommended/+page.svelte +0 -162
- package/src/routes/(inner)/docs/why/+page.svelte +0 -104
- package/src/routes/(inner)/elements/alerts/+page.svelte +0 -142
- package/src/routes/(inner)/elements/badges/+page.svelte +0 -155
- package/src/routes/(inner)/elements/breadcrumbs/+page.svelte +0 -132
- package/src/routes/(inner)/elements/buttons/+page.svelte +0 -304
- package/src/routes/(inner)/elements/cards/+page.svelte +0 -117
- package/src/routes/(inner)/elements/chips/+page.svelte +0 -130
- package/src/routes/(inner)/elements/core/+page.svelte +0 -98
- package/src/routes/(inner)/elements/forms/+page.svelte +0 -89
- package/src/routes/(inner)/elements/forms/preview/+page.svelte +0 -256
- package/src/routes/(inner)/elements/lists/+page.svelte +0 -197
- package/src/routes/(inner)/elements/logo-clouds/+page.svelte +0 -105
- package/src/routes/(inner)/elements/placeholders/+page.svelte +0 -70
- package/src/routes/(inner)/elements/tables/+page.svelte +0 -138
- package/src/routes/(inner)/elements/tokens/+page.svelte +0 -176
- package/src/routes/(inner)/elements/typography/+page.svelte +0 -100
- package/src/routes/(inner)/guides/install/+page.svelte +0 -84
- package/src/routes/(inner)/guides/quickstart/+page.svelte +0 -118
- package/src/routes/(inner)/guides/styling/+page.svelte +0 -361
- package/src/routes/(inner)/guides/tailwind/+page.svelte +0 -150
- package/src/routes/(inner)/guides/themes/+page.svelte +0 -144
- package/src/routes/(inner)/guides/themes/colors/+page.svelte +0 -87
- package/src/routes/(inner)/guides/themes/generator/+page.svelte +0 -58
- package/src/routes/(inner)/guides/themes/presets.ts +0 -69
- package/src/routes/(inner)/template/+page.svelte +0 -52
- package/src/routes/(inner)/utilities/codeblocks/+page.svelte +0 -77
- package/src/routes/(inner)/utilities/data-tables/+page.svelte +0 -399
- package/src/routes/(inner)/utilities/data-tables/+page.ts +0 -18
- package/src/routes/(inner)/utilities/drawers/+page.svelte +0 -193
- package/src/routes/(inner)/utilities/lightswitches/+page.svelte +0 -86
- package/src/routes/(inner)/utilities/local-storage-stores/+page.svelte +0 -67
- package/src/routes/(inner)/utilities/menus/+page.svelte +0 -186
- package/src/routes/(inner)/utilities/modals/+page.svelte +0 -391
- package/src/routes/(inner)/utilities/toasts/+page.svelte +0 -212
- package/src/routes/(inner)/utilities/tooltips/+page.svelte +0 -153
- package/src/routes/+error.svelte +0 -16
- package/src/routes/+layout.server.ts +0 -13
- package/src/routes/+layout.svelte +0 -100
- package/src/routes/+page.server.ts +0 -12
- package/src/routes/+page.svelte +0 -197
- package/src/routes/blog/+page.svelte +0 -78
- package/src/routes/blog/+page.ts +0 -6
- package/src/routes/blog/[slug]/+page.svelte +0 -112
- package/src/routes/blog/[slug]/+page.ts +0 -6
- package/src/routes/blog/blog-service.ts +0 -31
- package/src/routes/blog/rss/+server.ts +0 -16
- package/static/favicon.png +0 -0
- package/svelte.config.js +0 -30
- package/tailwind.config.cjs +0 -14
- package/tsconfig.json +0 -37
- package/vite.config.js +0 -25
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { writable, type Writable } from 'svelte/store';
|
|
3
|
-
|
|
4
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
5
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
6
|
-
|
|
7
|
-
import Divider from '$lib/components/Divider/Divider.svelte';
|
|
8
|
-
import RadioGroup from '$lib/components/Radio/RadioGroup.svelte';
|
|
9
|
-
import RadioItem from '$lib/components/Radio/RadioItem.svelte';
|
|
10
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
11
|
-
|
|
12
|
-
// @ts-expect-error sveld import
|
|
13
|
-
import sveldDivider from '$lib/components/Divider/Divider.svelte?raw&sveld';
|
|
14
|
-
|
|
15
|
-
// Stores
|
|
16
|
-
const storeVertical: Writable<boolean> = writable(false);
|
|
17
|
-
const storeBorderWidth: Writable<string> = writable('border-t');
|
|
18
|
-
const storeBorderStyle: Writable<string> = writable('border-solid');
|
|
19
|
-
const defaultBorderColor = 'border-surface-300 dark:border-surface-700';
|
|
20
|
-
|
|
21
|
-
// Docs Shell
|
|
22
|
-
const settings: DocsShellSettings = {
|
|
23
|
-
feature: DocsFeature.Component,
|
|
24
|
-
name: 'Dividers',
|
|
25
|
-
description: 'Horizontal or vertical rules for sectioning your content.',
|
|
26
|
-
imports: ['Divider'],
|
|
27
|
-
source: 'components/Divider',
|
|
28
|
-
components: [{ sveld: sveldDivider }]
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Switches between top and left oriented styles
|
|
32
|
-
function setOrientationStyles(): void {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
const newDefaultWidth: string = $storeVertical === true ? 'border-l' : 'border-t';
|
|
35
|
-
storeBorderWidth.set(newDefaultWidth);
|
|
36
|
-
}, 10);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Reactive Props
|
|
40
|
-
$: props = {
|
|
41
|
-
vertical: $storeVertical,
|
|
42
|
-
borderWidth: $storeBorderWidth,
|
|
43
|
-
borderStyle: $storeBorderStyle,
|
|
44
|
-
borderColor: defaultBorderColor
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<DocsShell {settings}>
|
|
49
|
-
<!-- Slot: Sandbox -->
|
|
50
|
-
<svelte:fragment slot="sandbox">
|
|
51
|
-
<aside class="alert alert-error">
|
|
52
|
-
<i class="fa-solid fa-triangle-exclamation text-4xl" />
|
|
53
|
-
<div class="alert-message">
|
|
54
|
-
<h3>Deprecated</h3>
|
|
55
|
-
<p>This component is slated for removal. Please migrate the element styles provided by <em>core.css</em>.</p>
|
|
56
|
-
</div>
|
|
57
|
-
<a href="/elements/core" class="alert-message btn btn-filled">View Elements</a>
|
|
58
|
-
</aside>
|
|
59
|
-
<section class="grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-2">
|
|
60
|
-
<!-- Example -->
|
|
61
|
-
<div class="card card-glass-surface p-4">
|
|
62
|
-
<div class="h-full min-h-[100px] max-w-[480px] mx-auto flex justify-center items-center">
|
|
63
|
-
<!-- prettier-ignore -->
|
|
64
|
-
<svelte:component
|
|
65
|
-
this={Divider}
|
|
66
|
-
vertical={props.vertical}
|
|
67
|
-
borderWidth={props.borderWidth}
|
|
68
|
-
borderStyle={props.borderStyle}
|
|
69
|
-
borderColor={props.borderColor}
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<!-- Options -->
|
|
74
|
-
<div class="card p-4 space-y-4">
|
|
75
|
-
<!-- Orientation -->
|
|
76
|
-
<label for="">
|
|
77
|
-
<span>Vertical</span>
|
|
78
|
-
<!-- prettier-ignore -->
|
|
79
|
-
<RadioGroup selected={storeVertical} display="flex">
|
|
80
|
-
<RadioItem value={false} on:click={() => { setOrientationStyles(); }}>false</RadioItem>
|
|
81
|
-
<RadioItem value={true} on:click={() => { setOrientationStyles(); }}>true</RadioItem >
|
|
82
|
-
</RadioGroup>
|
|
83
|
-
</label>
|
|
84
|
-
<!-- Border Width -->
|
|
85
|
-
<label for="">
|
|
86
|
-
<div class="flex justify-between items-center">
|
|
87
|
-
<span>Border Width</span>
|
|
88
|
-
<span>{$storeBorderWidth}</span>
|
|
89
|
-
</div>
|
|
90
|
-
<RadioGroup selected={storeBorderWidth} display="flex">
|
|
91
|
-
{#if $storeVertical === false}
|
|
92
|
-
<RadioItem value="border-t">1</RadioItem>
|
|
93
|
-
<RadioItem value="border-t-2">2</RadioItem>
|
|
94
|
-
<RadioItem value="border-t-4">4</RadioItem>
|
|
95
|
-
<RadioItem value="border-t-8">8</RadioItem>
|
|
96
|
-
{:else}
|
|
97
|
-
<RadioItem value="border-l">1</RadioItem>
|
|
98
|
-
<RadioItem value="border-l-2">2</RadioItem>
|
|
99
|
-
<RadioItem value="border-l-4">4</RadioItem>
|
|
100
|
-
<RadioItem value="border-l-8">8</RadioItem>
|
|
101
|
-
{/if}
|
|
102
|
-
</RadioGroup>
|
|
103
|
-
</label>
|
|
104
|
-
<!-- Border Style -->
|
|
105
|
-
<label for="">
|
|
106
|
-
<div class="flex justify-between items-center">
|
|
107
|
-
<span>Border Style</span>
|
|
108
|
-
<span>{$storeBorderStyle}</span>
|
|
109
|
-
</div>
|
|
110
|
-
<RadioGroup selected={storeBorderStyle} display="flex">
|
|
111
|
-
<RadioItem value="border-solid">Solid</RadioItem>
|
|
112
|
-
<RadioItem value="border-dashed">Dashed</RadioItem>
|
|
113
|
-
<RadioItem value="border-dotted">Dotted</RadioItem>
|
|
114
|
-
<RadioItem value="border-double">Double</RadioItem>
|
|
115
|
-
</RadioGroup>
|
|
116
|
-
</label>
|
|
117
|
-
<!-- Border Color -->
|
|
118
|
-
<label>
|
|
119
|
-
<span>Border Color</span>
|
|
120
|
-
<select name="background" id="background" bind:value={props.borderColor}>
|
|
121
|
-
<option value={defaultBorderColor}>Inherent</option>
|
|
122
|
-
<option value="border-primary-500">border-primary-500</option>
|
|
123
|
-
<option value="border-secondary-500">border-secondary-500</option>
|
|
124
|
-
<option value="border-tertiary-500">border-tertiary-500</option>
|
|
125
|
-
<option value="border-success-500">border-success-500</option>
|
|
126
|
-
<option value="border-warning-500">border-warning-500</option>
|
|
127
|
-
<option value="border-error-500">border-error-500</option>
|
|
128
|
-
<option value="border-surface-500">border-surface-500</option>
|
|
129
|
-
</select>
|
|
130
|
-
</label>
|
|
131
|
-
</div>
|
|
132
|
-
</section>
|
|
133
|
-
</svelte:fragment>
|
|
134
|
-
|
|
135
|
-
<!-- Slot: Usage -->
|
|
136
|
-
<svelte:fragment slot="usage">
|
|
137
|
-
<section class="space-y-4">
|
|
138
|
-
<p>Uses a horizontal rule <code>hr</code> tag, which has an inherent <code>role="separator"</code></p>
|
|
139
|
-
<CodeBlock language="html" code={`<Divider />`} />
|
|
140
|
-
</section>
|
|
141
|
-
<section class="space-y-4">
|
|
142
|
-
<h2>Vertical Mode</h2>
|
|
143
|
-
<CodeBlock language="html" code={`<Divider vertical={true} borderWidth="border-l" />`} />
|
|
144
|
-
</section>
|
|
145
|
-
</svelte:fragment>
|
|
146
|
-
</DocsShell>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
3
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
4
|
-
|
|
5
|
-
import FileButton from '$lib/components/FileButton/FileButton.svelte';
|
|
6
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
7
|
-
|
|
8
|
-
// @ts-expect-error sveld import
|
|
9
|
-
import sveldFileButton from '$lib/components/FileButton/FileButton.svelte?raw&sveld';
|
|
10
|
-
|
|
11
|
-
// Docs Shell
|
|
12
|
-
const settings: DocsShellSettings = {
|
|
13
|
-
feature: DocsFeature.Component,
|
|
14
|
-
name: 'File Buttons',
|
|
15
|
-
description: 'Allows you to select files with a single click.',
|
|
16
|
-
imports: ['FileButton'],
|
|
17
|
-
source: 'components/FileButton',
|
|
18
|
-
components: [{ sveld: sveldFileButton }],
|
|
19
|
-
restProps: 'input'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Local
|
|
23
|
-
let files: FileList;
|
|
24
|
-
|
|
25
|
-
function onChange(e: Event): void {
|
|
26
|
-
console.log('file data:', e);
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<DocsShell {settings}>
|
|
31
|
-
<!-- Slot: Sandbox -->
|
|
32
|
-
<svelte:fragment slot="sandbox">
|
|
33
|
-
<section class="card p-4 text-center !py-10 space-y-4">
|
|
34
|
-
<FileButton bind:files accept="image/*" name="file" button="btn-filled-secondary" on:change={onChange}>Upload File</FileButton>
|
|
35
|
-
<p class="!text-xs text-center">Monitor your browser's console when adding files.</p>
|
|
36
|
-
</section>
|
|
37
|
-
</svelte:fragment>
|
|
38
|
-
|
|
39
|
-
<!-- Slot: Usage -->
|
|
40
|
-
<svelte:fragment slot="usage">
|
|
41
|
-
<section class="space-y-4">
|
|
42
|
-
<CodeBlock language="ts" code={`let files: FileList;`} />
|
|
43
|
-
<CodeBlock language="html" code={`<FileButton bind:files button="btn-filled-secondary">Upload File</FileButton>`} />
|
|
44
|
-
</section>
|
|
45
|
-
</svelte:fragment>
|
|
46
|
-
</DocsShell>
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
3
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
4
|
-
|
|
5
|
-
import FileDropzone from '$lib/components/FileDropzone/FileDropzone.svelte';
|
|
6
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
7
|
-
|
|
8
|
-
// @ts-expect-error sveld import
|
|
9
|
-
import sveldFileDropzone from '$lib/components/FileDropzone/FileDropzone.svelte?raw&sveld';
|
|
10
|
-
|
|
11
|
-
// Docs Shell
|
|
12
|
-
const settings: DocsShellSettings = {
|
|
13
|
-
feature: DocsFeature.Component,
|
|
14
|
-
name: 'File Dropzone',
|
|
15
|
-
description: 'Allow upload of files with drag and drop.',
|
|
16
|
-
imports: ['FileDropzone'],
|
|
17
|
-
source: 'components/FileDropzone',
|
|
18
|
-
components: [{ sveld: sveldFileDropzone }],
|
|
19
|
-
restProps: 'input'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Local
|
|
23
|
-
let files: FileList;
|
|
24
|
-
|
|
25
|
-
function onChange(e: any): void {
|
|
26
|
-
console.log('file data:', e);
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<DocsShell {settings}>
|
|
31
|
-
<!-- Slot: Sandbox -->
|
|
32
|
-
<svelte:fragment slot="sandbox">
|
|
33
|
-
<section class="space-y-2">
|
|
34
|
-
<div class="card p-4 grid grid-cols-1 xl:grid-cols-2 gap-4">
|
|
35
|
-
<label for="">
|
|
36
|
-
<span>Upload File</span>
|
|
37
|
-
<FileDropzone bind:files notes="Files should not exceed 5mb." on:change={onChange} required />
|
|
38
|
-
</label>
|
|
39
|
-
<label for="">
|
|
40
|
-
<span>Custom Message</span>
|
|
41
|
-
<FileDropzone bind:files on:change={onChange}><p>(message)</p></FileDropzone>
|
|
42
|
-
</label>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="text-center"><code>Monitor your browser's console when adding files.</code></div>
|
|
45
|
-
</section>
|
|
46
|
-
</svelte:fragment>
|
|
47
|
-
|
|
48
|
-
<!-- Slot: Usage -->
|
|
49
|
-
<svelte:fragment slot="usage">
|
|
50
|
-
<div class="space-y-4">
|
|
51
|
-
<p>Uses <code>input[type='file']</code> to allow for all native input accessibility.</p>
|
|
52
|
-
<CodeBlock language="ts" code={`let files: FileList;`} />
|
|
53
|
-
<CodeBlock language="html" code={`<FileDropzone bind:files />`} />
|
|
54
|
-
</div>
|
|
55
|
-
<div class="space-y-4">
|
|
56
|
-
<h2>Title</h2>
|
|
57
|
-
<p>Use the <code>title</code> property to provide a custom title.</p>
|
|
58
|
-
<CodeBlock language="html" code={`<FileDropzone title="Upload your Attachment here." />`} />
|
|
59
|
-
</div>
|
|
60
|
-
<div class="space-y-4">
|
|
61
|
-
<h2>Notes</h2>
|
|
62
|
-
<p>Use the <code>notes</code> property to provide additional text information on a second line.</p>
|
|
63
|
-
<CodeBlock language="html" code={`<FileDropzone notes="Files should not exceed 5mb." />`} />
|
|
64
|
-
</div>
|
|
65
|
-
<div class="space-y-4">
|
|
66
|
-
<h2>Message</h2>
|
|
67
|
-
<p>Use the default slot to replace the default UI entirely.</p>
|
|
68
|
-
<CodeBlock language="html" code={`<FileDropzone>(message)</FileDropzone>`} />
|
|
69
|
-
</div>
|
|
70
|
-
</svelte:fragment>
|
|
71
|
-
</DocsShell>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { writable, type Writable } from 'svelte/store';
|
|
3
|
-
|
|
4
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
5
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
6
|
-
|
|
7
|
-
import GradientHeading from '$lib/components/GradientHeading/GradientHeading.svelte';
|
|
8
|
-
import RadioGroup from '$lib/components/Radio/RadioGroup.svelte';
|
|
9
|
-
import RadioItem from '$lib/components/Radio/RadioItem.svelte';
|
|
10
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
11
|
-
|
|
12
|
-
// @ts-expect-error sveld import
|
|
13
|
-
import sveldGradientHeading from '$lib/components/GradientHeading/GradientHeading.svelte?raw&sveld';
|
|
14
|
-
|
|
15
|
-
// Docs Shell
|
|
16
|
-
const settings: DocsShellSettings = {
|
|
17
|
-
feature: DocsFeature.Component,
|
|
18
|
-
name: 'Gradient Headings',
|
|
19
|
-
description: 'Generate a gradient-colored heading with customizable tag and gradient direction.',
|
|
20
|
-
imports: ['GradientHeading'],
|
|
21
|
-
source: 'components/GradientHeading',
|
|
22
|
-
components: [{ sveld: sveldGradientHeading }]
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Stores
|
|
26
|
-
const storeTag: Writable<string> = writable('h1');
|
|
27
|
-
|
|
28
|
-
// Reactive Props
|
|
29
|
-
$: props = {
|
|
30
|
-
text: 'Skeleton',
|
|
31
|
-
tag: $storeTag,
|
|
32
|
-
direction: 'bg-gradient-to-r',
|
|
33
|
-
from: 'from-primary-500',
|
|
34
|
-
to: 'to-secondary-500'
|
|
35
|
-
};
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<DocsShell {settings}>
|
|
39
|
-
<!-- Slot: Sandbox -->
|
|
40
|
-
<svelte:fragment slot="sandbox">
|
|
41
|
-
<!-- Alert -->
|
|
42
|
-
<aside class="alert alert-error">
|
|
43
|
-
<div class="alert-message">
|
|
44
|
-
<h3><i class="fa-solid fa-triangle-exclamation mr-2" /> Deprecated</h3>
|
|
45
|
-
<p>
|
|
46
|
-
This component is slated to be <u>removed</u>. We recommend using the following Tailwind styles if you wish to replicate this.
|
|
47
|
-
</p>
|
|
48
|
-
<CodeBlock language="html" code={`<h1><span class="gradient-heading">Skeleton</span></h1>`} />
|
|
49
|
-
<CodeBlock
|
|
50
|
-
language="css"
|
|
51
|
-
code={`
|
|
52
|
-
.gradient-heading {
|
|
53
|
-
@apply bg-gradient-to-r from-primary-500 to-bg-secondary-500 bg-clip text-transparent box-decoration-clone;
|
|
54
|
-
}
|
|
55
|
-
`}
|
|
56
|
-
/>
|
|
57
|
-
<!-- prettier-ignore -->
|
|
58
|
-
<p>See the <a class="!text-error-200" href="https://tailwindcss.com/docs/gradient-color-stops" target="_blank" rel="noreferrer">Tailwind documentation</a> for additional gradient options.</p>
|
|
59
|
-
</div>
|
|
60
|
-
</aside>
|
|
61
|
-
|
|
62
|
-
<section class="space-y-4 xl:space-y-0 xl:grid grid-cols-[1fr_300px] gap-2">
|
|
63
|
-
<!-- Example -->
|
|
64
|
-
<div class="card p-4 h-full flex justify-center items-center">
|
|
65
|
-
<svelte:component this={GradientHeading} tag={props.tag} direction={props.direction} from={props.from} to={props.to}
|
|
66
|
-
>{props.text}</svelte:component
|
|
67
|
-
>
|
|
68
|
-
</div>
|
|
69
|
-
<!-- Options -->
|
|
70
|
-
<div class="card p-4 space-y-4">
|
|
71
|
-
<label>
|
|
72
|
-
<span>Text</span>
|
|
73
|
-
<input type="text" bind:value={props.text} placeholder="Enter text..." />
|
|
74
|
-
</label>
|
|
75
|
-
<!-- Tag -->
|
|
76
|
-
<label for="">
|
|
77
|
-
<span>Tag</span>
|
|
78
|
-
<RadioGroup selected={storeTag} display="flex">
|
|
79
|
-
<RadioItem value="h1">h1</RadioItem>
|
|
80
|
-
<RadioItem value="h3">h3</RadioItem>
|
|
81
|
-
<RadioItem value="h6">h6</RadioItem>
|
|
82
|
-
<RadioItem value="p">p</RadioItem>
|
|
83
|
-
</RadioGroup>
|
|
84
|
-
</label>
|
|
85
|
-
<!-- Direction -->
|
|
86
|
-
<label>
|
|
87
|
-
<span>Direction</span>
|
|
88
|
-
<select name="direction" id="direction" bind:value={props.direction}>
|
|
89
|
-
<option value="bg-gradient-to-t">bg-gradient-to-t</option>
|
|
90
|
-
<option value="bg-gradient-to-b">bg-gradient-to-b</option>
|
|
91
|
-
<option value="bg-gradient-to-l">bg-gradient-to-l</option>
|
|
92
|
-
<option value="bg-gradient-to-r">bg-gradient-to-r</option>
|
|
93
|
-
<option value="bg-gradient-to-tl">bg-gradient-to-tl</option>
|
|
94
|
-
<option value="bg-gradient-to-tr">bg-gradient-to-tr</option>
|
|
95
|
-
<option value="bg-gradient-to-bl">bg-gradient-to-bl</option>
|
|
96
|
-
<option value="bg-gradient-to-br">bg-gradient-to-br</option>
|
|
97
|
-
<option value="bg-gradient-to-r">bg-gradient-to-r</option>
|
|
98
|
-
</select>
|
|
99
|
-
</label>
|
|
100
|
-
<!-- From -->
|
|
101
|
-
<label>
|
|
102
|
-
<span>From</span>
|
|
103
|
-
<select name="from" id="from" bind:value={props.from}>
|
|
104
|
-
<option value="from-primary-500">from-primary-500</option>
|
|
105
|
-
<option value="from-secondary-500">from-secondary-500</option>
|
|
106
|
-
<option value="from-tertiary-500">from-tertiary-500</option>
|
|
107
|
-
<option value="from-warning-500">from-warning-500</option>
|
|
108
|
-
<option value="from-surface-500">from-surface-500</option>
|
|
109
|
-
</select>
|
|
110
|
-
</label>
|
|
111
|
-
<!-- To -->
|
|
112
|
-
<label>
|
|
113
|
-
<span>To</span>
|
|
114
|
-
<select name="to" id="to" bind:value={props.to}>
|
|
115
|
-
<option value="to-primary-500">to-primary-500</option>
|
|
116
|
-
<option value="to-secondary-500">to-secondary-500</option>
|
|
117
|
-
<option value="to-tertiary-500">to-tertiary-500</option>
|
|
118
|
-
<option value="to-warning-500">to-warning-500</option>
|
|
119
|
-
<option value="to-surface-500">to-surface-500</option>
|
|
120
|
-
</select>
|
|
121
|
-
</label>
|
|
122
|
-
</div>
|
|
123
|
-
</section>
|
|
124
|
-
</svelte:fragment>
|
|
125
|
-
|
|
126
|
-
<!-- Slot: Usage -->
|
|
127
|
-
<svelte:fragment slot="usage">
|
|
128
|
-
<section class="space-y-4">
|
|
129
|
-
<p>
|
|
130
|
-
You are advised to use semantic heading tags (H1-H6). However, an explicit ARIA attribute of <code>role="heading"</code> has been applied.
|
|
131
|
-
</p>
|
|
132
|
-
<CodeBlock
|
|
133
|
-
language="html"
|
|
134
|
-
code={`<GradientHeading tag="h1" direction="bg-gradient-to-r" from="from-primary-500" to="to-secondary-500">Skeleton</GradientHeading>`}
|
|
135
|
-
/>
|
|
136
|
-
</section>
|
|
137
|
-
</svelte:fragment>
|
|
138
|
-
</DocsShell>
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
3
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
4
|
-
|
|
5
|
-
// Utilities
|
|
6
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
7
|
-
|
|
8
|
-
// Components
|
|
9
|
-
import InputChip from '$lib/components/InputChip/InputChip.svelte';
|
|
10
|
-
|
|
11
|
-
// @ts-expect-error
|
|
12
|
-
import sveldInputChip from '$lib/components/InputChip/InputChip.svelte?raw&sveld';
|
|
13
|
-
|
|
14
|
-
// Docs Shell
|
|
15
|
-
const settings: DocsShellSettings = {
|
|
16
|
-
feature: DocsFeature.Component,
|
|
17
|
-
name: 'Input Chips',
|
|
18
|
-
description: 'Allows input of multiple values.',
|
|
19
|
-
imports: ['InputChip'],
|
|
20
|
-
stylesheetIncludes: ['all', 'elements'],
|
|
21
|
-
stylesheets: ['elements/forms', 'elements/chips'],
|
|
22
|
-
source: 'components/InputChip',
|
|
23
|
-
components: [{ sveld: sveldInputChip }],
|
|
24
|
-
// aria: 'https://www.w3.org/WAI/ARIA/apg/',
|
|
25
|
-
restProps: 'input'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// Local
|
|
29
|
-
let tags = ['tutorials', 'news', 'interviews'];
|
|
30
|
-
let flavors = ['vanilla', 'chocolate', 'strawberry'];
|
|
31
|
-
let flavorsWhitelist = ['vanilla', 'chocolate', 'strawberry', 'peach', 'rocky road'];
|
|
32
|
-
let emails = ['john@email.com', 'jane@email.com', 'sally@email.com'];
|
|
33
|
-
|
|
34
|
-
function isValidEmail(value: string): boolean {
|
|
35
|
-
return value.includes('@') && value.includes('.');
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<DocsShell {settings}>
|
|
40
|
-
<!-- Slot: Sandbox -->
|
|
41
|
-
<svelte:fragment slot="sandbox">
|
|
42
|
-
<section class="space-y-4">
|
|
43
|
-
<p>Type a value then hit ENTER to apply it.</p>
|
|
44
|
-
<!-- Tags -->
|
|
45
|
-
<div class="card p-4 space-y-4">
|
|
46
|
-
<p>This input allows for any value to be entered.</p>
|
|
47
|
-
<InputChip placeholder="Add tags..." bind:value={tags} />
|
|
48
|
-
<code class="inline-block">{tags.length ? tags : 'No tags set.'}</code>
|
|
49
|
-
</div>
|
|
50
|
-
<!-- Flavors -->
|
|
51
|
-
<div class="card p-4 space-y-4">
|
|
52
|
-
<p>Flavors are whitelisted to: <em>{flavorsWhitelist.join(', ')}</em>.</p>
|
|
53
|
-
<InputChip label="Flavors" placeholder="Add flavor..." bind:value={flavors} allowDuplicates={true} whitelist={flavorsWhitelist} />
|
|
54
|
-
<code class="inline-block">{flavors.length ? flavors : 'No flavors set.'}</code>
|
|
55
|
-
</div>
|
|
56
|
-
<!-- Emails -->
|
|
57
|
-
<div class="card p-4 space-y-4">
|
|
58
|
-
<p>Emails are validated to contain <code>@</code> and <code>.</code> symbols.</p>
|
|
59
|
-
<InputChip label="Emails" placeholder="Enter emails..." bind:value={emails} validation={isValidEmail} />
|
|
60
|
-
<code class="inline-block">{emails.length ? emails : 'No emails set.'}</code>
|
|
61
|
-
</div>
|
|
62
|
-
</section>
|
|
63
|
-
</svelte:fragment>
|
|
64
|
-
|
|
65
|
-
<!-- Slot: Usage -->
|
|
66
|
-
<svelte:fragment slot="usage">
|
|
67
|
-
<section class="space-y-4">
|
|
68
|
-
<p>
|
|
69
|
-
Create an array of values, then bind these to your the <code>InputChip</code> component. As values are added or removed the array will
|
|
70
|
-
update.
|
|
71
|
-
</p>
|
|
72
|
-
<CodeBlock language="ts" code={`let flavors = ['vanilla', 'chocolate', 'strawberry'];`} />
|
|
73
|
-
<CodeBlock language="html" code={`<InputChip label="Flavors" placeholder="Add flavor..." bind:value={flavors} />`} />
|
|
74
|
-
</section>
|
|
75
|
-
<section class="space-y-4">
|
|
76
|
-
<h2>Whitelist Values</h2>
|
|
77
|
-
<p>
|
|
78
|
-
You can provide an array of strings to use as a whitelist. Only whitelisted items can be entered. Invalid or duplicate values will
|
|
79
|
-
show an error state.
|
|
80
|
-
</p>
|
|
81
|
-
<CodeBlock language="ts" code={`let flavorsWhitelist = ['vanilla', 'chocolate', 'strawberry'];`} />
|
|
82
|
-
<CodeBlock language="html" code={`<InputChip ... whitelist={flavorsWhitelist} />`} />
|
|
83
|
-
</section>
|
|
84
|
-
<section class="space-y-4">
|
|
85
|
-
<h2>Custom Validation</h2>
|
|
86
|
-
<p>You can optionally provide a function to provide custom validation. Make sure to accept a string value and return a boolean.</p>
|
|
87
|
-
<CodeBlock
|
|
88
|
-
language="ts"
|
|
89
|
-
code={`
|
|
90
|
-
function isValidEmail(value: string): boolean {
|
|
91
|
-
return value.includes('@') && value.includes('.');
|
|
92
|
-
}
|
|
93
|
-
`}
|
|
94
|
-
/>
|
|
95
|
-
<CodeBlock language="html" code={`<InputChip ... validation={isValidEmail} />`} />
|
|
96
|
-
</section>
|
|
97
|
-
<section class="space-y-4">
|
|
98
|
-
<h2>Additional Settings</h2>
|
|
99
|
-
<p>
|
|
100
|
-
By default, only a single instance of each value is allowed. If you wish to allow duplicates, set <code>allowDuplicates={true}</code
|
|
101
|
-
>.
|
|
102
|
-
</p>
|
|
103
|
-
<CodeBlock language="html" code={`<InputChip ... allowDuplicates={true} />`} />
|
|
104
|
-
<p>
|
|
105
|
-
By default, all values are trimmed and formatted lowercase. If you wish to allow uppercase, set <code>allowUpperCase={true}</code>.
|
|
106
|
-
</p>
|
|
107
|
-
<CodeBlock language="html" code={`<InputChip ... allowUpperCase={true} />`} />
|
|
108
|
-
</section>
|
|
109
|
-
<section class="space-y-4">
|
|
110
|
-
<h2>Required Attribute</h2>
|
|
111
|
-
<p>
|
|
112
|
-
Note the <code>required</code> attribute has no bearing on the validation state of this input. Instead, we recommend disabling form
|
|
113
|
-
submission if your validation conditions are not for our your source value array - such as too few or too many values. Make sure to
|
|
114
|
-
inform users of the error state using a message or <a href="/components/alerts">Alert</a>.
|
|
115
|
-
</p>
|
|
116
|
-
<CodeBlock language="html" code={`<button type="submit" disabled={!flavors.length}>Submit</button>`} />
|
|
117
|
-
<CodeBlock language="html" code={`<button type="submit" disabled={flavors.length > 3}>Submit</button>`} />
|
|
118
|
-
</section>
|
|
119
|
-
<hr />
|
|
120
|
-
<section class="!flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0 md:space-x-4">
|
|
121
|
-
<div class="space-y-2">
|
|
122
|
-
<h2>Chip Elements</h2>
|
|
123
|
-
<p>Interactive elements for actions, selection, or filtering.</p>
|
|
124
|
-
</div>
|
|
125
|
-
<a class="btn btn-ghost-surface" href="/elements/chips">Chip Elements →</a>
|
|
126
|
-
</section>
|
|
127
|
-
</svelte:fragment>
|
|
128
|
-
</DocsShell>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { writable, type Writable } from 'svelte/store';
|
|
3
|
-
|
|
4
|
-
import DocsShell from '$docs/DocsShell/DocsShell.svelte';
|
|
5
|
-
import { DocsFeature, type DocsShellSettings } from '$docs/DocsShell/types';
|
|
6
|
-
|
|
7
|
-
import CodeBlock from '$lib/utilities/CodeBlock/CodeBlock.svelte';
|
|
8
|
-
import ListBox from '$lib/components/ListBox/ListBox.svelte';
|
|
9
|
-
import ListBoxItem from '$lib/components/ListBox/ListBoxItem.svelte';
|
|
10
|
-
|
|
11
|
-
// @ts-expect-error sveld import
|
|
12
|
-
import sveldListBox from '$lib/components/ListBox/ListBox.svelte?raw&sveld';
|
|
13
|
-
// @ts-expect-error sveld import
|
|
14
|
-
import sveldListBoxItem from '$lib/components/ListBox/ListBoxItem.svelte?raw&sveld';
|
|
15
|
-
|
|
16
|
-
// Stores
|
|
17
|
-
let navSingle: Writable<number> = writable(1);
|
|
18
|
-
let navMultiple: Writable<string[]> = writable(['A', 'B']);
|
|
19
|
-
|
|
20
|
-
// Docs Shell
|
|
21
|
-
const settings: DocsShellSettings = {
|
|
22
|
-
feature: DocsFeature.Component,
|
|
23
|
-
name: 'Listboxes',
|
|
24
|
-
description: 'Interactive listboxes that maintain selection state.',
|
|
25
|
-
imports: ['ListBox', 'ListBoxItem'],
|
|
26
|
-
source: 'components/ListBox',
|
|
27
|
-
aria: 'https://www.w3.org/WAI/ARIA/apg/patterns/listbox/',
|
|
28
|
-
components: [
|
|
29
|
-
{ label: 'ListBox', sveld: sveldListBox },
|
|
30
|
-
{ label: 'ListBoxItem', sveld: sveldListBoxItem, overrideProps: ['accent', 'padding', 'rounded', 'hover'] }
|
|
31
|
-
]
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<DocsShell {settings}>
|
|
36
|
-
<!-- Slot: Sandbox -->
|
|
37
|
-
<svelte:fragment slot="sandbox">
|
|
38
|
-
<section class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
39
|
-
<!-- Single -->
|
|
40
|
-
<div class="card p-4 space-y-4">
|
|
41
|
-
<ListBox selected={navSingle} label="Single Selection">
|
|
42
|
-
<ListBoxItem value={1}>Item 1</ListBoxItem>
|
|
43
|
-
<ListBoxItem value={2}>Item 2</ListBoxItem>
|
|
44
|
-
<ListBoxItem value={3}>Item 3</ListBoxItem>
|
|
45
|
-
</ListBox>
|
|
46
|
-
<p class="text-center">Selected: <code>{$navSingle}</code></p>
|
|
47
|
-
</div>
|
|
48
|
-
<!-- Multiple -->
|
|
49
|
-
<div class="card p-4 space-y-4">
|
|
50
|
-
<ListBox selected={navMultiple} label="Multi-Selection" hover="bg-secondary-hover-token" accent="!bg-secondary-active-token">
|
|
51
|
-
<ListBoxItem value={'A'}>Item A</ListBoxItem>
|
|
52
|
-
<ListBoxItem value={'B'}>Item B</ListBoxItem>
|
|
53
|
-
<ListBoxItem value={'C'}>Item C</ListBoxItem>
|
|
54
|
-
</ListBox>
|
|
55
|
-
<p class="text-center">Selected: <code>{$navMultiple}</code></p>
|
|
56
|
-
</div>
|
|
57
|
-
</section>
|
|
58
|
-
</svelte:fragment>
|
|
59
|
-
|
|
60
|
-
<!-- Slot: Usage -->
|
|
61
|
-
<svelte:fragment slot="usage">
|
|
62
|
-
<section class="space-y-4">
|
|
63
|
-
<h2>Single Value</h2>
|
|
64
|
-
<p>Define a writable store with a <u>singular</u> value of any type, then add a <code>value</code> prop to each child.</p>
|
|
65
|
-
<CodeBlock language="typescript" code={`import { writable, type Writable } from 'svelte/store';`} />
|
|
66
|
-
<CodeBlock language="typescript" code={`const storeSingle: Writable<number> = writable(1);`} />
|
|
67
|
-
<CodeBlock
|
|
68
|
-
language="html"
|
|
69
|
-
code={`
|
|
70
|
-
<ListBox selected="{storeSingle}" label="Single Selection">
|
|
71
|
-
<ListBoxItem value={1}>Selection Example 1</ListBoxItem>
|
|
72
|
-
<ListBoxItem value={2}>Selection Example 2</ListBoxItem>
|
|
73
|
-
</ListBox>`}
|
|
74
|
-
/>
|
|
75
|
-
</section>
|
|
76
|
-
<section class="space-y-4">
|
|
77
|
-
<h2>Multiple Values</h2>
|
|
78
|
-
<p>Create a writable with an <u>array</u> of values.</p>
|
|
79
|
-
<CodeBlock language="typescript" code={`import { writable, type Writable } from 'svelte/store';`} />
|
|
80
|
-
<CodeBlock language="typescript" code={`let storeMultiple: Writable<any[]> = writable(['A', 'B']);`} />
|
|
81
|
-
<CodeBlock
|
|
82
|
-
language="html"
|
|
83
|
-
code={`
|
|
84
|
-
<ListBox selected={storeMultiple} label="Multi-Selection">
|
|
85
|
-
<ListBoxItem value={'A'}>Item A</ListBoxItem>
|
|
86
|
-
<ListBoxItem value={'B'}>Item B</ListBoxItem>
|
|
87
|
-
<ListBoxItem value={'C'}>Item C</ListBoxItem>
|
|
88
|
-
</ListBox>`}
|
|
89
|
-
/>
|
|
90
|
-
</section>
|
|
91
|
-
</svelte:fragment>
|
|
92
|
-
</DocsShell>
|