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.

111 lines
4.7 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script lang="ts">
  2. import Icon from "fa-svelte";
  3. export let name: IconName = "question";
  4. export let block: boolean = false;
  5. export let marginAutio: boolean = false;
  6. </script>
  7. <!-- svelte-ignore a11y-click-events-have-key-events -->
  8. {#if block}
  9. <div class="icon-wrapper" on:click class:marginAutio>
  10. <Icon class="icon" icon={icons[name] || icons.question} />
  11. </div>
  12. {:else}
  13. <Icon on:click class="icon" icon={icons[name] || icons.question} />
  14. {/if}
  15. <style>
  16. div.marginAutio {
  17. margin: auto;
  18. }
  19. </style>
  20. <script lang="ts" context="module">
  21. import { faQuestion } from "@fortawesome/free-solid-svg-icons/faQuestion";
  22. import { faPlus } from "@fortawesome/free-solid-svg-icons/faPlus";
  23. import { faPen } from "@fortawesome/free-solid-svg-icons/faPen";
  24. import { faArchive } from "@fortawesome/free-solid-svg-icons/faArchive";
  25. import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck";
  26. import { faCog } from "@fortawesome/free-solid-svg-icons/faCog";
  27. import { faLink } from "@fortawesome/free-solid-svg-icons/faLink";
  28. import { faStar } from "@fortawesome/free-solid-svg-icons/faStar";
  29. import { faTimes } from "@fortawesome/free-solid-svg-icons/faTimes";
  30. import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner";
  31. import { faHourglass } from "@fortawesome/free-solid-svg-icons/faHourglass";
  32. import { faCalendar } from "@fortawesome/free-solid-svg-icons/faCalendar";
  33. import { faExpand } from "@fortawesome/free-solid-svg-icons/faExpand";
  34. import { faSearch } from "@fortawesome/free-solid-svg-icons/faSearch";
  35. import { faClock } from "@fortawesome/free-solid-svg-icons/faClock";
  36. import { faThumbtack } from "@fortawesome/free-solid-svg-icons/faThumbtack";
  37. import { faHistory } from "@fortawesome/free-solid-svg-icons/faHistory";
  38. import { faLightbulb } from "@fortawesome/free-solid-svg-icons/faLightbulb";
  39. import { faChevronRight } from "@fortawesome/free-solid-svg-icons/faChevronRight";
  40. import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown";
  41. import { faChevronUp } from "@fortawesome/free-solid-svg-icons/faChevronUp";
  42. import { faTrash } from "@fortawesome/free-solid-svg-icons/faTrash";
  43. import { faCheckToSlot } from "@fortawesome/free-solid-svg-icons/faCheckToSlot";
  44. import { faEye } from "@fortawesome/free-solid-svg-icons/faEye";
  45. import { faList } from "@fortawesome/free-solid-svg-icons/faList";
  46. import { faPowerOff } from "@fortawesome/free-solid-svg-icons/faPowerOff";
  47. import { faCircleNotch } from "@fortawesome/free-solid-svg-icons/faCircleNotch";
  48. import { faTemperatureHalf } from "@fortawesome/free-solid-svg-icons/faTemperatureHalf";
  49. import { faPalette } from "@fortawesome/free-solid-svg-icons/faPalette";
  50. import { faSwatchbook } from "@fortawesome/free-solid-svg-icons/faSwatchbook";
  51. import { faCircleDot } from "@fortawesome/free-solid-svg-icons/faCircleDot";
  52. import { faMasksTheater } from "@fortawesome/free-solid-svg-icons/faMasksTheater";
  53. import { faTag } from "@fortawesome/free-solid-svg-icons/faTag";
  54. import { faFilter } from "@fortawesome/free-solid-svg-icons/faFilter";
  55. import { faSignature } from "@fortawesome/free-solid-svg-icons/faSignature";
  56. import { faAsterisk } from "@fortawesome/free-solid-svg-icons/faAsterisk";
  57. import { faPlay } from "@fortawesome/free-solid-svg-icons/faPlay";
  58. import { faClockRotateLeft } from "@fortawesome/free-solid-svg-icons/faClockRotateLeft";
  59. import { faNoteSticky } from "@fortawesome/free-solid-svg-icons/faNoteSticky";
  60. const icons = {
  61. "clock": faClock,
  62. "thumbtack": faThumbtack,
  63. "history": faHistory,
  64. "question": faQuestion,
  65. "plus": faPlus,
  66. "pen": faPen,
  67. "archive": faArchive,
  68. "check": faCheck,
  69. "cog": faCog,
  70. "link": faLink,
  71. "star": faStar,
  72. "times": faTimes,
  73. "lightbulb": faLightbulb,
  74. "spinner": faSpinner,
  75. "hourglass": faHourglass,
  76. "calendar": faCalendar,
  77. "expand": faExpand,
  78. "search": faSearch,
  79. "chevron_right": faChevronRight,
  80. "chevron_down": faChevronDown,
  81. "chevron_up": faChevronUp,
  82. "trash": faTrash,
  83. "check_slot": faCheckToSlot,
  84. "eye": faEye,
  85. "list": faList,
  86. "power": faPowerOff,
  87. "cirlce_notch": faCircleNotch,
  88. "temperature_half": faTemperatureHalf,
  89. "palette": faPalette,
  90. "swatch_book": faSwatchbook,
  91. "circle_dot": faCircleDot,
  92. "masks_theater": faMasksTheater,
  93. "tag": faTag,
  94. "filter": faFilter,
  95. "signature": faSignature,
  96. "asterisk": faAsterisk,
  97. "play": faPlay,
  98. "clock_rotate_left": faClockRotateLeft,
  99. "note_sticky": faNoteSticky,
  100. };
  101. export type IconName = keyof typeof icons;
  102. export const iconNames = Object.keys(icons).sort() as IconName[];
  103. export const DEFAULT_ICON: IconName = "question";
  104. </script>