time-select.d.ts 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. import { IconPropType } from "../../../utils/vue/icon.js";
  2. import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
  3. import { ComponentSize } from "../../../constants/size.js";
  4. import { PopperEffect } from "../../popper/src/popper.js";
  5. import _default from "./time-select.vue.js";
  6. import { UseEmptyValuesProps } from "../../../hooks/use-empty-values/index.js";
  7. import * as _$vue from "vue";
  8. import { CSSProperties, Component, ExtractPublicPropTypes } from "vue";
  9. //#region ../../packages/components/time-select/src/time-select.d.ts
  10. interface TimeSelectProps extends UseEmptyValuesProps {
  11. /**
  12. * @description set format of time
  13. */
  14. format?: string;
  15. /**
  16. * @description binding value
  17. */
  18. modelValue?: string | null;
  19. /**
  20. * @description whether TimeSelect is disabled
  21. */
  22. disabled?: boolean;
  23. /**
  24. * @description whether the input is editable
  25. */
  26. editable?: boolean;
  27. /**
  28. * @description Tooltip theme, built-in theme: `dark` / `light`
  29. */
  30. effect?: PopperEffect;
  31. /**
  32. * @description whether to show clear button
  33. */
  34. clearable?: boolean;
  35. /**
  36. * @description size of Input
  37. */
  38. size?: ComponentSize;
  39. /**
  40. * @description placeholder in non-range mode
  41. */
  42. placeholder?: string;
  43. /**
  44. * @description start time
  45. */
  46. start?: string;
  47. /**
  48. * @description end time
  49. */
  50. end?: string;
  51. /**
  52. * @description time step
  53. */
  54. step?: string;
  55. /**
  56. * @description minimum time, any time before this time will be disabled
  57. */
  58. minTime?: string | null;
  59. /**
  60. * @description maximum time, any time after this time will be disabled
  61. */
  62. maxTime?: string | null;
  63. /**
  64. * @description whether `end` is included in options
  65. */
  66. includeEndTime?: boolean;
  67. /**
  68. * @description same as `name` in native input
  69. */
  70. name?: string;
  71. /**
  72. * @description custom prefix icon component
  73. */
  74. prefixIcon?: IconPropType;
  75. /**
  76. * @description custom clear icon component
  77. */
  78. clearIcon?: IconPropType;
  79. /**
  80. * @description custom class name for TimeSelect's dropdown
  81. */
  82. popperClass?: string;
  83. /**
  84. * @description custom style for TimeSelect's dropdown
  85. */
  86. popperStyle?: string | CSSProperties;
  87. }
  88. declare const DEFAULT_STEP = "00:30";
  89. /**
  90. * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
  91. */
  92. declare const timeSelectProps: {
  93. readonly emptyValues: ArrayConstructor;
  94. readonly valueOnClear: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
  95. readonly format: EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm", boolean>;
  96. readonly modelValue: {
  97. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
  98. readonly required: false;
  99. readonly validator: ((val: unknown) => boolean) | undefined;
  100. __epPropKey: true;
  101. };
  102. readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
  103. readonly editable: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  104. readonly effect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, "light", boolean>;
  105. readonly clearable: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  106. readonly size: {
  107. readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
  108. readonly required: false;
  109. readonly validator: ((val: unknown) => boolean) | undefined;
  110. __epPropKey: true;
  111. };
  112. readonly placeholder: StringConstructor;
  113. readonly start: EpPropFinalized<StringConstructor, unknown, unknown, "09:00", boolean>;
  114. readonly end: EpPropFinalized<StringConstructor, unknown, unknown, "18:00", boolean>;
  115. readonly step: EpPropFinalized<StringConstructor, unknown, unknown, "00:30", boolean>;
  116. readonly minTime: {
  117. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
  118. readonly required: false;
  119. readonly validator: ((val: unknown) => boolean) | undefined;
  120. __epPropKey: true;
  121. };
  122. readonly maxTime: {
  123. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
  124. readonly required: false;
  125. readonly validator: ((val: unknown) => boolean) | undefined;
  126. __epPropKey: true;
  127. };
  128. readonly includeEndTime: BooleanConstructor;
  129. readonly name: StringConstructor;
  130. readonly prefixIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
  131. readonly clearIcon: EpPropFinalized<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown, () => _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
  132. readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  133. readonly popperStyle: {
  134. readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
  135. readonly required: false;
  136. readonly validator: ((val: unknown) => boolean) | undefined;
  137. __epPropKey: true;
  138. };
  139. };
  140. /**
  141. * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
  142. */
  143. type TimeSelectPropsPublic = ExtractPublicPropTypes<typeof timeSelectProps>;
  144. type TimeSelectInstance = InstanceType<typeof _default> & unknown;
  145. //#endregion
  146. export { DEFAULT_STEP, TimeSelectInstance, TimeSelectProps, TimeSelectPropsPublic, timeSelectProps };