srcdev-nuxt-components 9.1.49 → 9.1.50
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/.claude/settings.json +2 -4
- package/.claude/settings.local.json +22 -2
- package/.claude/skills/components/card-core.md +205 -0
- package/.claude/skills/components/display-dialog.md +128 -0
- package/.claude/skills/components/page-hero-highlights.md +1 -1
- package/.claude/skills/components/page-row.md +157 -0
- package/.claude/skills/components/services-card-grid.md +4 -4
- package/.claude/skills/components/services-section-grid.md +4 -4
- package/.claude/skills/components/tab-navigation.md +222 -0
- package/.claude/skills/composable-dialog-controls.md +55 -43
- package/.claude/skills/index.md +5 -2
- package/app/components/01.atoms/card/CONSUMER-STYLING.md +175 -0
- package/app/components/01.atoms/card/CardCore.vue +48 -21
- package/app/components/01.atoms/display-dialog/CONSUMER-STYLING.md +163 -0
- package/app/components/01.atoms/display-dialog/DisplayDialog.vue +277 -0
- package/app/components/01.atoms/display-dialog/stories/DisplayDialog.stories.ts +177 -0
- package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +264 -0
- package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +18 -0
- package/app/components/01.atoms/page-row/CONSUMER-STYLING.md +90 -0
- package/app/components/01.atoms/page-row/PageRow.vue +115 -0
- package/app/components/01.atoms/page-row/stories/PageRow.stories.ts +311 -0
- package/app/components/01.atoms/page-row/tests/PageRow.spec.ts +191 -0
- package/app/components/02.molecules/navigation/tab-navigation/CONSUMER-STYLING.md +145 -0
- package/app/components/02.molecules/navigation/tab-navigation/TabNavigation.vue +21 -11
- package/app/components/02.molecules/navigation/tab-navigation/tests/__snapshots__/TabNavigation.spec.ts.snap +12 -6
- package/app/components/{forms/ui → 05.forms/form-field}/FormField.vue +12 -19
- package/app/components/{forms/ui → 05.forms/form-wrapper}/FormWrapper.vue +6 -6
- package/app/components/{forms → 05.forms}/input-button/InputButtonCore.vue +2 -0
- package/app/components/{forms → 05.forms}/input-button/stories/InputButtonCore.stories.ts +1 -1
- package/app/components/{forms → 05.forms}/input-text/InputTextCore.vue +73 -73
- package/app/components/{forms → 05.forms}/input-text/variants/InputTextAsNumberWithLabel.vue +29 -29
- package/app/components/carousels/CarouselBasic.vue +99 -99
- package/app/components/carousels/CarouselInfinite.vue +150 -150
- package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +111 -111
- package/app/components/responsive-header/ResponsiveHeader.vue +250 -282
- package/app/components/test-storybook/TestStorybook.vue +16 -16
- package/app/composables/tests/useDialogControls.spec.ts +34 -64
- package/app/composables/useDialogControls.ts +19 -33
- package/app/composables/useFormControl.ts +0 -2
- package/app/layouts/default.vue +9 -7
- package/app/pages/auto-grid.vue +37 -20
- package/app/pages/banner-video.vue +2 -2
- package/app/pages/forms/examples/buttons/index.vue +189 -215
- package/app/pages/forms/examples/material/text-fields.vue +2 -2
- package/app/pages/grid-stack.vue +10 -10
- package/app/pages/index.vue +20 -20
- package/app/pages/samaritan.vue +4 -4
- package/app/pages/typography/hero-text.vue +6 -6
- package/app/pages/typography/index.vue +4 -4
- package/app/pages/typography/page-body.vue +4 -4
- package/app/pages/typography/page-heading.vue +4 -4
- package/app/pages/typography/page-link.vue +4 -4
- package/app/pages/ui/accordian.vue +4 -4
- package/app/pages/ui/anchor-scroll-tab-navigation.vue +77 -66
- package/app/pages/ui/anchor-scroll.vue +94 -70
- package/app/pages/ui/animated-svg-text.vue +4 -4
- package/app/pages/ui/block-decorators.vue +11 -11
- package/app/pages/ui/card-core.vue +9 -9
- package/app/pages/ui/carousel-basic.vue +4 -4
- package/app/pages/ui/carousel-flip.vue +2 -2
- package/app/pages/ui/carousel-infinite.vue +4 -4
- package/app/pages/ui/clipped-panels.vue +10 -10
- package/app/pages/ui/contact-section.vue +4 -4
- package/app/pages/ui/container-glow.vue +2 -3
- package/app/pages/ui/deep-expanding-menu.vue +138 -0
- package/app/pages/ui/display-avatar.vue +2 -2
- package/app/pages/ui/display-banner.vue +2 -2
- package/app/pages/ui/display-chip.vue +32 -25
- package/app/pages/ui/display-details.vue +6 -10
- package/app/pages/ui/display-dialog.vue +96 -131
- package/app/pages/ui/display-pill.vue +27 -33
- package/app/pages/ui/display-prompt.vue +4 -4
- package/app/pages/ui/display-toast.vue +2 -2
- package/app/pages/ui/expanding-panel.vue +12 -16
- package/app/pages/ui/glowing-border.vue +12 -12
- package/app/pages/ui/layout-grid-a.vue +6 -6
- package/app/pages/ui/layout-grid-b.vue +4 -4
- package/app/pages/ui/magnetic-navigation.vue +6 -6
- package/app/pages/ui/marquee-scroller.vue +2 -2
- package/app/pages/ui/mask-element.vue +2 -2
- package/app/pages/ui/masonry-columns.vue +4 -4
- package/app/pages/ui/masonry-grid-ordered-experiment.vue +4 -4
- package/app/pages/ui/masonry-grid-ordered.vue +4 -4
- package/app/pages/ui/masonry-grid-sorted.vue +4 -4
- package/app/pages/ui/masonry-grid.vue +4 -4
- package/app/pages/ui/navigation/navigation-horizontal.vue +12 -12
- package/app/pages/ui/navigation/tab-navigation.vue +493 -0
- package/app/pages/ui/page-row.vue +127 -0
- package/app/pages/ui/price-list.vue +4 -4
- package/app/pages/ui/profile-section.vue +4 -4
- package/app/pages/ui/qr-code/[componentName].vue +6 -6
- package/app/pages/ui/rotating-carousel.vue +16 -16
- package/app/pages/ui/scroll-reveal-image.vue +20 -20
- package/app/pages/ui/section-parallax.vue +7 -7
- package/app/pages/ui/services/colour-finder.vue +4 -4
- package/app/pages/ui/services/services-cards.vue +4 -4
- package/app/pages/ui/services/services-section/[slug].vue +4 -4
- package/app/pages/ui/services/services-sections-compact.vue +6 -6
- package/app/pages/ui/settings.vue +10 -10
- package/app/pages/ui/simple-grid.vue +2 -2
- package/app/pages/ui/slider-gallery.vue +5 -5
- package/app/pages/ui/tabs-y.vue +2 -3
- package/app/pages/ui/tabs.vue +6 -9
- package/app/pages/ui/tooltips.vue +9 -9
- package/app/pages/ui/wipe-away-vertical.vue +14 -14
- package/package.json +1 -1
- package/.claude/skills/components/layout-row.md +0 -239
- package/app/components/display-dialog/DisplayDialogCore.vue +0 -276
- package/app/components/display-dialog/variants/DisplayDialogConfirm.vue +0 -47
- package/app/components/display-dialog/variants/DisplayDialogScrollableContent.vue +0 -51
- package/app/components/forms/c12/utils.ts +0 -14
- package/app/components/layout-row/LayoutRow.vue +0 -171
- package/app/components/layout-row/stories/LayoutRow.stories.ts +0 -528
- package/app/pages/ui/layout-row.vue +0 -139
- /package/app/components/{forms → 05.forms}/form-errors/InputError.vue +0 -0
- /package/app/components/{forms → 05.forms}/form-errors/tests/InputError.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/form-fieldset/FormFieldset.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-secondary-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-icons-tertiary-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-primary-pending-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-secondary-pill-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/combo-tertiary-readonly-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-default-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-error-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-success-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-theme-warning-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-primary-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-secondary-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-variant-tertiary-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/default-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/nuxt-icon-only-component-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pending-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-pill-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/state-readonly-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-chromium-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-firefox-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/playwright/input-button-core.playwright.ts-snapshots/with-both-nuxt-icon-components-webkit-darwin.png +0 -0
- /package/app/components/{forms → 05.forms}/input-button/tests/InputButtonCore.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-button/tests/__snapshots__/InputButtonCore.spec.ts.snap +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox/MultipleCheckboxes.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox/SingleCheckbox.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox/tests/MultipleCheckboxes.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox/tests/data/tags.json +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioButton.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-checkbox-radio/tests/InputCheckboxRadioCore.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-copy/InputCopyCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-copy/stories/InputCopyCore.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-copy/tests/InputCopyCore.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-copy/tests/__snapshots__/InputCopyCore.spec.ts.snap +0 -0
- /package/app/components/{forms → 05.forms}/input-description/InputDescription.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-description/tests/InputDescription.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-label/InputLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-label/tests/InputLabel.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-number/InputNumberCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-number/variants/InputNumberDefault.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-radio/MultipleRadiobuttons.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-radio/tests/MultipleRadioButtons.spec.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-radio/tests/data/tags.json +0 -0
- /package/app/components/{forms → 05.forms}/input-range/InputRangeCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-range/variants/InputRangeDefault.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-range-fancy/InputRangeFancyCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-range-fancy/InputRangeFancyWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-select/InputSelectCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-select/variants/InputSelectWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-text/stories/InputPasswordWithLabel.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-text/stories/InputTextAsNumberWithLabel.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-text/stories/InputTextCore.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-text/stories/InputTextWithLabel.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-text/variants/InputPasswordWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-text/variants/InputTextWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-textarea/InputTextareaCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/input-textarea/stories/InputTextareaCore.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-textarea/stories/InputTextareaWithLabel.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/input-textarea/variants/InputTextareaWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/pending-effect/PendingEffect.vue +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/ToggleSwitchCore.vue +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchCore.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchWithLabel.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/stories/ToggleSwitchWithLabelInline.stories.ts +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/variants/ToggleSwitchWithLabel.vue +0 -0
- /package/app/components/{forms → 05.forms}/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +0 -0
- /package/app/components/{forms → 05.forms}/triple-toggle-switch/TripleToggleSwitchCore.vue +0 -0
- /package/app/{components/forms/c12/prop-validators/index.ts → utils/prop-validators.ts} +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Item {{ currentVisibleIndex + 1 }} of {{ itemCount }}
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
-
<
|
|
14
|
+
<PageRow tag="div" variant="full" :style-class-passthrough="['mbe-20']">
|
|
15
15
|
<div
|
|
16
16
|
tabindex="0"
|
|
17
17
|
class="item-container"
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
<slot :name="item"></slot>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
|
-
</
|
|
33
|
+
</PageRow>
|
|
34
34
|
|
|
35
|
-
<
|
|
35
|
+
<PageRow tag="div" variant="full" :style-class-passthrough="['mbe-20']">
|
|
36
36
|
<div tabindex="0" class="controls-container" ref="controlsContainerRef">
|
|
37
37
|
<div class="markers-container">
|
|
38
38
|
<ul class="markers-list">
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
</button>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
|
-
</
|
|
58
|
+
</PageRow>
|
|
59
59
|
</section>
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup lang="ts">
|
|
63
|
-
import { useEventListener, useResizeObserver, useSwipe } from "@vueuse/core"
|
|
63
|
+
import { useEventListener, useResizeObserver, useSwipe } from "@vueuse/core";
|
|
64
64
|
|
|
65
65
|
const props = defineProps({
|
|
66
66
|
carouselDataIds: {
|
|
@@ -83,276 +83,276 @@ const props = defineProps({
|
|
|
83
83
|
type: Boolean,
|
|
84
84
|
default: false,
|
|
85
85
|
},
|
|
86
|
-
})
|
|
86
|
+
});
|
|
87
87
|
|
|
88
|
-
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
88
|
+
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
|
|
89
89
|
|
|
90
|
-
const carouselWrapperRef = ref<HTMLDivElement | null>(null)
|
|
91
|
-
const carouselContainerRef = ref<HTMLDivElement | null>(null)
|
|
92
|
-
const carouselItemsRef = useTemplateRef<HTMLDivElement[]>("carouselItems")
|
|
93
|
-
const controlsContainerRef = ref<HTMLDivElement | null>(null)
|
|
94
|
-
const carouselInitComplete = ref(false)
|
|
90
|
+
const carouselWrapperRef = ref<HTMLDivElement | null>(null);
|
|
91
|
+
const carouselContainerRef = ref<HTMLDivElement | null>(null);
|
|
92
|
+
const carouselItemsRef = useTemplateRef<HTMLDivElement[]>("carouselItems");
|
|
93
|
+
const controlsContainerRef = ref<HTMLDivElement | null>(null);
|
|
94
|
+
const carouselInitComplete = ref(false);
|
|
95
95
|
|
|
96
|
-
const currentIndex = ref(0)
|
|
97
|
-
const itemCount = ref(props.carouselDataIds.length)
|
|
98
|
-
const transitionSpeedStr = props.transitionSpeed + "ms"
|
|
96
|
+
const currentIndex = ref(0);
|
|
97
|
+
const itemCount = ref(props.carouselDataIds.length);
|
|
98
|
+
const transitionSpeedStr = props.transitionSpeed + "ms";
|
|
99
99
|
|
|
100
|
-
const itemWidth = ref(0)
|
|
100
|
+
const itemWidth = ref(0);
|
|
101
101
|
const itemWidthOffsetStr = computed(() => {
|
|
102
|
-
return `-${itemWidth.value}px
|
|
103
|
-
})
|
|
102
|
+
return `-${itemWidth.value}px`;
|
|
103
|
+
});
|
|
104
104
|
|
|
105
|
-
const currentVisibleIndex = ref(0)
|
|
105
|
+
const currentVisibleIndex = ref(0);
|
|
106
106
|
|
|
107
107
|
const carouselContainerRefLeftPosition = computed(() => {
|
|
108
|
-
return carouselContainerRef.value ? carouselContainerRef.value.getBoundingClientRect().left : 0
|
|
109
|
-
})
|
|
108
|
+
return carouselContainerRef.value ? carouselContainerRef.value.getBoundingClientRect().left : 0;
|
|
109
|
+
});
|
|
110
110
|
const fullScreenOffsset = computed(() => {
|
|
111
|
-
return `-${Math.floor(carouselContainerRefLeftPosition.value)}px
|
|
112
|
-
})
|
|
111
|
+
return `-${Math.floor(carouselContainerRefLeftPosition.value)}px`;
|
|
112
|
+
});
|
|
113
113
|
console.log(
|
|
114
114
|
"INIT: carouselContainerRefLeftPosition:",
|
|
115
115
|
carouselContainerRefLeftPosition.value,
|
|
116
116
|
"fullScreenOffsset:",
|
|
117
117
|
fullScreenOffsset.value
|
|
118
|
-
)
|
|
118
|
+
);
|
|
119
119
|
|
|
120
120
|
const updateItemOrder = (index: number, order: number, zIndex: number = 2) => {
|
|
121
121
|
if (carouselItemsRef?.value && carouselItemsRef.value[index]) {
|
|
122
|
-
carouselItemsRef.value[index].style.order = order.toString()
|
|
123
|
-
carouselItemsRef.value[index].style.zIndex = zIndex.toString()
|
|
122
|
+
carouselItemsRef.value[index].style.order = order.toString();
|
|
123
|
+
carouselItemsRef.value[index].style.zIndex = zIndex.toString();
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
};
|
|
126
126
|
|
|
127
127
|
const reorderItems = (direction: "next" | "previous" | "jump" = "jump") => {
|
|
128
|
-
console.log(`Reordering items in direction: ${direction}`)
|
|
129
|
-
if (!carouselItemsRef?.value || !carouselInitComplete.value) return
|
|
128
|
+
console.log(`Reordering items in direction: ${direction}`);
|
|
129
|
+
if (!carouselItemsRef?.value || !carouselInitComplete.value) return;
|
|
130
130
|
|
|
131
131
|
// Capture positions before reordering
|
|
132
|
-
const beforeRects = carouselItemsRef.value.map((item) => item.getBoundingClientRect())
|
|
132
|
+
const beforeRects = carouselItemsRef.value.map((item) => item.getBoundingClientRect());
|
|
133
133
|
|
|
134
134
|
// Apply new order and z-index based on direction
|
|
135
|
-
let order = 1
|
|
135
|
+
let order = 1;
|
|
136
136
|
|
|
137
137
|
// For items from currentVisibleIndex to end
|
|
138
138
|
for (let i = currentVisibleIndex.value; i < itemCount.value; i++) {
|
|
139
|
-
let zIndex = 2 // default normal z-index
|
|
139
|
+
let zIndex = 2; // default normal z-index
|
|
140
140
|
|
|
141
141
|
if (i === currentVisibleIndex.value) {
|
|
142
142
|
// The item becoming visible
|
|
143
143
|
if (direction === "previous") {
|
|
144
144
|
// When going previous, the item moving to first position should go behind
|
|
145
|
-
zIndex = 1
|
|
145
|
+
zIndex = 1;
|
|
146
146
|
} else {
|
|
147
147
|
// Normal case - visible item gets highest z-index
|
|
148
|
-
zIndex = 3
|
|
148
|
+
zIndex = 3;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
updateItemOrder(i, order++, zIndex)
|
|
152
|
+
updateItemOrder(i, order++, zIndex);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// For items from 0 to currentVisibleIndex
|
|
156
156
|
for (let i = 0; i < currentVisibleIndex.value; i++) {
|
|
157
157
|
// Items that wrap around get lower z-index to slide behind
|
|
158
|
-
const zIndex = 1
|
|
159
|
-
updateItemOrder(i, order++, zIndex)
|
|
158
|
+
const zIndex = 1;
|
|
159
|
+
updateItemOrder(i, order++, zIndex);
|
|
160
160
|
}
|
|
161
|
-
}
|
|
161
|
+
};
|
|
162
162
|
|
|
163
163
|
const actionPrevious = () => {
|
|
164
|
-
if (!carouselInitComplete.value || !carouselItemsRef?.value) return
|
|
164
|
+
if (!carouselInitComplete.value || !carouselItemsRef?.value) return;
|
|
165
165
|
|
|
166
166
|
if (props.returnToStart && currentVisibleIndex.value === 0) {
|
|
167
|
-
currentVisibleIndex.value = itemCount.value - 1
|
|
167
|
+
currentVisibleIndex.value = itemCount.value - 1;
|
|
168
168
|
} else {
|
|
169
|
-
currentVisibleIndex.value = currentVisibleIndex.value === 0 ? itemCount.value - 1 : currentVisibleIndex.value - 1
|
|
169
|
+
currentVisibleIndex.value = currentVisibleIndex.value === 0 ? itemCount.value - 1 : currentVisibleIndex.value - 1;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
reorderItems("previous")
|
|
173
|
-
currentIndex.value = currentVisibleIndex.value
|
|
174
|
-
}
|
|
172
|
+
reorderItems("previous");
|
|
173
|
+
currentIndex.value = currentVisibleIndex.value;
|
|
174
|
+
};
|
|
175
175
|
|
|
176
176
|
const actionNext = () => {
|
|
177
|
-
if (!carouselInitComplete.value || !carouselItemsRef?.value) return
|
|
177
|
+
if (!carouselInitComplete.value || !carouselItemsRef?.value) return;
|
|
178
178
|
|
|
179
179
|
if (props.returnToStart && currentVisibleIndex.value === itemCount.value - 1) {
|
|
180
|
-
currentVisibleIndex.value = 0
|
|
180
|
+
currentVisibleIndex.value = 0;
|
|
181
181
|
} else {
|
|
182
|
-
currentVisibleIndex.value = currentVisibleIndex.value === itemCount.value - 1 ? 0 : currentVisibleIndex.value + 1
|
|
182
|
+
currentVisibleIndex.value = currentVisibleIndex.value === itemCount.value - 1 ? 0 : currentVisibleIndex.value + 1;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
reorderItems("next")
|
|
186
|
-
currentIndex.value = currentVisibleIndex.value
|
|
187
|
-
}
|
|
185
|
+
reorderItems("next");
|
|
186
|
+
currentIndex.value = currentVisibleIndex.value;
|
|
187
|
+
};
|
|
188
188
|
|
|
189
189
|
const jumpToFrame = (index: number) => {
|
|
190
190
|
if (index >= 0 && index < itemCount.value) {
|
|
191
|
-
currentVisibleIndex.value = index
|
|
192
|
-
reorderItems("jump")
|
|
193
|
-
currentIndex.value = currentVisibleIndex.value
|
|
191
|
+
currentVisibleIndex.value = index;
|
|
192
|
+
reorderItems("jump");
|
|
193
|
+
currentIndex.value = currentVisibleIndex.value;
|
|
194
194
|
}
|
|
195
|
-
}
|
|
195
|
+
};
|
|
196
196
|
|
|
197
197
|
const checkAndMoveLastItem = () => {
|
|
198
198
|
if (props.allowCarouselOverflow) {
|
|
199
|
-
const itemsFit = Math.floor(carouselContainerRefLeftPosition.value / itemWidth.value + 1)
|
|
200
|
-
jumpToFrame(itemCount.value - 1)
|
|
199
|
+
const itemsFit = Math.floor(carouselContainerRefLeftPosition.value / itemWidth.value + 1);
|
|
200
|
+
jumpToFrame(itemCount.value - 1);
|
|
201
201
|
}
|
|
202
|
-
}
|
|
202
|
+
};
|
|
203
203
|
|
|
204
204
|
const initialSetup = () => {
|
|
205
205
|
if (carouselItemsRef?.value && carouselItemsRef.value.length > 0 && carouselItemsRef.value[0]) {
|
|
206
|
-
itemWidth.value = carouselItemsRef.value[0].offsetWidth
|
|
206
|
+
itemWidth.value = carouselItemsRef.value[0].offsetWidth;
|
|
207
207
|
|
|
208
208
|
// Set initial order and z-index for all items
|
|
209
209
|
carouselItemsRef.value.forEach((item, index) => {
|
|
210
|
-
item.style.order = String(index + 1)
|
|
210
|
+
item.style.order = String(index + 1);
|
|
211
211
|
// First item gets higher z-index, others get normal z-index
|
|
212
|
-
item.style.zIndex = index === 0 ? "3" : "2"
|
|
213
|
-
})
|
|
212
|
+
item.style.zIndex = index === 0 ? "3" : "2";
|
|
213
|
+
});
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
carouselInitComplete.value = true
|
|
217
|
-
checkAndMoveLastItem()
|
|
218
|
-
}
|
|
216
|
+
carouselInitComplete.value = true;
|
|
217
|
+
checkAndMoveLastItem();
|
|
218
|
+
};
|
|
219
219
|
|
|
220
220
|
const { direction } = useSwipe(carouselContainerRef, {
|
|
221
221
|
passive: false,
|
|
222
222
|
onSwipeEnd() {
|
|
223
223
|
if (direction.value === "left") {
|
|
224
|
-
actionNext()
|
|
224
|
+
actionNext();
|
|
225
225
|
} else if (direction.value === "right") {
|
|
226
|
-
actionPrevious()
|
|
226
|
+
actionPrevious();
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
|
-
})
|
|
229
|
+
});
|
|
230
230
|
|
|
231
231
|
useEventListener(carouselContainerRef, "keydown", (event: KeyboardEvent) => {
|
|
232
232
|
if (event.key === "ArrowLeft") {
|
|
233
|
-
actionPrevious()
|
|
233
|
+
actionPrevious();
|
|
234
234
|
} else if (event.key === "ArrowRight") {
|
|
235
|
-
actionNext()
|
|
235
|
+
actionNext();
|
|
236
236
|
}
|
|
237
|
-
})
|
|
237
|
+
});
|
|
238
238
|
|
|
239
239
|
useEventListener(controlsContainerRef, "keydown", (event: KeyboardEvent) => {
|
|
240
240
|
if (event.key === "ArrowLeft") {
|
|
241
|
-
actionPrevious()
|
|
241
|
+
actionPrevious();
|
|
242
242
|
} else if (event.key === "ArrowRight") {
|
|
243
|
-
actionNext()
|
|
243
|
+
actionNext();
|
|
244
244
|
}
|
|
245
|
-
})
|
|
245
|
+
});
|
|
246
246
|
|
|
247
247
|
useResizeObserver(carouselWrapperRef, async () => {
|
|
248
|
-
initialSetup()
|
|
249
|
-
})
|
|
248
|
+
initialSetup();
|
|
249
|
+
});
|
|
250
250
|
|
|
251
251
|
onMounted(() => {
|
|
252
|
-
initialSetup()
|
|
252
|
+
initialSetup();
|
|
253
253
|
console.log(
|
|
254
254
|
"onMounted: carouselContainerRefLeftPosition:",
|
|
255
255
|
carouselContainerRefLeftPosition.value,
|
|
256
256
|
"fullScreenOffsset:",
|
|
257
257
|
fullScreenOffsset.value
|
|
258
|
-
)
|
|
259
|
-
})
|
|
258
|
+
);
|
|
259
|
+
});
|
|
260
260
|
</script>
|
|
261
261
|
|
|
262
262
|
<style lang="css">
|
|
263
263
|
@layer components {
|
|
264
|
-
.carousel-infinite {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.item-container {
|
|
284
|
-
display: flex;
|
|
285
|
-
gap: var(--_carousel-item-track-gap);
|
|
286
|
-
overflow-x: hidden;
|
|
287
|
-
position: relative;
|
|
288
|
-
|
|
289
|
-
&.allow-overflow {
|
|
290
|
-
overflow-x: initial;
|
|
291
|
-
|
|
292
|
-
.item {
|
|
293
|
-
translate: calc(v-bind(itemWidthOffsetStr) - var(--_carousel-item-track-gap)) 0;
|
|
294
|
-
}
|
|
264
|
+
.carousel-infinite {
|
|
265
|
+
--_carousel-item-track-gap: 10px;
|
|
266
|
+
|
|
267
|
+
display: grid;
|
|
268
|
+
grid-template-columns: 1fr;
|
|
269
|
+
gap: 10px;
|
|
270
|
+
|
|
271
|
+
.sr-only {
|
|
272
|
+
position: absolute;
|
|
273
|
+
width: 1px;
|
|
274
|
+
height: 1px;
|
|
275
|
+
padding: 0;
|
|
276
|
+
margin: -1px;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
clip: rect(0, 0, 0, 0);
|
|
279
|
+
white-space: nowrap;
|
|
280
|
+
border: 0;
|
|
295
281
|
}
|
|
296
282
|
|
|
297
|
-
.item {
|
|
283
|
+
.item-container {
|
|
298
284
|
display: flex;
|
|
299
|
-
|
|
300
|
-
|
|
285
|
+
gap: var(--_carousel-item-track-gap);
|
|
286
|
+
overflow-x: hidden;
|
|
301
287
|
position: relative;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
288
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
align-items: center;
|
|
308
|
-
justify-content: flex-end;
|
|
289
|
+
&.allow-overflow {
|
|
290
|
+
overflow-x: initial;
|
|
309
291
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
display: flex;
|
|
313
|
-
flex-direction: row;
|
|
314
|
-
gap: 10px;
|
|
315
|
-
list-style-type: none;
|
|
316
|
-
margin: unset;
|
|
317
|
-
padding: unset;
|
|
318
|
-
|
|
319
|
-
.markers-item {
|
|
320
|
-
.btn-marker {
|
|
321
|
-
border: none;
|
|
322
|
-
outline: none;
|
|
323
|
-
box-shadow: none;
|
|
324
|
-
cursor: pointer;
|
|
325
|
-
transition: background-color v-bind(transitionSpeedStr) linear;
|
|
326
|
-
|
|
327
|
-
&.active {
|
|
328
|
-
background-color: red;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
292
|
+
.item {
|
|
293
|
+
translate: calc(v-bind(itemWidthOffsetStr) - var(--_carousel-item-track-gap)) 0;
|
|
331
294
|
}
|
|
332
295
|
}
|
|
296
|
+
|
|
297
|
+
.item {
|
|
298
|
+
display: flex;
|
|
299
|
+
flex: 0 0 100%;
|
|
300
|
+
max-inline-size: 800px;
|
|
301
|
+
position: relative;
|
|
302
|
+
}
|
|
333
303
|
}
|
|
334
304
|
|
|
335
|
-
.
|
|
305
|
+
.controls-container {
|
|
336
306
|
display: flex;
|
|
337
307
|
align-items: center;
|
|
338
|
-
justify-content: end;
|
|
339
|
-
|
|
308
|
+
justify-content: flex-end;
|
|
309
|
+
|
|
310
|
+
.markers-container {
|
|
311
|
+
.markers-list {
|
|
312
|
+
display: flex;
|
|
313
|
+
flex-direction: row;
|
|
314
|
+
gap: 10px;
|
|
315
|
+
list-style-type: none;
|
|
316
|
+
margin: unset;
|
|
317
|
+
padding: unset;
|
|
318
|
+
|
|
319
|
+
.markers-item {
|
|
320
|
+
.btn-marker {
|
|
321
|
+
border: none;
|
|
322
|
+
outline: none;
|
|
323
|
+
box-shadow: none;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
transition: background-color v-bind(transitionSpeedStr) linear;
|
|
326
|
+
|
|
327
|
+
&.active {
|
|
328
|
+
background-color: red;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
340
334
|
|
|
341
|
-
.
|
|
335
|
+
.buttons-container {
|
|
342
336
|
display: flex;
|
|
343
337
|
align-items: center;
|
|
344
|
-
justify-content:
|
|
338
|
+
justify-content: end;
|
|
339
|
+
gap: 20px;
|
|
345
340
|
|
|
346
|
-
|
|
347
|
-
|
|
341
|
+
.btn-action {
|
|
342
|
+
display: flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
justify-content: center;
|
|
348
345
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
cursor: pointer;
|
|
347
|
+
height: fit-content;
|
|
348
|
+
|
|
349
|
+
.arrows-icon {
|
|
350
|
+
width: 24px;
|
|
351
|
+
height: 24px;
|
|
352
|
+
}
|
|
352
353
|
}
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
}
|
|
357
|
-
}
|
|
358
358
|
</style>
|