@jarrodmedrano/ui 0.1.0
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/README.md +108 -0
- package/dist/components/auth/providers.cjs +83 -0
- package/dist/components/auth/providers.cjs.map +1 -0
- package/dist/components/auth/providers.d.ts +19 -0
- package/dist/components/auth/providers.d.ts.map +1 -0
- package/dist/components/auth/providers.js +59 -0
- package/dist/components/auth/providers.js.map +1 -0
- package/dist/components/card/back-button.cjs +45 -0
- package/dist/components/card/back-button.cjs.map +1 -0
- package/dist/components/card/back-button.d.ts +7 -0
- package/dist/components/card/back-button.d.ts.map +1 -0
- package/dist/components/card/back-button.js +11 -0
- package/dist/components/card/back-button.js.map +1 -0
- package/dist/components/card/card-wrapper.cjs +56 -0
- package/dist/components/card/card-wrapper.cjs.map +1 -0
- package/dist/components/card/card-wrapper.d.ts +11 -0
- package/dist/components/card/card-wrapper.d.ts.map +1 -0
- package/dist/components/card/card-wrapper.js +36 -0
- package/dist/components/card/card-wrapper.js.map +1 -0
- package/dist/components/card/header.cjs +52 -0
- package/dist/components/card/header.cjs.map +1 -0
- package/dist/components/card/header.d.ts +8 -0
- package/dist/components/card/header.d.ts.map +1 -0
- package/dist/components/card/header.js +18 -0
- package/dist/components/card/header.js.map +1 -0
- package/dist/components/combobox/ComboList.cjs +78 -0
- package/dist/components/combobox/ComboList.cjs.map +1 -0
- package/dist/components/combobox/ComboList.d.ts +14 -0
- package/dist/components/combobox/ComboList.d.ts.map +1 -0
- package/dist/components/combobox/ComboList.js +61 -0
- package/dist/components/combobox/ComboList.js.map +1 -0
- package/dist/components/combobox/index.cjs +119 -0
- package/dist/components/combobox/index.cjs.map +1 -0
- package/dist/components/combobox/index.d.ts +6 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +101 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/dashboard/account-select.cjs +69 -0
- package/dist/components/dashboard/account-select.cjs.map +1 -0
- package/dist/components/dashboard/account-select.d.ts +12 -0
- package/dist/components/dashboard/account-select.d.ts.map +1 -0
- package/dist/components/dashboard/account-select.js +41 -0
- package/dist/components/dashboard/account-select.js.map +1 -0
- package/dist/components/dashboard/account-switcher.cjs +72 -0
- package/dist/components/dashboard/account-switcher.cjs.map +1 -0
- package/dist/components/dashboard/account-switcher.d.ts +12 -0
- package/dist/components/dashboard/account-switcher.d.ts.map +1 -0
- package/dist/components/dashboard/account-switcher.js +44 -0
- package/dist/components/dashboard/account-switcher.js.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.cjs +100 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts +3 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.js +81 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.js.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs +77 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts +9 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js +40 -0
- package/dist/components/dashboard/sidebar/CollapsibleSection.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.cjs +121 -0
- package/dist/components/dashboard/sidebar/EntityList.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.d.ts +3 -0
- package/dist/components/dashboard/sidebar/EntityList.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.js +87 -0
- package/dist/components/dashboard/sidebar/EntityList.js.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.cjs +95 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.d.ts +14 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.js +57 -0
- package/dist/components/dashboard/sidebar/EntityList.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.cjs +99 -0
- package/dist/components/dashboard/sidebar/SectionHeader.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.d.ts +3 -0
- package/dist/components/dashboard/sidebar/SectionHeader.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.js +81 -0
- package/dist/components/dashboard/sidebar/SectionHeader.js.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs +116 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts +18 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.js +77 -0
- package/dist/components/dashboard/sidebar/SectionHeader.styles.js.map +1 -0
- package/dist/components/dashboard/sidebar/index.cjs +41 -0
- package/dist/components/dashboard/sidebar/index.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/index.d.ts +6 -0
- package/dist/components/dashboard/sidebar/index.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/index.js +12 -0
- package/dist/components/dashboard/sidebar/index.js.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.cjs +50 -0
- package/dist/components/dashboard/sidebar/sidebar.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.d.ts +15 -0
- package/dist/components/dashboard/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/sidebar.js +26 -0
- package/dist/components/dashboard/sidebar/sidebar.js.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.cjs +52 -0
- package/dist/components/dashboard/sidebar/tabs.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.d.ts +3 -0
- package/dist/components/dashboard/sidebar/tabs.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/tabs.js +37 -0
- package/dist/components/dashboard/sidebar/tabs.js.map +1 -0
- package/dist/components/dashboard/sidebar/types.cjs +17 -0
- package/dist/components/dashboard/sidebar/types.cjs.map +1 -0
- package/dist/components/dashboard/sidebar/types.d.ts +36 -0
- package/dist/components/dashboard/sidebar/types.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar/types.js +1 -0
- package/dist/components/dashboard/sidebar/types.js.map +1 -0
- package/dist/components/dashboard/sidebar-nav.cjs +99 -0
- package/dist/components/dashboard/sidebar-nav.cjs.map +1 -0
- package/dist/components/dashboard/sidebar-nav.d.ts +24 -0
- package/dist/components/dashboard/sidebar-nav.d.ts.map +1 -0
- package/dist/components/dashboard/sidebar-nav.js +75 -0
- package/dist/components/dashboard/sidebar-nav.js.map +1 -0
- package/dist/components/dashboard/utils/build-nav.cjs +103 -0
- package/dist/components/dashboard/utils/build-nav.cjs.map +1 -0
- package/dist/components/dashboard/utils/build-nav.d.ts +7 -0
- package/dist/components/dashboard/utils/build-nav.d.ts.map +1 -0
- package/dist/components/dashboard/utils/build-nav.js +78 -0
- package/dist/components/dashboard/utils/build-nav.js.map +1 -0
- package/dist/components/dashboard/utils.cjs +2 -0
- package/dist/components/dashboard/utils.cjs.map +1 -0
- package/dist/components/dashboard/utils.d.ts +1 -0
- package/dist/components/dashboard/utils.d.ts.map +1 -0
- package/dist/components/dashboard/utils.js +1 -0
- package/dist/components/dashboard/utils.js.map +1 -0
- package/dist/components/dashboard/with-dashboard.cjs +189 -0
- package/dist/components/dashboard/with-dashboard.cjs.map +1 -0
- package/dist/components/dashboard/with-dashboard.d.ts +6 -0
- package/dist/components/dashboard/with-dashboard.d.ts.map +1 -0
- package/dist/components/dashboard/with-dashboard.js +175 -0
- package/dist/components/dashboard/with-dashboard.js.map +1 -0
- package/dist/components/detail/DetailLayout.styles.cjs +116 -0
- package/dist/components/detail/DetailLayout.styles.cjs.map +1 -0
- package/dist/components/detail/DetailLayout.styles.d.ts +18 -0
- package/dist/components/detail/DetailLayout.styles.d.ts.map +1 -0
- package/dist/components/detail/DetailLayout.styles.js +74 -0
- package/dist/components/detail/DetailLayout.styles.js.map +1 -0
- package/dist/components/detail/index.cjs +45 -0
- package/dist/components/detail/index.cjs.map +1 -0
- package/dist/components/detail/index.d.ts +2 -0
- package/dist/components/detail/index.d.ts.map +1 -0
- package/dist/components/detail/index.js +23 -0
- package/dist/components/detail/index.js.map +1 -0
- package/dist/components/flowbite/card-images.cjs +104 -0
- package/dist/components/flowbite/card-images.cjs.map +1 -0
- package/dist/components/flowbite/card-images.d.ts +3 -0
- package/dist/components/flowbite/card-images.d.ts.map +1 -0
- package/dist/components/flowbite/card-images.js +84 -0
- package/dist/components/flowbite/card-images.js.map +1 -0
- package/dist/components/flowbite/gallery.cjs +53 -0
- package/dist/components/flowbite/gallery.cjs.map +1 -0
- package/dist/components/flowbite/gallery.d.ts +3 -0
- package/dist/components/flowbite/gallery.d.ts.map +1 -0
- package/dist/components/flowbite/gallery.js +23 -0
- package/dist/components/flowbite/gallery.js.map +1 -0
- package/dist/components/flowbite/masonry.cjs +73 -0
- package/dist/components/flowbite/masonry.cjs.map +1 -0
- package/dist/components/flowbite/masonry.d.ts +13 -0
- package/dist/components/flowbite/masonry.d.ts.map +1 -0
- package/dist/components/flowbite/masonry.js +43 -0
- package/dist/components/flowbite/masonry.js.map +1 -0
- package/dist/components/flowbite/search-hero.cjs +109 -0
- package/dist/components/flowbite/search-hero.cjs.map +1 -0
- package/dist/components/flowbite/search-hero.d.ts +6 -0
- package/dist/components/flowbite/search-hero.d.ts.map +1 -0
- package/dist/components/flowbite/search-hero.js +89 -0
- package/dist/components/flowbite/search-hero.js.map +1 -0
- package/dist/components/generic/copyright.cjs +32 -0
- package/dist/components/generic/copyright.cjs.map +1 -0
- package/dist/components/generic/copyright.d.ts +4 -0
- package/dist/components/generic/copyright.d.ts.map +1 -0
- package/dist/components/generic/copyright.js +8 -0
- package/dist/components/generic/copyright.js.map +1 -0
- package/dist/components/generic/icons.cjs +186 -0
- package/dist/components/generic/icons.cjs.map +1 -0
- package/dist/components/generic/icons.d.ts +19 -0
- package/dist/components/generic/icons.d.ts.map +1 -0
- package/dist/components/generic/icons.js +164 -0
- package/dist/components/generic/icons.js.map +1 -0
- package/dist/components/header/header.cjs +130 -0
- package/dist/components/header/header.cjs.map +1 -0
- package/dist/components/header/header.d.ts +14 -0
- package/dist/components/header/header.d.ts.map +1 -0
- package/dist/components/header/header.js +106 -0
- package/dist/components/header/header.js.map +1 -0
- package/dist/components/header/internal/main-nav.cjs +65 -0
- package/dist/components/header/internal/main-nav.cjs.map +1 -0
- package/dist/components/header/internal/main-nav.d.ts +4 -0
- package/dist/components/header/internal/main-nav.d.ts.map +1 -0
- package/dist/components/header/internal/main-nav.js +31 -0
- package/dist/components/header/internal/main-nav.js.map +1 -0
- package/dist/components/header/internal/mobile-nav.cjs +209 -0
- package/dist/components/header/internal/mobile-nav.cjs.map +1 -0
- package/dist/components/header/internal/mobile-nav.d.ts +2 -0
- package/dist/components/header/internal/mobile-nav.d.ts.map +1 -0
- package/dist/components/header/internal/mobile-nav.js +177 -0
- package/dist/components/header/internal/mobile-nav.js.map +1 -0
- package/dist/components/header/internal/mode-toggle.cjs +73 -0
- package/dist/components/header/internal/mode-toggle.cjs.map +1 -0
- package/dist/components/header/internal/mode-toggle.d.ts +8 -0
- package/dist/components/header/internal/mode-toggle.d.ts.map +1 -0
- package/dist/components/header/internal/mode-toggle.js +54 -0
- package/dist/components/header/internal/mode-toggle.js.map +1 -0
- package/dist/components/header/internal/site-header.cjs +62 -0
- package/dist/components/header/internal/site-header.cjs.map +1 -0
- package/dist/components/header/internal/site-header.d.ts +15 -0
- package/dist/components/header/internal/site-header.d.ts.map +1 -0
- package/dist/components/header/internal/site-header.js +38 -0
- package/dist/components/header/internal/site-header.js.map +1 -0
- package/dist/components/header/langbutton/langbutton.cjs +54 -0
- package/dist/components/header/langbutton/langbutton.cjs.map +1 -0
- package/dist/components/header/langbutton/langbutton.d.ts +4 -0
- package/dist/components/header/langbutton/langbutton.d.ts.map +1 -0
- package/dist/components/header/langbutton/langbutton.js +35 -0
- package/dist/components/header/langbutton/langbutton.js.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.cjs +72 -0
- package/dist/components/header/userbutton/user-dropdown.cjs.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.d.ts +10 -0
- package/dist/components/header/userbutton/user-dropdown.d.ts.map +1 -0
- package/dist/components/header/userbutton/user-dropdown.js +64 -0
- package/dist/components/header/userbutton/user-dropdown.js.map +1 -0
- package/dist/components/header/userbutton/userbutton.cjs +50 -0
- package/dist/components/header/userbutton/userbutton.cjs.map +1 -0
- package/dist/components/header/userbutton/userbutton.d.ts +10 -0
- package/dist/components/header/userbutton/userbutton.d.ts.map +1 -0
- package/dist/components/header/userbutton/userbutton.js +16 -0
- package/dist/components/header/userbutton/userbutton.js.map +1 -0
- package/dist/components/hooks/use-page-nav.cjs +89 -0
- package/dist/components/hooks/use-page-nav.cjs.map +1 -0
- package/dist/components/hooks/use-page-nav.d.ts +5 -0
- package/dist/components/hooks/use-page-nav.d.ts.map +1 -0
- package/dist/components/hooks/use-page-nav.js +61 -0
- package/dist/components/hooks/use-page-nav.js.map +1 -0
- package/dist/components/hooks/use-user-entities.cjs +30 -0
- package/dist/components/hooks/use-user-entities.cjs.map +1 -0
- package/dist/components/hooks/use-user-entities.d.ts +2 -0
- package/dist/components/hooks/use-user-entities.d.ts.map +1 -0
- package/dist/components/hooks/use-user-entities.js +6 -0
- package/dist/components/hooks/use-user-entities.js.map +1 -0
- package/dist/components/icons/apple.cjs +47 -0
- package/dist/components/icons/apple.cjs.map +1 -0
- package/dist/components/icons/apple.d.ts +2 -0
- package/dist/components/icons/apple.d.ts.map +1 -0
- package/dist/components/icons/apple.js +23 -0
- package/dist/components/icons/apple.js.map +1 -0
- package/dist/components/icons/facebook.cjs +49 -0
- package/dist/components/icons/facebook.cjs.map +1 -0
- package/dist/components/icons/facebook.d.ts +2 -0
- package/dist/components/icons/facebook.d.ts.map +1 -0
- package/dist/components/icons/facebook.js +25 -0
- package/dist/components/icons/facebook.js.map +1 -0
- package/dist/components/icons/github.cjs +49 -0
- package/dist/components/icons/github.cjs.map +1 -0
- package/dist/components/icons/github.d.ts +2 -0
- package/dist/components/icons/github.d.ts.map +1 -0
- package/dist/components/icons/github.js +25 -0
- package/dist/components/icons/github.js.map +1 -0
- package/dist/components/icons/google.cjs +49 -0
- package/dist/components/icons/google.cjs.map +1 -0
- package/dist/components/icons/google.d.ts +2 -0
- package/dist/components/icons/google.d.ts.map +1 -0
- package/dist/components/icons/google.js +25 -0
- package/dist/components/icons/google.js.map +1 -0
- package/dist/components/icons/logo.cjs +49 -0
- package/dist/components/icons/logo.cjs.map +1 -0
- package/dist/components/icons/logo.d.ts +4 -0
- package/dist/components/icons/logo.d.ts.map +1 -0
- package/dist/components/icons/logo.js +25 -0
- package/dist/components/icons/logo.js.map +1 -0
- package/dist/components/lightbox/GallerySection.cjs +53 -0
- package/dist/components/lightbox/GallerySection.cjs.map +1 -0
- package/dist/components/lightbox/GallerySection.d.ts +12 -0
- package/dist/components/lightbox/GallerySection.d.ts.map +1 -0
- package/dist/components/lightbox/GallerySection.js +29 -0
- package/dist/components/lightbox/GallerySection.js.map +1 -0
- package/dist/components/lightbox/ImageLightbox.cjs +244 -0
- package/dist/components/lightbox/ImageLightbox.cjs.map +1 -0
- package/dist/components/lightbox/ImageLightbox.d.ts +3 -0
- package/dist/components/lightbox/ImageLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/ImageLightbox.js +220 -0
- package/dist/components/lightbox/ImageLightbox.js.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.cjs +17 -0
- package/dist/components/lightbox/ImageLightbox.types.cjs.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.d.ts +28 -0
- package/dist/components/lightbox/ImageLightbox.types.d.ts.map +1 -0
- package/dist/components/lightbox/ImageLightbox.types.js +1 -0
- package/dist/components/lightbox/ImageLightbox.types.js.map +1 -0
- package/dist/components/lightbox/index.cjs +38 -0
- package/dist/components/lightbox/index.cjs.map +1 -0
- package/dist/components/lightbox/index.d.ts +8 -0
- package/dist/components/lightbox/index.d.ts.map +1 -0
- package/dist/components/lightbox/index.js +11 -0
- package/dist/components/lightbox/index.js.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.cjs +57 -0
- package/dist/components/lightbox/useEntityLightbox.cjs.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.d.ts +25 -0
- package/dist/components/lightbox/useEntityLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/useEntityLightbox.js +33 -0
- package/dist/components/lightbox/useEntityLightbox.js.map +1 -0
- package/dist/components/lightbox/useLightbox.cjs +59 -0
- package/dist/components/lightbox/useLightbox.cjs.map +1 -0
- package/dist/components/lightbox/useLightbox.d.ts +9 -0
- package/dist/components/lightbox/useLightbox.d.ts.map +1 -0
- package/dist/components/lightbox/useLightbox.js +35 -0
- package/dist/components/lightbox/useLightbox.js.map +1 -0
- package/dist/components/search/search.cjs +71 -0
- package/dist/components/search/search.cjs.map +1 -0
- package/dist/components/search/search.d.ts +2 -0
- package/dist/components/search/search.d.ts.map +1 -0
- package/dist/components/search/search.js +63 -0
- package/dist/components/search/search.js.map +1 -0
- package/dist/components/tailwind/contact.cjs +380 -0
- package/dist/components/tailwind/contact.cjs.map +1 -0
- package/dist/components/tailwind/contact.d.ts +2 -0
- package/dist/components/tailwind/contact.d.ts.map +1 -0
- package/dist/components/tailwind/contact.js +356 -0
- package/dist/components/tailwind/contact.js.map +1 -0
- package/dist/components/tailwind/content-page.cjs +58 -0
- package/dist/components/tailwind/content-page.cjs.map +1 -0
- package/dist/components/tailwind/content-page.d.ts +18 -0
- package/dist/components/tailwind/content-page.d.ts.map +1 -0
- package/dist/components/tailwind/content-page.js +32 -0
- package/dist/components/tailwind/content-page.js.map +1 -0
- package/dist/components/tailwind/feature.cjs +95 -0
- package/dist/components/tailwind/feature.cjs.map +1 -0
- package/dist/components/tailwind/feature.d.ts +2 -0
- package/dist/components/tailwind/feature.d.ts.map +1 -0
- package/dist/components/tailwind/feature.js +75 -0
- package/dist/components/tailwind/feature.js.map +1 -0
- package/dist/components/tailwind/featurelist.cjs +99 -0
- package/dist/components/tailwind/featurelist.cjs.map +1 -0
- package/dist/components/tailwind/featurelist.d.ts +2 -0
- package/dist/components/tailwind/featurelist.d.ts.map +1 -0
- package/dist/components/tailwind/featurelist.js +65 -0
- package/dist/components/tailwind/featurelist.js.map +1 -0
- package/dist/components/tailwind/footer.cjs +104 -0
- package/dist/components/tailwind/footer.cjs.map +1 -0
- package/dist/components/tailwind/footer.d.ts +2 -0
- package/dist/components/tailwind/footer.d.ts.map +1 -0
- package/dist/components/tailwind/footer.js +80 -0
- package/dist/components/tailwind/footer.js.map +1 -0
- package/dist/components/tailwind/hero.cjs +130 -0
- package/dist/components/tailwind/hero.cjs.map +1 -0
- package/dist/components/tailwind/hero.d.ts +22 -0
- package/dist/components/tailwind/hero.d.ts.map +1 -0
- package/dist/components/tailwind/hero.js +106 -0
- package/dist/components/tailwind/hero.js.map +1 -0
- package/dist/components/tailwind/pricing.cjs +214 -0
- package/dist/components/tailwind/pricing.cjs.map +1 -0
- package/dist/components/tailwind/pricing.d.ts +6 -0
- package/dist/components/tailwind/pricing.d.ts.map +1 -0
- package/dist/components/tailwind/pricing.js +190 -0
- package/dist/components/tailwind/pricing.js.map +1 -0
- package/dist/components/tailwind/privacy.cjs +138 -0
- package/dist/components/tailwind/privacy.cjs.map +1 -0
- package/dist/components/tailwind/privacy.d.ts +2 -0
- package/dist/components/tailwind/privacy.d.ts.map +1 -0
- package/dist/components/tailwind/privacy.js +114 -0
- package/dist/components/tailwind/privacy.js.map +1 -0
- package/dist/components/tailwind/providerIcons.cjs +48 -0
- package/dist/components/tailwind/providerIcons.cjs.map +1 -0
- package/dist/components/tailwind/providerIcons.d.ts +4 -0
- package/dist/components/tailwind/providerIcons.d.ts.map +1 -0
- package/dist/components/tailwind/providerIcons.js +24 -0
- package/dist/components/tailwind/providerIcons.js.map +1 -0
- package/dist/components/ui/avatar.cjs +120 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +86 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/breadcrumb.cjs +63 -0
- package/dist/components/ui/breadcrumb.cjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +10 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +29 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.cjs +105 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +82 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.cjs +129 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +102 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.cjs +98 -0
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +66 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.cjs +200 -0
- package/dist/components/ui/command.cjs.map +1 -0
- package/dist/components/ui/command.d.ts +83 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +160 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/dialog.cjs +204 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.ts +14 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +163 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.cjs +191 -0
- package/dist/components/ui/drawer.cjs.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +160 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +323 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +277 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.cjs +72 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +50 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.cjs +85 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +53 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.cjs +351 -0
- package/dist/components/ui/menubar.cjs.map +1 -0
- package/dist/components/ui/menubar.d.ts +27 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +304 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.cjs +257 -0
- package/dist/components/ui/navigation-menu.cjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +217 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/popover.cjs +109 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +74 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/resizable.cjs +124 -0
- package/dist/components/ui/resizable.cjs.map +1 -0
- package/dist/components/ui/resizable.d.ts +26 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +90 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.cjs +132 -0
- package/dist/components/ui/scroll-area.cjs.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +99 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.cjs +254 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.d.ts +14 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +213 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/sheet.cjs +203 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +164 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/skeleton.cjs +66 -0
- package/dist/components/ui/skeleton.cjs.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +44 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/spinner.cjs +128 -0
- package/dist/components/ui/spinner.cjs.map +1 -0
- package/dist/components/ui/spinner.d.ts +12 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +105 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.cjs +98 -0
- package/dist/components/ui/switch.cjs.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +66 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tabs.cjs +136 -0
- package/dist/components/ui/tabs.cjs.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +101 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.cjs +69 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +47 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.cjs +169 -0
- package/dist/components/ui/toast.cjs.map +1 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +131 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toaster.cjs +78 -0
- package/dist/components/ui/toaster.cjs.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/toaster.js +63 -0
- package/dist/components/ui/toaster.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +126 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +91 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/use-toast.cjs +187 -0
- package/dist/components/ui/use-toast.cjs.map +1 -0
- package/dist/components/ui/use-toast.d.ts +45 -0
- package/dist/components/ui/use-toast.d.ts.map +1 -0
- package/dist/components/ui/use-toast.js +153 -0
- package/dist/components/ui/use-toast.js.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.cjs +80 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.cjs.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.d.ts +12 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.d.ts.map +1 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.js +46 -0
- package/dist/components/upgrade-prompt/UpgradePrompt.js.map +1 -0
- package/dist/components/upgrade-prompt/index.cjs +29 -0
- package/dist/components/upgrade-prompt/index.cjs.map +1 -0
- package/dist/components/upgrade-prompt/index.d.ts +3 -0
- package/dist/components/upgrade-prompt/index.d.ts.map +1 -0
- package/dist/components/upgrade-prompt/index.js +5 -0
- package/dist/components/upgrade-prompt/index.js.map +1 -0
- package/dist/config/docs.d.ts +8 -0
- package/dist/config/docs.d.ts.map +1 -0
- package/dist/config/site.d.ts +12 -0
- package/dist/config/site.d.ts.map +1 -0
- package/dist/hooks/useRecaptcha.d.ts +16 -0
- package/dist/hooks/useRecaptcha.d.ts.map +1 -0
- package/dist/lib/utils.cjs +48 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cjs +17 -0
- package/dist/lib/utils.d.cjs.map +1 -0
- package/dist/lib/utils.d.js +1 -0
- package/dist/lib/utils.d.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +22 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +178 -0
- package/dist/types/nav.cjs +17 -0
- package/dist/types/nav.cjs.map +1 -0
- package/dist/types/nav.d.ts +17 -0
- package/dist/types/nav.d.ts.map +1 -0
- package/dist/types/nav.js +1 -0
- package/dist/types/nav.js.map +1 -0
- package/dist/types/sitemap.cjs +17 -0
- package/dist/types/sitemap.cjs.map +1 -0
- package/dist/types/sitemap.d.ts +19 -0
- package/dist/types/sitemap.d.ts.map +1 -0
- package/dist/types/sitemap.js +1 -0
- package/dist/types/sitemap.js.map +1 -0
- package/dist/types/unist.cjs +17 -0
- package/dist/types/unist.cjs.map +1 -0
- package/dist/types/unist.js +1 -0
- package/dist/types/unist.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
import * as React from "react";
|
|
35
|
+
import Link from "next/link";
|
|
36
|
+
import { useRouter } from "next/navigation";
|
|
37
|
+
import { docsConfig } from "@/config/docs";
|
|
38
|
+
import { siteConfig } from "@/config/site";
|
|
39
|
+
import { cn } from "@/lib/utils";
|
|
40
|
+
import { Icons } from "../../generic/icons";
|
|
41
|
+
import { ScrollArea } from "../../ui/scroll-area";
|
|
42
|
+
import { Sheet, SheetContent, SheetTrigger } from "../../ui/sheet";
|
|
43
|
+
import { Button } from "../../ui/button";
|
|
44
|
+
function MobileNav() {
|
|
45
|
+
var _a;
|
|
46
|
+
const [open, setOpen] = React.useState(false);
|
|
47
|
+
return /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
48
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
49
|
+
Button,
|
|
50
|
+
{
|
|
51
|
+
variant: "ghost",
|
|
52
|
+
className: "mr-2 flex px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
"svg",
|
|
56
|
+
{
|
|
57
|
+
strokeWidth: "1.5",
|
|
58
|
+
viewBox: "0 0 24 24",
|
|
59
|
+
fill: "none",
|
|
60
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
+
className: "h-5 w-5",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
"path",
|
|
65
|
+
{
|
|
66
|
+
d: "M3 5H11",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
strokeWidth: "1.5",
|
|
69
|
+
strokeLinecap: "round",
|
|
70
|
+
strokeLinejoin: "round"
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
"path",
|
|
75
|
+
{
|
|
76
|
+
d: "M3 12H16",
|
|
77
|
+
stroke: "currentColor",
|
|
78
|
+
strokeWidth: "1.5",
|
|
79
|
+
strokeLinecap: "round",
|
|
80
|
+
strokeLinejoin: "round"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"path",
|
|
85
|
+
{
|
|
86
|
+
d: "M3 19H21",
|
|
87
|
+
stroke: "currentColor",
|
|
88
|
+
strokeWidth: "1.5",
|
|
89
|
+
strokeLinecap: "round",
|
|
90
|
+
strokeLinejoin: "round"
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Menu" })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "left", className: "pr-0", children: [
|
|
101
|
+
/* @__PURE__ */ jsxs(
|
|
102
|
+
MobileLink,
|
|
103
|
+
{
|
|
104
|
+
href: "/",
|
|
105
|
+
className: "flex items-center",
|
|
106
|
+
onOpenChange: setOpen,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsx(Icons.logo, { className: "mr-2 h-4 w-4" }),
|
|
109
|
+
/* @__PURE__ */ jsx("span", { className: "font-bold", children: siteConfig.name })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ jsxs(ScrollArea, { className: "my-4 h-[calc(100vh-8rem)] pb-10 pl-6", children: [
|
|
114
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col space-y-3", children: (_a = docsConfig.mainNav) == null ? void 0 : _a.map(
|
|
115
|
+
(item) => item.href && /* @__PURE__ */ jsx(
|
|
116
|
+
MobileLink,
|
|
117
|
+
{
|
|
118
|
+
href: item.href,
|
|
119
|
+
onOpenChange: setOpen,
|
|
120
|
+
children: item.title
|
|
121
|
+
},
|
|
122
|
+
item.href
|
|
123
|
+
)
|
|
124
|
+
) }),
|
|
125
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col space-y-2", children: docsConfig.sidebarNav.map((item, index) => {
|
|
126
|
+
var _a2;
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-3 pt-6", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("h4", { className: "font-medium", children: item.title }),
|
|
129
|
+
((_a2 = item == null ? void 0 : item.items) == null ? void 0 : _a2.length) && item.items.map((item2) => /* @__PURE__ */ jsx(React.Fragment, { children: !item2.disabled && (item2.href ? /* @__PURE__ */ jsxs(
|
|
130
|
+
MobileLink,
|
|
131
|
+
{
|
|
132
|
+
href: item2.href,
|
|
133
|
+
onOpenChange: setOpen,
|
|
134
|
+
className: "text-muted-foreground",
|
|
135
|
+
children: [
|
|
136
|
+
item2.title,
|
|
137
|
+
item2.label && /* @__PURE__ */ jsx("span", { className: "ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline", children: item2.label })
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
) : item2.title) }, item2.href))
|
|
141
|
+
] }, index);
|
|
142
|
+
}) })
|
|
143
|
+
] })
|
|
144
|
+
] })
|
|
145
|
+
] });
|
|
146
|
+
}
|
|
147
|
+
function MobileLink(_a) {
|
|
148
|
+
var _b = _a, {
|
|
149
|
+
href,
|
|
150
|
+
onOpenChange,
|
|
151
|
+
className,
|
|
152
|
+
children
|
|
153
|
+
} = _b, props = __objRest(_b, [
|
|
154
|
+
"href",
|
|
155
|
+
"onOpenChange",
|
|
156
|
+
"className",
|
|
157
|
+
"children"
|
|
158
|
+
]);
|
|
159
|
+
const router = useRouter();
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
Link,
|
|
162
|
+
__spreadProps(__spreadValues({
|
|
163
|
+
href,
|
|
164
|
+
onClick: () => {
|
|
165
|
+
router.push(href.toString());
|
|
166
|
+
onOpenChange == null ? void 0 : onOpenChange(false);
|
|
167
|
+
},
|
|
168
|
+
className: cn(className)
|
|
169
|
+
}, props), {
|
|
170
|
+
children
|
|
171
|
+
})
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
export {
|
|
175
|
+
MobileNav
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=mobile-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/mobile-nav.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport Link, { LinkProps } from 'next/link'\nimport { useRouter } from 'next/navigation'\n\nimport { docsConfig } from '@/config/docs'\nimport { siteConfig } from '@/config/site'\nimport { cn } from '@/lib/utils'\nimport { Icons } from '../../generic/icons'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport { Sheet, SheetContent, SheetTrigger } from '../../ui/sheet'\nimport { Button } from '../../ui/button'\n\nexport function MobileNav() {\n const [open, setOpen] = React.useState(false)\n\n return (\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button\n variant=\"ghost\"\n className=\"mr-2 flex px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden\"\n >\n <svg\n strokeWidth=\"1.5\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"h-5 w-5\"\n >\n <path\n d=\"M3 5H11\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n ></path>\n <path\n d=\"M3 12H16\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n ></path>\n <path\n d=\"M3 19H21\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n ></path>\n </svg>\n <span className=\"sr-only\">Toggle Menu</span>\n </Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"pr-0\">\n <MobileLink\n href=\"/\"\n className=\"flex items-center\"\n onOpenChange={setOpen}\n >\n <Icons.logo className=\"mr-2 h-4 w-4\" />\n <span className=\"font-bold\">{siteConfig.name}</span>\n </MobileLink>\n <ScrollArea className=\"my-4 h-[calc(100vh-8rem)] pb-10 pl-6\">\n <div className=\"flex flex-col space-y-3\">\n {docsConfig.mainNav?.map(\n (item: any) =>\n item.href && (\n <MobileLink\n key={item.href}\n href={item.href}\n onOpenChange={setOpen}\n >\n {item.title}\n </MobileLink>\n ),\n )}\n </div>\n <div className=\"flex flex-col space-y-2\">\n {docsConfig.sidebarNav.map((item: any, index: number) => (\n <div key={index} className=\"flex flex-col space-y-3 pt-6\">\n <h4 className=\"font-medium\">{item.title}</h4>\n {item?.items?.length &&\n item.items.map((item: any) => (\n <React.Fragment key={item.href}>\n {!item.disabled &&\n (item.href ? (\n <MobileLink\n href={item.href}\n onOpenChange={setOpen}\n className=\"text-muted-foreground\"\n >\n {item.title}\n {item.label && (\n <span className=\"ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline\">\n {item.label}\n </span>\n )}\n </MobileLink>\n ) : (\n item.title\n ))}\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </ScrollArea>\n </SheetContent>\n </Sheet>\n )\n}\n\ninterface MobileLinkProps extends LinkProps {\n onOpenChange?: (_open: boolean) => void\n children: React.ReactNode\n className?: string\n}\n\nfunction MobileLink({\n href,\n onOpenChange,\n className,\n children,\n ...props\n}: MobileLinkProps) {\n const router = useRouter()\n return (\n <Link\n href={href}\n onClick={() => {\n router.push(href.toString())\n onOpenChange?.(false)\n }}\n className={cn(className)}\n {...props}\n >\n {children}\n </Link>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBU,SAOE,KAPF;AAtBV,YAAY,WAAW;AACvB,OAAO,UAAyB;AAChC,SAAS,iBAAiB;AAE1B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,cAAc,oBAAoB;AAClD,SAAS,cAAc;AAEhB,SAAS,YAAY;AAd5B;AAeE,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAE5C,SACE,qBAAC,SAAM,MAAY,cAAc,SAC/B;AAAA,wBAAC,gBAAa,SAAO,MACnB;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QAEV;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,aAAY;AAAA,cACZ,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA,cAEV;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,QAAO;AAAA,oBACP,aAAY;AAAA,oBACZ,eAAc;AAAA,oBACd,gBAAe;AAAA;AAAA,gBAChB;AAAA,gBACD;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,QAAO;AAAA,oBACP,aAAY;AAAA,oBACZ,eAAc;AAAA,oBACd,gBAAe;AAAA;AAAA,gBAChB;AAAA,gBACD;AAAA,kBAAC;AAAA;AAAA,oBACC,GAAE;AAAA,oBACF,QAAO;AAAA,oBACP,aAAY;AAAA,oBACZ,eAAc;AAAA,oBACd,gBAAe;AAAA;AAAA,gBAChB;AAAA;AAAA;AAAA,UACH;AAAA,UACA,oBAAC,UAAK,WAAU,WAAU,yBAAW;AAAA;AAAA;AAAA,IACvC,GACF;AAAA,IACA,qBAAC,gBAAa,MAAK,QAAO,WAAU,QAClC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,cAAc;AAAA,UAEd;AAAA,gCAAC,MAAM,MAAN,EAAW,WAAU,gBAAe;AAAA,YACrC,oBAAC,UAAK,WAAU,aAAa,qBAAW,MAAK;AAAA;AAAA;AAAA,MAC/C;AAAA,MACA,qBAAC,cAAW,WAAU,wCACpB;AAAA,4BAAC,SAAI,WAAU,2BACZ,2BAAW,YAAX,mBAAoB;AAAA,UACnB,CAAC,SACC,KAAK,QACH;AAAA,YAAC;AAAA;AAAA,cAEC,MAAM,KAAK;AAAA,cACX,cAAc;AAAA,cAEb,eAAK;AAAA;AAAA,YAJD,KAAK;AAAA,UAKZ;AAAA,WAGR;AAAA,QACA,oBAAC,SAAI,WAAU,2BACZ,qBAAW,WAAW,IAAI,CAAC,MAAW,UAAe;AAjFlE,cAAAA;AAkFc,sCAAC,SAAgB,WAAU,gCACzB;AAAA,gCAAC,QAAG,WAAU,eAAe,eAAK,OAAM;AAAA,cACvCA,MAAA,6BAAM,UAAN,gBAAAA,IAAa,WACZ,KAAK,MAAM,IAAI,CAACC,UACd,oBAAC,MAAM,UAAN,EACE,WAACA,MAAK,aACJA,MAAK,OACJ;AAAA,cAAC;AAAA;AAAA,gBACC,MAAMA,MAAK;AAAA,gBACX,cAAc;AAAA,gBACd,WAAU;AAAA,gBAET;AAAA,kBAAAA,MAAK;AAAA,kBACLA,MAAK,SACJ,oBAAC,UAAK,WAAU,wHACb,UAAAA,MAAK,OACR;AAAA;AAAA;AAAA,YAEJ,IAEAA,MAAK,UAhBUA,MAAK,IAkB1B,CACD;AAAA,eAvBK,KAwBV;AAAA,SACD,GACH;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAEJ;AAQA,SAAS,WAAW,IAMA;AANA,eAClB;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EA7HF,IAyHoB,IAKf,kBALe,IAKf;AAAA,IAJH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,SAAS,UAAU;AACzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,SAAS,MAAM;AACb,eAAO,KAAK,KAAK,SAAS,CAAC;AAC3B,qDAAe;AAAA,MACjB;AAAA,MACA,WAAW,GAAG,SAAS;AAAA,OACnB,QAPL;AAAA,MASE;AAAA;AAAA,EACH;AAEJ;","names":["_a","item"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var mode_toggle_exports = {};
|
|
21
|
+
__export(mode_toggle_exports, {
|
|
22
|
+
ModeToggle: () => ModeToggle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(mode_toggle_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_dropdown_menu = require("../../ui/dropdown-menu");
|
|
28
|
+
var import_button = require("../../ui/button");
|
|
29
|
+
var import_solid = require("@heroicons/react/20/solid");
|
|
30
|
+
function ModeToggle({
|
|
31
|
+
theme,
|
|
32
|
+
resolvedTheme,
|
|
33
|
+
setTheme
|
|
34
|
+
}) {
|
|
35
|
+
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
36
|
+
(0, import_react.useEffect)(() => {
|
|
37
|
+
setMounted(true);
|
|
38
|
+
}, []);
|
|
39
|
+
if (!mounted) {
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_solid.SunIcon, { className: "h-[1.2rem] w-[1.2rem]" }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Toggle theme" })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
const isDark = resolvedTheme === "dark";
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { variant: "ghost", size: "icon", className: "relative h-9 w-9", children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
import_solid.SunIcon,
|
|
50
|
+
{
|
|
51
|
+
className: `absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${isDark ? "rotate-90 scale-0 opacity-0" : "rotate-0 scale-100 opacity-100"}`
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_solid.MoonIcon,
|
|
56
|
+
{
|
|
57
|
+
className: `absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${isDark ? "rotate-0 scale-100 opacity-100" : "-rotate-90 scale-0 opacity-0"}`
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Toggle theme" })
|
|
61
|
+
] }) }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuContent, { align: "end", children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { onClick: () => setTheme("light"), children: "Light" }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { onClick: () => setTheme("dark"), children: "Dark" }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { onClick: () => setTheme("system"), children: "System" })
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
ModeToggle
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=mode-toggle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/mode-toggle.tsx"],"sourcesContent":["'use client'\n\nimport { useEffect, useState } from 'react'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { MoonIcon, SunIcon } from '@heroicons/react/20/solid'\n\ninterface ModeToggleProps {\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n}\n\nexport function ModeToggle({\n theme,\n resolvedTheme,\n setTheme,\n}: ModeToggleProps) {\n const [mounted, setMounted] = useState(false)\n\n useEffect(() => {\n setMounted(true)\n }, [])\n\n if (!mounted) {\n return (\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <SunIcon className=\"h-[1.2rem] w-[1.2rem]\" />\n <span className=\"sr-only\">Toggle theme</span>\n </Button>\n )\n }\n\n const isDark = resolvedTheme === 'dark'\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"relative h-9 w-9\">\n <SunIcon\n className={`absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${\n isDark\n ? 'rotate-90 scale-0 opacity-0'\n : 'rotate-0 scale-100 opacity-100'\n }`}\n />\n <MoonIcon\n className={`absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${\n isDark\n ? 'rotate-0 scale-100 opacity-100'\n : '-rotate-90 scale-0 opacity-0'\n }`}\n />\n <span className=\"sr-only\">Toggle theme</span>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setTheme('light')}>\n Light\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme('dark')}>\n Dark\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme('system')}>\n System\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BM;AA7BN,mBAAoC;AACpC,2BAKO;AACP,oBAAuB;AACvB,mBAAkC;AAQ3B,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,KAAK;AAE5C,8BAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,6CAAC,wBAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,kDAAC,wBAAQ,WAAU,yBAAwB;AAAA,MAC3C,4CAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,OACxC;AAAA,EAEJ;AAEA,QAAM,SAAS,kBAAkB;AAEjC,SACE,6CAAC,qCACC;AAAA,gDAAC,4CAAoB,SAAO,MAC1B,uDAAC,wBAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,oBAC5C;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,oGACT,SACI,gCACA,gCACN;AAAA;AAAA,MACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,oGACT,SACI,mCACA,8BACN;AAAA;AAAA,MACF;AAAA,MACA,4CAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,OACxC,GACF;AAAA,IACA,6CAAC,4CAAoB,OAAM,OACzB;AAAA,kDAAC,yCAAiB,SAAS,MAAM,SAAS,OAAO,GAAG,mBAEpD;AAAA,MACA,4CAAC,yCAAiB,SAAS,MAAM,SAAS,MAAM,GAAG,kBAEnD;AAAA,MACA,4CAAC,yCAAiB,SAAS,MAAM,SAAS,QAAQ,GAAG,oBAErD;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ModeToggleProps {
|
|
2
|
+
theme: string | undefined;
|
|
3
|
+
resolvedTheme: string | undefined;
|
|
4
|
+
setTheme: (theme: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function ModeToggle({ theme, resolvedTheme, setTheme, }: ModeToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=mode-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode-toggle.d.ts","sourceRoot":"","sources":["../../../../components/header/internal/mode-toggle.tsx"],"names":[],"mappings":"AAYA,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,aAAa,EACb,QAAQ,GACT,EAAE,eAAe,2CAoDjB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import {
|
|
5
|
+
DropdownMenu,
|
|
6
|
+
DropdownMenuContent,
|
|
7
|
+
DropdownMenuItem,
|
|
8
|
+
DropdownMenuTrigger
|
|
9
|
+
} from "../../ui/dropdown-menu";
|
|
10
|
+
import { Button } from "../../ui/button";
|
|
11
|
+
import { MoonIcon, SunIcon } from "@heroicons/react/20/solid";
|
|
12
|
+
function ModeToggle({
|
|
13
|
+
theme,
|
|
14
|
+
resolvedTheme,
|
|
15
|
+
setTheme
|
|
16
|
+
}) {
|
|
17
|
+
const [mounted, setMounted] = useState(false);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setMounted(true);
|
|
20
|
+
}, []);
|
|
21
|
+
if (!mounted) {
|
|
22
|
+
return /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(SunIcon, { className: "h-[1.2rem] w-[1.2rem]" }),
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle theme" })
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
const isDark = resolvedTheme === "dark";
|
|
28
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "relative h-9 w-9", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
SunIcon,
|
|
32
|
+
{
|
|
33
|
+
className: `absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${isDark ? "rotate-90 scale-0 opacity-0" : "rotate-0 scale-100 opacity-100"}`
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
MoonIcon,
|
|
38
|
+
{
|
|
39
|
+
className: `absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${isDark ? "rotate-0 scale-100 opacity-100" : "-rotate-90 scale-0 opacity-0"}`
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle theme" })
|
|
43
|
+
] }) }),
|
|
44
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => setTheme("light"), children: "Light" }),
|
|
46
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => setTheme("dark"), children: "Dark" }),
|
|
47
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => setTheme("system"), children: "System" })
|
|
48
|
+
] })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
ModeToggle
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=mode-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/mode-toggle.tsx"],"sourcesContent":["'use client'\n\nimport { useEffect, useState } from 'react'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { MoonIcon, SunIcon } from '@heroicons/react/20/solid'\n\ninterface ModeToggleProps {\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n}\n\nexport function ModeToggle({\n theme,\n resolvedTheme,\n setTheme,\n}: ModeToggleProps) {\n const [mounted, setMounted] = useState(false)\n\n useEffect(() => {\n setMounted(true)\n }, [])\n\n if (!mounted) {\n return (\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <SunIcon className=\"h-[1.2rem] w-[1.2rem]\" />\n <span className=\"sr-only\">Toggle theme</span>\n </Button>\n )\n }\n\n const isDark = resolvedTheme === 'dark'\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"relative h-9 w-9\">\n <SunIcon\n className={`absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${\n isDark\n ? 'rotate-90 scale-0 opacity-0'\n : 'rotate-0 scale-100 opacity-100'\n }`}\n />\n <MoonIcon\n className={`absolute left-1/2 top-1/2 h-[1.2rem] w-[1.2rem] -translate-x-1/2 -translate-y-1/2 transition-all ${\n isDark\n ? 'rotate-0 scale-100 opacity-100'\n : '-rotate-90 scale-0 opacity-0'\n }`}\n />\n <span className=\"sr-only\">Toggle theme</span>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setTheme('light')}>\n Light\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme('dark')}>\n Dark\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => setTheme('system')}>\n System\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";AA+BM,SACE,KADF;AA7BN,SAAS,WAAW,gBAAgB;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,UAAU,eAAe;AAQ3B,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAE5C,YAAU,MAAM;AACd,eAAW,IAAI;AAAA,EACjB,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,SAAS;AACZ,WACE,qBAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,0BAAC,WAAQ,WAAU,yBAAwB;AAAA,MAC3C,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,OACxC;AAAA,EAEJ;AAEA,QAAM,SAAS,kBAAkB;AAEjC,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,oBAC5C;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,oGACT,SACI,gCACA,gCACN;AAAA;AAAA,MACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,oGACT,SACI,mCACA,8BACN;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,UAAK,WAAU,WAAU,0BAAY;AAAA,OACxC,GACF;AAAA,IACA,qBAAC,uBAAoB,OAAM,OACzB;AAAA,0BAAC,oBAAiB,SAAS,MAAM,SAAS,OAAO,GAAG,mBAEpD;AAAA,MACA,oBAAC,oBAAiB,SAAS,MAAM,SAAS,MAAM,GAAG,kBAEnD;AAAA,MACA,oBAAC,oBAAiB,SAAS,MAAM,SAAS,QAAQ,GAAG,oBAErD;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var site_header_exports = {};
|
|
20
|
+
__export(site_header_exports, {
|
|
21
|
+
SiteHeader: () => SiteHeader
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(site_header_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_command = require("../../ui/command");
|
|
26
|
+
var import_main_nav = require("./main-nav");
|
|
27
|
+
var import_mode_toggle = require("./mode-toggle");
|
|
28
|
+
var import_userbutton = require("../userbutton/userbutton");
|
|
29
|
+
var import_langbutton = require("../langbutton/langbutton");
|
|
30
|
+
function SiteHeader({
|
|
31
|
+
user,
|
|
32
|
+
signOut,
|
|
33
|
+
cookies,
|
|
34
|
+
theme,
|
|
35
|
+
resolvedTheme,
|
|
36
|
+
setTheme
|
|
37
|
+
}) {
|
|
38
|
+
var _a;
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("header", { className: "border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2", children: [
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_main_nav.MainNav, { userId: (_a = user == null ? void 0 : user.username) != null ? _a : user == null ? void 0 : user.id }),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-1 items-center justify-between space-x-2 md:justify-end", children: [
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full flex-1 md:w-auto md:flex-none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_command.Command, {}) }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("nav", { className: "flex items-center gap-3", children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_langbutton.LangButton, { cookies }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
import_mode_toggle.ModeToggle,
|
|
47
|
+
{
|
|
48
|
+
theme,
|
|
49
|
+
resolvedTheme,
|
|
50
|
+
setTheme
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_userbutton.UserButton, { signOut, user })
|
|
54
|
+
] })
|
|
55
|
+
] })
|
|
56
|
+
] }) });
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
SiteHeader
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=site-header.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/site-header.tsx"],"sourcesContent":["import { Command } from '../../ui/command'\nimport { MainNav } from './main-nav'\n// import { MobileNav } from './mobile-nav'\nimport { ModeToggle } from './mode-toggle'\nimport { UserButton } from '../userbutton/userbutton'\nimport { LangButton } from '../langbutton/langbutton'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\nimport type { Cookies } from 'next-client-cookies'\n\nexport function SiteHeader({\n user,\n signOut,\n cookies,\n theme,\n resolvedTheme,\n setTheme,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n cookies: Cookies\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n}) {\n return (\n <header className=\"border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b\">\n <div className=\"max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2\">\n <MainNav userId={user?.username ?? user?.id} />\n {/* <MobileNav /> */}\n <div className=\"flex flex-1 items-center justify-between space-x-2 md:justify-end\">\n <div className=\"w-full flex-1 md:w-auto md:flex-none\">\n <Command />\n </div>\n <nav className=\"flex items-center gap-3\">\n <LangButton cookies={cookies} />\n <ModeToggle\n theme={theme}\n resolvedTheme={resolvedTheme}\n setTheme={setTheme}\n />\n <UserButton signOut={signOut} user={user} />\n </nav>\n </div>\n </div>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BQ;AA7BR,qBAAwB;AACxB,sBAAwB;AAExB,yBAA2B;AAC3B,wBAA2B;AAC3B,wBAA2B;AAMpB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOG;AAzBH;AA0BE,SACE,4CAAC,YAAO,WAAU,2HAChB,uDAAC,SAAI,WAAU,+EACb;AAAA,gDAAC,2BAAQ,SAAQ,kCAAM,aAAN,YAAkB,6BAAM,IAAI;AAAA,IAE7C,6CAAC,SAAI,WAAU,qEACb;AAAA,kDAAC,SAAI,WAAU,wCACb,sDAAC,0BAAQ,GACX;AAAA,MACA,6CAAC,SAAI,WAAU,2BACb;AAAA,oDAAC,gCAAW,SAAkB;AAAA,QAC9B;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,4CAAC,gCAAW,SAAkB,MAAY;AAAA,SAC5C;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { User } from '@auth/core/types';
|
|
2
|
+
type UserWithUsername = User & {
|
|
3
|
+
username?: string | null;
|
|
4
|
+
};
|
|
5
|
+
import type { Cookies } from 'next-client-cookies';
|
|
6
|
+
export declare function SiteHeader({ user, signOut, cookies, theme, resolvedTheme, setTheme, }: {
|
|
7
|
+
user: UserWithUsername | undefined;
|
|
8
|
+
signOut: () => Promise<void>;
|
|
9
|
+
cookies: Cookies;
|
|
10
|
+
theme: string | undefined;
|
|
11
|
+
resolvedTheme: string | undefined;
|
|
12
|
+
setTheme: (theme: string) => void;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=site-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-header.d.ts","sourceRoot":"","sources":["../../../../components/header/internal/site-header.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEvC,KAAK,gBAAgB,GAAG,IAAI,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAClC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC,2CAuBA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Command } from "../../ui/command";
|
|
3
|
+
import { MainNav } from "./main-nav";
|
|
4
|
+
import { ModeToggle } from "./mode-toggle";
|
|
5
|
+
import { UserButton } from "../userbutton/userbutton";
|
|
6
|
+
import { LangButton } from "../langbutton/langbutton";
|
|
7
|
+
function SiteHeader({
|
|
8
|
+
user,
|
|
9
|
+
signOut,
|
|
10
|
+
cookies,
|
|
11
|
+
theme,
|
|
12
|
+
resolvedTheme,
|
|
13
|
+
setTheme
|
|
14
|
+
}) {
|
|
15
|
+
var _a;
|
|
16
|
+
return /* @__PURE__ */ jsx("header", { className: "border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b", children: /* @__PURE__ */ jsxs("div", { className: "max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(MainNav, { userId: (_a = user == null ? void 0 : user.username) != null ? _a : user == null ? void 0 : user.id }),
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center justify-between space-x-2 md:justify-end", children: [
|
|
19
|
+
/* @__PURE__ */ jsx("div", { className: "w-full flex-1 md:w-auto md:flex-none", children: /* @__PURE__ */ jsx(Command, {}) }),
|
|
20
|
+
/* @__PURE__ */ jsxs("nav", { className: "flex items-center gap-3", children: [
|
|
21
|
+
/* @__PURE__ */ jsx(LangButton, { cookies }),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
ModeToggle,
|
|
24
|
+
{
|
|
25
|
+
theme,
|
|
26
|
+
resolvedTheme,
|
|
27
|
+
setTheme
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ jsx(UserButton, { signOut, user })
|
|
31
|
+
] })
|
|
32
|
+
] })
|
|
33
|
+
] }) });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
SiteHeader
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=site-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/internal/site-header.tsx"],"sourcesContent":["import { Command } from '../../ui/command'\nimport { MainNav } from './main-nav'\n// import { MobileNav } from './mobile-nav'\nimport { ModeToggle } from './mode-toggle'\nimport { UserButton } from '../userbutton/userbutton'\nimport { LangButton } from '../langbutton/langbutton'\nimport { User } from '@auth/core/types'\n\ntype UserWithUsername = User & { username?: string | null }\nimport type { Cookies } from 'next-client-cookies'\n\nexport function SiteHeader({\n user,\n signOut,\n cookies,\n theme,\n resolvedTheme,\n setTheme,\n}: {\n user: UserWithUsername | undefined\n signOut: () => Promise<void>\n cookies: Cookies\n theme: string | undefined\n resolvedTheme: string | undefined\n setTheme: (theme: string) => void\n}) {\n return (\n <header className=\"border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 backdrop-blur-xs top-0 z-50 w-full border-b\">\n <div className=\"max-w-(--breakpoint-2xl) container mx-auto flex h-14 items-center px-2 py-2\">\n <MainNav userId={user?.username ?? user?.id} />\n {/* <MobileNav /> */}\n <div className=\"flex flex-1 items-center justify-between space-x-2 md:justify-end\">\n <div className=\"w-full flex-1 md:w-auto md:flex-none\">\n <Command />\n </div>\n <nav className=\"flex items-center gap-3\">\n <LangButton cookies={cookies} />\n <ModeToggle\n theme={theme}\n resolvedTheme={resolvedTheme}\n setTheme={setTheme}\n />\n <UserButton signOut={signOut} user={user} />\n </nav>\n </div>\n </div>\n </header>\n )\n}\n"],"mappings":"AA6BQ,cAME,YANF;AA7BR,SAAS,eAAe;AACxB,SAAS,eAAe;AAExB,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAMpB,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOG;AAzBH;AA0BE,SACE,oBAAC,YAAO,WAAU,2HAChB,+BAAC,SAAI,WAAU,+EACb;AAAA,wBAAC,WAAQ,SAAQ,kCAAM,aAAN,YAAkB,6BAAM,IAAI;AAAA,IAE7C,qBAAC,SAAI,WAAU,qEACb;AAAA,0BAAC,SAAI,WAAU,wCACb,8BAAC,WAAQ,GACX;AAAA,MACA,qBAAC,SAAI,WAAU,2BACb;AAAA,4BAAC,cAAW,SAAkB;AAAA,QAC9B;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,cAAW,SAAkB,MAAY;AAAA,SAC5C;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var langbutton_exports = {};
|
|
21
|
+
__export(langbutton_exports, {
|
|
22
|
+
LangButton: () => LangButton
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(langbutton_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_dropdown_menu = require("../../ui/dropdown-menu");
|
|
27
|
+
var import_button = require("../../ui/button");
|
|
28
|
+
var import_solid = require("@heroicons/react/20/solid");
|
|
29
|
+
const locales = ["en", "de"];
|
|
30
|
+
function LangButton({ cookies }) {
|
|
31
|
+
const handleLocaleChange = (locale) => {
|
|
32
|
+
cookies.set("NEXT_LOCALE", locale);
|
|
33
|
+
window.location.reload();
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_solid.LanguageIcon, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Toggle language" })
|
|
39
|
+
] }) }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuContent, { align: "end", children: locales.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
+
import_dropdown_menu.DropdownMenuItem,
|
|
42
|
+
{
|
|
43
|
+
onClick: () => handleLocaleChange(locale),
|
|
44
|
+
children: locale
|
|
45
|
+
},
|
|
46
|
+
locale
|
|
47
|
+
)) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
LangButton
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=langbutton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/langbutton/langbutton.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { LanguageIcon } from '@heroicons/react/20/solid'\nconst locales = ['en', 'de']\n\nexport function LangButton({ cookies }: { cookies: any }) {\n const handleLocaleChange = (locale: string) => {\n cookies.set('NEXT_LOCALE', locale)\n window.location.reload()\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <LanguageIcon className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all\" />\n <span className=\"sr-only\">Toggle language</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\">\n {locales.map((locale) => (\n <DropdownMenuItem\n key={locale}\n onClick={() => handleLocaleChange(locale)}\n >\n {locale}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBQ;AAnBR,2BAKO;AACP,oBAAuB;AACvB,mBAA6B;AAC7B,MAAM,UAAU,CAAC,MAAM,IAAI;AAEpB,SAAS,WAAW,EAAE,QAAQ,GAAqB;AACxD,QAAM,qBAAqB,CAAC,WAAmB;AAC7C,YAAQ,IAAI,eAAe,MAAM;AACjC,WAAO,SAAS,OAAO;AAAA,EACzB;AAEA,SACE,6CAAC,qCACC;AAAA,gDAAC,4CAAoB,SAAO,MAC1B,uDAAC,wBAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,kDAAC,6BAAa,WAAU,2DAA0D;AAAA,MAClF,4CAAC,UAAK,WAAU,WAAU,6BAAe;AAAA,OAC3C,GACF;AAAA,IAEA,4CAAC,4CAAoB,OAAM,OACxB,kBAAQ,IAAI,CAAC,WACZ;AAAA,MAAC;AAAA;AAAA,QAEC,SAAS,MAAM,mBAAmB,MAAM;AAAA,QAEvC;AAAA;AAAA,MAHI;AAAA,IAIP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"langbutton.d.ts","sourceRoot":"","sources":["../../../../components/header/langbutton/langbutton.tsx"],"names":[],"mappings":"AAcA,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,2CA2BvD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import {
|
|
4
|
+
DropdownMenu,
|
|
5
|
+
DropdownMenuContent,
|
|
6
|
+
DropdownMenuItem,
|
|
7
|
+
DropdownMenuTrigger
|
|
8
|
+
} from "../../ui/dropdown-menu";
|
|
9
|
+
import { Button } from "../../ui/button";
|
|
10
|
+
import { LanguageIcon } from "@heroicons/react/20/solid";
|
|
11
|
+
const locales = ["en", "de"];
|
|
12
|
+
function LangButton({ cookies }) {
|
|
13
|
+
const handleLocaleChange = (locale) => {
|
|
14
|
+
cookies.set("NEXT_LOCALE", locale);
|
|
15
|
+
window.location.reload();
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(LanguageIcon, { className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all" }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle language" })
|
|
21
|
+
] }) }),
|
|
22
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: locales.map((locale) => /* @__PURE__ */ jsx(
|
|
23
|
+
DropdownMenuItem,
|
|
24
|
+
{
|
|
25
|
+
onClick: () => handleLocaleChange(locale),
|
|
26
|
+
children: locale
|
|
27
|
+
},
|
|
28
|
+
locale
|
|
29
|
+
)) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
LangButton
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=langbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../components/header/langbutton/langbutton.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu'\nimport { Button } from '../../ui/button'\nimport { LanguageIcon } from '@heroicons/react/20/solid'\nconst locales = ['en', 'de']\n\nexport function LangButton({ cookies }: { cookies: any }) {\n const handleLocaleChange = (locale: string) => {\n cookies.set('NEXT_LOCALE', locale)\n window.location.reload()\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"h-9 w-9\">\n <LanguageIcon className=\"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all\" />\n <span className=\"sr-only\">Toggle language</span>\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"end\">\n {locales.map((locale) => (\n <DropdownMenuItem\n key={locale}\n onClick={() => handleLocaleChange(locale)}\n >\n {locale}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n"],"mappings":";AAuBQ,SACE,KADF;AAnBR;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,MAAM,UAAU,CAAC,MAAM,IAAI;AAEpB,SAAS,WAAW,EAAE,QAAQ,GAAqB;AACxD,QAAM,qBAAqB,CAAC,WAAmB;AAC7C,YAAQ,IAAI,eAAe,MAAM;AACjC,WAAO,SAAS,OAAO;AAAA,EACzB;AAEA,SACE,qBAAC,gBACC;AAAA,wBAAC,uBAAoB,SAAO,MAC1B,+BAAC,UAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,WAC5C;AAAA,0BAAC,gBAAa,WAAU,2DAA0D;AAAA,MAClF,oBAAC,UAAK,WAAU,WAAU,6BAAe;AAAA,OAC3C,GACF;AAAA,IAEA,oBAAC,uBAAoB,OAAM,OACxB,kBAAQ,IAAI,CAAC,WACZ;AAAA,MAAC;AAAA;AAAA,QAEC,SAAS,MAAM,mBAAmB,MAAM;AAAA,QAEvC;AAAA;AAAA,MAHI;AAAA,IAIP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|