@iqual/nuxt-icms 1.0.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/app.config.ts +1 -0
- package/app.vue +50 -0
- package/assets/css/backend.css +82 -0
- package/assets/css/ckeditor.css +15 -0
- package/assets/css/components/carousel.css +91 -0
- package/assets/css/components/ck-content.css +65 -0
- package/assets/css/components/container.css +17 -0
- package/assets/css/components/dialog.css +9 -0
- package/assets/css/components/grid-container.css +296 -0
- package/assets/css/components/link.css +21 -0
- package/assets/css/fe-fixes.css +105 -0
- package/assets/css/tailwind.css +104 -0
- package/assets/css/typography.css +67 -0
- package/assets/symbols/chevron-down.svg +1 -0
- package/assets/symbols/chevron-right.svg +3 -0
- package/assets/symbols/close.svg +3 -0
- package/assets/symbols/facebook.svg +3 -0
- package/assets/symbols/instagram.svg +13 -0
- package/assets/symbols/linkedin.svg +4 -0
- package/assets/symbols/logo.svg +22 -0
- package/assets/symbols/magnifyingglass.svg +4 -0
- package/assets/symbols/pinterest.svg +4 -0
- package/assets/symbols/play.svg +6 -0
- package/assets/symbols/tiktok.svg +4 -0
- package/assets/symbols/x.svg +4 -0
- package/bundles.ts +50 -0
- package/components/Blokkli/Button/Element/icon.svg +4 -0
- package/components/Blokkli/Button/Element/index.vue +18 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/CallToAction/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/CallToAction/icon.svg +5 -0
- package/components/Blokkli/CallToAction/index.vue +15 -0
- package/components/Blokkli/Card/Element/icon.svg +6 -0
- package/components/Blokkli/Card/Element/index.vue +14 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-large-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Card/Layout/icon-blokkli-option-small-spacing.svg +1 -0
- package/components/Blokkli/Card/Layout/icon.svg +8 -0
- package/components/Blokkli/Card/Layout/index.vue +15 -0
- package/components/Blokkli/Contact/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Contact/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Contact/icon.svg +5 -0
- package/components/Blokkli/Contact/index.vue +15 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Downloads/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Downloads/icon.svg +5 -0
- package/components/Blokkli/Downloads/index.vue +16 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-large-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon-blokkli-option-small-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Element/icon.svg +3 -0
- package/components/Blokkli/FAQ/Element/index.vue +14 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/FAQ/Layout/icon.svg +5 -0
- package/components/Blokkli/FAQ/Layout/index.vue +20 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/FlipTeasers/icon.svg +7 -0
- package/components/Blokkli/FlipTeasers/index.vue +15 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Gallery/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Gallery/icon.svg +5 -0
- package/components/Blokkli/Gallery/index.vue +16 -0
- package/components/Blokkli/HeroImage/icon.svg +5 -0
- package/components/Blokkli/HeroImage/index.vue +15 -0
- package/components/Blokkli/IconText/Element/icon.svg +5 -0
- package/components/Blokkli/IconText/Element/index.vue +14 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/IconText/Layout/icon.svg +7 -0
- package/components/Blokkli/IconText/Layout/index.vue +20 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Introduction/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Introduction/icon.svg +5 -0
- package/components/Blokkli/Introduction/index.vue +20 -0
- package/components/Blokkli/Logo/Element/icon.svg +6 -0
- package/components/Blokkli/Logo/Element/index.vue +14 -0
- package/components/Blokkli/Media/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Media/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Media/icon.svg +8 -0
- package/components/Blokkli/Media/index.vue +15 -0
- package/components/Blokkli/Partnerships/Element/icon.svg +3 -0
- package/components/Blokkli/Partnerships/Element/index.vue +13 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Partnerships/Layout/icon.svg +5 -0
- package/components/Blokkli/Partnerships/Layout/index.vue +15 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/SingleTestimonial/icon.svg +5 -0
- package/components/Blokkli/SingleTestimonial/index.vue +20 -0
- package/components/Blokkli/Table/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Table/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Table/icon.svg +5 -0
- package/components/Blokkli/Table/index.vue +15 -0
- package/components/Blokkli/Tabs/Element/icon.svg +3 -0
- package/components/Blokkli/Tabs/Element/index.vue +14 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Tabs/Layout/icon.svg +5 -0
- package/components/Blokkli/Tabs/Layout/index.vue +20 -0
- package/components/Blokkli/Team/Element/icon.svg +3 -0
- package/components/Blokkli/Team/Element/index.vue +14 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Team/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Team/Layout/icon.svg +5 -0
- package/components/Blokkli/Team/Layout/index.vue +15 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Teasers/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Teasers/icon.svg +6 -0
- package/components/Blokkli/Teasers/index.vue +15 -0
- package/components/Blokkli/Testimonial/Element/icon.svg +3 -0
- package/components/Blokkli/Testimonial/Element/index.vue +14 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Testimonial/Layout/icon.svg +5 -0
- package/components/Blokkli/Testimonial/Layout/index.vue +15 -0
- package/components/Blokkli/Text/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/Text/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/Text/icon.svg +7 -0
- package/components/Blokkli/Text/index.vue +21 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/TextMedia/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/TextMedia/icon.svg +5 -0
- package/components/Blokkli/TextMedia/index.vue +22 -0
- package/components/Blokkli/TwoColumnText/Element/icon.svg +8 -0
- package/components/Blokkli/TwoColumnText/Element/index.vue +15 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/TwoColumnText/Layout/icon.svg +10 -0
- package/components/Blokkli/TwoColumnText/Layout/index.vue +18 -0
- package/components/Blokkli/iFrame/Element/icon.svg +5 -0
- package/components/Blokkli/iFrame/Element/index.vue +14 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-large-spacing-bottom.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-large-spacing-top.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-no-spacing.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-small-spacing-bottom.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon-blokkli-option-small-spacing-top.svg +1 -0
- package/components/Blokkli/iFrame/Layout/icon.svg +7 -0
- package/components/Blokkli/iFrame/Layout/index.vue +18 -0
- package/components/DesignSystem/Atoms/Button.vue +144 -0
- package/components/DesignSystem/Atoms/Container.vue +54 -0
- package/components/DesignSystem/Atoms/GridRow.vue +13 -0
- package/components/DesignSystem/Molecules/ButtonGroup.vue +45 -0
- package/components/DesignSystem/Molecules/Card.vue +70 -0
- package/components/DesignSystem/Molecules/IconText.vue +62 -0
- package/components/DesignSystem/Molecules/MediaSlider.vue +72 -0
- package/components/DesignSystem/Molecules/Partnership.vue +40 -0
- package/components/DesignSystem/Molecules/Table.vue +170 -0
- package/components/DesignSystem/Molecules/TitleComposition.vue +66 -0
- package/components/DesignSystem/Molecules/iFrame.vue +22 -0
- package/components/DesignSystem/Organisms/ContentBlock.vue +82 -0
- package/components/DesignSystem/Organisms/FlipTeaser.vue +160 -0
- package/components/DesignSystem/Organisms/LogoElement.vue +37 -0
- package/components/DesignSystem/Organisms/TeamElement.vue +89 -0
- package/components/DesignSystem/Organisms/TeaserCard.vue +74 -0
- package/components/DesignSystem/Organisms/Testimonial.vue +53 -0
- package/components/DesignSystem/Organisms/TwoColumnTextElement.vue +42 -0
- package/components/Drupal/Breadcrumb/fragment.breadcrumb.graphql +6 -0
- package/components/Drupal/Breadcrumb/index.vue +88 -0
- package/components/Drupal/Messages/index.vue +29 -0
- package/components/Drupal/Webform/fragment.graphql +86 -0
- package/components/Drupal/Webform/index.vue +174 -0
- package/components/Drupal/Webform/mutation.graphql +8 -0
- package/components/Drupal/Webform/query.graphql +21 -0
- package/components/Form/CheckboxInput.vue +35 -0
- package/components/Form/CheckboxInputs.vue +44 -0
- package/components/Form/FileUploadInput.vue +34 -0
- package/components/Form/RadioButtonsInput.vue +44 -0
- package/components/Form/SelectInput.vue +54 -0
- package/components/Form/SubmitButton.vue +12 -0
- package/components/Form/TextAreaInput.vue +34 -0
- package/components/Form/TextEmailInput.vue +35 -0
- package/components/Form/TextInput.vue +35 -0
- package/components/Form/TextPhoneInput.vue +35 -0
- package/components/Form/WebformMarkup.vue +9 -0
- package/components/Form/composables/useFormElement.ts +84 -0
- package/components/Form/utils/types.ts +64 -0
- package/components/Media/Icon/fragment.mediaIcon.graphql +9 -0
- package/components/Media/Icon/index.vue +16 -0
- package/components/Media/Image/fragment.graphql +11 -0
- package/components/Media/Image/index.vue +215 -0
- package/components/Media/RemoteVideo/fragment.graphql +27 -0
- package/components/Media/RemoteVideo/index.vue +58 -0
- package/components/Media/Video/fragment.graphql +17 -0
- package/components/Media/Video/index.vue +44 -0
- package/components/Media/fragment.graphql +8 -0
- package/components/Media/index.vue +33 -0
- package/components/Node/Icms/Page/fragment.graphql +17 -0
- package/components/Node/Icms/Page/index.vue +14 -0
- package/components/Paragraph/Button/Element/fragment.graphql +14 -0
- package/components/Paragraph/Button/Element/index.vue +23 -0
- package/components/Paragraph/CallToAction/fragment.graphql +12 -0
- package/components/Paragraph/CallToAction/index.vue +60 -0
- package/components/Paragraph/Card/Element/fragment.graphql +10 -0
- package/components/Paragraph/Card/Element/index.vue +19 -0
- package/components/Paragraph/Card/Layout/fragment.graphql +14 -0
- package/components/Paragraph/Card/Layout/index.vue +58 -0
- package/components/Paragraph/Contact/fragment.graphql +20 -0
- package/components/Paragraph/Contact/index.vue +60 -0
- package/components/Paragraph/Downloads/fragment.graphql +15 -0
- package/components/Paragraph/Downloads/index.vue +104 -0
- package/components/Paragraph/FAQ/Element/fragment.graphql +10 -0
- package/components/Paragraph/FAQ/Element/index.vue +66 -0
- package/components/Paragraph/FAQ/Layout/fragment.graphql +23 -0
- package/components/Paragraph/FAQ/Layout/index.vue +84 -0
- package/components/Paragraph/FlipTeasers/fragment.graphql +25 -0
- package/components/Paragraph/FlipTeasers/index.vue +59 -0
- package/components/Paragraph/Gallery/fragment.graphql +11 -0
- package/components/Paragraph/Gallery/index.vue +223 -0
- package/components/Paragraph/HeroImage/fragment.graphql +17 -0
- package/components/Paragraph/HeroImage/index.vue +147 -0
- package/components/Paragraph/IconText/Element/fragment.graphql +8 -0
- package/components/Paragraph/IconText/Element/index.vue +18 -0
- package/components/Paragraph/IconText/Layout/fragment.graphql +23 -0
- package/components/Paragraph/IconText/Layout/index.vue +76 -0
- package/components/Paragraph/Introduction/fragment.graphql +20 -0
- package/components/Paragraph/Introduction/index.vue +94 -0
- package/components/Paragraph/Logo/Element/fragment.graphql +11 -0
- package/components/Paragraph/Logo/Element/index.vue +17 -0
- package/components/Paragraph/Media/fragment.graphql +5 -0
- package/components/Paragraph/Media/index.vue +83 -0
- package/components/Paragraph/Partnerships/Element/fragment.graphql +11 -0
- package/components/Paragraph/Partnerships/Element/index.vue +14 -0
- package/components/Paragraph/Partnerships/Layout/fragment.graphql +17 -0
- package/components/Paragraph/Partnerships/Layout/index.vue +119 -0
- package/components/Paragraph/SingleTestimonial/fragment.graphql +24 -0
- package/components/Paragraph/SingleTestimonial/index.vue +79 -0
- package/components/Paragraph/Table/fragment.graphql +11 -0
- package/components/Paragraph/Table/index.vue +43 -0
- package/components/Paragraph/Tabs/Element/fragment.graphql +17 -0
- package/components/Paragraph/Tabs/Element/index.vue +78 -0
- package/components/Paragraph/Tabs/Layout/fragment.graphql +11 -0
- package/components/Paragraph/Tabs/Layout/index.vue +191 -0
- package/components/Paragraph/Team/Element/fragment.graphql +17 -0
- package/components/Paragraph/Team/Element/index.vue +23 -0
- package/components/Paragraph/Team/Layout/fragment.graphql +14 -0
- package/components/Paragraph/Team/Layout/index.vue +51 -0
- package/components/Paragraph/Teasers/fragment.graphql +25 -0
- package/components/Paragraph/Teasers/index.vue +58 -0
- package/components/Paragraph/Testimonial/Element/fragment.graphql +13 -0
- package/components/Paragraph/Testimonial/Element/index.vue +29 -0
- package/components/Paragraph/Testimonial/Layout/fragment.graphql +13 -0
- package/components/Paragraph/Testimonial/Layout/index.vue +109 -0
- package/components/Paragraph/Text/fragment.graphql +14 -0
- package/components/Paragraph/Text/index.vue +66 -0
- package/components/Paragraph/TextMedia/fragment.graphql +17 -0
- package/components/Paragraph/TextMedia/index.vue +125 -0
- package/components/Paragraph/TwoColumnText/Element/fragment.graphql +8 -0
- package/components/Paragraph/TwoColumnText/Element/index.vue +31 -0
- package/components/Paragraph/TwoColumnText/Layout/fragment.graphql +8 -0
- package/components/Paragraph/TwoColumnText/Layout/index.vue +25 -0
- package/components/Paragraph/fragment.paragraphsFieldItem.graphql +6 -0
- package/components/Paragraph/iFrame/Element/fragment.graphql +9 -0
- package/components/Paragraph/iFrame/Element/index.vue +16 -0
- package/components/Paragraph/iFrame/Layout/fragment.graphql +13 -0
- package/components/Paragraph/iFrame/Layout/index.vue +161 -0
- package/components/Section/Footer/index.vue +144 -0
- package/components/Section/Header/GlobalMenu.vue +337 -0
- package/components/Section/Header/LanguageDropdown.vue +105 -0
- package/components/Section/Header/MenuIcon.vue +171 -0
- package/components/Section/Header/MetaMenu.vue +57 -0
- package/components/Section/Header/SearchLink.vue +26 -0
- package/components/Section/Header/index.vue +205 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +26 -0
- package/components/ui/accordion/AccordionItem.vue +27 -0
- package/components/ui/accordion/AccordionTrigger.vue +41 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/button/Button.vue +26 -0
- package/components/ui/button/index.ts +36 -0
- package/components/ui/carousel/Carousel.vue +72 -0
- package/components/ui/carousel/CarouselContent.vue +30 -0
- package/components/ui/carousel/CarouselItem.vue +25 -0
- package/components/ui/carousel/CarouselNext.vue +33 -0
- package/components/ui/carousel/CarouselPrevious.vue +33 -0
- package/components/ui/carousel/index.ts +8 -0
- package/components/ui/carousel/interface.ts +24 -0
- package/components/ui/carousel/useCarousel.ts +66 -0
- package/components/ui/checkbox/Checkbox.vue +34 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/dialog/Dialog.vue +19 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +53 -0
- package/components/ui/dialog/DialogDescription.vue +30 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +66 -0
- package/components/ui/dialog/DialogTitle.vue +28 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +24 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +29 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +27 -0
- package/components/ui/radio-group/RadioGroupItem.vue +41 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/select/Select.vue +15 -0
- package/components/ui/select/SelectContent.vue +54 -0
- package/components/ui/select/SelectGroup.vue +21 -0
- package/components/ui/select/SelectItem.vue +46 -0
- package/components/ui/select/SelectItemText.vue +12 -0
- package/components/ui/select/SelectLabel.vue +14 -0
- package/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/components/ui/select/SelectSeparator.vue +19 -0
- package/components/ui/select/SelectTrigger.vue +33 -0
- package/components/ui/select/SelectValue.vue +12 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +29 -0
- package/components/ui/tabs/TabsList.vue +27 -0
- package/components/ui/tabs/TabsTrigger.vue +33 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +24 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components.json +18 -0
- package/composables/breadcrumb.ts +42 -0
- package/composables/languageLinks.ts +31 -0
- package/composables/query.initData.graphql +102 -0
- package/composables/useAccordionScroll.ts +30 -0
- package/composables/useChildTitleWeight.ts +13 -0
- package/composables/useCn.ts +7 -0
- package/composables/useCurrentLangcodeEnum.ts +18 -0
- package/composables/useDrupalMessages.ts +41 -0
- package/composables/useDrupalUser.ts +11 -0
- package/composables/useInitData.ts +118 -0
- package/composables/useIsMobile.ts +14 -0
- package/composables/useMainMenuLinks.ts +69 -0
- package/composables/useMetaMenuLinks.ts +44 -0
- package/composables/useNavigationOffset.ts +14 -0
- package/config/graphqlMiddleware/index.ts +41 -0
- package/config/multiCache/index.ts +28 -0
- package/config/postcss-drupal/postcss.config.cjs +14 -0
- package/config/runtimeConfig.ts +12 -0
- package/error.vue +39 -0
- package/eslint.config.mjs +111 -0
- package/formkit.config.ts +56 -0
- package/formkit.theme.ts +5000 -0
- package/layouts/default.vue +66 -0
- package/layouts/error.vue +98 -0
- package/layouts/library.vue +5 -0
- package/modules/dynamicNodeResolver.ts +95 -0
- package/modules/dynamicParagraphResolver.ts +69 -0
- package/nuxt.config.ts +551 -0
- package/package.json +64 -0
- package/pages/[...slug]/index.vue +27 -0
- package/pages/__tests__/index.ts +77 -0
- package/pages/blokkli/library-item/[uuid].vue +52 -0
- package/pages/blokkli/library-item/query.library.graphql +21 -0
- package/pages/index.vue +27 -0
- package/pages/node/[nid]/index.vue +25 -0
- package/pages/search/index.vue +69 -0
- package/pages/static-page/example.vue +40 -0
- package/plugins/clickaway.ts +12 -0
- package/plugins/drupalUser.ts +33 -0
- package/plugins/graphqlMiddleware.ts +115 -0
- package/queries/blokkli.graphql +5 -0
- package/queries/fragment.blokkliProps.graphql +8 -0
- package/queries/fragment.routeQuery.graphql +51 -0
- package/queries/query.drupalUser.graphql +10 -0
- package/server/api/content-search/index.ts +160 -0
- package/server/api/icon/[...params].ts +199 -0
- package/server/graphqlMiddleware.serverOptions.ts +87 -0
- package/server/helpers/index.ts +32 -0
- package/server/helpers/request.ts +44 -0
- package/server/middleware/spa.ts +45 -0
- package/server/multiCache.serverOptions.ts +32 -0
- package/server/tsconfig.json +3 -0
- package/server/utils/cacheability.ts +138 -0
- package/shims-vue.d.ts +5 -0
- package/tailwind.config.ts +228 -0
- package/vitest.config.mts +28 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<header
|
|
3
|
+
ref="container"
|
|
4
|
+
class="z-30 flex flex-col bg-white"
|
|
5
|
+
:class="{
|
|
6
|
+
'max-h-[70px] !overflow-y-hidden lg:max-h-screen lg:!overflow-y-visible':
|
|
7
|
+
!isMenuOpen,
|
|
8
|
+
'max-h-screen overflow-y-auto': isMenuOpen,
|
|
9
|
+
'fixed size-full max-h-dvh': isGlobalSticky,
|
|
10
|
+
sticky: !isGlobalSticky,
|
|
11
|
+
}"
|
|
12
|
+
:style="computedStyle"
|
|
13
|
+
>
|
|
14
|
+
<!-- Meta menu full-width container -->
|
|
15
|
+
<!-- Hidden on mobile -->
|
|
16
|
+
<div class="hidden border-b-1 border-b-gray-100 lg:block">
|
|
17
|
+
<!-- Meta menu container -->
|
|
18
|
+
<div
|
|
19
|
+
ref="metaRef"
|
|
20
|
+
class="container flex max-w-full items-center justify-end py-4"
|
|
21
|
+
>
|
|
22
|
+
<!-- Meta menu -->
|
|
23
|
+
<SectionHeaderMetaMenu :links="metaLinks" />
|
|
24
|
+
|
|
25
|
+
<!-- Desktop Language dropdown -->
|
|
26
|
+
<SectionHeaderLanguageDropdown
|
|
27
|
+
class="hidden h-full lg:block"
|
|
28
|
+
@lang-dropdown:change="closeMenu"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<!-- Main menu full-width container -->
|
|
34
|
+
<div class="h-[70px] shrink-0 border-b-1 border-b-gray-100 lg:h-[110px]">
|
|
35
|
+
<!-- Main menu container -->
|
|
36
|
+
<div
|
|
37
|
+
class="container flex h-full max-w-full items-center justify-between lg:justify-start"
|
|
38
|
+
>
|
|
39
|
+
<!-- Logo -->
|
|
40
|
+
<NuxtLink
|
|
41
|
+
:to="`/${currentLanguage}`"
|
|
42
|
+
:title="globalConfig.companyName"
|
|
43
|
+
prefetch
|
|
44
|
+
>
|
|
45
|
+
<Media
|
|
46
|
+
v-if="companyLogo"
|
|
47
|
+
:media="companyLogo"
|
|
48
|
+
mediaClass="h-10 lg:h-16"
|
|
49
|
+
/>
|
|
50
|
+
</NuxtLink>
|
|
51
|
+
|
|
52
|
+
<!-- Desktop Main navigation menu -->
|
|
53
|
+
<!-- Hidden on mobile -->
|
|
54
|
+
<SectionHeaderGlobalMenu
|
|
55
|
+
class="ml-auto hidden lg:block"
|
|
56
|
+
@menu:link-click="closeMenu"
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
<!-- Desktop Contact button -->
|
|
60
|
+
<!-- Hidden on mobile -->
|
|
61
|
+
<div
|
|
62
|
+
v-if="contactButtons?.length"
|
|
63
|
+
class="ml-8 hidden items-center justify-center gap-8 lg:flex"
|
|
64
|
+
>
|
|
65
|
+
<DesignSystemAtomsButton
|
|
66
|
+
v-for="contactButton in contactButtons"
|
|
67
|
+
:key="contactButton.uuid"
|
|
68
|
+
:label="contactButton?.props?.label"
|
|
69
|
+
:subline="contactButton?.props?.subline"
|
|
70
|
+
:title="contactButton?.props?.title"
|
|
71
|
+
:link="contactButton?.props?.link?.uri?.path"
|
|
72
|
+
:params="contactButton?.props?.params"
|
|
73
|
+
:targetBlank="contactButton?.props?.targetBlank"
|
|
74
|
+
:style="contactButton?.props?.buttonStyle"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<!-- Hamburger menu -->
|
|
79
|
+
<!-- Hidden on desktop -->
|
|
80
|
+
<button
|
|
81
|
+
class="flex items-center gap-3 leading-none lg:hidden"
|
|
82
|
+
aria-label="Hamburger Menu"
|
|
83
|
+
@click="toggleNav"
|
|
84
|
+
>
|
|
85
|
+
<span
|
|
86
|
+
class="h-auto leading-none opacity-100"
|
|
87
|
+
:class="{
|
|
88
|
+
'opacity-0 transition-all duration-250 ease-in-out': isMenuOpen,
|
|
89
|
+
}"
|
|
90
|
+
/>
|
|
91
|
+
<SectionHeaderMenuIcon :is-in-closable-state="isMenuOpen" />
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<!-- Mobile Main/Meta menu container -->
|
|
97
|
+
<!-- Hidden on desktop -->
|
|
98
|
+
<!-- Initially hidden by overflow when menu closed -->
|
|
99
|
+
<div class="container max-w-full lg:hidden">
|
|
100
|
+
<!-- Mobile Main navigation menu -->
|
|
101
|
+
<SectionHeaderGlobalMenu @menu:link-click="closeMenu" />
|
|
102
|
+
|
|
103
|
+
<!-- Mobile Language dropdown -->
|
|
104
|
+
<SectionHeaderLanguageDropdown @lang-dropdown:change="closeMenu" />
|
|
105
|
+
|
|
106
|
+
<!-- Mobile Meta menu -->
|
|
107
|
+
<SectionHeaderMetaMenu
|
|
108
|
+
:links="metaLinks"
|
|
109
|
+
@lang-dropdown:change="closeMenu"
|
|
110
|
+
/>
|
|
111
|
+
|
|
112
|
+
<!-- Mobile Contact button -->
|
|
113
|
+
<div v-if="contactButtons?.length" class="flex gap-8 lg:ml-8">
|
|
114
|
+
<DesignSystemAtomsButton
|
|
115
|
+
v-for="contactButton in contactButtons"
|
|
116
|
+
:key="contactButton.uuid"
|
|
117
|
+
:label="contactButton?.props?.label"
|
|
118
|
+
:subline="contactButton?.props?.subline"
|
|
119
|
+
:title="contactButton?.props?.title"
|
|
120
|
+
:link="contactButton?.props?.link?.uri?.path"
|
|
121
|
+
:params="contactButton?.props?.params"
|
|
122
|
+
:targetBlank="contactButton?.props?.targetBlank"
|
|
123
|
+
:style="contactButton?.props?.buttonStyle"
|
|
124
|
+
/>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</header>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<script lang="ts" setup>
|
|
131
|
+
const initData: Ref<InitData> = await useInitData()
|
|
132
|
+
const { globalConfig } = initData.value
|
|
133
|
+
const { companyLogo, contactButtons, metaLinks } = globalConfig
|
|
134
|
+
|
|
135
|
+
const container = ref<HTMLElement | null>(null)
|
|
136
|
+
const metaRef = useTemplateRef('metaRef')
|
|
137
|
+
const metaHeight = ref<number | null>()
|
|
138
|
+
const isGlobalSticky = ref(false)
|
|
139
|
+
const isMenuOpen = ref(false)
|
|
140
|
+
const isMetaHidden = ref(false)
|
|
141
|
+
const viewport = useViewport()
|
|
142
|
+
const { isMobile } = useIsMobile()
|
|
143
|
+
const currentLanguage = useCurrentLanguage()
|
|
144
|
+
const drupalUser = useDrupalUser()
|
|
145
|
+
const isUserLoggedIn = drupalUser.value.accessToolbar
|
|
146
|
+
|
|
147
|
+
onMounted(() => {
|
|
148
|
+
if (metaRef.value) {
|
|
149
|
+
metaHeight.value = metaRef.value.getBoundingClientRect().height
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
const computedStyle = computed(() => {
|
|
154
|
+
let style = null
|
|
155
|
+
if (!isMobile.value && isUserLoggedIn) {
|
|
156
|
+
style = { top: `-${metaHeight.value}px` }
|
|
157
|
+
} else {
|
|
158
|
+
style = { top: 0 }
|
|
159
|
+
}
|
|
160
|
+
return style
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
const emit = defineEmits([
|
|
164
|
+
'menu:open',
|
|
165
|
+
'menu:close:start',
|
|
166
|
+
'menu:close:finished',
|
|
167
|
+
])
|
|
168
|
+
|
|
169
|
+
function toggleNav() {
|
|
170
|
+
if (!isMenuOpen.value) {
|
|
171
|
+
openMenu()
|
|
172
|
+
} else {
|
|
173
|
+
closeMenu()
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function openMenu() {
|
|
178
|
+
emit('menu:open')
|
|
179
|
+
isMenuOpen.value = true
|
|
180
|
+
isGlobalSticky.value = true
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function closeMenu() {
|
|
184
|
+
emit('menu:close:start')
|
|
185
|
+
isMenuOpen.value = false
|
|
186
|
+
if (container.value) {
|
|
187
|
+
container.value.scrollTop = 0
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
emit('menu:close:finished')
|
|
192
|
+
isGlobalSticky.value = false
|
|
193
|
+
}, 250)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function hideMeta() {
|
|
197
|
+
isMetaHidden.value = true
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
watch(viewport.breakpoint, (newValue: string) => {
|
|
201
|
+
if (newValue === 'md' || newValue === 'lg' || newValue === 'xl') {
|
|
202
|
+
isMenuOpen.value = false
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
AccordionRoot,
|
|
4
|
+
type AccordionRootEmits,
|
|
5
|
+
type AccordionRootProps,
|
|
6
|
+
useForwardPropsEmits,
|
|
7
|
+
} from 'radix-vue'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<AccordionRootProps>()
|
|
10
|
+
const emits = defineEmits<AccordionRootEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<AccordionRoot v-bind="forwarded">
|
|
17
|
+
<slot />
|
|
18
|
+
</AccordionRoot>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import { AccordionContent, type AccordionContentProps } from 'radix-vue'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<
|
|
7
|
+
AccordionContentProps & { class?: HTMLAttributes['class'] }
|
|
8
|
+
>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = computed(() => {
|
|
11
|
+
const { class: _, ...delegated } = props
|
|
12
|
+
|
|
13
|
+
return delegated
|
|
14
|
+
})
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<AccordionContent
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
class="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
21
|
+
>
|
|
22
|
+
<div :class="cn('pb-4 pt-0', props.class)">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</AccordionContent>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import {
|
|
4
|
+
AccordionItem,
|
|
5
|
+
type AccordionItemProps,
|
|
6
|
+
useForwardProps,
|
|
7
|
+
} from 'radix-vue'
|
|
8
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<
|
|
11
|
+
AccordionItemProps & { class?: HTMLAttributes['class'] }
|
|
12
|
+
>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = computed(() => {
|
|
15
|
+
const { class: _, ...delegated } = props
|
|
16
|
+
|
|
17
|
+
return delegated
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<AccordionItem v-bind="forwardedProps" :class="cn('border-b', props.class)">
|
|
25
|
+
<slot />
|
|
26
|
+
</AccordionItem>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from '@/lib/utils'
|
|
3
|
+
import { ChevronDown } from 'lucide-vue-next'
|
|
4
|
+
import {
|
|
5
|
+
AccordionHeader,
|
|
6
|
+
AccordionTrigger,
|
|
7
|
+
type AccordionTriggerProps,
|
|
8
|
+
} from 'radix-vue'
|
|
9
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<
|
|
12
|
+
AccordionTriggerProps & { class?: HTMLAttributes['class'] }
|
|
13
|
+
>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = computed(() => {
|
|
16
|
+
const { class: _, ...delegated } = props
|
|
17
|
+
|
|
18
|
+
return delegated
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AccordionHeader class="flex">
|
|
24
|
+
<AccordionTrigger
|
|
25
|
+
v-bind="delegatedProps"
|
|
26
|
+
:class="
|
|
27
|
+
cn(
|
|
28
|
+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
29
|
+
props.class,
|
|
30
|
+
)
|
|
31
|
+
"
|
|
32
|
+
>
|
|
33
|
+
<slot />
|
|
34
|
+
<slot name="icon">
|
|
35
|
+
<ChevronDown
|
|
36
|
+
class="h-4 w-4 shrink-0 transition-transform duration-200"
|
|
37
|
+
/>
|
|
38
|
+
</slot>
|
|
39
|
+
</AccordionTrigger>
|
|
40
|
+
</AccordionHeader>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
import { Primitive, type PrimitiveProps } from 'radix-vue'
|
|
5
|
+
import { type ButtonVariants, buttonVariants } from '.'
|
|
6
|
+
|
|
7
|
+
interface Props extends PrimitiveProps {
|
|
8
|
+
variant?: ButtonVariants['variant']
|
|
9
|
+
size?: ButtonVariants['size']
|
|
10
|
+
class?: HTMLAttributes['class']
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
as: 'button',
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<Primitive
|
|
20
|
+
:as="as"
|
|
21
|
+
:as-child="asChild"
|
|
22
|
+
:class="cn(buttonVariants({ variant, size }), props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</Primitive>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
|
|
3
|
+
export { default as Button } from './Button.vue'
|
|
4
|
+
|
|
5
|
+
export const buttonVariants = cva(
|
|
6
|
+
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300',
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default:
|
|
11
|
+
'bg-gray-900 text-gray-50 shadow hover:bg-gray-900/90 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90',
|
|
12
|
+
destructive:
|
|
13
|
+
'bg-red-500 text-gray-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-gray-50 dark:hover:bg-red-900/90',
|
|
14
|
+
outline:
|
|
15
|
+
'border border-gray-200 bg-white shadow-sm hover:bg-gray-100 hover:text-gray-900 dark:border-gray-800 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50',
|
|
16
|
+
secondary:
|
|
17
|
+
'bg-gray-100 text-gray-900 shadow-sm hover:bg-gray-100/80 dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-800/80',
|
|
18
|
+
ghost:
|
|
19
|
+
'hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-50',
|
|
20
|
+
link: 'text-gray-900 underline-offset-4 hover:underline dark:text-gray-50',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: 'h-9 px-4 py-2',
|
|
24
|
+
sm: 'h-8 rounded-md px-3 text-xs',
|
|
25
|
+
lg: 'h-10 rounded-md px-8',
|
|
26
|
+
icon: 'h-9 w-9',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: 'default',
|
|
31
|
+
size: 'default',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
CarouselEmits,
|
|
4
|
+
CarouselProps,
|
|
5
|
+
WithClassAsProps,
|
|
6
|
+
} from './interface'
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
|
+
import { useProvideCarousel } from './useCarousel'
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<CarouselProps & WithClassAsProps>(), {
|
|
11
|
+
orientation: 'horizontal',
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<CarouselEmits>()
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
canScrollNext,
|
|
18
|
+
canScrollPrev,
|
|
19
|
+
carouselApi,
|
|
20
|
+
carouselRef,
|
|
21
|
+
orientation,
|
|
22
|
+
scrollNext,
|
|
23
|
+
scrollPrev,
|
|
24
|
+
} = useProvideCarousel(props, emits)
|
|
25
|
+
|
|
26
|
+
defineExpose({
|
|
27
|
+
canScrollNext,
|
|
28
|
+
canScrollPrev,
|
|
29
|
+
carouselApi,
|
|
30
|
+
carouselRef,
|
|
31
|
+
orientation,
|
|
32
|
+
scrollNext,
|
|
33
|
+
scrollPrev,
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
function onKeyDown(event: KeyboardEvent) {
|
|
37
|
+
const prevKey = props.orientation === 'vertical' ? 'ArrowUp' : 'ArrowLeft'
|
|
38
|
+
const nextKey = props.orientation === 'vertical' ? 'ArrowDown' : 'ArrowRight'
|
|
39
|
+
|
|
40
|
+
if (event.key === prevKey) {
|
|
41
|
+
event.preventDefault()
|
|
42
|
+
scrollPrev()
|
|
43
|
+
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (event.key === nextKey) {
|
|
48
|
+
event.preventDefault()
|
|
49
|
+
scrollNext()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<div
|
|
56
|
+
:class="cn('relative', props.class)"
|
|
57
|
+
role="region"
|
|
58
|
+
aria-roledescription="carousel"
|
|
59
|
+
tabindex="0"
|
|
60
|
+
@keydown="onKeyDown"
|
|
61
|
+
>
|
|
62
|
+
<slot
|
|
63
|
+
:can-scroll-next
|
|
64
|
+
:can-scroll-prev
|
|
65
|
+
:carousel-api
|
|
66
|
+
:carousel-ref
|
|
67
|
+
:orientation
|
|
68
|
+
:scroll-next
|
|
69
|
+
:scroll-prev
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { WithClassAsProps } from './interface'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
import { useCarousel } from './useCarousel'
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
const props = defineProps<WithClassAsProps>()
|
|
11
|
+
|
|
12
|
+
const { carouselRef, orientation } = useCarousel()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div ref="carouselRef" class="overflow-hidden">
|
|
17
|
+
<div
|
|
18
|
+
:class="
|
|
19
|
+
cn(
|
|
20
|
+
'flex',
|
|
21
|
+
orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',
|
|
22
|
+
props.class,
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
v-bind="$attrs"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { WithClassAsProps } from './interface'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
import { useCarousel } from './useCarousel'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<WithClassAsProps>()
|
|
7
|
+
|
|
8
|
+
const { orientation } = useCarousel()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div
|
|
13
|
+
role="group"
|
|
14
|
+
aria-roledescription="slide"
|
|
15
|
+
:class="
|
|
16
|
+
cn(
|
|
17
|
+
'min-w-0 shrink-0 grow-0 basis-full',
|
|
18
|
+
orientation === 'horizontal' ? 'pl-4' : 'pt-4',
|
|
19
|
+
props.class,
|
|
20
|
+
)
|
|
21
|
+
"
|
|
22
|
+
>
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { WithClassAsProps } from './interface'
|
|
3
|
+
import { Button } from '@iqual/nuxt-icms/components/ui/button'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
import { ArrowRight } from 'lucide-vue-next'
|
|
6
|
+
import { useCarousel } from './useCarousel'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<WithClassAsProps>()
|
|
9
|
+
|
|
10
|
+
const { orientation, canScrollNext, scrollNext } = useCarousel()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Button
|
|
15
|
+
:disabled="!canScrollNext"
|
|
16
|
+
:class="
|
|
17
|
+
cn(
|
|
18
|
+
'absolute h-8 w-8 touch-manipulation rounded-full p-0',
|
|
19
|
+
orientation === 'horizontal'
|
|
20
|
+
? '-right-12 top-1/2 -translate-y-1/2'
|
|
21
|
+
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
22
|
+
props.class,
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
variant="outline"
|
|
26
|
+
@click="scrollNext"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<ArrowRight class="h-4 w-4 text-current" />
|
|
30
|
+
<span class="sr-only">Next Slide</span>
|
|
31
|
+
</slot>
|
|
32
|
+
</Button>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { WithClassAsProps } from './interface'
|
|
3
|
+
import { Button } from '@iqual/nuxt-icms/components/ui/button'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
import { ArrowLeft } from 'lucide-vue-next'
|
|
6
|
+
import { useCarousel } from './useCarousel'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<WithClassAsProps>()
|
|
9
|
+
|
|
10
|
+
const { orientation, canScrollPrev, scrollPrev } = useCarousel()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<Button
|
|
15
|
+
:disabled="!canScrollPrev"
|
|
16
|
+
:class="
|
|
17
|
+
cn(
|
|
18
|
+
'absolute h-8 w-8 touch-manipulation rounded-full p-0',
|
|
19
|
+
orientation === 'horizontal'
|
|
20
|
+
? '-left-12 top-1/2 -translate-y-1/2'
|
|
21
|
+
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
22
|
+
props.class,
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
variant="outline"
|
|
26
|
+
@click="scrollPrev"
|
|
27
|
+
>
|
|
28
|
+
<slot>
|
|
29
|
+
<ArrowLeft class="h-4 w-4 text-current" />
|
|
30
|
+
<span class="sr-only">Previous Slide</span>
|
|
31
|
+
</slot>
|
|
32
|
+
</Button>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Carousel } from './Carousel.vue'
|
|
2
|
+
export { default as CarouselContent } from './CarouselContent.vue'
|
|
3
|
+
export { default as CarouselItem } from './CarouselItem.vue'
|
|
4
|
+
export { default as CarouselNext } from './CarouselNext.vue'
|
|
5
|
+
export { default as CarouselPrevious } from './CarouselPrevious.vue'
|
|
6
|
+
export type { UnwrapRefCarouselApi as CarouselApi } from './interface'
|
|
7
|
+
|
|
8
|
+
export { useCarousel } from './useCarousel'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type useEmblaCarousel from 'embla-carousel-vue'
|
|
2
|
+
import type { EmblaCarouselVueType } from 'embla-carousel-vue'
|
|
3
|
+
import type { HTMLAttributes, UnwrapRef } from 'vue'
|
|
4
|
+
|
|
5
|
+
type CarouselApi = EmblaCarouselVueType[1]
|
|
6
|
+
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
|
7
|
+
type CarouselOptions = UseCarouselParameters[0]
|
|
8
|
+
type CarouselPlugin = UseCarouselParameters[1]
|
|
9
|
+
|
|
10
|
+
export type UnwrapRefCarouselApi = UnwrapRef<CarouselApi>
|
|
11
|
+
|
|
12
|
+
export interface CarouselProps {
|
|
13
|
+
opts?: CarouselOptions
|
|
14
|
+
plugins?: CarouselPlugin
|
|
15
|
+
orientation?: 'horizontal' | 'vertical'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CarouselEmits {
|
|
19
|
+
(e: 'init-api', payload: UnwrapRefCarouselApi): void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface WithClassAsProps {
|
|
23
|
+
class?: HTMLAttributes['class']
|
|
24
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UnwrapRefCarouselApi as CarouselApi,
|
|
3
|
+
CarouselEmits,
|
|
4
|
+
CarouselProps,
|
|
5
|
+
} from './interface'
|
|
6
|
+
import { createInjectionState } from '@vueuse/core'
|
|
7
|
+
import emblaCarouselVue from 'embla-carousel-vue'
|
|
8
|
+
import { onMounted, ref } from 'vue'
|
|
9
|
+
|
|
10
|
+
const [useProvideCarousel, useInjectCarousel] = createInjectionState(
|
|
11
|
+
({ opts, orientation, plugins }: CarouselProps, emits: CarouselEmits) => {
|
|
12
|
+
const [emblaNode, emblaApi] = emblaCarouselVue(
|
|
13
|
+
{
|
|
14
|
+
...opts,
|
|
15
|
+
axis: orientation === 'horizontal' ? 'x' : 'y',
|
|
16
|
+
},
|
|
17
|
+
plugins,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
function scrollPrev() {
|
|
21
|
+
emblaApi.value?.scrollPrev()
|
|
22
|
+
}
|
|
23
|
+
function scrollNext() {
|
|
24
|
+
emblaApi.value?.scrollNext()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const canScrollNext = ref(false)
|
|
28
|
+
const canScrollPrev = ref(false)
|
|
29
|
+
|
|
30
|
+
function onSelect(api: CarouselApi) {
|
|
31
|
+
canScrollNext.value = api?.canScrollNext() || false
|
|
32
|
+
canScrollPrev.value = api?.canScrollPrev() || false
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
onMounted(() => {
|
|
36
|
+
if (!emblaApi.value) return
|
|
37
|
+
|
|
38
|
+
emblaApi.value?.on('init', onSelect)
|
|
39
|
+
emblaApi.value?.on('reInit', onSelect)
|
|
40
|
+
emblaApi.value?.on('select', onSelect)
|
|
41
|
+
|
|
42
|
+
emits('init-api', emblaApi.value)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
carouselRef: emblaNode,
|
|
47
|
+
carouselApi: emblaApi,
|
|
48
|
+
canScrollPrev,
|
|
49
|
+
canScrollNext,
|
|
50
|
+
scrollPrev,
|
|
51
|
+
scrollNext,
|
|
52
|
+
orientation,
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
function useCarousel() {
|
|
58
|
+
const carouselState = useInjectCarousel()
|
|
59
|
+
|
|
60
|
+
if (!carouselState)
|
|
61
|
+
throw new Error('useCarousel must be used within a <Carousel />')
|
|
62
|
+
|
|
63
|
+
return carouselState
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { useCarousel, useProvideCarousel }
|