0f1d2b4f8b65a19d10c44ff3a220f529f0fdf2dc6075ef9e3ef62e27c4d4387c5295fe7de47cb9e6aac8a2927436b096b8e817bedc773dbdebcb8b98c3418c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
  2. import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
  3. import { buildProps } from '../../../utils/vue/props/runtime.mjs';
  4. import { keysOf } from '../../../utils/objects.mjs';
  5. import { isUndefined } from '../../../utils/types.mjs';
  6. const alertEffects = ["light", "dark"];
  7. const alertProps = buildProps({
  8. title: {
  9. type: String,
  10. default: ""
  11. },
  12. description: {
  13. type: String,
  14. default: ""
  15. },
  16. type: {
  17. type: String,
  18. values: keysOf(TypeComponentsMap),
  19. default: "info"
  20. },
  21. closable: {
  22. type: Boolean,
  23. default: true
  24. },
  25. closeText: {
  26. type: String,
  27. default: ""
  28. },
  29. showIcon: Boolean,
  30. center: Boolean,
  31. effect: {
  32. type: String,
  33. values: alertEffects,
  34. default: "light"
  35. },
  36. ...useDelayedToggleProps,
  37. showAfter: Number
  38. });
  39. const alertEmits = {
  40. open: () => true,
  41. close: (evt) => isUndefined(evt) || evt instanceof Event
  42. };
  43. export { alertEffects, alertEmits, alertProps };
  44. //# sourceMappingURL=alert2.mjs.map