Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

icons.js 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // Maps internal Vuetify icon names to actual Material Design icon names.
  2. var ICONS_MATERIAL = {
  3. 'complete': 'check',
  4. 'cancel': 'cancel',
  5. 'close': 'close',
  6. 'delete': 'cancel',
  7. 'clear': 'clear',
  8. 'success': 'check_circle',
  9. 'info': 'info',
  10. 'warning': 'priority_high',
  11. 'error': 'warning',
  12. 'prev': 'chevron_left',
  13. 'next': 'chevron_right',
  14. 'checkboxOn': 'check_box',
  15. 'checkboxOff': 'check_box_outline_blank',
  16. 'checkboxIndeterminate': 'indeterminate_check_box',
  17. 'delimiter': 'fiber_manual_record',
  18. 'sort': 'arrow_upward',
  19. 'expand': 'keyboard_arrow_down',
  20. 'menu': 'menu',
  21. 'subgroup': 'arrow_drop_down',
  22. 'dropdown': 'arrow_drop_down',
  23. 'radioOn': 'radio_button_checked',
  24. 'radioOff': 'radio_button_unchecked',
  25. 'edit': 'edit',
  26. 'ratingEmpty': 'star_border',
  27. 'ratingFull': 'star',
  28. 'ratingHalf': 'star_half',
  29. 'loading': 'cached'
  30. };
  31. // Maps internal Vuetify icon names to actual icons from materialdesignicons.com
  32. var ICONS_MDI = {
  33. 'complete': 'mdi-check',
  34. 'cancel': 'mdi-close-circle',
  35. 'close': 'mdi-close',
  36. 'delete': 'mdi-close-circle',
  37. 'clear': 'mdi-close',
  38. 'success': 'mdi-check-circle',
  39. 'info': 'mdi-information',
  40. 'warning': 'mdi-exclamation',
  41. 'error': 'mdi-alert',
  42. 'prev': 'mdi-chevron-left',
  43. 'next': 'mdi-chevron-right',
  44. 'checkboxOn': 'mdi-checkbox-marked',
  45. 'checkboxOff': 'mdi-checkbox-blank-outline',
  46. 'checkboxIndeterminate': 'mdi-minus-box',
  47. 'delimiter': 'mdi-circle',
  48. 'sort': 'mdi-arrow-up',
  49. 'expand': 'mdi-chevron-down',
  50. 'menu': 'mdi-menu',
  51. 'subgroup': 'mdi-menu-down',
  52. 'dropdown': 'mdi-menu-down',
  53. 'radioOn': 'mdi-radiobox-marked',
  54. 'radioOff': 'mdi-radiobox-blank',
  55. 'edit': 'mdi-pencil',
  56. 'ratingEmpty': 'mdi-star-outline',
  57. 'ratingFull': 'mdi-star',
  58. 'ratingHalf': 'mdi-star-half'
  59. };
  60. // Maps internal Vuetify icon names to actual Font-Awesome 4 icon names.
  61. var ICONS_FONTAWESOME4 = {
  62. 'complete': 'fa fa-check',
  63. 'cancel': 'fa fa-times-circle',
  64. 'close': 'fa fa-times',
  65. 'delete': 'fa fa-times-circle',
  66. 'clear': 'fa fa-times-circle',
  67. 'success': 'fa fa-check-circle',
  68. 'info': 'fa fa-info-circle',
  69. 'warning': 'fa fa-exclamation',
  70. 'error': 'fa fa-exclamation-triangle',
  71. 'prev': 'fa fa-chevron-left',
  72. 'next': 'fa fa-chevron-right',
  73. 'checkboxOn': 'fa fa-check-square',
  74. 'checkboxOff': 'fa fa-square-o',
  75. 'checkboxIndeterminate': 'fa fa-minus-square',
  76. 'delimiter': 'fa fa-circle',
  77. 'sort': 'fa fa-sort-up',
  78. 'expand': 'fa fa-chevron-down',
  79. 'menu': 'fa fa-bars',
  80. 'subgroup': 'fa fa-caret-down',
  81. 'dropdown': 'fa fa-caret-down',
  82. 'radioOn': 'fa fa-dot-circle',
  83. 'radioOff': 'fa fa-circle-o',
  84. 'edit': 'fa fa-pencil',
  85. 'ratingEmpty': 'fa fa-star-o',
  86. 'ratingFull': 'fa fa-star',
  87. 'ratingHalf': 'fa fa-star-half-o'
  88. };
  89. // Maps internal Vuetify icon names to actual Font-Awesome 5+ icon names.
  90. var ICONS_FONTAWESOME = {
  91. 'complete': 'fas fa-check',
  92. 'cancel': 'fas fa-times-circle',
  93. 'close': 'fas fa-times',
  94. 'delete': 'fas fa-times-circle',
  95. 'clear': 'fas fa-times-circle',
  96. 'success': 'fas fa-check-circle',
  97. 'info': 'fas fa-info-circle',
  98. 'warning': 'fas fa-exclamation',
  99. 'error': 'fas fa-exclamation-triangle',
  100. 'prev': 'fas fa-chevron-left',
  101. 'next': 'fas fa-chevron-right',
  102. 'checkboxOn': 'fas fa-check-square',
  103. 'checkboxOff': 'far fa-square',
  104. 'checkboxIndeterminate': 'fas fa-minus-square',
  105. 'delimiter': 'fas fa-circle',
  106. 'sort': 'fas fa-sort-up',
  107. 'expand': 'fas fa-chevron-down',
  108. 'menu': 'fas fa-bars',
  109. 'subgroup': 'fas fa-caret-down',
  110. 'dropdown': 'fas fa-caret-down',
  111. 'radioOn': 'far fa-dot-circle',
  112. 'radioOff': 'far fa-circle',
  113. 'edit': 'fas fa-edit',
  114. 'ratingEmpty': 'far fa-star',
  115. 'ratingFull': 'fas fa-star',
  116. 'ratingHalf': 'fas fa-star-half'
  117. };
  118. export function convertToComponentDeclarations(component, iconSet) {
  119. var result = {};
  120. for (var key in iconSet) {
  121. result[key] = {
  122. component: component,
  123. props: {
  124. icon: iconSet[key].split(' fa-')
  125. }
  126. };
  127. }
  128. return result;
  129. }
  130. var iconSets = {
  131. md: ICONS_MATERIAL,
  132. mdi: ICONS_MDI,
  133. fa: ICONS_FONTAWESOME,
  134. fa4: ICONS_FONTAWESOME4,
  135. faSvg: convertToComponentDeclarations('font-awesome-icon', ICONS_FONTAWESOME)
  136. };
  137. export default function icons() {
  138. var iconfont = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'md';
  139. var icons = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  140. return Object.assign({}, iconSets[iconfont] || iconSets.md, icons);
  141. }
  142. //# sourceMappingURL=icons.js.map