{"version":3,"file":"props.cjs","sources":["../../../../../../packages/components/anchor/src/props.ts"],"sourcesContent":["import type { VueNode } from '@antdv/types';\nimport type { CSSProperties, ExtractPropTypes, PropType } from 'vue';\nimport type { AnchorContainer, AnchorDirection, AnchorLinkItemProps } from './interface';\n\nimport { anyType, arrayType, objectType, PropTypes } from '@antdv/utils';\n\nexport function anchorProps() {\n  return {\n    prefixCls: String,\n    offsetTop: Number,\n    bounds: Number,\n    affix: { type: Boolean, default: true },\n    showInkInFixed: { type: Boolean, default: false },\n    getContainer: Function as PropType<() => AnchorContainer>,\n    wrapperClass: String,\n    wrapperStyle: { type: Object as PropType<CSSProperties>, default: () => ({}) as CSSProperties },\n    getCurrentAnchor: Function as PropType<(activeLink: string) => string>,\n    targetOffset: Number,\n    items: arrayType<AnchorLinkItemProps[]>(),\n    direction: PropTypes.oneOf(['vertical', 'horizontal'] as AnchorDirection[]).def('vertical'),\n    onChange: Function as PropType<(currentActiveLink: string) => void>,\n    onClick: Function as PropType<(e: MouseEvent, link: { title: any, href: string }) => void>,\n  };\n}\n\nexport function anchorLinkProps() {\n  return {\n    prefixCls: String,\n    href: {\n      type: String,\n      default: '#',\n    },\n    title: anyType<VueNode | ((item: any) => VueNode)>(),\n    target: String,\n    /* private use  */\n    customTitleProps: objectType<AnchorLinkItemProps>(),\n  };\n}\n\nexport type AnchorProps = Partial<ExtractPropTypes<ReturnType<typeof anchorProps>>>;\n\nexport type AnchorLinkProps = Partial<ExtractPropTypes<ReturnType<typeof anchorLinkProps>>>;\n"],"names":["arrayType","PropTypes","anyType","objectType"],"mappings":";;;;;;AAMO,SAAS,WAAc,GAAA;AAC5B,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,MAAA;AAAA,IACX,SAAW,EAAA,MAAA;AAAA,IACX,MAAQ,EAAA,MAAA;AAAA,IACR,KAAO,EAAA,EAAE,IAAM,EAAA,OAAA,EAAS,SAAS,IAAK,EAAA;AAAA,IACtC,cAAgB,EAAA,EAAE,IAAM,EAAA,OAAA,EAAS,SAAS,KAAM,EAAA;AAAA,IAChD,YAAc,EAAA,QAAA;AAAA,IACd,YAAc,EAAA,MAAA;AAAA,IACd,cAAc,EAAE,IAAA,EAAM,QAAmC,OAAS,EAAA,OAAO,EAAqB,CAAA,EAAA;AAAA,IAC9F,gBAAkB,EAAA,QAAA;AAAA,IAClB,YAAc,EAAA,MAAA;AAAA,IACd,OAAOA,kBAAiC,EAAA;AAAA,IACxC,SAAA,EAAWC,iBAAU,KAAM,CAAA,CAAC,YAAY,YAAY,CAAsB,CAAE,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA,IAC1F,QAAU,EAAA,QAAA;AAAA,IACV,OAAS,EAAA,QAAA;AAAA,GACX,CAAA;AACF,CAAA;AAEO,SAAS,eAAkB,GAAA;AAChC,EAAO,OAAA;AAAA,IACL,SAAW,EAAA,MAAA;AAAA,IACX,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,MAAA;AAAA,MACN,OAAS,EAAA,GAAA;AAAA,KACX;AAAA,IACA,OAAOC,gBAA4C,EAAA;AAAA,IACnD,MAAQ,EAAA,MAAA;AAAA;AAAA,IAER,kBAAkBC,mBAAgC,EAAA;AAAA,GACpD,CAAA;AACF;;;;;"}