index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <div :class="`grid ${grid} gap-y-6`">
  3. <div v-for="icon in icons" :key="icon" class="flex justify-center hover:cursor-pointer" @click="selectIcon(icon)">
  4. <div v-if="modelValue === icon">
  5. <div class="flex justify-center w-full text-violet-700"><Icon :name="icon" /></div>
  6. <div class="text-sm text-violet-700">{{ icon }}</div>
  7. </div>
  8. <div v-else>
  9. <div class="flex justify-center w-full"><Icon :name="icon" /></div>
  10. <div class="text-sm">{{ icon }}</div>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script lang="ts" setup>
  16. const props = defineProps({
  17. modelValue: {
  18. type: String,
  19. require: true,
  20. },
  21. grid: {
  22. type: String,
  23. default: 'grid-cols-5',
  24. },
  25. })
  26. const emits = defineEmits(['update:modelValue', 'close'])
  27. const selectIcon = (icon: string) => {
  28. emits('update:modelValue', icon)
  29. emits('close')
  30. }
  31. // icons
  32. const icons = [
  33. 'academic-cap',
  34. 'adjustments-horizontal',
  35. 'adjustments-vertical',
  36. 'archive-box-arrow-down',
  37. 'archive-box-x-mark',
  38. 'archive-box',
  39. 'arrow-down-circle',
  40. 'arrow-down-left',
  41. 'arrow-down-on-square-stack',
  42. 'arrow-down-on-square',
  43. 'arrow-down-right',
  44. 'arrow-down-tray',
  45. 'arrow-down',
  46. 'arrow-left-circle',
  47. 'arrow-left-on-rectangle',
  48. 'arrow-left',
  49. 'arrow-long-down',
  50. 'arrow-long-left',
  51. 'arrow-long-right',
  52. 'arrow-long-up',
  53. 'arrow-path-rounded-square',
  54. 'arrow-path',
  55. 'arrow-right-circle',
  56. 'arrow-right-on-rectangle',
  57. 'arrow-right',
  58. 'arrow-small-down',
  59. 'arrow-small-left',
  60. 'arrow-small-right',
  61. 'arrow-small-up',
  62. 'arrow-top-right-on-square',
  63. 'arrow-trending-down',
  64. 'arrow-trending-up',
  65. 'arrow-up-circle',
  66. 'arrow-up-left',
  67. 'arrow-up-on-square-stack',
  68. 'arrow-up-on-square',
  69. 'arrow-up-right',
  70. 'arrow-up-tray',
  71. 'arrow-up',
  72. 'arrow-uturn-down',
  73. 'arrow-uturn-left',
  74. 'arrow-uturn-right',
  75. 'arrow-uturn-up',
  76. 'arrows-pointing-in',
  77. 'arrows-pointing-out',
  78. 'arrows-right-left',
  79. 'arrows-up-down',
  80. 'at-symbol',
  81. 'backspace',
  82. 'backward',
  83. 'banknotes',
  84. 'bars-2',
  85. 'bars-3-bottom-left',
  86. 'bars-3-bottom-right',
  87. 'bars-3-center-left',
  88. 'bars-3',
  89. 'bars-4',
  90. 'bars-arrow-down',
  91. 'bars-arrow-up',
  92. 'battery-0',
  93. 'battery-100',
  94. 'battery-50',
  95. 'beaker',
  96. 'bell-alert',
  97. 'bell-slash',
  98. 'bell-snooze',
  99. 'bell',
  100. 'bolt-slash',
  101. 'bolt',
  102. 'book-open',
  103. 'bookmark-slash',
  104. 'bookmark-square',
  105. 'bookmark',
  106. 'briefcase',
  107. 'bug-ant',
  108. 'building-library',
  109. 'building-office-2',
  110. 'building-office',
  111. 'building-storefront',
  112. 'cake',
  113. 'calculator',
  114. 'calendar-days',
  115. 'calendar',
  116. 'camera',
  117. 'chart-bar-square',
  118. 'chart-bar',
  119. 'chart-pie',
  120. 'chat-bubble-bottom-center-text',
  121. 'chat-bubble-bottom-center',
  122. 'chat-bubble-left-ellipsis',
  123. 'chat-bubble-left-right',
  124. 'chat-bubble-left',
  125. 'chat-bubble-oval-left-ellipsis',
  126. 'chat-bubble-oval-left',
  127. 'check-badge',
  128. 'check-circle',
  129. 'check',
  130. 'chevron-double-down',
  131. 'chevron-double-left',
  132. 'chevron-double-right',
  133. 'chevron-double-up',
  134. 'chevron-down',
  135. 'chevron-left',
  136. 'chevron-right',
  137. 'chevron-up-down',
  138. 'chevron-up',
  139. 'circle-stack',
  140. 'clipboard-document-check',
  141. 'clipboard-document-list',
  142. 'clipboard-document',
  143. 'clipboard',
  144. 'clock',
  145. 'cloud-arrow-down',
  146. 'cloud-arrow-up',
  147. 'cloud',
  148. 'code-bracket-square',
  149. 'code-bracket',
  150. 'cog-6-tooth',
  151. 'cog-8-tooth',
  152. 'cog',
  153. 'command-line',
  154. 'computer-desktop',
  155. 'cpu-chip',
  156. 'credit-card',
  157. 'cube-transparent',
  158. 'cube',
  159. 'currency-bangladeshi',
  160. 'currency-dollar',
  161. 'currency-euro',
  162. 'currency-pound',
  163. 'currency-rupee',
  164. 'currency-yen',
  165. 'cursor-arrow-rays',
  166. 'cursor-arrow-ripple',
  167. 'device-phone-mobile',
  168. 'device-tablet',
  169. 'document-arrow-down',
  170. 'document-arrow-up',
  171. 'document-chart-bar',
  172. 'document-check',
  173. 'document-duplicate',
  174. 'document-magnifying-glass',
  175. 'document-minus',
  176. 'document-plus',
  177. 'document-text',
  178. 'document',
  179. 'ellipsis-horizontal-circle',
  180. 'ellipsis-horizontal',
  181. 'ellipsis-vertical',
  182. 'envelope-open',
  183. 'envelope',
  184. 'exclamation-circle',
  185. 'exclamation-triangle',
  186. 'eye-dropper',
  187. 'eye-slash',
  188. 'eye',
  189. 'face-frown',
  190. 'face-smile',
  191. 'film',
  192. 'finger-print',
  193. 'fire',
  194. 'flag',
  195. 'folder-arrow-down',
  196. 'folder-minus',
  197. 'folder-open',
  198. 'folder-plus',
  199. 'folder',
  200. 'forward',
  201. 'funnel',
  202. 'gif',
  203. 'gift-top',
  204. 'gift',
  205. 'globe-alt',
  206. 'globe-americas',
  207. 'globe-asia-australia',
  208. 'globe-europe-africa',
  209. 'hand-raised',
  210. 'hand-thumb-down',
  211. 'hand-thumb-up',
  212. 'hashtag',
  213. 'heart',
  214. 'home-modern',
  215. 'home',
  216. 'identification',
  217. 'inbox-arrow-down',
  218. 'inbox-stack',
  219. 'inbox',
  220. 'information-circle',
  221. 'key',
  222. 'language',
  223. 'lifebuoy',
  224. 'light-bulb',
  225. 'link',
  226. 'list-bullet',
  227. 'lock-closed',
  228. 'lock-open',
  229. 'magnifying-glass-circle',
  230. 'magnifying-glass-minus',
  231. 'magnifying-glass-plus',
  232. 'magnifying-glass',
  233. 'map-pin',
  234. 'map',
  235. 'megaphone',
  236. 'microphone',
  237. 'minus-circle',
  238. 'minus-small',
  239. 'minus',
  240. 'moon',
  241. 'musical-note',
  242. 'newspaper',
  243. 'no-symbol',
  244. 'paint-brush',
  245. 'paper-airplane',
  246. 'paper-clip',
  247. 'pause-circle',
  248. 'pause',
  249. 'pencil-square',
  250. 'pencil',
  251. 'phone-arrow-down-left',
  252. 'phone-arrow-up-right',
  253. 'phone-x-mark',
  254. 'phone',
  255. 'photo',
  256. 'play-circle',
  257. 'play-pause',
  258. 'play',
  259. 'plus-circle',
  260. 'plus-small',
  261. 'plus',
  262. 'power',
  263. 'presentation-chart-bar',
  264. 'presentation-chart-line',
  265. 'printer',
  266. 'puzzle-piece',
  267. 'qr-code',
  268. 'question-mark-circle',
  269. 'queue-list',
  270. 'radio',
  271. 'receipt-percent',
  272. 'receipt-refund',
  273. 'rectangle-group',
  274. 'rectangle-stack',
  275. 'rocket-launch',
  276. 'rss',
  277. 'scale',
  278. 'scissors',
  279. 'server-stack',
  280. 'server',
  281. 'share',
  282. 'shield-check',
  283. 'shield-exclamation',
  284. 'shopping-bag',
  285. 'shopping-cart',
  286. 'signal-slash',
  287. 'signal',
  288. 'sparkles',
  289. 'speaker-wave',
  290. 'speaker-x-mark',
  291. 'square-2-stack',
  292. 'square-3-stack-3d',
  293. 'squares-2x2',
  294. 'squares-plus',
  295. 'star',
  296. 'stop-circle',
  297. 'stop',
  298. 'sun',
  299. 'swatch',
  300. 'table-cells',
  301. 'tag',
  302. 'ticket',
  303. 'trash',
  304. 'trophy',
  305. 'truck',
  306. 'tv',
  307. 'user-circle',
  308. 'user-group',
  309. 'user-minus',
  310. 'user-plus',
  311. 'user',
  312. 'users',
  313. 'variable',
  314. 'video-camera-slash',
  315. 'video-camera',
  316. 'view-columns',
  317. 'viewfinder-circle',
  318. 'wallet',
  319. 'wifi',
  320. 'window',
  321. 'wrench-screwdriver',
  322. 'wrench',
  323. 'x-circle',
  324. 'x-mark',
  325. ]
  326. </script>
  327. <style scoped></style>