UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.44 kB
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-aria/index.ts"],"sourcesContent":["import { pick } from 'lodash-unified'\nimport { buildProps } from '@element-plus/utils'\n\nexport interface AriaProps {\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel?: string\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation?: 'horizontal' | 'vertical' | 'undefined'\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls?: string\n}\n\nexport const ariaProps = buildProps({\n /**\n * @description native `aria-label` attribute\n */\n ariaLabel: String,\n /**\n * @description native `aria-orientation` attribute\n */\n ariaOrientation: {\n type: String,\n values: ['horizontal', 'vertical', 'undefined'],\n },\n /**\n * @description native `aria-controls` attribute\n */\n ariaControls: String,\n})\n\nexport const useAriaProps = <T extends keyof typeof ariaProps>(\n arias: Array<T>\n) => {\n return pick<typeof ariaProps, T>(ariaProps, arias)\n}\n"],"names":[],"mappings":";;;AAkBO,MAAM,YAAY,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIlC,SAAA,EAAW,MAAA;AAAA;AAAA;AAAA;AAAA,EAIX,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,CAAC,YAAA,EAAc,UAAA,EAAY,WAAW;AAAA,GAChD;AAAA;AAAA;AAAA;AAAA,EAIA,YAAA,EAAc;AAChB,CAAC;AAEM,MAAM,YAAA,GAAe,CAC1B,KAAA,KACG;AACH,EAAA,OAAO,IAAA,CAA0B,WAAW,KAAK,CAAA;AACnD;;;;"}