card.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { EpPropFinalized } from "../../../utils/vue/props/types.js";
  2. import "../../../utils/index.js";
  3. import * as vue from "vue";
  4. import { ExtractPublicPropTypes, InjectionKey, StyleValue } from "vue";
  5. //#region ../../packages/components/card/src/card.d.ts
  6. interface CardProps {
  7. /**
  8. * @description title of the card. Also accepts a DOM passed by `slot#header`
  9. */
  10. header?: string;
  11. /**
  12. * @description content of footer. Also accepts a DOM passed by `slot#footer`
  13. */
  14. footer?: string;
  15. /**
  16. * @description CSS style of card body
  17. */
  18. bodyStyle?: StyleValue;
  19. /**
  20. * @description custom class name of card header
  21. */
  22. headerClass?: string;
  23. /**
  24. * @description custom class name of card body
  25. */
  26. bodyClass?: string;
  27. /**
  28. * @description custom class name of card footer
  29. */
  30. footerClass?: string;
  31. /**
  32. * @description when to show card shadows
  33. */
  34. shadow?: 'always' | 'hover' | 'never';
  35. }
  36. /**
  37. * @deprecated Removed after 3.0.0, Use `CardProps` instead.
  38. */
  39. declare const cardProps: {
  40. readonly header: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  41. readonly footer: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  42. readonly bodyStyle: EpPropFinalized<(new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | false | vue.CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown, "", boolean>;
  43. readonly headerClass: StringConstructor;
  44. readonly bodyClass: StringConstructor;
  45. readonly footerClass: StringConstructor;
  46. readonly shadow: EpPropFinalized<StringConstructor, "always" | "never" | "hover", unknown, undefined, boolean>;
  47. };
  48. /**
  49. * @deprecated Removed after 3.0.0, Use `CardProps` instead.
  50. */
  51. type CardPropsPublic = ExtractPublicPropTypes<typeof cardProps>;
  52. interface CardConfigContext {
  53. shadow?: CardProps['shadow'];
  54. }
  55. declare const cardContextKey: InjectionKey<CardConfigContext>;
  56. //#endregion
  57. export { CardConfigContext, CardProps, CardPropsPublic, cardContextKey, cardProps };