{"version":3,"file":"affix.mjs","sources":["../../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n  buildProps,\n  definePropType,\n  isBoolean,\n  isNumber,\n} from '@hd-front-end/utils'\nimport { CHANGE_EVENT } from '@hd-front-end/constants'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n  /**\n   * @description affix element zIndex value\n   * */\n  zIndex: {\n    type: definePropType<ZIndexProperty>([Number, String]),\n    default: 100,\n  },\n  /**\n   * @description target container. (CSS selector)\n   */\n  target: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description offset distance\n   * */\n  offset: {\n    type: Number,\n    default: 0,\n  },\n  /**\n   * @description position of affix\n   * */\n  position: {\n    type: String,\n    values: ['top', 'bottom'],\n    default: 'top',\n  },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\nexport type AffixPropsPublic = __ExtractPublicPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n  scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n    isNumber(scrollTop) && isBoolean(fixed),\n  [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix> & unknown\n"],"names":[],"mappings":";;;;AAYO,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,cAAA,CAA+B,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IACrD,OAAS,EAAA,GAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,KAAA,EAAO,QAAQ,CAAA;AAAA,IACxB,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,MAAA,EAAQ,CAAC,EAAE,SAAW,EAAA,KAAA,OACpB,QAAS,CAAA,SAAS,CAAK,IAAA,SAAA,CAAU,KAAK,CAAA;AAAA,EACxC,CAAC,YAAA,GAAe,CAAC,KAAA,KAAmB,UAAU,KAAK,CAAA;AACrD;;;;"}