step.d.ts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import { IconPropType } from "../../../utils/vue/icon.js";
  2. import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
  3. import { TourContentProps } from "./content.js";
  4. import { TourBtnProps, TourMask } from "./types.js";
  5. import * as _$vue from "vue";
  6. import { CSSProperties, ExtractPublicPropTypes } from "vue";
  7. import * as _$_floating_ui_dom0 from "@floating-ui/dom";
  8. //#region ../../packages/components/tour/src/step.d.ts
  9. interface TourStepProps {
  10. /**
  11. * @description get the element the guide card points to. empty makes it show in center of screen
  12. */
  13. target?: string | HTMLElement | (() => HTMLElement | null) | null;
  14. /**
  15. * @description the title of the tour content
  16. */
  17. title?: string;
  18. /**
  19. * @description description
  20. */
  21. description?: string;
  22. /**
  23. * @description whether to show a close button
  24. */
  25. showClose?: boolean;
  26. /**
  27. * @description custom close icon, default is Close
  28. */
  29. closeIcon?: IconPropType;
  30. /**
  31. * @description whether to show the arrow
  32. */
  33. showArrow?: boolean;
  34. /**
  35. * @description position of the guide card relative to the target element
  36. */
  37. placement?: TourContentProps['placement'];
  38. /**
  39. * @description whether to enable masking, change mask style and fill color by pass custom props
  40. */
  41. mask?: TourMask;
  42. /**
  43. * @description custom style for content
  44. */
  45. contentStyle?: CSSProperties;
  46. /**
  47. * @description properties of the previous button
  48. */
  49. prevButtonProps?: TourBtnProps;
  50. /**
  51. * @description properties of the Next button
  52. */
  53. nextButtonProps?: TourBtnProps;
  54. /**
  55. * @description support pass custom scrollIntoView options
  56. */
  57. scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
  58. /**
  59. * @description type, affects the background color and text color
  60. */
  61. type?: 'default' | 'primary';
  62. }
  63. /**
  64. * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
  65. */
  66. declare const tourStepProps: {
  67. target: {
  68. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement | (() => HTMLElement | null)) | (() => string | HTMLElement | (() => HTMLElement | null) | null) | (((new (...args: any[]) => string | HTMLElement | (() => HTMLElement | null)) | (() => string | HTMLElement | (() => HTMLElement | null) | null)) | null)[], unknown, unknown>>;
  69. readonly required: false;
  70. readonly validator: ((val: unknown) => boolean) | undefined;
  71. __epPropKey: true;
  72. };
  73. title: StringConstructor;
  74. description: StringConstructor;
  75. showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
  76. closeIcon: {
  77. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
  78. readonly required: false;
  79. readonly validator: ((val: unknown) => boolean) | undefined;
  80. __epPropKey: true;
  81. };
  82. showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
  83. placement: EpPropFinalized<(new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => _$_floating_ui_dom0.Placement) | (((new (...args: any[]) => "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => _$_floating_ui_dom0.Placement)) | null)[], "left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end", unknown, string, boolean>;
  84. mask: EpPropFinalized<(new (...args: any[]) => boolean | {
  85. style?: CSSProperties;
  86. color?: string;
  87. }) | (() => TourMask) | (((new (...args: any[]) => boolean | {
  88. style?: CSSProperties;
  89. color?: string;
  90. }) | (() => TourMask)) | null)[], unknown, unknown, undefined, boolean>;
  91. contentStyle: {
  92. readonly type: _$vue.PropType<CSSProperties>;
  93. readonly required: false;
  94. readonly validator: ((val: unknown) => boolean) | undefined;
  95. __epPropKey: true;
  96. };
  97. prevButtonProps: {
  98. readonly type: _$vue.PropType<TourBtnProps>;
  99. readonly required: false;
  100. readonly validator: ((val: unknown) => boolean) | undefined;
  101. __epPropKey: true;
  102. };
  103. nextButtonProps: {
  104. readonly type: _$vue.PropType<TourBtnProps>;
  105. readonly required: false;
  106. readonly validator: ((val: unknown) => boolean) | undefined;
  107. __epPropKey: true;
  108. };
  109. scrollIntoViewOptions: EpPropFinalized<(new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions) | (((new (...args: any[]) => boolean | ScrollIntoViewOptions) | (() => boolean | ScrollIntoViewOptions)) | null)[], unknown, unknown, undefined, boolean>;
  110. type: {
  111. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "default" | "primary") | (() => "default" | "primary") | (((new (...args: any[]) => "default" | "primary") | (() => "default" | "primary")) | null)[], unknown, unknown>>;
  112. readonly required: false;
  113. readonly validator: ((val: unknown) => boolean) | undefined;
  114. __epPropKey: true;
  115. };
  116. };
  117. /**
  118. * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
  119. */
  120. type TourStepPropsPublic = ExtractPublicPropTypes<typeof tourStepProps>;
  121. declare const tourStepEmits: {
  122. close: () => boolean;
  123. };
  124. type TourStepEmits = typeof tourStepEmits;
  125. //#endregion
  126. export { TourStepEmits, TourStepProps, TourStepPropsPublic, tourStepEmits, tourStepProps };