549c377586c4ae2c8e889ce4542ead84a5c3954b843ca262de4ed8764ae238b35b5f842cbd2ad63935b86951dca82952610c5a68afc130c778845743b03a47 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
  2. import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
  3. import { isNumber } from '../../../utils/types.mjs';
  4. const scrollbarProps = buildProps({
  5. distance: {
  6. type: Number,
  7. default: 0
  8. },
  9. height: {
  10. type: [String, Number],
  11. default: ""
  12. },
  13. maxHeight: {
  14. type: [String, Number],
  15. default: ""
  16. },
  17. native: Boolean,
  18. wrapStyle: {
  19. type: definePropType([String, Object, Array]),
  20. default: ""
  21. },
  22. wrapClass: {
  23. type: [String, Array],
  24. default: ""
  25. },
  26. viewClass: {
  27. type: [String, Array],
  28. default: ""
  29. },
  30. viewStyle: {
  31. type: [String, Array, Object],
  32. default: ""
  33. },
  34. noresize: Boolean,
  35. tag: {
  36. type: String,
  37. default: "div"
  38. },
  39. always: Boolean,
  40. minSize: {
  41. type: Number,
  42. default: 20
  43. },
  44. tabindex: {
  45. type: [String, Number],
  46. default: void 0
  47. },
  48. id: String,
  49. role: String,
  50. ...useAriaProps(["ariaLabel", "ariaOrientation"])
  51. });
  52. const scrollbarEmits = {
  53. "end-reached": (direction) => ["left", "right", "top", "bottom"].includes(direction),
  54. scroll: ({
  55. scrollTop,
  56. scrollLeft
  57. }) => [scrollTop, scrollLeft].every(isNumber)
  58. };
  59. export { scrollbarEmits, scrollbarProps };
  60. //# sourceMappingURL=scrollbar.mjs.map