{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "fold-vertical",
  "type": "registry:ui",
  "title": "fold-vertical",
  "description": "Animated fold vertical icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/fold-vertical.vue",
      "type": "registry:ui",
      "content": "<script setup lang=\"ts\">\nimport { motion, useAnimationControls } from 'motion-v'\nimport type { Variants } from 'motion-v'\nimport { useIconAnimation } from '../composables/useIconAnimation'\nimport type { AnimatedIconHandle } from '../types'\n\ndefineOptions({ inheritAttrs: false, name: 'FoldVerticalIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after copy-01: the nested parts of the fold vertical separate in depth and stack again\n// generated from @hugeicons/core-free-icons\nconst frontVariants: Variants = {\n  normal: {\n    transform: 'translate(0px, 0px)',\n  },\n  animate: {\n    transform: ['translate(0px, 0px)', 'translate(1.45px, -1.24px)', 'translate(0.21px, -0.21px)', 'translate(0px, 0px)'],\n    transition: {\n      duration: 0.53,\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\n}\n\nconst fileVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) rotate(0deg)',\n  },\n  animate: {\n    transform: ['translateY(0px) rotate(0deg)', 'translateY(-0.83px) rotate(-1.04deg)', 'translateY(0.47px) rotate(0.52deg)', 'translateY(0px) rotate(0deg)'],\n    transition: {\n      duration: 0.59,\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\n}\n\nconst controls = useAnimationControls()\nconst { onMouseEnter, onMouseLeave, startAnimation, stopAnimation } = useIconAnimation({\n  controls,\n  loops: false,\n})\n\ndefineExpose<AnimatedIconHandle>({ startAnimation, stopAnimation })\n</script>\n\n<template>\n  <div class=\"hia-icon\" @mouseenter=\"onMouseEnter\" @mouseleave=\"onMouseLeave\" v-bind=\"$attrs\">\n          <svg xmlns=\"http://www.w3.org/2000/svg\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" fill=\"none\" overflow=\"visible\">\n            <motion.path d=\"M2 12L4 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '3px 12px' }\" />\n            <motion.path d=\"M8 12L10 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '9px 12px' }\" />\n            <motion.path d=\"M14 12L16 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '15px 12px' }\" />\n            <motion.path d=\"M20 12L22 12\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '21px 12px' }\" />\n            <motion.path d=\"M12.75 17C12.75 16.5858 12.4142 16.25 12 16.25C11.5858 16.25 11.25 16.5858 11.25 17H12H12.75ZM11.25 22C11.25 22.4142 11.5858 22.75 12 22.75C12.4142 22.75 12.75 22.4142 12.75 22H12H11.25ZM12 16L12 15.25L12 16ZM14.3961 19.4447C14.6417 19.7783 15.1112 19.8495 15.4448 19.6039C15.7783 19.3582 15.8495 18.8887 15.6039 18.5552L15 19L14.3961 19.4447ZM8.3961 18.5552C8.15047 18.8888 8.22172 19.3583 8.55525 19.6039C8.88877 19.8495 9.35827 19.7783 9.6039 19.4448L9 19L8.3961 18.5552ZM12 17H11.25L11.25 22H12H12.75L12.75 17H12ZM12 16L12 16.75C11.8899 16.75 11.866 16.7093 11.9686 16.7712C12.0507 16.8207 12.1639 16.9055 12.3056 17.0308C12.5875 17.2798 12.9127 17.6261 13.2301 17.9917C13.5443 18.3536 13.8366 18.7177 14.0512 18.9927C14.1581 19.1297 14.2451 19.2438 14.305 19.3231C14.335 19.3628 14.3582 19.3937 14.3736 19.4145C14.3814 19.4248 14.3872 19.4327 14.391 19.4378C14.3929 19.4403 14.3942 19.4422 14.3951 19.4434C14.3955 19.444 14.3958 19.4444 14.396 19.4446C14.3961 19.4447 14.3961 19.4448 14.3962 19.4448C14.3962 19.4448 14.3962 19.4448 14.3962 19.4448C14.3961 19.4448 14.3961 19.4447 15 19C15.6039 18.5552 15.6038 18.5552 15.6038 18.5551C15.6038 18.555 15.6037 18.555 15.6036 18.5549C15.6035 18.5547 15.6034 18.5545 15.6032 18.5543C15.6028 18.5538 15.6023 18.5531 15.6017 18.5522C15.6004 18.5505 15.5986 18.5481 15.5963 18.5449C15.5917 18.5387 15.585 18.5297 15.5764 18.5181C15.5591 18.4949 15.534 18.4614 15.502 18.419C15.438 18.3343 15.3462 18.214 15.2337 18.0698C15.0093 17.7823 14.6997 17.3964 14.3628 17.0083C14.029 16.6239 13.6537 16.2202 13.2988 15.9067C13.1223 15.7507 12.9332 15.6012 12.7431 15.4866C12.5736 15.3844 12.3077 15.25 12 15.25L12 16ZM9 19C9.6039 19.4448 9.60387 19.4448 9.60385 19.4448C9.60385 19.4448 9.60384 19.4448 9.60385 19.4448C9.60387 19.4448 9.60392 19.4447 9.604 19.4446C9.60417 19.4444 9.60447 19.444 9.6049 19.4434C9.60576 19.4422 9.60714 19.4404 9.60904 19.4378C9.61282 19.4327 9.61863 19.4249 9.62637 19.4145C9.64185 19.3937 9.66501 19.3628 9.69496 19.3231C9.75488 19.2438 9.84186 19.1298 9.94884 18.9927C10.1634 18.7177 10.4556 18.3536 10.7699 17.9917C11.0873 17.6261 11.4125 17.2798 11.6943 17.0308C11.8361 16.9055 11.9493 16.8207 12.0313 16.7712C12.1339 16.7093 12.11 16.75 12 16.75L12 16L12 15.25C11.6923 15.25 11.4264 15.3844 11.2569 15.4866C11.0668 15.6012 10.8777 15.7507 10.7011 15.9067C10.3463 16.2202 9.97093 16.6239 9.6372 17.0083C9.30024 17.3964 8.9907 17.7823 8.76631 18.0698C8.65381 18.214 8.56199 18.3343 8.498 18.4191C8.466 18.4614 8.44091 18.495 8.42364 18.5181C8.415 18.5297 8.40831 18.5387 8.40369 18.545C8.40138 18.5481 8.39958 18.5505 8.39831 18.5523C8.39767 18.5531 8.39717 18.5538 8.3968 18.5543C8.39662 18.5545 8.39647 18.5547 8.39635 18.5549C8.39629 18.555 8.39623 18.5551 8.3962 18.5551C8.39615 18.5552 8.3961 18.5552 9 19Z\" fill=\"currentColor\" :variants=\"fileVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 19px' }\" />\n            <motion.path d=\"M11.25 7C11.25 7.41421 11.5858 7.75 12 7.75C12.4142 7.75 12.75 7.41421 12.75 7H12H11.25ZM12.75 2C12.75 1.58579 12.4142 1.25 12 1.25C11.5858 1.25 11.25 1.58579 11.25 2L12 2L12.75 2ZM12 8L12 8.75L12 8ZM15.6039 5.44479C15.8495 5.11127 15.7783 4.64177 15.4448 4.39613C15.1112 4.1505 14.6417 4.22174 14.3961 4.55526L15 5.00002L15.6039 5.44479ZM9.6039 4.55525C9.35827 4.22172 8.88877 4.15047 8.55525 4.3961C8.22172 4.64173 8.15047 5.11123 8.3961 5.44475L9 5L9.6039 4.55525ZM12 7H12.75L12.75 2L12 2L11.25 2L11.25 7H12ZM12 8L12 8.75C12.3077 8.75 12.5736 8.61559 12.7431 8.51341C12.9332 8.39881 13.1223 8.24928 13.2988 8.09329C13.6537 7.77979 14.029 7.37609 14.3628 6.99172C14.6997 6.60362 15.0093 6.21772 15.2337 5.9302C15.3462 5.78604 15.438 5.66568 15.502 5.58096C15.534 5.53859 15.5591 5.50507 15.5764 5.4819C15.585 5.47031 15.5917 5.4613 15.5963 5.45505C15.5986 5.45193 15.6004 5.4495 15.6017 5.44778C15.6023 5.44692 15.6028 5.44624 15.6032 5.44574C15.6034 5.44549 15.6035 5.44529 15.6036 5.44513C15.6037 5.44505 15.6038 5.44496 15.6038 5.44492C15.6038 5.44485 15.6039 5.44479 15 5.00002C14.3961 4.55526 14.3961 4.55522 14.3962 4.55519C14.3962 4.5552 14.3962 4.55518 14.3962 4.55519C14.3961 4.55522 14.3961 4.55529 14.396 4.5554C14.3958 4.55563 14.3955 4.55603 14.3951 4.55662C14.3942 4.55778 14.3929 4.55965 14.391 4.56221C14.3872 4.56731 14.3814 4.57515 14.3736 4.58553C14.3582 4.6063 14.335 4.63724 14.305 4.67689C14.2451 4.75624 14.1581 4.87026 14.0512 5.00734C13.8366 5.28231 13.5443 5.6464 13.2301 6.0083C12.9127 6.37392 12.5875 6.72022 12.3056 6.96921C12.1639 7.09447 12.0507 7.17931 11.9686 7.22878C11.866 7.29066 11.8899 7.25 12 7.25L12 8ZM9 5C8.3961 5.44475 8.39615 5.44482 8.3962 5.44489C8.39623 5.44493 8.39629 5.44501 8.39635 5.44509C8.39647 5.44525 8.39662 5.44546 8.3968 5.44571C8.39717 5.44621 8.39767 5.44689 8.39831 5.44775C8.39958 5.44946 8.40138 5.4519 8.40369 5.45502C8.40831 5.46126 8.415 5.47027 8.42364 5.48186C8.44091 5.50504 8.466 5.53855 8.498 5.58093C8.56199 5.66565 8.65381 5.78601 8.76631 5.93017C8.9907 6.2177 9.30024 6.60361 9.6372 6.99171C9.97093 7.37608 10.3463 7.77978 10.7011 8.09329C10.8777 8.24928 11.0668 8.39881 11.2569 8.51341C11.4264 8.61559 11.6923 8.75 12 8.75L12 8L12 7.25C12.11 7.25 12.134 7.29066 12.0313 7.22878C11.9493 7.17932 11.8361 7.09447 11.6943 6.96922C11.4125 6.72022 11.0873 6.37392 10.7699 6.0083C10.4556 5.6464 10.1634 5.2823 9.94884 5.00733C9.84186 4.87025 9.75488 4.75623 9.69496 4.67688C9.66501 4.63723 9.64185 4.60629 9.62637 4.58552C9.61863 4.57514 9.61282 4.5673 9.60904 4.56219C9.60714 4.55964 9.60576 4.55777 9.6049 4.5566C9.60447 4.55602 9.60417 4.55561 9.604 4.55539C9.60392 4.55527 9.60387 4.5552 9.60385 4.55518C9.60384 4.55517 9.60385 4.55519 9.60385 4.55518C9.60387 4.55521 9.6039 4.55525 9 5Z\" fill=\"currentColor\" :variants=\"frontVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 5px' }\" />\n          </svg>\n        </div>\n</template>\n"
    },
    {
      "path": "composables/useIconAnimation.ts",
      "type": "registry:lib",
      "content": "import { ref, toValue, type MaybeRefOrGetter } from 'vue'\nimport type { AnimatedIconHandle } from '../types'\n\nexport type IconPose = 'normal' | 'animate'\n\ntype AnimationControls = {\n  set: (variant: IconPose | Record<string, unknown>) => void\n  start: (variant: IconPose | Record<string, unknown>) => Promise<unknown>\n}\n\nexport function useReducedMotionFlag(\n  reduced?: MaybeRefOrGetter<boolean | undefined>,\n) {\n  if (typeof window === 'undefined') return () => false\n  return () => {\n    const override = reduced === undefined ? undefined : toValue(reduced)\n    if (override !== undefined) return override\n    return window.matchMedia('(prefers-reduced-motion: reduce)').matches\n  }\n}\n\nexport function useIconAnimation(options: {\n  controls: AnimationControls\n  loops?: boolean\n}): AnimatedIconHandle & {\n  onMouseEnter: () => void\n  onMouseLeave: () => void\n} {\n  const { controls, loops = false } = options\n  const isPlaying = ref(false)\n  let run = 0\n\n  const prefersReduced = () =>\n    typeof window !== 'undefined' &&\n    window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n  async function startAnimation() {\n    if (prefersReduced() || isPlaying.value) return\n\n    isPlaying.value = true\n    const current = ++run\n    controls.set('normal')\n    await controls.start('animate')\n    if (run === current) isPlaying.value = false\n  }\n\n  function stopAnimation() {\n    if (!loops) return\n    run += 1\n    isPlaying.value = false\n    void controls.start('normal')\n  }\n\n  return {\n    startAnimation,\n    stopAnimation,\n    onMouseEnter: () => {\n      void startAnimation()\n    },\n    onMouseLeave: () => {\n      stopAnimation()\n    },\n  }\n}\n"
    },
    {
      "path": "types/animated-icon.ts",
      "type": "registry:lib",
      "content": "export interface AnimatedIconHandle {\n  startAnimation: () => void\n  stopAnimation: () => void\n}\n\nexport interface AnimatedIconProps {\n  size?: number\n}\n"
    }
  ]
}
