From 5ef436d8c9db0a3e58c1e722d796e3f723c003ca Mon Sep 17 00:00:00 2001 From: gioboa Date: Wed, 18 Oct 2023 15:57:27 +0200 Subject: [PATCH] docs: fix --- .../components/content/AppSidebarBottom.vue | 20 +--- .../docs/components/content/AppSidebarTop.vue | 1 - apps/docs/utils/blocks.ts | 106 +++++------------ apps/docs/utils/components.ts | 108 +++++------------- apps/docs/utils/hooks.ts | 42 ++----- 5 files changed, 70 insertions(+), 207 deletions(-) diff --git a/apps/docs/components/content/AppSidebarBottom.vue b/apps/docs/components/content/AppSidebarBottom.vue index 4756ca8..9c0cdb3 100644 --- a/apps/docs/components/content/AppSidebarBottom.vue +++ b/apps/docs/components/content/AppSidebarBottom.vue @@ -3,18 +3,11 @@ import { NavItem } from '@nuxt/content/dist/runtime/types'; import { blocks } from '~/utils/blocks'; import { components } from '~/utils/components'; -type Framework = { - name: 'vue' | 'react' | 'qwik'; - icon: string; -}; -const framework = useCookie('framework'); - const links = computed(() => { return [ { title: 'Components', _path: '/components', - children: [ { title: 'All Components', @@ -22,20 +15,19 @@ const links = computed(() => { _id: 'all-components', sidebarNesting: 'inline', }, - ...(components.qwik?.map((component: string) => ({ + ...components.map((component: string) => ({ title: component.replace('Sf', ''), _path: `/qwik/components/${component .replace('Sf', '') .toLowerCase()}`, _id: component, sidebarNesting: 'inline', - })) ?? []), + })), ], }, { title: 'Blocks', _path: '/blocks', - children: [ { title: 'All Blocks', @@ -43,12 +35,12 @@ const links = computed(() => { _id: 'all-blocks', sidebarNesting: 'inline', }, - ...(blocks.qwik?.map((block: string) => ({ + ...blocks.map((block: string) => ({ title: block.replace('Sf', ''), _path: `/qwik/blocks/${block.toLowerCase()}`, _id: block, sidebarNesting: 'inline', - })) ?? []), + })), ], }, // { @@ -61,12 +53,12 @@ const links = computed(() => { // _id: 'all-hooks', // sidebarNesting: 'inline', // }, - // ...(hooks.qwik.map((hook: string) => ({ + // ...hooks.map((hook: string) => ({ // title: hook, // _path: `/qwik/hooks/${hook.toLowerCase()}`, // _id: hook, // sidebarNesting: 'inline', - // })) ?? []), + // })), // ], // }, ]; diff --git a/apps/docs/components/content/AppSidebarTop.vue b/apps/docs/components/content/AppSidebarTop.vue index 987c072..5112b04 100644 --- a/apps/docs/components/content/AppSidebarTop.vue +++ b/apps/docs/components/content/AppSidebarTop.vue @@ -29,7 +29,6 @@ const selectedFramework = useCookie('framework', { }); const route = useRoute(); -const router = useRouter(); watch( () => route, diff --git a/apps/docs/utils/blocks.ts b/apps/docs/utils/blocks.ts index e01ad10..b0acd51 100644 --- a/apps/docs/utils/blocks.ts +++ b/apps/docs/utils/blocks.ts @@ -1,80 +1,26 @@ -export const blocks = { - vue: [ - 'Alert', - 'Banners', - 'Breadcrumbs', - 'Card', - 'Checkout', - 'Combobox', - 'Filters', - 'Footer', - 'FormFields', - 'Gallery', - 'MegaMenu', - 'NavbarBottom', - 'NavbarTop', - 'NewsletterBox', - 'OrderSummary', - 'Pagination', - 'ProductCard', - 'ProductSlider', - 'QuantitySelector', - 'RatingForms', - 'Review', - 'Search', - 'SelectDropdown', - 'Tabs', - ], - react: [ - 'Alert', - 'Banners', - 'Breadcrumbs', - 'Card', - 'Checkout', - 'Combobox', - 'Filters', - 'Footer', - 'FormFields', - 'Gallery', - 'MegaMenu', - 'NavbarBottom', - 'NavbarTop', - 'NewsletterBox', - 'OrderSummary', - 'Pagination', - 'ProductCard', - 'ProductSlider', - 'QuantitySelector', - 'RatingForms', - 'Review', - 'Search', - 'SelectDropdown', - 'Tabs', - ], - qwik: [ - 'Alert', - 'Banners', - 'Breadcrumbs', - 'Card', - 'Checkout', - 'Combobox', - 'Filters', - 'Footer', - 'FormFields', - 'Gallery', - 'MegaMenu', - 'NavbarBottom', - 'NavbarTop', - 'NewsletterBox', - 'OrderSummary', - 'Pagination', - 'ProductCard', - 'ProductSlider', - 'QuantitySelector', - 'RatingForms', - 'Review', - 'Search', - 'SelectDropdown', - 'Tabs', - ], -}; +export const blocks = [ + 'Alert', + 'Banners', + 'Breadcrumbs', + 'Card', + // 'Checkout', + // 'Combobox', + // 'Filters', + 'Footer', + // 'FormFields', + // 'Gallery', + // 'MegaMenu', + 'NavbarBottom', + 'NavbarTop', + 'NewsletterBox', + 'OrderSummary', + // 'Pagination', + // 'ProductCard', + // 'ProductSlider', + // 'QuantitySelector', + // 'RatingForms', + // 'Review', + // 'Search', + // 'SelectDropdown', + // 'Tabs', +]; diff --git a/apps/docs/utils/components.ts b/apps/docs/utils/components.ts index 4389e3a..dc75ce5 100644 --- a/apps/docs/utils/components.ts +++ b/apps/docs/utils/components.ts @@ -1,80 +1,28 @@ -export const components = { - vue: [ - 'SfAccordionItem', - 'SfBadge', - 'SfButton', - 'SfCheckbox', - 'SfChip', - 'SfCounter', - 'SfDrawer', - 'SfDropdown', - 'SfIconBase', - 'SfInput', - 'SfLink', - 'SfListItem', - 'SfLoaderCircular', - 'SfLoaderLinear', - 'SfModal', - 'SfProgressCircular', - 'SfProgressLinear', - 'SfRadio', - 'SfRating', - 'SfRatingButton', - 'SfScrollable', - 'SfSelect', - 'SfSwitch', - 'SfTextarea', - 'SfThumbnail', - 'SfTooltip', - ], - react: [ - 'SfAccordionItem', - 'SfBadge', - 'SfButton', - 'SfCheckbox', - 'SfChip', - 'SfCounter', - 'SfDrawer', - 'SfDropdown', - 'SfIconBase', - 'SfInput', - 'SfLink', - 'SfListItem', - 'SfLoaderCircular', - 'SfLoaderLinear', - 'SfModal', - 'SfProgressCircular', - 'SfProgressLinear', - 'SfRadio', - 'SfRating', - 'SfRatingButton', - 'SfScrollable', - 'SfSelect', - 'SfSwitch', - 'SfTextarea', - 'SfThumbnail', - 'SfTooltip', - ], - qwik: [ - 'SfAccordionItem', - 'SfBadge', - 'SfButton', - 'SfCheckbox', - 'SfChip', - 'SfCounter', - 'SfDrawer', - 'SfDropdown', - 'SfIconBase', - 'SfInput', - 'SfLink', - 'SfListItem', - 'SfLoaderCircular', - 'SfLoaderLinear', - 'SfModal', - 'SfProgressCircular', - 'SfProgressLinear', - 'SfRadio', - 'SfRating', - 'SfSwitch', - ], -}; +export const components = [ + 'SfAccordionItem', + 'SfBadge', + 'SfButton', + 'SfCheckbox', + 'SfChip', + 'SfCounter', + 'SfDrawer', + 'SfDropdown', + 'SfIconBase', + 'SfInput', + 'SfLink', + 'SfListItem', + 'SfLoaderCircular', + 'SfLoaderLinear', + 'SfModal', + 'SfProgressCircular', + 'SfProgressLinear', + 'SfRadio', + 'SfRating', + // 'SfRatingButton', + // 'SfScrollable', + // 'SfSelect', + 'SfSwitch', + // 'SfTextarea', + // 'SfThumbnail', + // 'SfTooltip', +]; diff --git a/apps/docs/utils/hooks.ts b/apps/docs/utils/hooks.ts index 85ea3e3..4479733 100644 --- a/apps/docs/utils/hooks.ts +++ b/apps/docs/utils/hooks.ts @@ -1,32 +1,10 @@ -export const hooks = { - vue: [ - 'useDisclosure', - 'useDropdown', - 'useFocusVisible', - 'usePagination', - 'usePopover', - 'useScrollable', - 'useTooltip', - 'useTrapFocus', - ], - react: [ - 'useDisclosure', - 'useDropdown', - 'useFocusVisible', - 'usePagination', - 'usePopover', - 'useScrollable', - 'useTooltip', - 'useTrapFocus', - ], - qwik: [ - 'useDisclosure', - 'useDropdown', - 'useFocusVisible', - 'usePagination', - 'usePopover', - 'useScrollable', - 'useTooltip', - 'useTrapFocus', - ], -}; +export const hooks = [ + // 'useDisclosure', + // 'useDropdown', + // 'useFocusVisible', + // 'usePagination', + // 'usePopover', + // 'useScrollable', + // 'useTooltip', + // 'useTrapFocus', +];