1 |
- {"version":3,"file":"VSlideGroup.mjs","names":["VFadeTransition","VIcon","useDisplay","makeComponentProps","makeGroupProps","useGroup","IconValue","useRtl","useResizeObserver","makeTagProps","computed","shallowRef","watch","bias","calculateCenteredOffset","calculateUpdatedOffset","clamp","focusableChildren","genericComponent","IN_BROWSER","propsFactory","useRender","VSlideGroupSymbol","Symbol","for","makeVSlideGroupProps","centerActive","Boolean","direction","type","String","default","symbol","nextIcon","prevIcon","showArrows","validator","v","includes","selectedClass","VSlideGroup","name","props","emits","value","setup","_ref","slots","isRtl","mobile","group","isOverflowing","scrollOffset","containerSize","contentSize","isHorizontal","resizeRef","containerRef","contentRect","containerRect","contentRef","firstSelectedIndex","selected","length","items","findIndex","item","id","lastSelectedIndex","frame","cancelAnimationFrame","requestAnimationFrame","sizeProperty","selectedElement","children","currentScrollOffset","disableTransition","startTouch","startOffset","onTouchstart","e","sign","touches","onTouchmove","onTouchend","maxScrollOffset","onScroll","isFocused","onFocusin","el","composedPath","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","key","location","focusable","querySelector","nextElementSibling","previousElementSibling","firstElementChild","lastElementChild","scrollTo","newAbsoluteOffset","contentStyles","scrollAmount","transform","transition","willChange","slotProps","next","prev","select","isSelected","hasAffixes","Math","abs","hasPrev","hasNext","_createVNode","tag","class","style","onClick"],"sources":["../../../src/components/VSlideGroup/VSlideGroup.tsx"],"sourcesContent":["// Styles\nimport './VSlideGroup.sass'\n\n// Components\nimport { VFadeTransition } from '@/components/transitions'\nimport { VIcon } from '@/components/VIcon'\n\n// Composables\nimport { useDisplay } from '@/composables'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { IconValue } from '@/composables/icons'\nimport { useRtl } from '@/composables/locale'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { computed, shallowRef, watch } from 'vue'\nimport { bias, calculateCenteredOffset, calculateUpdatedOffset } from './helpers'\nimport { clamp, focusableChildren, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { InjectionKey, PropType } from 'vue'\nimport type { GroupProvide } from '@/composables/group'\n\nexport const VSlideGroupSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-slide-group')\n\ninterface SlideGroupSlot {\n next: GroupProvide['next']\n prev: GroupProvide['prev']\n select: GroupProvide['select']\n isSelected: GroupProvide['isSelected']\n}\n\ntype VSlideGroupSlots = {\n default: SlideGroupSlot\n prev: SlideGroupSlot\n next: SlideGroupSlot\n}\n\nexport const makeVSlideGroupProps = propsFactory({\n centerActive: Boolean,\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n symbol: {\n type: null,\n default: VSlideGroupSymbol,\n },\n nextIcon: {\n type: IconValue,\n default: '$next',\n },\n prevIcon: {\n type: IconValue,\n default: '$prev',\n },\n showArrows: {\n type: [Boolean, String],\n validator: (v: any) => (\n typeof v === 'boolean' || [\n 'always',\n 'desktop',\n 'mobile',\n ].includes(v)\n ),\n },\n\n ...makeComponentProps(),\n ...makeTagProps(),\n ...makeGroupProps({\n selectedClass: 'v-slide-group-item--active',\n }),\n}, 'VSlideGroup')\n\nexport const VSlideGroup = genericComponent<VSlideGroupSlots>()({\n name: 'VSlideGroup',\n\n props: makeVSlideGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { isRtl } = useRtl()\n const { mobile } = useDisplay()\n const group = useGroup(props, props.symbol)\n const isOverflowing = shallowRef(false)\n const scrollOffset = shallowRef(0)\n const containerSize = shallowRef(0)\n const contentSize = shallowRef(0)\n const isHorizontal = computed(() => props.direction === 'horizontal')\n\n const { resizeRef: containerRef, contentRect: containerRect } = useResizeObserver()\n const { resizeRef: contentRef, contentRect } = useResizeObserver()\n\n const firstSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[0])\n })\n\n const lastSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[group.selected.value.length - 1])\n })\n\n if (IN_BROWSER) {\n let frame = -1\n watch(() => [group.selected.value, containerRect.value, contentRect.value, isHorizontal.value], () => {\n cancelAnimationFrame(frame)\n frame = requestAnimationFrame(() => {\n if (containerRect.value && contentRect.value) {\n const sizeProperty = isHorizontal.value ? 'width' : 'height'\n\n containerSize.value = containerRect.value[sizeProperty]\n contentSize.value = contentRect.value[sizeProperty]\n\n isOverflowing.value = containerSize.value + 1 < contentSize.value\n }\n\n if (firstSelectedIndex.value >= 0 && contentRef.value) {\n // TODO: Is this too naive? Should we store element references in group composable?\n const selectedElement = contentRef.value.children[lastSelectedIndex.value] as HTMLElement\n\n if (firstSelectedIndex.value === 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (props.centerActive) {\n scrollOffset.value = calculateCenteredOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n isHorizontal: isHorizontal.value,\n })\n } else if (isOverflowing.value) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n }\n }\n })\n })\n }\n\n const disableTransition = shallowRef(false)\n\n let startTouch = 0\n let startOffset = 0\n\n function onTouchstart (e: TouchEvent) {\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n startOffset = sign * scrollOffset.value\n startTouch = e.touches[0][sizeProperty]\n disableTransition.value = true\n }\n\n function onTouchmove (e: TouchEvent) {\n if (!isOverflowing.value) return\n\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n scrollOffset.value = sign * (startOffset + startTouch - e.touches[0][sizeProperty])\n }\n\n function onTouchend (e: TouchEvent) {\n const maxScrollOffset = contentSize.value - containerSize.value\n\n if (scrollOffset.value < 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (scrollOffset.value >= maxScrollOffset) {\n scrollOffset.value = maxScrollOffset\n }\n\n disableTransition.value = false\n }\n\n function onScroll () {\n if (!containerRef.value) return\n\n containerRef.value[isHorizontal.value ? 'scrollLeft' : 'scrollTop'] = 0\n }\n\n const isFocused = shallowRef(false)\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n\n if (!isOverflowing.value || !contentRef.value) return\n\n // Focused element is likely to be the root of an item, so a\n // breadth-first search will probably find it in the first iteration\n for (const el of e.composedPath()) {\n for (const item of contentRef.value.children) {\n if (item === el) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement: item as HTMLElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n return\n }\n }\n }\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (!contentRef.value) return\n\n if (isHorizontal.value) {\n if (e.key === 'ArrowRight') {\n focus(isRtl.value ? 'prev' : 'next')\n } else if (e.key === 'ArrowLeft') {\n focus(isRtl.value ? 'next' : 'prev')\n }\n } else {\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n }\n }\n\n if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n }\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (!contentRef.value) return\n\n if (!location) {\n const focusable = focusableChildren(contentRef.value)\n focusable[0]?.focus()\n } else if (location === 'next') {\n const el = contentRef.value.querySelector(':focus')?.nextElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('first')\n } else if (location === 'prev') {\n const el = contentRef.value.querySelector(':focus')?.previousElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('last')\n } else if (location === 'first') {\n (contentRef.value.firstElementChild as HTMLElement)?.focus()\n } else if (location === 'last') {\n (contentRef.value.lastElementChild as HTMLElement)?.focus()\n }\n }\n\n function scrollTo (location: 'prev' | 'next') {\n const newAbsoluteOffset = scrollOffset.value + (location === 'prev' ? -1 : 1) * containerSize.value\n\n scrollOffset.value = clamp(newAbsoluteOffset, 0, contentSize.value - containerSize.value)\n }\n\n const contentStyles = computed(() => {\n // This adds friction when scrolling the 'wrong' way when at max offset\n let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value\n ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value)\n : -scrollOffset.value\n\n // This adds friction when scrolling the 'wrong' way when at min offset\n if (scrollOffset.value <= 0) {\n scrollAmount = bias(-scrollOffset.value)\n }\n\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n return {\n transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,\n transition: disableTransition.value ? 'none' : '',\n willChange: disableTransition.value ? 'transform' : '',\n }\n })\n\n const slotProps = computed(() => ({\n next: group.next,\n prev: group.prev,\n select: group.select,\n isSelected: group.isSelected,\n }))\n\n const hasAffixes = computed(() => {\n switch (props.showArrows) {\n // Always show arrows on desktop & mobile\n case 'always': return true\n\n // Always show arrows on desktop\n case 'desktop': return !mobile.value\n\n // Show arrows on mobile when overflowing.\n // This matches the default 2.2 behavior\n case true: return isOverflowing.value || Math.abs(scrollOffset.value) > 0\n\n // Always show on mobile\n case 'mobile': return (\n mobile.value ||\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n\n // https://material.io/components/tabs#scrollable-tabs\n // Always show arrows when\n // overflowed on desktop\n default: return (\n !mobile.value &&\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n }\n })\n\n const hasPrev = computed(() => {\n return Math.abs(scrollOffset.value) > 0\n })\n\n const hasNext = computed(() => {\n // Check one scroll ahead to know the width of right-most item\n return contentSize.value > Math.abs(scrollOffset.value) + containerSize.value\n })\n\n useRender(() => (\n <props.tag\n class={[\n 'v-slide-group',\n {\n 'v-slide-group--vertical': !isHorizontal.value,\n 'v-slide-group--has-affixes': hasAffixes.value,\n 'v-slide-group--is-overflowing': isOverflowing.value,\n },\n props.class,\n ]}\n style={ props.style }\n tabindex={ (isFocused.value || group.selected.value.length) ? -1 : 0 }\n onFocus={ onFocus }\n >\n { hasAffixes.value && (\n <div\n key=\"prev\"\n class={[\n 'v-slide-group__prev',\n { 'v-slide-group__prev--disabled': !hasPrev.value },\n ]}\n onClick={ () => scrollTo('prev') }\n >\n { slots.prev?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.nextIcon : props.prevIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n\n <div\n key=\"container\"\n ref={ containerRef }\n class=\"v-slide-group__container\"\n onScroll={ onScroll }\n >\n <div\n ref={ contentRef }\n class=\"v-slide-group__content\"\n style={ contentStyles.value }\n onTouchstartPassive={ onTouchstart }\n onTouchmovePassive={ onTouchmove }\n onTouchendPassive={ onTouchend }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onKeydown={ onKeydown }\n >\n { slots.default?.(slotProps.value) }\n </div>\n </div>\n\n { hasAffixes.value && (\n <div\n key=\"next\"\n class={[\n 'v-slide-group__next',\n { 'v-slide-group__next--disabled': !hasNext.value },\n ]}\n onClick={ () => scrollTo('next') }\n >\n { slots.next?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.prevIcon : props.nextIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n </props.tag>\n ))\n\n return {\n selected: group.selected,\n scrollTo,\n scrollOffset,\n focus,\n }\n },\n})\n\nexport type VSlideGroup = InstanceType<typeof VSlideG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