{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@sgui-plus/utils/props'\r\nimport { usePopperContentProps } from '@sgui-plus/components/popper'\r\nimport { useDelayedToggleProps } from '@sgui-plus/hooks'\r\nimport type TooltipContent from './content.vue'\r\nimport type { ExtractPropTypes } from 'vue'\r\n\r\ntype ClassObjectType = Record<string, any>\r\ntype ClassType = string | ClassObjectType | ClassType[]\r\n\r\nexport const useTooltipContentProps = buildProps({\r\n  ...useDelayedToggleProps,\r\n  ...usePopperContentProps,\r\n  appendTo: {\r\n    type: definePropType<string | HTMLElement>([String, Object])\r\n  },\r\n  content: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  rawContent: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  persistent: Boolean,\r\n  ariaLabel: String,\r\n  // because model toggle prop is generated dynamically\r\n  // so the typing cannot be evaluated by typescript as type:\r\n  // [name]: { type: Boolean, default: null }\r\n  // so we need to declare that again for type checking.\r\n  visible: {\r\n    type: definePropType<boolean | null>(Boolean),\r\n    default: null,\r\n  },\r\n  transition: {\r\n    type: String,\r\n    default: 'sg-fade-in-linear',\r\n  },\r\n  transfer: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  disabled: Boolean,\r\n  maxWidth: {\r\n    type: [String, Number],\r\n    default: ''\r\n  },\r\n  dropClassName: {\r\n    type: definePropType<ClassType>([String, Array, Object]),\r\n  },\r\n  maxLength: {\r\n    type: Number,\r\n    default: 2000\r\n  },\r\n  theme: {\r\n    type: String,\r\n    default: 'dark',\r\n  },\r\n  autoHide: {\r\n    type: Boolean,\r\n    default: false\r\n  },\r\n  // 气泡内容是以 v-if 的方式显示，还是 v-show 的方式显示，默认 v-if\r\n  renderContentType: {\r\n    type: String,\r\n    values: ['if', 'show'],\r\n    default: 'if'\r\n  }\r\n} as const)\r\n\r\nexport type SgTooltipContentProps = ExtractPropTypes<\r\n  typeof useTooltipContentProps\r\n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