alert.d.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import { TypeComponentsMap } from "../../../utils/vue/icon.js";
  2. import { EpPropFinalized } from "../../../utils/vue/props/types.js";
  3. import { ExtractPublicPropTypes } from "vue";
  4. //#region ../../packages/components/alert/src/alert.d.ts
  5. declare const alertEffects: readonly ["light", "dark"];
  6. interface AlertProps {
  7. /**
  8. * @description alert title.
  9. */
  10. title?: string;
  11. /**
  12. * @description descriptive text.
  13. */
  14. description?: string;
  15. /**
  16. * @description alert type.
  17. */
  18. type?: keyof typeof TypeComponentsMap;
  19. /**
  20. * @description whether alert can be dismissed.
  21. */
  22. closable?: boolean;
  23. /**
  24. * @description text for replacing x button
  25. */
  26. closeText?: string;
  27. /**
  28. * @description whether show icon
  29. */
  30. showIcon?: boolean;
  31. /**
  32. * @description should content be placed in center.
  33. */
  34. center?: boolean;
  35. /**
  36. * @description theme style
  37. */
  38. effect?: 'light' | 'dark';
  39. }
  40. /**
  41. * @deprecated Removed after 3.0.0, Use `AlertProps` instead.
  42. */
  43. declare const alertProps: {
  44. readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  45. readonly description: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  46. readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
  47. readonly closable: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  48. readonly closeText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  49. readonly showIcon: BooleanConstructor;
  50. readonly center: BooleanConstructor;
  51. readonly effect: EpPropFinalized<StringConstructor, "dark" | "light", unknown, "light", boolean>;
  52. };
  53. /**
  54. * @deprecated Removed after 3.0.0, Use `AlertProps` instead.
  55. */
  56. type AlertPropsPublic = ExtractPublicPropTypes<typeof alertProps>;
  57. declare const alertEmits: {
  58. close: (evt: MouseEvent) => boolean;
  59. };
  60. type AlertEmits = typeof alertEmits;
  61. //#endregion
  62. export { AlertEmits, AlertProps, AlertPropsPublic, alertEffects, alertEmits, alertProps };