scrollbar.mjs 1.2 KB

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