@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Action: Clipboard
|
|
2
|
+
export function clipboard(node, args) {
|
|
3
|
+
const onClick = () => {
|
|
4
|
+
// Handle `data-clipboard` target based on object key
|
|
5
|
+
if (typeof args === 'object') {
|
|
6
|
+
// Element Inner HTML
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(args, 'element')) {
|
|
8
|
+
const element = document.querySelector(`[data-clipboard="${args.element}"]`);
|
|
9
|
+
copyToClipboard(element?.innerHTML);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
// Form Input Value
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(args, 'input')) {
|
|
14
|
+
const input = document.querySelector(`[data-clipboard="${args.input}"]`);
|
|
15
|
+
copyToClipboard(input?.value);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Handle everything else.
|
|
20
|
+
copyToClipboard(args);
|
|
21
|
+
};
|
|
22
|
+
// Event Listner
|
|
23
|
+
node.addEventListener('click', onClick);
|
|
24
|
+
// Lifecycle
|
|
25
|
+
return {
|
|
26
|
+
update(newArgs) {
|
|
27
|
+
args = newArgs;
|
|
28
|
+
},
|
|
29
|
+
destroy() {
|
|
30
|
+
node.removeEventListener('click', onClick);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
// Shared copy method
|
|
35
|
+
function copyToClipboard(data) {
|
|
36
|
+
navigator.clipboard.writeText(String(data));
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Action: Filter
|
|
2
|
+
export function filter(node, filterName) {
|
|
3
|
+
if (filterName === undefined)
|
|
4
|
+
return;
|
|
5
|
+
const applyFilter = () => {
|
|
6
|
+
// Prevent this action on Firebox browsers
|
|
7
|
+
const isFirefox = navigator.userAgent.indexOf('Firefox') > -1;
|
|
8
|
+
if (isFirefox) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
// If the filter name availalbe, apply the Filter
|
|
12
|
+
node.setAttribute('style', `filter: url("#${filterName}")`);
|
|
13
|
+
};
|
|
14
|
+
// On Init
|
|
15
|
+
applyFilter();
|
|
16
|
+
// Lifecycle
|
|
17
|
+
return {
|
|
18
|
+
update(newArgs) {
|
|
19
|
+
filterName = newArgs;
|
|
20
|
+
applyFilter();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} ApolloProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} ApolloEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} ApolloSlots */
|
|
4
|
+
export default class Apollo extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type ApolloProps = typeof __propDef.props;
|
|
11
|
+
export type ApolloEvents = typeof __propDef.events;
|
|
12
|
+
export type ApolloSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} BlueNightProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} BlueNightEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} BlueNightSlots */
|
|
4
|
+
export default class BlueNight extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type BlueNightProps = typeof __propDef.props;
|
|
11
|
+
export type BlueNightEvents = typeof __propDef.events;
|
|
12
|
+
export type BlueNightSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} EmeraldProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} EmeraldEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} EmeraldSlots */
|
|
4
|
+
export default class Emerald extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type EmeraldProps = typeof __propDef.props;
|
|
11
|
+
export type EmeraldEvents = typeof __propDef.events;
|
|
12
|
+
export type EmeraldSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} GreenFallProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} GreenFallEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} GreenFallSlots */
|
|
4
|
+
export default class GreenFall extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type GreenFallProps = typeof __propDef.props;
|
|
11
|
+
export type GreenFallEvents = typeof __propDef.events;
|
|
12
|
+
export type GreenFallSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} NoirProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} NoirEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} NoirSlots */
|
|
4
|
+
export default class Noir extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type NoirProps = typeof __propDef.props;
|
|
11
|
+
export type NoirEvents = typeof __propDef.events;
|
|
12
|
+
export type NoirSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} NoirLightProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} NoirLightEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} NoirLightSlots */
|
|
4
|
+
export default class NoirLight extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type NoirLightProps = typeof __propDef.props;
|
|
11
|
+
export type NoirLightEvents = typeof __propDef.events;
|
|
12
|
+
export type NoirLightSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} RusticProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} RusticEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} RusticSlots */
|
|
4
|
+
export default class Rustic extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type RusticProps = typeof __propDef.props;
|
|
11
|
+
export type RusticEvents = typeof __propDef.events;
|
|
12
|
+
export type RusticSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} Summer84Props */
|
|
2
|
+
/** @typedef {typeof __propDef.events} Summer84Events */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} Summer84Slots */
|
|
4
|
+
export default class Summer84 extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type Summer84Props = typeof __propDef.props;
|
|
11
|
+
export type Summer84Events = typeof __propDef.events;
|
|
12
|
+
export type Summer84Slots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} XProProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} XProEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} XProSlots */
|
|
4
|
+
export default class XPro extends SvelteComponentTyped<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type XProProps = typeof __propDef.props;
|
|
11
|
+
export type XProEvents = typeof __propDef.events;
|
|
12
|
+
export type XProSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Action: Focus Trap
|
|
2
|
+
export function focusTrap(node, enabled) {
|
|
3
|
+
const elemWhitelist = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
|
|
4
|
+
let elemFirst;
|
|
5
|
+
let elemLast;
|
|
6
|
+
// When the first element is selected, shift+tab pressed, jump to the last selectable item.
|
|
7
|
+
function onFirstElemKeydown(e) {
|
|
8
|
+
if (e.shiftKey && e.code === 'Tab') {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
elemLast.focus();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
// When the last item selected, tab pressed, jump to the first selectable item.
|
|
14
|
+
function onLastElemKeydown(e) {
|
|
15
|
+
if (!e.shiftKey && e.code === 'Tab') {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
elemFirst.focus();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const onInit = () => {
|
|
21
|
+
if (enabled === false)
|
|
22
|
+
return;
|
|
23
|
+
// Gather all focusable elements
|
|
24
|
+
const focusableElems = Array.from(node.querySelectorAll(elemWhitelist));
|
|
25
|
+
if (focusableElems.length) {
|
|
26
|
+
// Set first/last focusable elements
|
|
27
|
+
elemFirst = focusableElems[0];
|
|
28
|
+
elemLast = focusableElems[focusableElems.length - 1];
|
|
29
|
+
// Auto-focus first focusable element
|
|
30
|
+
elemFirst.focus();
|
|
31
|
+
// Listen for keydown on first & last element
|
|
32
|
+
elemFirst.addEventListener('keydown', onFirstElemKeydown);
|
|
33
|
+
elemLast.addEventListener('keydown', onLastElemKeydown);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
onInit();
|
|
37
|
+
function onDestory() {
|
|
38
|
+
if (elemFirst)
|
|
39
|
+
elemFirst.removeEventListener('keydown', onFirstElemKeydown);
|
|
40
|
+
if (elemLast)
|
|
41
|
+
elemLast.removeEventListener('keydown', onLastElemKeydown);
|
|
42
|
+
}
|
|
43
|
+
// Lifecycle
|
|
44
|
+
return {
|
|
45
|
+
update(newArgs) {
|
|
46
|
+
enabled = newArgs;
|
|
47
|
+
newArgs ? onInit() : onDestory();
|
|
48
|
+
},
|
|
49
|
+
destroy() {
|
|
50
|
+
onDestory();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script>// Slots:
|
|
2
|
+
// NOTE: we cannot describe the default slot.
|
|
3
|
+
import { onMount, setContext } from 'svelte';
|
|
4
|
+
/** Enable auto-collapse mode. */
|
|
5
|
+
export let collapse = true;
|
|
6
|
+
/** Provide classes to set the hover background color. */
|
|
7
|
+
export let hover = 'bg-primary-hover-token';
|
|
8
|
+
/** Provide classes to set vertical spacing. */
|
|
9
|
+
export let spacing = 'space-y-4';
|
|
10
|
+
/** Provide classes to set padding for summary and content regions. */
|
|
11
|
+
export let padding = 'px-4 py-2';
|
|
12
|
+
/** Provide classes to set summary border radius. */
|
|
13
|
+
export let rounded = 'rounded-token';
|
|
14
|
+
// Context
|
|
15
|
+
setContext('hover', hover);
|
|
16
|
+
setContext('spacing', spacing);
|
|
17
|
+
setContext('padding', padding);
|
|
18
|
+
setContext('rounded', rounded);
|
|
19
|
+
// Classes
|
|
20
|
+
const cBase = 'rounded-container-token';
|
|
21
|
+
// Local
|
|
22
|
+
let elemAccordian;
|
|
23
|
+
// Lifecycle
|
|
24
|
+
onMount(() => {
|
|
25
|
+
if (collapse) {
|
|
26
|
+
// Ensure only one detail element is open at a time
|
|
27
|
+
// https://nikitahl.com/native-html-accordion
|
|
28
|
+
const details = Array.from(elemAccordian.querySelectorAll('details'));
|
|
29
|
+
details.forEach((detail) => {
|
|
30
|
+
detail.addEventListener('click', (e) => {
|
|
31
|
+
const active = details.find((d) => d.open);
|
|
32
|
+
if (!e.currentTarget.open && active)
|
|
33
|
+
active.open = false;
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
// Reactive
|
|
39
|
+
$: classesBase = `${cBase} ${spacing} ${$$props.class ?? ''}`;
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<!-- @component The Accordion parent element. -->
|
|
43
|
+
|
|
44
|
+
<div bind:this={elemAccordian} class="accordion-group {classesBase}" data-testid="accordion-group">
|
|
45
|
+
<slot />
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
collapse?: boolean | undefined;
|
|
6
|
+
hover?: string | undefined;
|
|
7
|
+
spacing?: string | undefined;
|
|
8
|
+
padding?: string | undefined;
|
|
9
|
+
rounded?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {
|
|
15
|
+
default: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type AccordionGroupProps = typeof __propDef.props;
|
|
19
|
+
export type AccordionGroupEvents = typeof __propDef.events;
|
|
20
|
+
export type AccordionGroupSlots = typeof __propDef.slots;
|
|
21
|
+
/** The Accordion parent element. */
|
|
22
|
+
export default class AccordionGroup extends SvelteComponentTyped<AccordionGroupProps, AccordionGroupEvents, AccordionGroupSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script>// Slots:
|
|
2
|
+
/**
|
|
3
|
+
* @slot {{}} content - Allows for an optional leading element, such as an icon.
|
|
4
|
+
* @slot {{}} lead - Provide the summary details of each item.
|
|
5
|
+
* @slot {{}} summary - Provide the content details of each item.
|
|
6
|
+
*/
|
|
7
|
+
// Events:
|
|
8
|
+
// FORWARDED: do not document these, breaks the type definition
|
|
9
|
+
// DISPATCHED: document directly above the definition, like props (ex: paginator)
|
|
10
|
+
import { getContext } from 'svelte';
|
|
11
|
+
// Props
|
|
12
|
+
/** Defines the default open state on page load .*/
|
|
13
|
+
export let open = false;
|
|
14
|
+
/** Provide semantic ID for ARIA summary element. */
|
|
15
|
+
export let summaryId = '';
|
|
16
|
+
/** Provide semantic ID for ARIA content element. */
|
|
17
|
+
export let contentId = '';
|
|
18
|
+
/** Provide arbitrary styles for the summary element region. */
|
|
19
|
+
export let regionSummary = '';
|
|
20
|
+
/** Provide arbitrary styles for the summary element region. */
|
|
21
|
+
export let regionContent = '';
|
|
22
|
+
// Context
|
|
23
|
+
/** Provide classes to set the hover background color. */
|
|
24
|
+
export let hover = getContext('hover');
|
|
25
|
+
/** Provide classes to set vertical spacing. */
|
|
26
|
+
export let spacing = getContext('spacing');
|
|
27
|
+
/** Provide classes to set padding for summary and content regions. */
|
|
28
|
+
export let padding = getContext('padding');
|
|
29
|
+
/** Provide classes to set summary border radius. */
|
|
30
|
+
export let rounded = getContext('rounded');
|
|
31
|
+
// Base Classes
|
|
32
|
+
const cBaseDetails = '';
|
|
33
|
+
const cBaseSummary = 'list-none flex items-center space-x-4 cursor-pointer';
|
|
34
|
+
const cBaseIcon = 'flex justify-center items-center w-3 fill-black dark:fill-white transition-all duration-[100ms]';
|
|
35
|
+
// Reactive Classes
|
|
36
|
+
$: classesDetails = `${cBaseDetails} ${spacing} ${$$props.class ?? ''}`;
|
|
37
|
+
$: classesSummary = `${cBaseSummary} ${padding} ${rounded} ${hover} ${regionSummary}`;
|
|
38
|
+
$: classesIconState = open ? '-rotate-180' : '';
|
|
39
|
+
$: classesIcon = `${cBaseIcon} ${classesIconState}`;
|
|
40
|
+
$: classesContent = `${padding} ${regionContent}`;
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<!-- @component The Accordion child element. -->
|
|
44
|
+
|
|
45
|
+
<details bind:open class="accordion-item {classesDetails}" data-testid="accordion-item" on:click on:keydown on:keyup on:keypress on:toggle>
|
|
46
|
+
<!-- Summary -->
|
|
47
|
+
<summary id={summaryId} class="accordion-summary {classesSummary}" aria-expanded={open} aria-controls={contentId}>
|
|
48
|
+
<!-- Slot: Lead -->
|
|
49
|
+
{#if $$slots.lead}<div class="accordion-summary-lead"><slot name="lead" /></div>{/if}
|
|
50
|
+
<!-- Slot: Text -->
|
|
51
|
+
<div class="accordion-summary-text flex-auto" role="button"><slot name="summary">(summary)</slot></div>
|
|
52
|
+
<!-- Caret -->
|
|
53
|
+
<div class="accordion-summary-caret {classesIcon}">
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="opacity-50">
|
|
55
|
+
<path
|
|
56
|
+
d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"
|
|
57
|
+
/>
|
|
58
|
+
</svg>
|
|
59
|
+
</div>
|
|
60
|
+
</summary>
|
|
61
|
+
|
|
62
|
+
<!-- Content -->
|
|
63
|
+
<div id={contentId} class="accordion-content {classesContent}" role="region" aria-labelledby={summaryId}>
|
|
64
|
+
<slot name="content">(content)</slot>
|
|
65
|
+
</div>
|
|
66
|
+
</details>
|
|
67
|
+
|
|
68
|
+
<style>
|
|
69
|
+
/* Hide the left-hande arrows for details/summary */
|
|
70
|
+
/* Note: let's keep this localized in case users want the arrows elsewhere */
|
|
71
|
+
details summary::-webkit-details-marker {
|
|
72
|
+
display: none;
|
|
73
|
+
}</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
open?: boolean | undefined;
|
|
6
|
+
summaryId?: string | undefined;
|
|
7
|
+
contentId?: string | undefined;
|
|
8
|
+
regionSummary?: string | undefined;
|
|
9
|
+
regionContent?: string | undefined;
|
|
10
|
+
hover?: string | undefined;
|
|
11
|
+
spacing?: string | undefined;
|
|
12
|
+
padding?: string | undefined;
|
|
13
|
+
rounded?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
events: {
|
|
16
|
+
click: MouseEvent;
|
|
17
|
+
keydown: KeyboardEvent;
|
|
18
|
+
keyup: KeyboardEvent;
|
|
19
|
+
keypress: KeyboardEvent;
|
|
20
|
+
toggle: Event;
|
|
21
|
+
} & {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
};
|
|
24
|
+
slots: {
|
|
25
|
+
lead: {};
|
|
26
|
+
summary: {};
|
|
27
|
+
content: {};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type AccordionItemProps = typeof __propDef.props;
|
|
31
|
+
export type AccordionItemEvents = typeof __propDef.events;
|
|
32
|
+
export type AccordionItemSlots = typeof __propDef.slots;
|
|
33
|
+
/** The Accordion child element. */
|
|
34
|
+
export default class AccordionItem extends SvelteComponentTyped<AccordionItemProps, AccordionItemEvents, AccordionItemSlots> {
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script>//Slots
|
|
2
|
+
/**
|
|
3
|
+
* @slot lead - Provide a leading element, such as an icon.
|
|
4
|
+
* @slot content - Provide the alert message text.
|
|
5
|
+
* @slot trail - Provide a trailing element, such as a call to action.
|
|
6
|
+
* @slot title - Provide the alert title text.
|
|
7
|
+
*/
|
|
8
|
+
import { fade } from 'svelte/transition';
|
|
9
|
+
// Props
|
|
10
|
+
/** Control visibility of the alert. */
|
|
11
|
+
export let visible = true;
|
|
12
|
+
/** Provide classes to set background color. */
|
|
13
|
+
export let background = 'bg-warning-500/20';
|
|
14
|
+
/** Provide classes to set the border styles. */
|
|
15
|
+
export let border = 'border border-warning-500';
|
|
16
|
+
/** Provide classes to set text color. */
|
|
17
|
+
export let color = '';
|
|
18
|
+
/** Provide classes to set border radius. */
|
|
19
|
+
export let rounded = 'rounded-container-token';
|
|
20
|
+
/** Svelte fade transition duration. Set 0 to disable. */
|
|
21
|
+
export let duration = 200; // ms
|
|
22
|
+
// Props (regions)
|
|
23
|
+
/** Classes to be applied to the lead slot region. */
|
|
24
|
+
export let slotLead = '';
|
|
25
|
+
/** Classes to be applied to the content slot region. */
|
|
26
|
+
export let slotContent = '';
|
|
27
|
+
/** Classes to be applied to the trail slot region. */
|
|
28
|
+
export let slotTrail = '';
|
|
29
|
+
// Base Classes
|
|
30
|
+
let cBaseCard = 'flex flex-col items-start lg:items-center lg:flex-row p-5 space-y-4 lg:space-y-0 lg:space-x-4';
|
|
31
|
+
let cLead = 'flex justify-center items-center';
|
|
32
|
+
let cContent = 'flex flex-col w-full justify-center space-y-2';
|
|
33
|
+
let cTrail = 'flex items-center space-x-4';
|
|
34
|
+
// Reactive Classes
|
|
35
|
+
$: classesCard = `${cBaseCard} ${background} ${border} ${color} ${rounded} ${$$props.class ?? ''}`;
|
|
36
|
+
$: classesLead = `${cLead} ${slotLead}`;
|
|
37
|
+
$: classesContent = `${cContent} ${slotContent}`;
|
|
38
|
+
$: classesTrail = `${cTrail} ${slotTrail}`;
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
{#if visible}
|
|
42
|
+
<div class="alert {classesCard}" transition:fade|local={{ duration }} data-testid="alert" role="alert" aria-live="polite">
|
|
43
|
+
<!-- Slot: Lead -->
|
|
44
|
+
{#if $$slots.lead}
|
|
45
|
+
<section class="alert-lead {classesLead}">
|
|
46
|
+
<slot name="lead" />
|
|
47
|
+
</section>
|
|
48
|
+
{/if}
|
|
49
|
+
|
|
50
|
+
<!-- Content -->
|
|
51
|
+
<section class="alert-content {classesContent}">
|
|
52
|
+
<!-- Slot: Title -->
|
|
53
|
+
{#if $$slots.title}<h3 class="alert-title"><slot name="title" /></h3>{/if}
|
|
54
|
+
<!-- Slot: Default -->
|
|
55
|
+
{#if $$slots.default}<div class="alert-message {color}"><slot /></div>{/if}
|
|
56
|
+
</section>
|
|
57
|
+
|
|
58
|
+
<!-- Slot: Trail -->
|
|
59
|
+
{#if $$slots.trail}
|
|
60
|
+
<section class="alert-trail {classesTrail}">
|
|
61
|
+
<slot name="trail" />
|
|
62
|
+
</section>
|
|
63
|
+
{/if}
|
|
64
|
+
</div>
|
|
65
|
+
{/if}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
visible?: boolean | undefined;
|
|
6
|
+
background?: string | undefined;
|
|
7
|
+
border?: string | undefined;
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
rounded?: string | undefined;
|
|
10
|
+
duration?: number | undefined;
|
|
11
|
+
slotLead?: string | undefined;
|
|
12
|
+
slotContent?: string | undefined;
|
|
13
|
+
slotTrail?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
events: {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
};
|
|
18
|
+
slots: {
|
|
19
|
+
lead: {};
|
|
20
|
+
title: {};
|
|
21
|
+
default: {};
|
|
22
|
+
trail: {};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type AlertProps = typeof __propDef.props;
|
|
26
|
+
export type AlertEvents = typeof __propDef.events;
|
|
27
|
+
export type AlertSlots = typeof __propDef.slots;
|
|
28
|
+
export default class Alert extends SvelteComponentTyped<AlertProps, AlertEvents, AlertSlots> {
|
|
29
|
+
}
|
|
30
|
+
export {};
|