UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 3.58 kB
{"version":3,"file":"avatar-group-props.mjs","sources":["../../../../../../packages/components/avatar/src/avatar-group-props.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { definePropType, isNumber } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { AvatarProps } from './avatar'\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\nimport type { Placement, PopperEffect } from '@element-plus/components/popper'\n\nexport const avatarGroupProps = {\n /**\n * @description control the size of avatars in this avatar-group\n */\n size: {\n type: definePropType<AvatarProps['size']>([Number, String]),\n values: componentSizes,\n validator: (val: unknown): val is number => isNumber(val),\n },\n /**\n * @description control the shape of avatars in this avatar-group\n */\n shape: {\n type: definePropType<AvatarProps['shape']>(String),\n values: ['circle', 'square'] as const,\n },\n /**\n * @description whether to collapse avatars\n */\n collapseAvatars: Boolean,\n /**\n * @description whether show all collapsed avatars when mouse hover text of the collapse-avatar. To use this, `collapse-avatars` must be true\n */\n collapseAvatarsTooltip: Boolean,\n /**\n * @description the max avatars number to be shown. To use this, `collapse-avatars` must be true\n */\n maxCollapseAvatars: {\n type: Number,\n default: 1,\n },\n /**\n * @description tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n /**\n * @description placement of tooltip\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'top',\n },\n /**\n * @description custom class name for tooltip\n */\n popperClass: useTooltipContentProps.popperClass,\n /**\n * @description custom style for tooltip\n */\n popperStyle: useTooltipContentProps.popperStyle,\n /**\n * @description custom class name for the collapse-avatar\n */\n collapseClass: String,\n /**\n * @description custom style for the collapse-avatar\n */\n collapseStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n} as const\nexport type AvatarGroupProps = ExtractPropTypes<typeof avatarGroupProps>\nexport type AvatarGroupProp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