@oruga-ui/oruga-next
Version:
UI components for Vue.js and CSS framework agnostic
1 lines • 26.8 kB
Source Map (JSON)
{"version":3,"file":"steps.mjs","sources":["../../src/components/steps/StepItem.vue","../../src/components/steps/Steps.vue","../../src/components/steps/index.ts"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T, C extends Component\">\nimport { computed, ref, useSlots, useId, type Component } from \"vue\";\n\nimport { getDefault } from \"@/utils/config\";\nimport { defineClasses, useProviderChild } from \"@/composables\";\n\nimport type { StepsComponent, StepItemComponent } from \"./types\";\nimport type { StepItemProps } from \"./props\";\n\n/**\n * An step item used by the steps component.\n * @displayName Step Item\n */\ndefineOptions({\n isOruga: true,\n name: \"OStepItem\",\n configField: \"steps\",\n inheritAttrs: false,\n});\n\nconst props = withDefaults(defineProps<StepItemProps<T, C>>(), {\n override: undefined,\n value: undefined,\n label: undefined,\n step: undefined,\n variant: undefined,\n clickable: undefined,\n disabled: false,\n visible: true,\n icon: () => getDefault(\"steps.icon\"),\n iconPack: () => getDefault(\"steps.iconPack\"),\n content: undefined,\n component: undefined,\n props: undefined,\n events: undefined,\n});\n\nconst emits = defineEmits<{\n /** on step item activate event */\n activate: [];\n /** on step item deactivate event */\n deactivate: [];\n}>();\n\nconst itemValue = props.value ?? useId();\n\nconst slots = useSlots();\n\n// provided data is a computed ref to ensure reactivity\nconst providedData = computed<StepItemComponent<T>>(() => ({\n ...props,\n value: itemValue,\n $slots: slots,\n stepClasses: stepClasses.value,\n iconClasses: stepIconClasses.value,\n labelClasses: stepLabelClasses.value,\n isClickable: isClickable.value,\n isTransitioning: isTransitioning.value,\n activate,\n deactivate,\n}));\n\n/** inject functionalities and data from the parent component */\nconst { parent, item } = useProviderChild<StepsComponent, StepItemComponent<T>>(\n { data: providedData },\n);\n\nconst transitionName = ref();\n\nconst isActive = computed(() => item.value.index === parent.value.activeIndex);\n\nconst isTransitioning = ref(false);\n\nconst nextAnimation = computed(() => {\n const idx =\n parent.value.vertical && parent.value.animation.length === 4 ? 2 : 0;\n return parent.value.animation[idx];\n});\n\nconst prevAnimation = computed(() => {\n const idx =\n parent.value.vertical && parent.value.animation.length === 4 ? 3 : 1;\n return parent.value.animation[idx];\n});\n\n/** shows if the step is clickable or not */\nconst isClickable = computed(\n () => props.clickable || item.value.index < parent.value.activeIndex,\n);\n\n/** Activate element, alter animation name based on the index. */\nfunction activate(oldIndex: number): void {\n transitionName.value =\n item.value.index < oldIndex ? nextAnimation.value : prevAnimation.value;\n // emit event\n emits(\"activate\");\n}\n\n/** Deactivate element, alter animation name based on the index. */\nfunction deactivate(newIndex: number): void {\n transitionName.value =\n newIndex < item.value.index ? nextAnimation.value : prevAnimation.value;\n // emit event\n emits(\"deactivate\");\n}\n\n/** Transition after-enter hook */\nfunction afterEnter(): void {\n isTransitioning.value = true;\n}\n\n/** Transition before-leave hook */\nfunction beforeLeave(): void {\n isTransitioning.value = true;\n}\n\n// --- Computed Component Classes ---\n\nconst stepClasses = defineClasses(\n [\"stepClass\", \"o-steps__step\"],\n [\n \"stepVariantClass\",\n \"o-steps__step--\",\n computed(() => parent.value?.variant || props.variant),\n computed(() => !!parent.value?.variant || !!props.variant),\n ],\n [\"stepActiveClass\", \"o-steps__step--active\", null, isActive],\n [\"stepClickableClass\", \"o-steps__step--clickable\", null, isClickable],\n [\n \"stepDisabledClass\",\n \"o-steps__step--disabled\",\n null,\n computed(() => props.disabled),\n ],\n [\n \"stepPreviousClass\",\n \"o-steps__step--previous\",\n null,\n computed(() => item.value.index < parent.value?.activeIndex),\n ],\n [\n \"stepNextClass\",\n \"o-steps__step--next\",\n null,\n computed(() => item.value.index > parent.value?.activeIndex),\n ],\n [\n \"stepPositionClass\",\n \"o-steps__step--\",\n computed(() => parent.value?.labelPosition),\n computed(() => !!parent.value?.labelPosition),\n ],\n);\n\nconst stepLabelClasses = defineClasses([\n \"stepLabelClass\",\n \"o-steps__step-label\",\n]);\n\nconst stepIconClasses = defineClasses([\"stepIconClass\", \"o-steps__step-icon\"]);\n\nconst panelClasses = defineClasses([\"stepPanelClass\", \"o-steps__panel\"]);\n</script>\n\n<template>\n <Transition\n v-if=\"parent\"\n :css=\"parent.animated\"\n :name=\"transitionName\"\n :appear=\"parent.animateInitially\"\n @after-enter=\"afterEnter\"\n @before-leave=\"beforeLeave\">\n <div\n v-show=\"isActive && visible\"\n v-bind=\"$attrs\"\n :id=\"`tabpanel-${item.identifier}`\"\n data-oruga=\"steps-item\"\n :data-id=\"`steps-${item.identifier}`\"\n :class=\"panelClasses\"\n role=\"tabpanel\"\n :hidden=\"!isActive\"\n :aria-labelledby=\"`tab-${item.identifier}`\"\n aria-roledescription=\"item\">\n <!-- \n @slot Step item content\n @binding {boolean} active - if item is shown \n -->\n <slot :active=\"isActive && visible\">\n <!-- injected component -->\n <component\n :is=\"component\"\n v-if=\"component\"\n v-bind=\"$props.props\"\n v-on=\"$props.events || {}\" />\n\n <!-- default content prop -->\n <template v-else>{{ content }}</template>\n </slot>\n </div>\n </Transition>\n</template>\n","<script setup lang=\"ts\" generic=\"T\">\nimport {\n computed,\n toValue,\n nextTick,\n ref,\n watch,\n watchEffect,\n useTemplateRef,\n} from \"vue\";\n\nimport OStepItem from \"../steps/StepItem.vue\";\nimport OButton from \"../button/Button.vue\";\nimport OIcon from \"../icon/Icon.vue\";\n\nimport { getDefault } from \"@/utils/config\";\nimport { isDefined } from \"@/utils/helpers\";\nimport {\n defineClasses,\n normalizeOptions,\n useProviderParent,\n useMatchMedia,\n useSequentialId,\n} from \"@/composables\";\n\nimport type { StepItem, StepItemComponent, StepsComponent } from \"./types\";\nimport type { StepsProps } from \"./props\";\n\n/**\n * Responsive horizontal process steps.\n * @displayName Steps\n * @requires ./StepItem.vue\n * @style _steps.scss\n */\ndefineOptions({\n isOruga: true,\n name: \"OSteps\",\n configField: \"steps\",\n});\n\ntype ModelValue = StepsProps<T>[\"modelValue\"];\n\nconst props = withDefaults(defineProps<StepsProps<T>>(), {\n override: undefined,\n modelValue: undefined,\n options: undefined,\n variant: () => getDefault(\"steps.variant\"),\n size: () => getDefault(\"steps.size\"),\n vertical: false,\n position: undefined,\n iconPack: () => getDefault(\"steps.iconPack\"),\n iconPrev: () => getDefault(\"steps.iconPrev\", \"chevron-left\"),\n iconNext: () => getDefault(\"steps.iconNext\", \"chevron-right\"),\n hasNavigation: true,\n activateOnFocus: false,\n animated: () => getDefault(\"steps.animated\", true),\n animation: () =>\n getDefault(\"steps.animation\", [\n \"slide-next\",\n \"slide-prev\",\n \"slide-down\",\n \"slide-up\",\n ]),\n animateInitially: () => getDefault(\"steps.animateInitially\", false),\n labelPosition: () => getDefault(\"steps.labelPosition\", \"bottom\"),\n rounded: true,\n mobileBreakpoint: () => getDefault(\"steps.mobileBreakpoint\"),\n ariaLabel: () => getDefault(\"steps.ariaLabel\"),\n ariaNextLabel: () => getDefault(\"steps.ariaNextLabel\", \"Next\"),\n ariaPreviousLabel: () => getDefault(\"steps.ariaPreviousLabel\", \"Previous\"),\n});\n\nconst emits = defineEmits<{\n /**\n * modelValue prop two-way binding\n * @param value {T} updated modelValue prop\n */\n \"update:model-value\": [value: ModelValue];\n /**\n * on step change event\n * @param value {T} new step value\n * @param value {T} old step value\n */\n change: [newValue: ModelValue, oldValue: ModelValue];\n}>();\n\nconst { isMobile } = useMatchMedia(props.mobileBreakpoint);\n\nconst rootRef = useTemplateRef(\"rootElement\");\n\n// provided data is a computed ref to ensure reactivity\nconst provideData = computed<StepsComponent>(() => ({\n activeIndex: activeItem.value?.index ?? 0,\n labelPosition: props.labelPosition,\n vertical: props.vertical,\n animated: props.animated,\n animation: props.animation,\n animateInitially: props.animateInitially,\n variant: props.variant,\n}));\n\n/** provide functionalities and data to child item components */\nconst { childItems } = useProviderParent<StepItemComponent<T>>({\n rootRef,\n data: provideData,\n});\n\nconst items = computed<StepItem<T>[]>(() => {\n if (!childItems.value) return [];\n return childItems.value.map((column) => ({\n index: column.index,\n identifier: column.identifier,\n ...toValue(column.data!),\n }));\n});\n\n// create a unique id sequence\nconst { nextSequence } = useSequentialId();\n\n/** normalized programamtic options */\nconst groupedOptions = computed(() =>\n normalizeOptions<T>(props.options, nextSequence),\n);\n\n/** The selected item value, use v-model to make it two-way binding */\nconst vmodel = defineModel<ModelValue>({ default: undefined });\n\n/** When v-model is changed set the new active step. */\nwatch(\n () => props.modelValue,\n (value) => {\n if (vmodel.value !== value) performAction(value);\n },\n);\n\n/** the active item */\nconst activeItem = ref<StepItem<T>>();\n\n// set the active item immediate and every time the vmodel changes\nwatchEffect(() => {\n activeItem.value = isDefined(vmodel.value)\n ? items.value.find((item) => item.value === vmodel.value) ||\n items.value[0]\n : items.value[0];\n});\n\nconst isTransitioning = computed(() =>\n items.value.some((item) => item.isTransitioning),\n);\n\n// --- EVENT HANDLER ---\n\n/** Activate the item after or before the current active item. */\nfunction activateItem(fowardIndex: 1 | -1): void {\n const index = (activeItem.value?.index ?? 0) + fowardIndex;\n if (index < 0 || index >= items.value.length) return;\n const item = items.value[index];\n if (vmodel.value !== item.value) performAction(item.value);\n}\n\n/** Item click listener, emit input event and change active child. */\nfunction itemClick(item: StepItem<T>): void {\n // determines if the step is clickable or not\n if (!item.isClickable) return;\n if (vmodel.value !== item.value) performAction(item.value);\n}\n\n/** Check if previous button is available. */\nconst hasPrev = computed(() =>\n isDefined(getFirstViableIndex((activeItem.value?.index ?? 0) - 1, false)),\n);\n\n/** Check if next button is available. */\nconst hasNext = computed(() =>\n isDefined(getFirstViableIndex((activeItem.value?.index ?? 0) + 1, true)),\n);\n\n/** Focus the next item if possible. */\nfunction onNext(index: number): void {\n const viableIndex = getFirstViableIndex(index + 1, true);\n if (isDefined(viableIndex)) moveFocus(viableIndex);\n}\n\n/** Focus the previous item if possible. */\nfunction onPrev(index: number): void {\n const viableIndex = getFirstViableIndex(index - 1, false);\n if (isDefined(viableIndex)) moveFocus(viableIndex);\n}\n\n/** Focus the first viable item. */\nfunction onHomePressed(): void {\n const viableIndex = getFirstViableIndex(0, true);\n if (isDefined(viableIndex)) moveFocus(viableIndex);\n}\n\n/** Focus the last viable item. */\nfunction onEndPressed(): void {\n const viableIndex = getFirstViableIndex(items.value.length - 1, false);\n if (isDefined(viableIndex)) moveFocus(viableIndex);\n}\n\n/** Set focus on a step item or click it if `activateOnFocus`. */\nfunction moveFocus(index: number): void {\n if (index < 0 || index >= items.value.length) return;\n const item = items.value[index];\n\n if (props.activateOnFocus) {\n itemClick(item);\n } else {\n const el = rootRef.value?.querySelector<HTMLElement>(\n `#tab-${item.identifier}`,\n );\n el?.focus();\n }\n}\n\n/**\n * Get the first 'viable' child, starting at startingIndex and in the direction specified\n * by the boolean parameter forward. In other words, first try to select the child at index\n * startingIndex, and if it is not visible or it is disabled, then go to the index in the\n * specified direction until either returning to startIndex or finding a viable child item.\n */\nfunction getFirstViableIndex(\n startingIndex: number,\n forward: boolean,\n): number | undefined {\n const direction = forward ? 1 : -1;\n let newIndex = startingIndex;\n for (\n ;\n newIndex > 0 && newIndex < items.value.length;\n newIndex += direction\n ) {\n const item = items.value[newIndex];\n // Break if the item at this index is viable (not disabled and is visible)\n if (item.visible && !item.disabled) break;\n }\n\n if (newIndex < 0 || newIndex >= items.value.length) return undefined;\n return newIndex;\n}\n\n/** Activate next child and deactivate prev child */\nfunction performAction(newValue: ModelValue): void {\n const oldValue = activeItem.value?.value;\n const oldItem = activeItem.value;\n const newItem =\n items.value.find((item) => item.value === newValue) || items.value[0];\n\n if (oldItem && newItem) {\n oldItem.deactivate(newItem.index);\n newItem.activate(oldItem.index);\n }\n\n nextTick(() => {\n vmodel.value = newValue;\n emits(\"change\", newValue, oldValue);\n });\n}\n\n// --- Computed Component Classes ---\n\nconst rootClasses = defineClasses(\n [\"rootClass\", \"o-steps\"],\n [\n \"sizeClass\",\n \"o-steps--\",\n computed(() => props.size),\n computed(() => !!props.size),\n ],\n [\n \"variantClass\",\n \"o-steps--\",\n computed(() => props.variant),\n computed(() => !!props.variant),\n ],\n [\n \"verticalClass\",\n \"o-steps--vertical\",\n null,\n computed(() => props.vertical),\n ],\n [\n \"positionClass\",\n \"o-steps--position-\",\n computed(() => props.position),\n computed(() => !!props.position && props.vertical),\n ],\n [\"mobileClass\", \"o-steps--mobile\", null, isMobile],\n);\n\nconst tablistClasses = defineClasses(\n [\"listClass\", \"o-steps__list\"],\n [\n \"animatedClass\",\n \"o-steps__list--animated\",\n null,\n computed(() => props.animated),\n ],\n);\n\nconst dividerClasses = defineClasses([\"dividerClass\", \"o-steps__divider\"]);\n\nconst markerClasses = defineClasses(\n [\"markerClass\", \"o-steps__marker\"],\n [\n \"markerRoundedClass\",\n \"o-steps__marker--rounded\",\n null,\n computed(() => props.rounded),\n ],\n);\n\nconst contentClasses = defineClasses(\n [\"contentClass\", \"o-steps__content\"],\n [\n \"transitioningClass\",\n \"o-steps__content-transitioning\",\n null,\n isTransitioning,\n ],\n);\n\nconst navigationClasses = defineClasses([\n \"navigationClass\",\n \"o-steps__navigation\",\n]);\n</script>\n\n<template>\n <div ref=\"rootElement\" data-oruga=\"steps\" :class=\"rootClasses\">\n <ol\n :class=\"tablistClasses\"\n role=\"tablist\"\n :aria-label=\"ariaLabel\"\n :aria-orientation=\"vertical ? 'vertical' : 'horizontal'\">\n <li\n v-for=\"(childItem, index) in items\"\n v-show=\"childItem.visible\"\n :id=\"`tab-${childItem.identifier}`\"\n :key=\"childItem.identifier\"\n :class=\"childItem.stepClasses\"\n role=\"tab\"\n :tabindex=\"childItem.value === activeItem?.value ? 0 : -1\"\n :aria-current=\"\n childItem.value === activeItem?.value ? 'step' : undefined\n \"\n :aria-controls=\"`tabpanel-${childItem.identifier}`\"\n :aria-selected=\"childItem.value === activeItem?.value\"\n @click=\"itemClick(childItem)\"\n @keydown.enter.prevent=\"itemClick(childItem)\"\n @keydown.space.prevent=\"itemClick(childItem)\"\n @keydown.left.prevent=\"onPrev(childItem.index)\"\n @keydown.right.prevent=\"onNext(childItem.index)\"\n @keydown.home.prevent=\"onHomePressed\"\n @keydown.end.prevent=\"onEndPressed\">\n <span v-if=\"index > 0\" :class=\"dividerClasses\" />\n\n <div :class=\"markerClasses\">\n <o-icon\n v-if=\"childItem.icon\"\n :class=\"childItem.iconClasses\"\n :icon=\"childItem.icon\"\n :pack=\"childItem.iconPack\"\n :size=\"size\" />\n <span v-else-if=\"childItem.step\">\n {{ childItem.step }}\n </span>\n </div>\n\n <div :class=\"childItem.labelClasses\">\n {{ childItem.label }}\n </div>\n </li>\n </ol>\n\n <section :class=\"contentClasses\">\n <!--\n @slot Place step items here\n -->\n <slot>\n <o-step-item\n v-for=\"option in groupedOptions\"\n v-show=\"!option.hidden\"\n v-bind=\"option.attrs\"\n :key=\"option.key\"\n :value=\"option.value\"\n :label=\"option.label\" />\n </slot>\n </section>\n\n <!--\n @slot Override step navigation\n @binding {{disabled: boolean, action: (): void }} previous - previous button configs\n @binding {{disabled: boolean, action: (): void }} next - next button configs\n -->\n <slot\n name=\"navigation\"\n :previous=\"{ disabled: !hasPrev, action: () => activateItem(-1) }\"\n :next=\"{ disabled: !hasNext, action: () => activateItem(1) }\">\n <nav v-if=\"hasNavigation\" :class=\"navigationClasses\">\n <o-button\n role=\"button\"\n :icon-left=\"iconPrev\"\n :icon-pack=\"iconPack\"\n :disabled=\"!hasPrev\"\n :aria-label=\"ariaPreviousLabel\"\n @click.prevent=\"activateItem(-1)\" />\n\n <o-button\n role=\"button\"\n :icon-left=\"iconNext\"\n :icon-pack=\"iconPack\"\n :disabled=\"!hasNext\"\n :aria-label=\"ariaNextLabel\"\n @click.prevent=\"activateItem(1)\" />\n </nav>\n </slot>\n </div>\n</template>\n","import type { App, Plugin } from \"vue\";\n\nimport Steps from \"./Steps.vue\";\nimport StepItem from \"./StepItem.vue\";\n\nimport { registerComponent } from \"@/utils/plugins\";\n\n/** export steps specific types */\nexport type * from \"./types\";\n\n/** export steps plugin */\nexport default {\n install(app: App) {\n registerComponent(app, Steps);\n registerComponent(app, StepItem);\n },\n} as Plugin;\n\n/** export steps components */\nexport { Steps as OSteps, StepItem as OStepItem };\n"],"names":["_useModel","index","Steps","St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