362c04c4d84e5d3e7abdb1c78bb1b877e7bebca657f31a335daa8a54be9d9d16b4d5c12e617822e7509271ce6b25f6ea3e56a7b467cd46b84dafc4c8288988 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
  2. import { useSizeProp } from '../../../hooks/use-size/index.mjs';
  3. import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
  4. import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
  5. import { isArray } from '@vue/shared';
  6. const checkboxGroupProps = buildProps({
  7. modelValue: {
  8. type: definePropType(Array),
  9. default: () => []
  10. },
  11. disabled: Boolean,
  12. min: Number,
  13. max: Number,
  14. size: useSizeProp,
  15. fill: String,
  16. textColor: String,
  17. tag: {
  18. type: String,
  19. default: "div"
  20. },
  21. validateEvent: {
  22. type: Boolean,
  23. default: true
  24. },
  25. options: {
  26. type: definePropType(Array)
  27. },
  28. props: {
  29. type: definePropType(Object),
  30. default: () => checkboxDefaultProps
  31. },
  32. ...useAriaProps(["ariaLabel"])
  33. });
  34. const checkboxGroupEmits = {
  35. [UPDATE_MODEL_EVENT]: (val) => isArray(val),
  36. change: (val) => isArray(val)
  37. };
  38. const checkboxDefaultProps = {
  39. label: "label",
  40. value: "value",
  41. disabled: "disabled"
  42. };
  43. export { checkboxDefaultProps, checkboxGroupEmits, checkboxGroupProps };
  44. //# sourceMappingURL=checkbox-group.mjs.map